stratosphere-ui 0.1.17 → 0.1.19
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 +1 -1
- package/dist/components/Form/FormCheckbox.d.ts +6 -6
- package/dist/components/Form/FormControl.d.ts +1 -1
- package/dist/components/Form/FormRadio.d.ts +6 -8
- package/dist/components/Form/FormSelect.d.ts +2 -2
- package/dist/components/Form/FormToggleSwitch.d.ts +4 -6
- package/dist/components/Form/types.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +4 -7
- package/dist/components/TypeaheadSelect/TypeaheadSelect.d.ts +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useFieldColor.d.ts +2 -0
- package/dist/stratosphere-ui.js +12326 -11790
- package/package.json +3 -1
|
@@ -3,6 +3,6 @@ import { FieldValues, SubmitHandler, UseFormReturn } from 'react-hook-form';
|
|
|
3
3
|
export interface FormProps<Values extends FieldValues> extends HTMLProps<HTMLFormElement> {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
methods: UseFormReturn<Values>;
|
|
6
|
-
onFormSubmit
|
|
6
|
+
onFormSubmit?: SubmitHandler<Values>;
|
|
7
7
|
}
|
|
8
8
|
export declare const Form: <Values extends FieldValues>({ children, methods, onFormSubmit, ...props }: FormProps<Values>) => JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
2
|
import { CheckboxProps } from 'react-daisyui';
|
|
3
|
-
import { FieldValues
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from './types';
|
|
5
|
+
export interface FormCheckboxProps<Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'placeholder'>, Omit<CheckboxProps, 'color' | 'name'> {
|
|
6
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
7
7
|
}
|
|
8
|
-
export declare const FormCheckbox: <Values extends FieldValues>({ children,
|
|
8
|
+
export declare const FormCheckbox: <Values extends FieldValues>({ children, className, controllerProps, inputRef, isRequired, labelText, name, showDirty, ...props }: FormCheckboxProps<Values>) => JSX.Element;
|
|
@@ -6,4 +6,4 @@ export interface FormControlProps<Values extends FieldValues, TOutput> extends F
|
|
|
6
6
|
inputRef?: RefObject<HTMLInputElement>;
|
|
7
7
|
transform?: Transform<TOutput>;
|
|
8
8
|
}
|
|
9
|
-
export declare const FormControl: <Values extends FieldValues, TOutput>({ className, controllerProps, inputRef, isRequired, labelText, name, transform, ...props }: FormControlProps<Values, TOutput>) => JSX.Element;
|
|
9
|
+
export declare const FormControl: <Values extends FieldValues, TOutput>({ className, controllerProps, inputRef, isRequired, labelText, name, showDirty, transform, ...props }: FormControlProps<Values, TOutput>) => JSX.Element;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
2
|
import { RadioProps } from 'react-daisyui';
|
|
3
|
-
import { FieldValues
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from './types';
|
|
4
5
|
export interface RadioOption {
|
|
5
6
|
id: string | number;
|
|
6
7
|
label: string;
|
|
7
8
|
value: string;
|
|
8
9
|
}
|
|
9
|
-
export interface FormRadioProps<Values extends FieldValues> extends
|
|
10
|
-
|
|
11
|
-
isRequired?: boolean;
|
|
12
|
-
labelText?: string;
|
|
10
|
+
export interface FormRadioProps<Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'placeholder'>, Omit<RadioProps, 'name'> {
|
|
11
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
13
12
|
options: RadioOption[];
|
|
14
|
-
radioProps?: RadioProps;
|
|
15
13
|
}
|
|
16
|
-
export declare const FormRadio: <Values extends FieldValues>({ className, isRequired, labelText, options,
|
|
14
|
+
export declare const FormRadio: <Values extends FieldValues>({ className, controllerProps, inputRef, isRequired, labelText, name, options, showDirty, ...props }: FormRadioProps<Values>) => JSX.Element;
|
|
@@ -3,7 +3,7 @@ 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
|
-
export interface FormSelectProps<DataItem extends GenericDataType, Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'controllerProps' | '
|
|
6
|
+
export interface FormSelectProps<DataItem extends GenericDataType, Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'controllerProps' | 'placeholder' | 'showDirty'> {
|
|
7
7
|
buttonColor?: ComponentColor;
|
|
8
8
|
buttonRef?: RefObject<HTMLButtonElement>;
|
|
9
9
|
className?: string;
|
|
@@ -12,4 +12,4 @@ export interface FormSelectProps<DataItem extends GenericDataType, Values extend
|
|
|
12
12
|
getItemValue?: (data: DataItem) => string;
|
|
13
13
|
options: DataItem[];
|
|
14
14
|
}
|
|
15
|
-
export declare const FormSelect: <DataItem extends GenericDataType, Values extends FieldValues>({ buttonColor, buttonRef, className, dropdownIcon, getItemText, getItemValue, labelText, name, options, }: FormSelectProps<DataItem, Values>) => JSX.Element;
|
|
15
|
+
export declare const FormSelect: <DataItem extends GenericDataType, Values extends FieldValues>({ buttonColor, buttonRef, className, dropdownIcon, getItemText, getItemValue, isRequired, labelText, name, options, }: FormSelectProps<DataItem, Values>) => JSX.Element;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ToggleProps } from 'react-daisyui';
|
|
3
|
-
import { FieldValues
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
label: string;
|
|
7
|
-
className?: string;
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from './types';
|
|
5
|
+
export interface FormToggleSwitchProps<Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'placeholder' | 'showDirty'>, Omit<ToggleProps, 'name'> {
|
|
8
6
|
}
|
|
9
|
-
export declare const FormToggleSwitch: <Values extends FieldValues>({
|
|
7
|
+
export declare const FormToggleSwitch: <Values extends FieldValues>({ children, className, controllerProps, isRequired, labelText, name, ...props }: FormToggleSwitchProps<Values>) => JSX.Element;
|
|
@@ -8,6 +8,7 @@ export interface FormFieldProps<Values extends FieldValues> {
|
|
|
8
8
|
labelText?: string;
|
|
9
9
|
name: Path<Values>;
|
|
10
10
|
placeholder?: string;
|
|
11
|
+
showDirty?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface ComboboxProps<DataItem extends GenericDataType, Values extends FieldValues> extends Pick<TypeaheadSelectProps<DataItem, Values>, 'className' | 'getItemValue' | 'name'> {
|
|
13
14
|
children: ReactNode;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import { ButtonProps } from 'react-daisyui';
|
|
3
|
-
export interface ModalProps {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps, ModalProps as DaisyUIModalProps } from 'react-daisyui';
|
|
3
|
+
export interface ModalProps extends DaisyUIModalProps {
|
|
4
4
|
actionButtons: ButtonProps[];
|
|
5
|
-
children: ReactNode;
|
|
6
5
|
onClose: () => void;
|
|
7
|
-
show: boolean;
|
|
8
|
-
title: string;
|
|
9
6
|
}
|
|
10
|
-
export declare const Modal: ({ actionButtons, children, onClose,
|
|
7
|
+
export declare const Modal: ({ actionButtons, children, className, onClose, open, title, }: ModalProps) => JSX.Element;
|
|
@@ -13,4 +13,4 @@ export interface TypeaheadSelectProps<DataItem extends GenericDataType, Values e
|
|
|
13
13
|
inputRef?: RefObject<HTMLInputElement>;
|
|
14
14
|
multi?: true;
|
|
15
15
|
}
|
|
16
|
-
export declare const TypeaheadSelect: <DataItem extends GenericDataType, Values extends FieldValues>({ className, controllerProps, debounceTime, defaultOptions, disableSingleSelectBadge, getBadgeText, getItemText, getItemValue, inputPlaceholder, inputRef, isRequired, labelText, multi, name, onDebouncedChange, options, placeholder, }: TypeaheadSelectProps<DataItem, Values>) => JSX.Element;
|
|
16
|
+
export declare const TypeaheadSelect: <DataItem extends GenericDataType, Values extends FieldValues>({ className, controllerProps, debounceTime, defaultOptions, disableSingleSelectBadge, getBadgeText, getItemText, getItemValue, inputPlaceholder, inputRef, isRequired, labelText, multi, name, onDebouncedChange, options, placeholder, showDirty, }: TypeaheadSelectProps<DataItem, Values>) => JSX.Element;
|
package/dist/hooks/index.d.ts
CHANGED