@nmorph/nmorph-ui-kit 0.2.151 → 0.2.153

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.
@@ -45,9 +45,9 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaul
45
45
  icon: any;
46
46
  }>>> & Readonly<{}>, {
47
47
  loading: boolean;
48
- fill: boolean;
49
48
  height: keyof typeof NmorphComponentHeight;
50
49
  type: keyof typeof NmorphButtonType;
50
+ fill: boolean;
51
51
  text: string | number;
52
52
  disabled: boolean;
53
53
  styleType: keyof typeof NmorphButtonStyle;
@@ -35,8 +35,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaul
35
35
  }>>> & Readonly<{
36
36
  onClose?: () => any;
37
37
  }>, {
38
- fill: boolean;
39
38
  type: keyof typeof NmorphAlertType;
39
+ fill: boolean;
40
40
  html: string;
41
41
  title: string;
42
42
  id: string;
@@ -1,5 +1,5 @@
1
- import { NmorphFormValueType } from './types';
2
- import { DefineComponent, ExtractPropTypes, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
1
+ import { NmorphFormValueType, NmorphFormValidationDataType } from './types';
2
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
3
3
 
4
4
  interface INmorphProps {
5
5
  value: NmorphFormValueType;
@@ -11,16 +11,7 @@ declare function __VLS_template(): {
11
11
  declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<INmorphProps>, {
12
12
  validateImmediately: boolean;
13
13
  }>>, {
14
- formData: {
15
- fields: Record<string, {
16
- touched: Ref<boolean, boolean>;
17
- valid: Ref<boolean, boolean>;
18
- errors: Ref<string[], string[]>;
19
- validate: () => any;
20
- }>;
21
- isFormValid: Ref<boolean, boolean>;
22
- isAnyTouched: Ref<boolean, boolean>;
23
- };
14
+ formData: NmorphFormValidationDataType;
24
15
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<INmorphProps>, {
25
16
  validateImmediately: boolean;
26
17
  }>>> & Readonly<{}>, {
@@ -1,8 +1,8 @@
1
- import { NmorphRulesType, useFormValidation } from '../../../hooks';
1
+ import { INmorphUseFormValidation, NmorphRulesType } from '../../../hooks';
2
2
 
3
3
  export type NmorphAvailableFormValueType = string | string[] | number | number[] | boolean | boolean[] | Date | Date[];
4
4
  export type NmorphFormValueType = Record<string, {
5
5
  value: NmorphAvailableFormValueType;
6
6
  rules: NmorphRulesType;
7
7
  }>;
8
- export type NmorphFormValidationDataType = ReturnType<typeof useFormValidation>;
8
+ export type NmorphFormValidationDataType = INmorphUseFormValidation;
@@ -50,5 +50,5 @@ export declare const useFieldValidation: (data: INmorphUseValidationPayload) =>
50
50
  touched: Ref<boolean, boolean>;
51
51
  valid: Ref<boolean, boolean>;
52
52
  errors: Ref<string[], string[]>;
53
- validate: () => any;
53
+ validate: () => void;
54
54
  };
@@ -1,13 +1,14 @@
1
- import { NmorphFormValueType } from '../components/form/nmorph-form/types';
2
1
  import { Ref } from 'vue';
2
+ import { NmorphFormValueType } from '../components/form/nmorph-form/types';
3
3
 
4
- export declare const useFormValidation: (formData: NmorphFormValueType, validateFormOnLoad?: boolean) => {
4
+ export interface INmorphUseFormValidation {
5
5
  fields: Record<string, {
6
- touched: Ref<boolean, boolean>;
7
- valid: Ref<boolean, boolean>;
8
- errors: Ref<string[], string[]>;
9
- validate: () => any;
6
+ touched: Ref<boolean>;
7
+ valid: Ref<boolean>;
8
+ errors: Ref<string[]>;
9
+ validate: () => void;
10
10
  }>;
11
- isFormValid: Ref<boolean, boolean>;
12
- isAnyTouched: Ref<boolean, boolean>;
13
- };
11
+ isFormValid: Ref<boolean>;
12
+ isAnyTouched: Ref<boolean>;
13
+ }
14
+ export declare const useFormValidation: (formData: NmorphFormValueType, validateFormOnLoad?: boolean) => INmorphUseFormValidation;
@@ -7,4 +7,4 @@ export declare const useNmorphTranslation: (data: INmorphApplyTranslation) => I1
7
7
  zh: TranslateMessages;
8
8
  } | {
9
9
  en: TranslateMessages;
10
- }, {}, {}, "en" | "ru" | "zh" | Locale, true>;
10
+ }, {}, {}, Locale | "en" | "ru" | "zh", true>;
@@ -9,7 +9,7 @@ interface INmorphUsePlacementPayload {
9
9
  xOffset?: number;
10
10
  }
11
11
  export declare const usePlacement: (data: INmorphUsePlacementPayload) => {
12
- placement: Ref<"bottom" | "top" | "left" | "right", "bottom" | "top" | "left" | "right">;
12
+ placement: Ref<"bottom" | "top" | "right" | "left", "bottom" | "top" | "right" | "left">;
13
13
  placementCoords: Ref<{
14
14
  x: string;
15
15
  y: string;
@@ -1,6 +1,10 @@
1
1
  import { Ref } from 'vue';
2
2
  import { I18n } from 'vue-i18n';
3
+ import { NmorphFormValidationDataType } from '../components';
3
4
 
5
+ export interface INmorphFromDataExpose {
6
+ formData: NmorphFormValidationDataType;
7
+ }
4
8
  export declare enum NmorphComponentHeight {
5
9
  thick = "thick-component",
6
10
  default = "default-height-component",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@nmorph/nmorph-ui-kit",
3
3
  "type": "module",
4
4
  "private": false,
5
- "version": "0.2.151",
5
+ "version": "0.2.153",
6
6
  "license": "MIT",
7
7
  "engines": {
8
8
  "node": "18.13.0",