@naptics/vue-collection 0.2.15 → 0.3.1

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 (171) hide show
  1. package/.github/workflows/build.yml +26 -0
  2. package/.github/workflows/deploy-demo.yml +46 -0
  3. package/.github/workflows/deploy-lib.yml +59 -0
  4. package/.gitlab-ci.yml +57 -0
  5. package/.nvmrc +1 -0
  6. package/.prettierrc +8 -0
  7. package/.vscode/extensions.json +10 -0
  8. package/.vscode/launch.json +23 -0
  9. package/.vscode/settings.json +13 -0
  10. package/babel.config.json +3 -0
  11. package/components/NAlert.d.ts +1 -44
  12. package/components/NBadge.d.ts +1 -133
  13. package/components/NBreadcrub.d.ts +2 -106
  14. package/components/NBreadcrub.js +1 -1
  15. package/components/NButton.d.ts +2 -118
  16. package/components/NCheckbox.d.ts +1 -32
  17. package/components/NCheckboxLabel.d.ts +1 -45
  18. package/components/NCheckboxLabel.js +1 -1
  19. package/components/NCrudModal.d.ts +7 -251
  20. package/components/NCrudModal.js +1 -1
  21. package/components/NDialog.d.ts +1 -110
  22. package/components/NDialog.js +1 -1
  23. package/components/NDropdown.d.ts +1 -69
  24. package/components/NDropdown.js +1 -1
  25. package/components/NDropzone.d.ts +1 -115
  26. package/components/NDropzone.js +1 -1
  27. package/components/NForm.d.ts +1 -23
  28. package/components/NFormModal.d.ts +7 -151
  29. package/components/NIconButton.d.ts +3 -159
  30. package/components/NIconButton.js +1 -1
  31. package/components/NIconCircle.d.ts +1 -87
  32. package/components/NInput.d.ts +1 -164
  33. package/components/NInput.js +1 -1
  34. package/components/NInputPhone.d.ts +2 -114
  35. package/components/NInputPhone.js +1 -1
  36. package/components/NInputSelect.d.ts +2 -187
  37. package/components/NInputSelect.js +1 -1
  38. package/components/NInputSuggestion.d.ts +2 -155
  39. package/components/NInputSuggestion.js +1 -1
  40. package/components/NLink.d.ts +6 -70
  41. package/components/NLink.js +8 -1
  42. package/components/NList.d.ts +1 -43
  43. package/components/NList.js +1 -1
  44. package/components/NLoadingIndicator.d.ts +1 -49
  45. package/components/NModal.d.ts +12 -250
  46. package/components/NModal.js +15 -9
  47. package/components/NPagination.d.ts +1 -63
  48. package/components/NSearchbar.d.ts +1 -56
  49. package/components/NSearchbarList.d.ts +3 -63
  50. package/components/NSearchbarList.js +1 -1
  51. package/components/NSelect.d.ts +2 -148
  52. package/components/NSelect.js +1 -1
  53. package/components/NSuggestionList.d.ts +3 -126
  54. package/components/NSuggestionList.js +5 -2
  55. package/components/NTable.d.ts +1 -85
  56. package/components/NTable.js +12 -6
  57. package/components/NTableAction.d.ts +2 -46
  58. package/components/NTableAction.js +1 -1
  59. package/components/NTextArea.d.ts +2 -181
  60. package/components/NTextArea.js +1 -1
  61. package/components/NTooltip.d.ts +1 -105
  62. package/components/NTooltip.js +1 -1
  63. package/components/NValInput.d.ts +7 -182
  64. package/components/NValInput.js +1 -1
  65. package/env.d.ts +15 -0
  66. package/eslint.config.cjs +29 -0
  67. package/index.html +13 -0
  68. package/package.json +21 -19
  69. package/postcss.config.js +6 -0
  70. package/public/favicon.ico +0 -0
  71. package/scripts/build-lib.sh +52 -0
  72. package/scripts/sync-node-types.js +70 -0
  73. package/src/demo/App.css +9 -0
  74. package/src/demo/App.tsx +5 -0
  75. package/src/demo/components/ColorGrid.tsx +26 -0
  76. package/src/demo/components/ComponentGrid.tsx +26 -0
  77. package/src/demo/components/ComponentSection.tsx +30 -0
  78. package/src/demo/components/VariantSection.tsx +18 -0
  79. package/src/demo/i18n/de.ts +7 -0
  80. package/src/demo/i18n/en.ts +7 -0
  81. package/src/demo/i18n/index.ts +24 -0
  82. package/src/demo/main.ts +13 -0
  83. package/src/demo/router/index.ts +21 -0
  84. package/src/demo/views/HomeView.tsx +94 -0
  85. package/src/demo/views/NavigationView.tsx +43 -0
  86. package/src/demo/views/presentation/AlertView.tsx +40 -0
  87. package/src/demo/views/presentation/BadgeView.tsx +61 -0
  88. package/src/demo/views/presentation/BreadcrumbView.tsx +52 -0
  89. package/src/demo/views/presentation/ButtonView.tsx +49 -0
  90. package/src/demo/views/presentation/CheckboxView.tsx +59 -0
  91. package/src/demo/views/presentation/DropdownView.tsx +59 -0
  92. package/src/demo/views/presentation/DropzoneView.tsx +39 -0
  93. package/src/demo/views/presentation/IconButtonView.tsx +47 -0
  94. package/src/demo/views/presentation/IconCircleView.tsx +38 -0
  95. package/src/demo/views/presentation/InputView.tsx +179 -0
  96. package/src/demo/views/presentation/LinkView.tsx +60 -0
  97. package/src/demo/views/presentation/ListView.tsx +29 -0
  98. package/src/demo/views/presentation/LoadingIndicatorView.tsx +38 -0
  99. package/src/demo/views/presentation/ModalView.tsx +210 -0
  100. package/src/demo/views/presentation/PaginationView.tsx +25 -0
  101. package/src/demo/views/presentation/SearchbarView.tsx +80 -0
  102. package/src/demo/views/presentation/TableView.tsx +146 -0
  103. package/src/demo/views/presentation/TooltipView.tsx +86 -0
  104. package/src/lib/components/NAlert.tsx +85 -0
  105. package/src/lib/components/NBadge.tsx +75 -0
  106. package/src/lib/components/NBreadcrub.tsx +97 -0
  107. package/src/lib/components/NButton.tsx +80 -0
  108. package/src/lib/components/NCheckbox.tsx +55 -0
  109. package/src/lib/components/NCheckboxLabel.tsx +51 -0
  110. package/src/lib/components/NCrudModal.tsx +133 -0
  111. package/src/lib/components/NDialog.tsx +182 -0
  112. package/src/lib/components/NDropdown.tsx +167 -0
  113. package/src/lib/components/NDropzone.tsx +265 -0
  114. package/src/lib/components/NForm.tsx +32 -0
  115. package/src/lib/components/NFormModal.tsx +66 -0
  116. package/src/lib/components/NIconButton.tsx +92 -0
  117. package/src/lib/components/NIconCircle.tsx +78 -0
  118. package/src/lib/components/NInput.css +11 -0
  119. package/src/lib/components/NInput.tsx +139 -0
  120. package/src/lib/components/NInputPhone.tsx +53 -0
  121. package/src/lib/components/NInputSelect.tsx +126 -0
  122. package/src/lib/components/NInputSuggestion.tsx +80 -0
  123. package/src/lib/components/NLink.tsx +82 -0
  124. package/src/lib/components/NList.tsx +67 -0
  125. package/src/lib/components/NLoadingIndicator.css +46 -0
  126. package/src/lib/components/NLoadingIndicator.tsx +63 -0
  127. package/src/lib/components/NModal.tsx +243 -0
  128. package/src/lib/components/NPagination.css +15 -0
  129. package/src/lib/components/NPagination.tsx +131 -0
  130. package/src/lib/components/NSearchbar.tsx +78 -0
  131. package/src/lib/components/NSearchbarList.tsx +47 -0
  132. package/src/lib/components/NSelect.tsx +128 -0
  133. package/src/lib/components/NSuggestionList.tsx +216 -0
  134. package/src/lib/components/NTable.css +3 -0
  135. package/src/lib/components/NTable.tsx +247 -0
  136. package/src/lib/components/NTableAction.tsx +49 -0
  137. package/src/lib/components/NTextArea.tsx +159 -0
  138. package/src/lib/components/NTooltip.css +37 -0
  139. package/src/lib/components/NTooltip.tsx +250 -0
  140. package/src/lib/components/NValInput.tsx +163 -0
  141. package/src/lib/components/ValidatedForm.ts +71 -0
  142. package/src/lib/components/__tests__/NButton.spec.tsx +26 -0
  143. package/src/lib/components/__tests__/NCheckbox.spec.tsx +39 -0
  144. package/src/lib/i18n/de/vue-collection.json +58 -0
  145. package/src/lib/i18n/en/vue-collection.json +58 -0
  146. package/src/lib/i18n/index.ts +54 -0
  147. package/src/lib/index.ts +2 -0
  148. package/src/lib/jsx.d.ts +13 -0
  149. package/src/lib/utils/__tests__/identifiable.spec.ts +72 -0
  150. package/src/lib/utils/__tests__/validation.spec.ts +92 -0
  151. package/src/lib/utils/breakpoints.ts +47 -0
  152. package/src/lib/utils/component.tsx +131 -0
  153. package/src/lib/utils/deferred.ts +28 -0
  154. package/src/lib/utils/identifiable.ts +87 -0
  155. package/src/lib/utils/stringMaxLength.ts +25 -0
  156. package/src/lib/utils/tailwind.ts +41 -0
  157. package/src/lib/utils/utils.ts +90 -0
  158. package/src/lib/utils/vModel.ts +260 -0
  159. package/src/lib/utils/validation.ts +189 -0
  160. package/src/lib/utils/vue.ts +25 -0
  161. package/tailwind.config.js +38 -0
  162. package/tsconfig.config.json +9 -0
  163. package/tsconfig.demo.json +19 -0
  164. package/tsconfig.json +16 -0
  165. package/tsconfig.lib.json +18 -0
  166. package/tsconfig.vitest.json +8 -0
  167. package/utils/breakpoints.d.ts +1 -1
  168. package/utils/component.d.ts +3 -7
  169. package/utils/component.js +5 -2
  170. package/utils/identifiable.js +5 -1
  171. package/vite.config.ts +28 -0
