@questpie/admin 0.0.1 → 1.0.0
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/README.md +439 -424
- package/dist/auth-layout-M8K8_q5R.mjs +181 -0
- package/dist/auth-layout-M8K8_q5R.mjs.map +1 -0
- package/dist/bulk-upload-dialog-h7zXD78Y.mjs +274 -0
- package/dist/bulk-upload-dialog-h7zXD78Y.mjs.map +1 -0
- package/dist/{components/ui/card.mjs → card-BKHjBQfw.mjs} +8 -8
- package/dist/card-BKHjBQfw.mjs.map +1 -0
- package/dist/client/styles/index.css +434 -0
- package/dist/client-BCGpkAz6.mjs +22635 -0
- package/dist/client-BCGpkAz6.mjs.map +1 -0
- package/dist/client-CcWZbkBP.d.mts +13585 -0
- package/dist/client-CcWZbkBP.d.mts.map +1 -0
- package/dist/client.d.mts +3 -0
- package/dist/client.mjs +14 -0
- package/dist/content-locales-provider-BXvuIgfg.mjs +1650 -0
- package/dist/content-locales-provider-BXvuIgfg.mjs.map +1 -0
- package/dist/dashboard-page-B4PGEdc2.mjs +2500 -0
- package/dist/dashboard-page-B4PGEdc2.mjs.map +1 -0
- package/dist/dashboard-page-CVlyR40m.mjs +6 -0
- package/dist/dropzone-Do3awXKd.mjs +634 -0
- package/dist/dropzone-Do3awXKd.mjs.map +1 -0
- package/dist/{views/auth/forgot-password-form.mjs → forgot-password-page-Bcp-An4Y.mjs} +87 -14
- package/dist/forgot-password-page-Bcp-An4Y.mjs.map +1 -0
- package/dist/forgot-password-page-CIILVhfo.mjs +7 -0
- package/dist/index-B9Xwk4hi.d.mts +2753 -0
- package/dist/index-B9Xwk4hi.d.mts.map +1 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +14 -0
- package/dist/login-page-8K7fo0qK.mjs +7 -0
- package/dist/login-page-CP4gA-dl.mjs +298 -0
- package/dist/login-page-CP4gA-dl.mjs.map +1 -0
- package/dist/preview-utils-BKQ9-TMa.mjs +65 -0
- package/dist/preview-utils-BKQ9-TMa.mjs.map +1 -0
- package/dist/{views/auth/reset-password-form.mjs → reset-password-page-BqfDmLxA.mjs} +111 -14
- package/dist/reset-password-page-BqfDmLxA.mjs.map +1 -0
- package/dist/reset-password-page-DLATv0xQ.mjs +7 -0
- package/dist/runtime-6VZM878K.mjs +69 -0
- package/dist/runtime-6VZM878K.mjs.map +1 -0
- package/dist/saved-views.types-BMsz5mCy.d.mts +42 -0
- package/dist/saved-views.types-BMsz5mCy.d.mts.map +1 -0
- package/dist/server.d.mts +250 -0
- package/dist/server.d.mts.map +1 -0
- package/dist/server.mjs +832 -0
- package/dist/server.mjs.map +1 -0
- package/dist/setup-page-CMZ5P_OE.mjs +6 -0
- package/dist/setup-page-YAP_fzqh.mjs +264 -0
- package/dist/setup-page-YAP_fzqh.mjs.map +1 -0
- package/dist/shared.d.mts +57 -0
- package/dist/shared.d.mts.map +1 -0
- package/dist/shared.mjs +3 -0
- package/dist/{hooks/use-auth.mjs → use-auth-BoLmWtmU.mjs} +42 -30
- package/dist/use-auth-BoLmWtmU.mjs.map +1 -0
- package/package.json +48 -197
- package/.turbo/turbo-build.log +0 -108
- package/CHANGELOG.md +0 -10
- package/STATUS.md +0 -917
- package/VALIDATION.md +0 -602
- package/components.json +0 -24
- package/dist/__tests__/setup.mjs +0 -38
- package/dist/__tests__/test-utils.mjs +0 -45
- package/dist/__tests__/vitest.d.mjs +0 -3
- package/dist/components/admin-app.mjs +0 -69
- package/dist/components/fields/array-field.mjs +0 -190
- package/dist/components/fields/checkbox-field.mjs +0 -34
- package/dist/components/fields/custom-field.mjs +0 -32
- package/dist/components/fields/date-field.mjs +0 -41
- package/dist/components/fields/datetime-field.mjs +0 -42
- package/dist/components/fields/email-field.mjs +0 -37
- package/dist/components/fields/embedded-collection.mjs +0 -253
- package/dist/components/fields/field-types.mjs +0 -1
- package/dist/components/fields/field-utils.mjs +0 -10
- package/dist/components/fields/field-wrapper.mjs +0 -34
- package/dist/components/fields/index.mjs +0 -23
- package/dist/components/fields/json-field.mjs +0 -243
- package/dist/components/fields/locale-badge.mjs +0 -16
- package/dist/components/fields/number-field.mjs +0 -39
- package/dist/components/fields/password-field.mjs +0 -37
- package/dist/components/fields/relation-field.mjs +0 -104
- package/dist/components/fields/relation-picker.mjs +0 -229
- package/dist/components/fields/relation-select.mjs +0 -188
- package/dist/components/fields/rich-text-editor/index.mjs +0 -897
- package/dist/components/fields/select-field.mjs +0 -41
- package/dist/components/fields/switch-field.mjs +0 -34
- package/dist/components/fields/text-field.mjs +0 -38
- package/dist/components/fields/textarea-field.mjs +0 -38
- package/dist/components/index.mjs +0 -59
- package/dist/components/primitives/checkbox-input.mjs +0 -127
- package/dist/components/primitives/date-input.mjs +0 -303
- package/dist/components/primitives/index.mjs +0 -12
- package/dist/components/primitives/number-input.mjs +0 -104
- package/dist/components/primitives/select-input.mjs +0 -177
- package/dist/components/primitives/tag-input.mjs +0 -135
- package/dist/components/primitives/text-input.mjs +0 -39
- package/dist/components/primitives/textarea-input.mjs +0 -37
- package/dist/components/primitives/toggle-input.mjs +0 -31
- package/dist/components/primitives/types.mjs +0 -12
- package/dist/components/ui/accordion.mjs +0 -55
- package/dist/components/ui/avatar.mjs +0 -54
- package/dist/components/ui/badge.mjs +0 -34
- package/dist/components/ui/button.mjs +0 -48
- package/dist/components/ui/checkbox.mjs +0 -21
- package/dist/components/ui/combobox.mjs +0 -163
- package/dist/components/ui/dialog.mjs +0 -95
- package/dist/components/ui/dropdown-menu.mjs +0 -138
- package/dist/components/ui/field.mjs +0 -113
- package/dist/components/ui/input-group.mjs +0 -82
- package/dist/components/ui/input.mjs +0 -17
- package/dist/components/ui/label.mjs +0 -15
- package/dist/components/ui/popover.mjs +0 -56
- package/dist/components/ui/scroll-area.mjs +0 -38
- package/dist/components/ui/select.mjs +0 -100
- package/dist/components/ui/separator.mjs +0 -16
- package/dist/components/ui/sheet.mjs +0 -90
- package/dist/components/ui/sidebar.mjs +0 -387
- package/dist/components/ui/skeleton.mjs +0 -14
- package/dist/components/ui/spinner.mjs +0 -16
- package/dist/components/ui/switch.mjs +0 -22
- package/dist/components/ui/table.mjs +0 -68
- package/dist/components/ui/tabs.mjs +0 -48
- package/dist/components/ui/textarea.mjs +0 -15
- package/dist/components/ui/tooltip.mjs +0 -44
- package/dist/config/component-registry.mjs +0 -38
- package/dist/config/index.mjs +0 -129
- package/dist/hooks/admin-provider.mjs +0 -70
- package/dist/hooks/index.mjs +0 -7
- package/dist/hooks/store.mjs +0 -178
- package/dist/hooks/use-collection-db.mjs +0 -146
- package/dist/hooks/use-collection.mjs +0 -112
- package/dist/hooks/use-global.mjs +0 -46
- package/dist/hooks/use-mobile.mjs +0 -20
- package/dist/lib/utils.mjs +0 -10
- package/dist/styles/index.css +0 -336
- package/dist/styles/index.mjs +0 -1
- package/dist/utils/index.mjs +0 -9
- package/dist/views/auth/auth-layout.mjs +0 -52
- package/dist/views/auth/index.mjs +0 -6
- package/dist/views/auth/login-form.mjs +0 -156
- package/dist/views/collection/auto-form-fields.mjs +0 -525
- package/dist/views/collection/collection-form.mjs +0 -91
- package/dist/views/collection/collection-list.mjs +0 -76
- package/dist/views/collection/form-field.mjs +0 -42
- package/dist/views/collection/index.mjs +0 -6
- package/dist/views/common/index.mjs +0 -4
- package/dist/views/common/locale-switcher.mjs +0 -39
- package/dist/views/common/version-history.mjs +0 -272
- package/dist/views/index.mjs +0 -9
- package/dist/views/layout/admin-layout.mjs +0 -40
- package/dist/views/layout/admin-router.mjs +0 -95
- package/dist/views/layout/admin-sidebar.mjs +0 -63
- package/dist/views/layout/index.mjs +0 -5
- package/src/__tests__/setup.ts +0 -44
- package/src/__tests__/test-utils.tsx +0 -49
- package/src/__tests__/vitest.d.ts +0 -9
- package/src/components/admin-app.tsx +0 -221
- package/src/components/fields/array-field.tsx +0 -237
- package/src/components/fields/checkbox-field.tsx +0 -47
- package/src/components/fields/custom-field.tsx +0 -50
- package/src/components/fields/date-field.tsx +0 -65
- package/src/components/fields/datetime-field.tsx +0 -67
- package/src/components/fields/email-field.tsx +0 -51
- package/src/components/fields/embedded-collection.tsx +0 -315
- package/src/components/fields/field-types.ts +0 -162
- package/src/components/fields/field-utils.ts +0 -6
- package/src/components/fields/field-wrapper.tsx +0 -52
- package/src/components/fields/index.ts +0 -66
- package/src/components/fields/json-field.tsx +0 -440
- package/src/components/fields/locale-badge.tsx +0 -15
- package/src/components/fields/number-field.tsx +0 -57
- package/src/components/fields/password-field.tsx +0 -51
- package/src/components/fields/relation-field.tsx +0 -243
- package/src/components/fields/relation-picker.tsx +0 -402
- package/src/components/fields/relation-select.tsx +0 -327
- package/src/components/fields/rich-text-editor/index.tsx +0 -1337
- package/src/components/fields/select-field.tsx +0 -61
- package/src/components/fields/switch-field.tsx +0 -47
- package/src/components/fields/text-field.tsx +0 -55
- package/src/components/fields/textarea-field.tsx +0 -55
- package/src/components/index.ts +0 -40
- package/src/components/primitives/checkbox-input.tsx +0 -193
- package/src/components/primitives/date-input.tsx +0 -401
- package/src/components/primitives/index.ts +0 -24
- package/src/components/primitives/number-input.tsx +0 -132
- package/src/components/primitives/select-input.tsx +0 -296
- package/src/components/primitives/tag-input.tsx +0 -200
- package/src/components/primitives/text-input.tsx +0 -49
- package/src/components/primitives/textarea-input.tsx +0 -46
- package/src/components/primitives/toggle-input.tsx +0 -36
- package/src/components/primitives/types.ts +0 -235
- package/src/components/ui/accordion.tsx +0 -72
- package/src/components/ui/avatar.tsx +0 -106
- package/src/components/ui/badge.tsx +0 -48
- package/src/components/ui/button.tsx +0 -53
- package/src/components/ui/card.tsx +0 -94
- package/src/components/ui/checkbox.tsx +0 -27
- package/src/components/ui/combobox.tsx +0 -290
- package/src/components/ui/dialog.tsx +0 -151
- package/src/components/ui/dropdown-menu.tsx +0 -254
- package/src/components/ui/field.tsx +0 -227
- package/src/components/ui/input-group.tsx +0 -149
- package/src/components/ui/input.tsx +0 -20
- package/src/components/ui/label.tsx +0 -18
- package/src/components/ui/popover.tsx +0 -88
- package/src/components/ui/scroll-area.tsx +0 -53
- package/src/components/ui/select.tsx +0 -192
- package/src/components/ui/separator.tsx +0 -23
- package/src/components/ui/sheet.tsx +0 -127
- package/src/components/ui/sidebar.tsx +0 -723
- package/src/components/ui/skeleton.tsx +0 -13
- package/src/components/ui/spinner.tsx +0 -10
- package/src/components/ui/switch.tsx +0 -32
- package/src/components/ui/table.tsx +0 -99
- package/src/components/ui/tabs.tsx +0 -82
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/tooltip.tsx +0 -70
- package/src/config/component-registry.ts +0 -190
- package/src/config/index.ts +0 -1099
- package/src/hooks/README.md +0 -269
- package/src/hooks/admin-provider.tsx +0 -110
- package/src/hooks/index.ts +0 -41
- package/src/hooks/store.ts +0 -248
- package/src/hooks/use-auth.ts +0 -168
- package/src/hooks/use-collection-db.ts +0 -209
- package/src/hooks/use-collection.ts +0 -156
- package/src/hooks/use-global.ts +0 -69
- package/src/hooks/use-mobile.ts +0 -21
- package/src/lib/utils.ts +0 -6
- package/src/styles/index.css +0 -340
- package/src/utils/index.ts +0 -6
- package/src/views/auth/auth-layout.tsx +0 -77
- package/src/views/auth/forgot-password-form.tsx +0 -192
- package/src/views/auth/index.ts +0 -21
- package/src/views/auth/login-form.tsx +0 -229
- package/src/views/auth/reset-password-form.tsx +0 -232
- package/src/views/collection/auto-form-fields.tsx +0 -982
- package/src/views/collection/collection-form.tsx +0 -186
- package/src/views/collection/collection-list.tsx +0 -223
- package/src/views/collection/form-field.tsx +0 -52
- package/src/views/collection/index.ts +0 -15
- package/src/views/common/index.ts +0 -8
- package/src/views/common/locale-switcher.tsx +0 -45
- package/src/views/common/version-history.tsx +0 -406
- package/src/views/index.ts +0 -25
- package/src/views/layout/admin-layout.tsx +0 -117
- package/src/views/layout/admin-router.tsx +0 -206
- package/src/views/layout/admin-sidebar.tsx +0 -185
- package/src/views/layout/index.ts +0 -12
- package/tsconfig.json +0 -13
- package/tsconfig.tsbuildinfo +0 -1
- package/tsdown.config.ts +0 -13
- package/vitest.config.ts +0 -29
|
@@ -1,192 +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 { CaretDownIcon, CheckIcon, CaretUpIcon } from "@phosphor-icons/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
|
-
"border-input data-[placeholder]:text-muted-foreground bg-input/20 dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border px-2 py-1.5 text-xs/relaxed transition-colors focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-3.5 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
45
|
-
className
|
|
46
|
-
)}
|
|
47
|
-
{...props}
|
|
48
|
-
>
|
|
49
|
-
{children}
|
|
50
|
-
<SelectPrimitive.Icon
|
|
51
|
-
render={
|
|
52
|
-
<CaretDownIcon className="text-muted-foreground size-3.5 pointer-events-none" />
|
|
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
|
-
<SelectPrimitive.Positioner
|
|
76
|
-
side={side}
|
|
77
|
-
sideOffset={sideOffset}
|
|
78
|
-
align={align}
|
|
79
|
-
alignOffset={alignOffset}
|
|
80
|
-
alignItemWithTrigger={alignItemWithTrigger}
|
|
81
|
-
className="isolate z-50"
|
|
82
|
-
>
|
|
83
|
-
<SelectPrimitive.Popup
|
|
84
|
-
data-slot="select-content"
|
|
85
|
-
className={cn("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 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 ring-foreground/10 min-w-32 rounded-lg shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto", className )}
|
|
86
|
-
{...props}
|
|
87
|
-
>
|
|
88
|
-
<SelectScrollUpButton />
|
|
89
|
-
<SelectPrimitive.List>{children}</SelectPrimitive.List>
|
|
90
|
-
<SelectScrollDownButton />
|
|
91
|
-
</SelectPrimitive.Popup>
|
|
92
|
-
</SelectPrimitive.Positioner>
|
|
93
|
-
</SelectPrimitive.Portal>
|
|
94
|
-
)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function SelectLabel({
|
|
98
|
-
className,
|
|
99
|
-
...props
|
|
100
|
-
}: SelectPrimitive.GroupLabel.Props) {
|
|
101
|
-
return (
|
|
102
|
-
<SelectPrimitive.GroupLabel
|
|
103
|
-
data-slot="select-label"
|
|
104
|
-
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
105
|
-
{...props}
|
|
106
|
-
/>
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function SelectItem({
|
|
111
|
-
className,
|
|
112
|
-
children,
|
|
113
|
-
...props
|
|
114
|
-
}: SelectPrimitive.Item.Props) {
|
|
115
|
-
return (
|
|
116
|
-
<SelectPrimitive.Item
|
|
117
|
-
data-slot="select-item"
|
|
118
|
-
className={cn(
|
|
119
|
-
"focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
120
|
-
className
|
|
121
|
-
)}
|
|
122
|
-
{...props}
|
|
123
|
-
>
|
|
124
|
-
<SelectPrimitive.ItemText className="flex flex-1 gap-2 shrink-0 whitespace-nowrap">
|
|
125
|
-
{children}
|
|
126
|
-
</SelectPrimitive.ItemText>
|
|
127
|
-
<SelectPrimitive.ItemIndicator
|
|
128
|
-
render={<span className="pointer-events-none absolute right-2 flex items-center justify-center" />}
|
|
129
|
-
>
|
|
130
|
-
<CheckIcon className="pointer-events-none" />
|
|
131
|
-
</SelectPrimitive.ItemIndicator>
|
|
132
|
-
</SelectPrimitive.Item>
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function SelectSeparator({
|
|
137
|
-
className,
|
|
138
|
-
...props
|
|
139
|
-
}: SelectPrimitive.Separator.Props) {
|
|
140
|
-
return (
|
|
141
|
-
<SelectPrimitive.Separator
|
|
142
|
-
data-slot="select-separator"
|
|
143
|
-
className={cn("bg-border/50 -mx-1 my-1 h-px pointer-events-none", className)}
|
|
144
|
-
{...props}
|
|
145
|
-
/>
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function SelectScrollUpButton({
|
|
150
|
-
className,
|
|
151
|
-
...props
|
|
152
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
|
|
153
|
-
return (
|
|
154
|
-
<SelectPrimitive.ScrollUpArrow
|
|
155
|
-
data-slot="select-scroll-up-button"
|
|
156
|
-
className={cn("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 top-0 w-full", className)}
|
|
157
|
-
{...props}
|
|
158
|
-
>
|
|
159
|
-
<CaretUpIcon
|
|
160
|
-
/>
|
|
161
|
-
</SelectPrimitive.ScrollUpArrow>
|
|
162
|
-
)
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function SelectScrollDownButton({
|
|
166
|
-
className,
|
|
167
|
-
...props
|
|
168
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
|
|
169
|
-
return (
|
|
170
|
-
<SelectPrimitive.ScrollDownArrow
|
|
171
|
-
data-slot="select-scroll-down-button"
|
|
172
|
-
className={cn("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 bottom-0 w-full", className)}
|
|
173
|
-
{...props}
|
|
174
|
-
>
|
|
175
|
-
<CaretDownIcon
|
|
176
|
-
/>
|
|
177
|
-
</SelectPrimitive.ScrollDownArrow>
|
|
178
|
-
)
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export {
|
|
182
|
-
Select,
|
|
183
|
-
SelectContent,
|
|
184
|
-
SelectGroup,
|
|
185
|
-
SelectItem,
|
|
186
|
-
SelectLabel,
|
|
187
|
-
SelectScrollDownButton,
|
|
188
|
-
SelectScrollUpButton,
|
|
189
|
-
SelectSeparator,
|
|
190
|
-
SelectTrigger,
|
|
191
|
-
SelectValue,
|
|
192
|
-
}
|
|
@@ -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
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { Separator }
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog"
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils"
|
|
5
|
-
import { Button } from "./button"
|
|
6
|
-
import { XIcon } from "@phosphor-icons/react"
|
|
7
|
-
|
|
8
|
-
function Sheet({ ...props }: SheetPrimitive.Root.Props) {
|
|
9
|
-
return <SheetPrimitive.Root data-slot="sheet" {...props} />
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {
|
|
13
|
-
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function SheetClose({ ...props }: SheetPrimitive.Close.Props) {
|
|
17
|
-
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {
|
|
21
|
-
return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {
|
|
25
|
-
return (
|
|
26
|
-
<SheetPrimitive.Backdrop
|
|
27
|
-
data-slot="sheet-overlay"
|
|
28
|
-
className={cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", className)}
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function SheetContent({
|
|
35
|
-
className,
|
|
36
|
-
children,
|
|
37
|
-
side = "right",
|
|
38
|
-
showCloseButton = true,
|
|
39
|
-
...props
|
|
40
|
-
}: SheetPrimitive.Popup.Props & {
|
|
41
|
-
side?: "top" | "right" | "bottom" | "left"
|
|
42
|
-
showCloseButton?: boolean
|
|
43
|
-
}) {
|
|
44
|
-
return (
|
|
45
|
-
<SheetPortal>
|
|
46
|
-
<SheetOverlay />
|
|
47
|
-
<SheetPrimitive.Popup
|
|
48
|
-
data-slot="sheet-content"
|
|
49
|
-
data-side={side}
|
|
50
|
-
className={cn("bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t 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=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=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className)}
|
|
51
|
-
{...props}
|
|
52
|
-
>
|
|
53
|
-
{children}
|
|
54
|
-
{showCloseButton && (
|
|
55
|
-
<SheetPrimitive.Close
|
|
56
|
-
data-slot="sheet-close"
|
|
57
|
-
render={
|
|
58
|
-
<Button
|
|
59
|
-
variant="ghost"
|
|
60
|
-
className="absolute top-4 right-4"
|
|
61
|
-
size="icon-sm"
|
|
62
|
-
/>
|
|
63
|
-
}
|
|
64
|
-
>
|
|
65
|
-
<XIcon
|
|
66
|
-
/>
|
|
67
|
-
<span className="sr-only">Close</span>
|
|
68
|
-
</SheetPrimitive.Close>
|
|
69
|
-
)}
|
|
70
|
-
</SheetPrimitive.Popup>
|
|
71
|
-
</SheetPortal>
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
76
|
-
return (
|
|
77
|
-
<div
|
|
78
|
-
data-slot="sheet-header"
|
|
79
|
-
className={cn("gap-1.5 p-6 flex flex-col", className)}
|
|
80
|
-
{...props}
|
|
81
|
-
/>
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
86
|
-
return (
|
|
87
|
-
<div
|
|
88
|
-
data-slot="sheet-footer"
|
|
89
|
-
className={cn("gap-2 p-6 mt-auto flex flex-col", className)}
|
|
90
|
-
{...props}
|
|
91
|
-
/>
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
|
|
96
|
-
return (
|
|
97
|
-
<SheetPrimitive.Title
|
|
98
|
-
data-slot="sheet-title"
|
|
99
|
-
className={cn("text-foreground text-sm font-medium", className)}
|
|
100
|
-
{...props}
|
|
101
|
-
/>
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function SheetDescription({
|
|
106
|
-
className,
|
|
107
|
-
...props
|
|
108
|
-
}: SheetPrimitive.Description.Props) {
|
|
109
|
-
return (
|
|
110
|
-
<SheetPrimitive.Description
|
|
111
|
-
data-slot="sheet-description"
|
|
112
|
-
className={cn("text-muted-foreground text-xs/relaxed", className)}
|
|
113
|
-
{...props}
|
|
114
|
-
/>
|
|
115
|
-
)
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export {
|
|
119
|
-
Sheet,
|
|
120
|
-
SheetTrigger,
|
|
121
|
-
SheetClose,
|
|
122
|
-
SheetContent,
|
|
123
|
-
SheetHeader,
|
|
124
|
-
SheetFooter,
|
|
125
|
-
SheetTitle,
|
|
126
|
-
SheetDescription,
|
|
127
|
-
}
|