@scbt-ecom/ui 0.73.0 → 0.74.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.
- package/dist/hooks.js +2 -2
- package/dist/{index-HbdkFbuN.js → index-B6MrMsbc.js} +566 -564
- package/dist/{index-HbdkFbuN.js.map → index-B6MrMsbc.js.map} +1 -1
- package/dist/index-CrR6G9lz.js +446 -0
- package/dist/index-CrR6G9lz.js.map +1 -0
- package/dist/shared/validation/base/base.constants.d.ts +1 -0
- package/dist/shared/validation/base/base.validators.d.ts +2 -0
- package/dist/shared/validation/base/regex.validators.d.ts +21 -0
- package/dist/shared/validation/index.d.ts +1 -0
- package/dist/shared/validation/messages.d.ts +3 -0
- package/dist/ui.js +3 -3
- package/dist/{useDebounce-B__kmLt7.js → useDebounce-BH0d8exl.js} +386 -382
- package/dist/useDebounce-BH0d8exl.js.map +1 -0
- package/dist/{useFieldsProgress-BtrWDMY2.js → useFieldsProgress-dcSmd8dw.js} +2 -2
- package/dist/{useFieldsProgress-BtrWDMY2.js.map → useFieldsProgress-dcSmd8dw.js.map} +1 -1
- package/dist/validation.js +1 -1
- package/dist/validation.js.map +1 -1
- package/dist/widget.js +4 -4
- package/package.json +1 -1
- package/dist/index-lfBvBrWg.js +0 -436
- package/dist/index-lfBvBrWg.js.map +0 -1
- package/dist/useDebounce-B__kmLt7.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as z } from 'zod';
|
|
2
|
+
export type RegexValidatorsOptions<Required extends boolean> = {
|
|
3
|
+
/**
|
|
4
|
+
* указывает что поле обязательное
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
required?: Required;
|
|
8
|
+
/**
|
|
9
|
+
* значение по умолчанию
|
|
10
|
+
* @default undefined
|
|
11
|
+
*/
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const getRegexRequired: (regex: RegExp, props?: Omit<RegexValidatorsOptions<true>, "required">) => z.ZodDefault<z.ZodString>;
|
|
16
|
+
type RegexRequiredSchema = ReturnType<typeof getRegexRequired>;
|
|
17
|
+
declare const getRegexOptional: (regex: RegExp, props?: Omit<RegexValidatorsOptions<false>, "required">) => z.ZodEffects<z.ZodOptional<z.ZodDefault<z.ZodString>>, string | undefined, string | undefined>;
|
|
18
|
+
type RegexOptionalSchema = ReturnType<typeof getRegexOptional>;
|
|
19
|
+
export declare function getRegexSchema(regex: RegExp, props?: RegexValidatorsOptions<true>): RegexRequiredSchema;
|
|
20
|
+
export declare function getRegexSchema(regex: RegExp, props?: RegexValidatorsOptions<false>): RegexOptionalSchema;
|
|
21
|
+
export {};
|
|
@@ -14,6 +14,7 @@ export declare const zodValidators: {
|
|
|
14
14
|
getDateSchema: typeof import('./base/date.validators').getDateSchema;
|
|
15
15
|
getUnionSchema: typeof import('./base/union.validators').getUnionSchema;
|
|
16
16
|
getUrlSchema: typeof import('./base/url.validators').getUrlSchema;
|
|
17
|
+
getRegexSchema: typeof import('./base/regex.validators').getRegexSchema;
|
|
17
18
|
getBooleanSchema: typeof import('./base/boolean.validators').getBooleanSchema;
|
|
18
19
|
};
|
|
19
20
|
dadata: {
|
package/dist/ui.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { j as w, c as On, R as An, B as ge, u as Nn, a as Tn, b as jn, d as Hn, P as ke, e as Wt, f as Gn, I as zn, g as et, h as Bn, A as kn, i as be, H as qn, D as Un, V as Kn, O as Xn } from "./index-
|
|
2
|
-
import { o as Fi, C as _i, v as Ii, t as Mi, p as Vi, K as bi, L as Pi, M as $i, N as Ei, n as Di, q as Li, r as Oi, U as Ai, s as Ni, k as Ti, m as ji, l as Hi, w as Gi } from "./index-
|
|
1
|
+
import { j as w, c as On, R as An, B as ge, u as Nn, a as Tn, b as jn, d as Hn, P as ke, e as Wt, f as Gn, I as zn, g as et, h as Bn, A as kn, i as be, H as qn, D as Un, V as Kn, O as Xn } from "./index-B6MrMsbc.js";
|
|
2
|
+
import { o as Fi, C as _i, v as Ii, t as Mi, p as Vi, K as bi, L as Pi, M as $i, N as Ei, n as Di, q as Li, r as Oi, U as Ai, s as Ni, k as Ti, m as ji, l as Hi, w as Gi } from "./index-B6MrMsbc.js";
|
|
3
3
|
import * as ce from "react";
|
|
4
4
|
import { forwardRef as Q, useState as oe, useRef as je, useCallback as Se, useEffect as ve, isValidElement as He, cloneElement as Qt, Children as Ie } from "react";
|
|
5
5
|
import { c as F, T as Nt } from "./typeGuards-CSiImkUY.js";
|
|
6
6
|
import { D as Bi, d as ki, f as qi, b as Ui, a as Ki } from "./utils-k3uzuyeN.js";
|
|
7
|
-
import { u as qe, a as Wn } from "./useDebounce-
|
|
7
|
+
import { u as qe, a as Wn } from "./useDebounce-BH0d8exl.js";
|
|
8
8
|
import { m as Qn } from "./mergeRefs-qDToYXtM.js";
|
|
9
9
|
const Jn = On(
|
|
10
10
|
"group flex items-center justify-center cursor-pointer rounded-full outline-offset-[3px] outline-transparent outline-2 transition duration-12 active:scale-[0.97] disabled:pointer-events-none",
|