@naptics/vue-collection 0.0.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 (105) hide show
  1. package/README.md +27 -0
  2. package/lib/components/NAlert.d.ts +72 -0
  3. package/lib/components/NAlert.jsx +69 -0
  4. package/lib/components/NBadge.d.ts +174 -0
  5. package/lib/components/NBadge.jsx +58 -0
  6. package/lib/components/NBreadcrub.d.ts +161 -0
  7. package/lib/components/NBreadcrub.jsx +64 -0
  8. package/lib/components/NButton.d.ts +149 -0
  9. package/lib/components/NButton.jsx +58 -0
  10. package/lib/components/NCheckbox.d.ts +51 -0
  11. package/lib/components/NCheckbox.jsx +38 -0
  12. package/lib/components/NCheckboxLabel.d.ts +70 -0
  13. package/lib/components/NCheckboxLabel.jsx +42 -0
  14. package/lib/components/NCrudModal.d.ts +301 -0
  15. package/lib/components/NCrudModal.jsx +89 -0
  16. package/lib/components/NDialog.d.ts +190 -0
  17. package/lib/components/NDialog.jsx +144 -0
  18. package/lib/components/NDropdown.d.ts +116 -0
  19. package/lib/components/NDropdown.jsx +92 -0
  20. package/lib/components/NDropzone.d.ts +162 -0
  21. package/lib/components/NDropzone.jsx +211 -0
  22. package/lib/components/NForm.d.ts +43 -0
  23. package/lib/components/NForm.jsx +26 -0
  24. package/lib/components/NFormModal.d.ts +190 -0
  25. package/lib/components/NFormModal.jsx +48 -0
  26. package/lib/components/NIconButton.d.ts +202 -0
  27. package/lib/components/NIconButton.jsx +71 -0
  28. package/lib/components/NIconCircle.d.ts +135 -0
  29. package/lib/components/NIconCircle.jsx +67 -0
  30. package/lib/components/NInput.css +11 -0
  31. package/lib/components/NInput.d.ts +232 -0
  32. package/lib/components/NInput.jsx +97 -0
  33. package/lib/components/NInputPhone.d.ts +150 -0
  34. package/lib/components/NInputPhone.jsx +31 -0
  35. package/lib/components/NInputSelect.d.ts +271 -0
  36. package/lib/components/NInputSelect.jsx +89 -0
  37. package/lib/components/NInputSuggestion.d.ts +212 -0
  38. package/lib/components/NInputSuggestion.jsx +48 -0
  39. package/lib/components/NLink.d.ts +111 -0
  40. package/lib/components/NLink.jsx +58 -0
  41. package/lib/components/NList.d.ts +43 -0
  42. package/lib/components/NList.jsx +24 -0
  43. package/lib/components/NLoadingIndicator.css +46 -0
  44. package/lib/components/NLoadingIndicator.d.ts +77 -0
  45. package/lib/components/NLoadingIndicator.jsx +42 -0
  46. package/lib/components/NModal.d.ts +333 -0
  47. package/lib/components/NModal.jsx +170 -0
  48. package/lib/components/NPagination.css +15 -0
  49. package/lib/components/NPagination.d.ts +99 -0
  50. package/lib/components/NPagination.jsx +104 -0
  51. package/lib/components/NSearchbar.d.ts +94 -0
  52. package/lib/components/NSearchbar.jsx +58 -0
  53. package/lib/components/NSearchbarList.d.ts +90 -0
  54. package/lib/components/NSearchbarList.jsx +20 -0
  55. package/lib/components/NSelect.d.ts +159 -0
  56. package/lib/components/NSelect.jsx +81 -0
  57. package/lib/components/NSuggestionList.d.ts +275 -0
  58. package/lib/components/NSuggestionList.jsx +157 -0
  59. package/lib/components/NTable.css +3 -0
  60. package/lib/components/NTable.d.ts +187 -0
  61. package/lib/components/NTable.jsx +146 -0
  62. package/lib/components/NTableAction.d.ts +74 -0
  63. package/lib/components/NTableAction.jsx +35 -0
  64. package/lib/components/NTextArea.d.ts +252 -0
  65. package/lib/components/NTextArea.jsx +108 -0
  66. package/lib/components/NTooltip.css +37 -0
  67. package/lib/components/NTooltip.d.ts +186 -0
  68. package/lib/components/NTooltip.jsx +161 -0
  69. package/lib/components/NValInput.d.ts +297 -0
  70. package/lib/components/NValInput.jsx +101 -0
  71. package/lib/components/ValidatedForm.d.ts +34 -0
  72. package/lib/components/ValidatedForm.js +25 -0
  73. package/lib/i18n/de/template.json +10 -0
  74. package/lib/i18n/de/vue-collection.json +58 -0
  75. package/lib/i18n/de.d.ts +61 -0
  76. package/lib/i18n/de.js +5 -0
  77. package/lib/i18n/en/template.json +10 -0
  78. package/lib/i18n/en/vue-collection.json +58 -0
  79. package/lib/i18n/en.d.ts +61 -0
  80. package/lib/i18n/en.js +5 -0
  81. package/lib/i18n/index.d.ts +17 -0
  82. package/lib/i18n/index.js +34 -0
  83. package/lib/index.d.ts +64 -0
  84. package/lib/index.js +65 -0
  85. package/lib/utils/breakpoints.d.ts +15 -0
  86. package/lib/utils/breakpoints.js +37 -0
  87. package/lib/utils/component.d.ts +50 -0
  88. package/lib/utils/component.js +51 -0
  89. package/lib/utils/deferred.d.ts +13 -0
  90. package/lib/utils/deferred.js +17 -0
  91. package/lib/utils/identifiable.d.ts +57 -0
  92. package/lib/utils/identifiable.js +78 -0
  93. package/lib/utils/stringMaxLength.d.ts +14 -0
  94. package/lib/utils/stringMaxLength.js +28 -0
  95. package/lib/utils/tailwind.d.ts +2 -0
  96. package/lib/utils/tailwind.js +1 -0
  97. package/lib/utils/utils.d.ts +27 -0
  98. package/lib/utils/utils.js +26 -0
  99. package/lib/utils/vModel.d.ts +182 -0
  100. package/lib/utils/vModel.js +215 -0
  101. package/lib/utils/validation.d.ts +84 -0
  102. package/lib/utils/validation.js +163 -0
  103. package/lib/utils/vue.d.ts +13 -0
  104. package/lib/utils/vue.js +19 -0
  105. package/package.json +56 -0
