@bebopdev/admin 0.1.0-beta.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/LICENSE +21 -0
- package/README.md +38 -0
- package/dist/components/ui/badge.d.ts +7 -0
- package/dist/components/ui/button.d.ts +8 -0
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +3 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/index.css +3 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1749 -0
- package/dist/lib/admin-portal.d.ts +2 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/types.d.ts +48 -0
- package/dist/ui/admin.d.ts +24 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Carlos Bensant
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @bebopdev/admin
|
|
2
|
+
|
|
3
|
+
The first-party React admin UI for Bebop collections stored in Jazz. The host application owns routing, authentication, and `JazzProvider`; this package renders the collection dashboard and document screens.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add @bebopdev/admin @bebopdev/core jazz-tools react react-dom react-router-dom
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The current release targets React 19 and `jazz-tools@2.0.0-alpha.57`.
|
|
12
|
+
|
|
13
|
+
## Mount the admin
|
|
14
|
+
|
|
15
|
+
Import the packaged stylesheet once, then mount `BebopAdmin` beneath the host router and Jazz provider at `/admin/*`:
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { BebopAdmin } from "@bebopdev/admin";
|
|
19
|
+
import "@bebopdev/admin/styles.css";
|
|
20
|
+
|
|
21
|
+
<Routes>
|
|
22
|
+
<Route
|
|
23
|
+
path="/admin/*"
|
|
24
|
+
element={
|
|
25
|
+
<BebopAdmin
|
|
26
|
+
app={app}
|
|
27
|
+
client={bebopClient}
|
|
28
|
+
manifest={bebopAdminManifest}
|
|
29
|
+
canAccessAdmin={isSignedIn}
|
|
30
|
+
/>
|
|
31
|
+
}
|
|
32
|
+
/>
|
|
33
|
+
</Routes>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`app`, `bebopAdminManifest`, and the typed client are generated from `bebop.config.ts` by `@bebopdev/cli`. The host can pass the current user's name, email, and logout action through the admin props.
|
|
37
|
+
|
|
38
|
+
See the [repository README](https://github.com/reezerdev/bebop#readme) for full host and authentication wiring.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
7
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>): import("react").JSX.Element;
|
|
8
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
|
|
3
|
+
size?: "default" | "sm";
|
|
4
|
+
}): React.JSX.Element;
|
|
5
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
3
|
+
declare const Select: typeof SelectPrimitive.Root;
|
|
4
|
+
declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props): React.JSX.Element;
|
|
5
|
+
declare function SelectValue({ className, ...props }: SelectPrimitive.Value.Props): React.JSX.Element;
|
|
6
|
+
declare function SelectTrigger({ className, size, children, ...props }: SelectPrimitive.Trigger.Props & {
|
|
7
|
+
size?: "sm" | "default";
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: SelectPrimitive.Popup.Props & Pick<SelectPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">): React.JSX.Element;
|
|
10
|
+
declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): React.JSX.Element;
|
|
11
|
+
declare function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props): React.JSX.Element;
|
|
12
|
+
declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): React.JSX.Element;
|
|
13
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>): React.JSX.Element;
|
|
14
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>): React.JSX.Element;
|
|
15
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Table({ className, ...props }: React.ComponentProps<"table">): React.JSX.Element;
|
|
3
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
|
|
4
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
|
|
5
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): React.JSX.Element;
|
|
6
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): React.JSX.Element;
|
|
7
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): React.JSX.Element;
|
|
8
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): React.JSX.Element;
|
|
9
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): React.JSX.Element;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Toast as ToastPrimitive } from "@base-ui/react/toast";
|
|
3
|
+
declare const toast: import("@base-ui/react/toast").ToastManager<any>;
|
|
4
|
+
declare function ToastProvider({ ...props }: ToastPrimitive.Provider.Props): React.JSX.Element;
|
|
5
|
+
declare function ToastPortal({ ...props }: ToastPrimitive.Portal.Props): React.JSX.Element;
|
|
6
|
+
declare function ToastViewport({ className, ...props }: ToastPrimitive.Viewport.Props): React.JSX.Element;
|
|
7
|
+
declare function Toast({ className, ...props }: ToastPrimitive.Root.Props): React.JSX.Element;
|
|
8
|
+
declare function ToastContent({ className, ...props }: ToastPrimitive.Content.Props): React.JSX.Element;
|
|
9
|
+
declare function ToastTitle({ className, ...props }: ToastPrimitive.Title.Props): React.JSX.Element;
|
|
10
|
+
declare function ToastDescription({ className, ...props }: ToastPrimitive.Description.Props): React.JSX.Element;
|
|
11
|
+
declare function ToastAction({ className, render, ...props }: ToastPrimitive.Action.Props): React.JSX.Element;
|
|
12
|
+
declare function ToastClose({ className, children, render, ...props }: ToastPrimitive.Close.Props): React.JSX.Element;
|
|
13
|
+
declare function Toaster({ children, toastManager, ...props }: ToastPrimitive.Provider.Props): React.JSX.Element;
|
|
14
|
+
declare const createToastManager: typeof ToastPrimitive.createToastManager;
|
|
15
|
+
declare const useToastManager: typeof ToastPrimitive.useToastManager;
|
|
16
|
+
export { Toaster, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, createToastManager, toast, useToastManager, };
|