@naptics/vue-collection 0.1.7 → 0.1.8

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.
@@ -62,14 +62,22 @@ export declare const nInputSelectProps: {
62
62
  };
63
63
  readonly tooltipMaxWidth: {
64
64
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
65
- readonly default: "max-w-xs";
65
+ readonly default: "max-w-xs"; /**
66
+ * @see {@link nValInputProps.optional}
67
+ */
66
68
  };
67
69
  readonly tooltipWrapperAddClass: StringConstructor;
68
70
  readonly tooltipContentAddClass: StringConstructor;
69
71
  readonly name: StringConstructor;
70
72
  readonly placeholder: StringConstructor;
71
73
  readonly autocomplete: {
72
- readonly type: StringConstructor;
74
+ readonly type: StringConstructor; /**
75
+ * This is called with the newly selected id when the selection has changed.
76
+ * This happens, when an item from the suggestion list is selected or the
77
+ * input matches a selection option exactly.
78
+ * If no id is selected, the empty string is passed, in order to
79
+ * match the API of all other inputs who never pass `undefined`.
80
+ */
73
81
  readonly default: "off";
74
82
  };
75
83
  readonly type: {
@@ -156,14 +164,22 @@ declare const _default: import("vue").DefineComponent<{
156
164
  };
157
165
  readonly tooltipMaxWidth: {
158
166
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
159
- readonly default: "max-w-xs";
167
+ readonly default: "max-w-xs"; /**
168
+ * @see {@link nValInputProps.optional}
169
+ */
160
170
  };
161
171
  readonly tooltipWrapperAddClass: StringConstructor;
162
172
  readonly tooltipContentAddClass: StringConstructor;
163
173
  readonly name: StringConstructor;
164
174
  readonly placeholder: StringConstructor;
165
175
  readonly autocomplete: {
166
- readonly type: StringConstructor;
176
+ readonly type: StringConstructor; /**
177
+ * This is called with the newly selected id when the selection has changed.
178
+ * This happens, when an item from the suggestion list is selected or the
179
+ * input matches a selection option exactly.
180
+ * If no id is selected, the empty string is passed, in order to
181
+ * match the API of all other inputs who never pass `undefined`.
182
+ */
167
183
  readonly default: "off";
168
184
  };
169
185
  readonly type: {
@@ -241,14 +257,22 @@ declare const _default: import("vue").DefineComponent<{
241
257
  };
242
258
  readonly tooltipMaxWidth: {
243
259
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
244
- readonly default: "max-w-xs";
260
+ readonly default: "max-w-xs"; /**
261
+ * @see {@link nValInputProps.optional}
262
+ */
245
263
  };
246
264
  readonly tooltipWrapperAddClass: StringConstructor;
247
265
  readonly tooltipContentAddClass: StringConstructor;
248
266
  readonly name: StringConstructor;
249
267
  readonly placeholder: StringConstructor;
250
268
  readonly autocomplete: {
251
- readonly type: StringConstructor;
269
+ readonly type: StringConstructor; /**
270
+ * This is called with the newly selected id when the selection has changed.
271
+ * This happens, when an item from the suggestion list is selected or the
272
+ * input matches a selection option exactly.
273
+ * If no id is selected, the empty string is passed, in order to
274
+ * match the API of all other inputs who never pass `undefined`.
275
+ */
252
276
  readonly default: "off";
253
277
  };
254
278
  readonly type: {
@@ -1,5 +1,5 @@
1
1
  import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
- import { createComponent } from '../utils/component';
2
+ import { createComponentWithSlots } from '../utils/component';
3
3
  import { Id } from '../utils/identifiable';
4
4
  import { option } from '../utils/validation';
5
5
  import { vModelForRef } from '../utils/vModel';
@@ -64,7 +64,7 @@ export const nInputSelectProps = {
64
64
  * The user is forced to use a value from the specified options of the input.
65
65
  * While they type, the list of options is shown to them and filtered based on their input.
66
66
  */
67
- export default createComponent('NInputSelect', nInputSelectProps, props => {
67
+ export default createComponentWithSlots('NInputSelect', nInputSelectProps, ['listItem'], props => {
68
68
  const inputRef = ref();
69
69
  const inputValue = ref('');
70
70
  watch(() => props.value, newValue => {
@@ -18,10 +18,10 @@ export declare const nSearchbarListProps: {
18
18
  readonly onUpdateValue: import("vue").PropType<(newValue: string) => void>;
19
19
  readonly items: {
20
20
  readonly type: import("vue").PropType<import("./NSuggestionList").SuggestionItem[]>;
21
- readonly default: () => never[]; /**
22
- * Adds the classes directly to the input (e.g. for shadow).
23
- */
24
- };
21
+ readonly default: () => never[];
22
+ }; /**
23
+ * Adds the classes directly to the input (e.g. for shadow).
24
+ */
25
25
  readonly maxItems: {
26
26
  readonly type: NumberConstructor;
27
27
  readonly default: () => number;
@@ -55,10 +55,10 @@ declare const _default: import("vue").DefineComponent<{
55
55
  readonly onUpdateValue: import("vue").PropType<(newValue: string) => void>;
56
56
  readonly items: {
57
57
  readonly type: import("vue").PropType<import("./NSuggestionList").SuggestionItem[]>;
58
- readonly default: () => never[]; /**
59
- * Adds the classes directly to the input (e.g. for shadow).
60
- */
61
- };
58
+ readonly default: () => never[];
59
+ }; /**
60
+ * Adds the classes directly to the input (e.g. for shadow).
61
+ */
62
62
  readonly maxItems: {
63
63
  readonly type: NumberConstructor;
64
64
  readonly default: () => number;
@@ -88,10 +88,10 @@ declare const _default: import("vue").DefineComponent<{
88
88
  readonly onUpdateValue: import("vue").PropType<(newValue: string) => void>;
89
89
  readonly items: {
90
90
  readonly type: import("vue").PropType<import("./NSuggestionList").SuggestionItem[]>;
91
- readonly default: () => never[]; /**
92
- * Adds the classes directly to the input (e.g. for shadow).
93
- */
94
- };
91
+ readonly default: () => never[];
92
+ }; /**
93
+ * Adds the classes directly to the input (e.g. for shadow).
94
+ */
95
95
  readonly maxItems: {
96
96
  readonly type: NumberConstructor;
97
97
  readonly default: () => number;
@@ -1,5 +1,5 @@
1
1
  import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
- import { createComponent } from '../utils/component';
2
+ import { createComponentWithSlots } from '../utils/component';
3
3
  import { ref } from 'vue';
4
4
  import { vModelProps } from '../utils/vModel';
5
5
  import NSearchbar, { nSearchbarProps } from './NSearchbar';
@@ -23,7 +23,7 @@ export const nSearchbarListProps = {
23
23
  /**
24
24
  * The `NSearchbarList` is a {@link NSearchbar} with a {@link NSuggestionList}.
25
25
  */
26
- export default createComponent('NSearchbarList', nSearchbarListProps, props => {
26
+ export default createComponentWithSlots('NSearchbarList', nSearchbarListProps, ['listItem'], props => {
27
27
  const searchbarRef = ref();
28
28
  return () => _createVNode(NSuggestionList, _mergeProps(props, {
29
29
  "inputValue": props.value || '',
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.1.7",
5
+ "version": "0.1.8",
6
6
  "main": "./index.js",
7
7
  "repository": {
8
8
  "type": "git",