@nutui/nutui 4.3.5 → 4.3.7

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +40 -1
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +5822 -6138
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/audio/Audio.js +2 -1
  6. package/dist/packages/audiooperate/AudioOperate.js +2 -1
  7. package/dist/packages/checkbox/Checkbox.js +1 -1
  8. package/dist/packages/{common-DRG0ue26.js → common-BH7uB7Cn.js} +4 -2
  9. package/dist/packages/countdown/Countdown.js +130 -173
  10. package/dist/packages/form/Form.js +2 -2
  11. package/dist/packages/formitem/FormItem.js +2 -2
  12. package/dist/packages/grid/Grid.js +68 -5
  13. package/dist/packages/griditem/GridItem.js +61 -81
  14. package/dist/packages/image/Image.js +79 -111
  15. package/dist/packages/input/Input.js +112 -182
  16. package/dist/packages/inputnumber/InputNumber.js +1 -1
  17. package/dist/packages/invoice/Invoice.js +8 -8
  18. package/dist/packages/menuitem/MenuItem.js +1 -1
  19. package/dist/packages/numberkeyboard/NumberKeyboard.js +6 -2
  20. package/dist/packages/picker/Picker.js +1 -1
  21. package/dist/packages/radio/Radio.js +112 -1
  22. package/dist/packages/radiogroup/RadioGroup.js +60 -1
  23. package/dist/packages/range/Range.js +1 -1
  24. package/dist/packages/rate/Rate.js +1 -1
  25. package/dist/packages/searchbar/Searchbar.js +1 -1
  26. package/dist/packages/step/Step.js +64 -83
  27. package/dist/packages/steps/Steps.js +44 -40
  28. package/dist/packages/switch/Switch.js +1 -1
  29. package/dist/packages/tabpane/TabPane.js +3 -2
  30. package/dist/packages/tabs/Tabs.js +2 -1
  31. package/dist/packages/textarea/Textarea.js +1 -1
  32. package/dist/packages/types-BMA1Y94E.js +4 -0
  33. package/dist/packages/types-BXlnzugj.js +4 -0
  34. package/dist/packages/types-CJeZIBld.js +4 -0
  35. package/dist/packages/uploader/Uploader.js +1 -1
  36. package/dist/smartips/web-types.json +446 -26
  37. package/dist/types/__VUE/audio/index.vue.d.ts +2 -2
  38. package/dist/types/__VUE/audio/types.d.ts +2 -0
  39. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -1
  40. package/dist/types/__VUE/countdown/countdown.vue.d.ts +108 -0
  41. package/dist/types/__VUE/countdown/index.d.ts +5 -0
  42. package/dist/types/__VUE/countdown/util.d.ts +14 -0
  43. package/dist/types/__VUE/form/common.d.ts +1 -0
  44. package/dist/types/__VUE/grid/grid.vue.d.ts +87 -0
  45. package/dist/types/__VUE/grid/index.d.ts +6 -0
  46. package/dist/types/__VUE/grid/types.d.ts +2 -0
  47. package/dist/types/__VUE/griditem/grid-item.vue.d.ts +64 -0
  48. package/dist/types/__VUE/griditem/index.d.ts +5 -0
  49. package/dist/types/__VUE/image/image.vue.d.ts +111 -0
  50. package/dist/types/__VUE/image/index.d.ts +6 -0
  51. package/dist/types/__VUE/input/index.d.ts +6 -0
  52. package/dist/types/__VUE/input/input.vue.d.ts +171 -0
  53. package/dist/types/__VUE/input/{type.d.ts → types.d.ts} +2 -2
  54. package/dist/types/__VUE/input/util.d.ts +1 -1
  55. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +3 -1
  56. package/dist/types/__VUE/picker/Column.vue.d.ts +2 -2
  57. package/dist/types/__VUE/radio/index.d.ts +6 -0
  58. package/dist/types/__VUE/radio/radio.vue.d.ts +74 -0
  59. package/dist/types/__VUE/radiogroup/index.d.ts +5 -0
  60. package/dist/types/__VUE/radiogroup/radio-group.vue.d.ts +66 -0
  61. package/dist/types/__VUE/step/index.d.ts +5 -0
  62. package/dist/types/__VUE/step/step.vue.d.ts +55 -0
  63. package/dist/types/__VUE/steps/index.d.ts +6 -0
  64. package/dist/types/__VUE/steps/steps.vue.d.ts +64 -0
  65. package/dist/types/__VUE/tabs/index.vue.d.ts +1 -1
  66. package/dist/types/__VUE/tabs/types.d.ts +1 -0
  67. package/dist/types/index.d.ts +19 -10
  68. package/dist/types/utils/index.d.ts +2 -0
  69. package/dist/types/utils/useRelation/useParent.d.ts +1 -1
  70. package/package.json +1 -1
  71. package/dist/packages/common-Chr7cC9o.js +0 -145
  72. package/dist/packages/index.vue_vue_type_script_lang-CTQUvlgN.js +0 -99
  73. package/dist/packages/index.vue_vue_type_script_lang-CaSiRl9x.js +0 -46
  74. package/dist/types/__VUE/audiooperate/types.d.ts +0 -1
  75. package/dist/types/__VUE/countdown/index.vue.d.ts +0 -125
  76. package/dist/types/__VUE/grid/common.d.ts +0 -73
  77. package/dist/types/__VUE/grid/index.vue.d.ts +0 -84
  78. package/dist/types/__VUE/griditem/index.vue.d.ts +0 -47
  79. package/dist/types/__VUE/image/index.vue.d.ts +0 -126
  80. package/dist/types/__VUE/input/index.vue.d.ts +0 -221
  81. package/dist/types/__VUE/radio/index.vue.d.ts +0 -64
  82. package/dist/types/__VUE/radiogroup/index.vue.d.ts +0 -49
  83. package/dist/types/__VUE/step/index.vue.d.ts +0 -42
  84. package/dist/types/__VUE/steps/index.vue.d.ts +0 -48
  85. /package/dist/types/__VUE/image/{type.d.ts → types.d.ts} +0 -0
