@candidhealth/react-vitals 1.0.0-alpha.16 → 1.0.0-alpha.17

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/index.d.mts CHANGED
@@ -5,7 +5,7 @@ import { IconDefinition, SizeProp } from '@fortawesome/fontawesome-svg-core';
5
5
  import { Placement } from '@floating-ui/react';
6
6
  import { DatePickerProps as DatePickerProps$1 } from 'react-datepicker';
7
7
  import * as react_hook_form from 'react-hook-form';
8
- import { SubmitHandler, UseFormProps, DefaultValues, FieldValues, FieldErrors, FieldPath, FieldError } from 'react-hook-form';
8
+ import { FieldValues, SubmitHandler, UseFormProps, DefaultValues, FieldErrors, FieldPath, FieldError } from 'react-hook-form';
9
9
  import { z } from 'zod';
10
10
  import * as _radix_ui_react_dropdown_menu from '@radix-ui/react-dropdown-menu';
11
11
  import { DropdownMenuProps, DropdownMenuContentProps, DropdownMenuItemProps } from '@radix-ui/react-dropdown-menu';
@@ -429,7 +429,7 @@ declare const ErrorText: React__default.ForwardRefExoticComponent<Omit<React__de
429
429
  className?: string;
430
430
  } & React__default.RefAttributes<HTMLParagraphElement>>;
431
431
 
432
- type FormSchema = z.ZodTypeAny;
432
+ type FormSchema = z.ZodType<FieldValues>;
433
433
  /** Prevents passing empty `{}` as defaultValues while allowing all-optional objects */
434
434
  type NonEmpty<T extends object> = keyof T extends never ? never : T;
435
435
  type OnSubmitHandler<T extends FormSchema> = SubmitHandler<z.infer<T>>;
@@ -454,7 +454,7 @@ type UseFormOptions<TSchema extends FormSchema, TDefaults extends object> = Pick
454
454
  defaultValues?: NonEmpty<TDefaults>;
455
455
  };
456
456
  declare const useForm: {
457
- <T extends FormSchema, TDefaults extends DefaultValues<z.infer<T>> = DefaultValues<z.TypeOf<T>>>(schema: T, options?: UseFormOptions<T, TDefaults>): react_hook_form.UseFormReturn<z.TypeOf<T>, any, z.TypeOf<T>>;
457
+ <T extends FormSchema, TDefaults extends DefaultValues<z.infer<T>> = DefaultValues<z.core.output<T>>>(schema: T, options?: UseFormOptions<T, TDefaults>): react_hook_form.UseFormReturn<z.core.output<T>, any, z.core.output<T>>;
458
458
  displayName: string;
459
459
  };