@@ -21,242 +21,19 @@ export declare const nModalProps: {
21
21
  readonly default: "max-w-md";
22
22
  };
23
23
  /**
24
- * The title of the modal which is displayed in the header.
25
- */
26
- readonly title: StringConstructor;
27
- /**
28
- * The text of the ok-button.
29
- */
30
- readonly okText: {
31
- readonly type: StringConstructor;
32
- readonly default: string;
33
- };
34
- /**
35
- * The color of the ok-button.
36
- */
37
- readonly okColor: {
38
- readonly type: StringConstructor;
39
- readonly default: "primary";
40
- };
41
- /**
42
- * If set to `true` the modal is closed when `onOk` is called.
24
+ * The vertical position of the modal. Default is `center`.
43
25
  */
44
- readonly closeOnOk: {
45
- readonly type: BooleanConstructor;
46
- readonly default: true;
47
- };
48
26
  readonly verticalPosition: {
49
27
  readonly type: PropType<"start" | "center" | "end">;
50
28
  readonly default: "center";
51
29
  };
52
- readonly horizontalPosition: {
53
- readonly type: PropType<"start" | "center" | "end">;
54
- readonly default: "center";
55
- };
56
- /**
57
- * If set to `true` the ok-button is hidden.
58
- */
59
- readonly hideOk: BooleanConstructor;
60
- /**
61
- * If set to `true` the ok-button is disabled.
62
- */
63
- readonly okDisabled: BooleanConstructor;
64
- /**
65
- * The text of the cancel-button.
66
- */
67
- readonly cancelText: {
68
- readonly type: StringConstructor;
69
- readonly default: string;
70
- };
71
- /**
72
- * The color of the cancel-button.
73
- */
74
- readonly cancelColor: {
75
- readonly type: StringConstructor;
76
- readonly default: "default";
77
- };
78
- /**
79
- * If set to `true`, the modal is closed when clicking on the background.
80
- * This will call `onCancel`. Default is `true`.
81
- */
82
- readonly closeOnBackground: {
83
- readonly type: BooleanConstructor;
84
- readonly default: true;
85
- };
86
- /**
87
- * If set to `true` the cancel-button is hidden.
88
- */
89
- readonly hideCancel: BooleanConstructor;
90
- /**
91
- * This is called when the ok-button was clicked.
92
- */
93
- readonly onOk: PropType<() => void>;
94
- /**
95
- * This is called when the cancel-button or X-button was clicked or
96
- * if the modal was closed by clicking on the background.
97
- */
98
- readonly onCancel: PropType<() => void>;
99
- /**
100
- * A slot to replace the whole modal content including all buttons, header and footer.
101
- */
102
- readonly modal: PropType<(props: ModalSlotProps) => JSX.Element>;
103
- /**
104
- * A slot to replace the whole content section, i.e. everything between the header and the footer.
105
- */
106
- readonly content: PropType<(props: ModalSlotProps) => JSX.Element>;
107
- /**
108
- * A slot to replace the whole header section (excluding the x).
109
- */
110
- readonly header: PropType<() => JSX.Element>;
111
- /**
112
- * A slot to replace the whole footer section.
113
- */
114
- readonly footer: PropType<(props: ModalSlotProps) => JSX.Element>;
115
- readonly value: PropType<boolean>;
116
- readonly onUpdateValue: PropType<(newValue: boolean) => void>;
117
- };
118
- export type ModalSlotProps = {
119
- ok: () => void;
120
- cancel: () => void;
121
- };
122
- /**
123
- * The `NModal` is the base component for all modals and dialogs.
124
- * It provides the core mechanics to display a window in front of everything else.
125
- */
126
- declare const Component: import("vue").DefineComponent<{
127
- /**
128
- * If set to `true` the header of the modal is hidden.
129
- */
130
- readonly hideHeader: BooleanConstructor;
131
- /**
132
- * If set to `true` the footer of the modal is hidden.
133
- */
134
- readonly hideFooter: BooleanConstructor;
135
- /**
136
- * If set to `true` the X-button in the top right is hidden.
137
- */
138
- readonly hideX: BooleanConstructor;
139
- /**
140
- * The maximum width of the modal. A regular tailwind class.
141
- */
142
- readonly maxWidth: {
143
- readonly type: PropType<TWMaxWidth>;
144
- readonly default: "max-w-md";
145
- };
146
- /**
147
- * The title of the modal which is displayed in the header.
148
- */
149
- readonly title: StringConstructor;
150
- /**
151
- * The text of the ok-button.
152
- */
153
- readonly okText: {
154
- readonly type: StringConstructor;
155
- readonly default: string;
156
- };
157
30
  /**
158
- * The color of the ok-button.
159
- */
160
- readonly okColor: {
161
- readonly type: StringConstructor;
162
- readonly default: "primary";
163
- };
164
- /**
165
- * If set to `true` the modal is closed when `onOk` is called.
31
+ * The horizontal position of the modal. Default is `center`.
166
32
  */
167
- readonly closeOnOk: {
168
- readonly type: BooleanConstructor;
169
- readonly default: true;
170
- };
171
- readonly verticalPosition: {
172
- readonly type: PropType<"start" | "center" | "end">;
173
- readonly default: "center";
174
- };
175
33
  readonly horizontalPosition: {
176
34
  readonly type: PropType<"start" | "center" | "end">;
177
35
  readonly default: "center";
178
36
  };
179
- /**
180
- * If set to `true` the ok-button is hidden.
181
- */
182
- readonly hideOk: BooleanConstructor;
183
- /**
184
- * If set to `true` the ok-button is disabled.
185
- */
186
- readonly okDisabled: BooleanConstructor;
187
- /**
188
- * The text of the cancel-button.
189
- */
190
- readonly cancelText: {
191
- readonly type: StringConstructor;
192
- readonly default: string;
193
- };
194
- /**
195
- * The color of the cancel-button.
196
- */
197
- readonly cancelColor: {
198
- readonly type: StringConstructor;
199
- readonly default: "default";
200
- };
201
- /**
202
- * If set to `true`, the modal is closed when clicking on the background.
203
- * This will call `onCancel`. Default is `true`.
204
- */
205
- readonly closeOnBackground: {
206
- readonly type: BooleanConstructor;
207
- readonly default: true;
208
- };
209
- /**
210
- * If set to `true` the cancel-button is hidden.
211
- */
212
- readonly hideCancel: BooleanConstructor;
213
- /**
214
- * This is called when the ok-button was clicked.
215
- */
216
- readonly onOk: PropType<() => void>;
217
- /**
218
- * This is called when the cancel-button or X-button was clicked or
219
- * if the modal was closed by clicking on the background.
220
- */
221
- readonly onCancel: PropType<() => void>;
222
- /**
223
- * A slot to replace the whole modal content including all buttons, header and footer.
224
- */
225
- readonly modal: PropType<(props: ModalSlotProps) => JSX.Element>;
226
- /**
227
- * A slot to replace the whole content section, i.e. everything between the header and the footer.
228
- */
229
- readonly content: PropType<(props: ModalSlotProps) => JSX.Element>;
230
- /**
231
- * A slot to replace the whole header section (excluding the x).
232
- */
233
- readonly header: PropType<() => JSX.Element>;
234
- /**
235
- * A slot to replace the whole footer section.
236
- */
237
- readonly footer: PropType<(props: ModalSlotProps) => JSX.Element>;
238
- readonly value: PropType<boolean>;
239
- readonly onUpdateValue: PropType<(newValue: boolean) => void>;
240
- }, 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<{
241
- /**
242
- * If set to `true` the header of the modal is hidden.
243
- */
244
- readonly hideHeader: BooleanConstructor;
245
- /**
246
- * If set to `true` the footer of the modal is hidden.
247
- */
248
- readonly hideFooter: BooleanConstructor;
249
- /**
250
- * If set to `true` the X-button in the top right is hidden.
251
- */
252
- readonly hideX: BooleanConstructor;
253
- /**
254
- * The maximum width of the modal. A regular tailwind class.
255
- */
256
- readonly maxWidth: {
257
- readonly type: PropType<TWMaxWidth>;
258
- readonly default: "max-w-md";
259
- };
260
37
  /**
261
38
  * The title of the modal which is displayed in the header.
262
39
  */
@@ -282,14 +59,6 @@ declare const Component: import("vue").DefineComponent<{
282
59
  readonly type: BooleanConstructor;
283
60
  readonly default: true;
284
61
  };
285
- readonly verticalPosition: {
286
- readonly type: PropType<"start" | "center" | "end">;
287
- readonly default: "center";
288
- };
289
- readonly horizontalPosition: {
290
- readonly type: PropType<"start" | "center" | "end">;
291
- readonly default: "center";
292
- };
293
62
  /**
294
63
  * If set to `true` the ok-button is hidden.
295
64
  */
@@ -351,21 +120,14 @@ declare const Component: import("vue").DefineComponent<{
351
120
  readonly footer: PropType<(props: ModalSlotProps) => JSX.Element>;
352
121
  readonly value: PropType<boolean>;
353
122
  readonly onUpdateValue: PropType<(newValue: boolean) => void>;
354
- }>> & {}, {
355
- readonly maxWidth: TWMaxWidth;
356
- readonly hideX: boolean;
357
- readonly hideHeader: boolean;
358
- readonly hideFooter: boolean;
359
- readonly okText: string;
360
- readonly okColor: string;
361
- readonly closeOnOk: boolean;
362
- readonly verticalPosition: "start" | "center" | "end";
363
- readonly horizontalPosition: "start" | "center" | "end";
364
- readonly hideOk: boolean;
365
- readonly okDisabled: boolean;
366
- readonly cancelText: string;
367
- readonly cancelColor: string;
368
- readonly closeOnBackground: boolean;
369
- readonly hideCancel: boolean;
370
- }>;
123
+ };
124
+ export type ModalSlotProps = {
125
+ ok: () => void;
126
+ cancel: () => void;
127
+ };
128
+ /**
129
+ * The `NModal` is the base component for all modals and dialogs.
130
+ * It provides the core mechanics to display a window in front of everything else.
131
+ */
132
+ declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
371
133
  export { Component as NModal, Component as default };