@@ -1 +1,3 @@
1
1
  export type AudioType = 'progress' | 'icon' | 'controls' | 'none';
2
+ export type AudioOperateType = 'play' | 'back' | 'forward' | 'mute';
3
+ export declare const AUDIO_KEY: unique symbol;
@@ -1,5 +1,5 @@
1
1
  import { type PropType } from 'vue';
2
- import type { AudioOperateType } from './types';
2
+ import { type AudioOperateType } from '../audio/types';
3
3
 
4
4
  declare type Install<T> = T & {
5
5
  install(app: import('vue').App): void;
@@ -0,0 +1,108 @@
1
+ import type { WithInstall } from '../../utils';
2
+ export type CountdownProps = Partial<{
3
+ modelValue: Record<string, string>;
4
+ paused: boolean;
5
+ startTime: number | string;
6
+ endTime: number | string;
7
+ millisecond: boolean;
8
+ format: string;
9
+ autoStart: boolean;
10
+ time: number | string;
11
+ }>;
12
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
13
+ modelValue: Record<string, string>;
14
+ paused: boolean;
15
+ startTime: string | number;
16
+ endTime: string | number;
17
+ millisecond: boolean;
18
+ format: string;
19
+ autoStart: boolean;
20
+ time: string | number;
21
+ }>>, {
22
+ paused: boolean;
23
+ startTime: string;
24
+ endTime: string;
25
+ millisecond: boolean;
26
+ format: string;
27
+ autoStart: boolean;
28
+ time: number;
29
+ }>, {
30
+ start: () => void;
31
+ pause: () => void;
32
+ reset: () => void;
33
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
+ input: (...args: any[]) => void;
35
+ end: (...args: any[]) => void;
36
+ paused: (...args: any[]) => void;
37
+ "update:modelValue": (...args: any[]) => void;
38
+ restart: (...args: any[]) => void;
39
+ onEnd: (...args: any[]) => void;
40
+ onRestart: (...args: any[]) => void;
41
+ onPaused: (...args: any[]) => void;
42
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
43
+ modelValue: Record<string, string>;
44
+ paused: boolean;
45
+ startTime: string | number;
46
+ endTime: string | number;
47
+ millisecond: boolean;
48
+ format: string;
49
+ autoStart: boolean;
50
+ time: string | number;
51
+ }>>, {
52
+ paused: boolean;
53
+ startTime: string;
54
+ endTime: string;
55
+ millisecond: boolean;
56
+ format: string;
57
+ autoStart: boolean;
58
+ time: number;
59
+ }>>> & {
60
+ onInput?: ((...args: any[]) => any) | undefined;
61
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
62
+ onEnd?: ((...args: any[]) => any) | undefined;
63
+ onRestart?: ((...args: any[]) => any) | undefined;
64
+ onPaused?: ((...args: any[]) => any) | undefined;
65
+ onOnEnd?: ((...args: any[]) => any) | undefined;
66
+ onOnRestart?: ((...args: any[]) => any) | undefined;
67
+ onOnPaused?: ((...args: any[]) => any) | undefined;
68
+ }, {
69
+ time: string | number;
70
+ paused: boolean;
71
+ startTime: string | number;
72
+ endTime: string | number;
73
+ millisecond: boolean;
74
+ format: string;
75
+ autoStart: boolean;
76
+ }, {}>, {
77
+ default?(_: {}): any;
78
+ }>;
79
+ declare const _nut_default: WithInstall<typeof _default>;
80
+ export default _nut_default;
81
+
82
+ declare module 'vue' {
83
+ interface GlobalComponents {
84
+ NutCountdown: typeof _default;
85
+ }
86
+ }
87
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
88
+ type __VLS_TypePropsToRuntimeProps<T> = {
89
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
90
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
91
+ } : {
92
+ type: import('vue').PropType<T[K]>;
93
+ required: true;
94
+ };
95
+ };
96
+ type __VLS_WithDefaults<P, D> = {
97
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
98
+ default: D[K];
99
+ }> : P[K];
100
+ };
101
+ type __VLS_Prettify<T> = {
102
+ [K in keyof T]: T[K];
103
+ } & {};
104
+ type __VLS_WithTemplateSlots<T, S> = T & {
105
+ new (): {
106
+ $slots: S;
107
+ };
108
+ };
@@ -0,0 +1,5 @@
1
+ import Countdown from './countdown.vue';
2
+ import type { ComponentPublicInstance } from 'vue';
3
+ export type { CountdownProps } from './countdown.vue';
4
+ export type CountdownInstance = ComponentPublicInstance & InstanceType<typeof Countdown>;
5
+ export { Countdown, Countdown as default };
@@ -1 +1,15 @@
1
1
  export declare const getTimeStamp: (timeStr?: string | number) => number;