460
460
  declare const useControlledFormField: {
@@ -2237,6 +2237,7 @@ declare const useColumnResizing: <T>(options: CustomTableOptions<T>) => {
2237
2237
  onRowClick?: ((row: _tanstack_react_table.Row<T>, e: React.MouseEvent) => void) | undefined;
2238
2238
  emptyText?: React$1.ReactNode;
2239
2239
  staticSubRows?: boolean | undefined;
2240
+ enableColumnReordering?: boolean | undefined;
2240
2241
  infiniteScroll?: {
2241
2242
  hasNextPage: boolean | undefined;
2242
2243
  fetchNextPage: () => void;
@@ -2563,6 +2564,7 @@ declare const useColumnResizing: <T>(options: CustomTableOptions<T>) => {
2563
2564
  onRowClick?: ((row: _tanstack_react_table.Row<T>, e: React.MouseEvent) => void) | undefined;
2564
2565
  emptyText?: React$1.ReactNode;
2565
2566
  staticSubRows?: boolean | undefined;
2567
+ enableColumnReordering?: boolean | undefined;
2566
2568
  infiniteScroll?: {
2567
2569
  hasNextPage: boolean | undefined;
2568
2570
  fetchNextPage: () => void;
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { IconDefinition, SizeProp } from '@fortawesome/fontawesome-svg-core';
5
5
  import { Placement } from '@floating-ui/react';
6
6
  import { DatePickerProps as DatePickerProps$1 } from 'react-datepicker';
7
7
  import * as react_hook_form from 'react-hook-form';
8
- import { SubmitHandler, UseFormProps, DefaultValues, FieldValues, FieldErrors, FieldPath, FieldError } from 'react-hook-form';
8
+ import { FieldValues, SubmitHandler, UseFormProps, DefaultValues, FieldErrors, FieldPath, FieldError } from 'react-hook-form';
9
9
  import { z } from 'zod';
10
10
  import * as _radix_ui_react_dropdown_menu from '@radix-ui/react-dropdown-menu';
11
11
  import { DropdownMenuProps, DropdownMenuContentProps, DropdownMenuItemProps } from '@radix-ui/react-dropdown-menu';
@@ -429,7 +429,7 @@ declare const ErrorText: React__default.ForwardRefExoticComponent<Omit<React__de
429
429
  className?: string;
430
430
  } & React__default.RefAttributes<HTMLParagraphElement>>;
431
431
 
432
- type FormSchema = z.ZodTypeAny;
432
+ type FormSchema = z.ZodType<FieldValues>;
433
433
  /** Prevents passing empty `{}` as defaultValues while allowing all-optional objects */
434
434
  type NonEmpty<T extends object> = keyof T extends never ? never : T;
435
435
  type OnSubmitHandler<T extends FormSchema> = SubmitHandler<z.infer<T>>;
@@ -454,7 +454,7 @@ type UseFormOptions<TSchema extends FormSchema, TDefaults extends object> = Pick
454
454
  defaultValues?: NonEmpty<TDefaults>;
455
455
  };
456
456
  declare const useForm: {
457
- <T extends FormSchema, TDefaults extends DefaultValues<z.infer<T>> = DefaultValues<z.TypeOf<T>>>(schema: T, options?: UseFormOptions<T, TDefaults>): react_hook_form.UseFormReturn<z.TypeOf<T>, any, z.TypeOf<T>>;
457
+ <T extends FormSchema, TDefaults extends DefaultValues<z.infer<T>> = DefaultValues<z.core.output<T>>>(schema: T, options?: UseFormOptions<T, TDefaults>): react_hook_form.UseFormReturn<z.core.output<T>, any, z.core.output<T>>;
458
458
  displayName: string;
459
459
  };
460
460
  declare const useControlledFormField: {
@@ -2237,6 +2237,7 @@ declare const useColumnResizing: <T>(options: CustomTableOptions<T>) => {
2237
2237
  onRowClick?: ((row: _tanstack_react_table.Row<T>, e: React.MouseEvent) => void) | undefined;
2238
2238
  emptyText?: React$1.ReactNode;
2239
2239
  staticSubRows?: boolean | undefined;
2240
+ enableColumnReordering?: boolean | undefined;
2240
2241
  infiniteScroll?: {
2241
2242
  hasNextPage: boolean | undefined;
2242
2243
  fetchNextPage: () => void;
@@ -2563,6 +2564,7 @@ declare const useColumnResizing: <T>(options: CustomTableOptions<T>) => {
2563
2564
  onRowClick?: ((row: _tanstack_react_table.Row<T>, e: React.MouseEvent) => void) | undefined;
2564
2565
  emptyText?: React$1.ReactNode;
2565
2566
  staticSubRows?: boolean | undefined;
2567
+ enableColumnReordering?: boolean | undefined;
2566
2568
  infiniteScroll?: {
2567
2569
  hasNextPage: boolean | undefined;
2568
2570
  fetchNextPage: () => void;
package/dist/index.js CHANGED
@@ -1193,7 +1193,6 @@ var import_react_hook_form = require("react-hook-form");
1193
1193
  var useForm = (schema, options) => {
1194
1194
  return (0, import_react_hook_form.useForm)({
1195
1195
  ...options,
1196
- // Type assertion needed here for RHF internals
1197
1196
  resolver: (0, import_zod.zodResolver)(schema)
1198
1197
  });
1199
1198
  };
@@ -3235,7 +3234,7 @@ var EmptyState = (0, import_react32.forwardRef)(
3235
3234
  /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_fontawesome3.FontAwesomeIcon, { className: "text-muted ring-transparent", icon, size: "2x" }),
3236
3235
  /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex max-w-prose flex-col text-center", children: [
3237
3236
  title && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Text, { variant: "title-3", className: "text-muted", children: title }),
3238
- description && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Text, { variant: "footnote", className: "leading-5 text-muted", children: description })
3237
+ description && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Text, { variant: "body-2", className: "leading-5 text-muted", children: description })
3239
3238
  ] })
3240
3239
  ] })
3241
3240
  );