@naptics/vue-collection 0.1.0 → 0.1.2

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 (50) hide show
  1. package/components/NAlert.d.ts +12 -0
  2. package/components/NAlert.js +9 -3
  3. package/components/NBadge.d.ts +18 -0
  4. package/components/NBadge.js +5 -1
  5. package/components/NBreadcrub.d.ts +12 -0
  6. package/components/NBreadcrub.js +5 -1
  7. package/components/NButton.d.ts +18 -0
  8. package/components/NButton.js +5 -1
  9. package/components/NCheckbox.d.ts +12 -0
  10. package/components/NCheckbox.js +6 -2
  11. package/components/NCheckboxLabel.d.ts +3 -0
  12. package/components/NCheckboxLabel.js +8 -2
  13. package/components/NDropdown.d.ts +12 -0
  14. package/components/NDropdown.js +6 -2
  15. package/components/NDropzone.d.ts +12 -0
  16. package/components/NDropzone.js +6 -2
  17. package/components/NIconButton.d.ts +18 -0
  18. package/components/NIconButton.js +5 -1
  19. package/components/NIconCircle.d.ts +12 -0
  20. package/components/NIconCircle.js +6 -2
  21. package/components/NInput.d.ts +30 -0
  22. package/components/NInput.js +12 -2
  23. package/components/NInputPhone.d.ts +12 -0
  24. package/components/NInputSelect.d.ts +12 -0
  25. package/components/NInputSuggestion.d.ts +12 -0
  26. package/components/NLink.d.ts +12 -0
  27. package/components/NLink.js +5 -1
  28. package/components/NList.d.ts +12 -0
  29. package/components/NList.js +8 -2
  30. package/components/NLoadingIndicator.d.ts +12 -0
  31. package/components/NLoadingIndicator.js +6 -2
  32. package/components/NPagination.d.ts +12 -0
  33. package/components/NPagination.js +5 -1
  34. package/components/NSearchbar.d.ts +15 -3
  35. package/components/NSearchbar.js +8 -2
  36. package/components/NSearchbarList.d.ts +33 -3
  37. package/components/NSearchbarList.js +11 -2
  38. package/components/NSelect.d.ts +30 -0
  39. package/components/NSelect.js +9 -1
  40. package/components/NTable.d.ts +12 -0
  41. package/components/NTable.js +6 -2
  42. package/components/NTableAction.d.ts +12 -0
  43. package/components/NTableAction.js +5 -1
  44. package/components/NTextArea.d.ts +30 -0
  45. package/components/NTextArea.js +9 -1
  46. package/components/NTooltip.d.ts +34 -0
  47. package/components/NTooltip.js +23 -5
  48. package/components/NValInput.d.ts +12 -0
  49. package/components/NValInput.js +9 -4
  50. package/package.json +1 -1
@@ -14,6 +14,8 @@ export declare const nSelectProps: {
14
14
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
15
15
  readonly default: "max-w-xs";
16
16
  };
17
+ readonly tooltipWrapperAddClass: StringConstructor;
18
+ readonly tooltipContentAddClass: StringConstructor;
17
19
  /**
18
20
  * The id of the currently selected option of this input.
19
21
  */
@@ -47,6 +49,14 @@ export declare const nSelectProps: {
47
49
  * @see {@link nValInputProps.form}
48
50
  */
49
51
  readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
52
+ /**
53
+ * @see {@link nValInputProps.inputClass}
54
+ */
55
+ readonly inputClass: StringConstructor;
56
+ /**
57
+ * @see {@link nValInputProps.addClass}
58
+ */
59
+ readonly addClass: StringConstructor;
50
60
  };
