@naptics/vue-collection 0.2.5 → 0.2.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/components/NSelect.d.ts +47 -3
- package/components/NSelect.js +14 -2
- package/package.json +1 -1
package/components/NSelect.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ export declare const nSelectProps: {
|
|
|
8
8
|
readonly tooltipShow: BooleanConstructor;
|
|
9
9
|
readonly tooltipPlacement: {
|
|
10
10
|
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
11
|
-
readonly default: "auto";
|
|
11
|
+
readonly default: "auto"; /**
|
|
12
|
+
* @see {@link nValInputProps.name}
|
|
13
|
+
*/
|
|
12
14
|
};
|
|
13
15
|
readonly tooltipMaxWidth: {
|
|
14
16
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
@@ -34,6 +36,14 @@ export declare const nSelectProps: {
|
|
|
34
36
|
readonly type: PropType<SelectionOption[]>;
|
|
35
37
|
readonly default: () => never[];
|
|
36
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* The value which is shown in the empty state.
|
|
41
|
+
* The "nothing-option" will be called like this.
|
|
42
|
+
*/
|
|
43
|
+
readonly placeholder: {
|
|
44
|
+
readonly type: StringConstructor;
|
|
45
|
+
readonly default: () => string;
|
|
46
|
+
};
|
|
37
47
|
/**
|
|
38
48
|
* @see {@link nValInputProps.name}
|
|
39
49
|
*/
|
|
@@ -50,6 +60,10 @@ export declare const nSelectProps: {
|
|
|
50
60
|
* @see {@link nValInputProps.form}
|
|
51
61
|
*/
|
|
52
62
|
readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
63
|
+
/**
|
|
64
|
+
* @see {@link nValInputProps.hideLabel}
|
|
65
|
+
*/
|
|
66
|
+
readonly hideLabel: BooleanConstructor;
|
|
53
67
|
/**
|
|
54
68
|
* @see {@link nValInputProps.inputClass}
|
|
55
69
|
*/
|
|
@@ -69,7 +83,9 @@ declare const Component: import("vue").DefineComponent<{
|
|
|
69
83
|
readonly tooltipShow: BooleanConstructor;
|
|
70
84
|
readonly tooltipPlacement: {
|
|
71
85
|
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
72
|
-
readonly default: "auto";
|
|
86
|
+
readonly default: "auto"; /**
|
|
87
|
+
* @see {@link nValInputProps.name}
|
|
88
|
+
*/
|
|
73
89
|
};
|
|
74
90
|
readonly tooltipMaxWidth: {
|
|
75
91
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
@@ -95,6 +111,14 @@ declare const Component: import("vue").DefineComponent<{
|
|
|
95
111
|
readonly type: PropType<SelectionOption[]>;
|
|
96
112
|
readonly default: () => never[];
|
|
97
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* The value which is shown in the empty state.
|
|
116
|
+
* The "nothing-option" will be called like this.
|
|
117
|
+
*/
|
|
118
|
+
readonly placeholder: {
|
|
119
|
+
readonly type: StringConstructor;
|
|
120
|
+
readonly default: () => string;
|
|
121
|
+
};
|
|
98
122
|
/**
|
|
99
123
|
* @see {@link nValInputProps.name}
|
|
100
124
|
*/
|
|
@@ -111,6 +135,10 @@ declare const Component: import("vue").DefineComponent<{
|
|
|
111
135
|
* @see {@link nValInputProps.form}
|
|
112
136
|
*/
|
|
113
137
|
readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
138
|
+
/**
|
|
139
|
+
* @see {@link nValInputProps.hideLabel}
|
|
140
|
+
*/
|
|
141
|
+
readonly hideLabel: BooleanConstructor;
|
|
114
142
|
/**
|
|
115
143
|
* @see {@link nValInputProps.inputClass}
|
|
116
144
|
*/
|
|
@@ -122,7 +150,9 @@ declare const Component: import("vue").DefineComponent<{
|
|
|
122
150
|
readonly tooltipShow: BooleanConstructor;
|
|
123
151
|
readonly tooltipPlacement: {
|
|
124
152
|
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
125
|
-
readonly default: "auto";
|
|
153
|
+
readonly default: "auto"; /**
|
|
154
|
+
* @see {@link nValInputProps.name}
|
|
155
|
+
*/
|
|
126
156
|
};
|
|
127
157
|
readonly tooltipMaxWidth: {
|
|
128
158
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
@@ -148,6 +178,14 @@ declare const Component: import("vue").DefineComponent<{
|
|
|
148
178
|
readonly type: PropType<SelectionOption[]>;
|
|
149
179
|
readonly default: () => never[];
|
|
150
180
|
};
|
|
181
|
+
/**
|
|
182
|
+
* The value which is shown in the empty state.
|
|
183
|
+
* The "nothing-option" will be called like this.
|
|
184
|
+
*/
|
|
185
|
+
readonly placeholder: {
|
|
186
|
+
readonly type: StringConstructor;
|
|
187
|
+
readonly default: () => string;
|
|
188
|
+
};
|
|
151
189
|
/**
|
|
152
190
|
* @see {@link nValInputProps.name}
|
|
153
191
|
*/
|
|
@@ -164,6 +202,10 @@ declare const Component: import("vue").DefineComponent<{
|
|
|
164
202
|
* @see {@link nValInputProps.form}
|
|
165
203
|
*/
|
|
166
204
|
readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
205
|
+
/**
|
|
206
|
+
* @see {@link nValInputProps.hideLabel}
|
|
207
|
+
*/
|
|
208
|
+
readonly hideLabel: BooleanConstructor;
|
|
167
209
|
/**
|
|
168
210
|
* @see {@link nValInputProps.inputClass}
|
|
169
211
|
*/
|
|
@@ -175,6 +217,8 @@ declare const Component: import("vue").DefineComponent<{
|
|
|
175
217
|
readonly tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
176
218
|
readonly options: SelectionOption[];
|
|
177
219
|
readonly disabled: boolean;
|
|
220
|
+
readonly placeholder: string;
|
|
221
|
+
readonly hideLabel: boolean;
|
|
178
222
|
readonly optional: boolean;
|
|
179
223
|
}>;
|
|
180
224
|
export { Component as NSelect, Component as default };
|
package/components/NSelect.js
CHANGED
|
@@ -22,6 +22,14 @@ export const nSelectProps = {
|
|
|
22
22
|
type: Array,
|
|
23
23
|
default: () => []
|
|
24
24
|
},
|
|
25
|
+
/**
|
|
26
|
+
* The value which is shown in the empty state.
|
|
27
|
+
* The "nothing-option" will be called like this.
|
|
28
|
+
*/
|
|
29
|
+
placeholder: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: () => trsl('vue-collection.action.select')
|
|
32
|
+
},
|
|
25
33
|
/**
|
|
26
34
|
* @see {@link nValInputProps.name}
|
|
27
35
|
*/
|
|
@@ -38,6 +46,10 @@ export const nSelectProps = {
|
|
|
38
46
|
* @see {@link nValInputProps.form}
|
|
39
47
|
*/
|
|
40
48
|
form: nValInputProps.form,
|
|
49
|
+
/**
|
|
50
|
+
* @see {@link nValInputProps.hideLabel}
|
|
51
|
+
*/
|
|
52
|
+
hideLabel: nValInputProps.hideLabel,
|
|
41
53
|
/**
|
|
42
54
|
* @see {@link nValInputProps.inputClass}
|
|
43
55
|
*/
|
|
@@ -61,7 +73,7 @@ const Component = createComponent('NSelect', nSelectProps, (props, context) => {
|
|
|
61
73
|
return () => _createVNode(NValInput, _mergeProps({
|
|
62
74
|
"ref": inputRef
|
|
63
75
|
}, props, {
|
|
64
|
-
"input": slotProps => _createVNode(_Fragment, null, [_createVNode("label", {
|
|
76
|
+
"input": slotProps => _createVNode(_Fragment, null, [props.name && !props.hideLabel && _createVNode("label", {
|
|
65
77
|
"for": props.name,
|
|
66
78
|
"class": ['block text-sm font-medium mb-1', props.disabled ? 'text-default-300' : 'text-default-700']
|
|
67
79
|
}, [props.name]), _createVNode(NTooltip, _mergeProps({
|
|
@@ -78,7 +90,7 @@ const Component = createComponent('NSelect', nSelectProps, (props, context) => {
|
|
|
78
90
|
"disabled": !props.optional,
|
|
79
91
|
"selected": !props.value,
|
|
80
92
|
"value": ""
|
|
81
|
-
}, [
|
|
93
|
+
}, [props.placeholder]), props.options.map(option => _createVNode("option", {
|
|
82
94
|
"key": option.id,
|
|
83
95
|
"value": option.id,
|
|
84
96
|
"selected": props.value == option.id
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@naptics/vue-collection",
|
|
3
3
|
"author": "Timo Siegenthaler",
|
|
4
4
|
"description": "Vue Collection is a collection of styled and fully functional Vue components which can easily be integrated into our projects.",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.7",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|