@foundrykit/components 1.0.19 → 1.0.20
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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +25 -1
- package/dist/index.js +185 -186
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
- package/src/components/form/config.ts +21 -0
- package/src/components/form/index.tsx +168 -0
- package/src/index.ts +10 -0
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
8
8
|
import { EmptyStateBehavior } from '@foundrykit/hooks';
|
|
9
9
|
import { SearchResult, SearchSection as SearchSection$1 } from '@foundrykit/types';
|
|
10
10
|
export { SearchResult, SearchSection as SearchSectionType } from '@foundrykit/types';
|
|
11
|
+
import * as react_hook_form from 'react-hook-form';
|
|
12
|
+
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
13
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
14
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
11
15
|
export { cn } from '@foundrykit/utils';
|
|
12
16
|
|
|
13
17
|
interface SearchBarProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
@@ -340,4 +344,24 @@ declare function AdvancedSearchBarWrapper(props?: {
|
|
|
340
344
|
useCustomTrigger?: boolean;
|
|
341
345
|
}): react_jsx_runtime.JSX.Element;
|
|
342
346
|
|
|
343
|
-
|
|
347
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
348
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
|
|
349
|
+
declare const useFormField: () => {
|
|
350
|
+
invalid: boolean;
|
|
351
|
+
isDirty: boolean;
|
|
352
|
+
isTouched: boolean;
|
|
353
|
+
isValidating: boolean;
|
|
354
|
+
error?: react_hook_form.FieldError;
|
|
355
|
+
id: string;
|
|
356
|
+
name: string;
|
|
357
|
+
formItemId: string;
|
|
358
|
+
formDescriptionId: string;
|
|
359
|
+
formMessageId: string;
|
|
360
|
+
};
|
|
361
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
362
|
+
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
363
|
+
declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element;
|
|
364
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
|
|
365
|
+
declare function FormMessage({ className, ...props }: React.ComponentProps<'p'>): react_jsx_runtime.JSX.Element | null;
|
|
366
|
+
|
|
367
|
+
export { AdvancedSearchBar, AdvancedSearchBarWrapper, AdvancedSearchProvider, Calendar, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DatePicker, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, SearchBar, SearchInput, SearchItem, SearchResults, SearchSection, SearchTrigger, useFormField };
|