betterstart-cli 0.0.105 → 0.0.107
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-nav-link.tsx +10 -8
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar-nav-link-skeleton.tsx +1 -5
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar-user-menu.tsx +54 -48
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sign-out.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-grid-body.tsx +20 -0
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-grid-cell.tsx +20 -0
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-grid-head.tsx +21 -0
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-grid-header.tsx +20 -0
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-grid-row.tsx +22 -0
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-grid.tsx +7 -81
- package/dist/assets/adapters/next/templates/init/components/shared/delete-dialog.tsx +3 -5
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/lifecycle-hooks-tab.tsx +1 -1
- 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 +5 -7
- package/dist/assets/adapters/next/templates/init/components/shared/entity-filters-bar.tsx +9 -10
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-version-item.tsx +2 -4
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-version-restore-dialog.tsx +2 -4
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-versions-current-row.tsx +2 -4
- 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.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-delete-dialog.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-delete-drawer.tsx +52 -53
- package/dist/assets/adapters/next/templates/init/components/shared/sort-order-dialog.tsx +3 -5
- package/dist/assets/adapters/next/templates/init/pages/dashboard-page.tsx +1 -1
- 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/forms/form-notifications-drawer.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhook-actions.tsx +20 -20
- package/dist/assets/adapters/next/templates/init/pages/users/change-password-dialog.tsx +7 -5
- package/dist/assets/adapters/next/templates/init/pages/users/columns.tsx +3 -5
- package/dist/assets/adapters/next/templates/init/pages/users/create-user-dialog.tsx +1 -3
- package/dist/assets/adapters/next/templates/init/pages/users/delete-user-dialog.tsx +11 -5
- 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/math-popover-button.tsx +13 -11
- package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode-dropdown-button.tsx +16 -14
- package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-button.tsx +14 -12
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/blockquote-button/blockquote-button.tsx +4 -11
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/blockquote-button/blockquote-shortcut-badge.tsx +15 -0
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/code-block-button/code-block-button.tsx +4 -11
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/code-block-button/code-block-shortcut-badge.tsx +15 -0
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-button/color-highlight-button.tsx +6 -42
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-button/color-highlight-shortcut-badge.tsx +15 -0
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-button/highlight-swatch.tsx +34 -0
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx +16 -14
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/source-color-highlight-popover.tsx +15 -13
- 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 +31 -29
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-control-popover.tsx +15 -13
- 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 +22 -20
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/mark-button/mark-button.tsx +5 -14
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/mark-button/mark-shortcut-badge.tsx +18 -0
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/undo-redo-button/history-shortcut-badge.tsx +18 -0
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/undo-redo-button/undo-redo-button.tsx +5 -14
- package/dist/assets/shared-assets/react-admin/custom/date-picker.tsx +16 -14
- package/dist/assets/shared-assets/react-admin/custom/date-range-picker.tsx +8 -6
- package/dist/assets/shared-assets/react-admin/custom/icon-picker/memoized-icon.tsx +10 -0
- package/dist/assets/shared-assets/react-admin/custom/icon-picker.tsx +9 -10
- package/dist/assets/shared-assets/react-admin/custom/nested-object-list-field.tsx +2 -4
- package/dist/assets/shared-assets/react-admin/ui/accordion.tsx +11 -28
- package/dist/assets/shared-assets/react-admin/ui/alert-dialog.tsx +30 -47
- package/dist/assets/shared-assets/react-admin/ui/alert.tsx +4 -4
- package/dist/assets/shared-assets/react-admin/ui/aspect-ratio.tsx +18 -5
- package/dist/assets/shared-assets/react-admin/ui/avatar.tsx +10 -13
- package/dist/assets/shared-assets/react-admin/ui/badge.tsx +21 -20
- package/dist/assets/shared-assets/react-admin/ui/breadcrumb.tsx +20 -19
- package/dist/assets/shared-assets/react-admin/ui/button-group.tsx +25 -24
- package/dist/assets/shared-assets/react-admin/ui/button.tsx +22 -31
- package/dist/assets/shared-assets/react-admin/ui/calendar.tsx +9 -6
- package/dist/assets/shared-assets/react-admin/ui/card.tsx +6 -16
- package/dist/assets/shared-assets/react-admin/ui/carousel.tsx +20 -17
- package/dist/assets/shared-assets/react-admin/ui/chart.tsx +19 -16
- package/dist/assets/shared-assets/react-admin/ui/checkbox.tsx +3 -4
- package/dist/assets/shared-assets/react-admin/ui/collapsible.tsx +6 -10
- package/dist/assets/shared-assets/react-admin/ui/combobox.tsx +10 -36
- package/dist/assets/shared-assets/react-admin/ui/command.tsx +7 -6
- package/dist/assets/shared-assets/react-admin/ui/context-menu.tsx +77 -79
- package/dist/assets/shared-assets/react-admin/ui/dialog.tsx +29 -54
- package/dist/assets/shared-assets/react-admin/ui/direction.tsx +1 -18
- package/dist/assets/shared-assets/react-admin/ui/drawer.tsx +121 -49
- package/dist/assets/shared-assets/react-admin/ui/dropdown-menu.tsx +117 -131
- package/dist/assets/shared-assets/react-admin/ui/empty.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/field.tsx +20 -30
- package/dist/assets/shared-assets/react-admin/ui/form.tsx +27 -31
- package/dist/assets/shared-assets/react-admin/ui/hover-card.tsx +26 -18
- package/dist/assets/shared-assets/react-admin/ui/input-group.tsx +25 -12
- package/dist/assets/shared-assets/react-admin/ui/input-otp.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/input.tsx +4 -3
- package/dist/assets/shared-assets/react-admin/ui/item.tsx +26 -19
- package/dist/assets/shared-assets/react-admin/ui/label.tsx +18 -14
- package/dist/assets/shared-assets/react-admin/ui/menubar.tsx +80 -73
- package/dist/assets/shared-assets/react-admin/ui/native-select.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/navigation-menu.tsx +40 -39
- package/dist/assets/shared-assets/react-admin/ui/pagination.tsx +18 -11
- package/dist/assets/shared-assets/react-admin/ui/popover.tsx +31 -30
- package/dist/assets/shared-assets/react-admin/ui/progress.tsx +51 -16
- package/dist/assets/shared-assets/react-admin/ui/radio-group.tsx +11 -17
- package/dist/assets/shared-assets/react-admin/ui/resizable.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/scroll-area.tsx +9 -13
- package/dist/assets/shared-assets/react-admin/ui/select.tsx +66 -60
- package/dist/assets/shared-assets/react-admin/ui/separator.tsx +3 -10
- package/dist/assets/shared-assets/react-admin/ui/sheet.tsx +22 -27
- package/dist/assets/shared-assets/react-admin/ui/sidebar.tsx +144 -126
- package/dist/assets/shared-assets/react-admin/ui/skeleton.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/slider.tsx +27 -29
- package/dist/assets/shared-assets/react-admin/ui/sonner.tsx +8 -3
- package/dist/assets/shared-assets/react-admin/ui/spinner.tsx +4 -3
- package/dist/assets/shared-assets/react-admin/ui/switch.tsx +4 -5
- package/dist/assets/shared-assets/react-admin/ui/table.tsx +8 -21
- package/dist/assets/shared-assets/react-admin/ui/tabs.tsx +11 -16
- package/dist/assets/shared-assets/react-admin/ui/textarea.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/toggle-group.tsx +12 -11
- package/dist/assets/shared-assets/react-admin/ui/toggle.tsx +4 -5
- package/dist/assets/shared-assets/react-admin/ui/tooltip.tsx +29 -27
- package/dist/cli.js +145 -111
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,45 +1,54 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import {
|
|
5
|
+
DropdownMenu,
|
|
6
|
+
DropdownMenuContent,
|
|
7
|
+
DropdownMenuGroup,
|
|
8
|
+
DropdownMenuItem,
|
|
9
|
+
DropdownMenuLabel,
|
|
10
|
+
DropdownMenuPortal,
|
|
11
|
+
DropdownMenuRadioGroup,
|
|
12
|
+
DropdownMenuSeparator,
|
|
13
|
+
DropdownMenuShortcut,
|
|
14
|
+
DropdownMenuSub,
|
|
15
|
+
DropdownMenuSubContent,
|
|
16
|
+
DropdownMenuSubTrigger,
|
|
17
|
+
DropdownMenuTrigger
|
|
18
|
+
} from '@admin/components/ui/dropdown-menu'
|
|
4
19
|
import { cn } from '@admin/utils/shared/cn'
|
|
5
|
-
import {
|
|
6
|
-
import { Menubar as MenubarPrimitive } from '
|
|
20
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu'
|
|
21
|
+
import { Menubar as MenubarPrimitive } from '@base-ui/react/menubar'
|
|
22
|
+
import { CheckIcon } from 'lucide-react'
|
|
7
23
|
|
|
8
|
-
function Menubar({ className, ...props }:
|
|
24
|
+
function Menubar({ className, ...props }: MenubarPrimitive.Props) {
|
|
9
25
|
return (
|
|
10
|
-
<MenubarPrimitive
|
|
26
|
+
<MenubarPrimitive
|
|
11
27
|
data-slot="menubar"
|
|
12
|
-
className={cn('flex h-9 items-center rounded-
|
|
28
|
+
className={cn('flex h-9 items-center rounded-4xl border p-1', className)}
|
|
13
29
|
{...props}
|
|
14
30
|
/>
|
|
15
31
|
)
|
|
16
32
|
}
|
|
17
33
|
|
|
18
|
-
function MenubarMenu({ ...props }: React.ComponentProps<typeof
|
|
19
|
-
return <
|
|
34
|
+
function MenubarMenu({ ...props }: React.ComponentProps<typeof DropdownMenu>) {
|
|
35
|
+
return <DropdownMenu data-slot="menubar-menu" {...props} />
|
|
20
36
|
}
|
|
21
37
|
|
|
22
|
-
function MenubarGroup({ ...props }: React.ComponentProps<typeof
|
|
23
|
-
return <
|
|
38
|
+
function MenubarGroup({ ...props }: React.ComponentProps<typeof DropdownMenuGroup>) {
|
|
39
|
+
return <DropdownMenuGroup data-slot="menubar-group" {...props} />
|
|
24
40
|
}
|
|
25
41
|
|
|
26
|
-
function MenubarPortal({ ...props }: React.ComponentProps<typeof
|
|
27
|
-
return <
|
|
42
|
+
function MenubarPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPortal>) {
|
|
43
|
+
return <DropdownMenuPortal data-slot="menubar-portal" {...props} />
|
|
28
44
|
}
|
|
29
45
|
|
|
30
|
-
function
|
|
31
|
-
return <MenubarPrimitive.RadioGroup data-slot="menubar-radio-group" {...props} />
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function MenubarTrigger({
|
|
35
|
-
className,
|
|
36
|
-
...props
|
|
37
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {
|
|
46
|
+
function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof DropdownMenuTrigger>) {
|
|
38
47
|
return (
|
|
39
|
-
<
|
|
48
|
+
<DropdownMenuTrigger
|
|
40
49
|
data-slot="menubar-trigger"
|
|
41
50
|
className={cn(
|
|
42
|
-
'flex items-center rounded-
|
|
51
|
+
'flex items-center rounded-xl px-2 py-0.75 text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted',
|
|
43
52
|
className
|
|
44
53
|
)}
|
|
45
54
|
{...props}
|
|
@@ -53,21 +62,19 @@ function MenubarContent({
|
|
|
53
62
|
alignOffset = -4,
|
|
54
63
|
sideOffset = 8,
|
|
55
64
|
...props
|
|
56
|
-
}: React.ComponentProps<typeof
|
|
65
|
+
}: React.ComponentProps<typeof DropdownMenuContent>) {
|
|
57
66
|
return (
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/>
|
|
70
|
-
</MenubarPortal>
|
|
67
|
+
<DropdownMenuContent
|
|
68
|
+
data-slot="menubar-content"
|
|
69
|
+
align={align}
|
|
70
|
+
alignOffset={alignOffset}
|
|
71
|
+
sideOffset={sideOffset}
|
|
72
|
+
className={cn(
|
|
73
|
+
'cn-menu-target cn-menu-translucent min-w-48 rounded-2xl bg-popover p-1 text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95',
|
|
74
|
+
className
|
|
75
|
+
)}
|
|
76
|
+
{...props}
|
|
77
|
+
/>
|
|
71
78
|
)
|
|
72
79
|
}
|
|
73
80
|
|
|
@@ -76,17 +83,14 @@ function MenubarItem({
|
|
|
76
83
|
inset,
|
|
77
84
|
variant = 'default',
|
|
78
85
|
...props
|
|
79
|
-
}: React.ComponentProps<typeof
|
|
80
|
-
inset?: boolean
|
|
81
|
-
variant?: 'default' | 'destructive'
|
|
82
|
-
}) {
|
|
86
|
+
}: React.ComponentProps<typeof DropdownMenuItem>) {
|
|
83
87
|
return (
|
|
84
|
-
<
|
|
88
|
+
<DropdownMenuItem
|
|
85
89
|
data-slot="menubar-item"
|
|
86
90
|
data-inset={inset}
|
|
87
91
|
data-variant={variant}
|
|
88
92
|
className={cn(
|
|
89
|
-
"group/menubar-item
|
|
93
|
+
"group/menubar-item gap-2.5 rounded-xl px-3 py-2 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]: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:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
90
94
|
className
|
|
91
95
|
)}
|
|
92
96
|
{...props}
|
|
@@ -100,55 +104,59 @@ function MenubarCheckboxItem({
|
|
|
100
104
|
checked,
|
|
101
105
|
inset,
|
|
102
106
|
...props
|
|
103
|
-
}:
|
|
107
|
+
}: MenuPrimitive.CheckboxItem.Props & {
|
|
104
108
|
inset?: boolean
|
|
105
109
|
}) {
|
|
106
110
|
return (
|
|
107
|
-
<
|
|
111
|
+
<MenuPrimitive.CheckboxItem
|
|
108
112
|
data-slot="menubar-checkbox-item"
|
|
109
113
|
data-inset={inset}
|
|
110
114
|
className={cn(
|
|
111
|
-
'relative flex cursor-default items-center gap-2.5 rounded-
|
|
115
|
+
'relative flex cursor-default items-center gap-2.5 rounded-xl py-2 pr-3 pl-9.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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',
|
|
112
116
|
className
|
|
113
117
|
)}
|
|
114
118
|
checked={checked}
|
|
115
119
|
{...props}
|
|
116
120
|
>
|
|
117
121
|
<span className="pointer-events-none absolute left-3 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
|
|
118
|
-
<
|
|
122
|
+
<MenuPrimitive.CheckboxItemIndicator>
|
|
119
123
|
<CheckIcon />
|
|
120
|
-
</
|
|
124
|
+
</MenuPrimitive.CheckboxItemIndicator>
|
|
121
125
|
</span>
|
|
122
126
|
{children}
|
|
123
|
-
</
|
|
127
|
+
</MenuPrimitive.CheckboxItem>
|
|
124
128
|
)
|
|
125
129
|
}
|
|
126
130
|
|
|
131
|
+
function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuRadioGroup>) {
|
|
132
|
+
return <DropdownMenuRadioGroup data-slot="menubar-radio-group" {...props} />
|
|
133
|
+
}
|
|
134
|
+
|
|
127
135
|
function MenubarRadioItem({
|
|
128
136
|
className,
|
|
129
137
|
children,
|
|
130
138
|
inset,
|
|
131
139
|
...props
|
|
132
|
-
}:
|
|
140
|
+
}: MenuPrimitive.RadioItem.Props & {
|
|
133
141
|
inset?: boolean
|
|
134
142
|
}) {
|
|
135
143
|
return (
|
|
136
|
-
<
|
|
144
|
+
<MenuPrimitive.RadioItem
|
|
137
145
|
data-slot="menubar-radio-item"
|
|
138
146
|
data-inset={inset}
|
|
139
147
|
className={cn(
|
|
140
|
-
"relative flex cursor-default items-center gap-2.5 rounded-
|
|
148
|
+
"relative flex cursor-default items-center gap-2.5 rounded-xl py-2 pr-3 pl-9.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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
149
|
className
|
|
142
150
|
)}
|
|
143
151
|
{...props}
|
|
144
152
|
>
|
|
145
153
|
<span className="pointer-events-none absolute left-3 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
|
|
146
|
-
<
|
|
154
|
+
<MenuPrimitive.RadioItemIndicator>
|
|
147
155
|
<CheckIcon />
|
|
148
|
-
</
|
|
156
|
+
</MenuPrimitive.RadioItemIndicator>
|
|
149
157
|
</span>
|
|
150
158
|
{children}
|
|
151
|
-
</
|
|
159
|
+
</MenuPrimitive.RadioItem>
|
|
152
160
|
)
|
|
153
161
|
}
|
|
154
162
|
|
|
@@ -156,11 +164,11 @@ function MenubarLabel({
|
|
|
156
164
|
className,
|
|
157
165
|
inset,
|
|
158
166
|
...props
|
|
159
|
-
}: React.ComponentProps<typeof
|
|
167
|
+
}: React.ComponentProps<typeof DropdownMenuLabel> & {
|
|
160
168
|
inset?: boolean
|
|
161
169
|
}) {
|
|
162
170
|
return (
|
|
163
|
-
<
|
|
171
|
+
<DropdownMenuLabel
|
|
164
172
|
data-slot="menubar-label"
|
|
165
173
|
data-inset={inset}
|
|
166
174
|
className={cn('px-3.5 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5', className)}
|
|
@@ -172,9 +180,9 @@ function MenubarLabel({
|
|
|
172
180
|
function MenubarSeparator({
|
|
173
181
|
className,
|
|
174
182
|
...props
|
|
175
|
-
}: React.ComponentProps<typeof
|
|
183
|
+
}: React.ComponentProps<typeof DropdownMenuSeparator>) {
|
|
176
184
|
return (
|
|
177
|
-
<
|
|
185
|
+
<DropdownMenuSeparator
|
|
178
186
|
data-slot="menubar-separator"
|
|
179
187
|
className={cn('-mx-1 my-1 h-px bg-border/50', className)}
|
|
180
188
|
{...props}
|
|
@@ -182,9 +190,12 @@ function MenubarSeparator({
|
|
|
182
190
|
)
|
|
183
191
|
}
|
|
184
192
|
|
|
185
|
-
function MenubarShortcut({
|
|
193
|
+
function MenubarShortcut({
|
|
194
|
+
className,
|
|
195
|
+
...props
|
|
196
|
+
}: React.ComponentProps<typeof DropdownMenuShortcut>) {
|
|
186
197
|
return (
|
|
187
|
-
<
|
|
198
|
+
<DropdownMenuShortcut
|
|
188
199
|
data-slot="menubar-shortcut"
|
|
189
200
|
className={cn(
|
|
190
201
|
'ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground',
|
|
@@ -195,43 +206,39 @@ function MenubarShortcut({ className, ...props }: React.ComponentProps<'span'>)
|
|
|
195
206
|
)
|
|
196
207
|
}
|
|
197
208
|
|
|
198
|
-
function MenubarSub({ ...props }: React.ComponentProps<typeof
|
|
199
|
-
return <
|
|
209
|
+
function MenubarSub({ ...props }: React.ComponentProps<typeof DropdownMenuSub>) {
|
|
210
|
+
return <DropdownMenuSub data-slot="menubar-sub" {...props} />
|
|
200
211
|
}
|
|
201
212
|
|
|
202
213
|
function MenubarSubTrigger({
|
|
203
214
|
className,
|
|
204
215
|
inset,
|
|
205
|
-
children,
|
|
206
216
|
...props
|
|
207
|
-
}: React.ComponentProps<typeof
|
|
217
|
+
}: React.ComponentProps<typeof DropdownMenuSubTrigger> & {
|
|
208
218
|
inset?: boolean
|
|
209
219
|
}) {
|
|
210
220
|
return (
|
|
211
|
-
<
|
|
221
|
+
<DropdownMenuSubTrigger
|
|
212
222
|
data-slot="menubar-sub-trigger"
|
|
213
223
|
data-inset={inset}
|
|
214
224
|
className={cn(
|
|
215
|
-
"
|
|
225
|
+
"gap-2 rounded-xl px-3 py-2 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
216
226
|
className
|
|
217
227
|
)}
|
|
218
228
|
{...props}
|
|
219
|
-
|
|
220
|
-
{children}
|
|
221
|
-
<ChevronRightIcon className="ml-auto size-4" />
|
|
222
|
-
</MenubarPrimitive.SubTrigger>
|
|
229
|
+
/>
|
|
223
230
|
)
|
|
224
231
|
}
|
|
225
232
|
|
|
226
233
|
function MenubarSubContent({
|
|
227
234
|
className,
|
|
228
235
|
...props
|
|
229
|
-
}: React.ComponentProps<typeof
|
|
236
|
+
}: React.ComponentProps<typeof DropdownMenuSubContent>) {
|
|
230
237
|
return (
|
|
231
|
-
<
|
|
238
|
+
<DropdownMenuSubContent
|
|
232
239
|
data-slot="menubar-sub-content"
|
|
233
240
|
className={cn(
|
|
234
|
-
'
|
|
241
|
+
'cn-menu-target cn-menu-translucent min-w-32 rounded-2xl bg-popover 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',
|
|
235
242
|
className
|
|
236
243
|
)}
|
|
237
244
|
{...props}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react'
|
|
2
2
|
import { cn } from '@admin/utils/shared/cn'
|
|
3
3
|
import { ChevronDownIcon } from 'lucide-react'
|
|
4
4
|
|
|
@@ -19,11 +19,11 @@ function NativeSelect({ className, size = 'default', ...props }: NativeSelectPro
|
|
|
19
19
|
<select
|
|
20
20
|
data-slot="native-select"
|
|
21
21
|
data-size={size}
|
|
22
|
-
className="h-9 w-full min-w-0 appearance-none rounded-
|
|
22
|
+
className="h-9 w-full min-w-0 appearance-none rounded-4xl border border-input bg-input/30 py-1 pr-8 pl-3 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-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 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 data-[size=sm]:h-8 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"
|
|
23
23
|
{...props}
|
|
24
24
|
/>
|
|
25
25
|
<ChevronDownIcon
|
|
26
|
-
className="pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-foreground select-none"
|
|
26
|
+
className="pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground select-none"
|
|
27
27
|
aria-hidden="true"
|
|
28
28
|
data-slot="native-select-icon"
|
|
29
29
|
/>
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import type * as React from 'react'
|
|
2
1
|
import { cn } from '@admin/utils/shared/cn'
|
|
2
|
+
import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu'
|
|
3
3
|
import { cva } from 'class-variance-authority'
|
|
4
4
|
import { ChevronDownIcon } from 'lucide-react'
|
|
5
|
-
import { NavigationMenu as NavigationMenuPrimitive } from 'radix-ui'
|
|
6
5
|
|
|
7
6
|
function NavigationMenu({
|
|
7
|
+
align = 'start',
|
|
8
8
|
className,
|
|
9
9
|
children,
|
|
10
|
-
viewport = true,
|
|
11
10
|
...props
|
|
12
|
-
}:
|
|
13
|
-
viewport?: boolean
|
|
14
|
-
}) {
|
|
11
|
+
}: NavigationMenuPrimitive.Root.Props & Pick<NavigationMenuPrimitive.Positioner.Props, 'align'>) {
|
|
15
12
|
return (
|
|
16
13
|
<NavigationMenuPrimitive.Root
|
|
17
14
|
data-slot="navigation-menu"
|
|
18
|
-
data-viewport={viewport}
|
|
19
15
|
className={cn(
|
|
20
16
|
'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center',
|
|
21
17
|
className
|
|
@@ -23,7 +19,7 @@ function NavigationMenu({
|
|
|
23
19
|
{...props}
|
|
24
20
|
>
|
|
25
21
|
{children}
|
|
26
|
-
{
|
|
22
|
+
<NavigationMenuPositioner align={align} />
|
|
27
23
|
</NavigationMenuPrimitive.Root>
|
|
28
24
|
)
|
|
29
25
|
}
|
|
@@ -31,7 +27,7 @@ function NavigationMenu({
|
|
|
31
27
|
function NavigationMenuList({
|
|
32
28
|
className,
|
|
33
29
|
...props
|
|
34
|
-
}: React.
|
|
30
|
+
}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.List>) {
|
|
35
31
|
return (
|
|
36
32
|
<NavigationMenuPrimitive.List
|
|
37
33
|
data-slot="navigation-menu-list"
|
|
@@ -44,7 +40,7 @@ function NavigationMenuList({
|
|
|
44
40
|
function NavigationMenuItem({
|
|
45
41
|
className,
|
|
46
42
|
...props
|
|
47
|
-
}: React.
|
|
43
|
+
}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Item>) {
|
|
48
44
|
return (
|
|
49
45
|
<NavigationMenuPrimitive.Item
|
|
50
46
|
data-slot="navigation-menu-item"
|
|
@@ -55,14 +51,14 @@ function NavigationMenuItem({
|
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
const navigationMenuTriggerStyle = cva(
|
|
58
|
-
'group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-
|
|
54
|
+
'group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-2xl px-4.5 py-2.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted'
|
|
59
55
|
)
|
|
60
56
|
|
|
61
57
|
function NavigationMenuTrigger({
|
|
62
58
|
className,
|
|
63
59
|
children,
|
|
64
60
|
...props
|
|
65
|
-
}:
|
|
61
|
+
}: NavigationMenuPrimitive.Trigger.Props) {
|
|
66
62
|
return (
|
|
67
63
|
<NavigationMenuPrimitive.Trigger
|
|
68
64
|
data-slot="navigation-menu-trigger"
|
|
@@ -78,15 +74,12 @@ function NavigationMenuTrigger({
|
|
|
78
74
|
)
|
|
79
75
|
}
|
|
80
76
|
|
|
81
|
-
function NavigationMenuContent({
|
|
82
|
-
className,
|
|
83
|
-
...props
|
|
84
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
|
|
77
|
+
function NavigationMenuContent({ className, ...props }: NavigationMenuPrimitive.Content.Props) {
|
|
85
78
|
return (
|
|
86
79
|
<NavigationMenuPrimitive.Content
|
|
87
80
|
data-slot="navigation-menu-content"
|
|
88
81
|
className={cn(
|
|
89
|
-
'
|
|
82
|
+
'data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] isolate z-50 h-full w-auto p-2.5 pr-3 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-2xl group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-2xl group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/5 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95',
|
|
90
83
|
className
|
|
91
84
|
)}
|
|
92
85
|
{...props}
|
|
@@ -94,33 +87,41 @@ function NavigationMenuContent({
|
|
|
94
87
|
)
|
|
95
88
|
}
|
|
96
89
|
|
|
97
|
-
function
|
|
90
|
+
function NavigationMenuPositioner({
|
|
98
91
|
className,
|
|
92
|
+
side = 'bottom',
|
|
93
|
+
sideOffset = 8,
|
|
94
|
+
align = 'start',
|
|
95
|
+
alignOffset = 0,
|
|
99
96
|
...props
|
|
100
|
-
}:
|
|
97
|
+
}: NavigationMenuPrimitive.Positioner.Props) {
|
|
101
98
|
return (
|
|
102
|
-
<
|
|
103
|
-
<NavigationMenuPrimitive.
|
|
104
|
-
|
|
99
|
+
<NavigationMenuPrimitive.Portal>
|
|
100
|
+
<NavigationMenuPrimitive.Positioner
|
|
101
|
+
side={side}
|
|
102
|
+
sideOffset={sideOffset}
|
|
103
|
+
align={align}
|
|
104
|
+
alignOffset={alignOffset}
|
|
105
105
|
className={cn(
|
|
106
|
-
'
|
|
106
|
+
'isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0',
|
|
107
107
|
className
|
|
108
108
|
)}
|
|
109
109
|
{...props}
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
>
|
|
111
|
+
<NavigationMenuPrimitive.Popup className="data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-2xl bg-popover text-popover-foreground shadow ring-1 ring-foreground/5 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0">
|
|
112
|
+
<NavigationMenuPrimitive.Viewport className="relative size-full overflow-hidden" />
|
|
113
|
+
</NavigationMenuPrimitive.Popup>
|
|
114
|
+
</NavigationMenuPrimitive.Positioner>
|
|
115
|
+
</NavigationMenuPrimitive.Portal>
|
|
112
116
|
)
|
|
113
117
|
}
|
|
114
118
|
|
|
115
|
-
function NavigationMenuLink({
|
|
116
|
-
className,
|
|
117
|
-
...props
|
|
118
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
|
|
119
|
+
function NavigationMenuLink({ className, ...props }: NavigationMenuPrimitive.Link.Props) {
|
|
119
120
|
return (
|
|
120
121
|
<NavigationMenuPrimitive.Link
|
|
121
122
|
data-slot="navigation-menu-link"
|
|
122
123
|
className={cn(
|
|
123
|
-
"flex items-center gap-1.5 rounded-
|
|
124
|
+
"flex items-center gap-1.5 rounded-2xl p-3 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-xl data-[active=true]:bg-muted/50 data-[active=true]:hover:bg-muted data-[active=true]:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
124
125
|
className
|
|
125
126
|
)}
|
|
126
127
|
{...props}
|
|
@@ -131,9 +132,9 @@ function NavigationMenuLink({
|
|
|
131
132
|
function NavigationMenuIndicator({
|
|
132
133
|
className,
|
|
133
134
|
...props
|
|
134
|
-
}: React.
|
|
135
|
+
}: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Icon>) {
|
|
135
136
|
return (
|
|
136
|
-
<NavigationMenuPrimitive.
|
|
137
|
+
<NavigationMenuPrimitive.Icon
|
|
137
138
|
data-slot="navigation-menu-indicator"
|
|
138
139
|
className={cn(
|
|
139
140
|
'top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in',
|
|
@@ -142,18 +143,18 @@ function NavigationMenuIndicator({
|
|
|
142
143
|
{...props}
|
|
143
144
|
>
|
|
144
145
|
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
|
|
145
|
-
</NavigationMenuPrimitive.
|
|
146
|
+
</NavigationMenuPrimitive.Icon>
|
|
146
147
|
)
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
export {
|
|
150
151
|
NavigationMenu,
|
|
151
|
-
NavigationMenuList,
|
|
152
|
-
NavigationMenuItem,
|
|
153
152
|
NavigationMenuContent,
|
|
154
|
-
NavigationMenuTrigger,
|
|
155
|
-
NavigationMenuLink,
|
|
156
153
|
NavigationMenuIndicator,
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
NavigationMenuItem,
|
|
155
|
+
NavigationMenuLink,
|
|
156
|
+
NavigationMenuList,
|
|
157
|
+
NavigationMenuTrigger,
|
|
158
|
+
navigationMenuTriggerStyle,
|
|
159
|
+
NavigationMenuPositioner
|
|
159
160
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react'
|
|
2
2
|
import { Button } from '@admin/components/ui/button'
|
|
3
3
|
import { cn } from '@admin/utils/shared/cn'
|
|
4
4
|
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react'
|
|
@@ -6,6 +6,7 @@ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-re
|
|
|
6
6
|
function Pagination({ className, ...props }: React.ComponentProps<'nav'>) {
|
|
7
7
|
return (
|
|
8
8
|
<nav
|
|
9
|
+
role="navigation"
|
|
9
10
|
aria-label="pagination"
|
|
10
11
|
data-slot="pagination"
|
|
11
12
|
className={cn('mx-auto flex w-full justify-center', className)}
|
|
@@ -35,14 +36,20 @@ type PaginationLinkProps = {
|
|
|
35
36
|
|
|
36
37
|
function PaginationLink({ className, isActive, size = 'icon', ...props }: PaginationLinkProps) {
|
|
37
38
|
return (
|
|
38
|
-
<Button
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
<Button
|
|
40
|
+
variant={isActive ? 'outline' : 'ghost'}
|
|
41
|
+
size={size}
|
|
42
|
+
className={cn(className)}
|
|
43
|
+
nativeButton={false}
|
|
44
|
+
render={
|
|
45
|
+
<a
|
|
46
|
+
aria-current={isActive ? 'page' : undefined}
|
|
47
|
+
data-slot="pagination-link"
|
|
48
|
+
data-active={isActive}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
}
|
|
52
|
+
/>
|
|
46
53
|
)
|
|
47
54
|
}
|
|
48
55
|
|
|
@@ -58,7 +65,7 @@ function PaginationPrevious({
|
|
|
58
65
|
className={cn('pl-2!', className)}
|
|
59
66
|
{...props}
|
|
60
67
|
>
|
|
61
|
-
<ChevronLeftIcon />
|
|
68
|
+
<ChevronLeftIcon data-icon="inline-start" className="cn-rtl-flip" />
|
|
62
69
|
<span className="hidden sm:block">{text}</span>
|
|
63
70
|
</PaginationLink>
|
|
64
71
|
)
|
|
@@ -77,7 +84,7 @@ function PaginationNext({
|
|
|
77
84
|
{...props}
|
|
78
85
|
>
|
|
79
86
|
<span className="hidden sm:block">{text}</span>
|
|
80
|
-
<ChevronRightIcon data-icon="inline-end" />
|
|
87
|
+
<ChevronRightIcon data-icon="inline-end" className="cn-rtl-flip" />
|
|
81
88
|
</PaginationLink>
|
|
82
89
|
)
|
|
83
90
|
}
|