@blencm/ui 0.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/LICENSE +21 -0
- package/README.md +128 -0
- package/bin/blencm-ui.mjs +99 -0
- package/dist/components/Accordion/accordin.test.d.ts +1 -0
- package/dist/components/Accordion/accordion.d.ts +7 -0
- package/dist/components/Button/button.d.ts +26 -0
- package/dist/components/Button/button.test.d.ts +1 -0
- package/dist/components/Button/icon-button.d.ts +26 -0
- package/dist/components/Form/form-checkbox.d.ts +27 -0
- package/dist/components/Form/form-component.d.ts +44 -0
- package/dist/components/Form/form-date.d.ts +60 -0
- package/dist/components/Form/form-field.d.ts +33 -0
- package/dist/components/Form/form-select.d.ts +43 -0
- package/dist/components/Form/form-textarea.d.ts +31 -0
- package/dist/components/Form/form-time.d.ts +59 -0
- package/dist/components/Form/form.d.ts +11 -0
- package/dist/components/Form/form.test.d.ts +1 -0
- package/dist/components/Label/label.d.ts +5 -0
- package/dist/components/Label/label.test.d.ts +1 -0
- package/dist/components/alert-dialog.d.ts +20 -0
- package/dist/components/alert.d.ts +8 -0
- package/dist/components/aspect-ratio.d.ts +3 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/breadcrumb.d.ts +19 -0
- package/dist/components/calendar.d.ts +8 -0
- package/dist/components/card.d.ts +8 -0
- package/dist/components/carousel.d.ts +34 -0
- package/dist/components/checkbox.d.ts +12 -0
- package/dist/components/collapsible.d.ts +5 -0
- package/dist/components/command.d.ts +82 -0
- package/dist/components/context-menu.d.ts +27 -0
- package/dist/components/dialog.d.ts +19 -0
- package/dist/components/drawer.d.ts +22 -0
- package/dist/components/dropdown-menu.d.ts +27 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/icons.d.ts +2 -0
- package/dist/components/input-otp.d.ts +36 -0
- package/dist/components/input.d.ts +15 -0
- package/dist/components/menubar.d.ts +28 -0
- package/dist/components/modal.d.ts +11 -0
- package/dist/components/navigation-menu.d.ts +12 -0
- package/dist/components/pagination.d.ts +36 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/resizable.d.ts +8 -0
- package/dist/components/scroll-area.d.ts +5 -0
- package/dist/components/scroll-view.d.ts +21 -0
- package/dist/components/search-input.d.ts +9 -0
- package/dist/components/searchable-select.d.ts +33 -0
- package/dist/components/select.d.ts +69 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/sheet.d.ts +25 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/sonner.d.ts +5 -0
- package/dist/components/switch.d.ts +4 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/tabs.d.ts +7 -0
- package/dist/components/textarea.d.ts +13 -0
- package/dist/components/toast.d.ts +15 -0
- package/dist/components/toaster.d.ts +2 -0
- package/dist/components/toggle-group.d.ts +12 -0
- package/dist/components/toggle.d.ts +12 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/ui/input.d.ts +14 -0
- package/dist/components/ui/select.d.ts +37 -0
- package/dist/components/ui/ui-checkbox.d.ts +17 -0
- package/dist/components/ui/ui-date.d.ts +44 -0
- package/dist/components/ui/ui-textarea.d.ts +14 -0
- package/dist/components/ui/ui-time.d.ts +58 -0
- package/dist/components/use-toast.d.ts +44 -0
- package/dist/helper/time.d.ts +1 -0
- package/dist/hooks/use-sidebar.d.ts +8 -0
- package/dist/index.cjs +12723 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.js +12514 -0
- package/dist/interface/icon.d.ts +30 -0
- package/dist/shared/alert-modal.d.ts +15 -0
- package/dist/shared/breadcrumbs.d.ts +14 -0
- package/dist/shared/data-table-skeleton.d.ts +10 -0
- package/dist/shared/data-table.d.ts +175 -0
- package/dist/shared/dropzone.d.ts +19 -0
- package/dist/shared/fileupload.d.ts +15 -0
- package/dist/shared/heading.d.ts +7 -0
- package/dist/shared/page-head.d.ts +5 -0
- package/dist/shared/pagination-section.d.ts +8 -0
- package/dist/style.css +4350 -0
- package/dist/types/input.d.ts +4 -0
- package/dist/types/select.d.ts +4 -0
- package/dist/utils/date-formats.d.ts +387 -0
- package/dist/utils/form-utils.d.ts +43 -0
- package/dist/utils/time-formats.d.ts +157 -0
- package/dist/utils/utils.d.ts +2 -0
- package/package.json +210 -0
- package/templates/vscode-settings.json +11 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type CustomSize, type SizeProps, type VariantProps } from "../utils/form-utils";
|
|
3
|
+
type SearchableSelectOption<TData = unknown> = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
keywords?: string;
|
|
8
|
+
data?: TData;
|
|
9
|
+
};
|
|
10
|
+
type SearchableSelectProps<TData = unknown> = {
|
|
11
|
+
items: SearchableSelectOption<TData>[];
|
|
12
|
+
value?: string;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
onValueChange?: (value: string, item?: SearchableSelectOption<TData>) => void;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
searchPlaceholder?: string;
|
|
17
|
+
emptyText?: React.ReactNode;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
name?: string;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
invalid?: boolean;
|
|
22
|
+
size?: SizeProps;
|
|
23
|
+
customSize?: CustomSize;
|
|
24
|
+
variant?: VariantProps;
|
|
25
|
+
classNameDefault?: boolean;
|
|
26
|
+
triggerClassName?: string;
|
|
27
|
+
contentClassName?: string;
|
|
28
|
+
itemClassName?: string;
|
|
29
|
+
searchInputClassName?: string;
|
|
30
|
+
};
|
|
31
|
+
declare function SearchableSelectBase<TData = unknown>({ items, value, defaultValue, onValueChange, placeholder, searchPlaceholder, emptyText, disabled, name, required, invalid, size, customSize, variant, classNameDefault, triggerClassName, contentClassName, itemClassName, searchInputClassName, }: SearchableSelectProps<TData>): React.JSX.Element;
|
|
32
|
+
declare const SearchableSelect: typeof SearchableSelectBase;
|
|
33
|
+
export { SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type CustomSize, type SizeProps, type VariantProps } from "../utils/form-utils";
|
|
3
|
+
type SelectAlign = "start" | "center" | "end";
|
|
4
|
+
export type SelectProps = {
|
|
5
|
+
value?: string;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onValueChange?: (value: string) => void;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
name?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
variant?: VariantProps;
|
|
15
|
+
size?: SizeProps;
|
|
16
|
+
customSize?: CustomSize;
|
|
17
|
+
invalid?: boolean;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
declare function Select({ value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, disabled, name, required, variant, size, customSize, invalid, children, }: SelectProps): React.JSX.Element;
|
|
21
|
+
export type SelectTriggerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & {
|
|
22
|
+
variant?: VariantProps;
|
|
23
|
+
size?: SizeProps;
|
|
24
|
+
customSize?: CustomSize;
|
|
25
|
+
invalid?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & {
|
|
28
|
+
variant?: VariantProps;
|
|
29
|
+
size?: SizeProps;
|
|
30
|
+
customSize?: CustomSize;
|
|
31
|
+
invalid?: boolean;
|
|
32
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
export type SelectValueProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
34
|
+
placeholder?: React.ReactNode;
|
|
35
|
+
};
|
|
36
|
+
declare const SelectValue: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
|
|
37
|
+
placeholder?: React.ReactNode;
|
|
38
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
39
|
+
export type SelectContentProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
40
|
+
position?: "popper";
|
|
41
|
+
sideOffset?: number;
|
|
42
|
+
align?: SelectAlign;
|
|
43
|
+
};
|
|
44
|
+
declare const SelectContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
45
|
+
position?: "popper";
|
|
46
|
+
sideOffset?: number;
|
|
47
|
+
align?: SelectAlign;
|
|
48
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
export type SelectGroupProps = React.HTMLAttributes<HTMLDivElement>;
|
|
50
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
export type SelectLabelProps = React.HTMLAttributes<HTMLDivElement>;
|
|
52
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
export type SelectItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> & {
|
|
54
|
+
value: string;
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
textValue?: string;
|
|
57
|
+
size?: SizeProps;
|
|
58
|
+
customSize?: CustomSize;
|
|
59
|
+
};
|
|
60
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> & {
|
|
61
|
+
value: string;
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
textValue?: string;
|
|
64
|
+
size?: SizeProps;
|
|
65
|
+
customSize?: CustomSize;
|
|
66
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
export type SelectSeparatorProps = React.HTMLAttributes<HTMLDivElement>;
|
|
68
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<SelectSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const Sheet: typeof SheetPrimitive.Root;
|
|
5
|
+
declare const SheetTrigger: typeof SheetPrimitive.Trigger;
|
|
6
|
+
declare const SheetClose: typeof SheetPrimitive.Close;
|
|
7
|
+
declare const SheetPortal: typeof SheetPrimitive.Portal;
|
|
8
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const sheetVariants: (props?: ({
|
|
10
|
+
side?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
|
+
}
|
|
14
|
+
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare function SheetHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
16
|
+
declare namespace SheetHeader {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
declare function SheetFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
20
|
+
declare namespace SheetFooter {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
24
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
25
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export { Slider };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Toaster as Sonner } from 'sonner';
|
|
3
|
+
export type SonnerToasterProps = React.ComponentProps<typeof Sonner>;
|
|
4
|
+
declare const ToasterSonner: ({ ...props }: SonnerToasterProps) => React.JSX.Element;
|
|
5
|
+
export { ToasterSonner, ToasterSonner as SonnerToaster };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Switch };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & {
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
} & React.RefAttributes<HTMLTableElement>>;
|
|
5
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
7
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
8
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
9
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
10
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
11
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
12
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Tabs: typeof TabsPrimitive.Root;
|
|
4
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type CustomSize, type SizeProps, type VariantProps } from "../utils/form-utils";
|
|
3
|
+
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> {
|
|
4
|
+
size?: SizeProps;
|
|
5
|
+
customSize?: CustomSize;
|
|
6
|
+
variant?: VariantProps;
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
classNameDefault?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
13
|
+
export { Textarea };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const ToastProvider: typeof ToastPrimitives.Provider;
|
|
5
|
+
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
+
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
7
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
|
|
9
|
+
declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
14
|
+
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
15
|
+
export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, type ToastActionElement, type ToastProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "lg" | "sm" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "default" | "lg" | "sm" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const toggleVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "lg" | "sm" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "default" | "lg" | "sm" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const TooltipProvider: typeof TooltipPrimitive.Provider;
|
|
4
|
+
declare const Tooltip: typeof TooltipPrimitive.Root;
|
|
5
|
+
declare const TooltipTrigger: typeof TooltipPrimitive.Trigger;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type InputProps } from '../input';
|
|
3
|
+
export interface UiInputProps extends Omit<InputProps, 'id'> {
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
errorMessage?: string;
|
|
6
|
+
htmlFormItemId?: string;
|
|
7
|
+
requiredLabel?: boolean;
|
|
8
|
+
requiredLabelClassName?: string;
|
|
9
|
+
containerClassName?: string;
|
|
10
|
+
labelClassName?: string;
|
|
11
|
+
messageClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const UiInput: React.ForwardRefExoticComponent<UiInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
export { UiInput };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type CustomSize, type SizeProps, type VariantProps } from "../../utils/form-utils";
|
|
3
|
+
export type UiSelectOption<TData = unknown> = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
data?: TData;
|
|
8
|
+
};
|
|
9
|
+
export interface UiSelectProps<TData = unknown> {
|
|
10
|
+
label?: React.ReactNode;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
onChange?: (value: string) => void;
|
|
15
|
+
items?: UiSelectOption<TData>[];
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
requiredLabel?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
selectClassName?: string;
|
|
21
|
+
labelClassName?: string;
|
|
22
|
+
contentClassName?: string;
|
|
23
|
+
itemClassName?: string;
|
|
24
|
+
messageClassName?: string;
|
|
25
|
+
requiredLabelClassName?: string;
|
|
26
|
+
size?: SizeProps;
|
|
27
|
+
customSize?: CustomSize;
|
|
28
|
+
variant?: VariantProps;
|
|
29
|
+
classNameDefault?: boolean;
|
|
30
|
+
errorMessage?: string;
|
|
31
|
+
htmlFormItemId?: string;
|
|
32
|
+
position?: "popper";
|
|
33
|
+
contentAlign?: "start" | "center" | "end";
|
|
34
|
+
contentSideOffset?: number;
|
|
35
|
+
}
|
|
36
|
+
declare function UiSelect<TData = unknown>({ label, placeholder, value, defaultValue, onChange, items, children, disabled, requiredLabel, className, selectClassName, labelClassName, contentClassName, itemClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, htmlFormItemId, position, contentAlign, contentSideOffset, }: UiSelectProps<TData>): React.JSX.Element;
|
|
37
|
+
export { UiSelect };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type CheckboxProps } from "../checkbox";
|
|
3
|
+
export interface UiCheckboxProps extends CheckboxProps {
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
errorMessage?: string;
|
|
7
|
+
containerClassName?: string;
|
|
8
|
+
contentClassName?: string;
|
|
9
|
+
labelClassName?: string;
|
|
10
|
+
descriptionClassName?: string;
|
|
11
|
+
errorClassName?: string;
|
|
12
|
+
requiredLabelClassName?: string;
|
|
13
|
+
requiredLabel?: boolean;
|
|
14
|
+
htmlFormItemId?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const UiCheckbox: React.ForwardRefExoticComponent<UiCheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export { UiCheckbox };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Locale } from "date-fns";
|
|
3
|
+
import { type CustomSize, type SizeProps, type VariantProps } from "../../utils/form-utils";
|
|
4
|
+
import { type DateFormatValue } from "../../utils/date-formats";
|
|
5
|
+
type DateInputValue = Date | string | null | undefined;
|
|
6
|
+
export interface UiDateProps {
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
value?: Date | string | null;
|
|
10
|
+
defaultMonth?: Date;
|
|
11
|
+
onChange?: (date: Date | undefined) => void;
|
|
12
|
+
onBlur?: () => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
requiredLabel?: boolean;
|
|
15
|
+
start_date?: DateInputValue;
|
|
16
|
+
end_date?: DateInputValue;
|
|
17
|
+
startDate?: DateInputValue;
|
|
18
|
+
endDate?: DateInputValue;
|
|
19
|
+
dateFormat?: DateFormatValue;
|
|
20
|
+
valueFormat?: DateFormatValue;
|
|
21
|
+
formatPattern?: string;
|
|
22
|
+
valueFormatPattern?: string;
|
|
23
|
+
locale?: Locale | null;
|
|
24
|
+
className?: string;
|
|
25
|
+
classNameDefault?: boolean;
|
|
26
|
+
dateClassName?: string;
|
|
27
|
+
labelClassName?: string;
|
|
28
|
+
contentClassName?: string;
|
|
29
|
+
messageClassName?: string;
|
|
30
|
+
requiredLabelClassName?: string;
|
|
31
|
+
size?: SizeProps;
|
|
32
|
+
customSize?: CustomSize;
|
|
33
|
+
variant?: VariantProps;
|
|
34
|
+
errorMessage?: string;
|
|
35
|
+
invalid?: boolean;
|
|
36
|
+
htmlFormItemId?: string;
|
|
37
|
+
contentAlign?: "start" | "center" | "end";
|
|
38
|
+
contentSideOffset?: number;
|
|
39
|
+
}
|
|
40
|
+
declare function UiDate({ label, placeholder, value, defaultMonth, onChange, onBlur, disabled, requiredLabel, start_date, end_date, startDate, endDate, dateFormat, valueFormat, formatPattern, valueFormatPattern, locale, className, classNameDefault, dateClassName, labelClassName, contentClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiDateProps): React.JSX.Element;
|
|
41
|
+
declare namespace UiDate {
|
|
42
|
+
var displayName: string;
|
|
43
|
+
}
|
|
44
|
+
export { UiDate };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type TextareaProps } from "../textarea";
|
|
3
|
+
export interface UiTextareaProps extends Omit<TextareaProps, "id"> {
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
errorMessage?: string;
|
|
6
|
+
htmlFormItemId?: string;
|
|
7
|
+
requiredLabel?: boolean;
|
|
8
|
+
requiredLabelClassName?: string;
|
|
9
|
+
containerClassName?: string;
|
|
10
|
+
labelClassName?: string;
|
|
11
|
+
messageClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const UiTextarea: React.ForwardRefExoticComponent<UiTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
14
|
+
export { UiTextarea };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Locale } from "date-fns";
|
|
3
|
+
import { type CustomSize, type SizeProps, type VariantProps } from "../../utils/form-utils";
|
|
4
|
+
import { type TimeFormatValue } from "../../utils/time-formats";
|
|
5
|
+
export type UiTimeOption = {
|
|
6
|
+
value: string;
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type HourCycle = "12" | "24";
|
|
11
|
+
export interface UiTimeProps {
|
|
12
|
+
label?: React.ReactNode;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
value?: Date | string | null;
|
|
15
|
+
onChange?: (date: Date | undefined) => void;
|
|
16
|
+
onBlur?: () => void;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
requiredLabel?: boolean;
|
|
19
|
+
timeFormat?: TimeFormatValue;
|
|
20
|
+
valueFormat?: TimeFormatValue;
|
|
21
|
+
formatPattern?: string;
|
|
22
|
+
valueFormatPattern?: string;
|
|
23
|
+
locale?: Locale;
|
|
24
|
+
/**
|
|
25
|
+
* 1 = selector minuto por minuto.
|
|
26
|
+
* 5, 10, 15, 30 también funcionan.
|
|
27
|
+
*/
|
|
28
|
+
minuteStep?: number;
|
|
29
|
+
minTime?: string;
|
|
30
|
+
maxTime?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Si envías options, se renderiza como lista simple.
|
|
33
|
+
* Para el picker tipo imagen, no mandes options.
|
|
34
|
+
*/
|
|
35
|
+
options?: UiTimeOption[];
|
|
36
|
+
hourCycle?: HourCycle;
|
|
37
|
+
className?: string;
|
|
38
|
+
classNameDefault?: boolean;
|
|
39
|
+
timeClassName?: string;
|
|
40
|
+
labelClassName?: string;
|
|
41
|
+
contentClassName?: string;
|
|
42
|
+
optionClassName?: string;
|
|
43
|
+
messageClassName?: string;
|
|
44
|
+
requiredLabelClassName?: string;
|
|
45
|
+
size?: SizeProps;
|
|
46
|
+
customSize?: CustomSize;
|
|
47
|
+
variant?: VariantProps;
|
|
48
|
+
errorMessage?: string;
|
|
49
|
+
invalid?: boolean;
|
|
50
|
+
htmlFormItemId?: string;
|
|
51
|
+
contentAlign?: "start" | "center" | "end";
|
|
52
|
+
contentSideOffset?: number;
|
|
53
|
+
}
|
|
54
|
+
declare function UiTime({ label, placeholder, value, onChange, onBlur, disabled, requiredLabel, timeFormat, valueFormat, formatPattern, valueFormatPattern, locale, minuteStep, minTime, maxTime, options, hourCycle, className, classNameDefault, timeClassName, labelClassName, contentClassName, optionClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiTimeProps): React.JSX.Element;
|
|
55
|
+
declare namespace UiTime {
|
|
56
|
+
var displayName: string;
|
|
57
|
+
}
|
|
58
|
+
export { UiTime };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ToastActionElement, ToastProps } from './toast';
|
|
3
|
+
type ToasterToast = ToastProps & {
|
|
4
|
+
id: string;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
action?: ToastActionElement;
|
|
8
|
+
};
|
|
9
|
+
declare const actionTypes: {
|
|
10
|
+
readonly ADD_TOAST: 'ADD_TOAST';
|
|
11
|
+
readonly UPDATE_TOAST: 'UPDATE_TOAST';
|
|
12
|
+
readonly DISMISS_TOAST: 'DISMISS_TOAST';
|
|
13
|
+
readonly REMOVE_TOAST: 'REMOVE_TOAST';
|
|
14
|
+
};
|
|
15
|
+
type ActionType = typeof actionTypes;
|
|
16
|
+
type Action = {
|
|
17
|
+
type: ActionType['ADD_TOAST'];
|
|
18
|
+
toast: ToasterToast;
|
|
19
|
+
} | {
|
|
20
|
+
type: ActionType['UPDATE_TOAST'];
|
|
21
|
+
toast: Partial<ToasterToast>;
|
|
22
|
+
} | {
|
|
23
|
+
type: ActionType['DISMISS_TOAST'];
|
|
24
|
+
toastId?: ToasterToast['id'];
|
|
25
|
+
} | {
|
|
26
|
+
type: ActionType['REMOVE_TOAST'];
|
|
27
|
+
toastId?: ToasterToast['id'];
|
|
28
|
+
};
|
|
29
|
+
interface State {
|
|
30
|
+
toasts: ToasterToast[];
|
|
31
|
+
}
|
|
32
|
+
export declare const reducer: (state: State, action: Action) => State;
|
|
33
|
+
type Toast = Omit<ToasterToast, 'id'>;
|
|
34
|
+
declare function toast({ ...props }: Toast): {
|
|
35
|
+
id: string;
|
|
36
|
+
dismiss: () => void;
|
|
37
|
+
update: (props: ToasterToast) => void;
|
|
38
|
+
};
|
|
39
|
+
declare function useToast(): {
|
|
40
|
+
toasts: ToasterToast[];
|
|
41
|
+
toast: typeof toast;
|
|
42
|
+
dismiss: (toastId?: string) => void;
|
|
43
|
+
};
|
|
44
|
+
export { useToast, toast };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSameHourMinute(first?: Date, second?: Date): boolean;
|