flarecms 0.1.0 → 0.1.2
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/LICENSE +21 -0
- package/dist/auth/index.js +201 -1
- package/dist/cli/commands.js +5554 -55
- package/dist/cli/index.js +5554 -55
- package/dist/cli/mcp.js +30 -0
- package/dist/client/index.js +23576 -0
- package/dist/db/index.js +10392 -25
- package/dist/index.js +56776 -7582
- package/dist/server/index.js +43280 -0
- package/dist/style.css +5536 -0
- package/package.json +33 -30
- package/scripts/fix-api-paths.mjs +0 -32
- package/scripts/fix-imports.mjs +0 -38
- package/scripts/prefix-css.mjs +0 -45
- package/src/api/lib/cache.ts +0 -45
- package/src/api/lib/response.ts +0 -40
- package/src/api/middlewares/auth.ts +0 -186
- package/src/api/middlewares/cors.ts +0 -10
- package/src/api/middlewares/rbac.ts +0 -85
- package/src/api/routes/auth.ts +0 -377
- package/src/api/routes/collections.ts +0 -205
- package/src/api/routes/content.ts +0 -175
- package/src/api/routes/device.ts +0 -160
- package/src/api/routes/magic.ts +0 -150
- package/src/api/routes/mcp.ts +0 -273
- package/src/api/routes/oauth.ts +0 -160
- package/src/api/routes/settings.ts +0 -43
- package/src/api/routes/setup.ts +0 -307
- package/src/api/routes/tokens.ts +0 -80
- package/src/api/schemas/auth.ts +0 -15
- package/src/api/schemas/index.ts +0 -51
- package/src/api/schemas/tokens.ts +0 -24
- package/src/auth/index.ts +0 -28
- package/src/cli/commands.ts +0 -217
- package/src/cli/index.ts +0 -21
- package/src/cli/mcp.ts +0 -210
- package/src/cli/tests/cli.test.ts +0 -40
- package/src/cli/tests/create.test.ts +0 -87
- package/src/client/FlareAdminRouter.tsx +0 -47
- package/src/client/app.tsx +0 -175
- package/src/client/components/app-sidebar.tsx +0 -227
- package/src/client/components/collection-modal.tsx +0 -215
- package/src/client/components/content-list.tsx +0 -247
- package/src/client/components/dynamic-form.tsx +0 -190
- package/src/client/components/field-modal.tsx +0 -221
- package/src/client/components/settings/api-token-section.tsx +0 -400
- package/src/client/components/settings/general-section.tsx +0 -224
- package/src/client/components/settings/security-section.tsx +0 -154
- package/src/client/components/settings/seo-section.tsx +0 -200
- package/src/client/components/settings/signup-section.tsx +0 -257
- package/src/client/components/ui/accordion.tsx +0 -78
- package/src/client/components/ui/avatar.tsx +0 -107
- package/src/client/components/ui/badge.tsx +0 -52
- package/src/client/components/ui/button.tsx +0 -60
- package/src/client/components/ui/card.tsx +0 -103
- package/src/client/components/ui/checkbox.tsx +0 -27
- package/src/client/components/ui/collapsible.tsx +0 -19
- package/src/client/components/ui/dialog.tsx +0 -162
- package/src/client/components/ui/icon-picker.tsx +0 -485
- package/src/client/components/ui/icons-data.ts +0 -8476
- package/src/client/components/ui/input.tsx +0 -20
- package/src/client/components/ui/label.tsx +0 -20
- package/src/client/components/ui/popover.tsx +0 -91
- package/src/client/components/ui/select.tsx +0 -204
- package/src/client/components/ui/separator.tsx +0 -23
- package/src/client/components/ui/sheet.tsx +0 -141
- package/src/client/components/ui/sidebar.tsx +0 -722
- package/src/client/components/ui/skeleton.tsx +0 -13
- package/src/client/components/ui/sonner.tsx +0 -47
- package/src/client/components/ui/switch.tsx +0 -30
- package/src/client/components/ui/table.tsx +0 -116
- package/src/client/components/ui/tabs.tsx +0 -80
- package/src/client/components/ui/textarea.tsx +0 -18
- package/src/client/components/ui/tooltip.tsx +0 -68
- package/src/client/hooks/use-mobile.ts +0 -19
- package/src/client/index.css +0 -149
- package/src/client/index.ts +0 -7
- package/src/client/layouts/admin-layout.tsx +0 -93
- package/src/client/layouts/settings-layout.tsx +0 -104
- package/src/client/lib/api.ts +0 -72
- package/src/client/lib/utils.ts +0 -6
- package/src/client/main.tsx +0 -10
- package/src/client/pages/collection-detail.tsx +0 -634
- package/src/client/pages/collections.tsx +0 -180
- package/src/client/pages/dashboard.tsx +0 -133
- package/src/client/pages/device.tsx +0 -66
- package/src/client/pages/document-detail-page.tsx +0 -139
- package/src/client/pages/documents-page.tsx +0 -103
- package/src/client/pages/login.tsx +0 -345
- package/src/client/pages/settings.tsx +0 -65
- package/src/client/pages/setup.tsx +0 -129
- package/src/client/pages/signup.tsx +0 -188
- package/src/client/store/auth.ts +0 -30
- package/src/client/store/collections.ts +0 -13
- package/src/client/store/config.ts +0 -12
- package/src/client/store/fetcher.ts +0 -30
- package/src/client/store/router.ts +0 -95
- package/src/client/store/schema.ts +0 -39
- package/src/client/store/settings.ts +0 -31
- package/src/client/types.ts +0 -34
- package/src/db/dynamic.ts +0 -70
- package/src/db/index.ts +0 -16
- package/src/db/migrations/001_initial_schema.ts +0 -57
- package/src/db/migrations/002_auth_tables.ts +0 -84
- package/src/db/migrator.ts +0 -61
- package/src/db/schema.ts +0 -142
- package/src/index.ts +0 -12
- package/src/server/index.ts +0 -66
- package/src/types.ts +0 -20
- package/tests/css.test.ts +0 -21
- package/tests/modular.test.ts +0 -29
- package/tsconfig.json +0 -10
- /package/{style.css.d.ts → dist/style.css.d.ts} +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Input as InputPrimitive } from "@base-ui/react/input"
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils"
|
|
5
|
-
|
|
6
|
-
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
7
|
-
return (
|
|
8
|
-
<InputPrimitive
|
|
9
|
-
type={type}
|
|
10
|
-
data-slot="input"
|
|
11
|
-
className={cn(
|
|
12
|
-
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 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-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { Input }
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils"
|
|
6
|
-
|
|
7
|
-
function Label({ className, ...props }: React.ComponentProps<"label">) {
|
|
8
|
-
return (
|
|
9
|
-
<label
|
|
10
|
-
data-slot="label"
|
|
11
|
-
className={cn(
|
|
12
|
-
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { Label }
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Popover as PopoverPrimitive } from 'radix-ui';
|
|
5
|
-
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
|
|
8
|
-
function Popover({
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
11
|
-
return <PopoverPrimitive.Root data-slot="popover" {...props} />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function PopoverTrigger({
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
17
|
-
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function PopoverContent({
|
|
21
|
-
className,
|
|
22
|
-
align = 'center',
|
|
23
|
-
sideOffset = 4,
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
26
|
-
return (
|
|
27
|
-
<PopoverPrimitive.Portal>
|
|
28
|
-
<div className="flare-admin text-foreground">
|
|
29
|
-
<PopoverPrimitive.Content
|
|
30
|
-
data-slot="popover-content"
|
|
31
|
-
align={align}
|
|
32
|
-
sideOffset={sideOffset}
|
|
33
|
-
className={cn(
|
|
34
|
-
'z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden 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',
|
|
35
|
-
className,
|
|
36
|
-
)}
|
|
37
|
-
{...props}
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
40
|
-
</PopoverPrimitive.Portal>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function PopoverAnchor({
|
|
45
|
-
...props
|
|
46
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
47
|
-
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
51
|
-
return (
|
|
52
|
-
<div
|
|
53
|
-
data-slot="popover-header"
|
|
54
|
-
className={cn('flex flex-col gap-0.5 text-sm', className)}
|
|
55
|
-
{...props}
|
|
56
|
-
/>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function PopoverTitle({ className, ...props }: React.ComponentProps<'h2'>) {
|
|
61
|
-
return (
|
|
62
|
-
<div
|
|
63
|
-
data-slot="popover-title"
|
|
64
|
-
className={cn('cn-font-heading font-medium', className)}
|
|
65
|
-
{...props}
|
|
66
|
-
/>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function PopoverDescription({
|
|
71
|
-
className,
|
|
72
|
-
...props
|
|
73
|
-
}: React.ComponentProps<'p'>) {
|
|
74
|
-
return (
|
|
75
|
-
<p
|
|
76
|
-
data-slot="popover-description"
|
|
77
|
-
className={cn('text-muted-foreground', className)}
|
|
78
|
-
{...props}
|
|
79
|
-
/>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export {
|
|
84
|
-
Popover,
|
|
85
|
-
PopoverAnchor,
|
|
86
|
-
PopoverContent,
|
|
87
|
-
PopoverDescription,
|
|
88
|
-
PopoverHeader,
|
|
89
|
-
PopoverTitle,
|
|
90
|
-
PopoverTrigger,
|
|
91
|
-
};
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Select as SelectPrimitive } from '@base-ui/react/select';
|
|
5
|
-
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react';
|
|
8
|
-
|
|
9
|
-
const Select = SelectPrimitive.Root;
|
|
10
|
-
|
|
11
|
-
function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
|
|
12
|
-
return (
|
|
13
|
-
<SelectPrimitive.Group
|
|
14
|
-
data-slot="select-group"
|
|
15
|
-
className={cn('scroll-my-1 p-1', className)}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
|
|
22
|
-
return (
|
|
23
|
-
<SelectPrimitive.Value
|
|
24
|
-
data-slot="select-value"
|
|
25
|
-
className={cn('flex flex-1 text-left', className)}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function SelectTrigger({
|
|
32
|
-
className,
|
|
33
|
-
size = 'default',
|
|
34
|
-
children,
|
|
35
|
-
...props
|
|
36
|
-
}: SelectPrimitive.Trigger.Props & {
|
|
37
|
-
size?: 'sm' | 'default';
|
|
38
|
-
}) {
|
|
39
|
-
return (
|
|
40
|
-
<SelectPrimitive.Trigger
|
|
41
|
-
data-slot="select-trigger"
|
|
42
|
-
data-size={size}
|
|
43
|
-
className={cn(
|
|
44
|
-
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
45
|
-
className,
|
|
46
|
-
)}
|
|
47
|
-
{...props}
|
|
48
|
-
>
|
|
49
|
-
{children}
|
|
50
|
-
<SelectPrimitive.Icon
|
|
51
|
-
render={
|
|
52
|
-
<ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
|
|
53
|
-
}
|
|
54
|
-
/>
|
|
55
|
-
</SelectPrimitive.Trigger>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function SelectContent({
|
|
60
|
-
className,
|
|
61
|
-
children,
|
|
62
|
-
side = 'bottom',
|
|
63
|
-
sideOffset = 4,
|
|
64
|
-
align = 'center',
|
|
65
|
-
alignOffset = 0,
|
|
66
|
-
alignItemWithTrigger = true,
|
|
67
|
-
...props
|
|
68
|
-
}: SelectPrimitive.Popup.Props &
|
|
69
|
-
Pick<
|
|
70
|
-
SelectPrimitive.Positioner.Props,
|
|
71
|
-
'align' | 'alignOffset' | 'side' | 'sideOffset' | 'alignItemWithTrigger'
|
|
72
|
-
>) {
|
|
73
|
-
return (
|
|
74
|
-
<SelectPrimitive.Portal>
|
|
75
|
-
<div className="flare-admin text-foreground">
|
|
76
|
-
<SelectPrimitive.Positioner
|
|
77
|
-
side={side}
|
|
78
|
-
sideOffset={sideOffset}
|
|
79
|
-
align={align}
|
|
80
|
-
alignOffset={alignOffset}
|
|
81
|
-
alignItemWithTrigger={alignItemWithTrigger}
|
|
82
|
-
className="isolate z-50"
|
|
83
|
-
>
|
|
84
|
-
<SelectPrimitive.Popup
|
|
85
|
-
data-slot="select-content"
|
|
86
|
-
data-align-trigger={alignItemWithTrigger}
|
|
87
|
-
className={cn(
|
|
88
|
-
'relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
|
|
89
|
-
className,
|
|
90
|
-
)}
|
|
91
|
-
{...props}
|
|
92
|
-
>
|
|
93
|
-
<SelectScrollUpButton />
|
|
94
|
-
<SelectPrimitive.List>{children}</SelectPrimitive.List>
|
|
95
|
-
<SelectScrollDownButton />
|
|
96
|
-
</SelectPrimitive.Popup>
|
|
97
|
-
</SelectPrimitive.Positioner>
|
|
98
|
-
</div>
|
|
99
|
-
</SelectPrimitive.Portal>
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function SelectLabel({
|
|
104
|
-
className,
|
|
105
|
-
...props
|
|
106
|
-
}: SelectPrimitive.GroupLabel.Props) {
|
|
107
|
-
return (
|
|
108
|
-
<SelectPrimitive.GroupLabel
|
|
109
|
-
data-slot="select-label"
|
|
110
|
-
className={cn('px-1.5 py-1 text-xs text-muted-foreground', className)}
|
|
111
|
-
{...props}
|
|
112
|
-
/>
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function SelectItem({
|
|
117
|
-
className,
|
|
118
|
-
children,
|
|
119
|
-
...props
|
|
120
|
-
}: SelectPrimitive.Item.Props) {
|
|
121
|
-
return (
|
|
122
|
-
<SelectPrimitive.Item
|
|
123
|
-
data-slot="select-item"
|
|
124
|
-
className={cn(
|
|
125
|
-
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**: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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
126
|
-
className,
|
|
127
|
-
)}
|
|
128
|
-
{...props}
|
|
129
|
-
>
|
|
130
|
-
<SelectPrimitive.ItemText className="flex flex-1 shrink-0 gap-2 whitespace-nowrap">
|
|
131
|
-
{children}
|
|
132
|
-
</SelectPrimitive.ItemText>
|
|
133
|
-
<SelectPrimitive.ItemIndicator
|
|
134
|
-
render={
|
|
135
|
-
<span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
|
|
136
|
-
}
|
|
137
|
-
>
|
|
138
|
-
<CheckIcon className="pointer-events-none" />
|
|
139
|
-
</SelectPrimitive.ItemIndicator>
|
|
140
|
-
</SelectPrimitive.Item>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function SelectSeparator({
|
|
145
|
-
className,
|
|
146
|
-
...props
|
|
147
|
-
}: SelectPrimitive.Separator.Props) {
|
|
148
|
-
return (
|
|
149
|
-
<SelectPrimitive.Separator
|
|
150
|
-
data-slot="select-separator"
|
|
151
|
-
className={cn('pointer-events-none -mx-1 my-1 h-px bg-border', className)}
|
|
152
|
-
{...props}
|
|
153
|
-
/>
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function SelectScrollUpButton({
|
|
158
|
-
className,
|
|
159
|
-
...props
|
|
160
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
|
|
161
|
-
return (
|
|
162
|
-
<SelectPrimitive.ScrollUpArrow
|
|
163
|
-
data-slot="select-scroll-up-button"
|
|
164
|
-
className={cn(
|
|
165
|
-
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
166
|
-
className,
|
|
167
|
-
)}
|
|
168
|
-
{...props}
|
|
169
|
-
>
|
|
170
|
-
<ChevronUpIcon />
|
|
171
|
-
</SelectPrimitive.ScrollUpArrow>
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function SelectScrollDownButton({
|
|
176
|
-
className,
|
|
177
|
-
...props
|
|
178
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
|
|
179
|
-
return (
|
|
180
|
-
<SelectPrimitive.ScrollDownArrow
|
|
181
|
-
data-slot="select-scroll-down-button"
|
|
182
|
-
className={cn(
|
|
183
|
-
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
184
|
-
className,
|
|
185
|
-
)}
|
|
186
|
-
{...props}
|
|
187
|
-
>
|
|
188
|
-
<ChevronDownIcon />
|
|
189
|
-
</SelectPrimitive.ScrollDownArrow>
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export {
|
|
194
|
-
Select,
|
|
195
|
-
SelectContent,
|
|
196
|
-
SelectGroup,
|
|
197
|
-
SelectItem,
|
|
198
|
-
SelectLabel,
|
|
199
|
-
SelectScrollDownButton,
|
|
200
|
-
SelectScrollUpButton,
|
|
201
|
-
SelectSeparator,
|
|
202
|
-
SelectTrigger,
|
|
203
|
-
SelectValue,
|
|
204
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../lib/utils"
|
|
4
|
-
|
|
5
|
-
function Separator({
|
|
6
|
-
className,
|
|
7
|
-
orientation = "horizontal",
|
|
8
|
-
...props
|
|
9
|
-
}: SeparatorPrimitive.Props) {
|
|
10
|
-
return (
|
|
11
|
-
<SeparatorPrimitive
|
|
12
|
-
data-slot="separator"
|
|
13
|
-
orientation={orientation}
|
|
14
|
-
className={cn(
|
|
15
|
-
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { Separator }
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Dialog as SheetPrimitive } from '@base-ui/react/dialog';
|
|
5
|
-
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
import { Button } from './button';
|
|
8
|
-
import { XIcon } from 'lucide-react';
|
|
9
|
-
|
|
10
|
-
function Sheet({ ...props }: SheetPrimitive.Root.Props) {
|
|
11
|
-
return <SheetPrimitive.Root data-slot="sheet" {...props} />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {
|
|
15
|
-
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function SheetClose({ ...props }: SheetPrimitive.Close.Props) {
|
|
19
|
-
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function SheetPortal({ children, ...props }: SheetPrimitive.Portal.Props) {
|
|
23
|
-
return (
|
|
24
|
-
<SheetPrimitive.Portal data-slot="sheet-portal" {...props}>
|
|
25
|
-
<div className="flare-admin text-foreground">{children}</div>
|
|
26
|
-
</SheetPrimitive.Portal>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {
|
|
31
|
-
return (
|
|
32
|
-
<SheetPrimitive.Backdrop
|
|
33
|
-
data-slot="sheet-overlay"
|
|
34
|
-
className={cn(
|
|
35
|
-
'fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs',
|
|
36
|
-
className,
|
|
37
|
-
)}
|
|
38
|
-
{...props}
|
|
39
|
-
/>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function SheetContent({
|
|
44
|
-
className,
|
|
45
|
-
children,
|
|
46
|
-
side = 'right',
|
|
47
|
-
showCloseButton = true,
|
|
48
|
-
...props
|
|
49
|
-
}: SheetPrimitive.Popup.Props & {
|
|
50
|
-
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
51
|
-
showCloseButton?: boolean;
|
|
52
|
-
}) {
|
|
53
|
-
return (
|
|
54
|
-
<SheetPortal>
|
|
55
|
-
<SheetOverlay />
|
|
56
|
-
<SheetPrimitive.Popup
|
|
57
|
-
data-slot="sheet-content"
|
|
58
|
-
data-side={side}
|
|
59
|
-
className={cn(
|
|
60
|
-
'fixed z-50 flex flex-col gap-4 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] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm',
|
|
61
|
-
className,
|
|
62
|
-
)}
|
|
63
|
-
{...props}
|
|
64
|
-
>
|
|
65
|
-
{children}
|
|
66
|
-
{showCloseButton && (
|
|
67
|
-
<SheetPrimitive.Close
|
|
68
|
-
data-slot="sheet-close"
|
|
69
|
-
render={
|
|
70
|
-
<Button
|
|
71
|
-
variant="ghost"
|
|
72
|
-
className="absolute top-3 right-3"
|
|
73
|
-
size="icon-sm"
|
|
74
|
-
/>
|
|
75
|
-
}
|
|
76
|
-
>
|
|
77
|
-
<XIcon />
|
|
78
|
-
<span className="sr-only">Close</span>
|
|
79
|
-
</SheetPrimitive.Close>
|
|
80
|
-
)}
|
|
81
|
-
</SheetPrimitive.Popup>
|
|
82
|
-
</SheetPortal>
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
87
|
-
return (
|
|
88
|
-
<div
|
|
89
|
-
data-slot="sheet-header"
|
|
90
|
-
className={cn('flex flex-col gap-0.5 p-4', className)}
|
|
91
|
-
{...props}
|
|
92
|
-
/>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
97
|
-
return (
|
|
98
|
-
<div
|
|
99
|
-
data-slot="sheet-footer"
|
|
100
|
-
className={cn('mt-auto flex flex-col gap-2 p-4', className)}
|
|
101
|
-
{...props}
|
|
102
|
-
/>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
|
|
107
|
-
return (
|
|
108
|
-
<SheetPrimitive.Title
|
|
109
|
-
data-slot="sheet-title"
|
|
110
|
-
className={cn(
|
|
111
|
-
'font-heading text-base font-medium text-foreground',
|
|
112
|
-
className,
|
|
113
|
-
)}
|
|
114
|
-
{...props}
|
|
115
|
-
/>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function SheetDescription({
|
|
120
|
-
className,
|
|
121
|
-
...props
|
|
122
|
-
}: SheetPrimitive.Description.Props) {
|
|
123
|
-
return (
|
|
124
|
-
<SheetPrimitive.Description
|
|
125
|
-
data-slot="sheet-description"
|
|
126
|
-
className={cn('text-sm text-muted-foreground', className)}
|
|
127
|
-
{...props}
|
|
128
|
-
/>
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export {
|
|
133
|
-
Sheet,
|
|
134
|
-
SheetTrigger,
|
|
135
|
-
SheetClose,
|
|
136
|
-
SheetContent,
|
|
137
|
-
SheetHeader,
|
|
138
|
-
SheetFooter,
|
|
139
|
-
SheetTitle,
|
|
140
|
-
SheetDescription,
|
|
141
|
-
};
|