@questpie/admin 0.0.1 → 1.0.1
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-D7w7W1Hl.mjs +273 -0
- package/dist/bulk-upload-dialog-D7w7W1Hl.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-DbpZKSgH.d.mts +13585 -0
- package/dist/client-DbpZKSgH.d.mts.map +1 -0
- package/dist/client-njX1rZmi.mjs +22612 -0
- package/dist/client-njX1rZmi.mjs.map +1 -0
- package/dist/client.d.mts +3 -0
- package/dist/client.mjs +13 -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-mCY0pgZv.mjs +3 -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-CEwsdLwn.mjs +3 -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 +13 -0
- package/dist/login-page-BUnpCbCa.mjs +3 -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-CufHz3h3.mjs +3 -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-BNNzt_Z6.mjs +3 -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 -198
- 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,82 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Button } from "./button";
|
|
6
|
-
import { Input } from "./input";
|
|
7
|
-
import { Textarea } from "./textarea";
|
|
8
|
-
import { cn } from "../../lib/utils";
|
|
9
|
-
import { cva } from "class-variance-authority";
|
|
10
|
-
|
|
11
|
-
//#region src/components/ui/input-group.tsx
|
|
12
|
-
function InputGroup({ className, ...props }) {
|
|
13
|
-
return /* @__PURE__ */ jsx("div", {
|
|
14
|
-
"data-slot": "input-group",
|
|
15
|
-
role: "group",
|
|
16
|
-
className: cn("border-input bg-input/20 dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-7 rounded-md border transition-colors has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:ring-[2px] has-[[data-slot][aria-invalid=true]]:ring-[2px] has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto", className),
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
const inputGroupAddonVariants = cva("text-muted-foreground **:data-[slot=kbd]:bg-muted-foreground/10 h-auto gap-1 py-2 text-xs/relaxed font-medium group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5 flex cursor-text items-center justify-center select-none", {
|
|
21
|
-
variants: { align: {
|
|
22
|
-
"inline-start": "pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem] order-first",
|
|
23
|
-
"inline-end": "pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem] order-last",
|
|
24
|
-
"block-start": "px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start",
|
|
25
|
-
"block-end": "px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"
|
|
26
|
-
} },
|
|
27
|
-
defaultVariants: { align: "inline-start" }
|
|
28
|
-
});
|
|
29
|
-
function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
30
|
-
return /* @__PURE__ */ jsx("div", {
|
|
31
|
-
role: "group",
|
|
32
|
-
"data-slot": "input-group-addon",
|
|
33
|
-
"data-align": align,
|
|
34
|
-
className: cn(inputGroupAddonVariants({ align }), className),
|
|
35
|
-
onClick: (e) => {
|
|
36
|
-
if (e.target.closest("button")) return;
|
|
37
|
-
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
38
|
-
},
|
|
39
|
-
...props
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
const inputGroupButtonVariants = cva("gap-2 rounded-md text-xs/relaxed shadow-none flex items-center", {
|
|
43
|
-
variants: { size: {
|
|
44
|
-
xs: "h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",
|
|
45
|
-
sm: "",
|
|
46
|
-
"icon-xs": "size-6 p-0 has-[>svg]:p-0",
|
|
47
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
48
|
-
} },
|
|
49
|
-
defaultVariants: { size: "xs" }
|
|
50
|
-
});
|
|
51
|
-
function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs", ...props }) {
|
|
52
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
53
|
-
type,
|
|
54
|
-
"data-size": size,
|
|
55
|
-
variant,
|
|
56
|
-
className: cn(inputGroupButtonVariants({ size }), className),
|
|
57
|
-
...props
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function InputGroupText({ className, ...props }) {
|
|
61
|
-
return /* @__PURE__ */ jsx("span", {
|
|
62
|
-
className: cn("text-muted-foreground gap-2 text-xs/relaxed [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none", className),
|
|
63
|
-
...props
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function InputGroupInput({ className, ...props }) {
|
|
67
|
-
return /* @__PURE__ */ jsx(Input, {
|
|
68
|
-
"data-slot": "input-group-control",
|
|
69
|
-
className: cn("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1", className),
|
|
70
|
-
...props
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function InputGroupTextarea({ className, ...props }) {
|
|
74
|
-
return /* @__PURE__ */ jsx(Textarea, {
|
|
75
|
-
"data-slot": "input-group-control",
|
|
76
|
-
className: cn("rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1 resize-none", className),
|
|
77
|
-
...props
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
//#endregion
|
|
82
|
-
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
4
|
-
import { Input as Input$1 } from "@base-ui/react/input";
|
|
5
|
-
|
|
6
|
-
//#region src/components/ui/input.tsx
|
|
7
|
-
function Input({ className, type, ...props }) {
|
|
8
|
-
return /* @__PURE__ */ jsx(Input$1, {
|
|
9
|
-
type,
|
|
10
|
-
"data-slot": "input",
|
|
11
|
-
className: cn("bg-input/20 dark:bg-input/30 border-input 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 h-7 rounded-md border px-2 py-0.5 text-sm transition-colors file:h-6 file:text-xs/relaxed file:font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] md:text-xs/relaxed file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
12
|
-
...props
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
export { Input };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ui/label.tsx
|
|
6
|
-
function Label({ className, ...props }) {
|
|
7
|
-
return /* @__PURE__ */ jsx("label", {
|
|
8
|
-
"data-slot": "label",
|
|
9
|
-
className: cn("gap-2 text-xs/relaxed leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed", className),
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { Label };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
4
|
-
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
5
|
-
|
|
6
|
-
//#region src/components/ui/popover.tsx
|
|
7
|
-
function Popover({ ...props }) {
|
|
8
|
-
return /* @__PURE__ */ jsx(Popover$1.Root, {
|
|
9
|
-
"data-slot": "popover",
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
function PopoverTrigger({ ...props }) {
|
|
14
|
-
return /* @__PURE__ */ jsx(Popover$1.Trigger, {
|
|
15
|
-
"data-slot": "popover-trigger",
|
|
16
|
-
...props
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function PopoverContent({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }) {
|
|
20
|
-
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
21
|
-
align,
|
|
22
|
-
alignOffset,
|
|
23
|
-
side,
|
|
24
|
-
sideOffset,
|
|
25
|
-
className: "isolate z-50",
|
|
26
|
-
children: /* @__PURE__ */ jsx(Popover$1.Popup, {
|
|
27
|
-
"data-slot": "popover-content",
|
|
28
|
-
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 flex flex-col gap-4 rounded-lg p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden", className),
|
|
29
|
-
...props
|
|
30
|
-
})
|
|
31
|
-
}) });
|
|
32
|
-
}
|
|
33
|
-
function PopoverHeader({ className, ...props }) {
|
|
34
|
-
return /* @__PURE__ */ jsx("div", {
|
|
35
|
-
"data-slot": "popover-header",
|
|
36
|
-
className: cn("flex flex-col gap-1 text-xs", className),
|
|
37
|
-
...props
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function PopoverTitle({ className, ...props }) {
|
|
41
|
-
return /* @__PURE__ */ jsx(Popover$1.Title, {
|
|
42
|
-
"data-slot": "popover-title",
|
|
43
|
-
className: cn("text-sm font-medium", className),
|
|
44
|
-
...props
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function PopoverDescription({ className, ...props }) {
|
|
48
|
-
return /* @__PURE__ */ jsx(Popover$1.Description, {
|
|
49
|
-
"data-slot": "popover-description",
|
|
50
|
-
className: cn("text-muted-foreground", className),
|
|
51
|
-
...props
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
//#endregion
|
|
56
|
-
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
4
|
-
import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
|
|
5
|
-
|
|
6
|
-
//#region src/components/ui/scroll-area.tsx
|
|
7
|
-
function ScrollArea({ className, children, ...props }) {
|
|
8
|
-
return /* @__PURE__ */ jsxs(ScrollArea$1.Root, {
|
|
9
|
-
"data-slot": "scroll-area",
|
|
10
|
-
className: cn("relative", className),
|
|
11
|
-
...props,
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ jsx(ScrollArea$1.Viewport, {
|
|
14
|
-
"data-slot": "scroll-area-viewport",
|
|
15
|
-
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
16
|
-
children
|
|
17
|
-
}),
|
|
18
|
-
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
19
|
-
/* @__PURE__ */ jsx(ScrollArea$1.Corner, {})
|
|
20
|
-
]
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
24
|
-
return /* @__PURE__ */ jsx(ScrollArea$1.Scrollbar, {
|
|
25
|
-
"data-slot": "scroll-area-scrollbar",
|
|
26
|
-
"data-orientation": orientation,
|
|
27
|
-
orientation,
|
|
28
|
-
className: cn("data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none", className),
|
|
29
|
-
...props,
|
|
30
|
-
children: /* @__PURE__ */ jsx(ScrollArea$1.Thumb, {
|
|
31
|
-
"data-slot": "scroll-area-thumb",
|
|
32
|
-
className: "rounded-full bg-border relative flex-1"
|
|
33
|
-
})
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
export { ScrollArea, ScrollBar };
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
import { CaretDownIcon, CaretUpIcon, CheckIcon } from "@phosphor-icons/react";
|
|
7
|
-
import { Select as Select$1 } from "@base-ui/react/select";
|
|
8
|
-
|
|
9
|
-
//#region src/components/ui/select.tsx
|
|
10
|
-
const Select = Select$1.Root;
|
|
11
|
-
function SelectGroup({ className, ...props }) {
|
|
12
|
-
return /* @__PURE__ */ jsx(Select$1.Group, {
|
|
13
|
-
"data-slot": "select-group",
|
|
14
|
-
className: cn("scroll-my-1 p-1", className),
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function SelectValue({ className, ...props }) {
|
|
19
|
-
return /* @__PURE__ */ jsx(Select$1.Value, {
|
|
20
|
-
"data-slot": "select-value",
|
|
21
|
-
className: cn("flex flex-1 text-left", className),
|
|
22
|
-
...props
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
26
|
-
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
27
|
-
"data-slot": "select-trigger",
|
|
28
|
-
"data-size": size,
|
|
29
|
-
className: cn("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", className),
|
|
30
|
-
...props,
|
|
31
|
-
children: [children, /* @__PURE__ */ jsx(Select$1.Icon, { render: /* @__PURE__ */ jsx(CaretDownIcon, { className: "text-muted-foreground size-3.5 pointer-events-none" }) })]
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, alignItemWithTrigger = true, ...props }) {
|
|
35
|
-
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
36
|
-
side,
|
|
37
|
-
sideOffset,
|
|
38
|
-
align,
|
|
39
|
-
alignOffset,
|
|
40
|
-
alignItemWithTrigger,
|
|
41
|
-
className: "isolate z-50",
|
|
42
|
-
children: /* @__PURE__ */ jsxs(Select$1.Popup, {
|
|
43
|
-
"data-slot": "select-content",
|
|
44
|
-
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),
|
|
45
|
-
...props,
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
48
|
-
/* @__PURE__ */ jsx(Select$1.List, { children }),
|
|
49
|
-
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
50
|
-
]
|
|
51
|
-
})
|
|
52
|
-
}) });
|
|
53
|
-
}
|
|
54
|
-
function SelectLabel({ className, ...props }) {
|
|
55
|
-
return /* @__PURE__ */ jsx(Select$1.GroupLabel, {
|
|
56
|
-
"data-slot": "select-label",
|
|
57
|
-
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
58
|
-
...props
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function SelectItem({ className, children, ...props }) {
|
|
62
|
-
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
63
|
-
"data-slot": "select-item",
|
|
64
|
-
className: cn("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", className),
|
|
65
|
-
...props,
|
|
66
|
-
children: [/* @__PURE__ */ jsx(Select$1.ItemText, {
|
|
67
|
-
className: "flex flex-1 gap-2 shrink-0 whitespace-nowrap",
|
|
68
|
-
children
|
|
69
|
-
}), /* @__PURE__ */ jsx(Select$1.ItemIndicator, {
|
|
70
|
-
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center" }),
|
|
71
|
-
children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
|
|
72
|
-
})]
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function SelectSeparator({ className, ...props }) {
|
|
76
|
-
return /* @__PURE__ */ jsx(Select$1.Separator, {
|
|
77
|
-
"data-slot": "select-separator",
|
|
78
|
-
className: cn("bg-border/50 -mx-1 my-1 h-px pointer-events-none", className),
|
|
79
|
-
...props
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function SelectScrollUpButton({ className, ...props }) {
|
|
83
|
-
return /* @__PURE__ */ jsx(Select$1.ScrollUpArrow, {
|
|
84
|
-
"data-slot": "select-scroll-up-button",
|
|
85
|
-
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),
|
|
86
|
-
...props,
|
|
87
|
-
children: /* @__PURE__ */ jsx(CaretUpIcon, {})
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
function SelectScrollDownButton({ className, ...props }) {
|
|
91
|
-
return /* @__PURE__ */ jsx(Select$1.ScrollDownArrow, {
|
|
92
|
-
"data-slot": "select-scroll-down-button",
|
|
93
|
-
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),
|
|
94
|
-
...props,
|
|
95
|
-
children: /* @__PURE__ */ jsx(CaretDownIcon, {})
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
//#endregion
|
|
100
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../lib/utils";
|
|
3
|
-
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ui/separator.tsx
|
|
6
|
-
function Separator({ className, orientation = "horizontal", ...props }) {
|
|
7
|
-
return /* @__PURE__ */ jsx(Separator$1, {
|
|
8
|
-
"data-slot": "separator",
|
|
9
|
-
orientation,
|
|
10
|
-
className: cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch", className),
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
export { Separator };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Button } from "./button";
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
import { XIcon } from "@phosphor-icons/react";
|
|
6
|
-
import { Dialog } from "@base-ui/react/dialog";
|
|
7
|
-
|
|
8
|
-
//#region src/components/ui/sheet.tsx
|
|
9
|
-
function Sheet({ ...props }) {
|
|
10
|
-
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
11
|
-
"data-slot": "sheet",
|
|
12
|
-
...props
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
function SheetTrigger({ ...props }) {
|
|
16
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
17
|
-
"data-slot": "sheet-trigger",
|
|
18
|
-
...props
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
function SheetClose({ ...props }) {
|
|
22
|
-
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
23
|
-
"data-slot": "sheet-close",
|
|
24
|
-
...props
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function SheetPortal({ ...props }) {
|
|
28
|
-
return /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
29
|
-
"data-slot": "sheet-portal",
|
|
30
|
-
...props
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function SheetOverlay({ className, ...props }) {
|
|
34
|
-
return /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
35
|
-
"data-slot": "sheet-overlay",
|
|
36
|
-
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),
|
|
37
|
-
...props
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function SheetContent({ className, children, side = "right", showCloseButton = true, ...props }) {
|
|
41
|
-
return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
42
|
-
"data-slot": "sheet-content",
|
|
43
|
-
"data-side": side,
|
|
44
|
-
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),
|
|
45
|
-
...props,
|
|
46
|
-
children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
47
|
-
"data-slot": "sheet-close",
|
|
48
|
-
render: /* @__PURE__ */ jsx(Button, {
|
|
49
|
-
variant: "ghost",
|
|
50
|
-
className: "absolute top-4 right-4",
|
|
51
|
-
size: "icon-sm"
|
|
52
|
-
}),
|
|
53
|
-
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
54
|
-
className: "sr-only",
|
|
55
|
-
children: "Close"
|
|
56
|
-
})]
|
|
57
|
-
})]
|
|
58
|
-
})] });
|
|
59
|
-
}
|
|
60
|
-
function SheetHeader({ className, ...props }) {
|
|
61
|
-
return /* @__PURE__ */ jsx("div", {
|
|
62
|
-
"data-slot": "sheet-header",
|
|
63
|
-
className: cn("gap-1.5 p-6 flex flex-col", className),
|
|
64
|
-
...props
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function SheetFooter({ className, ...props }) {
|
|
68
|
-
return /* @__PURE__ */ jsx("div", {
|
|
69
|
-
"data-slot": "sheet-footer",
|
|
70
|
-
className: cn("gap-2 p-6 mt-auto flex flex-col", className),
|
|
71
|
-
...props
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function SheetTitle({ className, ...props }) {
|
|
75
|
-
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
76
|
-
"data-slot": "sheet-title",
|
|
77
|
-
className: cn("text-foreground text-sm font-medium", className),
|
|
78
|
-
...props
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function SheetDescription({ className, ...props }) {
|
|
82
|
-
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
83
|
-
"data-slot": "sheet-description",
|
|
84
|
-
className: cn("text-muted-foreground text-xs/relaxed", className),
|
|
85
|
-
...props
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
//#endregion
|
|
90
|
-
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|