@naptics/vue-collection 0.0.5 → 0.0.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.
- package/README.md +1 -1
- package/components/NAlert.d.ts +20 -20
- package/components/NAlert.js +3 -3
- package/components/NBadge.d.ts +87 -87
- package/components/NBadge.js +3 -3
- package/components/NBreadcrub.d.ts +57 -57
- package/components/NBreadcrub.js +3 -3
- package/components/NButton.d.ts +69 -69
- package/components/NButton.js +3 -3
- package/components/NCheckbox.d.ts +20 -20
- package/components/NCheckbox.js +3 -3
- package/components/NCheckboxLabel.d.ts +30 -30
- package/components/NCheckboxLabel.js +3 -3
- package/components/NCrudModal.d.ts +238 -203
- package/components/NCrudModal.js +17 -4
- package/components/NDialog.d.ts +1 -1
- package/components/NDialog.js +3 -3
- package/components/NDropdown.d.ts +25 -25
- package/components/NDropdown.js +3 -3
- package/components/NDropzone.d.ts +52 -52
- package/components/NDropzone.js +3 -3
- package/components/NForm.d.ts +6 -6
- package/components/NForm.js +3 -3
- package/components/NFormModal.d.ts +136 -136
- package/components/NFormModal.js +3 -3
- package/components/NIconButton.d.ts +94 -94
- package/components/NIconButton.js +3 -3
- package/components/NIconCircle.d.ts +46 -46
- package/components/NIconCircle.js +3 -3
- package/components/NInput.d.ts +94 -94
- package/components/NInput.js +3 -3
- package/components/NInputPhone.d.ts +125 -125
- package/components/NInputPhone.js +2 -2
- package/components/NInputSelect.d.ts +131 -131
- package/components/NInputSelect.js +3 -3
- package/components/NInputSuggestion.d.ts +179 -167
- package/components/NInputSuggestion.js +3 -3
- package/components/NLink.d.ts +32 -32
- package/components/NLink.js +3 -3
- package/components/NList.d.ts +10 -10
- package/components/NList.js +3 -3
- package/components/NLoadingIndicator.d.ts +30 -30
- package/components/NLoadingIndicator.js +3 -3
- package/components/NModal.d.ts +118 -118
- package/components/NModal.js +3 -3
- package/components/NPagination.d.ts +30 -30
- package/components/NPagination.js +3 -3
- package/components/NSearchbar.d.ts +29 -29
- package/components/NSearchbar.js +3 -3
- package/components/NSearchbarList.d.ts +53 -62
- package/components/NSearchbarList.js +3 -3
- package/components/NSelect.d.ts +64 -64
- package/components/NSelect.js +3 -3
- package/components/NSuggestionList.d.ts +84 -84
- package/components/NSuggestionList.js +7 -7
- package/components/NTable.d.ts +29 -29
- package/components/NTable.js +3 -3
- package/components/NTableAction.d.ts +19 -19
- package/components/NTableAction.js +3 -3
- package/components/NTextArea.d.ts +118 -118
- package/components/NTextArea.js +5 -5
- package/components/NTooltip.d.ts +42 -42
- package/components/NTooltip.js +3 -3
- package/components/NValInput.d.ts +134 -134
- package/components/NValInput.js +5 -5
- package/index.d.ts +2 -66
- package/index.js +2 -67
- package/package.json +3 -1
- package/utils/breakpoints.d.ts +3 -0
- package/utils/breakpoints.js +3 -0
- package/utils/component.d.ts +0 -8
- package/utils/component.js +0 -10
- package/utils/identifiable.d.ts +8 -8
- package/utils/identifiable.js +4 -2
- package/utils/tailwind.d.ts +2 -0
- package/utils/utils.d.ts +25 -12
- package/utils/utils.js +30 -9
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import type { HeroIcon } from '../utils/
|
|
1
|
+
import type { HeroIcon } from '../utils/tailwind';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
export declare const nIconCircleProps: {
|
|
4
4
|
/**
|
|
5
5
|
* The icon of the icon-circle.
|
|
6
6
|
*/
|
|
7
|
-
icon: {
|
|
8
|
-
type: PropType<HeroIcon>;
|
|
9
|
-
required: true;
|
|
7
|
+
readonly icon: {
|
|
8
|
+
readonly type: PropType<HeroIcon>;
|
|
9
|
+
readonly required: true;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* The color of the icon-circle.
|
|
13
13
|
*/
|
|
14
|
-
color: {
|
|
15
|
-
type: StringConstructor;
|
|
16
|
-
default:
|
|
14
|
+
readonly color: {
|
|
15
|
+
readonly type: StringConstructor;
|
|
16
|
+
readonly default: "primary";
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* The size of the circle in "tailwind units" (4 px).
|
|
20
20
|
* Tailwind classes are used for the size, so any number can be passed.
|
|
21
21
|
* If the `iconSize` is not set, it will be adjusted automatically.
|
|
22
22
|
*/
|
|
23
|
-
circleSize: NumberConstructor;
|
|
23
|
+
readonly circleSize: NumberConstructor;
|
|
24
24
|
/**
|
|
25
25
|
* The size of the icon in "tailwind units" (4 px).
|
|
26
26
|
* No tailwind classes are used for the size, so any number can be passed.
|
|
27
27
|
* If the `circleSize` is not set, it will be adjusted automatically.
|
|
28
28
|
*/
|
|
29
|
-
iconSize: NumberConstructor;
|
|
29
|
+
readonly iconSize: NumberConstructor;
|
|
30
30
|
/**
|
|
31
31
|
* The shade of the icon.
|
|
32
32
|
*/
|
|
33
|
-
iconShade: {
|
|
34
|
-
type: NumberConstructor;
|
|
35
|
-
default:
|
|
33
|
+
readonly iconShade: {
|
|
34
|
+
readonly type: NumberConstructor;
|
|
35
|
+
readonly default: 600;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* The shade of the background.
|
|
39
39
|
*/
|
|
40
|
-
bgShade: {
|
|
41
|
-
type: NumberConstructor;
|
|
42
|
-
default:
|
|
40
|
+
readonly bgShade: {
|
|
41
|
+
readonly type: NumberConstructor;
|
|
42
|
+
readonly default: 100;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
@@ -49,87 +49,87 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
/**
|
|
50
50
|
* The icon of the icon-circle.
|
|
51
51
|
*/
|
|
52
|
-
icon: {
|
|
53
|
-
type: PropType<HeroIcon>;
|
|
54
|
-
required: true;
|
|
52
|
+
readonly icon: {
|
|
53
|
+
readonly type: PropType<HeroIcon>;
|
|
54
|
+
readonly required: true;
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* The color of the icon-circle.
|
|
58
58
|
*/
|
|
59
|
-
color: {
|
|
60
|
-
type: StringConstructor;
|
|
61
|
-
default:
|
|
59
|
+
readonly color: {
|
|
60
|
+
readonly type: StringConstructor;
|
|
61
|
+
readonly default: "primary";
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
64
64
|
* The size of the circle in "tailwind units" (4 px).
|
|
65
65
|
* Tailwind classes are used for the size, so any number can be passed.
|
|
66
66
|
* If the `iconSize` is not set, it will be adjusted automatically.
|
|
67
67
|
*/
|
|
68
|
-
circleSize: NumberConstructor;
|
|
68
|
+
readonly circleSize: NumberConstructor;
|
|
69
69
|
/**
|
|
70
70
|
* The size of the icon in "tailwind units" (4 px).
|
|
71
71
|
* No tailwind classes are used for the size, so any number can be passed.
|
|
72
72
|
* If the `circleSize` is not set, it will be adjusted automatically.
|
|
73
73
|
*/
|
|
74
|
-
iconSize: NumberConstructor;
|
|
74
|
+
readonly iconSize: NumberConstructor;
|
|
75
75
|
/**
|
|
76
76
|
* The shade of the icon.
|
|
77
77
|
*/
|
|
78
|
-
iconShade: {
|
|
79
|
-
type: NumberConstructor;
|
|
80
|
-
default:
|
|
78
|
+
readonly iconShade: {
|
|
79
|
+
readonly type: NumberConstructor;
|
|
80
|
+
readonly default: 600;
|
|
81
81
|
};
|
|
82
82
|
/**
|
|
83
83
|
* The shade of the background.
|
|
84
84
|
*/
|
|
85
|
-
bgShade: {
|
|
86
|
-
type: NumberConstructor;
|
|
87
|
-
default:
|
|
85
|
+
readonly bgShade: {
|
|
86
|
+
readonly type: NumberConstructor;
|
|
87
|
+
readonly default: 100;
|
|
88
88
|
};
|
|
89
89
|
}, import("vue").RenderFunction, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
90
90
|
/**
|
|
91
91
|
* The icon of the icon-circle.
|
|
92
92
|
*/
|
|
93
|
-
icon: {
|
|
94
|
-
type: PropType<HeroIcon>;
|
|
95
|
-
required: true;
|
|
93
|
+
readonly icon: {
|
|
94
|
+
readonly type: PropType<HeroIcon>;
|
|
95
|
+
readonly required: true;
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
98
98
|
* The color of the icon-circle.
|
|
99
99
|
*/
|
|
100
|
-
color: {
|
|
101
|
-
type: StringConstructor;
|
|
102
|
-
default:
|
|
100
|
+
readonly color: {
|
|
101
|
+
readonly type: StringConstructor;
|
|
102
|
+
readonly default: "primary";
|
|
103
103
|
};
|
|
104
104
|
/**
|
|
105
105
|
* The size of the circle in "tailwind units" (4 px).
|
|
106
106
|
* Tailwind classes are used for the size, so any number can be passed.
|
|
107
107
|
* If the `iconSize` is not set, it will be adjusted automatically.
|
|
108
108
|
*/
|
|
109
|
-
circleSize: NumberConstructor;
|
|
109
|
+
readonly circleSize: NumberConstructor;
|
|
110
110
|
/**
|
|
111
111
|
* The size of the icon in "tailwind units" (4 px).
|
|
112
112
|
* No tailwind classes are used for the size, so any number can be passed.
|
|
113
113
|
* If the `circleSize` is not set, it will be adjusted automatically.
|
|
114
114
|
*/
|
|
115
|
-
iconSize: NumberConstructor;
|
|
115
|
+
readonly iconSize: NumberConstructor;
|
|
116
116
|
/**
|
|
117
117
|
* The shade of the icon.
|
|
118
118
|
*/
|
|
119
|
-
iconShade: {
|
|
120
|
-
type: NumberConstructor;
|
|
121
|
-
default:
|
|
119
|
+
readonly iconShade: {
|
|
120
|
+
readonly type: NumberConstructor;
|
|
121
|
+
readonly default: 600;
|
|
122
122
|
};
|
|
123
123
|
/**
|
|
124
124
|
* The shade of the background.
|
|
125
125
|
*/
|
|
126
|
-
bgShade: {
|
|
127
|
-
type: NumberConstructor;
|
|
128
|
-
default:
|
|
126
|
+
readonly bgShade: {
|
|
127
|
+
readonly type: NumberConstructor;
|
|
128
|
+
readonly default: 100;
|
|
129
129
|
};
|
|
130
130
|
}>> & {}, {
|
|
131
|
-
color: string;
|
|
132
|
-
iconShade: number;
|
|
133
|
-
bgShade: number;
|
|
131
|
+
readonly color: string;
|
|
132
|
+
readonly iconShade: number;
|
|
133
|
+
readonly bgShade: number;
|
|
134
134
|
}>;
|
|
135
135
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
|
2
|
-
import { createComponent
|
|
3
|
-
export const nIconCircleProps =
|
|
2
|
+
import { createComponent } from '../utils/component';
|
|
3
|
+
export const nIconCircleProps = {
|
|
4
4
|
/**
|
|
5
5
|
* The icon of the icon-circle.
|
|
6
6
|
*/
|
|
@@ -41,7 +41,7 @@ export const nIconCircleProps = createProps({
|
|
|
41
41
|
type: Number,
|
|
42
42
|
default: 100
|
|
43
43
|
}
|
|
44
|
-
}
|
|
44
|
+
};
|
|
45
45
|
const DEFAULT_CIRCLE_SIZE = 16;
|
|
46
46
|
const SCALING_FACTOR = 0.55;
|
|
47
47
|
/**
|
package/components/NInput.d.ts
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
2
|
import './NInput.css';
|
|
3
3
|
export declare const nInputProps: {
|
|
4
|
-
tooltipText: StringConstructor;
|
|
5
|
-
tooltipContent: PropType<() => void>;
|
|
6
|
-
tooltipHide: BooleanConstructor;
|
|
7
|
-
tooltipShow: BooleanConstructor;
|
|
8
|
-
tooltipPlacement: {
|
|
9
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
10
|
-
default:
|
|
4
|
+
readonly tooltipText: StringConstructor;
|
|
5
|
+
readonly tooltipContent: PropType<() => void>;
|
|
6
|
+
readonly tooltipHide: BooleanConstructor;
|
|
7
|
+
readonly tooltipShow: BooleanConstructor;
|
|
8
|
+
readonly tooltipPlacement: {
|
|
9
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
10
|
+
readonly default: "auto";
|
|
11
11
|
};
|
|
12
|
-
tooltipMaxWidth: {
|
|
13
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
14
|
-
default:
|
|
12
|
+
readonly tooltipMaxWidth: {
|
|
13
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
14
|
+
readonly default: "max-w-xs";
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* The name of the input. Is displayed as a label above the input.
|
|
18
18
|
*/
|
|
19
|
-
name: StringConstructor;
|
|
19
|
+
readonly name: StringConstructor;
|
|
20
20
|
/**
|
|
21
21
|
* The placeholder of the input.
|
|
22
22
|
*/
|
|
23
|
-
placeholder: StringConstructor;
|
|
23
|
+
readonly placeholder: StringConstructor;
|
|
24
24
|
/**
|
|
25
25
|
* The html autocomplete attribute of the input.
|
|
26
26
|
*/
|
|
27
|
-
autocomplete: {
|
|
28
|
-
type: StringConstructor;
|
|
29
|
-
default:
|
|
27
|
+
readonly autocomplete: {
|
|
28
|
+
readonly type: StringConstructor;
|
|
29
|
+
readonly default: "off";
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* The html type attribute of the input.
|
|
33
33
|
*/
|
|
34
|
-
type: {
|
|
35
|
-
type: StringConstructor;
|
|
36
|
-
default:
|
|
34
|
+
readonly type: {
|
|
35
|
+
readonly type: StringConstructor;
|
|
36
|
+
readonly default: "text";
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
39
|
* The maximum value of the input.
|
|
40
40
|
*/
|
|
41
|
-
max: StringConstructor;
|
|
41
|
+
readonly max: StringConstructor;
|
|
42
42
|
/**
|
|
43
43
|
* The minimum value of the input.
|
|
44
44
|
*/
|
|
45
|
-
min: StringConstructor;
|
|
45
|
+
readonly min: StringConstructor;
|
|
46
46
|
/**
|
|
47
47
|
* If set to `true` the input is displayed with a red border.
|
|
48
48
|
*/
|
|
49
|
-
error: BooleanConstructor;
|
|
49
|
+
readonly error: BooleanConstructor;
|
|
50
50
|
/**
|
|
51
51
|
* If set to `true` the input is disabled and no interaction is possible.
|
|
52
52
|
*/
|
|
53
|
-
disabled: BooleanConstructor;
|
|
53
|
+
readonly disabled: BooleanConstructor;
|
|
54
54
|
/**
|
|
55
55
|
* If set to `true` the input is displayed smaller.
|
|
56
56
|
*/
|
|
57
|
-
small: BooleanConstructor;
|
|
57
|
+
readonly small: BooleanConstructor;
|
|
58
58
|
/**
|
|
59
59
|
* If set to `true` the input's label is hidden.
|
|
60
60
|
*/
|
|
61
|
-
hideLabel: BooleanConstructor;
|
|
61
|
+
readonly hideLabel: BooleanConstructor;
|
|
62
62
|
/**
|
|
63
63
|
* This is called when the input reveices focus.
|
|
64
64
|
*/
|
|
65
|
-
onFocus: PropType<() => void>;
|
|
65
|
+
readonly onFocus: PropType<() => void>;
|
|
66
66
|
/**
|
|
67
67
|
* This is called when the input looses focus.
|
|
68
68
|
*/
|
|
69
|
-
onBlur: PropType<() => void>;
|
|
70
|
-
value: PropType<string>;
|
|
71
|
-
onUpdateValue: PropType<(newValue: string) => void>;
|
|
69
|
+
readonly onBlur: PropType<() => void>;
|
|
70
|
+
readonly value: PropType<string>;
|
|
71
|
+
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
72
72
|
};
|
|
73
73
|
export type NInputExposed = {
|
|
74
74
|
/**
|
|
@@ -80,153 +80,153 @@ export type NInputExposed = {
|
|
|
80
80
|
* The base class of inputs. A styled input with a lot of configuration possibilities but no validation.
|
|
81
81
|
*/
|
|
82
82
|
declare const _default: import("vue").DefineComponent<{
|
|
83
|
-
tooltipText: StringConstructor;
|
|
84
|
-
tooltipContent: PropType<() => void>;
|
|
85
|
-
tooltipHide: BooleanConstructor;
|
|
86
|
-
tooltipShow: BooleanConstructor;
|
|
87
|
-
tooltipPlacement: {
|
|
88
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
89
|
-
default:
|
|
83
|
+
readonly tooltipText: StringConstructor;
|
|
84
|
+
readonly tooltipContent: PropType<() => void>;
|
|
85
|
+
readonly tooltipHide: BooleanConstructor;
|
|
86
|
+
readonly tooltipShow: BooleanConstructor;
|
|
87
|
+
readonly tooltipPlacement: {
|
|
88
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
89
|
+
readonly default: "auto";
|
|
90
90
|
};
|
|
91
|
-
tooltipMaxWidth: {
|
|
92
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
93
|
-
default:
|
|
91
|
+
readonly tooltipMaxWidth: {
|
|
92
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
93
|
+
readonly default: "max-w-xs";
|
|
94
94
|
};
|
|
95
95
|
/**
|
|
96
96
|
* The name of the input. Is displayed as a label above the input.
|
|
97
97
|
*/
|
|
98
|
-
name: StringConstructor;
|
|
98
|
+
readonly name: StringConstructor;
|
|
99
99
|
/**
|
|
100
100
|
* The placeholder of the input.
|
|
101
101
|
*/
|
|
102
|
-
placeholder: StringConstructor;
|
|
102
|
+
readonly placeholder: StringConstructor;
|
|
103
103
|
/**
|
|
104
104
|
* The html autocomplete attribute of the input.
|
|
105
105
|
*/
|
|
106
|
-
autocomplete: {
|
|
107
|
-
type: StringConstructor;
|
|
108
|
-
default:
|
|
106
|
+
readonly autocomplete: {
|
|
107
|
+
readonly type: StringConstructor;
|
|
108
|
+
readonly default: "off";
|
|
109
109
|
};
|
|
110
110
|
/**
|
|
111
111
|
* The html type attribute of the input.
|
|
112
112
|
*/
|
|
113
|
-
type: {
|
|
114
|
-
type: StringConstructor;
|
|
115
|
-
default:
|
|
113
|
+
readonly type: {
|
|
114
|
+
readonly type: StringConstructor;
|
|
115
|
+
readonly default: "text";
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
118
118
|
* The maximum value of the input.
|
|
119
119
|
*/
|
|
120
|
-
max: StringConstructor;
|
|
120
|
+
readonly max: StringConstructor;
|
|
121
121
|
/**
|
|
122
122
|
* The minimum value of the input.
|
|
123
123
|
*/
|
|
124
|
-
min: StringConstructor;
|
|
124
|
+
readonly min: StringConstructor;
|
|
125
125
|
/**
|
|
126
126
|
* If set to `true` the input is displayed with a red border.
|
|
127
127
|
*/
|
|
128
|
-
error: BooleanConstructor;
|
|
128
|
+
readonly error: BooleanConstructor;
|
|
129
129
|
/**
|
|
130
130
|
* If set to `true` the input is disabled and no interaction is possible.
|
|
131
131
|
*/
|
|
132
|
-
disabled: BooleanConstructor;
|
|
132
|
+
readonly disabled: BooleanConstructor;
|
|
133
133
|
/**
|
|
134
134
|
* If set to `true` the input is displayed smaller.
|
|
135
135
|
*/
|
|
136
|
-
small: BooleanConstructor;
|
|
136
|
+
readonly small: BooleanConstructor;
|
|
137
137
|
/**
|
|
138
138
|
* If set to `true` the input's label is hidden.
|
|
139
139
|
*/
|
|
140
|
-
hideLabel: BooleanConstructor;
|
|
140
|
+
readonly hideLabel: BooleanConstructor;
|
|
141
141
|
/**
|
|
142
142
|
* This is called when the input reveices focus.
|
|
143
143
|
*/
|
|
144
|
-
onFocus: PropType<() => void>;
|
|
144
|
+
readonly onFocus: PropType<() => void>;
|
|
145
145
|
/**
|
|
146
146
|
* This is called when the input looses focus.
|
|
147
147
|
*/
|
|
148
|
-
onBlur: PropType<() => void>;
|
|
149
|
-
value: PropType<string>;
|
|
150
|
-
onUpdateValue: PropType<(newValue: string) => void>;
|
|
148
|
+
readonly onBlur: PropType<() => void>;
|
|
149
|
+
readonly value: PropType<string>;
|
|
150
|
+
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
151
151
|
}, import("vue").RenderFunction, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
152
|
-
tooltipText: StringConstructor;
|
|
153
|
-
tooltipContent: PropType<() => void>;
|
|
154
|
-
tooltipHide: BooleanConstructor;
|
|
155
|
-
tooltipShow: BooleanConstructor;
|
|
156
|
-
tooltipPlacement: {
|
|
157
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
158
|
-
default:
|
|
152
|
+
readonly tooltipText: StringConstructor;
|
|
153
|
+
readonly tooltipContent: PropType<() => void>;
|
|
154
|
+
readonly tooltipHide: BooleanConstructor;
|
|
155
|
+
readonly tooltipShow: BooleanConstructor;
|
|
156
|
+
readonly tooltipPlacement: {
|
|
157
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
158
|
+
readonly default: "auto";
|
|
159
159
|
};
|
|
160
|
-
tooltipMaxWidth: {
|
|
161
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
162
|
-
default:
|
|
160
|
+
readonly tooltipMaxWidth: {
|
|
161
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
162
|
+
readonly default: "max-w-xs";
|
|
163
163
|
};
|
|
164
164
|
/**
|
|
165
165
|
* The name of the input. Is displayed as a label above the input.
|
|
166
166
|
*/
|
|
167
|
-
name: StringConstructor;
|
|
167
|
+
readonly name: StringConstructor;
|
|
168
168
|
/**
|
|
169
169
|
* The placeholder of the input.
|
|
170
170
|
*/
|
|
171
|
-
placeholder: StringConstructor;
|
|
171
|
+
readonly placeholder: StringConstructor;
|
|
172
172
|
/**
|
|
173
173
|
* The html autocomplete attribute of the input.
|
|
174
174
|
*/
|
|
175
|
-
autocomplete: {
|
|
176
|
-
type: StringConstructor;
|
|
177
|
-
default:
|
|
175
|
+
readonly autocomplete: {
|
|
176
|
+
readonly type: StringConstructor;
|
|
177
|
+
readonly default: "off";
|
|
178
178
|
};
|
|
179
179
|
/**
|
|
180
180
|
* The html type attribute of the input.
|
|
181
181
|
*/
|
|
182
|
-
type: {
|
|
183
|
-
type: StringConstructor;
|
|
184
|
-
default:
|
|
182
|
+
readonly type: {
|
|
183
|
+
readonly type: StringConstructor;
|
|
184
|
+
readonly default: "text";
|
|
185
185
|
};
|
|
186
186
|
/**
|
|
187
187
|
* The maximum value of the input.
|
|
188
188
|
*/
|
|
189
|
-
max: StringConstructor;
|
|
189
|
+
readonly max: StringConstructor;
|
|
190
190
|
/**
|
|
191
191
|
* The minimum value of the input.
|
|
192
192
|
*/
|
|
193
|
-
min: StringConstructor;
|
|
193
|
+
readonly min: StringConstructor;
|
|
194
194
|
/**
|
|
195
195
|
* If set to `true` the input is displayed with a red border.
|
|
196
196
|
*/
|
|
197
|
-
error: BooleanConstructor;
|
|
197
|
+
readonly error: BooleanConstructor;
|
|
198
198
|
/**
|
|
199
199
|
* If set to `true` the input is disabled and no interaction is possible.
|
|
200
200
|
*/
|
|
201
|
-
disabled: BooleanConstructor;
|
|
201
|
+
readonly disabled: BooleanConstructor;
|
|
202
202
|
/**
|
|
203
203
|
* If set to `true` the input is displayed smaller.
|
|
204
204
|
*/
|
|
205
|
-
small: BooleanConstructor;
|
|
205
|
+
readonly small: BooleanConstructor;
|
|
206
206
|
/**
|
|
207
207
|
* If set to `true` the input's label is hidden.
|
|
208
208
|
*/
|
|
209
|
-
hideLabel: BooleanConstructor;
|
|
209
|
+
readonly hideLabel: BooleanConstructor;
|
|
210
210
|
/**
|
|
211
211
|
* This is called when the input reveices focus.
|
|
212
212
|
*/
|
|
213
|
-
onFocus: PropType<() => void>;
|
|
213
|
+
readonly onFocus: PropType<() => void>;
|
|
214
214
|
/**
|
|
215
215
|
* This is called when the input looses focus.
|
|
216
216
|
*/
|
|
217
|
-
onBlur: PropType<() => void>;
|
|
218
|
-
value: PropType<string>;
|
|
219
|
-
onUpdateValue: PropType<(newValue: string) => void>;
|
|
217
|
+
readonly onBlur: PropType<() => void>;
|
|
218
|
+
readonly value: PropType<string>;
|
|
219
|
+
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
220
220
|
}>> & {}, {
|
|
221
|
-
small: boolean;
|
|
222
|
-
type: string;
|
|
223
|
-
tooltipHide: boolean;
|
|
224
|
-
tooltipShow: boolean;
|
|
225
|
-
tooltipPlacement: import("./NTooltip").TooltipPlacement;
|
|
226
|
-
tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
227
|
-
disabled: boolean;
|
|
228
|
-
error: boolean;
|
|
229
|
-
autocomplete: string;
|
|
230
|
-
hideLabel: boolean;
|
|
221
|
+
readonly small: boolean;
|
|
222
|
+
readonly type: string;
|
|
223
|
+
readonly tooltipHide: boolean;
|
|
224
|
+
readonly tooltipShow: boolean;
|
|
225
|
+
readonly tooltipPlacement: import("./NTooltip").TooltipPlacement;
|
|
226
|
+
readonly tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
227
|
+
readonly disabled: boolean;
|
|
228
|
+
readonly error: boolean;
|
|
229
|
+
readonly autocomplete: string;
|
|
230
|
+
readonly hideLabel: boolean;
|
|
231
231
|
}>;
|
|
232
232
|
export default _default;
|
package/components/NInput.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { mergeProps as _mergeProps, withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from "vue";
|
|
2
|
-
import { createComponent
|
|
2
|
+
import { createComponent } from '../utils/component';
|
|
3
3
|
import { ref } from 'vue';
|
|
4
4
|
import { ExclamationCircleIcon } from '@heroicons/vue/24/solid';
|
|
5
5
|
import NTooltip, { mapTooltipProps, nToolTipPropsForImplementor } from './NTooltip';
|
|
6
6
|
import './NInput.css';
|
|
7
7
|
import { vModelProps } from '../utils/vModel';
|
|
8
|
-
export const nInputProps =
|
|
8
|
+
export const nInputProps = {
|
|
9
9
|
...vModelProps(String),
|
|
10
10
|
/**
|
|
11
11
|
* The name of the input. Is displayed as a label above the input.
|
|
@@ -62,7 +62,7 @@ export const nInputProps = createProps({
|
|
|
62
62
|
*/
|
|
63
63
|
onBlur: Function,
|
|
64
64
|
...nToolTipPropsForImplementor
|
|
65
|
-
}
|
|
65
|
+
};
|
|
66
66
|
/**
|
|
67
67
|
* The base class of inputs. A styled input with a lot of configuration possibilities but no validation.
|
|
68
68
|
*/
|