prom-pal-ui 1.1.0 → 1.1.1

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.
Files changed (31) hide show
  1. package/build/function/cjs/index.js +131 -0
  2. package/build/function/esm/index.js +129 -0
  3. package/build/types/components/index.d.ts +5 -0
  4. package/build/types/{ui → components/ui}/button.d.ts +2 -2
  5. package/build/types/index.d.ts +1 -7
  6. package/build/{cjs → ui/cjs}/index.js +1008 -1056
  7. package/build/{esm → ui/esm}/index.js +952 -998
  8. package/package.json +17 -2
  9. package/build/min/index.js +0 -29
  10. package/build/types/ui/fields/switch.d.ts +0 -9
  11. package/build/types/ui/form.d.ts +0 -35
  12. package/build/types/ui/input.d.ts +0 -8
  13. package/build/types/ui/label.d.ts +0 -4
  14. package/build/types/ui/textarea.d.ts +0 -8
  15. /package/build/types/{lib → components/lib}/form/rules/index.d.ts +0 -0
  16. /package/build/types/{lib → components/lib}/form/rules/schema-msg.d.ts +0 -0
  17. /package/build/types/{lib → components/lib}/form/rules/schema.d.ts +0 -0
  18. /package/build/types/{lib → components/lib}/index.d.ts +0 -0
  19. /package/build/types/{lib → components/lib}/utils.d.ts +0 -0
  20. /package/build/types/{ui → components/ui}/fields/form.d.ts +0 -0
  21. /package/build/types/{ui → components/ui}/fields/index.d.ts +0 -0
  22. /package/build/types/{ui → components/ui}/fields/input.d.ts +0 -0
  23. /package/build/types/{ui → components/ui}/fields/label.d.ts +0 -0
  24. /package/build/types/{ui → components/ui}/fields/select-field.d.ts +0 -0
  25. /package/build/types/{ui → components/ui}/fields/switch-field.d.ts +0 -0
  26. /package/build/types/{ui → components/ui}/fields/textarea.d.ts +0 -0
  27. /package/build/types/{ui → components/ui}/select.d.ts +0 -0
  28. /package/build/types/{ui → components/ui}/skeleton.d.ts +0 -0
  29. /package/build/types/{ui → components/ui}/switch.d.ts +0 -0
  30. /package/build/types/{ui → components/ui}/test.d.ts +0 -0
  31. /package/build/types/{ui → components/ui}/types.d.ts +0 -0
@@ -1,9 +0,0 @@
1
- import * as React from "react";
2
- import * as SwitchPrimitive from "@radix-ui/react-switch";
3
- interface PromSwitchProps extends React.ComponentProps<typeof SwitchPrimitive.Root> {
4
- name: string;
5
- isLoad?: boolean;
6
- isDisable?: boolean;
7
- }
8
- declare const PromSwitch: React.FC<PromSwitchProps>;
9
- export { PromSwitch };
@@ -1,35 +0,0 @@
1
- import { ReactNode } from "react";
2
- import { type ControllerProps, type FieldPath, type FieldValues, UseFormReturn } from "react-hook-form";
3
- import { z } from "zod";
4
- import { CommonPromComponentProps } from "./types";
5
- type PromFormRenderProps = {
6
- isValid: boolean;
7
- isSubmitting: boolean;
8
- errors: Record<string, any>;
9
- form: UseFormReturn<z.infer<any>>;
10
- };
11
- interface PromFromProps extends CommonPromComponentProps {
12
- children?: ReactNode;
13
- schema: z.ZodObject<any>;
14
- defaultValues?: z.infer<any>;
15
- onSubmit: (data: z.infer<any>) => void;
16
- render?: (props: PromFormRenderProps) => ReactNode;
17
- errorDisplay?: ReactNode;
18
- }
19
- declare const PromFrom: ({ schema, render, children, onSubmit, defaultValues, }: PromFromProps) => import("react/jsx-runtime").JSX.Element;
20
- declare const usePromForm: <T extends FieldValues>() => {
21
- form: UseFormReturn<T, any, T>;
22
- errors: import("react-hook-form").FieldErrors<T>;
23
- isValid: boolean;
24
- isSubmitting: boolean;
25
- reset: import("react-hook-form").UseFormReset<T>;
26
- watch: import("react-hook-form").UseFormWatch<T>;
27
- control: import("react-hook-form").Control<T, any, T>;
28
- setValue: import("react-hook-form").UseFormSetValue<T>;
29
- register: import("react-hook-form").UseFormRegister<T>;
30
- handleSubmit: import("react-hook-form").UseFormHandleSubmit<T, T>;
31
- };
32
- type PromFormFiledProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = ControllerProps<TFieldValues, TName>;
33
- declare const PromFormFiled: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: PromFormFiledProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
34
- declare const PromMessage: () => import("react/jsx-runtime").JSX.Element;
35
- export { PromFrom, usePromForm, PromMessage, PromFormFiled, type PromFromProps, type PromFormRenderProps, };
@@ -1,8 +0,0 @@
1
- import React, { FC } from "react";
2
- import { CommonPromComponentProps, CommonPromStyle } from "./types";
3
- interface PromInputProps extends CommonPromComponentProps, CommonPromStyle, Omit<React.ComponentProps<"input">, "name"> {
4
- name: string;
5
- label?: string;
6
- }
7
- declare const PromInput: FC<PromInputProps>;
8
- export { PromInput };
@@ -1,4 +0,0 @@
1
- import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
- declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- export { Label };
@@ -1,8 +0,0 @@
1
- import React, { FC } from "react";
2
- import { CommonPromComponentProps, CommonPromStyle } from "./types";
3
- interface PromTextareaProps extends CommonPromComponentProps, CommonPromStyle, Omit<React.ComponentProps<"textarea">, "name"> {
4
- name: string;
5
- label?: string;
6
- }
7
- declare const PromTextarea: FC<PromTextareaProps>;
8
- export { PromTextarea };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes