stratosphere-ui 0.2.4 → 0.2.6
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/dist/components/Form/Form.d.ts +4 -3
- package/dist/components/Form/FormCheckbox.d.ts +2 -3
- package/dist/components/Form/FormControl.d.ts +2 -3
- package/dist/components/Form/FormRadio.d.ts +2 -3
- package/dist/components/Form/FormSelect.d.ts +2 -3
- package/dist/components/TypeaheadSelect/TypeaheadSelect.d.ts +3 -3
- package/dist/components/TypeaheadSelect/useTypeaheadSelect.d.ts +1 -0
- package/dist/hooks/useFieldColor.d.ts +1 -1
- package/dist/stratosphere-ui.js +10964 -10497
- package/package.json +34 -36
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { HTMLProps, ReactNode } from 'react';
|
|
1
|
+
import { HTMLProps, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { FieldValues, SubmitHandler, UseFormReturn } from 'react-hook-form';
|
|
3
|
-
export interface FormProps<Values extends FieldValues> extends HTMLProps<HTMLFormElement> {
|
|
3
|
+
export interface FormProps<Values extends FieldValues> extends Omit<HTMLProps<HTMLFormElement>, 'ref'> {
|
|
4
4
|
children?: ReactNode;
|
|
5
|
+
formRef?: RefObject<HTMLFormElement>;
|
|
5
6
|
methods: UseFormReturn<Values>;
|
|
6
7
|
onFormSubmit?: SubmitHandler<Values>;
|
|
7
8
|
}
|
|
8
|
-
export declare const Form: <Values extends FieldValues>({ children, methods, onFormSubmit, ...props }: FormProps<Values>) => JSX.Element;
|
|
9
|
+
export declare const Form: <Values extends FieldValues>({ children, formRef, methods, onFormSubmit, ...props }: FormProps<Values>) => JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { CheckboxProps } from 'react-daisyui';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { FormFieldProps } from './types';
|
|
5
5
|
export interface FormCheckboxProps<Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'placeholder'>, Omit<CheckboxProps, 'name'> {
|
|
6
|
-
inputRef?: RefObject<HTMLInputElement>;
|
|
7
6
|
}
|
|
8
|
-
export declare const FormCheckbox: <Values extends FieldValues>({ children, className, color, controllerProps,
|
|
7
|
+
export declare const FormCheckbox: <Values extends FieldValues>({ children, className, color, controllerProps, isRequired, labelText, name, showDirty, ...props }: FormCheckboxProps<Values>) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { InputProps } from 'react-daisyui';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { FormFieldProps } from './types';
|
|
@@ -8,7 +8,6 @@ export interface FormControlProps<Values extends FieldValues, TOutput> extends F
|
|
|
8
8
|
elementRight?: ReactNode;
|
|
9
9
|
hideErrorMessage?: boolean;
|
|
10
10
|
inputClassName?: string;
|
|
11
|
-
inputRef?: RefObject<HTMLInputElement>;
|
|
12
11
|
transform?: Transform<TOutput>;
|
|
13
12
|
}
|
|
14
|
-
export declare const FormControl: <Values extends FieldValues, TOutput>({ className, color, controllerProps, elementLeft, elementRight, hideErrorMessage, inputClassName,
|
|
13
|
+
export declare const FormControl: <Values extends FieldValues, TOutput>({ className, color, controllerProps, elementLeft, elementRight, hideErrorMessage, inputClassName, isRequired, labelText, name, showDirty, transform, ...props }: FormControlProps<Values, TOutput>) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { RadioProps } from 'react-daisyui';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { FormFieldProps } from './types';
|
|
@@ -8,7 +8,6 @@ export interface RadioOption {
|
|
|
8
8
|
value: string;
|
|
9
9
|
}
|
|
10
10
|
export interface FormRadioProps<Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'placeholder'>, Omit<RadioProps, 'name'> {
|
|
11
|
-
inputRef?: RefObject<HTMLInputElement>;
|
|
12
11
|
options: RadioOption[];
|
|
13
12
|
}
|
|
14
|
-
export declare const FormRadio: <Values extends FieldValues>({ className, color, controllerProps,
|
|
13
|
+
export declare const FormRadio: <Values extends FieldValues>({ className, color, controllerProps, isRequired, labelText, name, options, showDirty, ...props }: FormRadioProps<Values>) => JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ComponentProps, FC
|
|
1
|
+
import { ComponentProps, FC } from 'react';
|
|
2
2
|
import { ComponentColor } from 'react-daisyui/dist/types';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { FormFieldProps } from './types';
|
|
5
5
|
import { GenericDataType } from '../../common';
|
|
6
6
|
export interface FormSelectProps<DataItem extends GenericDataType, Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'controllerProps' | 'placeholder' | 'showDirty'> {
|
|
7
7
|
buttonColor?: ComponentColor;
|
|
8
|
-
buttonRef?: RefObject<HTMLButtonElement>;
|
|
9
8
|
className?: string;
|
|
10
9
|
defaultOptionId?: string;
|
|
11
10
|
dropdownIcon?: FC<ComponentProps<'svg'>>;
|
|
@@ -15,4 +14,4 @@ export interface FormSelectProps<DataItem extends GenericDataType, Values extend
|
|
|
15
14
|
options: DataItem[];
|
|
16
15
|
showDirty?: boolean;
|
|
17
16
|
}
|
|
18
|
-
export declare const FormSelect: <DataItem extends GenericDataType, Values extends FieldValues>({ buttonColor,
|
|
17
|
+
export declare const FormSelect: <DataItem extends GenericDataType, Values extends FieldValues>({ buttonColor, className, defaultOptionId, dropdownIcon, getItemText, getItemValue, isRequired, labelText, menuClassName, name, options, showDirty, }: FormSelectProps<DataItem, Values>) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyboardEventHandler } from 'react';
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
3
|
import { FormFieldProps } from '../Form';
|
|
4
4
|
import { GenericDataType } from '../../common';
|
|
@@ -10,8 +10,8 @@ export interface TypeaheadSelectProps<DataItem extends GenericDataType, Values e
|
|
|
10
10
|
getItemText: (data: DataItem) => string;
|
|
11
11
|
getItemValue?: (data: DataItem) => string;
|
|
12
12
|
inputPlaceholder?: string;
|
|
13
|
-
inputRef?: RefObject<HTMLInputElement>;
|
|
14
13
|
menuClassName?: string;
|
|
15
14
|
multi?: true;
|
|
15
|
+
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
|
|
16
16
|
}
|
|
17
|
-
export declare const TypeaheadSelect: <DataItem extends GenericDataType, Values extends FieldValues>({ className, controllerProps, debounceTime, defaultOptions, disableSingleSelectBadge, getBadgeText, getItemText, getItemValue, inputPlaceholder,
|
|
17
|
+
export declare const TypeaheadSelect: <DataItem extends GenericDataType, Values extends FieldValues>({ className, controllerProps, debounceTime, defaultOptions, disableSingleSelectBadge, getBadgeText, getItemText, getItemValue, inputPlaceholder, isRequired, labelText, menuClassName, multi, name, onDebouncedChange, onKeyDown, options, placeholder, showDirty, }: TypeaheadSelectProps<DataItem, Values>) => JSX.Element;
|
|
@@ -9,6 +9,7 @@ export declare const useTypeaheadSelect: <DropdownElement extends HTMLElement, D
|
|
|
9
9
|
error: import("react-hook-form").FieldError | undefined;
|
|
10
10
|
isLoading: boolean;
|
|
11
11
|
query: string;
|
|
12
|
+
ref: import("react-hook-form").RefCallBack;
|
|
12
13
|
showDropdown: boolean;
|
|
13
14
|
searchInputRef: import("react").MutableRefObject<HTMLInputElement | null>;
|
|
14
15
|
selectedItems: DataItem[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FieldPath, FieldValues } from 'react-hook-form';
|
|
2
|
-
export declare const useFieldColor: <Values extends FieldValues>(name:
|
|
2
|
+
export declare const useFieldColor: <Values extends FieldValues>(name: FieldPath<Values>, showDirty?: boolean) => "success" | "error" | null;
|