@pdg/react-form 1.0.2 → 1.0.4

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,4 @@
1
+ import React from 'react';
2
+ import { PrivateAlertDialogProps as Props } from './PrivateAlertDialog.types';
3
+ declare const PrivateAlertDialog: React.FC<Props>;
4
+ export default PrivateAlertDialog;
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PrivateAlertDialogProps {
3
+ title?: ReactNode;
4
+ content?: ReactNode;
5
+ open?: boolean;
6
+ onClose?: () => void;
7
+ }
8
+ export declare const PrivateAlertDialogDefaultProps: {};
@@ -0,0 +1,4 @@
1
+ import PrivateAlertDialog from './PrivateAlertDialog';
2
+ export default PrivateAlertDialog;
3
+ export { PrivateAlertDialog };
4
+ export * from './PrivateAlertDialog.types';
@@ -1,3 +1,4 @@
1
1
  export * from './PrivateDatePicker';
2
2
  export * from './PrivateStaticDatePicker';
3
3
  export * from './PrivateStyledTooltip';
4
+ export * from './PrivateAlertDialog';
@@ -19,7 +19,7 @@ export interface FormValueMap {
19
19
  [key: string]: FormValue;
20
20
  }
21
21
  export interface FormValueItemBaseCommands<ValueType = FormItemValue> {
22
- getType(): 'default' | 'FormCheckbox' | 'FormToggleButtonGroup' | 'FormRadioGroup' | 'FormRating' | 'FormTextEditor' | 'FormAutocomplete' | 'FormDatePicker' | 'FormDateTimePicker' | 'FormTimePicker' | 'FormDateRangePicker';
22
+ getType(): 'default' | 'FormCheckbox' | 'FormToggleButtonGroup' | 'FormRadioGroup' | 'FormRating' | 'FormTextEditor' | 'FormAutocomplete' | 'FormDatePicker' | 'FormDateTimePicker' | 'FormTimePicker' | 'FormDateRangePicker' | 'FormFile';
23
23
  getName(): string;
24
24
  getReset(): ValueType;
25
25
  reset(): void;
@@ -0,0 +1 @@
1
+ export declare function getFileSizeText(bytes: number, dp?: number): string;
@@ -3,3 +3,4 @@ declare const nextTick: (callback: () => void) => void;
3
3
  export { ll, nextTick };
4
4
  export * from './compare';
5
5
  export * from './date_time';
6
+ export * from './file';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { FormFileProps as Props, FormFileCommands } from './FormFile.types';
3
+ import './FormFile.scss';
4
+ declare const FormFile: React.ForwardRefExoticComponent<Props & React.RefAttributes<FormFileCommands>>;
5
+ export default FormFile;
@@ -0,0 +1,15 @@
1
+ import { CommonSxProps, FormValueItemCommands, FormValueItemProps } from '../../@types';
2
+ import { ReactNode } from 'react';
3
+ export interface FormFileProps extends CommonSxProps, Omit<FormValueItemProps, 'readOnly'> {
4
+ required?: boolean;
5
+ accept?: string;
6
+ hideUrl?: boolean;
7
+ hideLink?: boolean;
8
+ labelShrink?: boolean;
9
+ maxFileSize?: number;
10
+ preview?: ReactNode;
11
+ onFile?(file: File): Promise<string>;
12
+ onLink?(url: string): Promise<string>;
13
+ }
14
+ export declare const FormFileDefaultProps: {};
15
+ export declare type FormFileCommands = FormValueItemCommands;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { LinkDialogProps as Props } from './LinkDialog.types';
3
+ declare const LinkDialog: React.FC<Props>;
4
+ export default LinkDialog;
@@ -0,0 +1,7 @@
1
+ export interface LinkDialogProps {
2
+ open?: boolean;
3
+ onConfirm?: (url: string) => void;
4
+ onCancel?: () => void;
5
+ onClose?: () => void;
6
+ }
7
+ export declare const LinkDialogDefaultProps: {};
@@ -0,0 +1,4 @@
1
+ import FormFile from './FormFile';
2
+ export default FormFile;
3
+ export { FormFile };
4
+ export * from './FormFile.types';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { FormImageFileProps as Props } from './FormImageFile.types';
3
+ import './FormImageFile.scss';
4
+ declare const FormImageFile: React.ForwardRefExoticComponent<Props & React.RefAttributes<import("../FormFile").FormFileCommands>>;
5
+ export default FormImageFile;
@@ -0,0 +1,12 @@
1
+ import { FormFileCommands, FormFileProps } from '../FormFile';
2
+ export interface FormImageFileMaxImageSize {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ export interface FormImageFileProps extends Omit<FormFileProps, 'preview'> {
7
+ maxImageSize?: FormImageFileMaxImageSize | FormImageFileMaxImageSize[];
8
+ preview?: boolean;
9
+ previewMaxHeight?: number;
10
+ }
11
+ export declare const FormImageFileDefaultProps: Pick<FormImageFileProps, 'accept'>;
12
+ export declare type FormImageFileCommands = FormFileCommands;
@@ -0,0 +1,4 @@
1
+ import FormImageFile from './FormImageFile';
2
+ export default FormImageFile;
3
+ export { FormImageFile };
4
+ export * from './FormImageFile.types';
@@ -15,4 +15,5 @@ export interface FormItemBaseProps extends CommonSxProps, PartialPick<FormContex
15
15
  helperText?: ReactNode;
16
16
  helperTextProps?: FormHelperTextProps;
17
17
  error?: boolean;
18
+ hideLabel?: boolean;
18
19
  }
@@ -8,3 +8,5 @@ export * from './FormDatePicker';
8
8
  export * from './FormDateTimePicker';
9
9
  export * from './FormTimePicker';
10
10
  export * from './FormDateRangePicker';
11
+ export * from './FormFile';
12
+ export * from './FormImageFile';