betterstart-cli 0.0.109 → 0.0.111
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/templates/init/components/layouts/{admin-sidebar-branding-rsc.tsx → admin-sidebar-branding.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/layouts/role-gate.tsx +14 -0
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode-integrate.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/entity-filters-bar.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/media-filters-bar.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-gallery-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-preview.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-color-highlight.ts +1 -3
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-media-insertion.ts +1 -3
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor.ts +2 -6
- package/dist/assets/adapters/next/templates/init/pages/account-layout.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/{account-shell-rsc.tsx → account-shell.tsx} +2 -2
- package/dist/assets/adapters/next/templates/init/pages/{auth-gate-rsc.tsx → auth-gate.tsx} +2 -2
- package/dist/assets/adapters/next/templates/init/pages/authenticated-layout.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/forgot-password-form.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/pages/forgot-password-page-skeleton.tsx +3 -3
- package/dist/assets/adapters/next/templates/init/pages/forgot-password-page.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/login-form.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/pages/{login-page-rsc.tsx → login-page-content.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/pages/login-page-skeleton.tsx +3 -3
- package/dist/assets/adapters/next/templates/init/pages/login-page.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/pages/media/media-page-content.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page-content.tsx +31 -0
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page-skeleton.tsx +9 -0
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page.tsx +7 -27
- package/dist/assets/adapters/next/templates/init/pages/reset-password-form.tsx +8 -8
- package/dist/assets/adapters/next/templates/init/pages/reset-password-page-skeleton.tsx +3 -3
- package/dist/assets/adapters/next/templates/init/pages/reset-password-page.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-detail-drawer.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/form-notifications-drawer.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/delete-webhook-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhook-endpoint-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/users/change-password-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/create-user-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/edit-role-dialog.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/index.tsx +5 -30
- package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx +6 -28
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/removable-image-node/removable-image-node.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/gallery-field.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/alert-dialog.tsx +6 -6
- package/dist/assets/shared-assets/react-admin/ui/alert.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/breadcrumb.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/calendar.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/card.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/dialog.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/drawer.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/field.tsx +2 -4
- package/dist/assets/shared-assets/react-admin/ui/input.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/pagination.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/sheet.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/sidebar.tsx +13 -63
- package/dist/assets/shared-assets/react-admin/ui/textarea.tsx +1 -1
- package/dist/cli.js +115 -90
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-mobile-toolbar.ts +0 -17
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-is-breakpoint.ts +0 -24
- package/dist/assets/adapters/next/templates/init/hooks/use-mobile.ts +0 -19
- package/dist/assets/shared-assets/react-admin/custom/content-editor/mobile-toolbar-content.tsx +0 -56
package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/delete-webhook-dialog.tsx
CHANGED
|
@@ -53,7 +53,7 @@ export function DeleteWebhookDialog({ webhook, open, onOpenChange }: DeleteWebho
|
|
|
53
53
|
|
|
54
54
|
return (
|
|
55
55
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
56
|
-
<DialogContent className="
|
|
56
|
+
<DialogContent className="max-w-105">
|
|
57
57
|
<DialogHeader>
|
|
58
58
|
<DialogTitle>Delete webhook?</DialogTitle>
|
|
59
59
|
<DialogDescription>
|
package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhook-endpoint-dialog.tsx
CHANGED
|
@@ -194,7 +194,7 @@ export function WebhookEndpointDialog({ webhook, open, onOpenChange }: WebhookEn
|
|
|
194
194
|
|
|
195
195
|
return (
|
|
196
196
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
197
|
-
<DialogContent className="
|
|
197
|
+
<DialogContent className="max-w-135">
|
|
198
198
|
<Form {...form}>
|
|
199
199
|
<form
|
|
200
200
|
autoComplete="off"
|
package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page.tsx
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { RoleGate } from '@admin/components/layouts/role-gate'
|
|
3
|
+
import { UserRole } from '@admin/types/auth'
|
|
3
4
|
import { WebhooksLogsPageContent } from '../webhooks-logs-page-content'
|
|
4
5
|
import { WebhooksPageSkeleton } from '../webhooks-page-skeleton'
|
|
5
6
|
|
|
6
|
-
export default
|
|
7
|
-
await requireRole([UserRole.ADMIN])
|
|
8
|
-
|
|
7
|
+
export default function WebhooksLogsPage() {
|
|
9
8
|
return (
|
|
10
9
|
<React.Suspense fallback={<WebhooksPageSkeleton />}>
|
|
11
|
-
<
|
|
10
|
+
<RoleGate roles={[UserRole.ADMIN]}>
|
|
11
|
+
<WebhooksLogsPageContent />
|
|
12
|
+
</RoleGate>
|
|
12
13
|
</React.Suspense>
|
|
13
14
|
)
|
|
14
15
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { RoleGate } from '@admin/components/layouts/role-gate'
|
|
3
|
+
import { UserRole } from '@admin/types/auth'
|
|
3
4
|
import { WebhooksPageContent } from './webhooks-page-content'
|
|
4
5
|
import { WebhooksPageSkeleton } from './webhooks-page-skeleton'
|
|
5
6
|
|
|
6
|
-
export default
|
|
7
|
-
await requireRole([UserRole.ADMIN])
|
|
8
|
-
|
|
7
|
+
export default function WebhooksPage() {
|
|
9
8
|
return (
|
|
10
9
|
<React.Suspense fallback={<WebhooksPageSkeleton />}>
|
|
11
|
-
<
|
|
10
|
+
<RoleGate roles={[UserRole.ADMIN]}>
|
|
11
|
+
<WebhooksPageContent />
|
|
12
|
+
</RoleGate>
|
|
12
13
|
</React.Suspense>
|
|
13
14
|
)
|
|
14
15
|
}
|
|
@@ -142,7 +142,7 @@ export function ChangePasswordDialog({
|
|
|
142
142
|
<KeySquare className="size-4" />
|
|
143
143
|
Change password
|
|
144
144
|
</DialogTrigger>
|
|
145
|
-
<DialogContent className="
|
|
145
|
+
<DialogContent className="max-w-135">
|
|
146
146
|
<Form {...form}>
|
|
147
147
|
<form
|
|
148
148
|
autoComplete="off"
|
|
@@ -109,7 +109,7 @@ export function CreateUserDialog() {
|
|
|
109
109
|
return (
|
|
110
110
|
<Dialog open={open} onOpenChange={handleOpenChange}>
|
|
111
111
|
<DialogTrigger render={<Button />}>Create User</DialogTrigger>
|
|
112
|
-
<DialogContent className="
|
|
112
|
+
<DialogContent className="max-w-135">
|
|
113
113
|
<Form {...form}>
|
|
114
114
|
<form
|
|
115
115
|
autoComplete="off"
|
|
@@ -80,7 +80,7 @@ export function EditRoleDialog({ userId, currentRole, userName, children }: Edit
|
|
|
80
80
|
return (
|
|
81
81
|
<Dialog open={open} onOpenChange={handleOpenChange}>
|
|
82
82
|
<DialogTrigger render={children as React.ReactElement} />
|
|
83
|
-
<DialogContent className="
|
|
83
|
+
<DialogContent className="max-w-87.5">
|
|
84
84
|
<Form {...form}>
|
|
85
85
|
<form autoComplete="off" onSubmit={form.handleSubmit(handleSave)}>
|
|
86
86
|
<DialogHeader>
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
import type { ContentEditorMode } from '@admin/utils/editor/content-editor-mode'
|
|
4
4
|
import { Card, CardContent } from '@admin/components/ui/card'
|
|
5
5
|
import { useContentEditor } from '@admin/hooks/content-editor/use-content-editor'
|
|
6
|
-
import { useContentEditorMobileToolbar } from '@admin/hooks/content-editor/use-content-editor-mobile-toolbar'
|
|
7
6
|
import { useContentEditorTableAddControls } from '@admin/hooks/content-editor/use-content-editor-table-add-controls'
|
|
8
7
|
import { cn } from '@admin/utils/shared/cn'
|
|
9
8
|
import { EditorContent, EditorContext } from '@tiptap/react'
|
|
10
9
|
import { EditorToolbar } from './editor-toolbar'
|
|
11
10
|
import { MainToolbarContent } from './main-toolbar-content'
|
|
12
11
|
import { MathBubbleMenu } from './math-popover'
|
|
13
|
-
import { MobileToolbarContent } from './mobile-toolbar-content'
|
|
14
12
|
import { ModeToggleButton } from './mode-toggle-button'
|
|
15
13
|
import { SelectionBubbleMenu } from './selection-bubble-menu'
|
|
16
14
|
import { SlashCommandMenu } from './slash-command-menu'
|
|
@@ -35,8 +33,6 @@ export function ContentEditor({
|
|
|
35
33
|
className,
|
|
36
34
|
defaultMode
|
|
37
35
|
}: ContentEditorProps) {
|
|
38
|
-
const { isMobile, mobileView, setMobileView } = useContentEditorMobileToolbar()
|
|
39
|
-
|
|
40
36
|
const {
|
|
41
37
|
activeSlashIndex,
|
|
42
38
|
closeSlashMenu,
|
|
@@ -58,8 +54,7 @@ export function ContentEditor({
|
|
|
58
54
|
onChange,
|
|
59
55
|
placeholder,
|
|
60
56
|
disabled,
|
|
61
|
-
defaultMode
|
|
62
|
-
onModeToggle: () => setMobileView('main')
|
|
57
|
+
defaultMode
|
|
63
58
|
})
|
|
64
59
|
|
|
65
60
|
const isSourceMode = mode === 'source'
|
|
@@ -93,33 +88,13 @@ export function ContentEditor({
|
|
|
93
88
|
) : (
|
|
94
89
|
<>
|
|
95
90
|
<EditorToolbar ariaLabel="Content editor toolbar" className="shrink-0">
|
|
96
|
-
{
|
|
97
|
-
<MainToolbarContent
|
|
98
|
-
onHighlighterClick={() => setMobileView('highlighter')}
|
|
99
|
-
onLinkClick={() => setMobileView('link')}
|
|
100
|
-
onMathClick={() => setMobileView('math')}
|
|
101
|
-
onModeChange={handleModeChange}
|
|
102
|
-
isMobile={isMobile}
|
|
103
|
-
editor={editor}
|
|
104
|
-
/>
|
|
105
|
-
) : (
|
|
106
|
-
<MobileToolbarContent
|
|
107
|
-
type={
|
|
108
|
-
mobileView === 'highlighter'
|
|
109
|
-
? 'highlighter'
|
|
110
|
-
: mobileView === 'math'
|
|
111
|
-
? 'math'
|
|
112
|
-
: 'link'
|
|
113
|
-
}
|
|
114
|
-
onBack={() => setMobileView('main')}
|
|
115
|
-
/>
|
|
116
|
-
)}
|
|
91
|
+
<MainToolbarContent onModeChange={handleModeChange} editor={editor} />
|
|
117
92
|
</EditorToolbar>
|
|
118
93
|
|
|
119
94
|
<div className="relative flex min-h-0 flex-1 flex-col overflow-hidden">
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
95
|
+
<SelectionBubbleMenu editor={editor} />
|
|
96
|
+
<MathBubbleMenu editor={editor} />
|
|
97
|
+
<TableBubbleMenu editor={editor} />
|
|
123
98
|
<TableAddControls controls={tableAddControls} />
|
|
124
99
|
|
|
125
100
|
<SlashCommandMenu
|
package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx
CHANGED
|
@@ -3,15 +3,9 @@
|
|
|
3
3
|
import type { Editor } from '@tiptap/core'
|
|
4
4
|
import { BlockquoteButton } from '@admin/components/custom/content-editor/tiptap-ui/blockquote-button'
|
|
5
5
|
import { CodeBlockButton } from '@admin/components/custom/content-editor/tiptap-ui/code-block-button'
|
|
6
|
-
import {
|
|
7
|
-
ColorHighlightPopover,
|
|
8
|
-
ColorHighlightPopoverButton
|
|
9
|
-
} from '@admin/components/custom/content-editor/tiptap-ui/color-highlight-popover'
|
|
6
|
+
import { ColorHighlightPopover } from '@admin/components/custom/content-editor/tiptap-ui/color-highlight-popover'
|
|
10
7
|
import { HeadingDropdownMenu } from '@admin/components/custom/content-editor/tiptap-ui/heading-dropdown-menu'
|
|
11
|
-
import {
|
|
12
|
-
LinkButton,
|
|
13
|
-
LinkPopover
|
|
14
|
-
} from '@admin/components/custom/content-editor/tiptap-ui/link-popover'
|
|
8
|
+
import { LinkPopover } from '@admin/components/custom/content-editor/tiptap-ui/link-popover'
|
|
15
9
|
import { ListDropdownMenu } from '@admin/components/custom/content-editor/tiptap-ui/list-dropdown-menu'
|
|
16
10
|
import { MarkButton } from '@admin/components/custom/content-editor/tiptap-ui/mark-button'
|
|
17
11
|
import { UndoRedoButton } from '@admin/components/custom/content-editor/tiptap-ui/undo-redo-button'
|
|
@@ -20,23 +14,15 @@ import { Separator } from '@admin/components/ui/separator'
|
|
|
20
14
|
import { useContentEditorMediaInsertion } from '@admin/hooks/content-editor/use-content-editor-media-insertion'
|
|
21
15
|
import { ImagePlusIcon } from 'lucide-react'
|
|
22
16
|
import { HorizontalRuleButton } from './horizontal-rule-button'
|
|
23
|
-
import {
|
|
17
|
+
import { MathPopoverButton } from './math-popover'
|
|
24
18
|
import { ModeToggleButton } from './mode-toggle-button'
|
|
25
19
|
import { TableButton } from './table-button'
|
|
26
20
|
|
|
27
21
|
export function MainToolbarContent({
|
|
28
|
-
onHighlighterClick,
|
|
29
|
-
onLinkClick,
|
|
30
|
-
onMathClick,
|
|
31
22
|
onModeChange,
|
|
32
|
-
isMobile,
|
|
33
23
|
editor
|
|
34
24
|
}: {
|
|
35
|
-
onHighlighterClick: () => void
|
|
36
|
-
onLinkClick: () => void
|
|
37
|
-
onMathClick: () => void
|
|
38
25
|
onModeChange: () => void
|
|
39
|
-
isMobile: boolean
|
|
40
26
|
editor: Editor | null
|
|
41
27
|
}) {
|
|
42
28
|
const mediaInsertion = useContentEditorMediaInsertion({ editor })
|
|
@@ -67,12 +53,8 @@ export function MainToolbarContent({
|
|
|
67
53
|
<MarkButton type="strike" />
|
|
68
54
|
<MarkButton type="code" />
|
|
69
55
|
<MarkButton type="underline" />
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
) : (
|
|
73
|
-
<ColorHighlightPopoverButton onClick={onHighlighterClick} />
|
|
74
|
-
)}
|
|
75
|
-
{!isMobile ? <LinkPopover /> : <LinkButton onClick={onLinkClick} />}
|
|
56
|
+
<ColorHighlightPopover />
|
|
57
|
+
<LinkPopover />
|
|
76
58
|
</div>
|
|
77
59
|
|
|
78
60
|
<Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
|
|
@@ -80,11 +62,7 @@ export function MainToolbarContent({
|
|
|
80
62
|
<div className="flex items-center">
|
|
81
63
|
<TableButton editor={editor} />
|
|
82
64
|
|
|
83
|
-
{
|
|
84
|
-
<MathPopoverButton editor={editor} />
|
|
85
|
-
) : (
|
|
86
|
-
<MathButton text="Math" aria-label="Insert math" title="Math" onClick={onMathClick} />
|
|
87
|
-
)}
|
|
65
|
+
<MathPopoverButton editor={editor} />
|
|
88
66
|
|
|
89
67
|
{mediaInsertion.isVisible ? (
|
|
90
68
|
<Button
|
|
@@ -118,7 +118,7 @@ export const RemovableImageNode: React.FC<NodeViewProps> = (props) => {
|
|
|
118
118
|
alt={alt}
|
|
119
119
|
title={title || undefined}
|
|
120
120
|
fill
|
|
121
|
-
sizes="
|
|
121
|
+
sizes="768px"
|
|
122
122
|
unoptimized
|
|
123
123
|
className="!m-0 !h-full !w-full !max-w-full object-contain"
|
|
124
124
|
onLoad={handleImageLoad}
|
|
@@ -189,7 +189,7 @@ export function GalleryField({
|
|
|
189
189
|
>
|
|
190
190
|
<CarouselContent className="-ml-3">
|
|
191
191
|
{canAdd && !disabled ? (
|
|
192
|
-
<CarouselItem className="basis-[
|
|
192
|
+
<CarouselItem className="basis-[184px] pl-3">
|
|
193
193
|
<Card className="h-full" onClick={() => setOpen(true)}>
|
|
194
194
|
<CardContent className="flex cursor-pointer flex-col p-2">
|
|
195
195
|
<div className="flex aspect-square size-full flex-col items-center justify-center gap-1 overflow-hidden rounded-sm border border-border bg-background text-muted-foreground transition-colors hover:text-foreground">
|
|
@@ -208,7 +208,7 @@ export function GalleryField({
|
|
|
208
208
|
{value.map((id) => {
|
|
209
209
|
const item = mediaMap.get(id)
|
|
210
210
|
return (
|
|
211
|
-
<CarouselItem key={id} className="basis-[
|
|
211
|
+
<CarouselItem key={id} className="basis-[184px] pl-3">
|
|
212
212
|
<SortableGalleryItem id={id} disabled={disabled}>
|
|
213
213
|
{item ? (
|
|
214
214
|
<MediaField
|
|
@@ -243,7 +243,7 @@ export function GalleryField({
|
|
|
243
243
|
</div>
|
|
244
244
|
<DragOverlay>
|
|
245
245
|
{activeId ? (
|
|
246
|
-
<div className="w-[
|
|
246
|
+
<div className="w-[184px] scale-[0.98] cursor-grabbing opacity-95">
|
|
247
247
|
{activeItem ? (
|
|
248
248
|
<MediaField
|
|
249
249
|
value={activeId}
|
|
@@ -44,7 +44,7 @@ function AlertDialogContent({
|
|
|
44
44
|
data-slot="alert-dialog-content"
|
|
45
45
|
data-size={size}
|
|
46
46
|
className={cn(
|
|
47
|
-
'group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/5 duration-100 outline-none data-[size=default]:max-w-
|
|
47
|
+
'group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/5 duration-100 outline-none data-[size=default]:max-w-md data-[size=sm]:max-w-xs 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',
|
|
48
48
|
className
|
|
49
49
|
)}
|
|
50
50
|
{...props}
|
|
@@ -58,7 +58,7 @@ function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>)
|
|
|
58
58
|
<div
|
|
59
59
|
data-slot="alert-dialog-header"
|
|
60
60
|
className={cn(
|
|
61
|
-
'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center
|
|
61
|
+
'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center group-data-[size=default]/alert-dialog-content:place-items-start group-data-[size=default]/alert-dialog-content:text-left has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',
|
|
62
62
|
className
|
|
63
63
|
)}
|
|
64
64
|
{...props}
|
|
@@ -81,7 +81,7 @@ function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>)
|
|
|
81
81
|
<div
|
|
82
82
|
data-slot="alert-dialog-footer"
|
|
83
83
|
className={cn(
|
|
84
|
-
'flex flex-
|
|
84
|
+
'flex flex-row justify-end gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2',
|
|
85
85
|
className
|
|
86
86
|
)}
|
|
87
87
|
{...props}
|
|
@@ -94,7 +94,7 @@ function AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>)
|
|
|
94
94
|
<div
|
|
95
95
|
data-slot="alert-dialog-media"
|
|
96
96
|
className={cn(
|
|
97
|
-
"mb-2 inline-flex size-16 items-center justify-center rounded-full bg-muted
|
|
97
|
+
"mb-2 inline-flex size-16 items-center justify-center rounded-full bg-muted group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",
|
|
98
98
|
className
|
|
99
99
|
)}
|
|
100
100
|
{...props}
|
|
@@ -110,7 +110,7 @@ function AlertDialogTitle({
|
|
|
110
110
|
<AlertDialogPrimitive.Title
|
|
111
111
|
data-slot="alert-dialog-title"
|
|
112
112
|
className={cn(
|
|
113
|
-
'cn-font-heading text-lg font-medium
|
|
113
|
+
'cn-font-heading text-lg font-medium group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',
|
|
114
114
|
className
|
|
115
115
|
)}
|
|
116
116
|
{...props}
|
|
@@ -126,7 +126,7 @@ function AlertDialogDescription({
|
|
|
126
126
|
<AlertDialogPrimitive.Description
|
|
127
127
|
data-slot="alert-dialog-description"
|
|
128
128
|
className={cn(
|
|
129
|
-
'text-sm text-
|
|
129
|
+
'text-sm text-pretty text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',
|
|
130
130
|
className
|
|
131
131
|
)}
|
|
132
132
|
{...props}
|
|
@@ -52,7 +52,7 @@ function AlertDescription({ className, ...props }: React.ComponentProps<'div'>)
|
|
|
52
52
|
<div
|
|
53
53
|
data-slot="alert-description"
|
|
54
54
|
className={cn(
|
|
55
|
-
'text-sm text-
|
|
55
|
+
'text-sm text-pretty text-muted-foreground [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4',
|
|
56
56
|
className
|
|
57
57
|
)}
|
|
58
58
|
{...props}
|
|
@@ -13,7 +13,7 @@ function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>) {
|
|
|
13
13
|
<ol
|
|
14
14
|
data-slot="breadcrumb-list"
|
|
15
15
|
className={cn(
|
|
16
|
-
'flex flex-wrap items-center gap-
|
|
16
|
+
'flex flex-wrap items-center gap-2.5 text-sm wrap-break-word text-muted-foreground',
|
|
17
17
|
className
|
|
18
18
|
)}
|
|
19
19
|
{...props}
|
|
@@ -39,7 +39,7 @@ function Calendar({
|
|
|
39
39
|
}}
|
|
40
40
|
classNames={{
|
|
41
41
|
root: cn('w-fit', defaultClassNames.root),
|
|
42
|
-
months: cn('relative flex flex-
|
|
42
|
+
months: cn('relative flex flex-row gap-4', defaultClassNames.months),
|
|
43
43
|
month: cn('flex w-full flex-col gap-4', defaultClassNames.month),
|
|
44
44
|
nav: cn(
|
|
45
45
|
'absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1',
|
|
@@ -24,7 +24,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
24
24
|
<div
|
|
25
25
|
data-slot="card-header"
|
|
26
26
|
className={cn(
|
|
27
|
-
'group/card-header
|
|
27
|
+
'group/card-header grid auto-rows-min items-start gap-2 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)',
|
|
28
28
|
className
|
|
29
29
|
)}
|
|
30
30
|
{...props}
|
|
@@ -49,7 +49,7 @@ function DialogContent({
|
|
|
49
49
|
<DialogPrimitive.Popup
|
|
50
50
|
data-slot="dialog-content"
|
|
51
51
|
className={cn(
|
|
52
|
-
'fixed top-1/2 left-1/2 z-50 grid w-full max-w-
|
|
52
|
+
'fixed top-1/2 left-1/2 z-50 grid w-full max-w-md -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/5 duration-100 outline-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',
|
|
53
53
|
className
|
|
54
54
|
)}
|
|
55
55
|
{...props}
|
|
@@ -90,7 +90,7 @@ function DialogFooter({
|
|
|
90
90
|
return (
|
|
91
91
|
<div
|
|
92
92
|
data-slot="dialog-footer"
|
|
93
|
-
className={cn('flex flex-
|
|
93
|
+
className={cn('flex flex-row justify-end gap-2', className)}
|
|
94
94
|
{...props}
|
|
95
95
|
>
|
|
96
96
|
{children}
|
|
@@ -117,7 +117,7 @@ function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.
|
|
|
117
117
|
// Bleed.
|
|
118
118
|
'after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full',
|
|
119
119
|
// Sizing.
|
|
120
|
-
'[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:
|
|
120
|
+
'[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:24rem] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh]',
|
|
121
121
|
// Stack.
|
|
122
122
|
'[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]',
|
|
123
123
|
// Transitions.
|
|
@@ -158,7 +158,7 @@ function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
158
158
|
<div
|
|
159
159
|
data-slot="drawer-header"
|
|
160
160
|
className={cn(
|
|
161
|
-
'flex shrink-0 flex-col gap-
|
|
161
|
+
'flex shrink-0 flex-col gap-1.5 p-4 pb-0 text-left group-data-[swipe-axis=y]/drawer-popup:text-center',
|
|
162
162
|
className
|
|
163
163
|
)}
|
|
164
164
|
{...props}
|
|
@@ -43,7 +43,7 @@ function FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
43
43
|
<div
|
|
44
44
|
data-slot="field-group"
|
|
45
45
|
className={cn(
|
|
46
|
-
'group/field-group
|
|
46
|
+
'group/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',
|
|
47
47
|
className
|
|
48
48
|
)}
|
|
49
49
|
{...props}
|
|
@@ -56,9 +56,7 @@ const fieldVariants = cva('group/field flex w-full gap-3 data-[invalid=true]:tex
|
|
|
56
56
|
orientation: {
|
|
57
57
|
vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',
|
|
58
58
|
horizontal:
|
|
59
|
-
'flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px'
|
|
60
|
-
responsive:
|
|
61
|
-
'flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px'
|
|
59
|
+
'flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px'
|
|
62
60
|
}
|
|
63
61
|
},
|
|
64
62
|
defaultVariants: {
|
|
@@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
|
|
|
8
8
|
type={type}
|
|
9
9
|
data-slot="input"
|
|
10
10
|
className={cn(
|
|
11
|
-
'h-9 w-full min-w-0 rounded-4xl border border-input bg-input/30 px-3 py-1 text-
|
|
11
|
+
'h-9 w-full min-w-0 rounded-4xl border border-input bg-input/30 px-3 py-1 text-sm transition-colors outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20',
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{...props}
|
|
@@ -66,7 +66,7 @@ function PaginationPrevious({
|
|
|
66
66
|
{...props}
|
|
67
67
|
>
|
|
68
68
|
<ChevronLeftIcon data-icon="inline-start" className="cn-rtl-flip" />
|
|
69
|
-
<span className="
|
|
69
|
+
<span className="block">{text}</span>
|
|
70
70
|
</PaginationLink>
|
|
71
71
|
)
|
|
72
72
|
}
|
|
@@ -83,7 +83,7 @@ function PaginationNext({
|
|
|
83
83
|
className={cn('pr-2!', className)}
|
|
84
84
|
{...props}
|
|
85
85
|
>
|
|
86
|
-
<span className="
|
|
86
|
+
<span className="block">{text}</span>
|
|
87
87
|
<ChevronRightIcon data-icon="inline-end" className="cn-rtl-flip" />
|
|
88
88
|
</PaginationLink>
|
|
89
89
|
)
|
|
@@ -52,7 +52,7 @@ function SheetContent({
|
|
|
52
52
|
data-slot="sheet-content"
|
|
53
53
|
data-side={side}
|
|
54
54
|
className={cn(
|
|
55
|
-
'fixed z-50 flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem]
|
|
55
|
+
'fixed z-50 flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:max-w-sm data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:max-w-sm data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem]',
|
|
56
56
|
className
|
|
57
57
|
)}
|
|
58
58
|
{...props}
|