@@ -0,0 +1,333 @@
1
+ import type { PropType } from 'vue';
2
+ import type { TWMaxWidth } from '../utils/tailwind';
3
+ export declare const nModalProps: {
4
+ /**
5
+ * If set to `true` the header of the modal is hidden.
6
+ */
7
+ hideHeader: BooleanConstructor;
8
+ /**
9
+ * If set to `true` the footer of the modal is hidden.
10
+ */
11
+ hideFooter: BooleanConstructor;
12
+ /**
13
+ * If set to `true` the X-button in the top right is hidden.
14
+ */
15
+ hideX: BooleanConstructor;
16
+ /**
17
+ * The maximum width of the modal. A regular tailwind class.
18
+ */
19
+ maxWidth: {
20
+ type: PropType<TWMaxWidth>;
21
+ default: string;
22
+ };
23
+ /**
24
+ * The title of the modal which is displayed in the header.
25
+ */
26
+ title: StringConstructor;
27
+ /**
28
+ * The text of the ok-button.
29
+ */
30
+ okText: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ /**
35
+ * The color of the ok-button.
36
+ */
37
+ okColor: {
38
+ type: StringConstructor;
39
+ default: string;
40
+ };
41
+ /**
42
+ * If set to `true` the modal is closed when `onOk` is called.
43
+ */
44
+ closeOnOk: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ /**
49
+ * If set to `true` the ok-button is hidden.
50
+ */
51
+ hideOk: BooleanConstructor;
52
+ /**
53
+ * If set to `true` the ok-button is disabled.
54
+ */
55
+ okDisabled: BooleanConstructor;
56
+ /**
57
+ * The text of the cancel-button.
58
+ */
59
+ cancelText: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ /**
64
+ * The color of the cancel-button.
65
+ */
66
+ cancelColor: {
67
+ type: StringConstructor;
68
+ default: string;
69
+ };
70
+ /**
71
+ * If set to `true`, the modal is closed when clicking on the background.
72
+ * This will call `onCancel`. Default is `true`.
73
+ */
74
+ closeOnBackground: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ /**
79
+ * If set to `true` the cancel-button is hidden.
80
+ */
81
+ hideCancel: BooleanConstructor;
82
+ /**
83
+ * This is called when the ok-button was clicked.
84
+ */
85
+ onOk: PropType<() => void>;
86
+ /**
87
+ * This is called when the cancel-button or X-button was clicked or
88
+ * if the modal was closed by clicking on the background.
89
+ */
90
+ onCancel: PropType<() => void>;
91
+ /**
92
+ * A slot to replace the whole modal content including all buttons, header and footer.
93
+ */
94
+ modal: PropType<(props: ModalSlotProps) => JSX.Element>;
95
+ /**
96
+ * A slot to replace the whole header section (excluding the x).
97
+ */
98
+ header: PropType<() => JSX.Element>;
99
+ /**
100
+ * A slot to replace the whole footer section.
101
+ */
102
+ footer: PropType<(props: ModalSlotProps) => JSX.Element>;
103
+ value: PropType<boolean>;
104
+ onUpdateValue: PropType<(newValue: boolean) => void>;
105
+ };
106
+ export type ModalSlotProps = {
107
+ ok: () => void;
108
+ cancel: () => void;
109
+ };
110
+ /**
111
+ * The `NModal` is the base component for all modals and dialogs.
112
+ * It provides the core mechanics to display a window in front of everything else.
113
+ */
114
+ declare const _default: import("vue").DefineComponent<{
115
+ /**
116
+ * If set to `true` the header of the modal is hidden.
117
+ */
118
+ hideHeader: BooleanConstructor;
119
+ /**
120
+ * If set to `true` the footer of the modal is hidden.
121
+ */
122
+ hideFooter: BooleanConstructor;
123
+ /**
124
+ * If set to `true` the X-button in the top right is hidden.
125
+ */
126
+ hideX: BooleanConstructor;
127
+ /**
128
+ * The maximum width of the modal. A regular tailwind class.
129
+ */
130
+ maxWidth: {
131
+ type: PropType<TWMaxWidth>;
132
+ default: string;
133
+ };
134
+ /**
135
+ * The title of the modal which is displayed in the header.
136
+ */
137
+ title: StringConstructor;
138
+ /**
139
+ * The text of the ok-button.
140
+ */
141
+ okText: {
142
+ type: StringConstructor;
143
+ default: string;
144
+ };
145
+ /**
146
+ * The color of the ok-button.
147
+ */
148
+ okColor: {
149
+ type: StringConstructor;
150
+ default: string;
151
+ };
152
+ /**
153
+ * If set to `true` the modal is closed when `onOk` is called.
154
+ */
155
+ closeOnOk: {
156
+ type: BooleanConstructor;
157
+ default: boolean;
158
+ };
159
+ /**
160
+ * If set to `true` the ok-button is hidden.
161
+ */
162
+ hideOk: BooleanConstructor;
163
+ /**
164
+ * If set to `true` the ok-button is disabled.
165
+ */
166
+ okDisabled: BooleanConstructor;
167
+ /**
168
+ * The text of the cancel-button.
169
+ */
170
+ cancelText: {
171
+ type: StringConstructor;
172
+ default: string;
173
+ };
174
+ /**
175
+ * The color of the cancel-button.
176
+ */
177
+ cancelColor: {
178
+ type: StringConstructor;
179
+ default: string;
180
+ };
181
+ /**
182
+ * If set to `true`, the modal is closed when clicking on the background.
183
+ * This will call `onCancel`. Default is `true`.
184
+ */
185
+ closeOnBackground: {
186
+ type: BooleanConstructor;
187
+ default: boolean;
188
+ };
189
+ /**
190
+ * If set to `true` the cancel-button is hidden.
191
+ */
192
+ hideCancel: BooleanConstructor;
193
+ /**
194
+ * This is called when the ok-button was clicked.
195
+ */
196
+ onOk: PropType<() => void>;
197
+ /**
198
+ * This is called when the cancel-button or X-button was clicked or
199
+ * if the modal was closed by clicking on the background.
200
+ */
201
+ onCancel: PropType<() => void>;
202
+ /**
203
+ * A slot to replace the whole modal content including all buttons, header and footer.
204
+ */
205
+ modal: PropType<(props: ModalSlotProps) => JSX.Element>;
206
+ /**
207
+ * A slot to replace the whole header section (excluding the x).
208
+ */
209
+ header: PropType<() => JSX.Element>;
210
+ /**
211
+ * A slot to replace the whole footer section.
212
+ */
213
+ footer: PropType<(props: ModalSlotProps) => JSX.Element>;
214
+ value: PropType<boolean>;
215
+ onUpdateValue: PropType<(newValue: boolean) => void>;
216
+ }, 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<{
217
+ /**
218
+ * If set to `true` the header of the modal is hidden.
219
+ */
220
+ hideHeader: BooleanConstructor;
221
+ /**
222
+ * If set to `true` the footer of the modal is hidden.
223
+ */
224
+ hideFooter: BooleanConstructor;
225
+ /**
226
+ * If set to `true` the X-button in the top right is hidden.
227
+ */
228
+ hideX: BooleanConstructor;
229
+ /**
230
+ * The maximum width of the modal. A regular tailwind class.
231
+ */
232
+ maxWidth: {
233
+ type: PropType<TWMaxWidth>;
234
+ default: string;
235
+ };
236
+ /**
237
+ * The title of the modal which is displayed in the header.
238
+ */
239
+ title: StringConstructor;
240
+ /**
241
+ * The text of the ok-button.
242
+ */
243
+ okText: {
244
+ type: StringConstructor;
245
+ default: string;
246
+ };
247
+ /**
248
+ * The color of the ok-button.
249
+ */
250
+ okColor: {
251
+ type: StringConstructor;
252
+ default: string;
253
+ };
254
+ /**
255
+ * If set to `true` the modal is closed when `onOk` is called.
256
+ */
257
+ closeOnOk: {
258
+ type: BooleanConstructor;
259
+ default: boolean;
260
+ };
261
+ /**
262
+ * If set to `true` the ok-button is hidden.
263
+ */
264
+ hideOk: BooleanConstructor;
265
+ /**
266
+ * If set to `true` the ok-button is disabled.
267
+ */
268
+ okDisabled: BooleanConstructor;
269
+ /**
270
+ * The text of the cancel-button.
271
+ */
272
+ cancelText: {
273
+ type: StringConstructor;
274
+ default: string;
275
+ };
276
+ /**
277
+ * The color of the cancel-button.
278
+ */
279
+ cancelColor: {
280
+ type: StringConstructor;
281
+ default: string;
282
+ };
283
+ /**
284
+ * If set to `true`, the modal is closed when clicking on the background.
285
+ * This will call `onCancel`. Default is `true`.
286
+ */
287
+ closeOnBackground: {
288
+ type: BooleanConstructor;
289
+ default: boolean;
290
+ };
291
+ /**
292
+ * If set to `true` the cancel-button is hidden.
293
+ */
294
+ hideCancel: BooleanConstructor;
295
+ /**
296
+ * This is called when the ok-button was clicked.
297
+ */
298
+ onOk: PropType<() => void>;
299
+ /**
300
+ * This is called when the cancel-button or X-button was clicked or
301
+ * if the modal was closed by clicking on the background.
302
+ */
303
+ onCancel: PropType<() => void>;
304
+ /**
305
+ * A slot to replace the whole modal content including all buttons, header and footer.
306
+ */
307
+ modal: PropType<(props: ModalSlotProps) => JSX.Element>;
308
+ /**
309
+ * A slot to replace the whole header section (excluding the x).
310
+ */
311
+ header: PropType<() => JSX.Element>;
312
+ /**
313
+ * A slot to replace the whole footer section.
314
+ */
315
+ footer: PropType<(props: ModalSlotProps) => JSX.Element>;
316
+ value: PropType<boolean>;
317
+ onUpdateValue: PropType<(newValue: boolean) => void>;
318
+ }>> & {}, {
319
+ maxWidth: TWMaxWidth;
320
+ hideX: boolean;
321
+ hideHeader: boolean;
322
+ hideFooter: boolean;
323
+ okText: string;
324
+ okColor: string;
325
+ closeOnOk: boolean;
326
+ hideOk: boolean;
327
+ okDisabled: boolean;
328
+ cancelText: string;
329
+ cancelColor: string;
330
+ closeOnBackground: boolean;
331
+ hideCancel: boolean;
332
+ }>;
333
+ export default _default;
@@ -0,0 +1,170 @@
1
+ import { createComponent, createProps } from '../utils/component';
2
+ import { Dialog, DialogOverlay, DialogTitle, TransitionRoot, TransitionChild } from '@headlessui/vue';
3
+ import NButton from './NButton';
4
+ import NIconButton from './NIconButton';
5
+ import { XMarkIcon } from '@heroicons/vue/24/solid';
6
+ import { trsl } from '../i18n';
7
+ import { vModelProps } from '../utils/vModel';
8
+ export const nModalProps = createProps({
9
+ ...vModelProps(Boolean),
10
+ /**
11
+ * If set to `true` the header of the modal is hidden.
12
+ */
13
+ hideHeader: Boolean,
14
+ /**
15
+ * If set to `true` the footer of the modal is hidden.
16
+ */
17
+ hideFooter: Boolean,
18
+ /**
19
+ * If set to `true` the X-button in the top right is hidden.
20
+ */
21
+ hideX: Boolean,
22
+ /**
23
+ * The maximum width of the modal. A regular tailwind class.
24
+ */
25
+ maxWidth: {
26
+ type: String,
27
+ default: 'max-w-md',
28
+ },
29
+ /**
30
+ * The title of the modal which is displayed in the header.
31
+ */
32
+ title: String,
33
+ /**
34
+ * The text of the ok-button.
35
+ */
36
+ okText: {
37
+ type: String,
38
+ default: trsl('vue-collection.action.save'),
39
+ },
40
+ /**
41
+ * The color of the ok-button.
42
+ */
43
+ okColor: {
44
+ type: String,
45
+ default: 'primary',
46
+ },
47
+ /**
48
+ * If set to `true` the modal is closed when `onOk` is called.
49
+ */
50
+ closeOnOk: {
51
+ type: Boolean,
52
+ default: true,
53
+ },
54
+ /**
55
+ * If set to `true` the ok-button is hidden.
56
+ */
57
+ hideOk: Boolean,
58
+ /**
59
+ * If set to `true` the ok-button is disabled.
60
+ */
61
+ okDisabled: Boolean,
62
+ /**
63
+ * The text of the cancel-button.
64
+ */
65
+ cancelText: {
66
+ type: String,
67
+ default: trsl('vue-collection.action.cancel'),
68
+ },
69
+ /**
70
+ * The color of the cancel-button.
71
+ */
72
+ cancelColor: {
73
+ type: String,
74
+ default: 'default',
75
+ },
76
+ /**
77
+ * If set to `true`, the modal is closed when clicking on the background.
78
+ * This will call `onCancel`. Default is `true`.
79
+ */
80
+ closeOnBackground: {
81
+ type: Boolean,
82
+ default: true,
83
+ },
84
+ /**
85
+ * If set to `true` the cancel-button is hidden.
86
+ */
87
+ hideCancel: Boolean,
88
+ /**
89
+ * This is called when the ok-button was clicked.
90
+ */
91
+ onOk: Function,
92
+ /**
93
+ * This is called when the cancel-button or X-button was clicked or
94
+ * if the modal was closed by clicking on the background.
95
+ */
96
+ onCancel: Function,
97
+ /**
98
+ * A slot to replace the whole modal content including all buttons, header and footer.
99
+ */
100
+ modal: Function,
101
+ /**
102
+ * A slot to replace the whole header section (excluding the x).
103
+ */
104
+ header: Function,
105
+ /**
106
+ * A slot to replace the whole footer section.
107
+ */
108
+ footer: Function,
109
+ });
110
+ /**
111
+ * The `NModal` is the base component for all modals and dialogs.
112
+ * It provides the core mechanics to display a window in front of everything else.
113
+ */
114
+ export default createComponent('NModal', nModalProps, (props, { slots }) => {
115
+ const ok = () => {
116
+ props.onOk?.();
117
+ if (props.closeOnOk)
118
+ props.onUpdateValue?.(false);
119
+ };
120
+ const cancel = () => {
121
+ props.onCancel?.();
122
+ props.onUpdateValue?.(false);
123
+ };
124
+ return () => (<TransitionRoot as="template" show={props.value}>
125
+ <Dialog as="div" static class="fixed z-40 inset-0 overflow-y-auto" onClose={cancel} open={props.value}>
126
+ <div class="flex items-center justify-center min-h-screen">
127
+ <TransitionChild as="template" enter="ease-out duration-300" enter-from="opacity-0" enter-to="opacity-100" leave="ease-in duration-200" leave-from="opacity-100" leave-to="opacity-0">
128
+ {props.closeOnBackground ? (<DialogOverlay class="fixed inset-0 bg-default-700 bg-opacity-75"/>) : (<div class="fixed inset-0 bg-default-700 bg-opacity-75"/>)}
129
+ </TransitionChild>
130
+
131
+ {/* This element is to trick the browser into centering the modal contents. */}
132
+ <span class="hidden align-middle h-screen" aria-hidden="true">
133
+ &#8203;
134
+ </span>
135
+
136
+ <TransitionChild as="template" enter="ease-out duration-300" enter-from="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" enter-to="opacity-100 translate-y-0 sm:scale-100" leave="ease-in duration-200" leave-from="opacity-100 translate-y-0 sm:scale-100" leave-to="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95">
137
+ <div class={['transform m-4 w-full align-middle', props.maxWidth]}>
138
+ {props.modal?.({ ok, cancel }) || (<div class={[
139
+ 'shadow-xl rounded-lg bg-white divide-y divide-default-100',
140
+ props.maxWidth,
141
+ ]}>
142
+ {!props.hideX && (<div class="sm:block absolute top-0 right-0 mt-3 mr-3">
143
+ <NIconButton icon={XMarkIcon} color="default" size={5} onClick={cancel}/>
144
+ </div>)}
145
+
146
+ {!props.hideHeader && (<div class="px-4 sm:px-6 pt-4 pb-2 bg-default-50 rounded-t-lg">
147
+ {props.header?.() || (<DialogTitle as="h4" class="text-lg font-semibold">
148
+ {props.title}
149
+ </DialogTitle>)}
150
+ </div>)}
151
+
152
+ <div class="px-4 sm:px-6 py-4 rounded-lg">{slots.default?.()}</div>
153
+
154
+ {!props.hideFooter && (<div class="px-4 sm:px-6 pb-4 pt-2 bg-default-50 rounded-b-lg">
155
+ {props.footer?.({ ok, cancel }) || (<div class="flex justify-end space-x-2">
156
+ {!props.hideCancel && (<NButton color={props.cancelColor} onClick={cancel}>
157
+ {props.cancelText}
158
+ </NButton>)}
159
+ {!props.hideOk && (<NButton color={props.okColor} onClick={ok} disabled={props.okDisabled}>
160
+ {props.okText}
161
+ </NButton>)}
162
+ </div>)}
163
+ </div>)}
164
+ </div>)}
165
+ </div>
166
+ </TransitionChild>
167
+ </div>
168
+ </Dialog>
169
+ </TransitionRoot>);
170
+ });
@@ -0,0 +1,15 @@
1
+ .pagination-item {
2
+ @apply h-9 w-9 text-sm inline-flex items-center justify-center border font-medium border-default-300 text-default-500;
3
+ }
4
+
5
+ .pagination-item.not-small {
6
+ @apply sm:w-11;
7
+ }
8
+
9
+ .pagination-item.selectable {
10
+ @apply hover:bg-default-50 focus:outline-none focus-visible:border-primary-500 focus-visible:ring-primary-500 focus-visible:ring-1 focus-visible:z-[2];
11
+ }
12
+
13
+ .pagination-item.selectable.selected {
14
+ @apply border-primary-500 bg-primary-100 hover:bg-primary-100 text-primary-600 z-[1];
15
+ }
@@ -0,0 +1,99 @@
1
+ import { type PropType } from 'vue';
2
+ import './NPagination.css';
3
+ export declare const nPaginationProps: {
4
+ /**
5
+ * The page number which is currently selected.
6
+ */
7
+ value: {
8
+ type: NumberConstructor;
9
+ default: () => 1;
10
+ };
11
+ /**
12
+ * This is called, when a new page number has been selected.
13
+ */
14
+ onUpdateValue: PropType<(newValue: number) => void>;
15
+ /**
16
+ * The total pages which exists. This is needed to correctly display the selectable pages.
17
+ */
18
+ total: {
19
+ type: NumberConstructor;
20
+ default: () => 1;
21
+ };
22
+ /**
23
+ * If set to `true`, the pagination is displayed smaller.
24
+ */
25
+ small: BooleanConstructor;
26
+ /**
27
+ * This is called, when the visible pages, which are selectable in the pagination, have changed.
28
+ * This is useful as only these pages can be navigated to on the next click.
29
+ * This information can be useful for prefetching.
30
+ */
31
+ onVisiblePagesChanged: PropType<(visiblePages: number[]) => void>;
32
+ };
33
+ /**
34
+ * The `NPagination` is a styled pagination component.
35
+ */
36
+ declare const _default: import("vue").DefineComponent<{
37
+ /**
38
+ * The page number which is currently selected.
39
+ */
40
+ value: {
41
+ type: NumberConstructor;
42
+ default: () => 1;
43
+ };
44
+ /**
45
+ * This is called, when a new page number has been selected.
46
+ */
47
+ onUpdateValue: PropType<(newValue: number) => void>;
48
+ /**
49
+ * The total pages which exists. This is needed to correctly display the selectable pages.
50
+ */
51
+ total: {
52
+ type: NumberConstructor;
53
+ default: () => 1;
54
+ };
55
+ /**
56
+ * If set to `true`, the pagination is displayed smaller.
57
+ */
58
+ 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
+ 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
+ value: {
70
+ type: NumberConstructor;
71
+ default: () => 1;
72
+ };
73
+ /**
74
+ * This is called, when a new page number has been selected.
75
+ */
76
+ onUpdateValue: PropType<(newValue: number) => void>;
77
+ /**
78
+ * The total pages which exists. This is needed to correctly display the selectable pages.
79
+ */
80
+ total: {
81
+ type: NumberConstructor;
82
+ default: () => 1;
83
+ };
84
+ /**
85
+ * If set to `true`, the pagination is displayed smaller.
86
+ */
87
+ 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
+ onVisiblePagesChanged: PropType<(visiblePages: number[]) => void>;
94
+ }>> & {}, {
95
+ small: boolean;
96
+ value: number;
97
+ total: number;
98
+ }>;
99
+ export default _default;