@datacrest/dcuikit 1.0.32 → 1.0.36

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.
@@ -1,4 +1,16 @@
1
- export declare const DEFAULT_DATE_FORMAT = "PPP";
1
+ export declare const DEFAULT_DATE_FORMAT = "MM/dd/yyyy";
2
+ export declare const DATE_FORMATS: {
3
+ readonly US: "MM/dd/yyyy";
4
+ readonly EU: "dd/MM/yyyy";
5
+ readonly ISO: "yyyy-MM-dd";
6
+ readonly LONG: "MMMM d, yyyy";
7
+ readonly SHORT: "MMM d, yyyy";
8
+ readonly FULL: "EEEE, MMMM d, yyyy";
9
+ readonly COMPACT: "MM/dd/yy";
10
+ readonly WITH_TIME: "MM/dd/yyyy HH:mm";
11
+ readonly PPP: "PPP";
12
+ };
13
+ export declare const formatDate: (date: Date, formatString: string) => string;
2
14
  export declare const MONTH_OPTIONS: {
3
15
  id: string;
4
16
  label: string;
@@ -0,0 +1 @@
1
+ export declare const normalizeDate: (date: Date | undefined) => Date | undefined;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DialogProps } from './types';
3
3
  declare const Dialog: {
4
- ({ trigger, isOpen, closeOnOutsideClick, ...props }: DialogProps): React.JSX.Element;
4
+ ({ trigger, isOpen, closeOnOutsideClick, children, ...props }: DialogProps): React.JSX.Element;
5
5
  displayName: string;
6
6
  };
7
7
  export default Dialog;
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
2
  export interface DialogField {
3
3
  label: string;
4
4
  name: string;
@@ -9,7 +9,7 @@ export interface DialogField {
9
9
  }
10
10
  export interface BaseDialogProps {
11
11
  title: string;
12
- description: string;
12
+ description?: string;
13
13
  cancelText?: string;
14
14
  confirmText?: string;
15
15
  onConfirm?: (data?: Record<string, unknown>) => void;
@@ -23,11 +23,12 @@ export interface BaseDialogProps {
23
23
  className?: string;
24
24
  onClose?: () => void;
25
25
  fields?: DialogField[];
26
+ footer?: ReactNode;
26
27
  }
27
- export interface DialogProps extends BaseDialogProps {
28
- trigger: string;
28
+ export interface DialogProps extends BaseDialogProps, PropsWithChildren {
29
+ trigger: string | ReactNode;
29
30
  }
30
- export interface DialogContentProps extends BaseDialogProps {
31
+ export interface DialogContentProps extends BaseDialogProps, PropsWithChildren {
31
32
  onOpenChange: (open: boolean) => void;
32
33
  }
33
34
  export interface MockDialogPrimitiveProps extends PropsWithChildren {