51
61
  export type SelectionOption = Identifiable & {
52
62
  label: string;
@@ -68,6 +78,8 @@ declare const _default: import("vue").DefineComponent<{
68
78
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
69
79
  readonly default: "max-w-xs";
70
80
  };
81
+ readonly tooltipWrapperAddClass: StringConstructor;
82
+ readonly tooltipContentAddClass: StringConstructor;
71
83
  /**
72
84
  * The id of the currently selected option of this input.
73
85
  */
@@ -101,6 +113,14 @@ declare const _default: import("vue").DefineComponent<{
101
113
  * @see {@link nValInputProps.form}
102
114
  */
103
115
  readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
116
+ /**
117
+ * @see {@link nValInputProps.inputClass}
118
+ */
119
+ readonly inputClass: StringConstructor;
120
+ /**
121
+ * @see {@link nValInputProps.addClass}
122
+ */
123
+ readonly addClass: StringConstructor;
104
124
  }, 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<{
105
125
  readonly tooltipText: StringConstructor;
106
126
  readonly tooltipContent: PropType<() => JSX.Element>;
@@ -114,6 +134,8 @@ declare const _default: import("vue").DefineComponent<{
114
134
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
115
135
  readonly default: "max-w-xs";
116
136
  };
137
+ readonly tooltipWrapperAddClass: StringConstructor;
138
+ readonly tooltipContentAddClass: StringConstructor;
117
139
  /**
118
140
  * The id of the currently selected option of this input.
119
141
  */
@@ -147,6 +169,14 @@ declare const _default: import("vue").DefineComponent<{
147
169
  * @see {@link nValInputProps.form}
148
170
  */
149
171
  readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
172
+ /**
173
+ * @see {@link nValInputProps.inputClass}
174
+ */
175
+ readonly inputClass: StringConstructor;
176
+ /**
177
+ * @see {@link nValInputProps.addClass}
178
+ */
179
+ readonly addClass: StringConstructor;
150
180
  }>> & {}, {
151
181
  readonly tooltipHide: boolean;
152
182
  readonly tooltipShow: boolean;
@@ -38,6 +38,14 @@ export const nSelectProps = {
38
38
  * @see {@link nValInputProps.form}
39
39
  */
40
40
  form: nValInputProps.form,
41
+ /**
42
+ * @see {@link nValInputProps.inputClass}
43
+ */
44
+ inputClass: nValInputProps.inputClass,
45
+ /**
46
+ * @see {@link nValInputProps.addClass}
47
+ */
48
+ addClass: nValInputProps.addClass,
41
49
  ...nToolTipPropsForImplementor
42
50
  };
43
51
  /**
@@ -69,7 +77,7 @@ export default createComponent('NSelect', nSelectProps, (props, context) => {
69
77
  "value": props.value,
70
78
  "onChange": event => slotProps.onUpdateValue(event.target.value),
71
79
  "onBlur": slotProps.onBlur,
72
- "class": ['block w-full py-2 pl-4 pr-10 rounded-md border focus:outline-none focus:ring-1', props.disabled ? 'text-default-300 ' : 'text-default-900 ', slotProps.error ? 'border-red-500 focus:border-red-500 focus:ring-red-500' : 'border-default-300 focus:border-primary-500 focus:ring-primary-500']
80
+ "class": ['block w-full py-2 pl-4 pr-10 rounded-md border focus:outline-none focus:ring-1', props.disabled ? 'text-default-300 ' : 'text-default-900 ', slotProps.error ? 'border-red-500 focus:border-red-500 focus:ring-red-500' : 'border-default-300 focus:border-primary-500 focus:ring-primary-500', props.inputClass]
73
81
  }, [_createVNode("option", {
74
82
  "disabled": !props.optional,
75
83
  "selected": !props.value,
@@ -86,6 +86,10 @@ export declare const nTableProps: {
86
86
  readonly type: PropType<TableRow[]>;
87
87
  readonly default: () => never[];
88
88
  };
89
+ /**
90
+ * Adds the classes to the top-level element.
91
+ */
92
+ readonly addClass: StringConstructor;
89
93
  };
90
94
  /**
91
95
  * The `NTable` is a styled html table which accepts data and displays it appropriately.
@@ -135,6 +139,10 @@ declare const _default: import("vue").DefineComponent<{
135
139
  readonly type: PropType<TableRow[]>;
136
140
  readonly default: () => never[];
137
141
  };
142
+ /**
143
+ * Adds the classes to the top-level element.
144
+ */
145
+ readonly addClass: StringConstructor;
138
146
  }, 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<{
139
147
  /**
140
148
  * The headings of the table. These define which columns are shown in the table and in which order.
@@ -180,6 +188,10 @@ declare const _default: import("vue").DefineComponent<{
180
188
  readonly type: PropType<TableRow[]>;
181
189
  readonly default: () => never[];
182
190
  };
191
+ /**
192
+ * Adds the classes to the top-level element.
193
+ */
194
+ readonly addClass: StringConstructor;
183
195
  }>> & {}, {
184
196
  readonly details: TableDetail[];
185
197
  readonly items: TableRow[];
@@ -50,7 +50,11 @@ export const nTableProps = {
50
50
  items: {
51
51
  type: Array,
52
52
  default: () => []
53
- }
53
+ },
54
+ /**
55
+ * Adds the classes to the top-level element.
56
+ */
57
+ addClass: String
54
58
  };
55
59
  /**
56
60
  * The `NTable` is a styled html table which accepts data and displays it appropriately.
@@ -86,7 +90,7 @@ export default createComponent('NTable', nTableProps, props => {
86
90
  immediate: true
87
91
  });
88
92
  return () => _createVNode("div", {
89
- "class": "overflow-x-auto"
93
+ "class": `overflow-x-auto ${props.addClass}`
90
94
  }, [_createVNode("table", {
91
95
  "class": "min-w-full text-default-500 text-sm"
92
96
  }, [_createVNode("thead", {
@@ -16,6 +16,10 @@ export declare const nTableActionProps: {
16
16
  readonly type: PropType<"button" | "submit" | "reset">;
17
17
  readonly default: "button";
18
18
  };
19
+ /**
20
+ * Adds the classes to the top-level element.
21
+ */
22
+ readonly addClass: StringConstructor;
19
23
  /**
20
24
  * This is called when the action is clicked.
21
25
  * It is only called when the `route` prop is not set on the action.
@@ -42,6 +46,10 @@ declare const _default: import("vue").DefineComponent<{
42
46
  readonly type: PropType<"button" | "submit" | "reset">;
43
47
  readonly default: "button";
44
48
  };
49
+ /**
50
+ * Adds the classes to the top-level element.
51
+ */
52
+ readonly addClass: StringConstructor;
45
53
  /**
46
54
  * This is called when the action is clicked.
47
55
  * It is only called when the `route` prop is not set on the action.
@@ -63,6 +71,10 @@ declare const _default: import("vue").DefineComponent<{
63
71
  readonly type: PropType<"button" | "submit" | "reset">;
64
72
  readonly default: "button";
65
73
  };
74
+ /**
75
+ * Adds the classes to the top-level element.
76
+ */
77
+ readonly addClass: StringConstructor;
66
78
  /**
67
79
  * This is called when the action is clicked.
68
80
  * It is only called when the `route` prop is not set on the action.
@@ -18,6 +18,10 @@ export const nTableActionProps = {
18
18
  * The html attribute, which indicates the type of the button.
19
19
  */
20
20
  type: nButtonProps.type,
21
+ /**
22
+ * Adds the classes to the top-level element.
23
+ */
24
+ addClass: String,
21
25
  /**
22
26
  * This is called when the action is clicked.
23
27
  * It is only called when the `route` prop is not set on the action.
@@ -32,7 +36,7 @@ export default createComponent('NTableAction', nTableActionProps, (props, {
32
36
  slots
33
37
  }) => {
34
38
  const content = () => slots.default?.() || _createVNode(_Fragment, null, [props.text]);
35
- const classes = 'text-left font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-default-900 rounded-sm ring-offset-2 text-default-900 hover:underline hover:text-default-700';
39
+ const classes = ['text-left font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-default-900 rounded-sm ring-offset-2 text-default-900 hover:underline hover:text-default-700', props.addClass];
36
40
  return () => {
37
41
  let _slot;
38
42
  return props.route ? _createVNode(RouterLink, {
@@ -22,6 +22,8 @@ export declare const nTextAreaProps: {
22
22
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
23
23
  readonly default: "max-w-xs";
24
24
  };
25
+ readonly tooltipWrapperAddClass: StringConstructor;
26
+ readonly tooltipContentAddClass: StringConstructor;
25
27
  /**
26
28
  * The name of the text area. Is displayed as a label above the text area.
27
29
  */
@@ -63,6 +65,14 @@ export declare const nTextAreaProps: {
63
65
  * If set to `true` the text area's label is hidden.
64
66
  */
65
67
  readonly hideLabel: BooleanConstructor;
68
+ /**
69
+ * Adds the classes directly to the input (e.g. for shadow).
70
+ */
71
+ readonly inputClass: StringConstructor;
72
+ /**
73
+ * Adds the classes to the top-level element.
74
+ */
75
+ readonly addClass: StringConstructor;
66
76
  /**
67
77
  * This is called when the text area reveices focus.
68
78
  */
@@ -103,6 +113,8 @@ declare const _default: import("vue").DefineComponent<{
103
113
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
104
114
  readonly default: "max-w-xs";
105
115
  };
116
+ readonly tooltipWrapperAddClass: StringConstructor;
117
+ readonly tooltipContentAddClass: StringConstructor;
106
118
  /**
107
119
  * The name of the text area. Is displayed as a label above the text area.
108
120
  */
@@ -144,6 +156,14 @@ declare const _default: import("vue").DefineComponent<{
144
156
  * If set to `true` the text area's label is hidden.
145
157
  */
146
158
  readonly hideLabel: BooleanConstructor;
159
+ /**
160
+ * Adds the classes directly to the input (e.g. for shadow).
161
+ */
162
+ readonly inputClass: StringConstructor;
163
+ /**
164
+ * Adds the classes to the top-level element.
165
+ */
166
+ readonly addClass: StringConstructor;
147
167
  /**
148
168
  * This is called when the text area reveices focus.
149
169
  */
@@ -177,6 +197,8 @@ declare const _default: import("vue").DefineComponent<{
177
197
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
178
198
  readonly default: "max-w-xs";
179
199
  };
200
+ readonly tooltipWrapperAddClass: StringConstructor;
201
+ readonly tooltipContentAddClass: StringConstructor;
180
202
  /**
181
203
  * The name of the text area. Is displayed as a label above the text area.
182
204
  */
@@ -218,6 +240,14 @@ declare const _default: import("vue").DefineComponent<{
218
240
  * If set to `true` the text area's label is hidden.
219
241
  */
220
242
  readonly hideLabel: BooleanConstructor;
243
+ /**
244
+ * Adds the classes directly to the input (e.g. for shadow).
245
+ */
246
+ readonly inputClass: StringConstructor;
247
+ /**
248
+ * Adds the classes to the top-level element.
249
+ */
250
+ readonly addClass: StringConstructor;
221
251
  /**
222
252
  * This is called when the text area reveices focus.
223
253
  */
@@ -52,6 +52,14 @@ const nTextAreaBaseProps = {
52
52
  * If set to `true` the text area's label is hidden.
53
53
  */
54
54
  hideLabel: Boolean,
55
+ /**
56
+ * Adds the classes directly to the input (e.g. for shadow).
57
+ */
58
+ inputClass: String,
59
+ /**
60
+ * Adds the classes to the top-level element.
61
+ */
62
+ addClass: String,
55
63
  /**
56
64
  * This is called when the text area reveices focus.
57
65
  */
@@ -117,7 +125,7 @@ const NTextAreaBase = createComponent('NTextAreaBase', nTextAreaBaseProps, (prop
117
125
  "onFocus": () => props.onFocus?.(),
118
126
  "onBlur": () => props.onBlur?.(),
119
127
  "onInvalid": event => event.preventDefault(),
120
- "class": ['block w-full rounded-md border focus:outline-none focus:ring-1 ', props.disabled ? 'text-default-500 placeholder-default-300 bg-default-50' : 'text-default-900 placeholder-default-400 ', props.error ? 'border-red-500 focus:border-red-500 focus:ring-red-500 pr-10' : 'border-default-300 focus:border-primary-500 focus:ring-primary-500', props.resizable ? 'resize-y' : 'resize-none']
128
+ "class": ['block w-full rounded-md border focus:outline-none focus:ring-1 ', props.disabled ? 'text-default-500 placeholder-default-300 bg-default-50' : 'text-default-900 placeholder-default-400 ', props.error ? 'border-red-500 focus:border-red-500 focus:ring-red-500 pr-10' : 'border-default-300 focus:border-primary-500 focus:ring-primary-500', props.resizable ? 'resize-y' : 'resize-none', props.inputClass]
121
129
  }, null), _withDirectives(_createVNode("div", {
122
130
  "class": "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"
123
131
  }, [_createVNode(ExclamationCircleIcon, {
@@ -38,6 +38,14 @@ export declare const nTooltipProps: {
38
38
  readonly type: PropType<TWMaxWidth>;
39
39
  readonly default: "max-w-xs";
40
40
  };
41
+ /**
42
+ * Adds the classes to the (invisible) wrapper element.
43
+ */
44
+ readonly wrapperAddClass: StringConstructor;
45
+ /**
46
+ * Adds the classes to the container of the tooltips content.
47
+ */
48
+ readonly contentAddClass: StringConstructor;
41
49
  };
42
50
  /**
43
51
  * These props are made to use on a component which implements the tooltip
@@ -79,6 +87,14 @@ export declare const nToolTipPropsForImplementor: {
79
87
  readonly type: PropType<TWMaxWidth>;
80
88
  readonly default: "max-w-xs";
81
89
  };
90
+ /**
91
+ * @see {@link nTooltipProps.wrapperAddClass}
92
+ */
93
+ tooltipWrapperAddClass: StringConstructor;
94
+ /**
95
+ * @see {@link nTooltipProps.contentAddClass}
96
+ */
97
+ tooltipContentAddClass: StringConstructor;
82
98
  };
83
99
  /**
84
100
  * Maps the {@link nToolTipPropsForImplementor} props to normal tooltip props
@@ -91,6 +107,8 @@ export declare function mapTooltipProps(props: ExtractedProps<typeof nToolTipPro
91
107
  show: boolean;
92
108
  placement: TooltipPlacement;
93
109
  maxWidth: TWMaxWidth;
110
+ wrapperAddClass: string | undefined;
111
+ contentAddClass: string | undefined;
94
112
  };
95
113
  /**
96
114
  * The `NTooltip` is a wrapper for any component which adds a tooltip to it.
@@ -139,6 +157,14 @@ declare const _default: import("vue").DefineComponent<{
139
157
  readonly type: PropType<TWMaxWidth>;
140
158
  readonly default: "max-w-xs";
141
159
  };
160
+ /**
161
+ * Adds the classes to the (invisible) wrapper element.
162
+ */
163
+ readonly wrapperAddClass: StringConstructor;
164
+ /**
165
+ * Adds the classes to the container of the tooltips content.
166
+ */
167
+ readonly contentAddClass: StringConstructor;
142
168
  }, 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<{
143
169
  /**
144
170
  * The text content of the tooltip.
@@ -175,6 +201,14 @@ declare const _default: import("vue").DefineComponent<{
175
201
  readonly type: PropType<TWMaxWidth>;
176
202
  readonly default: "max-w-xs";
177
203
  };
204
+ /**
205
+ * Adds the classes to the (invisible) wrapper element.
206
+ */
207
+ readonly wrapperAddClass: StringConstructor;
208
+ /**
209
+ * Adds the classes to the container of the tooltips content.
210
+ */
211
+ readonly contentAddClass: StringConstructor;
178
212
  }>> & {}, {
179
213
  readonly show: boolean;
180
214
  readonly hide: boolean;
@@ -40,7 +40,15 @@ export const nTooltipProps = {
40
40
  maxWidth: {
41
41
  type: String,
42
42
  default: 'max-w-xs'
43
- }
43
+ },
44
+ /**
45
+ * Adds the classes to the (invisible) wrapper element.
46
+ */
47
+ wrapperAddClass: String,
48
+ /**
49
+ * Adds the classes to the container of the tooltips content.
50
+ */
51
+ contentAddClass: String
44
52
  };
45
53
  /**
46
54
  * These props are made to use on a component which implements the tooltip
@@ -75,7 +83,15 @@ export const nToolTipPropsForImplementor = {
75
83
  /**
76
84
  * @see {@link nTooltipProps.maxWidth}
77
85
  */
78
- tooltipMaxWidth: nTooltipProps.maxWidth
86
+ tooltipMaxWidth: nTooltipProps.maxWidth,
87
+ /**
88
+ * @see {@link nTooltipProps.wrapperAddClass}
89
+ */
90
+ tooltipWrapperAddClass: nTooltipProps.wrapperAddClass,
91
+ /**
92
+ * @see {@link nTooltipProps.contentAddClass}
93
+ */
94
+ tooltipContentAddClass: nTooltipProps.contentAddClass
79
95
  };
80
96
  /**
81
97
  * Maps the {@link nToolTipPropsForImplementor} props to normal tooltip props
@@ -88,7 +104,9 @@ export function mapTooltipProps(props) {
88
104
  hide: props.tooltipHide,
89
105
  show: props.tooltipShow,
90
106
  placement: props.tooltipPlacement,
91
- maxWidth: props.tooltipMaxWidth
107
+ maxWidth: props.tooltipMaxWidth,
108
+ wrapperAddClass: props.tooltipWrapperAddClass,
109
+ contentAddClass: props.tooltipContentAddClass
92
110
  };
93
111
  }
94
112
  /**
@@ -106,7 +124,7 @@ export default createComponent('NTooltip', nTooltipProps, (props, {
106
124
  slots
107
125
  }) => {
108
126
  return () => _createVNode("div", {
109
- "class": props.block ? 'block' : 'inline-block'
127
+ "class": [props.block ? 'block' : 'inline-block', props.wrapperAddClass]
110
128
  }, [props.content || props.text ? _createVNode(NTooltipBase, props, {
111
129
  default: () => [slots.default?.()]
112
130
  }) : slots.default?.()]);
@@ -169,7 +187,7 @@ const NTooltipBase = createComponent('NTooltipBase', nTooltipProps, (props, {
169
187
  "onMouseleave": () => isHoveringTooltip.value = false,
170
188
  "class": [isHovering.value ? 'z-20' : 'z-10', props.maxWidth, 'tooltip']
171
189
  }, [_createVNode("div", {
172
- "class": "bg-white rounded-md py-2 px-4 shadow-lg border-default-200 border text-sm whitespace-normal font-normal text-default-700"
190
+ "class": `bg-white rounded-md py-2 px-4 shadow-lg border-default-200 border text-sm whitespace-normal font-normal text-default-700 ${props.contentAddClass}`
173
191
  }, [props.content?.() || props.text]), _createVNode("div", {
174
192
  "data-popper-arrow": true,
175
193
  "class": "arrow"
@@ -93,6 +93,8 @@ export declare const nValInputProps: {
93
93
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
94
94
  readonly default: "max-w-xs";
95
95
  };
96
+ readonly tooltipWrapperAddClass: StringConstructor;
97
+ readonly tooltipContentAddClass: StringConstructor;
96
98
  readonly name: StringConstructor;
97
99
  readonly placeholder: StringConstructor;
98
100
  readonly autocomplete: {
@@ -108,6 +110,8 @@ export declare const nValInputProps: {
108
110
  readonly disabled: BooleanConstructor;
109
111
  readonly small: BooleanConstructor;
110
112
  readonly hideLabel: BooleanConstructor;
113
+ readonly inputClass: StringConstructor;
114
+ readonly addClass: StringConstructor;
111
115
  readonly onFocus: PropType<() => void>;
112
116
  readonly onBlur: PropType<() => void>;
113
117
  readonly value: PropType<string>;
@@ -187,6 +191,8 @@ declare const _default: import("vue").DefineComponent<{
187
191
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
188
192
  readonly default: "max-w-xs";
189
193
  };
194
+ readonly tooltipWrapperAddClass: StringConstructor;
195
+ readonly tooltipContentAddClass: StringConstructor;
190
196
  readonly name: StringConstructor;
191
197
  readonly placeholder: StringConstructor;
192
198
  readonly autocomplete: {
@@ -202,6 +208,8 @@ declare const _default: import("vue").DefineComponent<{
202
208
  readonly disabled: BooleanConstructor;
203
209
  readonly small: BooleanConstructor;
204
210
  readonly hideLabel: BooleanConstructor;
211
+ readonly inputClass: StringConstructor;
212
+ readonly addClass: StringConstructor;
205
213
  readonly onFocus: PropType<() => void>;
206
214
  readonly onBlur: PropType<() => void>;
207
215
  readonly value: PropType<string>;
@@ -259,6 +267,8 @@ declare const _default: import("vue").DefineComponent<{
259
267
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
260
268
  readonly default: "max-w-xs";
261
269
  };
270
+ readonly tooltipWrapperAddClass: StringConstructor;
271
+ readonly tooltipContentAddClass: StringConstructor;
262
272
  readonly name: StringConstructor;
263
273
  readonly placeholder: StringConstructor;
264
274
  readonly autocomplete: {
@@ -274,6 +284,8 @@ declare const _default: import("vue").DefineComponent<{
274
284
  readonly disabled: BooleanConstructor;
275
285
  readonly small: BooleanConstructor;
276
286
  readonly hideLabel: BooleanConstructor;
287
+ readonly inputClass: StringConstructor;
288
+ readonly addClass: StringConstructor;
277
289
  readonly onFocus: PropType<() => void>;
278
290
  readonly onBlur: PropType<() => void>;
279
291
  readonly value: PropType<string>;
@@ -93,12 +93,17 @@ export default createComponent('NValInput', nValInputProps, (props, context) =>
93
93
  };
94
94
  context.expose(expose);
95
95
  props.form?.addInput(expose);
96
- return () => _createVNode("div", null, [props.input?.(inputSlotProps) || _createVNode(NInput, _mergeProps({
97
- "ref": inputRef
98
- }, {
96
+ const childProps = computed(() => ({
99
97
  ...props,
98
+ // We should not pass this property to the child, as the class is applied on this element.
99
+ addClass: undefined,
100
100
  ...inputSlotProps
101
- }), null), showErrorMessage.value && _createVNode("p", {
101
+ }));
102
+ return () => _createVNode("div", {
103
+ "class": props.addClass
104
+ }, [props.input?.(inputSlotProps) || _createVNode(NInput, _mergeProps({
105
+ "ref": inputRef
106
+ }, childProps.value), null), showErrorMessage.value && _createVNode("p", {
102
107
  "class": "text-red-500 text-xs mt-1"
103
108
  }, [errorMessage.value])]);
104
109
  });
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.0",
5
+ "version": "0.1.2",
6
6
  "main": "./index.js",
7
7
  "repository": {
8
8
  "type": "git",