2
+ export declare const parseFormat: (time: {
3
+ d: number;
4
+ h: number;
5
+ m: number;
6
+ s: number;
7
+ ms: number;
8
+ }, format: string) => string;
9
+ export declare const formatRemainTime: (t: number, format: string, type?: string) => string | {
10
+ d: number;
11
+ h: number;
12
+ m: number;
13
+ s: number;
14
+ ms: number;
15
+ };
@@ -1,4 +1,5 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
2
  export declare const FORM_KEY: unique symbol;
3
3
  export declare const FORM_DISABLED_KEY: unique symbol;
4
+ export declare const FORM_TIP_KEY: unique symbol;
4
5
  export declare const useFormDisabled: (disabled: Ref<boolean>) => ComputedRef<boolean>;
@@ -0,0 +1,87 @@
1
+ import type { WithInstall } from '../../utils';
2
+ import { type GridDirection } from './types';
3
+ export type GridProps = Partial<{
4
+ columnNum: string | number;
5
+ border: boolean;
6
+ gutter: string | number;
7
+ center: boolean;
8
+ square: boolean;
9
+ reverse: boolean;
10
+ direction: GridDirection;
11
+ clickable: boolean;
12
+ }>;
13
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
14
+ columnNum: string | number;
15
+ border: boolean;
16
+ gutter: string | number;
17
+ center: boolean;
18
+ square: boolean;
19
+ reverse: boolean;
20
+ direction: GridDirection;
21
+ clickable: boolean;
22
+ }>>, {
23
+ columnNum: number;
24
+ border: boolean;
25
+ gutter: number;
26
+ center: boolean;
27
+ square: boolean;
28
+ reverse: boolean;
29
+ clickable: boolean;
30
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
31
+ columnNum: string | number;
32
+ border: boolean;
33
+ gutter: string | number;
34
+ center: boolean;
35
+ square: boolean;
36
+ reverse: boolean;
37
+ direction: GridDirection;
38
+ clickable: boolean;
39
+ }>>, {
40
+ columnNum: number;
41
+ border: boolean;
42
+ gutter: number;
43
+ center: boolean;
44
+ square: boolean;
45
+ reverse: boolean;
46
+ clickable: boolean;
47
+ }>>>, {
48
+ square: boolean;
49
+ reverse: boolean;
50
+ center: boolean;
51
+ border: boolean;
52
+ gutter: string | number;
53
+ columnNum: string | number;
54
+ clickable: boolean;
55
+ }, {}>, {
56
+ default?(_: {}): any;
57
+ }>;
58
+ declare const _nut_default: WithInstall<typeof _default>;
59
+ export default _nut_default;
60
+
61
+ declare module 'vue' {
62
+ interface GlobalComponents {
63
+ NutGrid: typeof _default;
64
+ }
65
+ }
66
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
67
+ type __VLS_TypePropsToRuntimeProps<T> = {
68
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
69
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
70
+ } : {
71
+ type: import('vue').PropType<T[K]>;
72
+ required: true;
73
+ };
74
+ };
75
+ type __VLS_WithDefaults<P, D> = {
76
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
77
+ default: D[K];
78
+ }> : P[K];
79
+ };
80
+ type __VLS_Prettify<T> = {
81
+ [K in keyof T]: T[K];
82
+ } & {};
83
+ type __VLS_WithTemplateSlots<T, S> = T & {
84
+ new (): {
85
+ $slots: S;
86
+ };
87
+ };
@@ -0,0 +1,6 @@
1
+ import Grid from './grid.vue';
2
+ import type { ComponentPublicInstance } from 'vue';
3
+ export type { GridProps } from './grid.vue';
4
+ export type { GridDirection } from './types';
5
+ export type GridInstance = ComponentPublicInstance & InstanceType<typeof Grid>;
6
+ export { Grid, Grid as default };
@@ -0,0 +1,2 @@
1
+ export declare const GRID_KEY: unique symbol;
2
+ export type GridDirection = 'horizontal' | 'vertical';
@@ -0,0 +1,64 @@
1
+ import type { WithInstall } from '../../utils';
2
+ export type GridItemProps = Partial<{
3
+ text: string;
4
+ to: string | object;
5
+ url: string;
6
+ replace: boolean;
7
+ }>;
8
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
9
+ text: string;
10
+ to: string | object;
11
+ url: string;
12
+ replace: boolean;
13
+ }>>, {
14
+ url: string;
15
+ replace: boolean;
16
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ click: (...args: any[]) => void;
18
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
19
+ text: string;
20
+ to: string | object;
21
+ url: string;
22
+ replace: boolean;
23
+ }>>, {
24
+ url: string;
25
+ replace: boolean;
26
+ }>>> & {
27
+ onClick?: ((...args: any[]) => any) | undefined;
28
+ }, {
29
+ replace: boolean;
30
+ url: string;
31
+ }, {}>, {
32
+ default?(_: {}): any;
33
+ text?(_: {}): any;
34
+ }>;
35
+ declare const _nut_default: WithInstall<typeof _default>;
36
+ export default _nut_default;
37
+
38
+ declare module 'vue' {
39
+ interface GlobalComponents {
40
+ NutGridItem: typeof _default;
41
+ }
42
+ }
43
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
44
+ type __VLS_TypePropsToRuntimeProps<T> = {
45
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
46
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
47
+ } : {
48
+ type: import('vue').PropType<T[K]>;
49
+ required: true;
50
+ };
51
+ };
52
+ type __VLS_WithDefaults<P, D> = {
53
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
54
+ default: D[K];
55
+ }> : P[K];
56
+ };
57
+ type __VLS_Prettify<T> = {
58
+ [K in keyof T]: T[K];
59
+ } & {};
60
+ type __VLS_WithTemplateSlots<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
@@ -0,0 +1,5 @@
1
+ import GridItem from './grid-item.vue';
2
+ import type { ComponentPublicInstance } from 'vue';
3
+ export type { GridItemProps } from './grid-item.vue';
4
+ export type GridItemInstance = ComponentPublicInstance & InstanceType<typeof GridItem>;
5
+ export { GridItem, GridItem as default };
@@ -0,0 +1,111 @@
1
+ import type { WithInstall } from '../../utils';
2
+ import { ImageFit, ImagePosition } from './types';
3
+ export type ImageProps = Partial<{
4
+ src: string;
5
+ fit: ImageFit;
6
+ position: ImagePosition;
7
+ alt: string;
8
+ width: string;
9
+ height: string;
10
+ round: boolean;
11
+ radius: string | number;
12
+ showError: boolean;
13
+ showLoading: boolean;
14
+ lazyLoad: boolean;
15
+ }>;
16
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
17
+ src: string;
18
+ fit: ImageFit;
19
+ position: string;
20
+ alt: string;
21
+ width: string;
22
+ height: string;
23
+ round: boolean;
24
+ radius: string | number;
25
+ showError: boolean;
26
+ showLoading: boolean;
27
+ lazyLoad: boolean;
28
+ }>>, {
29
+ fit: string;
30
+ position: string;
31
+ alt: string;
32
+ width: string;
33
+ height: string;
34
+ round: boolean;
35
+ showError: boolean;
36
+ showLoading: boolean;
37
+ lazyLoad: boolean;
38
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
39
+ click: (...args: any[]) => void;
40
+ error: (...args: any[]) => void;
41
+ load: (...args: any[]) => void;
42
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
43
+ src: string;
44
+ fit: ImageFit;
45
+ position: string;
46
+ alt: string;
47
+ width: string;
48
+ height: string;
49
+ round: boolean;
50
+ radius: string | number;
51
+ showError: boolean;
52
+ showLoading: boolean;
53
+ lazyLoad: boolean;
54
+ }>>, {
55
+ fit: string;
56
+ position: string;
57
+ alt: string;
58
+ width: string;
59
+ height: string;
60
+ round: boolean;
61
+ showError: boolean;
62
+ showLoading: boolean;
63
+ lazyLoad: boolean;
64
+ }>>> & {
65
+ onClick?: ((...args: any[]) => any) | undefined;
66
+ onLoad?: ((...args: any[]) => any) | undefined;
67
+ onError?: ((...args: any[]) => any) | undefined;
68
+ }, {
69
+ round: boolean;
70
+ width: string;
71
+ height: string;
72
+ position: string;
73
+ fit: ImageFit;
74
+ alt: string;
75
+ showError: boolean;
76
+ showLoading: boolean;
77
+ lazyLoad: boolean;
78
+ }, {}>, {
79
+ loading?(_: {}): any;
80
+ error?(_: {}): any;
81
+ }>;
82
+ declare const _nut_default: WithInstall<typeof _default>;
83
+ export default _nut_default;
84
+
85
+ declare module 'vue' {
86
+ interface GlobalComponents {
87
+ NutImage: typeof _default;
88
+ }
89
+ }
90
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
91
+ type __VLS_TypePropsToRuntimeProps<T> = {
92
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
93
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
94
+ } : {
95
+ type: import('vue').PropType<T[K]>;
96
+ required: true;
97
+ };
98
+ };
99
+ type __VLS_WithDefaults<P, D> = {
100
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
101
+ default: D[K];
102
+ }> : P[K];
103
+ };
104
+ type __VLS_Prettify<T> = {
105
+ [K in keyof T]: T[K];
106
+ } & {};
107
+ type __VLS_WithTemplateSlots<T, S> = T & {
108
+ new (): {
109
+ $slots: S;
110
+ };
111
+ };
@@ -0,0 +1,6 @@
1
+ import Image from './image.vue';
2
+ import type { ComponentPublicInstance } from 'vue';
3
+ export type { ImageProps } from './image.vue';
4
+ export type { ImageFit, ImagePosition } from './types';
5
+ export type ImageInstance = ComponentPublicInstance & InstanceType<typeof Image>;
6
+ export { Image, Image as default };
@@ -0,0 +1,6 @@
1
+ import Input from './input.vue';
2
+ import type { ComponentPublicInstance } from 'vue';
3
+ export type { InputProps } from './input.vue';
4
+ export type { InputType, InputAlign, InputConfirmType, InputFormatTrigger } from './types';
5
+ export type InputInstance = ComponentPublicInstance & InstanceType<typeof Input>;
6
+ export { Input, Input as default };
@@ -0,0 +1,171 @@
1
+ import type { WithInstall } from '../../utils';
2
+ import type { InputType, InputAlign, InputFormatTrigger, InputConfirmType } from './types';
3
+ export type InputProps = Partial<{
4
+ type: InputType;
5
+ modelValue: string | number;
6
+ placeholder: string;
7
+ inputAlign: InputAlign;
8
+ required: boolean;
9
+ disabled: boolean;
10
+ readonly: boolean;
11
+ maxLength: string | number;
12
+ clearable: boolean;
13
+ clearSize: string | number;
14
+ border: boolean;
15
+ formatTrigger: InputFormatTrigger;
16
+ formatter: (value: string) => string;
17
+ showWordLimit: boolean;
18
+ autofocus: boolean;
19
+ confirmType: InputConfirmType;
20
+ error: boolean;
21
+ showClearIcon: boolean;
22
+ }>;
23
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
24
+ type: InputType;
25
+ modelValue: string | number;
26
+ placeholder: string;
27
+ inputAlign: InputAlign;
28
+ required: boolean;
29
+ disabled: boolean;
30
+ readonly: boolean;
31
+ maxLength: string | number;
32
+ clearable: boolean;
33
+ clearSize: string | number;
34
+ border: boolean;
35
+ formatTrigger: InputFormatTrigger;
36
+ formatter: (value: string) => string;
37
+ showWordLimit: boolean;
38
+ autofocus: boolean;
39
+ confirmType: InputConfirmType;
40
+ error: boolean;
41
+ showClearIcon: boolean;
42
+ }>>, {
43
+ type: string;
44
+ modelValue: string;
45
+ placeholder: string;
46
+ inputAlign: string;
47
+ required: boolean;
48
+ disabled: boolean;
49
+ readonly: boolean;
50
+ maxLength: string;
51
+ clearable: boolean;
52
+ clearSize: string;
53
+ border: boolean;
54
+ formatTrigger: string;
55
+ showWordLimit: boolean;
56
+ autofocus: boolean;
57
+ confirmType: string;
58
+ error: boolean;
59
+ showClearIcon: boolean;
60
+ }>, {
61
+ focus: () => void;
62
+ blur: () => void;
63
+ select: () => void;
64
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
65
+ click: (...args: any[]) => void;
66
+ clear: (...args: any[]) => void;
67
+ blur: (...args: any[]) => void;
68
+ focus: (...args: any[]) => void;
69
+ keypress: (...args: any[]) => void;
70
+ "update:modelValue": (...args: any[]) => void;
71
+ clickInput: (...args: any[]) => void;
72
+ confirm: (...args: any[]) => void;
73
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
74
+ type: InputType;
75
+ modelValue: string | number;
76
+ placeholder: string;
77
+ inputAlign: InputAlign;
78
+ required: boolean;
79
+ disabled: boolean;
80
+ readonly: boolean;
81
+ maxLength: string | number;
82
+ clearable: boolean;
83
+ clearSize: string | number;
84
+ border: boolean;
85
+ formatTrigger: InputFormatTrigger;
86
+ formatter: (value: string) => string;
87
+ showWordLimit: boolean;
88
+ autofocus: boolean;
89
+ confirmType: InputConfirmType;
90
+ error: boolean;
91
+ showClearIcon: boolean;
92
+ }>>, {
93
+ type: string;
94
+ modelValue: string;
95
+ placeholder: string;
96
+ inputAlign: string;
97
+ required: boolean;
98
+ disabled: boolean;
99
+ readonly: boolean;
100
+ maxLength: string;
101
+ clearable: boolean;
102
+ clearSize: string;
103
+ border: boolean;
104
+ formatTrigger: string;
105
+ showWordLimit: boolean;
106
+ autofocus: boolean;
107
+ confirmType: string;
108
+ error: boolean;
109
+ showClearIcon: boolean;
110
+ }>>> & {
111
+ onClick?: ((...args: any[]) => any) | undefined;
112
+ onFocus?: ((...args: any[]) => any) | undefined;
113
+ onBlur?: ((...args: any[]) => any) | undefined;
114
+ onKeypress?: ((...args: any[]) => any) | undefined;
115
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
116
+ onClear?: ((...args: any[]) => any) | undefined;
117
+ onClickInput?: ((...args: any[]) => any) | undefined;
118
+ onConfirm?: ((...args: any[]) => any) | undefined;
119
+ }, {
120
+ disabled: boolean;
121
+ type: InputType;
122
+ error: boolean;
123
+ border: boolean;
124
+ placeholder: string;
125
+ modelValue: string | number;
126
+ maxLength: string | number;
127
+ clearable: boolean;
128
+ autofocus: boolean;
129
+ readonly: boolean;
130
+ inputAlign: InputAlign;
131
+ required: boolean;
132
+ clearSize: string | number;
133
+ formatTrigger: InputFormatTrigger;
134
+ showWordLimit: boolean;
135
+ confirmType: InputConfirmType;
136
+ showClearIcon: boolean;
137
+ }, {}>, {
138
+ left?(_: {}): any;
139
+ clear?(_: {}): any;
140
+ right?(_: {}): any;
141
+ }>;
142
+ declare const _nut_default: WithInstall<typeof _default>;
143
+ export default _nut_default;
144
+
145
+ declare module 'vue' {
146
+ interface GlobalComponents {
147
+ NutInput: typeof _default;
148
+ }
149
+ }
150
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
151
+ type __VLS_TypePropsToRuntimeProps<T> = {
152
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
153
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
154
+ } : {
155
+ type: import('vue').PropType<T[K]>;
156
+ required: true;
157
+ };
158
+ };
159
+ type __VLS_WithDefaults<P, D> = {
160
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
161
+ default: D[K];
162
+ }> : P[K];
163
+ };
164
+ type __VLS_Prettify<T> = {
165
+ [K in keyof T]: T[K];
166
+ } & {};
167
+ type __VLS_WithTemplateSlots<T, S> = T & {
168
+ new (): {
169
+ $slots: S;
170
+ };
171
+ };
@@ -1,4 +1,4 @@
1
- export type InputAlignType = 'left' | 'center' | 'right';
1
+ export type InputAlign = 'left' | 'center' | 'right';
2
2
  export type InputFormatTrigger = 'onChange' | 'onBlur';
