@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
@@ -13,6 +13,8 @@ export declare const nInputProps: {
13
13
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
14
14
  readonly default: "max-w-xs";
15
15
  };
16
+ readonly tooltipWrapperAddClass: StringConstructor;
17
+ readonly tooltipContentAddClass: StringConstructor;
16
18
  /**
17
19
  * The name of the input. Is displayed as a label above the input.
18
20
  */
@@ -59,6 +61,14 @@ export declare const nInputProps: {
59
61
  * If set to `true` the input's label is hidden.
60
62
  */
61
63
  readonly hideLabel: BooleanConstructor;
64
+ /**
65
+ * Adds the classes directly to the input (e.g. for shadow).
66
+ */
67
+ readonly inputClass: StringConstructor;
68
+ /**
69
+ * Adds the classes to the top-level element.
70
+ */
71
+ readonly addClass: StringConstructor;
62
72
  /**
63
73
  * This is called when the input reveices focus.
64
74
  */
@@ -92,6 +102,8 @@ declare const _default: import("vue").DefineComponent<{
92
102
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
93
103
  readonly default: "max-w-xs";
94
104
  };
105
+ readonly tooltipWrapperAddClass: StringConstructor;
106
+ readonly tooltipContentAddClass: StringConstructor;
95
107
  /**
96
108
  * The name of the input. Is displayed as a label above the input.
97
109
  */
@@ -138,6 +150,14 @@ declare const _default: import("vue").DefineComponent<{
138
150
  * If set to `true` the input's label is hidden.
139
151
  */
140
152
  readonly hideLabel: BooleanConstructor;
153
+ /**
154
+ * Adds the classes directly to the input (e.g. for shadow).
155
+ */
156
+ readonly inputClass: StringConstructor;
157
+ /**
158
+ * Adds the classes to the top-level element.
159
+ */
160
+ readonly addClass: StringConstructor;
141
161
  /**
142
162
  * This is called when the input reveices focus.
143
163
  */
@@ -161,6 +181,8 @@ declare const _default: import("vue").DefineComponent<{
161
181
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
162
182
  readonly default: "max-w-xs";
163
183
  };
184
+ readonly tooltipWrapperAddClass: StringConstructor;
185
+ readonly tooltipContentAddClass: StringConstructor;
164
186
  /**
165
187
  * The name of the input. Is displayed as a label above the input.
166
188
  */
@@ -207,6 +229,14 @@ declare const _default: import("vue").DefineComponent<{
207
229
  * If set to `true` the input's label is hidden.
208
230
  */
209
231
  readonly hideLabel: BooleanConstructor;
232
+ /**
233
+ * Adds the classes directly to the input (e.g. for shadow).
234
+ */
235
+ readonly inputClass: StringConstructor;
236
+ /**
237
+ * Adds the classes to the top-level element.
238
+ */
239
+ readonly addClass: StringConstructor;
210
240
  /**
211
241
  * This is called when the input reveices focus.
212
242
  */
@@ -53,6 +53,14 @@ export const nInputProps = {
53
53
  * If set to `true` the input's label is hidden.
54
54
  */
55
55
  hideLabel: Boolean,
56
+ /**
57
+ * Adds the classes directly to the input (e.g. for shadow).
58
+ */
59
+ inputClass: String,
60
+ /**
61
+ * Adds the classes to the top-level element.
62
+ */
63
+ addClass: String,
56
64
  /**
57
65
  * This is called when the input reveices focus.
58
66
  */
@@ -72,7 +80,9 @@ export default createComponent('NInput', nInputProps, (props, context) => {
72
80
  focus: () => inputRef.value?.focus()
73
81
  };
74
82
  context.expose(exposed);
75
- return () => _createVNode("div", null, [props.name && !props.hideLabel && _createVNode("label", {
83
+ return () => _createVNode("div", {
84
+ "class": props.addClass
85
+ }, [props.name && !props.hideLabel && _createVNode("label", {
76
86
  "for": props.name,
77
87
  "class": ['block text-sm font-medium mb-1', props.disabled ? 'text-default-300' : 'text-default-700']
78
88
  }, [props.name]), _createVNode(NTooltip, _mergeProps({
@@ -94,7 +104,7 @@ export default createComponent('NInput', nInputProps, (props, context) => {
94
104
  "onFocus": () => props.onFocus?.(),
95
105
  "onBlur": () => props.onBlur?.(),
96
106
  "onInvalid": event => event.preventDefault(),
97
- "class": ['block w-full rounded-md border focus:outline-none focus:ring-1 ', props.small ? 'text-xs py-0.5 px-2' : 'py-2 px-4', 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']
107
+ "class": ['block w-full rounded-md border focus:outline-none focus:ring-1 ', props.small ? 'text-xs py-0.5 px-2' : 'py-2 px-4', 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.inputClass]
98
108
  }, null), _withDirectives(_createVNode("div", {
99
109
  "class": "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"
100
110
  }, [_createVNode(ExclamationCircleIcon, {
@@ -22,6 +22,8 @@ export declare const nInputPhoneProps: {
22
22
  readonly type: import("vue").PropType<import("../utils/tailwind").TWMaxWidth>;
23
23
  readonly default: "max-w-xs";
24
24
  };
25
+ readonly tooltipWrapperAddClass: StringConstructor;
26
+ readonly tooltipContentAddClass: StringConstructor;
25
27
  readonly name: StringConstructor;
26
28
  readonly placeholder: StringConstructor;
27
29
  readonly autocomplete: {
@@ -37,6 +39,8 @@ export declare const nInputPhoneProps: {
37
39
  readonly disabled: BooleanConstructor;
38
40
  readonly small: BooleanConstructor;
39
41
  readonly hideLabel: BooleanConstructor;
42
+ readonly inputClass: StringConstructor;
43
+ readonly addClass: StringConstructor;
40
44
  readonly onFocus: import("vue").PropType<() => void>;
41
45
  readonly onBlur: import("vue").PropType<() => void>;
42
46
  readonly value: import("vue").PropType<string>;
@@ -69,6 +73,8 @@ declare const _default: import("vue").DefineComponent<{
69
73
  readonly type: import("vue").PropType<import("../utils/tailwind").TWMaxWidth>;
70
74
  readonly default: "max-w-xs";
71
75
  };
76
+ readonly tooltipWrapperAddClass: StringConstructor;
77
+ readonly tooltipContentAddClass: StringConstructor;
72
78
  readonly name: StringConstructor;
73
79
  readonly placeholder: StringConstructor;
74
80
  readonly autocomplete: {
@@ -84,6 +90,8 @@ declare const _default: import("vue").DefineComponent<{
84
90
  readonly disabled: BooleanConstructor;
85
91
  readonly small: BooleanConstructor;
86
92
  readonly hideLabel: BooleanConstructor;
93
+ readonly inputClass: StringConstructor;
94
+ readonly addClass: StringConstructor;
87
95
  readonly onFocus: import("vue").PropType<() => void>;
88
96
  readonly onBlur: import("vue").PropType<() => void>;
89
97
  readonly value: import("vue").PropType<string>;
@@ -112,6 +120,8 @@ declare const _default: import("vue").DefineComponent<{
112
120
  readonly type: import("vue").PropType<import("../utils/tailwind").TWMaxWidth>;
113
121
  readonly default: "max-w-xs";
114
122
  };
123
+ readonly tooltipWrapperAddClass: StringConstructor;
124
+ readonly tooltipContentAddClass: StringConstructor;
115
125
  readonly name: StringConstructor;
116
126
  readonly placeholder: StringConstructor;
117
127
  readonly autocomplete: {
@@ -127,6 +137,8 @@ declare const _default: import("vue").DefineComponent<{
127
137
  readonly disabled: BooleanConstructor;
128
138
  readonly small: BooleanConstructor;
129
139
  readonly hideLabel: BooleanConstructor;
140
+ readonly inputClass: StringConstructor;
141
+ readonly addClass: StringConstructor;
130
142
  readonly onFocus: import("vue").PropType<() => void>;
131
143
  readonly onBlur: import("vue").PropType<() => void>;
132
144
  readonly value: import("vue").PropType<string>;
@@ -64,6 +64,8 @@ export declare const nInputSelectProps: {
64
64
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
65
65
  readonly default: "max-w-xs";
66
66
  };
67
+ readonly tooltipWrapperAddClass: StringConstructor;
68
+ readonly tooltipContentAddClass: StringConstructor;
67
69
  readonly name: StringConstructor;
68
70
  readonly placeholder: StringConstructor;
69
71
  readonly autocomplete: {
@@ -79,6 +81,8 @@ export declare const nInputSelectProps: {
79
81
  readonly disabled: BooleanConstructor;
80
82
  readonly small: BooleanConstructor;
81
83
  readonly hideLabel: BooleanConstructor;
84
+ readonly inputClass: StringConstructor;
85
+ readonly addClass: StringConstructor;
82
86
  readonly onFocus: PropType<() => void>;
83
87
  readonly onBlur: PropType<() => void>;
84
88
  };
@@ -154,6 +158,8 @@ declare const _default: import("vue").DefineComponent<{
154
158
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
155
159
  readonly default: "max-w-xs";
156
160
  };
161
+ readonly tooltipWrapperAddClass: StringConstructor;
162
+ readonly tooltipContentAddClass: StringConstructor;
157
163
  readonly name: StringConstructor;
158
164
  readonly placeholder: StringConstructor;
159
165
  readonly autocomplete: {
@@ -169,6 +175,8 @@ declare const _default: import("vue").DefineComponent<{
169
175
  readonly disabled: BooleanConstructor;
170
176
  readonly small: BooleanConstructor;
171
177
  readonly hideLabel: BooleanConstructor;
178
+ readonly inputClass: StringConstructor;
179
+ readonly addClass: StringConstructor;
172
180
  readonly onFocus: PropType<() => void>;
173
181
  readonly onBlur: PropType<() => void>;
174
182
  }, 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<{
@@ -235,6 +243,8 @@ declare const _default: import("vue").DefineComponent<{
235
243
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
236
244
  readonly default: "max-w-xs";
237
245
  };
246
+ readonly tooltipWrapperAddClass: StringConstructor;
247
+ readonly tooltipContentAddClass: StringConstructor;
238
248
  readonly name: StringConstructor;
239
249
  readonly placeholder: StringConstructor;
240
250
  readonly autocomplete: {
@@ -250,6 +260,8 @@ declare const _default: import("vue").DefineComponent<{
250
260
  readonly disabled: BooleanConstructor;
251
261
  readonly small: BooleanConstructor;
252
262
  readonly hideLabel: BooleanConstructor;
263
+ readonly inputClass: StringConstructor;
264
+ readonly addClass: StringConstructor;
253
265
  readonly onFocus: PropType<() => void>;
254
266
  readonly onBlur: PropType<() => void>;
255
267
  }>> & {}, {
@@ -46,6 +46,8 @@ export declare const nInputSuggestionProps: {
46
46
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
47
47
  readonly default: "max-w-xs";
48
48
  };
49
+ readonly tooltipWrapperAddClass: StringConstructor;
50
+ readonly tooltipContentAddClass: StringConstructor;
49
51
  readonly name: StringConstructor;
50
52
  readonly placeholder: StringConstructor;
51
53
  readonly autocomplete: {
@@ -61,6 +63,8 @@ export declare const nInputSuggestionProps: {
61
63
  readonly disabled: BooleanConstructor;
62
64
  readonly small: BooleanConstructor;
63
65
  readonly hideLabel: BooleanConstructor;
66
+ readonly inputClass: StringConstructor;
67
+ readonly addClass: StringConstructor;
64
68
  readonly onFocus: PropType<() => void>;
65
69
  readonly onBlur: PropType<() => void>;
66
70
  readonly value: PropType<string>;
@@ -117,6 +121,8 @@ declare const _default: import("vue").DefineComponent<{
117
121
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
118
122
  readonly default: "max-w-xs";
119
123
  };
124
+ readonly tooltipWrapperAddClass: StringConstructor;
125
+ readonly tooltipContentAddClass: StringConstructor;
120
126
  readonly name: StringConstructor;
121
127
  readonly placeholder: StringConstructor;
122
128
  readonly autocomplete: {
@@ -132,6 +138,8 @@ declare const _default: import("vue").DefineComponent<{
132
138
  readonly disabled: BooleanConstructor;
133
139
  readonly small: BooleanConstructor;
134
140
  readonly hideLabel: BooleanConstructor;
141
+ readonly inputClass: StringConstructor;
142
+ readonly addClass: StringConstructor;
135
143
  readonly onFocus: PropType<() => void>;
136
144
  readonly onBlur: PropType<() => void>;
137
145
  readonly value: PropType<string>;
@@ -183,6 +191,8 @@ declare const _default: import("vue").DefineComponent<{
183
191
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
184
192
  readonly default: "max-w-xs";
185
193
  };
194
+ readonly tooltipWrapperAddClass: StringConstructor;
195
+ readonly tooltipContentAddClass: StringConstructor;
186
196
  readonly name: StringConstructor;
187
197
  readonly placeholder: StringConstructor;
188
198
  readonly autocomplete: {
@@ -198,6 +208,8 @@ declare const _default: import("vue").DefineComponent<{
198
208
  readonly disabled: BooleanConstructor;
199
209
  readonly small: BooleanConstructor;
200
210
  readonly hideLabel: BooleanConstructor;
211
+ readonly inputClass: StringConstructor;
212
+ readonly addClass: StringConstructor;
201
213
  readonly onFocus: PropType<() => void>;
202
214
  readonly onBlur: PropType<() => void>;
203
215
  readonly value: PropType<string>;
@@ -29,6 +29,10 @@ export declare const nLinkProps: {
29
29
  readonly type: NumberConstructor;
30
30
  readonly default: 500;
31
31
  };
32
+ /**
33
+ * Adds the classes to the top-level element.
34
+ */
35
+ readonly addClass: StringConstructor;
32
36
  /**
33
37
  * This is called when the link is clicked but only, if the `route` prop is not set.
34
38
  * If the `route` prop is not set, the link will act as a regular button.
@@ -66,6 +70,10 @@ declare const _default: import("vue").DefineComponent<{
66
70
  readonly type: NumberConstructor;
67
71
  readonly default: 500;
68
72
  };
73
+ /**
74
+ * Adds the classes to the top-level element.
75
+ */
76
+ readonly addClass: StringConstructor;
69
77
  /**
70
78
  * This is called when the link is clicked but only, if the `route` prop is not set.
71
79
  * If the `route` prop is not set, the link will act as a regular button.
@@ -99,6 +107,10 @@ declare const _default: import("vue").DefineComponent<{
99
107
  readonly type: NumberConstructor;
100
108
  readonly default: 500;
101
109
  };
110
+ /**
111
+ * Adds the classes to the top-level element.
112
+ */
113
+ readonly addClass: StringConstructor;
102
114
  /**
103
115
  * This is called when the link is clicked but only, if the `route` prop is not set.
104
116
  * If the `route` prop is not set, the link will act as a regular button.
@@ -30,6 +30,10 @@ export const nLinkProps = {
30
30
  type: Number,
31
31
  default: 500
32
32
  },
33
+ /**
34
+ * Adds the classes to the top-level element.
35
+ */
36
+ addClass: String,
33
37
  /**
34
38
  * This is called when the link is clicked but only, if the `route` prop is not set.
35
39
  * If the `route` prop is not set, the link will act as a regular button.
@@ -46,7 +50,7 @@ export default createComponent('NLink', nLinkProps, (props, {
46
50
  const shade = props.shade;
47
51
  if (shade <= 500) return shade + 100;else return shade - 200;
48
52
  });
49
- const classes = computed(() => ['font-medium focus:outline-none focus-visible:ring-2 rounded-sm ring-offset-2 hover:underline text-left', `${props.textSize} text-${props.color}-${props.shade} hover:text-${props.color}-${hoverShade.value} focus-visible:ring-${props.color}-${props.shade}`]);
53
+ const classes = computed(() => ['font-medium focus:outline-none focus-visible:ring-2 rounded-sm ring-offset-2 hover:underline text-left', `${props.textSize} text-${props.color}-${props.shade} hover:text-${props.color}-${hoverShade.value} focus-visible:ring-${props.color}-${props.shade}`, props.addClass]);
50
54
  return () => props.route ? _createVNode(RouterLink, {
51
55
  "to": props.route,
52
56
  "class": classes.value
@@ -17,6 +17,10 @@ export declare const nListProps: {
17
17
  readonly type: PropType<ListItem[]>;
18
18
  readonly default: () => never[];
19
19
  };
20
+ /**
21
+ * Adds the classes to the top-level element.
22
+ */
23
+ readonly addClass: StringConstructor;
20
24
  };
21
25
  /**
22
26
  * The `NList` displays key-value data in an appealing way.
@@ -29,6 +33,10 @@ declare const _default: import("vue").DefineComponent<{
29
33
  readonly type: PropType<ListItem[]>;
30
34
  readonly default: () => never[];
31
35
  };
36
+ /**
37
+ * Adds the classes to the top-level element.
38
+ */
39
+ readonly addClass: StringConstructor;
32
40
  }, 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<{
33
41
  /**
34
42
  * The items which are displayed in the list.
@@ -37,6 +45,10 @@ declare const _default: import("vue").DefineComponent<{
37
45
  readonly type: PropType<ListItem[]>;
38
46
  readonly default: () => never[];
39
47
  };
48
+ /**
49
+ * Adds the classes to the top-level element.
50
+ */
51
+ readonly addClass: StringConstructor;
40
52
  }>> & {}, {
41
53
  readonly items: ListItem[];
42
54
  }>;
@@ -7,13 +7,19 @@ export const nListProps = {
7
7
  items: {
8
8
  type: Array,
9
9
  default: () => []
10
- }
10
+ },
11
+ /**
12
+ * Adds the classes to the top-level element.
13
+ */
14
+ addClass: String
11
15
  };
12
16
  /**
13
17
  * The `NList` displays key-value data in an appealing way.
14
18
  */
15
19
  export default createComponent('NList', nListProps, props => {
16
- return () => _createVNode("dl", null, [props.items.map((item, index) => _createVNode("div", {
20
+ return () => _createVNode("dl", {
21
+ "class": props.addClass
22
+ }, [props.items.map((item, index) => _createVNode("div", {
17
23
  "key": index,
18
24
  "class": ['py-5 px-4 sm:grid sm:grid-cols-3 sm:gap-4', index % 2 === 1 ? 'bg-white' : 'bg-default-50']
19
25
  }, [_createVNode("dt", {
@@ -21,6 +21,10 @@ export declare const nLoadingIndicator: {
21
21
  readonly type: NumberConstructor;
22
22
  readonly default: 10;
23
23
  };
24
+ /**
25
+ * Adds the classes to the top-level element.
26
+ */
27
+ readonly addClass: StringConstructor;
24
28
  };
25
29
  /**
26
30
  * The `NLoadingIndicator` is a styled loading indicator.
@@ -47,6 +51,10 @@ declare const _default: import("vue").DefineComponent<{
47
51
  readonly type: NumberConstructor;
48
52
  readonly default: 10;
49
53
  };
54
+ /**
55
+ * Adds the classes to the top-level element.
56
+ */
57
+ readonly addClass: StringConstructor;
50
58
  }, 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<{
51
59
  /**
52
60
  * The color of the loading-indicator.
@@ -69,6 +77,10 @@ declare const _default: import("vue").DefineComponent<{
69
77
  readonly type: NumberConstructor;
70
78
  readonly default: 10;
71
79
  };
80
+ /**
81
+ * Adds the classes to the top-level element.
82
+ */
83
+ readonly addClass: StringConstructor;
72
84
  }>> & {}, {
73
85
  readonly color: string;
74
86
  readonly shade: number;
@@ -23,7 +23,11 @@ export const nLoadingIndicator = {
23
23
  size: {
24
24
  type: Number,
25
25
  default: 10
26
- }
26
+ },
27
+ /**
28
+ * Adds the classes to the top-level element.
29
+ */
30
+ addClass: String
27
31
  };
28
32
  /**
29
33
  * The `NLoadingIndicator` is a styled loading indicator.
@@ -35,7 +39,7 @@ export default createComponent('NLoadingIndicator', nLoadingIndicator, props =>
35
39
  'n-loading-indicator-gap': `${gap.value}px`
36
40
  }));
37
41
  return () => _createVNode("div", {
38
- "class": "lds-ellipsis",
42
+ "class": `lds-ellipsis ${props.addClass}`,
39
43
  "style": `height:${props.size}px;width:${totalWidth.value}px`
40
44
  }, [_createVNode("div", {
41
45
  "class": `bg-${props.color}-${props.shade}`,
@@ -23,6 +23,10 @@ export declare const nPaginationProps: {
23
23
  * If set to `true`, the pagination is displayed smaller.
24
24
  */
25
25
  readonly small: BooleanConstructor;
26
+ /**
27
+ * Adds the classes to the top-level element.
28
+ */
29
+ readonly addClass: StringConstructor;
26
30
  /**
27
31
  * This is called, when the visible pages, which are selectable in the pagination, have changed.
28
32
  * This is useful as only these pages can be navigated to on the next click.
@@ -56,6 +60,10 @@ declare const _default: import("vue").DefineComponent<{
56
60
  * If set to `true`, the pagination is displayed smaller.
57
61
  */
58
62
  readonly small: BooleanConstructor;
63
+ /**
64
+ * Adds the classes to the top-level element.
65
+ */
66
+ readonly addClass: StringConstructor;
59
67
  /**
60
68
  * This is called, when the visible pages, which are selectable in the pagination, have changed.
61
69
  * This is useful as only these pages can be navigated to on the next click.
@@ -85,6 +93,10 @@ declare const _default: import("vue").DefineComponent<{
85
93
  * If set to `true`, the pagination is displayed smaller.
86
94
  */
87
95
  readonly small: BooleanConstructor;
96
+ /**
97
+ * Adds the classes to the top-level element.
98
+ */
99
+ readonly addClass: StringConstructor;
88
100
  /**
89
101
  * This is called, when the visible pages, which are selectable in the pagination, have changed.
90
102
  * This is useful as only these pages can be navigated to on the next click.
@@ -26,6 +26,10 @@ export const nPaginationProps = {
26
26
  * If set to `true`, the pagination is displayed smaller.
27
27
  */
28
28
  small: Boolean,
29
+ /**
30
+ * Adds the classes to the top-level element.
31
+ */
32
+ addClass: String,
29
33
  /**
30
34
  * This is called, when the visible pages, which are selectable in the pagination, have changed.
31
35
  * This is useful as only these pages can be navigated to on the next click.
@@ -73,7 +77,7 @@ export default createComponent('NPagination', nPaginationProps, props => {
73
77
  }));
74
78
  const classesForItem = item => ['pagination-item', item.selectable ? 'selectable ' : '', item.selected ? 'selected' : '', props.small ? '' : 'not-small'];
75
79
  return () => _createVNode("nav", {
76
- "class": "inline-flex rounded-md shadow -space-x-px"
80
+ "class": ['inline-flex rounded-md shadow -space-x-px', props.addClass]
77
81
  }, [_createVNode("button", {
78
82
  "class": ['pagination-item selectable rounded-l-md', props.small ? '' : 'not-small'],
79
83
  "onClick": previous
@@ -12,9 +12,13 @@ export declare const nSearchbarProps: {
12
12
  */
13
13
  readonly small: BooleanConstructor;
14
14
  /**
15
- * The classes are directly added to the input (e.g. for shadow).
15
+ * Adds the classes directly to the input (e.g. for shadow).
16
16
  */
17
17
  readonly inputClass: StringConstructor;
18
+ /**
19
+ * Adds the classes to the top-level element.
20
+ */
21
+ readonly addClass: StringConstructor;
18
22
  /**
19
23
  * This is called when the search-bar receives focus.
20
24
  */
@@ -48,9 +52,13 @@ declare const _default: import("vue").DefineComponent<{
48
52
  */
49
53
  readonly small: BooleanConstructor;
50
54
  /**
51
- * The classes are directly added to the input (e.g. for shadow).
55
+ * Adds the classes directly to the input (e.g. for shadow).
52
56
  */
53
57
  readonly inputClass: StringConstructor;
58
+ /**
59
+ * Adds the classes to the top-level element.
60
+ */
61
+ readonly addClass: StringConstructor;
54
62
  /**
55
63
  * This is called when the search-bar receives focus.
56
64
  */
@@ -74,9 +82,13 @@ declare const _default: import("vue").DefineComponent<{
74
82
  */
75
83
  readonly small: BooleanConstructor;
76
84
  /**
77
- * The classes are directly added to the input (e.g. for shadow).
85
+ * Adds the classes directly to the input (e.g. for shadow).
78
86
  */
79
87
  readonly inputClass: StringConstructor;
88
+ /**
89
+ * Adds the classes to the top-level element.
90
+ */
91
+ readonly addClass: StringConstructor;
80
92
  /**
81
93
  * This is called when the search-bar receives focus.
82
94
  */
@@ -18,9 +18,13 @@ export const nSearchbarProps = {
18
18
  */
19
19
  small: Boolean,
20
20
  /**
21
- * The classes are directly added to the input (e.g. for shadow).
21
+ * Adds the classes directly to the input (e.g. for shadow).
22
22
  */
23
23
  inputClass: String,
24
+ /**
25
+ * Adds the classes to the top-level element.
26
+ */
27
+ addClass: String,
24
28
  /**
25
29
  * This is called when the search-bar receives focus.
26
30
  */
@@ -41,7 +45,9 @@ export default createComponent('NSearchbar', nSearchbarProps, (props, context) =
41
45
  }
42
46
  };
43
47
  context.expose(exposed);
44
- return () => _createVNode("div", null, [_createVNode("label", {
48
+ return () => _createVNode("div", {
49
+ "class": props.addClass
50
+ }, [_createVNode("label", {
45
51
  "for": "search",
46
52
  "class": "sr-only"
47
53
  }, [props.placeholder]), _createVNode("div", {
@@ -6,12 +6,22 @@ export declare const nSearchbarListProps: {
6
6
  readonly type: StringConstructor;
7
7
  readonly default: string;
8
8
  };
9
+ /**
10
+ * Adds the classes directly to the input (e.g. for shadow).
11
+ */
12
+ readonly inputClass: StringConstructor;
13
+ /**
14
+ * Adds the classes to the top-level element.
15
+ */
16
+ readonly addClass: StringConstructor;
9
17
  readonly value: import("vue").PropType<string>;
10
18
  readonly onUpdateValue: import("vue").PropType<(newValue: string) => void>;
11
19
  readonly items: {
12
20
  readonly type: import("vue").PropType<import("./NSuggestionList").SuggestionItem[]>;
13
21
  readonly default: () => never[];
14
- };
22
+ }; /**
23
+ * Adds the classes directly to the input (e.g. for shadow).
24
+ */
15
25
  readonly maxItems: {
16
26
  readonly type: NumberConstructor;
17
27
  readonly default: () => number;
@@ -33,12 +43,22 @@ declare const _default: import("vue").DefineComponent<{
33
43
  readonly type: StringConstructor;
34
44
  readonly default: string;
35
45
  };
46
+ /**
47
+ * Adds the classes directly to the input (e.g. for shadow).
48
+ */
49
+ readonly inputClass: StringConstructor;
50
+ /**
51
+ * Adds the classes to the top-level element.
52
+ */
53
+ readonly addClass: StringConstructor;
36
54
  readonly value: import("vue").PropType<string>;
37
55
  readonly onUpdateValue: import("vue").PropType<(newValue: string) => void>;
38
56
  readonly items: {
39
57
  readonly type: import("vue").PropType<import("./NSuggestionList").SuggestionItem[]>;
40
58
  readonly default: () => never[];
41
- };
59
+ }; /**
60
+ * Adds the classes directly to the input (e.g. for shadow).
61
+ */
42
62
  readonly maxItems: {
43
63
  readonly type: NumberConstructor;
44
64
  readonly default: () => number;
@@ -56,12 +76,22 @@ declare const _default: import("vue").DefineComponent<{
56
76
  readonly type: StringConstructor;
57
77
  readonly default: string;
58
78
  };
79
+ /**
80
+ * Adds the classes directly to the input (e.g. for shadow).
81
+ */
82
+ readonly inputClass: StringConstructor;
83
+ /**
84
+ * Adds the classes to the top-level element.
85
+ */
86
+ readonly addClass: StringConstructor;
59
87
  readonly value: import("vue").PropType<string>;
60
88
  readonly onUpdateValue: import("vue").PropType<(newValue: string) => void>;
61
89
  readonly items: {
62
90
  readonly type: import("vue").PropType<import("./NSuggestionList").SuggestionItem[]>;
63
91
  readonly default: () => never[];
64
- };
92
+ }; /**
93
+ * Adds the classes directly to the input (e.g. for shadow).
94
+ */
65
95
  readonly maxItems: {
66
96
  readonly type: NumberConstructor;
67
97
  readonly default: () => number;
@@ -10,7 +10,15 @@ export const nSearchbarListProps = {
10
10
  /**
11
11
  * @see {@link nSearchbarProps.placeholder}
12
12
  */
13
- placeholder: nSearchbarProps.placeholder
13
+ placeholder: nSearchbarProps.placeholder,
14
+ /**
15
+ * Adds the classes directly to the input (e.g. for shadow).
16
+ */
17
+ inputClass: String,
18
+ /**
19
+ * Adds the classes to the top-level element.
20
+ */
21
+ addClass: String
14
22
  };
15
23
  /**
16
24
  * The `NSearchbarList` is a {@link NSearchbar} with a {@link NSuggestionList}.
@@ -27,7 +35,8 @@ export default createComponent('NSearchbarList', nSearchbarListProps, props => {
27
35
  "value": props.value,
28
36
  "onUpdateValue": props.onUpdateValue,
29
37
  "placeholder": props.placeholder,
30
- "inputClass": "shadow-lg",
38
+ "inputClass": `shadow-lg ${props.inputClass}`,
39
+ "addClass": props.addClass,
31
40
  "onFocus": onFocus,
32
41
  "onBlur": onBlur
33
42
  }, null),