@boxcustodia/library 1.8.5 → 1.9.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.
Files changed (4) hide show
  1. package/dist/index.cjs.js +104 -104
  2. package/dist/index.d.ts +17 -12
  3. package/dist/index.es.js +12041 -11871
  4. package/package.json +118 -118
package/dist/index.d.ts CHANGED
@@ -50,7 +50,7 @@ import { UseFormReturn } from 'react-hook-form';
50
50
  import { VariantProps } from 'class-variance-authority';
51
51
  import { z } from 'zod';
52
52
 
53
- export declare const AlertDialog: ({ title, description, trigger, onClose, onAction, variant, triggerProps, contentProps, headerProps, titleProps, descriptionProps, footerProps, closeProps, closeText, actionText, actionProps, ...props }: AlertDialogProps) => JSX.Element;
53
+ export declare const AlertDialog: ({ title, description, trigger, onClose, onAction, variant, triggerProps, contentProps, headerProps, titleProps, descriptionProps, footerProps, closeProps, closeText, actionText, actionProps, asChild, ...props }: AlertDialogProps) => JSX.Element;
54
54
 
55
55
  declare type AlertDialogProps = React.ComponentPropsWithoutRef<typeof DialogRoot> & {
56
56
  title?: React.ReactNode;
@@ -69,6 +69,7 @@ declare type AlertDialogProps = React.ComponentPropsWithoutRef<typeof DialogRoot
69
69
  actionProps?: ComponentProps<typeof DialogClose> & VariantProps<typeof Button>;
70
70
  closeText?: React.ReactNode;
71
71
  actionText?: React.ReactNode;
72
+ asChild?: boolean;
72
73
  };
73
74
 
74
75
  export declare type ArrayUnion<V, T extends ReadonlyArray<V>> = T[number];
@@ -182,7 +183,7 @@ declare type CalendarProps<T extends Mode> = CalendarModeProps<T> & NavigationPr
182
183
  className?: ClassName;
183
184
  };
184
185
 
185
- declare type CalendarProps_2<T extends Mode> = ComponentProps<typeof Calendar<T>>;
186
+ declare type CalendarProps_2 = ComponentProps<typeof Calendar<"single">>;
186
187
 
187
188
  export declare type CalendarState = {
188
189
  defaultStartDate: Date;
@@ -276,14 +277,14 @@ export declare type DateMatcher = DateSingle | DateRange | DateMultiple;
276
277
 
277
278
  export declare type DateMultiple = Date[];
278
279
 
279
- export declare const DatePicker: <T extends Mode = "single">(props: Props_8<T>) => JSX.Element;
280
+ export declare const DatePicker: (props: Props_8) => JSX.Element;
280
281
 
281
- export declare type DatePickerFooterProps<T extends Mode> = {
282
- mode: Mode;
283
- value: CalendarProps_2<T>["value"];
282
+ export declare type DatePickerFooterProps = {
283
+ mode: "single";
284
+ value: CalendarProps_2["value"];
284
285
  clear: () => void;
285
286
  selectToday: () => void;
286
- setValue: (value: CalendarProps_2<T>["value"]) => void;
287
+ setValue: (value: CalendarProps_2["value"]) => void;
287
288
  };
288
289
 
289
290
  export declare type DateRange = {
@@ -1089,12 +1090,14 @@ declare type Props_7<TItem extends Record<string, any>> = OverrideProps<Componen
1089
1090
  placeholder?: string;
1090
1091
  }>;
1091
1092
 
1092
- declare type Props_8<T extends Mode> = ComponentProps<"input"> & {
1093
- mode?: T;
1093
+ declare type Props_8 = ComponentProps<"input"> & {
1094
+ value?: Date | null;
1095
+ defaultValue?: Date | null;
1096
+ onChange?: (value: Date | null) => void;
1094
1097
  disabledDate?: (date: Date) => boolean;
1095
1098
  hideFooter?: boolean;
1096
- renderFooter?: (props: DatePickerFooterProps<T>) => ReactNode;
1097
- } & Omit<CalendarProps_2<T>, "disabled" | "mode">;
1099
+ renderFooter?: (props: DatePickerFooterProps) => ReactNode;
1100
+ };
1098
1101
 
1099
1102
  declare type Props_9 = ComponentPropsWithoutRef<typeof DialogRoot> & ExtendedProps_2 & {
1100
1103
  trigger?: ReactNode;
@@ -1422,7 +1425,9 @@ export declare const tagVariants: (props?: ({
1422
1425
 
1423
1426
  export declare const Textarea: ({ className, ...props }: TextAreaProps) => JSX.Element;
1424
1427
 
1425
- declare type TextAreaProps = HTMLProps<HTMLTextAreaElement>;
1428
+ declare type TextAreaProps = Omit<HTMLProps<HTMLTextAreaElement>, "onChange"> & {
1429
+ onChange?: (value: string) => void;
1430
+ };
1426
1431
 
1427
1432
  export declare type Theme = {
1428
1433
  Button?: ThemeProps<ComponentProps<typeof Button>, "asChild" | "loading">;