@craftzbay/ui 0.1.0 → 0.2.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.
@@ -0,0 +1,9 @@
1
+ import { DayPickerProps } from 'react-day-picker';
2
+ export type CalendarProps = DayPickerProps & {
3
+ className?: string;
4
+ };
5
+ /**
6
+ * Standalone calendar surface. Used by DatePicker, but can also be embedded
7
+ * directly in popovers, sheets, or inline forms. Wraps `react-day-picker`.
8
+ */
9
+ export declare const Calendar: import('react').ForwardRefExoticComponent<CalendarProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,23 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { default as useEmblaCarousel, UseEmblaCarouselType } from 'embla-carousel-react';
3
+ type CarouselApi = UseEmblaCarouselType[1];
4
+ type CarouselOptions = Parameters<typeof useEmblaCarousel>[0];
5
+ export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
6
+ opts?: CarouselOptions;
7
+ orientation?: 'horizontal' | 'vertical';
8
+ setApi?: (api: CarouselApi) => void;
9
+ }
10
+ /**
11
+ * Embla-backed carousel. Compose with `<CarouselContent>`, `<CarouselItem>`,
12
+ * `<CarouselPrevious>`, and `<CarouselNext>`.
13
+ */
14
+ export declare const Carousel: import('react').ForwardRefExoticComponent<CarouselProps & import('react').RefAttributes<HTMLDivElement>>;
15
+ export declare const CarouselContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
16
+ export declare const CarouselItem: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
17
+ export declare function CarouselPrevious({ className }: {
18
+ className?: string;
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ export declare function CarouselNext({ className }: {
21
+ className?: string;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Tiny, dependency-free chart primitives for inline dashboards. For complex
4
+ * visualisations reach for a charting library (Recharts, visx). These suffice
5
+ * for sparklines, KPI cards, and at-a-glance trends.
6
+ */
7
+ export interface ChartPoint {
8
+ x: string | number;
9
+ y: number;
10
+ }
11
+ export interface ChartProps {
12
+ data: ChartPoint[];
13
+ /** Defaults to 24px height per point + 60px padding. */
14
+ height?: number;
15
+ /** Defaults to fluid 100%. */
16
+ width?: number | string;
17
+ /** Tooltip / label rendered above the chart. */
18
+ caption?: ReactNode;
19
+ className?: string;
20
+ }
21
+ export declare function LineChart({ data, height, width, caption, className }: ChartProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function AreaChart({ data, height, width, caption, className }: ChartProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function BarChart({ data, height, width, caption, className }: ChartProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { ComponentPropsWithoutRef, HTMLAttributes } from 'react';
2
+ import { Drawer as DrawerPrimitive } from 'vaul';
3
+ export declare const Drawer: {
4
+ ({ shouldScaleBackground, ...props }: ComponentPropsWithoutRef<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ export declare const DrawerTrigger: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
8
+ export declare const DrawerPortal: typeof import('vaul').Portal;
9
+ export declare const DrawerClose: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
10
+ export declare const DrawerOverlay: import('react').ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogOverlayProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
11
+ export declare const DrawerContent: import('react').ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
12
+ export declare function DrawerHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
13
+ export declare function DrawerFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
14
+ export declare const DrawerTitle: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-dialog').DialogTitleProps & import('react').RefAttributes<HTMLHeadingElement>, "ref"> & import('react').RefAttributes<HTMLHeadingElement>>;
15
+ export declare const DrawerDescription: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-dialog').DialogDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>, "ref"> & import('react').RefAttributes<HTMLParagraphElement>>;
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ export interface FileUploadProps {
3
+ /** Accepted file types, e.g. `image/*` or `.pdf,.docx`. */
4
+ accept?: string;
5
+ /** Allow multiple files. */
6
+ multiple?: boolean;
7
+ /** Max file size in bytes. Files larger than this are rejected. */
8
+ maxSize?: number;
9
+ /** Controlled file list. */
10
+ value?: File[];
11
+ /** Called when files are added or removed. */
12
+ onChange?: (files: File[]) => void;
13
+ /** Helper text inside the drop zone. */
14
+ hint?: ReactNode;
15
+ /** Disable the picker entirely. */
16
+ disabled?: boolean;
17
+ className?: string;
18
+ }
19
+ /**
20
+ * Drag-and-drop file picker with an inline file list. Uncontrolled by default;
21
+ * pass `value` + `onChange` to control externally.
22
+ */
23
+ export declare const FileUpload: import('react').ForwardRefExoticComponent<FileUploadProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { VariantProps } from '../../lib/cva';
3
+ declare const snackbar: (props?: ({
4
+ variant?: "default" | "success" | "warning" | "danger" | "info" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export interface SnackbarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof snackbar> {
7
+ /** Headline. */
8
+ title?: ReactNode;
9
+ /** Action button rendered on the right. */
10
+ action?: ReactNode;
11
+ /** Show a close (×) button on the right. */
12
+ onClose?: () => void;
13
+ /** Override the variant's default icon. Pass `false` to hide. */
14
+ icon?: ReactNode | false;
15
+ }
16
+ /**
17
+ * Persistent inline notification. Unlike Toast, Snackbar does **not** auto-
18
+ * dismiss. Pair with an `action` button or an `onClose` handler.
19
+ */
20
+ export declare const Snackbar: import('react').ForwardRefExoticComponent<SnackbarProps & import('react').RefAttributes<HTMLDivElement>>;
21
+ export {};
@@ -0,0 +1,24 @@
1
+ export interface TagInputProps {
2
+ /** Controlled list of tags. */
3
+ value?: string[];
4
+ /** Default tags when uncontrolled. */
5
+ defaultValue?: string[];
6
+ /** Called when the tag list changes. */
7
+ onChange?: (tags: string[]) => void;
8
+ /** Placeholder shown inside the inline input. */
9
+ placeholder?: string;
10
+ /** Maximum number of tags. */
11
+ max?: number;
12
+ /** Disable the editor. */
13
+ disabled?: boolean;
14
+ /** Show a danger border. */
15
+ error?: boolean;
16
+ /** Treat these characters as separators (default: Enter + comma). */
17
+ separators?: string[];
18
+ className?: string;
19
+ }
20
+ /**
21
+ * Chip-based multi-value input. Press Enter or comma to add. Backspace on an
22
+ * empty input removes the last tag.
23
+ */
24
+ export declare const TagInput: import('react').ForwardRefExoticComponent<TagInputProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,23 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface TimelineProps extends HTMLAttributes<HTMLOListElement> {
3
+ }
4
+ export declare const Timeline: import('react').ForwardRefExoticComponent<TimelineProps & import('react').RefAttributes<HTMLOListElement>>;
5
+ export interface TimelineItemProps extends HTMLAttributes<HTMLLIElement> {
6
+ /** Optional bullet override. Default: small accent dot. */
7
+ bullet?: ReactNode;
8
+ /** Hide the connector line below this item — use for the last item. */
9
+ isLast?: boolean;
10
+ }
11
+ export declare const TimelineItem: import('react').ForwardRefExoticComponent<TimelineItemProps & import('react').RefAttributes<HTMLLIElement>>;
12
+ export declare function TimelineTime({ className, children }: {
13
+ className?: string;
14
+ children: ReactNode;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ export declare function TimelineTitle({ className, children, }: {
17
+ className?: string;
18
+ children: ReactNode;
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ export declare function TimelineDescription({ className, children, }: {
21
+ className?: string;
22
+ children: ReactNode;
23
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { ReactNode } from 'react';
2
+ export interface TreeNode {
3
+ id: string;
4
+ label: ReactNode;
5
+ /** If undefined the node is a leaf; if empty array it is an empty folder. */
6
+ children?: TreeNode[];
7
+ /** Optional custom icon (overrides default file/folder icons). */
8
+ icon?: ReactNode;
9
+ }
10
+ export interface TreeProps {
11
+ /** The root nodes. */
12
+ data: TreeNode[];
13
+ /** Ids to expand by default. */
14
+ defaultExpanded?: string[];
15
+ /** Currently selected node id. */
16
+ selectedId?: string;
17
+ onSelect?: (id: string) => void;
18
+ className?: string;
19
+ }
20
+ /**
21
+ * Expandable file-tree style list. Single selection. Keyboard a11y is
22
+ * handled at the row level (`tabIndex`, Enter, ArrowRight/Left to toggle).
23
+ */
24
+ export declare function Tree({ data, defaultExpanded, selectedId, onSelect, className }: TreeProps): import("react/jsx-runtime").JSX.Element;