betterstart-cli 0.0.11 → 0.0.13
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/assets/adapters/next/plugins/blog/plugin.ts +1 -1
- package/dist/assets/adapters/next/plugins/blog/schemas/menus.json +115 -0
- package/dist/assets/adapters/next/plugins/blog/schemas/posts.json +2 -7
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/lifecycle-hooks-tab.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/snippets-tab.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode-integrate.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-versions-drawer.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/edit-media-dialog-content.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-url-importer.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/page-header.tsx +20 -17
- package/dist/assets/adapters/next/templates/init/data/navigation.ts +2 -1
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-slash-menu.ts +28 -2
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor.ts +22 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-audit-log.ts +23 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/cleanup-audit-logs.ts +63 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/get-audit-logs.ts +97 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/index.ts +17 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/record-audit-event.ts +37 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/register.ts +13 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/request-metadata.ts +37 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/types.ts +72 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/forms/upsert-form-settings.ts +3 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/media/create-media.ts +19 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/media/delete-media-bulk.ts +23 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/media/delete-media.ts +21 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/media/update-media.ts +23 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/profile/update-email.ts +17 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/upload/upload-files.ts +3 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/upload/upload-media-from-url.ts +3 -0
- package/dist/assets/adapters/next/templates/init/lib/actions/users/create-user.ts +19 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/delete-user.ts +23 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/update-user-role.ts +23 -1
- package/dist/assets/adapters/next/templates/init/lib/db/core/schema.ts +49 -0
- package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/index.ts +6 -1
- package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/register.ts +3 -0
- package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/registry.ts +36 -1
- package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/runner.ts +116 -12
- package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/types.ts +33 -0
- package/dist/assets/adapters/next/templates/init/pages/audit-log/audit-log-detail-drawer.tsx +96 -0
- package/dist/assets/adapters/next/templates/init/pages/audit-log/audit-log-detail-row.tsx +17 -0
- package/dist/assets/adapters/next/templates/init/pages/audit-log/audit-log-filters.tsx +152 -0
- package/dist/assets/adapters/next/templates/init/pages/audit-log/audit-log-page-content.tsx +279 -0
- package/dist/assets/adapters/next/templates/init/pages/audit-log/audit-log-page-skeleton.tsx +19 -0
- package/dist/assets/adapters/next/templates/init/pages/audit-log/audit-log-page.tsx +14 -0
- package/dist/assets/adapters/next/templates/init/pages/dashboard-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/forgot-password-page-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/login-page-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/reset-password-page-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/utils/audit/audit.ts +54 -0
- package/dist/assets/adapters/next/templates/init/utils/editor/tiptap.ts +0 -24
- package/dist/assets/shared-assets/react-admin/custom/content-editor/horizontal-rule-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/index.tsx +6 -0
- package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-bubble-menu.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-editor-controls.tsx +27 -40
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-popover-button.tsx +0 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/mobile-toolbar-content.tsx +4 -4
- package/dist/assets/shared-assets/react-admin/custom/content-editor/mode-toggle-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/selection-bubble-menu.tsx +45 -8
- package/dist/assets/shared-assets/react-admin/custom/content-editor/slash-command-menu.tsx +153 -27
- package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode-dropdown-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode.tsx +9 -9
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-bubble-menu.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-button.tsx +9 -4
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/blockquote-button/blockquote-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/code-block-button/code-block-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover-content.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx +11 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/source-color-highlight-popover.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu-item.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx +9 -4
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-control-popover.tsx +2 -4
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-main.tsx +19 -45
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-popover.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/list-dropdown-menu/list-dropdown-menu-item.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx +9 -4
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/mark-button/mark-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/undo-redo-button/undo-redo-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/date-range-picker.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/custom/gallery-field.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/media-gallery-field.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/placeholder-card.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/placeholder.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/sortable-gallery-item.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/schema.json +0 -23
- package/dist/assets/shared-assets/react-admin/ui/accordion.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/alert.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/button.tsx +18 -18
- package/dist/assets/shared-assets/react-admin/ui/card.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/chart.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/combobox.tsx +29 -5
- package/dist/assets/shared-assets/react-admin/ui/command.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/context-menu.tsx +6 -6
- package/dist/assets/shared-assets/react-admin/ui/drawer.tsx +7 -3
- package/dist/assets/shared-assets/react-admin/ui/dropdown-menu.tsx +32 -17
- package/dist/assets/shared-assets/react-admin/ui/empty.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/field.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/hover-card.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/input-group.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/item.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/menubar.tsx +7 -7
- package/dist/assets/shared-assets/react-admin/ui/navigation-menu.tsx +4 -4
- package/dist/assets/shared-assets/react-admin/ui/popover.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/resizable.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/select.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/sidebar.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/skeleton.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/tabs.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/textarea.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/tooltip.tsx +1 -1
- package/dist/cli.js +2779 -810
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Button } from '@admin/components/ui/button'
|
|
4
4
|
import { InputGroup, InputGroupInput } from '@admin/components/ui/input-group'
|
|
5
|
-
import {
|
|
6
|
-
import { CornerDownLeftIcon, ExternalLinkIcon, TrashIcon } from 'lucide-react'
|
|
5
|
+
import { TrashIcon } from 'lucide-react'
|
|
7
6
|
import type * as React from 'react'
|
|
8
7
|
|
|
9
8
|
export interface LinkMainProps {
|
|
@@ -23,17 +22,9 @@ export interface LinkMainProps {
|
|
|
23
22
|
* Function to remove the link from the editor.
|
|
24
23
|
*/
|
|
25
24
|
removeLink: () => void
|
|
26
|
-
/**
|
|
27
|
-
* Function to open the link.
|
|
28
|
-
*/
|
|
29
|
-
openLink: () => void
|
|
30
|
-
/**
|
|
31
|
-
* Whether the link is currently active in the editor.
|
|
32
|
-
*/
|
|
33
|
-
isActive: boolean
|
|
34
25
|
}
|
|
35
26
|
|
|
36
|
-
export function LinkMain({ url, setUrl, setLink, removeLink
|
|
27
|
+
export function LinkMain({ url, setUrl, setLink, removeLink }: LinkMainProps) {
|
|
37
28
|
const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
|
|
38
29
|
if (event.key === 'Enter') {
|
|
39
30
|
event.preventDefault()
|
|
@@ -42,7 +33,7 @@ export function LinkMain({ url, setUrl, setLink, removeLink, openLink, isActive
|
|
|
42
33
|
}
|
|
43
34
|
|
|
44
35
|
return (
|
|
45
|
-
<div className="flex min-w-max items-center gap-
|
|
36
|
+
<div className="flex flex-col min-w-max items-center gap-2">
|
|
46
37
|
<InputGroup className="h-9 min-w-64">
|
|
47
38
|
<InputGroupInput
|
|
48
39
|
type="url"
|
|
@@ -57,40 +48,23 @@ export function LinkMain({ url, setUrl, setLink, removeLink, openLink, isActive
|
|
|
57
48
|
/>
|
|
58
49
|
</InputGroup>
|
|
59
50
|
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
size="icon-sm"
|
|
67
|
-
>
|
|
68
|
-
<CornerDownLeftIcon className="tiptap-button-icon" />
|
|
69
|
-
</Button>
|
|
70
|
-
|
|
71
|
-
<Separator orientation="vertical" decorative className="h-6 my-auto self-center" />
|
|
72
|
-
|
|
73
|
-
<Button
|
|
74
|
-
type="button"
|
|
75
|
-
onClick={openLink}
|
|
76
|
-
title="Open in new window"
|
|
77
|
-
disabled={!url && !isActive}
|
|
78
|
-
variant="ghost"
|
|
79
|
-
size="icon-sm"
|
|
80
|
-
>
|
|
81
|
-
<ExternalLinkIcon className="tiptap-button-icon" />
|
|
82
|
-
</Button>
|
|
51
|
+
<div className="flex items-center gap-1 w-full">
|
|
52
|
+
{url && (
|
|
53
|
+
<Button type="button" onClick={removeLink} title="Remove link" variant="destructive">
|
|
54
|
+
<TrashIcon />
|
|
55
|
+
</Button>
|
|
56
|
+
)}
|
|
83
57
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
</
|
|
58
|
+
<Button
|
|
59
|
+
type="button"
|
|
60
|
+
onClick={setLink}
|
|
61
|
+
title="Apply link"
|
|
62
|
+
variant="default"
|
|
63
|
+
className="flex-1"
|
|
64
|
+
>
|
|
65
|
+
Insert
|
|
66
|
+
</Button>
|
|
67
|
+
</div>
|
|
94
68
|
</div>
|
|
95
69
|
)
|
|
96
70
|
}
|
|
@@ -73,7 +73,7 @@ export function ListDropdownMenu({
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
return (
|
|
76
|
-
<DropdownMenu open={isOpen} onOpenChange={handleOnOpenChange}>
|
|
76
|
+
<DropdownMenu modal={false} open={isOpen} onOpenChange={handleOnOpenChange}>
|
|
77
77
|
<DropdownMenuTrigger asChild>
|
|
78
78
|
<Button
|
|
79
79
|
type="button"
|
|
@@ -88,15 +88,20 @@ export function ListDropdownMenu({
|
|
|
88
88
|
size="icon-sm"
|
|
89
89
|
className="w-auto px-2"
|
|
90
90
|
{...props}
|
|
91
|
-
onPointerDown={(
|
|
91
|
+
onPointerDown={(event) => event.preventDefault()}
|
|
92
92
|
onClick={() => handleOnOpenChange(!isOpen)}
|
|
93
93
|
>
|
|
94
|
-
<Icon
|
|
94
|
+
<Icon />
|
|
95
95
|
<ChevronDownIcon className="tiptap-button-dropdown-small" />
|
|
96
96
|
</Button>
|
|
97
97
|
</DropdownMenuTrigger>
|
|
98
98
|
|
|
99
|
-
<DropdownMenuContent
|
|
99
|
+
<DropdownMenuContent
|
|
100
|
+
align="start"
|
|
101
|
+
className="w-auto min-w-40"
|
|
102
|
+
onCloseAutoFocus={(event) => event.preventDefault()}
|
|
103
|
+
portalled={false}
|
|
104
|
+
>
|
|
100
105
|
<DropdownMenuGroup>
|
|
101
106
|
{filteredLists.map((option) => (
|
|
102
107
|
<ListDropdownMenuItem
|
|
@@ -105,7 +105,7 @@ export function MarkButton({
|
|
|
105
105
|
>
|
|
106
106
|
{children ?? (
|
|
107
107
|
<>
|
|
108
|
-
<Icon
|
|
108
|
+
<Icon />
|
|
109
109
|
{text && <span className="tiptap-button-text">{text}</span>}
|
|
110
110
|
{shouldShowControlShortcut(shortcut) && (
|
|
111
111
|
<MarkShortcutBadge type={type} shortcutKeys={shortcutKeys} />
|
|
@@ -103,7 +103,7 @@ export function UndoRedoButton({
|
|
|
103
103
|
>
|
|
104
104
|
{children ?? (
|
|
105
105
|
<>
|
|
106
|
-
<Icon
|
|
106
|
+
<Icon />
|
|
107
107
|
{text && <span className="tiptap-button-text">{text}</span>}
|
|
108
108
|
{shouldShowControlShortcut(shortcut) && (
|
|
109
109
|
<HistoryShortcutBadge action={action} shortcutKeys={shortcutKeys} />
|
|
@@ -134,12 +134,12 @@ export function DateRangePicker({
|
|
|
134
134
|
>
|
|
135
135
|
<PopoverTrigger asChild>
|
|
136
136
|
<Button variant="outline" className={cn('w-[206px]', className)} disabled={disabled}>
|
|
137
|
-
<CalendarIcon
|
|
137
|
+
<CalendarIcon />
|
|
138
138
|
<span className="min-w-0 flex-1 truncate text-left tabular-nums">{triggerLabel}</span>
|
|
139
|
-
<ChevronDown
|
|
139
|
+
<ChevronDown />
|
|
140
140
|
</Button>
|
|
141
141
|
</PopoverTrigger>
|
|
142
|
-
<PopoverContent className="w-[282px] gap-0 overflow-hidden rounded-
|
|
142
|
+
<PopoverContent className="w-[282px] gap-0 overflow-hidden rounded-xl p-0" align="start">
|
|
143
143
|
<Calendar
|
|
144
144
|
mode="range"
|
|
145
145
|
month={calendarMonth}
|
|
@@ -97,7 +97,7 @@ export function GalleryField({
|
|
|
97
97
|
<button
|
|
98
98
|
type="button"
|
|
99
99
|
onClick={() => setOpen(true)}
|
|
100
|
-
className="flex aspect-square items-center justify-center rounded-
|
|
100
|
+
className="flex aspect-square items-center justify-center rounded-xl border border-dashed transition-colors hover:border-primary/50 hover:bg-muted/50"
|
|
101
101
|
>
|
|
102
102
|
<Plus className="size-6 text-foreground" />
|
|
103
103
|
</button>
|
|
@@ -111,7 +111,7 @@ export function GalleryField({
|
|
|
111
111
|
type="button"
|
|
112
112
|
onClick={() => !disabled && setOpen(true)}
|
|
113
113
|
disabled={disabled}
|
|
114
|
-
className="flex w-full flex-col items-center justify-center gap-2 rounded-
|
|
114
|
+
className="flex w-full flex-col items-center justify-center gap-2 rounded-xl border border-dashed p-8 transition-colors hover:border-primary/50 hover:bg-muted/50 disabled:cursor-not-allowed disabled:opacity-50"
|
|
115
115
|
>
|
|
116
116
|
<ImageIcon className="size-8 text-foreground" />
|
|
117
117
|
<span className="text-sm text-muted-foreground">Click to select media</span>
|
|
@@ -73,7 +73,7 @@ export function MediaGalleryField({
|
|
|
73
73
|
<div className={cn('group relative', className)}>
|
|
74
74
|
<Card className="p-0">
|
|
75
75
|
<CardContent className="p-0! relative">
|
|
76
|
-
<div className="relative aspect-video rounded-
|
|
76
|
+
<div className="relative aspect-video rounded-xl bg-background overflow-hidden">
|
|
77
77
|
<MediaPreview media={selectedMedia} showMetadata={Boolean(media)} />
|
|
78
78
|
</div>
|
|
79
79
|
|
|
@@ -81,7 +81,7 @@ export function MediaGalleryField({
|
|
|
81
81
|
<>
|
|
82
82
|
<div
|
|
83
83
|
aria-hidden="true"
|
|
84
|
-
className="pointer-events-none absolute inset-0 bg-black/10 opacity-0 backdrop-blur-xs transition-opacity duration-300 ease-out group-hover:opacity-100"
|
|
84
|
+
className="pointer-events-none absolute inset-0 bg-black/10 opacity-0 backdrop-blur-xs transition-opacity duration-300 ease-out group-hover:opacity-100 rounded-xl"
|
|
85
85
|
/>
|
|
86
86
|
<div className="absolute inset-0 flex items-center justify-center gap-1 opacity-0 transition-opacity duration-200 ease-out group-hover:opacity-100">
|
|
87
87
|
<Button
|
|
@@ -19,7 +19,7 @@ export function PlaceholderCard({
|
|
|
19
19
|
return (
|
|
20
20
|
<div
|
|
21
21
|
className={cn(
|
|
22
|
-
'flex h-75 border border-border border-dashed bg-background flex-col items-center justify-center gap-5 rounded-
|
|
22
|
+
'flex h-75 border border-border border-dashed bg-background flex-col items-center justify-center gap-5 rounded-xl',
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
>
|
|
@@ -12,7 +12,7 @@ export function Placeholder({ label, description, action, className, ...props }:
|
|
|
12
12
|
return (
|
|
13
13
|
<div
|
|
14
14
|
className={cn(
|
|
15
|
-
'border flex items-center flex-col gap-2 border-dashed border-border rounded-
|
|
15
|
+
'border flex items-center flex-col gap-2 border-dashed border-border rounded-xl p-8 bg-background',
|
|
16
16
|
className
|
|
17
17
|
)}
|
|
18
18
|
{...props}
|
|
@@ -31,7 +31,7 @@ export function SortableGalleryItem({
|
|
|
31
31
|
<div
|
|
32
32
|
ref={setNodeRef}
|
|
33
33
|
style={style}
|
|
34
|
-
className="group relative aspect-square overflow-hidden rounded-
|
|
34
|
+
className="group relative aspect-square overflow-hidden rounded-xl border bg-muted"
|
|
35
35
|
>
|
|
36
36
|
{!disabled && (
|
|
37
37
|
<div
|
|
@@ -57,9 +57,6 @@
|
|
|
57
57
|
"filters": {
|
|
58
58
|
"$ref": "#/$defs/filters"
|
|
59
59
|
},
|
|
60
|
-
"autoSlugify": {
|
|
61
|
-
"$ref": "#/$defs/autoSlugify"
|
|
62
|
-
},
|
|
63
60
|
"navGroup": {
|
|
64
61
|
"type": "object",
|
|
65
62
|
"description": "Sidebar navigation group. Items sharing the same group label appear together.",
|
|
@@ -1401,26 +1398,6 @@
|
|
|
1401
1398
|
}
|
|
1402
1399
|
}
|
|
1403
1400
|
},
|
|
1404
|
-
"autoSlugify": {
|
|
1405
|
-
"type": "object",
|
|
1406
|
-
"description": "Auto-slugification configuration for generating URL-friendly slugs from fields",
|
|
1407
|
-
"additionalProperties": false,
|
|
1408
|
-
"properties": {
|
|
1409
|
-
"enabled": {
|
|
1410
|
-
"type": "boolean",
|
|
1411
|
-
"description": "Enable automatic slug generation",
|
|
1412
|
-
"default": true
|
|
1413
|
-
},
|
|
1414
|
-
"sourceField": {
|
|
1415
|
-
"type": "string",
|
|
1416
|
-
"description": "Field to use as source for slug generation (e.g., 'name', 'title')"
|
|
1417
|
-
},
|
|
1418
|
-
"targetField": {
|
|
1419
|
-
"type": "string",
|
|
1420
|
-
"description": "Field to store the generated slug (typically 'slug')"
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
},
|
|
1424
1401
|
"slotLayout": {
|
|
1425
1402
|
"type": "object",
|
|
1426
1403
|
"description": "Main/sidebar layout groups for an entity edit form or tab panel.",
|
|
@@ -10,7 +10,7 @@ function Accordion({ className, ...props }: React.ComponentProps<typeof Accordio
|
|
|
10
10
|
<AccordionPrimitive.Root
|
|
11
11
|
data-slot="accordion"
|
|
12
12
|
className={cn(
|
|
13
|
-
'flex w-full flex-col rounded-
|
|
13
|
+
'flex w-full flex-col rounded-xl overflow-hidden border border-border bg-card shadow-2xl/1',
|
|
14
14
|
className
|
|
15
15
|
)}
|
|
16
16
|
{...props}
|
|
@@ -3,7 +3,7 @@ import { cva, type VariantProps } from 'class-variance-authority'
|
|
|
3
3
|
import type * as React from 'react'
|
|
4
4
|
|
|
5
5
|
const alertVariants = cva(
|
|
6
|
-
"group/alert relative grid w-full gap-0.5 rounded-
|
|
6
|
+
"group/alert relative grid w-full gap-0.5 rounded-xl border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-foreground *:[svg:not([class*='size-'])]:size-4",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cn } from '@admin/utils/shared/cn'
|
|
2
2
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
3
3
|
import { Slot } from 'radix-ui'
|
|
4
|
-
import
|
|
4
|
+
import * as React from 'react'
|
|
5
5
|
|
|
6
6
|
const buttonVariants = cva(
|
|
7
|
-
"group/button inline-flex shrink-0 items-center justify-center rounded-4xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 active:not-aria-[haspopup]:scale-97 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:text-current [&_svg:not([class*='size-'])]:size-3.5 cursor-pointer [&_svg]:[stroke-width:1.5]",
|
|
7
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-4xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 active:not-aria-[haspopup]:scale-97 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:text-current [&_svg:not([class*='size-'])]:size-3.5 cursor-pointer [&_svg]:[stroke-width:1.5] min-w-0",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -22,11 +22,10 @@ const buttonVariants = cva(
|
|
|
22
22
|
link: 'text-primary underline-offset-4 hover:underline'
|
|
23
23
|
},
|
|
24
24
|
size: {
|
|
25
|
-
default:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
lg: 'h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3',
|
|
25
|
+
default: 'h-9 gap-1.5 px-3',
|
|
26
|
+
xs: "h-6 gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3",
|
|
27
|
+
sm: 'h-8 gap-1 px-3',
|
|
28
|
+
lg: 'h-10 gap-1.5 px-4',
|
|
30
29
|
icon: 'size-9',
|
|
31
30
|
'icon-xs': "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
32
31
|
'icon-sm': 'size-8',
|
|
@@ -40,16 +39,16 @@ const buttonVariants = cva(
|
|
|
40
39
|
}
|
|
41
40
|
)
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
const Button = React.forwardRef<
|
|
43
|
+
HTMLButtonElement,
|
|
44
|
+
React.ComponentProps<'button'> &
|
|
45
|
+
VariantProps<typeof buttonVariants> & {
|
|
46
|
+
asChild?: boolean
|
|
47
|
+
}
|
|
48
|
+
>(function Button(
|
|
49
|
+
{ className, variant = 'default', size = 'default', asChild = false, ...props },
|
|
50
|
+
ref
|
|
51
|
+
) {
|
|
53
52
|
const Comp = asChild ? Slot.Root : 'button'
|
|
54
53
|
|
|
55
54
|
return (
|
|
@@ -58,9 +57,10 @@ function Button({
|
|
|
58
57
|
data-variant={variant}
|
|
59
58
|
data-size={size}
|
|
60
59
|
className={cn(buttonVariants({ variant, size, className }))}
|
|
60
|
+
ref={ref}
|
|
61
61
|
{...props}
|
|
62
62
|
/>
|
|
63
63
|
)
|
|
64
|
-
}
|
|
64
|
+
})
|
|
65
65
|
|
|
66
66
|
export { Button, buttonVariants }
|
|
@@ -11,7 +11,7 @@ function Card({
|
|
|
11
11
|
data-slot="card"
|
|
12
12
|
data-size={size}
|
|
13
13
|
className={cn(
|
|
14
|
-
'group/card flex flex-col rounded-
|
|
14
|
+
'group/card flex flex-col rounded-xl has-[>[data-slot=card-header]]:bg-transparent has-[>[data-slot=card-header]]:border-none has-[>[data-slot=card-footer]]:border-none text-sm text-foreground has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-sm *:[img:last-child]:rounded-b-sm [&_[data-slot=card]:last-of-type:last-child]:rounded-b-sm [&_[data-slot=card]:first-of-type:first-child]:rounded-t-sm',
|
|
15
15
|
className
|
|
16
16
|
)}
|
|
17
17
|
{...props}
|
|
@@ -70,7 +70,7 @@ function CardContent({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
70
70
|
<div
|
|
71
71
|
data-slot="card-content"
|
|
72
72
|
className={cn(
|
|
73
|
-
'group-has-[>[data-slot=card-header]]/card:px-5 rounded-
|
|
73
|
+
'group-has-[>[data-slot=card-header]]/card:px-5 rounded-xl border border-border bg-card group-has-[>[data-slot=card-footer]]/card:bg-card p-8 flex flex-col overflow-hidden shadow-input relative',
|
|
74
74
|
className
|
|
75
75
|
)}
|
|
76
76
|
{...props}
|
|
@@ -83,7 +83,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
83
83
|
<div
|
|
84
84
|
data-slot="card-footer"
|
|
85
85
|
className={cn(
|
|
86
|
-
'flex items-center border border-border bg-muted -mt-2 pt-3.5 pb-2 rounded-b-
|
|
86
|
+
'flex items-center border border-border bg-muted -mt-2 pt-3.5 pb-2 rounded-b-xl px-4',
|
|
87
87
|
className
|
|
88
88
|
)}
|
|
89
89
|
{...props}
|
|
@@ -163,7 +163,7 @@ function ChartTooltipContent({
|
|
|
163
163
|
return (
|
|
164
164
|
<div
|
|
165
165
|
className={cn(
|
|
166
|
-
'grid min-w-32 items-start gap-1.5 rounded-
|
|
166
|
+
'grid min-w-32 items-start gap-1.5 rounded-xl border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl',
|
|
167
167
|
className
|
|
168
168
|
)}
|
|
169
169
|
>
|
|
@@ -48,16 +48,22 @@ function ComboboxInput({
|
|
|
48
48
|
className,
|
|
49
49
|
children,
|
|
50
50
|
disabled = false,
|
|
51
|
+
ref,
|
|
51
52
|
showTrigger = true,
|
|
52
53
|
showClear = false,
|
|
53
54
|
...props
|
|
54
55
|
}: ComboboxPrimitive.Input.Props & {
|
|
56
|
+
ref?: React.Ref<HTMLInputElement>
|
|
55
57
|
showTrigger?: boolean
|
|
56
58
|
showClear?: boolean
|
|
57
59
|
}) {
|
|
58
60
|
return (
|
|
59
61
|
<InputGroup className={cn('w-auto', className)}>
|
|
60
|
-
<ComboboxPrimitive.Input
|
|
62
|
+
<ComboboxPrimitive.Input
|
|
63
|
+
ref={ref}
|
|
64
|
+
render={<InputGroupInput disabled={disabled} />}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
61
67
|
<InputGroupAddon align="inline-end">
|
|
62
68
|
{showTrigger && (
|
|
63
69
|
<InputGroupButton
|
|
@@ -85,11 +91,19 @@ function ComboboxContent({
|
|
|
85
91
|
align = 'start',
|
|
86
92
|
alignOffset = 0,
|
|
87
93
|
anchor,
|
|
94
|
+
collisionPadding,
|
|
95
|
+
positionMethod,
|
|
88
96
|
...props
|
|
89
97
|
}: ComboboxPrimitive.Popup.Props &
|
|
90
98
|
Pick<
|
|
91
99
|
ComboboxPrimitive.Positioner.Props,
|
|
92
|
-
|
|
100
|
+
| 'side'
|
|
101
|
+
| 'align'
|
|
102
|
+
| 'sideOffset'
|
|
103
|
+
| 'alignOffset'
|
|
104
|
+
| 'anchor'
|
|
105
|
+
| 'collisionPadding'
|
|
106
|
+
| 'positionMethod'
|
|
93
107
|
>) {
|
|
94
108
|
return (
|
|
95
109
|
<ComboboxPrimitive.Portal>
|
|
@@ -99,13 +113,15 @@ function ComboboxContent({
|
|
|
99
113
|
align={align}
|
|
100
114
|
alignOffset={alignOffset}
|
|
101
115
|
anchor={anchor}
|
|
116
|
+
collisionPadding={collisionPadding}
|
|
117
|
+
positionMethod={positionMethod}
|
|
102
118
|
className="isolate z-50"
|
|
103
119
|
>
|
|
104
120
|
<ComboboxPrimitive.Popup
|
|
105
121
|
data-slot="combobox-content"
|
|
106
122
|
data-chips={!!anchor}
|
|
107
123
|
className={cn(
|
|
108
|
-
'group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-
|
|
124
|
+
'group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-xl text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-9 *:data-[slot=input-group]:border-none *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!',
|
|
109
125
|
className
|
|
110
126
|
)}
|
|
111
127
|
{...props}
|
|
@@ -128,12 +144,20 @@ function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
|
|
|
128
144
|
)
|
|
129
145
|
}
|
|
130
146
|
|
|
131
|
-
function ComboboxItem({
|
|
147
|
+
function ComboboxItem({
|
|
148
|
+
className,
|
|
149
|
+
children,
|
|
150
|
+
ref,
|
|
151
|
+
...props
|
|
152
|
+
}: ComboboxPrimitive.Item.Props & {
|
|
153
|
+
ref?: React.Ref<HTMLDivElement>
|
|
154
|
+
}) {
|
|
132
155
|
return (
|
|
133
156
|
<ComboboxPrimitive.Item
|
|
157
|
+
ref={ref}
|
|
134
158
|
data-slot="combobox-item"
|
|
135
159
|
className={cn(
|
|
136
|
-
"relative flex w-full cursor-default items-center gap-2.5 rounded-
|
|
160
|
+
"relative flex w-full cursor-default items-center gap-2.5 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
137
161
|
className
|
|
138
162
|
)}
|
|
139
163
|
{...props}
|
|
@@ -143,7 +143,7 @@ function CommandItem({
|
|
|
143
143
|
<CommandPrimitive.Item
|
|
144
144
|
data-slot="command-item"
|
|
145
145
|
className={cn(
|
|
146
|
-
"group/command-item relative flex cursor-default items-center gap-2 rounded-
|
|
146
|
+
"group/command-item relative flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-xl data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-muted data-[selected=true]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&[data-selected=true]_svg]:text-foreground",
|
|
147
147
|
className
|
|
148
148
|
)}
|
|
149
149
|
{...props}
|
|
@@ -51,7 +51,7 @@ function ContextMenuContent({
|
|
|
51
51
|
<ContextMenuPrimitive.Content
|
|
52
52
|
data-slot="context-menu-content"
|
|
53
53
|
className={cn(
|
|
54
|
-
'z-50 max-h-(--radix-context-menu-content-available-height) min-w-48 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-
|
|
54
|
+
'z-50 max-h-(--radix-context-menu-content-available-height) min-w-48 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl p-1 text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!',
|
|
55
55
|
className
|
|
56
56
|
)}
|
|
57
57
|
{...props}
|
|
@@ -75,7 +75,7 @@ function ContextMenuItem({
|
|
|
75
75
|
data-inset={inset}
|
|
76
76
|
data-variant={variant}
|
|
77
77
|
className={cn(
|
|
78
|
-
"group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-
|
|
78
|
+
"group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-foreground data-[variant=destructive]:*:[svg]:text-foreground",
|
|
79
79
|
className
|
|
80
80
|
)}
|
|
81
81
|
{...props}
|
|
@@ -96,7 +96,7 @@ function ContextMenuSubTrigger({
|
|
|
96
96
|
data-slot="context-menu-sub-trigger"
|
|
97
97
|
data-inset={inset}
|
|
98
98
|
className={cn(
|
|
99
|
-
"flex cursor-default items-center rounded-
|
|
99
|
+
"flex cursor-default items-center rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
100
100
|
className
|
|
101
101
|
)}
|
|
102
102
|
{...props}
|
|
@@ -115,7 +115,7 @@ function ContextMenuSubContent({
|
|
|
115
115
|
<ContextMenuPrimitive.SubContent
|
|
116
116
|
data-slot="context-menu-sub-content"
|
|
117
117
|
className={cn(
|
|
118
|
-
'z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-
|
|
118
|
+
'z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-xl border p-1 text-popover-foreground shadow-lg duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!',
|
|
119
119
|
className
|
|
120
120
|
)}
|
|
121
121
|
{...props}
|
|
@@ -137,7 +137,7 @@ function ContextMenuCheckboxItem({
|
|
|
137
137
|
data-slot="context-menu-checkbox-item"
|
|
138
138
|
data-inset={inset}
|
|
139
139
|
className={cn(
|
|
140
|
-
"relative flex cursor-default items-center gap-2 rounded-
|
|
140
|
+
"relative flex cursor-default items-center gap-2 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
141
141
|
className
|
|
142
142
|
)}
|
|
143
143
|
checked={checked}
|
|
@@ -166,7 +166,7 @@ function ContextMenuRadioItem({
|
|
|
166
166
|
data-slot="context-menu-radio-item"
|
|
167
167
|
data-inset={inset}
|
|
168
168
|
className={cn(
|
|
169
|
-
"relative flex cursor-default items-center gap-2 rounded-
|
|
169
|
+
"relative flex cursor-default items-center gap-2 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
170
170
|
className
|
|
171
171
|
)}
|
|
172
172
|
{...props}
|
|
@@ -4,8 +4,11 @@ import { cn } from '@admin/utils/shared/cn'
|
|
|
4
4
|
import type * as React from 'react'
|
|
5
5
|
import { Drawer as DrawerPrimitive } from 'vaul'
|
|
6
6
|
|
|
7
|
-
function Drawer({
|
|
8
|
-
|
|
7
|
+
function Drawer({
|
|
8
|
+
handleOnly = true,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
11
|
+
return <DrawerPrimitive.Root data-slot="drawer" handleOnly={handleOnly} {...props} />
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
|
|
@@ -39,6 +42,7 @@ function DrawerOverlay({
|
|
|
39
42
|
function DrawerContent({
|
|
40
43
|
className,
|
|
41
44
|
children,
|
|
45
|
+
style,
|
|
42
46
|
...props
|
|
43
47
|
}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
|
|
44
48
|
return (
|
|
@@ -50,9 +54,9 @@ function DrawerContent({
|
|
|
50
54
|
'group/drawer-content fixed z-50 flex h-auto flex-col bg-transparent p-4 text-sm text-popover-foreground before:absolute before:inset-2 before:-z-10 before:rounded-4xl before:border before:border-border before:bg-popover data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-md',
|
|
51
55
|
className
|
|
52
56
|
)}
|
|
57
|
+
style={{ touchAction: 'auto', userSelect: 'text', ...style }}
|
|
53
58
|
{...props}
|
|
54
59
|
>
|
|
55
|
-
<div className="mx-auto mt-4 hidden h-1.5 w-25 shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
|
|
56
60
|
{children}
|
|
57
61
|
</DrawerPrimitive.Content>
|
|
58
62
|
</DrawerPortal>
|