@@ -1,4 +1,4 @@
1
- import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue";
1
+ import { createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue";
2
2
  import { createComponentWithSlots } from '../utils/component';
3
3
  import { Dialog, DialogOverlay, DialogTitle, TransitionRoot, TransitionChild } from '@headlessui/vue';
4
4
  import NButton from './NButton';
@@ -27,6 +27,20 @@ export const nModalProps = {
27
27
  type: String,
28
28
  default: 'max-w-md'
29
29
  },
30
+ /**
31
+ * The vertical position of the modal. Default is `center`.
32
+ */
33
+ verticalPosition: {
34
+ type: String,
35
+ default: 'center'
36
+ },
37
+ /**
38
+ * The horizontal position of the modal. Default is `center`.
39
+ */
40
+ horizontalPosition: {
41
+ type: String,
42
+ default: 'center'
43
+ },
30
44
  /**
31
45
  * The title of the modal which is displayed in the header.
32
46
  */
@@ -52,14 +66,6 @@ export const nModalProps = {
52
66
  type: Boolean,
53
67
  default: true
54
68
  },
55
- verticalPosition: {
56
- type: String,
57
- default: 'center'
58
- },
59
- horizontalPosition: {
60
- type: String,
61
- default: 'center'
62
- },
63
69
  /**
64
70
  * If set to `true` the ok-button is hidden.
65
71
  */
@@ -33,67 +33,5 @@ export declare const nPaginationProps: {
33
33
  /**
34
34
  * The `NPagination` is a styled pagination component.
35
35
  */
36
- declare const Component: import("vue").DefineComponent<{
37
- /**
38
- * The page number which is currently selected.
39
- */
40
- readonly value: {
41
- readonly type: NumberConstructor;
42
- readonly default: () => number;
43
- };
44
- /**
45
- * This is called, when a new page number has been selected.
46
- */
47
- readonly onUpdateValue: PropType<(newValue: number) => void>;
48
- /**
49
- * The total pages which exists. This is needed to correctly display the selectable pages.
50
- */
51
- readonly total: {
52
- readonly type: NumberConstructor;
53
- readonly default: () => number;
54
- };
55
- /**
56
- * If set to `true`, the pagination is displayed smaller.
57
- */
58
- readonly small: BooleanConstructor;
59
- /**
60
- * This is called, when the visible pages, which are selectable in the pagination, have changed.
61
- * This is useful as only these pages can be navigated to on the next click.
62
- * This information can be useful for prefetching.
63
- */
64
- readonly onVisiblePagesChanged: PropType<(visiblePages: number[]) => void>;
65
- }, 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<{
66
- /**
67
- * The page number which is currently selected.
68
- */
69
- readonly value: {
70
- readonly type: NumberConstructor;
71
- readonly default: () => number;
72
- };
73
- /**
74
- * This is called, when a new page number has been selected.
75
- */
76
- readonly onUpdateValue: PropType<(newValue: number) => void>;
77
- /**
78
- * The total pages which exists. This is needed to correctly display the selectable pages.
79
- */
80
- readonly total: {
81
- readonly type: NumberConstructor;
82
- readonly default: () => number;
83
- };
84
- /**
85
- * If set to `true`, the pagination is displayed smaller.
86
- */
87
- readonly small: BooleanConstructor;
88
- /**
89
- * This is called, when the visible pages, which are selectable in the pagination, have changed.
90
- * This is useful as only these pages can be navigated to on the next click.
91
- * This information can be useful for prefetching.
92
- */
93
- readonly onVisiblePagesChanged: PropType<(visiblePages: number[]) => void>;
94
- }>> & {}, {
95
- readonly small: boolean;
96
- readonly value: number;
97
- readonly total: number;
98
- }>;
36
+ declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
99
37
  export { Component as NPagination, Component as default };
@@ -35,60 +35,5 @@ export type NSearchbarExposed = {
35
35
  /**
36
36
  * The `NSearchbar` is a styled input with a search icon.
37
37
  */
38
- declare const Component: import("vue").DefineComponent<{
39
- /**
40
- * The placeholder of the search-bar.
41
- */
42
- readonly placeholder: {
43
- readonly type: StringConstructor;
44
- readonly default: string;
45
- };
46
- /**
47
- * If set to `true` the search-bar is displayed smaller.
48
- */
49
- readonly small: BooleanConstructor;
50
- /**
51
- * Adds the classes directly to the input (e.g. for shadow).
52
- */
53
- readonly inputClass: StringConstructor;
54
- /**
55
- * This is called when the search-bar receives focus.
56
- */
57
- readonly onFocus: PropType<() => void>;
58
- /**
59
- * This is called when the search-bar looses focus.
60
- */
61
- readonly onBlur: PropType<() => void>;
62
- readonly value: PropType<string>;
63
- readonly onUpdateValue: PropType<(newValue: string) => void>;
64
- }, 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<{
65
- /**
66
- * The placeholder of the search-bar.
67
- */
68
- readonly placeholder: {
69
- readonly type: StringConstructor;
70
- readonly default: string;
71
- };
72
- /**
73
- * If set to `true` the search-bar is displayed smaller.
74
- */
75
- readonly small: BooleanConstructor;
76
- /**
77
- * Adds the classes directly to the input (e.g. for shadow).
78
- */
79
- readonly inputClass: StringConstructor;
80
- /**
81
- * This is called when the search-bar receives focus.
82
- */
83
- readonly onFocus: PropType<() => void>;
84
- /**
85
- * This is called when the search-bar looses focus.
86
- */
87
- readonly onBlur: PropType<() => void>;
88
- readonly value: PropType<string>;
89
- readonly onUpdateValue: PropType<(newValue: string) => void>;
90
- }>> & {}, {
91
- readonly small: boolean;
92
- readonly placeholder: string;
93
- }>;
38
+ declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
94
39
  export { Component as NSearchbar, Component as default };
@@ -13,7 +13,7 @@ export declare const nSearchbarListProps: {
13
13
  readonly value: import("vue").PropType<string>;
14
14
  readonly onUpdateValue: import("vue").PropType<(newValue: string) => void>;
15
15
  readonly items: {
16
- readonly type: import("vue").PropType<import("./NSuggestionList").SuggestionItem[]>;
16
+ readonly type: import("vue").PropType<Array<import("./NSuggestionList").SuggestionItem>>;
17
17
  readonly default: () => never[];
18
18
  };
19
19
  readonly maxItems: {
@@ -23,71 +23,11 @@ export declare const nSearchbarListProps: {
23
23
  readonly hideList: BooleanConstructor;
24
24
  readonly loading: BooleanConstructor;
25
25
  readonly onSelect: import("vue").PropType<(id: string) => void>;
26
- readonly listItem: import("vue").PropType<(props: import("./NSuggestionList").ItemSlotProps<import("./NSuggestionList").SuggestionItem>) => JSX.Element>;
26
+ readonly listItem: import("vue").PropType<(props: import("./NSuggestionList").ItemSlotProps) => JSX.Element>;
27
27
  readonly onRealBlur: import("vue").PropType<() => void>;
28
28
  };
29
29
  /**
30
30
  * The `NSearchbarList` is a {@link NSearchbar} with a {@link NSuggestionList}.
31
31
  */
32
- declare const Component: import("vue").DefineComponent<{
33
- /**
34
- * @see {@link nSearchbarProps.placeholder}
35
- */
36
- readonly placeholder: {
37
- readonly type: StringConstructor;
38
- readonly default: string;
39
- };
40
- /**
41
- * Adds the classes directly to the input (e.g. for shadow).
42
- */
43
- readonly inputClass: StringConstructor;
44
- readonly value: import("vue").PropType<string>;
45
- readonly onUpdateValue: import("vue").PropType<(newValue: string) => void>;
46
- readonly items: {
47
- readonly type: import("vue").PropType<import("./NSuggestionList").SuggestionItem[]>;
48
- readonly default: () => never[];
49
- };
50
- readonly maxItems: {
51
- readonly type: NumberConstructor;
52
- readonly default: () => number;
53
- };
54
- readonly hideList: BooleanConstructor;
55
- readonly loading: BooleanConstructor;
56
- readonly onSelect: import("vue").PropType<(id: string) => void>;
57
- readonly listItem: import("vue").PropType<(props: import("./NSuggestionList").ItemSlotProps<import("./NSuggestionList").SuggestionItem>) => JSX.Element>;
58
- readonly onRealBlur: import("vue").PropType<() => void>;
59
- }, 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<{
60
- /**
61
- * @see {@link nSearchbarProps.placeholder}
62
- */
63
- readonly placeholder: {
64
- readonly type: StringConstructor;
65
- readonly default: string;
66
- };
67
- /**
68
- * Adds the classes directly to the input (e.g. for shadow).
69
- */
70
- readonly inputClass: StringConstructor;
71
- readonly value: import("vue").PropType<string>;
72
- readonly onUpdateValue: import("vue").PropType<(newValue: string) => void>;
73
- readonly items: {
74
- readonly type: import("vue").PropType<import("./NSuggestionList").SuggestionItem[]>;
75
- readonly default: () => never[];
76
- };
77
- readonly maxItems: {
78
- readonly type: NumberConstructor;
79
- readonly default: () => number;
80
- };
81
- readonly hideList: BooleanConstructor;
82
- readonly loading: BooleanConstructor;
83
- readonly onSelect: import("vue").PropType<(id: string) => void>;
84
- readonly listItem: import("vue").PropType<(props: import("./NSuggestionList").ItemSlotProps<import("./NSuggestionList").SuggestionItem>) => JSX.Element>;
85
- readonly onRealBlur: import("vue").PropType<() => void>;
86
- }>> & {}, {
87
- readonly loading: boolean;
88
- readonly items: import("./NSuggestionList").SuggestionItem[];
89
- readonly placeholder: string;
90
- readonly maxItems: number;
91
- readonly hideList: boolean;
92
- }>;
32
+ declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
93
33
  export { Component as NSearchbarList, Component as default };
@@ -1,4 +1,4 @@
1
- import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
1
+ import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
2
  import { createComponentWithSlots } from '../utils/component';
3
3
  import { ref } from 'vue';
4
4
  import { vModelProps } from '../utils/vModel';