stratosphere-ui 0.2.7 → 0.2.9
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/FormRadioGroup.d.ts +9 -0
- package/dist/components/Form/FormRadioGroupOption.d.ts +6 -0
- package/dist/components/Form/FormSelectMulti.d.ts +5 -0
- package/dist/components/Form/FormSelectSingle.d.ts +5 -0
- package/dist/components/Form/FormTextarea.d.ts +11 -0
- package/dist/components/Form/index.d.ts +3 -1
- package/dist/components/Form/types.d.ts +7 -0
- package/dist/components/Select/Select.d.ts +19 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/stratosphere-ui.js +13438 -13130
- package/package.json +1 -1
- package/dist/components/Form/FormSelect.d.ts +0 -17
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RadioGroupProps } from '@headlessui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from './types';
|
|
5
|
+
export interface FormRadioGroupProps<Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'placeholder' | 'showDirty'>, Omit<RadioGroupProps<'button', string>, 'children' | 'className' | 'name' | 'onChange' | 'value'> {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormRadioGroup: <Values extends FieldValues>({ children, className, controllerProps, isRequired, labelText, name, ...props }: FormRadioGroupProps<Values>) => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from 'react-daisyui';
|
|
3
|
+
export interface FormRadioGroupOptionProps extends ButtonProps {
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const FormRadioGroupOption: ({ children, disabled, value, ...props }: FormRadioGroupOptionProps) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
import { ListboxProps } from './types';
|
|
4
|
+
import { GenericDataType } from '../../common';
|
|
5
|
+
export declare const FormSelectMulti: <DataItem extends GenericDataType, Values extends FieldValues>({ children, className, disabled, getItemValue, name, selectedItems, setSelectedItems, }: ListboxProps<DataItem, Values>) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
import { ListboxProps } from './types';
|
|
4
|
+
import { GenericDataType } from '../../common';
|
|
5
|
+
export declare const FormSelectSingle: <DataItem extends GenericDataType, Values extends FieldValues>({ children, className, disabled, getItemValue, name, selectedItems, setSelectedItems, }: ListboxProps<DataItem, Values>) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextareaProps } from 'react-daisyui';
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from './types';
|
|
5
|
+
import { Transform } from '../../common';
|
|
6
|
+
export interface FormTextareaProps<Values extends FieldValues, TOutput> extends FormFieldProps<Values>, Omit<TextareaProps, 'name'> {
|
|
7
|
+
hideErrorMessage?: boolean;
|
|
8
|
+
inputClassName?: string;
|
|
9
|
+
transform?: Transform<TOutput>;
|
|
10
|
+
}
|
|
11
|
+
export declare const FormTextarea: <Values extends FieldValues, TOutput>({ className, color, controllerProps, hideErrorMessage, inputClassName, isRequired, labelText, name, showDirty, transform, ...props }: FormTextareaProps<Values, TOutput>) => JSX.Element;
|
|
@@ -5,7 +5,9 @@ export * from './FormError';
|
|
|
5
5
|
export * from './FormFileInput';
|
|
6
6
|
export * from './FormLabel';
|
|
7
7
|
export * from './FormRadio';
|
|
8
|
+
export * from './FormRadioGroup';
|
|
9
|
+
export * from './FormRadioGroupOption';
|
|
8
10
|
export * from './FormRangeSlider';
|
|
9
|
-
export * from './
|
|
11
|
+
export * from './FormTextarea';
|
|
10
12
|
export * from './FormToggleSwitch';
|
|
11
13
|
export * from './types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
2
|
import { FieldValues, Path, UseControllerProps } from 'react-hook-form';
|
|
3
|
+
import { SelectProps } from '../Select';
|
|
3
4
|
import { TypeaheadSelectProps } from '../TypeaheadSelect';
|
|
4
5
|
import { GenericDataType } from '../../common';
|
|
5
6
|
export interface FormFieldProps<Values extends FieldValues> {
|
|
@@ -16,3 +17,9 @@ export interface ComboboxProps<DataItem extends GenericDataType, Values extends
|
|
|
16
17
|
setShowDropdown: Dispatch<SetStateAction<boolean>>;
|
|
17
18
|
setSelectedItems: Dispatch<SetStateAction<DataItem[]>>;
|
|
18
19
|
}
|
|
20
|
+
export interface ListboxProps<DataItem extends GenericDataType, Values extends FieldValues> extends Pick<SelectProps<DataItem, Values>, 'className' | 'getItemValue' | 'name'> {
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
selectedItems: DataItem[];
|
|
24
|
+
setSelectedItems: Dispatch<SetStateAction<DataItem[]>>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ComponentColor } from 'react-daisyui/dist/types';
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from '../Form';
|
|
5
|
+
import { GenericDataType } from '../../common';
|
|
6
|
+
export interface SelectProps<DataItem extends GenericDataType, Values extends FieldValues> extends Omit<FormFieldProps<Values>, 'controllerProps' | 'placeholder' | 'showDirty'> {
|
|
7
|
+
buttonColor?: ComponentColor;
|
|
8
|
+
className?: string;
|
|
9
|
+
defaultOptionId?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
dropdownIcon?: ReactNode;
|
|
12
|
+
getItemText: (data: DataItem) => string;
|
|
13
|
+
getItemValue?: (data: DataItem) => string;
|
|
14
|
+
menuClassName?: string;
|
|
15
|
+
multi?: true;
|
|
16
|
+
options: DataItem[];
|
|
17
|
+
showDirty?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const Select: <DataItem extends GenericDataType, Values extends FieldValues>({ buttonColor, className, defaultOptionId, disabled, dropdownIcon, getItemText, getItemValue, isRequired, labelText, menuClassName, multi, name, options, showDirty, }: SelectProps<DataItem, Values>) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Select';
|