Socket
Socket
Sign inDemoInstall

@mantine/form

Package Overview
Dependencies
Maintainers
1
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mantine/form - npm Package Compare versions

Comparing version 6.0.17 to 7.0.0-alpha.21

cjs/src/mantine-form/src/filter-errors/filter-errors.js

2

lib/Form/Form.d.ts

@@ -7,4 +7,4 @@ import React from 'react';

}
export type FormComponent = <Form extends UseFormReturnType<any>>(props: FormProps<Form>) => JSX.Element;
export type FormComponent = <Form extends UseFormReturnType<any>>(props: FormProps<Form>) => JSX.Element | React.ReactNode;
export declare const Form: FormComponent;
//# sourceMappingURL=Form.d.ts.map

@@ -0,2 +1,3 @@

/// <reference types="react" />
export declare function getInputOnChange<Value>(setValue: (value: Value | ((current: Value) => Value)) => void): (val: Value | import("react").ChangeEvent<unknown> | ((current: Value) => Value)) => void;
//# sourceMappingURL=get-input-on-change.d.ts.map

@@ -5,3 +5,3 @@ /**

*/
export declare function changeErrorIndices<T extends Record<PropertyKey, any>>(path: PropertyKey, index: number, errors: T, change: 1 | -1): T;
export declare function changeErrorIndices<T extends Record<PropertyKey, any>>(path: PropertyKey, index: number | undefined, errors: T, change: 1 | -1): T;
//# sourceMappingURL=change-error-indices.d.ts.map

@@ -1,2 +0,2 @@

export declare function insertPath<T>(path: unknown, value: unknown, index: number, values: T): T;
export declare function insertPath<T>(path: unknown, value: unknown, index: number | undefined, values: T): T;
//# sourceMappingURL=insert-path.d.ts.map

@@ -18,3 +18,3 @@ /// <reference types="react" />

type Rule<Value, Values> = (value: Value, values: Values, path: string) => React.ReactNode;
type FormRule<Value, Values> = NonNullable<Value> extends Array<infer ListValue> ? Partial<{
export type FormRule<Value, Values> = NonNullable<Value> extends Array<infer ListValue> ? Partial<{
[Key in keyof ListValue]: ListValue[Key] extends Array<infer NestedListItem> ? FormRulesRecord<NestedListItem> | Rule<ListValue[Key], Values> : FormRulesRecord<ListValue[Key]> | Rule<ListValue[Key], Values>;

@@ -30,3 +30,3 @@ }> | Rule<Value, Values> : NonNullable<Value> extends Record<string, any> ? FormRulesRecord<Value, Values> | Rule<Value, Values> : Rule<Value, Values>;

export type SetFormStatus = React.Dispatch<React.SetStateAction<FormStatus>>;
export type OnSubmit<Values, TransformValues extends _TransformValues<Values>> = (handleSubmit: (values: ReturnType<TransformValues>, event: React.FormEvent<HTMLFormElement>) => void, handleValidationFailure?: (errors: FormErrors, values: Values, event: React.FormEvent<HTMLFormElement>) => void) => (event?: React.FormEvent<HTMLFormElement>) => void;
export type OnSubmit<Values, TransformValues extends _TransformValues<Values>> = (handleSubmit: (values: ReturnType<TransformValues>, event: React.FormEvent<HTMLFormElement> | undefined) => void, handleValidationFailure?: (errors: FormErrors, values: Values, event: React.FormEvent<HTMLFormElement> | undefined) => void) => (event?: React.FormEvent<HTMLFormElement>) => void;
export type GetTransformedValues<Values, TransformValues extends _TransformValues<Values>> = (values?: Values) => ReturnType<TransformValues>;

@@ -33,0 +33,0 @@ export type OnReset = (event: React.FormEvent<HTMLFormElement>) => void;

import { FormValidateInput, FormFieldValidationResult } from '../types';
export declare function validateFieldValue<T>(path: unknown, rules: FormValidateInput<T>, values: T): FormFieldValidationResult;
export declare function validateFieldValue<T>(path: unknown, rules: FormValidateInput<T> | undefined, values: T): FormFieldValidationResult;
//# sourceMappingURL=validate-field-value.d.ts.map
import { FormValidateInput, FormErrors } from '../types';
export declare function validateValues<T>(validate: FormValidateInput<T>, values: T): {
export declare function validateValues<T>(validate: FormValidateInput<T> | undefined, values: T): {
hasErrors: boolean;

@@ -4,0 +4,0 @@ errors: FormErrors;

@@ -7,4 +7,4 @@ import React from 'react';

type HasLengthPayload = HasLengthOptions | number;
export declare function hasLength(payload: HasLengthPayload, error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment;
export declare function hasLength(payload: HasLengthPayload, error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null;
export {};
//# sourceMappingURL=has-length.d.ts.map
import React from 'react';
export declare function isEmail(error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment;
export declare function isEmail(error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null;
//# sourceMappingURL=is-email.d.ts.map

@@ -6,4 +6,4 @@ import React from 'react';

}
export declare function isInRange({ min, max }: IsInRangePayload, error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment;
export declare function isInRange({ min, max }: IsInRangePayload, error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null;
export {};
//# sourceMappingURL=is-in-range.d.ts.map
import React from 'react';
export declare function isNotEmpty(error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment;
export declare function isNotEmpty(error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null;
//# sourceMappingURL=is-not-empty.d.ts.map
import React from 'react';
export declare function matchesField(field: string, error?: React.ReactNode): (value: unknown, values: Record<string, unknown>) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment;
export declare function matchesField(field: string, error?: React.ReactNode): (value: unknown, values: Record<string, unknown>) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null;
//# sourceMappingURL=matches-field.d.ts.map
import React from 'react';
export declare function matches(regexp: RegExp, error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment;
export declare function matches(regexp: RegExp, error?: React.ReactNode): (value: unknown) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null;
//# sourceMappingURL=matches.d.ts.map
{
"name": "@mantine/form",
"description": "Mantine form management library",
"version": "6.0.17",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
"version": "7.0.0-alpha.21",
"types": "./lib/index.d.ts",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./cjs/index.js",
"types": "./lib/index.d.ts"
}
},
"license": "MIT",

@@ -18,3 +23,3 @@ "author": "Vitaly Rtishchev <rtivital@gmail.com>",

"peerDependencies": {
"react": ">=16.8.0"
"react": "^18.2.0"
},

@@ -21,0 +26,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc