@pathscale/ui 0.0.81 → 0.0.82
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import type { ObjectSetter, Paths } from "@felte/common";
|
|
3
4
|
import { type FormProps } from "./Form";
|
|
4
5
|
export type ValidatedFormProps<T extends z.ZodTypeAny> = Omit<FormProps, "onSubmit"> & {
|
|
5
6
|
schema: T;
|
|
@@ -7,19 +8,19 @@ export type ValidatedFormProps<T extends z.ZodTypeAny> = Omit<FormProps, "onSubm
|
|
|
7
8
|
initialValues?: z.infer<T>;
|
|
8
9
|
children?: JSX.Element | (() => JSX.Element);
|
|
9
10
|
};
|
|
10
|
-
interface FormValidationContext {
|
|
11
|
+
interface FormValidationContext<T extends z.ZodTypeAny = z.ZodTypeAny> {
|
|
11
12
|
errors: (path?: string | ((data: any) => any)) => any;
|
|
12
13
|
touched: (path?: string | ((data: any) => any)) => any;
|
|
13
14
|
data: (path?: string | ((data: any) => any)) => any;
|
|
14
15
|
isValid: () => boolean;
|
|
15
16
|
isSubmitting: () => boolean;
|
|
16
|
-
setData:
|
|
17
|
+
setData: ObjectSetter<z.infer<T>, Paths<z.infer<T>>>;
|
|
17
18
|
setErrors: (errors: any) => void;
|
|
18
19
|
setWarnings: (warnings: any) => void;
|
|
19
20
|
setTouched: (touched: any) => void;
|
|
20
21
|
reset: () => void;
|
|
21
22
|
}
|
|
22
|
-
declare const FormValidationContext: import("solid-js").Context<FormValidationContext | undefined>;
|
|
23
|
-
export declare function useFormValidation(): FormValidationContext
|
|
23
|
+
declare const FormValidationContext: import("solid-js").Context<FormValidationContext<z.ZodTypeAny> | undefined>;
|
|
24
|
+
export declare function useFormValidation<T extends z.ZodTypeAny = z.ZodTypeAny>(): FormValidationContext<T>;
|
|
24
25
|
declare function ValidatedForm<T extends z.ZodTypeAny>(props: ValidatedFormProps<T>): JSX.Element;
|
|
25
26
|
export default ValidatedForm;
|
package/dist/index.js
CHANGED
|
@@ -6923,7 +6923,7 @@ const DropdownMenu = (props)=>{
|
|
|
6923
6923
|
"id",
|
|
6924
6924
|
"aria-labelledby"
|
|
6925
6925
|
]);
|
|
6926
|
-
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("dropdown-content menu p-2 shadow bg-base-100 rounded-box", local.class, local.className));
|
|
6926
|
+
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("dropdown-content menu p-2 shadow bg-base-100 max-h-50 overflow-y-auto flex-nowrap w-full rounded-box", local.class, local.className));
|
|
6927
6927
|
return (()=>{
|
|
6928
6928
|
var _el$ = DropdownMenu_tmpl$();
|
|
6929
6929
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|