3
3
  export type InputType = 'tel' | 'url' | 'date' | 'file' | 'text' | 'time' | 'week' | 'color' | 'digit' | 'email' | 'image' | 'month' | 'radio' | 'range' | 'reset' | 'button' | 'hidden' | 'number' | 'search' | 'submit' | 'checkbox' | 'password' | 'textarea' | 'datetime-local' | 'idcard' | 'nickname' | 'safe-password';
4
4
  export type InputRule = {
@@ -6,7 +6,7 @@ export type InputRule = {
6
6
  message?: string;
7
7
  required?: boolean;
8
8
  };
9
- export type ConfirmTextType = 'send' | 'search' | 'next' | 'go' | 'done';
9
+ export type InputConfirmType = 'send' | 'search' | 'next' | 'go' | 'done';
10
10
  export interface InputTarget extends HTMLInputElement {
11
11
  composing?: boolean;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  import type { HTMLAttributes, InputHTMLAttributes } from 'vue';
2
- import type { InputType } from './type';
2
+ import type { InputType } from './types';
3
3
  export declare function formatNumber(value: string, allowDot?: boolean, allowMinus?: boolean): string;
4
4
  export declare function mapInputType(type: InputType): {
5
5
  type: InputHTMLAttributes['type'];
@@ -53,6 +53,7 @@ declare const _default: Install< import("vue").DefineComponent<{
53
53
  clickKeyIndex: Ref<string | number | undefined>;
54
54
  defaultKey: () => keys[];
55
55
  closeBoard: () => void;
56
+ confirm: () => void;
56
57
  onTouchEnd: (event: TouchEvent) => void;
57
58
  onTouchMove: (event: TouchEvent) => void;
58
59
  onTouchstart: (item: {
@@ -65,7 +66,7 @@ declare const _default: Install< import("vue").DefineComponent<{
65
66
  root: Ref<any>;
66
67
  show: Ref<boolean>;
67
68
  translate: (keyPath: string, ...args: unknown[]) => any;
68
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "delete" | "blur" | "close" | "update:visible" | "update:modelValue")[], "input" | "delete" | "blur" | "close" | "update:visible" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
69
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "delete" | "blur" | "close" | "update:visible" | "update:modelValue" | "confirm")[], "input" | "delete" | "blur" | "close" | "update:visible" | "update:modelValue" | "confirm", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
69
70
  confirmText: {
70
71
  type: StringConstructor;
71
72
  default: string;
@@ -112,6 +113,7 @@ declare const _default: Install< import("vue").DefineComponent<{
112
113
  onClose?: ((...args: any[]) => any) | undefined;
113
114
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
114
115
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
116
+ onConfirm?: ((...args: any[]) => any) | undefined;
115
117
  onDelete?: ((...args: any[]) => any) | undefined;
116
118
  }, {
117
119
  type: NumberKeyboardType;