indicator-ui 1.0.15 → 1.0.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.cjs +9 -9
- package/dist/index.js +2370 -2350
- package/dist/indicator-ui.css +1 -1
- package/dist/types/src/hooks/forms/lib/fieldsProps.d.ts +1 -0
- package/dist/types/src/hooks/forms/types/scheme.d.ts +3 -2
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/useSafeCallback.d.ts +9 -0
- package/dist/types/src/ui/Toggle/types/ToggleTypes.d.ts +2 -2
- package/dist/types/src/ui/ToggleBase/index.d.ts +0 -1
- package/dist/types/src/ui/ToggleBase/ui/ToggleBase.d.ts +15 -2
- package/dist/types/src/ui/formFields/FormPaginatedSelectField/hooks/useFormPaginatedSelectField.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/src/ui/ToggleBase/types/ToggleBaseTypes.d.ts +0 -17
- package/dist/types/src/ui/ToggleBase/types/index.d.ts +0 -1
|
@@ -3,6 +3,7 @@ import { Form, FormError } from '../classes';
|
|
|
3
3
|
type PropsType<T, P extends FormPath<T>> = {
|
|
4
4
|
path: P;
|
|
5
5
|
form: Form<T>;
|
|
6
|
+
getFieldSync: (path: P) => FormValue<T, P> | null | undefined;
|
|
6
7
|
setField: (path: P, value: FormValue<T, P> | null | undefined) => void;
|
|
7
8
|
formErrors: FormError<T>;
|
|
8
9
|
highlightField: (path: P) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FocusEvent } from 'react';
|
|
1
|
+
import { FocusEvent, SetStateAction } from 'react';
|
|
2
2
|
import { Nullable, Undefinable } from '../../../types';
|
|
3
3
|
import { ExtendFormPath, ExtendFormValue, FormErrorType, FormPath, FormValue } from './formTypes';
|
|
4
4
|
export type StringFieldValidators = Partial<{
|
|
@@ -154,7 +154,8 @@ export type FormSchemeType<T> = Nullable<Undefinable<T>> extends infer Form ? {
|
|
|
154
154
|
} : never;
|
|
155
155
|
export type FieldPropsType<V> = {
|
|
156
156
|
value?: V | null;
|
|
157
|
-
onChange?: (
|
|
157
|
+
onChange?: (action?: V | null) => void;
|
|
158
|
+
onUpdate?: (action: SetStateAction<V | undefined | null>) => void;
|
|
158
159
|
error?: FormErrorType;
|
|
159
160
|
onBlur?: (event?: FocusEvent) => void;
|
|
160
161
|
};
|
|
@@ -8,6 +8,7 @@ export * from './useAsyncState';
|
|
|
8
8
|
export * from './useResettableTimeout';
|
|
9
9
|
export * from './useDebouncedInvoker';
|
|
10
10
|
export * from './useDidUpdateEffect';
|
|
11
|
+
export * from './useSafeCallback';
|
|
11
12
|
export * from './useSmartPosition';
|
|
12
13
|
export * from './useSmartScroll';
|
|
13
14
|
export * from './useInteractiveZone';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ToggleBase } from '../..';
|
|
3
3
|
type AdditionElementPropsType = {
|
|
4
4
|
isHover?: boolean;
|
|
5
5
|
active?: boolean;
|
|
@@ -35,6 +35,6 @@ export type TogglePropsType = {
|
|
|
35
35
|
* */
|
|
36
36
|
textAfterElement?: AdditionElementType;
|
|
37
37
|
theme?: "light" | "dark";
|
|
38
|
-
size?:
|
|
38
|
+
size?: React.ComponentProps<typeof ToggleBase>['size'];
|
|
39
39
|
};
|
|
40
40
|
export {};
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { AsProps } from '../../../types';
|
|
3
|
+
type PropsType<T extends React.ElementType> = AsProps<T, {
|
|
4
|
+
/**
|
|
5
|
+
* Активирована ли кнопка. (В дизайне pressed)
|
|
6
|
+
* */
|
|
7
|
+
active?: boolean;
|
|
8
|
+
size?: 'medium' | 'large';
|
|
9
|
+
error?: boolean;
|
|
10
|
+
hover?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** @deprecated */
|
|
13
|
+
theme?: "light" | "dark";
|
|
14
|
+
}>;
|
|
15
|
+
export declare function ToggleBase<T extends React.ElementType>(props: PropsType<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
package/dist/types/src/ui/formFields/FormPaginatedSelectField/hooks/useFormPaginatedSelectField.d.ts
CHANGED
|
@@ -305,6 +305,7 @@ export declare function useFormPaginatedSelectField<D, M extends boolean = false
|
|
|
305
305
|
is?: string | undefined | undefined;
|
|
306
306
|
exportparts?: string | undefined | undefined;
|
|
307
307
|
part?: string | undefined | undefined;
|
|
308
|
+
onUpdate?: ((action: React.SetStateAction<ValueType<D, M> | null | undefined>) => void) | undefined;
|
|
308
309
|
error?: import('../../../../hooks').FormErrorType;
|
|
309
310
|
};
|
|
310
311
|
};
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export type ToggleBaseSizeType = 'medium' | 'large';
|
|
2
|
-
export type ToggleBasePropsType = {
|
|
3
|
-
/**
|
|
4
|
-
* Активирована ли кнопка. (В дизайне pressed)
|
|
5
|
-
* */
|
|
6
|
-
active?: boolean;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
size?: ToggleBaseSizeType;
|
|
9
|
-
error?: boolean;
|
|
10
|
-
hover?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Включает обертку в ```<button>```, иначе обернет в ```<span>```.
|
|
14
|
-
* */
|
|
15
|
-
isButton?: boolean;
|
|
16
|
-
theme?: "light" | "dark";
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ToggleBaseTypes';
|