@hanzo/ui 4.4.3 → 4.5.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/MCP-INSTRUCTIONS.md +73 -0
- package/README-MCP.md +175 -0
- package/bin/cli.js +100 -0
- package/bin/create-registry.js +108 -0
- package/bin/mcp.js +403 -0
- package/bin/npx-registry-mcp.js +15 -0
- package/bin/registry-mcp-wrapper.sh +19 -0
- package/bin/registry-mcp.js +100 -0
- package/bin/start-mcp-server.sh +22 -0
- package/bin/test-mcp.sh +52 -0
- package/bin/update-registry.js +196 -0
- package/blocks/components/enh-heading-block.tsx +1 -2
- package/blocks/components/screenful-block/index.tsx +2 -0
- package/blocks/def/card-block.ts +1 -3
- package/blocks/def/enh-heading-block.ts +1 -2
- package/dist/blocks/components/accordian-block.d.ts +4 -0
- package/dist/blocks/components/accordian-block.jsx +25 -0
- package/dist/blocks/components/block-component-props.d.ts +7 -0
- package/dist/blocks/components/block-component-props.js +1 -0
- package/dist/blocks/components/bullet-cards-block.d.ts +4 -0
- package/dist/blocks/components/bullet-cards-block.jsx +25 -0
- package/dist/blocks/components/card-block/index.d.ts +6 -0
- package/dist/blocks/components/card-block/index.jsx +87 -0
- package/dist/blocks/components/card-block/link-out-button.d.ts +6 -0
- package/dist/blocks/components/card-block/link-out-button.jsx +4 -0
- package/dist/blocks/components/card-block/util.d.ts +4 -0
- package/dist/blocks/components/card-block/util.js +6 -0
- package/dist/blocks/components/carte-blanche-block/index.d.ts +4 -0
- package/dist/blocks/components/carte-blanche-block/index.jsx +82 -0
- package/dist/blocks/components/carte-blanche-block/variant-content-left.d.ts +10 -0
- package/dist/blocks/components/carte-blanche-block/variant-content-left.jsx +23 -0
- package/dist/blocks/components/content.d.ts +10 -0
- package/dist/blocks/components/content.jsx +47 -0
- package/dist/blocks/components/cta-block.d.ts +12 -0
- package/dist/blocks/components/cta-block.jsx +69 -0
- package/dist/blocks/components/enh-heading-block.d.ts +7 -0
- package/dist/blocks/components/enh-heading-block.jsx +142 -0
- package/dist/blocks/components/grid-block/grid-block-mutator.d.ts +5 -0
- package/dist/blocks/components/grid-block/grid-block-mutator.js +1 -0
- package/dist/blocks/components/grid-block/index.d.ts +9 -0
- package/dist/blocks/components/grid-block/index.jsx +56 -0
- package/dist/blocks/components/grid-block/mutator-registry.d.ts +3 -0
- package/dist/blocks/components/grid-block/mutator-registry.js +5 -0
- package/dist/blocks/components/grid-block/table-borders.mutator.d.ts +3 -0
- package/dist/blocks/components/grid-block/table-borders.mutator.js +36 -0
- package/dist/blocks/components/group-block.d.ts +7 -0
- package/dist/blocks/components/group-block.jsx +61 -0
- package/dist/blocks/components/heading-block.d.ts +4 -0
- package/dist/blocks/components/heading-block.jsx +99 -0
- package/dist/blocks/components/image-block.d.ts +7 -0
- package/dist/blocks/components/image-block.jsx +69 -0
- package/dist/blocks/components/index.d.ts +14 -0
- package/dist/blocks/components/index.js +13 -0
- package/dist/blocks/components/screenful-block/content.d.ts +8 -0
- package/dist/blocks/components/screenful-block/content.jsx +71 -0
- package/dist/blocks/components/screenful-block/index.d.ts +12 -0
- package/dist/blocks/components/screenful-block/index.jsx +57 -0
- package/dist/blocks/components/screenful-block/poster-background.d.ts +7 -0
- package/dist/blocks/components/screenful-block/poster-background.jsx +14 -0
- package/dist/blocks/components/screenful-block/video-background.d.ts +8 -0
- package/dist/blocks/components/screenful-block/video-background.jsx +20 -0
- package/dist/blocks/components/space-block.d.ts +4 -0
- package/dist/blocks/components/space-block.jsx +42 -0
- package/dist/blocks/components/video-block.d.ts +9 -0
- package/dist/blocks/components/video-block.jsx +83 -0
- package/dist/blocks/def/accordian-block.d.ts +10 -0
- package/dist/blocks/def/accordian-block.js +2 -0
- package/dist/blocks/def/block.d.ts +4 -0
- package/dist/blocks/def/block.js +1 -0
- package/dist/blocks/def/bullet-cards-block.d.ts +17 -0
- package/dist/blocks/def/bullet-cards-block.js +1 -0
- package/dist/blocks/def/card-block.d.ts +17 -0
- package/dist/blocks/def/card-block.js +2 -0
- package/dist/blocks/def/carte-blanche-block.d.ts +12 -0
- package/dist/blocks/def/carte-blanche-block.js +1 -0
- package/dist/blocks/def/cta-block.d.ts +8 -0
- package/dist/blocks/def/cta-block.js +1 -0
- package/dist/blocks/def/element-block.d.ts +7 -0
- package/dist/blocks/def/element-block.js +2 -0
- package/dist/blocks/def/enh-heading-block.d.ts +22 -0
- package/dist/blocks/def/enh-heading-block.js +1 -0
- package/dist/blocks/def/grid-block.d.ts +12 -0
- package/dist/blocks/def/grid-block.js +1 -0
- package/dist/blocks/def/group-block.d.ts +7 -0
- package/dist/blocks/def/group-block.js +1 -0
- package/dist/blocks/def/heading-block.d.ts +11 -0
- package/dist/blocks/def/heading-block.js +1 -0
- package/dist/blocks/def/image-block.d.ts +26 -0
- package/dist/blocks/def/image-block.js +1 -0
- package/dist/blocks/def/index.d.ts +17 -0
- package/dist/blocks/def/index.js +2 -0
- package/dist/blocks/def/screenful-block.d.ts +41 -0
- package/dist/blocks/def/screenful-block.js +1 -0
- package/dist/blocks/def/space-block.d.ts +47 -0
- package/dist/blocks/def/space-block.js +8 -0
- package/dist/blocks/def/video-block.d.ts +5 -0
- package/dist/blocks/def/video-block.js +1 -0
- package/dist/blocks/index.d.ts +2 -0
- package/dist/blocks/index.js +2 -0
- package/dist/mcp/enhanced-server.d.ts +29 -0
- package/dist/mcp/enhanced-server.js +1128 -0
- package/dist/mcp/index.d.ts +28 -0
- package/dist/mcp/index.js +436 -0
- package/dist/primitives/accordion.d.ts +10 -0
- package/dist/primitives/accordion.jsx +21 -0
- package/dist/primitives/action-button.d.ts +9 -0
- package/dist/primitives/action-button.jsx +16 -0
- package/dist/primitives/apply-typography.d.ts +7 -0
- package/dist/primitives/apply-typography.jsx +38 -0
- package/dist/primitives/aspect-ratio.d.ts +3 -0
- package/dist/primitives/aspect-ratio.jsx +4 -0
- package/dist/primitives/avatar.d.ts +6 -0
- package/dist/primitives/avatar.jsx +11 -0
- package/dist/primitives/badge.d.ts +9 -0
- package/dist/primitives/badge.jsx +18 -0
- package/dist/primitives/breadcrumb.d.ts +19 -0
- package/dist/primitives/breadcrumb.jsx +27 -0
- package/dist/primitives/breakpoint-indicator.d.ts +3 -0
- package/dist/primitives/breakpoint-indicator.jsx +14 -0
- package/dist/primitives/button.d.ts +12 -0
- package/dist/primitives/button.jsx +55 -0
- package/dist/primitives/calendar.d.ts +8 -0
- package/dist/primitives/calendar.jsx +40 -0
- package/dist/primitives/card.d.ts +8 -0
- package/dist/primitives/card.jsx +18 -0
- package/dist/primitives/carousel.d.ts +18 -0
- package/dist/primitives/carousel.jsx +106 -0
- package/dist/primitives/checkbox.d.ts +4 -0
- package/dist/primitives/checkbox.jsx +15 -0
- package/dist/primitives/combobox.d.ts +41 -0
- package/dist/primitives/combobox.jsx +77 -0
- package/dist/primitives/command.d.ts +17 -0
- package/dist/primitives/command.jsx +38 -0
- package/dist/primitives/context-menu.d.ts +27 -0
- package/dist/primitives/context-menu.jsx +57 -0
- package/dist/primitives/dialog-video-controller.d.ts +3 -0
- package/dist/primitives/dialog-video-controller.jsx +24 -0
- package/dist/primitives/dialog.d.ts +28 -0
- package/dist/primitives/dialog.jsx +37 -0
- package/dist/primitives/drawer.d.ts +29 -0
- package/dist/primitives/drawer.jsx +34 -0
- package/dist/primitives/form.d.ts +12 -0
- package/dist/primitives/form.jsx +69 -0
- package/dist/primitives/icons/github.d.ts +4 -0
- package/dist/primitives/icons/github.jsx +6 -0
- package/dist/primitives/icons/index.d.ts +4 -0
- package/dist/primitives/icons/index.js +4 -0
- package/dist/primitives/icons/youtube-logo.d.ts +4 -0
- package/dist/primitives/icons/youtube-logo.jsx +39 -0
- package/dist/primitives/index-common.d.ts +47 -0
- package/dist/primitives/index-common.js +46 -0
- package/dist/primitives/index-next.d.ts +2 -0
- package/dist/primitives/index-next.js +2 -0
- package/dist/primitives/input-otp.d.ts +7 -0
- package/dist/primitives/input-otp.jsx +24 -0
- package/dist/primitives/input.d.ts +5 -0
- package/dist/primitives/input.jsx +11 -0
- package/dist/primitives/label.d.ts +5 -0
- package/dist/primitives/label.jsx +11 -0
- package/dist/primitives/list-adaptor.d.ts +9 -0
- package/dist/primitives/list-adaptor.js +1 -0
- package/dist/primitives/list-box.d.ts +10 -0
- package/dist/primitives/list-box.jsx +14 -0
- package/dist/primitives/loading-spinner.d.ts +5 -0
- package/dist/primitives/loading-spinner.jsx +8 -0
- package/dist/primitives/navigation-menu.d.ts +12 -0
- package/dist/primitives/navigation-menu.jsx +38 -0
- package/dist/primitives/next/image.d.ts +11 -0
- package/dist/primitives/next/image.jsx +42 -0
- package/dist/primitives/next/index.d.ts +7 -0
- package/dist/primitives/next/index.js +7 -0
- package/dist/primitives/next/inline-icon.d.ts +13 -0
- package/dist/primitives/next/inline-icon.jsx +15 -0
- package/dist/primitives/next/link-element.d.ts +23 -0
- package/dist/primitives/next/link-element.jsx +56 -0
- package/dist/primitives/next/mdx-link.d.ts +3 -0
- package/dist/primitives/next/mdx-link.jsx +12 -0
- package/dist/primitives/next/media-stack.d.ts +8 -0
- package/dist/primitives/next/media-stack.jsx +28 -0
- package/dist/primitives/next/nav-items.d.ts +10 -0
- package/dist/primitives/next/nav-items.jsx +24 -0
- package/dist/primitives/next/youtube-embed.d.ts +11 -0
- package/dist/primitives/next/youtube-embed.jsx +23 -0
- package/dist/primitives/popover.d.ts +9 -0
- package/dist/primitives/popover.jsx +18 -0
- package/dist/primitives/progress.d.ts +4 -0
- package/dist/primitives/progress.jsx +9 -0
- package/dist/primitives/radio-group.d.ts +7 -0
- package/dist/primitives/radio-group.jsx +18 -0
- package/dist/primitives/scroll-area.d.ts +5 -0
- package/dist/primitives/scroll-area.jsx +19 -0
- package/dist/primitives/select.d.ts +13 -0
- package/dist/primitives/select.jsx +62 -0
- package/dist/primitives/separator.d.ts +4 -0
- package/dist/primitives/separator.jsx +7 -0
- package/dist/primitives/sheet.d.ts +30 -0
- package/dist/primitives/sheet.jsx +56 -0
- package/dist/primitives/skeleton.d.ts +4 -0
- package/dist/primitives/skeleton.jsx +3 -0
- package/dist/primitives/slider.d.ts +9 -0
- package/dist/primitives/slider.jsx +30 -0
- package/dist/primitives/sonner.d.ts +5 -0
- package/dist/primitives/sonner.jsx +16 -0
- package/dist/primitives/step-indicator.d.ts +9 -0
- package/dist/primitives/step-indicator.jsx +23 -0
- package/dist/primitives/switch.d.ts +6 -0
- package/dist/primitives/switch.jsx +14 -0
- package/dist/primitives/table.d.ts +10 -0
- package/dist/primitives/table.jsx +21 -0
- package/dist/primitives/tabs.d.ts +7 -0
- package/dist/primitives/tabs.jsx +18 -0
- package/dist/primitives/text-area.d.ts +5 -0
- package/dist/primitives/text-area.jsx +9 -0
- package/dist/primitives/toggle-group.d.ts +14 -0
- package/dist/primitives/toggle-group.jsx +28 -0
- package/dist/primitives/toggle.d.ts +14 -0
- package/dist/primitives/toggle.jsx +52 -0
- package/dist/primitives/tooltip.d.ts +11 -0
- package/dist/primitives/tooltip.jsx +18 -0
- package/dist/primitives/video-player.d.ts +6 -0
- package/dist/primitives/video-player.jsx +8 -0
- package/dist/registry/api.d.ts +37 -0
- package/dist/registry/api.js +130 -0
- package/dist/registry/index.d.ts +9 -0
- package/dist/registry/index.js +45 -0
- package/dist/style/theme-provider.d.ts +4 -0
- package/dist/style/theme-provider.jsx +11 -0
- package/dist/tailwind/fontFamily.tailwind.d.ts +8 -0
- package/dist/tailwind/fontFamily.tailwind.js +7 -0
- package/dist/tailwind/fontSize.tailwind.d.ts +36 -0
- package/dist/tailwind/fontSize.tailwind.js +13 -0
- package/dist/tailwind/index.d.ts +3 -0
- package/dist/tailwind/index.js +2 -0
- package/dist/tailwind/screens.tailwind.d.ts +9 -0
- package/dist/tailwind/screens.tailwind.js +8 -0
- package/dist/tailwind/tw-font-desc.d.ts +6 -0
- package/dist/tailwind/tw-font-desc.js +6 -0
- package/dist/types/animation-def.d.ts +2 -0
- package/dist/types/animation-def.js +1 -0
- package/dist/types/breakpoints.d.ts +4 -0
- package/dist/types/breakpoints.js +4 -0
- package/dist/types/bullet-item.d.ts +6 -0
- package/dist/types/bullet-item.js +2 -0
- package/dist/types/button-def.d.ts +29 -0
- package/dist/types/button-def.js +2 -0
- package/dist/types/dimensions.d.ts +5 -0
- package/dist/types/dimensions.js +1 -0
- package/dist/types/grid-def.d.ts +36 -0
- package/dist/types/grid-def.js +33 -0
- package/dist/types/image-def.d.ts +27 -0
- package/dist/types/image-def.js +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.js +2 -0
- package/dist/types/link-def.d.ts +44 -0
- package/dist/types/link-def.js +1 -0
- package/dist/types/media-stack-def.d.ts +25 -0
- package/dist/types/media-stack-def.js +1 -0
- package/dist/types/t-shirt-size.d.ts +2 -0
- package/dist/types/t-shirt-size.js +1 -0
- package/dist/types/tshirt-dimensions.d.ts +12 -0
- package/dist/types/tshirt-dimensions.js +1 -0
- package/dist/types/video-def.d.ts +9 -0
- package/dist/types/video-def.js +1 -0
- package/dist/util/format-and-abbreviate-as-currency.d.ts +11 -0
- package/dist/util/format-and-abbreviate-as-currency.js +91 -0
- package/dist/util/format-to-max-char.d.ts +5 -0
- package/dist/util/format-to-max-char.js +57 -0
- package/dist/util/index-client.d.ts +2 -0
- package/dist/util/index-client.js +3 -0
- package/dist/util/index.d.ts +17 -0
- package/dist/util/index.js +41 -0
- package/dist/util/number-abbreviate.d.ts +9 -0
- package/dist/util/number-abbreviate.js +30 -0
- package/dist/util/specifier.d.ts +7 -0
- package/dist/util/specifier.js +31 -0
- package/dist/util/spread-to-transform.d.ts +7 -0
- package/dist/util/spread-to-transform.js +18 -0
- package/dist/util/step-animation.d.ts +5 -0
- package/dist/util/step-animation.js +60 -0
- package/dist/util/two-way-map.d.ts +8 -0
- package/dist/util/two-way-map.js +16 -0
- package/mcp/README.md +141 -0
- package/mcp/enhanced-server.ts +1208 -0
- package/mcp/index.ts +518 -0
- package/mcp/package.json +10 -0
- package/package.json +24 -4
- package/primitives/accordion.tsx +5 -5
- package/primitives/button.tsx +6 -3
- package/primitives/dialog.tsx +12 -7
- package/primitives/next/inline-icon.tsx +2 -3
- package/primitives/next/link-element.tsx +2 -2
- package/primitives/tabs.tsx +1 -1
- package/primitives/tooltip.tsx +1 -1
- package/public/r/accordion.json +11 -0
- package/public/r/alert.json +11 -0
- package/public/r/avatar.json +11 -0
- package/public/r/badge.json +11 -0
- package/public/r/button.json +11 -0
- package/public/r/card.json +11 -0
- package/public/r/checkbox.json +11 -0
- package/public/r/default.json +6 -0
- package/public/r/dialog.json +11 -0
- package/public/r/input.json +11 -0
- package/public/r/label.json +11 -0
- package/public/r/new-york.json +6 -0
- package/public/r/popover.json +11 -0
- package/public/r/select.json +11 -0
- package/public/r/table.json +11 -0
- package/public/r/tabs.json +11 -0
- package/public/r/toast.json +11 -0
- package/registry/api.ts +164 -0
- package/registry/index.ts +60 -0
- package/registry/package.json +10 -0
- package/registry.json +184 -0
- package/tailwind/typography-test.mdx +0 -1
- package/test/test-registry.js +73 -0
- package/tsconfig.json +8 -1
- package/types/bullet-item.ts +2 -2
- package/types/index.ts +0 -1
- package/types/link-def.ts +8 -14
- package/types/icon.ts +0 -10
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
const DialogVideoController = ({ children, }) => {
|
|
4
|
+
const [open, setOpen] = useState(false);
|
|
5
|
+
const onOpenChange = (b) => {
|
|
6
|
+
setOpen(b);
|
|
7
|
+
const videos = document.getElementsByTagName('video');
|
|
8
|
+
const videoArray = Array.from(videos);
|
|
9
|
+
videoArray.forEach((v) => {
|
|
10
|
+
if (b) {
|
|
11
|
+
v.pause();
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
v.play();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
// https://stackoverflow.com/a/49052730/11645689
|
|
19
|
+
const updatedChildren = React.Children.map(children, (child) => (React.cloneElement(child, { open, onOpenChange })));
|
|
20
|
+
return (<>
|
|
21
|
+
{updatedChildren}
|
|
22
|
+
</>);
|
|
23
|
+
};
|
|
24
|
+
export default DialogVideoController;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
interface DialogPortalProps extends React.PropsWithChildren<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>> {
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const DialogPortal: React.ForwardRefExoticComponent<DialogPortalProps & React.RefAttributes<never>>;
|
|
9
|
+
interface DialogOverlayProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> {
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
interface DialogCloseProps extends React.PropsWithChildren<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>> {
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DialogHeader: {
|
|
19
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const DialogFooter: {
|
|
23
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
27
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
28
|
+
export { Dialog, DialogTrigger, DialogOverlay, DialogClose, DialogPortal, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import { cn } from "../util";
|
|
6
|
+
const Dialog = DialogPrimitive.Root;
|
|
7
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
8
|
+
const DialogPortal = React.forwardRef(({ className, children, ...props }, ref) => (<DialogPrimitive.Portal {...props}>
|
|
9
|
+
<div className={cn("fixed inset-0 z-50 flex items-end justify-center sm:items-center", className)}>
|
|
10
|
+
{children}
|
|
11
|
+
</div>
|
|
12
|
+
</DialogPrimitive.Portal>));
|
|
13
|
+
DialogPortal.displayName = 'DialogPortal';
|
|
14
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Overlay ref={ref} className={cn("fixed inset-0 z-50 bg-overlay backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)} {...props}/>));
|
|
15
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
16
|
+
const DialogClose = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Close ref={ref} className={cn("absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", className)} {...props}>
|
|
17
|
+
<X className="h-4 w-4"/>
|
|
18
|
+
<span className="sr-only">Close</span>
|
|
19
|
+
</DialogPrimitive.Close>));
|
|
20
|
+
DialogClose.displayName = DialogPrimitive.Close.displayName;
|
|
21
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (<DialogPortal>
|
|
22
|
+
<DialogOverlay />
|
|
23
|
+
<DialogPrimitive.Content ref={ref} className={cn("fixed z-50 grid w-full gap-4 rounded-t-lg bg-level-1 p-6 shadow-lg animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-lg sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0", className)} {...props}>
|
|
24
|
+
{children}
|
|
25
|
+
<DialogClose />
|
|
26
|
+
</DialogPrimitive.Content>
|
|
27
|
+
</DialogPortal>));
|
|
28
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
29
|
+
const DialogHeader = ({ className, ...props }) => (<div className={cn("flex flex-col space-y-1.5 text-center sm:text-left", className)} {...props}/>);
|
|
30
|
+
DialogHeader.displayName = "DialogHeader";
|
|
31
|
+
const DialogFooter = ({ className, ...props }) => (<div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props}/>);
|
|
32
|
+
DialogFooter.displayName = "DialogFooter";
|
|
33
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold leading-none tracking-tight text-foreground", className)} {...props}/>));
|
|
34
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
35
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-1", className)} {...props}/>));
|
|
36
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
37
|
+
export { Dialog, DialogTrigger, DialogOverlay, DialogClose, DialogPortal, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Drawer as DrawerPrimitive } from '@hanzo/react-drawer';
|
|
3
|
+
declare const Drawer: {
|
|
4
|
+
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
declare const DrawerTrigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const DrawerPortal: import("react").FC<import("@radix-ui/react-dialog").DialogPortalProps>;
|
|
9
|
+
declare const DrawerHandle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const DrawerClose: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
+
onAnimationEnd?: (open: boolean) => void;
|
|
14
|
+
} & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
overlayClx?: string;
|
|
16
|
+
defaultHandle?: boolean;
|
|
17
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DrawerHeader: {
|
|
19
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const DrawerFooter: {
|
|
23
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
27
|
+
declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
28
|
+
type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;
|
|
29
|
+
export { type DrawerProps, Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHandle, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Drawer as DrawerPrimitive } from '@hanzo/react-drawer';
|
|
4
|
+
import { cn } from '../util';
|
|
5
|
+
const Drawer = ({ shouldScaleBackground = false, ...props }) => (<DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props}/>);
|
|
6
|
+
Drawer.displayName = 'Drawer';
|
|
7
|
+
const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
8
|
+
const DrawerPortal = DrawerPrimitive.Portal;
|
|
9
|
+
const DrawerHandle = DrawerPrimitive.Handle;
|
|
10
|
+
const DrawerClose = DrawerPrimitive.Close;
|
|
11
|
+
const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => (<DrawerPrimitive.Overlay ref={ref} className={cn('fixed inset-0 bg-overlay backdrop-blur-sm', className)} {...props}/>));
|
|
12
|
+
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
13
|
+
const DrawerContent = React.forwardRef(({ className, children, overlayClx = '', defaultHandle = true, ...props }, ref) => {
|
|
14
|
+
return (<DrawerPortal>
|
|
15
|
+
{/* If no or same z index, overlay should precede content */}
|
|
16
|
+
<DrawerOverlay className={cn('z-below-modal', overlayClx)}/>
|
|
17
|
+
<DrawerPrimitive.Content ref={ref} className={cn('fixed left-0 right-0 bottom-0 z-modal', 'mt-24 flex flex-col rounded-t-[10px] pt-6 border bg-background',
|
|
18
|
+
// 'h-[80%]'
|
|
19
|
+
className)} {...props}>
|
|
20
|
+
{defaultHandle && (<div className='absolute left-0 right-0 mx-auto top-2 h-2 w-[100px] rounded-full bg-level-3 shrink-0'/>)}
|
|
21
|
+
{children}
|
|
22
|
+
</DrawerPrimitive.Content>
|
|
23
|
+
</DrawerPortal>);
|
|
24
|
+
});
|
|
25
|
+
DrawerContent.displayName = 'DrawerContent';
|
|
26
|
+
const DrawerHeader = ({ className, ...props }) => (<div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props}/>);
|
|
27
|
+
DrawerHeader.displayName = 'DrawerHeader';
|
|
28
|
+
const DrawerFooter = ({ className, ...props }) => (<div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props}/>);
|
|
29
|
+
DrawerFooter.displayName = 'DrawerFooter';
|
|
30
|
+
const DrawerTitle = React.forwardRef(({ className, ...props }, ref) => (<DrawerPrimitive.Title ref={ref} className={cn('text-lg font-semibold leading-none tracking-tight', className)} {...props}/>));
|
|
31
|
+
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
32
|
+
const DrawerDescription = React.forwardRef(({ className, ...props }, ref) => (<DrawerPrimitive.Description ref={ref} className={cn('text-sm text-muted', className)} {...props}/>));
|
|
33
|
+
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
34
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHandle, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
4
|
+
declare const Form: any;
|
|
5
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
6
|
+
declare const useFormField: () => any;
|
|
7
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
9
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
12
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { Controller, FormProvider, useFormContext, } from "react-hook-form";
|
|
6
|
+
import { cn } from "../util";
|
|
7
|
+
import Label from "./label";
|
|
8
|
+
const Form = FormProvider;
|
|
9
|
+
const FormFieldContext = React.createContext({});
|
|
10
|
+
const FormField = ({ ...props }) => {
|
|
11
|
+
return (<FormFieldContext.Provider value={{ name: props.name }}>
|
|
12
|
+
<Controller {...props}/>
|
|
13
|
+
</FormFieldContext.Provider>);
|
|
14
|
+
};
|
|
15
|
+
const useFormField = () => {
|
|
16
|
+
const fieldContext = React.useContext(FormFieldContext);
|
|
17
|
+
const itemContext = React.useContext(FormItemContext);
|
|
18
|
+
const { getFieldState, formState } = useFormContext();
|
|
19
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
20
|
+
if (!fieldContext) {
|
|
21
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
22
|
+
}
|
|
23
|
+
const { id } = itemContext;
|
|
24
|
+
return {
|
|
25
|
+
id,
|
|
26
|
+
name: fieldContext.name,
|
|
27
|
+
formItemId: `${id}-form-item`,
|
|
28
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
29
|
+
formMessageId: `${id}-form-item-message`,
|
|
30
|
+
...fieldState,
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
const FormItemContext = React.createContext({});
|
|
34
|
+
const FormItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
35
|
+
const id = React.useId();
|
|
36
|
+
return (<FormItemContext.Provider value={{ id }}>
|
|
37
|
+
<div ref={ref} className={cn("space-y-2", className)} {...props}/>
|
|
38
|
+
</FormItemContext.Provider>);
|
|
39
|
+
});
|
|
40
|
+
FormItem.displayName = "FormItem";
|
|
41
|
+
const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
|
|
42
|
+
const { error, formItemId } = useFormField();
|
|
43
|
+
return (<Label ref={ref} className={cn(error && "text-destructive", className)} htmlFor={formItemId} {...props}/>);
|
|
44
|
+
});
|
|
45
|
+
FormLabel.displayName = "FormLabel";
|
|
46
|
+
const FormControl = React.forwardRef(({ ...props }, ref) => {
|
|
47
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
48
|
+
return (<Slot ref={ref} id={formItemId} aria-describedby={!error
|
|
49
|
+
? `${formDescriptionId}`
|
|
50
|
+
: `${formDescriptionId} ${formMessageId}`} aria-invalid={!!error} {...props}/>);
|
|
51
|
+
});
|
|
52
|
+
FormControl.displayName = "FormControl";
|
|
53
|
+
const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
54
|
+
const { formDescriptionId } = useFormField();
|
|
55
|
+
return (<p ref={ref} id={formDescriptionId} className={cn("text-sm text-muted-1", className)} {...props}/>);
|
|
56
|
+
});
|
|
57
|
+
FormDescription.displayName = "FormDescription";
|
|
58
|
+
const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
59
|
+
const { error, formMessageId } = useFormField();
|
|
60
|
+
const body = error ? String(error?.message) : children;
|
|
61
|
+
const classes = 'text-xs font-medium py-1 ' +
|
|
62
|
+
(error ? 'text-destructive' : 'text-muted-1') +
|
|
63
|
+
(body ? '' : ' invisible'); // Hold space in the layout
|
|
64
|
+
return (<p ref={ref} id={formMessageId} className={cn(classes, className)} {...props}>
|
|
65
|
+
{body ? body : 'dummy'}
|
|
66
|
+
</p>);
|
|
67
|
+
});
|
|
68
|
+
FormMessage.displayName = "FormMessage";
|
|
69
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {} from 'lucide-react';
|
|
3
|
+
const GitHub = (props) => (<svg viewBox="0 0 438.549 438.549" {...props}>
|
|
4
|
+
<path fill="currentColor" d="M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z"></path>
|
|
5
|
+
</svg>);
|
|
6
|
+
export default GitHub;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {} from 'lucide-react';
|
|
3
|
+
const YouTubeLogo = (props) => (<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
4
|
+
<g style={{
|
|
5
|
+
stroke: 'none',
|
|
6
|
+
strokeWidth: 0,
|
|
7
|
+
strokeDasharray: 'none',
|
|
8
|
+
strokeLinecap: 'butt',
|
|
9
|
+
strokeLinejoin: 'miter',
|
|
10
|
+
strokeMiterlimit: 10,
|
|
11
|
+
fill: 'none',
|
|
12
|
+
fillRule: 'nonzero',
|
|
13
|
+
opacity: 1
|
|
14
|
+
}} transform="translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)">
|
|
15
|
+
<path d="M 88.119 23.338 c -1.035 -3.872 -4.085 -6.922 -7.957 -7.957 C 73.144 13.5 45 13.5 45 13.5 s -28.144 0 -35.162 1.881 c -3.872 1.035 -6.922 4.085 -7.957 7.957 C 0 30.356 0 45 0 45 s 0 14.644 1.881 21.662 c 1.035 3.872 4.085 6.922 7.957 7.957 C 16.856 76.5 45 76.5 45 76.5 s 28.144 0 35.162 -1.881 c 3.872 -1.035 6.922 -4.085 7.957 -7.957 C 90 59.644 90 45 90 45 S 90 30.356 88.119 23.338 z" style={{
|
|
16
|
+
stroke: 'none',
|
|
17
|
+
strokeWidth: 1,
|
|
18
|
+
strokeDasharray: 'none',
|
|
19
|
+
strokeLinecap: 'butt',
|
|
20
|
+
strokeLinejoin: 'miter',
|
|
21
|
+
strokeMiterlimit: 10,
|
|
22
|
+
fill: 'red',
|
|
23
|
+
fillRule: 'nonzero',
|
|
24
|
+
opacity: 1
|
|
25
|
+
}} transform=" matrix(1 0 0 1 0 0) " strokeLinecap="round"/>
|
|
26
|
+
<polygon points="36,58.5 59.38,45 36,31.5 " style={{
|
|
27
|
+
stroke: 'none',
|
|
28
|
+
strokeWidth: 1,
|
|
29
|
+
strokeDasharray: 'none',
|
|
30
|
+
strokeLinecap: 'butt',
|
|
31
|
+
strokeLinejoin: 'miter',
|
|
32
|
+
strokeMiterlimit: 10,
|
|
33
|
+
fill: 'white',
|
|
34
|
+
fillRule: 'nonzero',
|
|
35
|
+
opacity: 1
|
|
36
|
+
}} transform="matrix(1 0 0 1 0 0)"/>
|
|
37
|
+
</g>
|
|
38
|
+
</svg>);
|
|
39
|
+
export default YouTubeLogo;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './accordion';
|
|
2
|
+
export { Avatar, AvatarImage, AvatarFallback } from './avatar';
|
|
3
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, } from './breadcrumb';
|
|
4
|
+
export { default as Button, type ButtonProps, buttonVariants, } from './button';
|
|
5
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card';
|
|
6
|
+
export { type CarouselApi, type CarouselOptions, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, } from './carousel';
|
|
7
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from './command';
|
|
8
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, } from './context-menu';
|
|
9
|
+
export { type DrawerProps, Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHandle, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, } from './drawer';
|
|
10
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './dialog';
|
|
11
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from './form';
|
|
12
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, } from './input-otp';
|
|
13
|
+
export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, } from './navigation-menu';
|
|
14
|
+
export { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverTrigger, } from './popover';
|
|
15
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './select';
|
|
16
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, } from './sheet';
|
|
17
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './table';
|
|
18
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs';
|
|
19
|
+
export * from './tooltip';
|
|
20
|
+
export { default as ActionButton } from './action-button';
|
|
21
|
+
export { default as ApplyTypography, type TypographySize } from './apply-typography';
|
|
22
|
+
export { default as AspectRatio } from './aspect-ratio';
|
|
23
|
+
export { default as Badge } from './badge';
|
|
24
|
+
export { default as BreakpointIndicator } from './breakpoint-indicator';
|
|
25
|
+
export { default as Calendar } from './calendar';
|
|
26
|
+
export { default as Checkbox } from './checkbox';
|
|
27
|
+
export { default as Combobox, type ComboboxTriggerProps } from './combobox';
|
|
28
|
+
export { default as DialogVideoController } from './dialog-video-controller';
|
|
29
|
+
export { default as Input } from './input';
|
|
30
|
+
export { default as Label } from './label';
|
|
31
|
+
export type { default as ListAdaptor } from './list-adaptor';
|
|
32
|
+
export { default as ListBox } from './list-box';
|
|
33
|
+
export { default as LoadingSpinner } from './loading-spinner';
|
|
34
|
+
export { default as Progress } from './progress';
|
|
35
|
+
export { RadioGroup, RadioGroupItem } from './radio-group';
|
|
36
|
+
export { ScrollArea, ScrollBar } from './scroll-area';
|
|
37
|
+
export { default as Separator } from './separator';
|
|
38
|
+
export { default as Slider } from './slider';
|
|
39
|
+
export { default as Skeleton } from './skeleton';
|
|
40
|
+
export { default as StepIndicator } from './step-indicator';
|
|
41
|
+
export { default as Switch } from './switch';
|
|
42
|
+
export { default as TextArea } from './text-area';
|
|
43
|
+
export { Toaster, toast } from './sonner';
|
|
44
|
+
export { Toggle, toggleVariants } from './toggle';
|
|
45
|
+
export { ToggleGroup, ToggleGroupItem } from './toggle-group';
|
|
46
|
+
export { default as VideoPlayer } from './video-player';
|
|
47
|
+
export * as Icons from './icons';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './accordion';
|
|
2
|
+
export { Avatar, AvatarImage, AvatarFallback } from './avatar';
|
|
3
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, } from './breadcrumb';
|
|
4
|
+
export { default as Button, buttonVariants, } from './button';
|
|
5
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card';
|
|
6
|
+
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, } from './carousel';
|
|
7
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from './command';
|
|
8
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, } from './context-menu';
|
|
9
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHandle, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, } from './drawer';
|
|
10
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './dialog';
|
|
11
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from './form';
|
|
12
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, } from './input-otp';
|
|
13
|
+
export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, } from './navigation-menu';
|
|
14
|
+
export { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverTrigger, } from './popover';
|
|
15
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './select';
|
|
16
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, } from './sheet';
|
|
17
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './table';
|
|
18
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs';
|
|
19
|
+
export * from './tooltip';
|
|
20
|
+
export { default as ActionButton } from './action-button';
|
|
21
|
+
export { default as ApplyTypography } from './apply-typography';
|
|
22
|
+
export { default as AspectRatio } from './aspect-ratio';
|
|
23
|
+
export { default as Badge } from './badge';
|
|
24
|
+
export { default as BreakpointIndicator } from './breakpoint-indicator';
|
|
25
|
+
export { default as Calendar } from './calendar';
|
|
26
|
+
export { default as Checkbox } from './checkbox';
|
|
27
|
+
export { default as Combobox } from './combobox';
|
|
28
|
+
export { default as DialogVideoController } from './dialog-video-controller';
|
|
29
|
+
export { default as Input } from './input';
|
|
30
|
+
export { default as Label } from './label';
|
|
31
|
+
export { default as ListBox } from './list-box';
|
|
32
|
+
export { default as LoadingSpinner } from './loading-spinner';
|
|
33
|
+
export { default as Progress } from './progress';
|
|
34
|
+
export { RadioGroup, RadioGroupItem } from './radio-group';
|
|
35
|
+
export { ScrollArea, ScrollBar } from './scroll-area';
|
|
36
|
+
export { default as Separator } from './separator';
|
|
37
|
+
export { default as Slider } from './slider';
|
|
38
|
+
export { default as Skeleton } from './skeleton';
|
|
39
|
+
export { default as StepIndicator } from './step-indicator';
|
|
40
|
+
export { default as Switch } from './switch';
|
|
41
|
+
export { default as TextArea } from './text-area';
|
|
42
|
+
export { Toaster, toast } from './sonner';
|
|
43
|
+
export { Toggle, toggleVariants } from './toggle';
|
|
44
|
+
export { ToggleGroup, ToggleGroupItem } from './toggle-group';
|
|
45
|
+
export { default as VideoPlayer } from './video-player';
|
|
46
|
+
export * as Icons from './icons';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type SlotProps } from 'input-otp';
|
|
3
|
+
declare const InputOTP: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
|
|
4
|
+
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const InputOTPSlot: React.ForwardRefExoticComponent<SlotProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { OTPInput } from 'input-otp';
|
|
4
|
+
import { Dot } from 'lucide-react';
|
|
5
|
+
import { cn } from '../util';
|
|
6
|
+
const InputOTP = React.forwardRef(({ className, ...props }, ref) => (<OTPInput ref={ref} containerClassName={cn('flex items-center gap-2', className)} {...props}/>));
|
|
7
|
+
InputOTP.displayName = 'InputOTP';
|
|
8
|
+
const InputOTPGroup = React.forwardRef(({ className, ...props }, ref) => (<div ref={ref} className={cn('flex items-center', className)} {...props}/>));
|
|
9
|
+
InputOTPGroup.displayName = 'InputOTPGroup';
|
|
10
|
+
const InputOTPSlot = React.forwardRef(({ char, hasFakeCaret, isActive, className, ...props }, ref) => {
|
|
11
|
+
return (<div ref={ref} className={cn('relative flex h-10 w-10 items-center justify-center border-y border-r border-muted-3 text-sm ', 'transition-all first:rounded-l-md first:border-l last:rounded-r-md', isActive && 'z-above-content ring-2 ring-muted', // TODO: couldn't find: 'ring-offset-background'
|
|
12
|
+
className)} {...props}>
|
|
13
|
+
{char}
|
|
14
|
+
{hasFakeCaret && (<div className='pointer-events-none absolute inset-0 flex items-center justify-center'>
|
|
15
|
+
<div className='animate-caret-blink h-4 w-px bg-foreground duration-1000'/>
|
|
16
|
+
</div>)}
|
|
17
|
+
</div>);
|
|
18
|
+
});
|
|
19
|
+
InputOTPSlot.displayName = 'InputOTPSlot';
|
|
20
|
+
const InputOTPSeparator = React.forwardRef(({ ...props }, ref) => (<div ref={ref} role='separator' {...props}>
|
|
21
|
+
<Dot />
|
|
22
|
+
</div>));
|
|
23
|
+
InputOTPSeparator.displayName = 'InputOTPSeparator';
|
|
24
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { cn } from "../util";
|
|
4
|
+
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
5
|
+
return (<input type={type} className={cn('flex h-10 w-full rounded-md border border-muted-3 bg-inherit px-3 py-2 text-sm ring-offset-background ' +
|
|
6
|
+
'file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-2 ' +
|
|
7
|
+
'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 ' +
|
|
8
|
+
'first-letter:disabled:cursor-not-allowed disabled:opacity-50', className)} ref={ref} {...props}/>);
|
|
9
|
+
});
|
|
10
|
+
Input.displayName = "Input";
|
|
11
|
+
export default Input;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export default Label;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
"use client";
|
|
3
|
+
import React from "react";
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
import { cn } from "../util";
|
|
8
|
+
const labelVariants = cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
9
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => (<LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props}/>));
|
|
10
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
11
|
+
export default Label;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface ListAdaptor<T> {
|
|
2
|
+
getValue: (el: T) => string;
|
|
3
|
+
equals: (el1: T, el2: T) => boolean;
|
|
4
|
+
valueEquals: (el: T, v: string) => boolean;
|
|
5
|
+
getLabel?: (el: T) => string;
|
|
6
|
+
getImageUrl?: (el: T) => string | null;
|
|
7
|
+
isDisabled?: (el: T) => boolean;
|
|
8
|
+
}
|
|
9
|
+
export { type ListAdaptor as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare function ListBox<T>({ values, labels, onValueChange, value, isEqual, clx, itemClx }: {
|
|
2
|
+
values: T[];
|
|
3
|
+
labels: string[];
|
|
4
|
+
onValueChange: (val: T) => void;
|
|
5
|
+
value: T | undefined;
|
|
6
|
+
isEqual: (v1: T, v2: T) => boolean;
|
|
7
|
+
clx?: string;
|
|
8
|
+
itemClx?: string;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export default ListBox;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { cn } from '../util';
|
|
4
|
+
function Item({ value, label, className, onClick, first = false, last = false, selected = false }) {
|
|
5
|
+
return (<div className={cn('font-normal text-muted-1 px-3 py-1 cursor-pointer hover:text-foreground ', last ? '' : 'border-b', selected ? 'font-semibold text-accent hover:text-accent' : '', className)} onClick={() => { onClick(value); }}>
|
|
6
|
+
<span>{label}</span>
|
|
7
|
+
</div>);
|
|
8
|
+
}
|
|
9
|
+
function ListBox({ values, labels, onValueChange, value, isEqual, clx = '', itemClx = '' }) {
|
|
10
|
+
return (<div className={cn('border rounded-md select-none', clx)}>
|
|
11
|
+
{values.map((val, i) => (<Item value={val} label={labels[i]} onClick={onValueChange} className={itemClx} first={i === 0} last={i === values.length - 1} selected={value && isEqual(val, value)} key={labels[i]}/>))}
|
|
12
|
+
</div>);
|
|
13
|
+
}
|
|
14
|
+
export default ListBox;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { cn } from '../util';
|
|
2
|
+
// cf: https://github.com/shadcn-ui/ui/discussions/1694#discussioncomment-7851248
|
|
3
|
+
const LoadingSpinner = ({ size = 24, className = '', ...props }) => {
|
|
4
|
+
return (<svg width={size} height={size} {...props} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className={cn("animate-spin", className)}>
|
|
5
|
+
<path d="M21 12a9 9 0 1 1-6.219-8.56"/>
|
|
6
|
+
</svg>);
|
|
7
|
+
};
|
|
8
|
+
export default LoadingSpinner;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
3
|
+
declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
4
|
+
declare const NavigationMenuList: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
5
|
+
declare const NavigationMenuItem: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
+
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
7
|
+
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const NavigationMenuLink: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
declare const NavigationMenuViewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const NavigationMenuIndicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
|