@naptics/vue-collection 0.0.5 → 0.0.7

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 (77) hide show
  1. package/README.md +1 -1
  2. package/components/NAlert.d.ts +20 -20
  3. package/components/NAlert.js +3 -3
  4. package/components/NBadge.d.ts +87 -87
  5. package/components/NBadge.js +3 -3
  6. package/components/NBreadcrub.d.ts +57 -57
  7. package/components/NBreadcrub.js +3 -3
  8. package/components/NButton.d.ts +69 -69
  9. package/components/NButton.js +3 -3
  10. package/components/NCheckbox.d.ts +20 -20
  11. package/components/NCheckbox.js +3 -3
  12. package/components/NCheckboxLabel.d.ts +30 -30
  13. package/components/NCheckboxLabel.js +3 -3
  14. package/components/NCrudModal.d.ts +238 -203
  15. package/components/NCrudModal.js +17 -4
  16. package/components/NDialog.d.ts +1 -1
  17. package/components/NDialog.js +3 -3
  18. package/components/NDropdown.d.ts +25 -25
  19. package/components/NDropdown.js +3 -3
  20. package/components/NDropzone.d.ts +52 -52
  21. package/components/NDropzone.js +3 -3
  22. package/components/NForm.d.ts +6 -6
  23. package/components/NForm.js +3 -3
  24. package/components/NFormModal.d.ts +136 -136
  25. package/components/NFormModal.js +3 -3
  26. package/components/NIconButton.d.ts +94 -94
  27. package/components/NIconButton.js +3 -3
  28. package/components/NIconCircle.d.ts +46 -46
  29. package/components/NIconCircle.js +3 -3
  30. package/components/NInput.d.ts +94 -94
  31. package/components/NInput.js +3 -3
  32. package/components/NInputPhone.d.ts +125 -125
  33. package/components/NInputPhone.js +2 -2
  34. package/components/NInputSelect.d.ts +131 -131
  35. package/components/NInputSelect.js +3 -3
  36. package/components/NInputSuggestion.d.ts +179 -167
  37. package/components/NInputSuggestion.js +3 -3
  38. package/components/NLink.d.ts +32 -32
  39. package/components/NLink.js +3 -3
  40. package/components/NList.d.ts +10 -10
  41. package/components/NList.js +3 -3
  42. package/components/NLoadingIndicator.d.ts +30 -30
  43. package/components/NLoadingIndicator.js +3 -3
  44. package/components/NModal.d.ts +118 -118
  45. package/components/NModal.js +3 -3
  46. package/components/NPagination.d.ts +30 -30
  47. package/components/NPagination.js +3 -3
  48. package/components/NSearchbar.d.ts +29 -29
  49. package/components/NSearchbar.js +3 -3
  50. package/components/NSearchbarList.d.ts +53 -62
  51. package/components/NSearchbarList.js +3 -3
  52. package/components/NSelect.d.ts +64 -64
  53. package/components/NSelect.js +3 -3
  54. package/components/NSuggestionList.d.ts +84 -84
  55. package/components/NSuggestionList.js +7 -7
  56. package/components/NTable.d.ts +29 -29
  57. package/components/NTable.js +3 -3
  58. package/components/NTableAction.d.ts +19 -19
  59. package/components/NTableAction.js +3 -3
  60. package/components/NTextArea.d.ts +118 -118
  61. package/components/NTextArea.js +5 -5
  62. package/components/NTooltip.d.ts +42 -42
  63. package/components/NTooltip.js +3 -3
  64. package/components/NValInput.d.ts +134 -134
  65. package/components/NValInput.js +5 -5
  66. package/index.d.ts +2 -66
  67. package/index.js +2 -67
  68. package/package.json +3 -1
  69. package/utils/breakpoints.d.ts +3 -0
  70. package/utils/breakpoints.js +3 -0
  71. package/utils/component.d.ts +0 -8
  72. package/utils/component.js +0 -10
  73. package/utils/identifiable.d.ts +8 -8
  74. package/utils/identifiable.js +4 -2
  75. package/utils/tailwind.d.ts +2 -0
  76. package/utils/utils.d.ts +25 -12
  77. package/utils/utils.js +30 -9
@@ -4,93 +4,104 @@ export declare const nCrudModalProps: {
4
4
  /**
5
5
  * The text of the remove-button.
6
6
  */
7
- removeText: {
8
- type: StringConstructor;
9
- default: string;
7
+ readonly removeText: {
8
+ readonly type: StringConstructor;
9
+ readonly default: string;
10
10
  };
11
11
  /**
12
12
  * The color of the remove-button.
13
13
  */
14
- removeColor: {
15
- type: StringConstructor;
16
- default: string;
14
+ readonly removeColor: {
15
+ readonly type: StringConstructor;
16
+ readonly default: "red";
17
17
  };
18
+ /**
19
+ * If set to `true` the remove-button is disabled.
20
+ */
21
+ readonly removeDisabled: BooleanConstructor;
22
+ /**
23
+ * If set to `true` the ok-button is hidden.
24
+ */
25
+ readonly hideRemove: BooleanConstructor;
26
+ /**
27
+ * If set to `true` the ok-button is disabled.
28
+ */
29
+ readonly okDisabled: BooleanConstructor;
18
30
  /**
19
31
  * The title of the dialog which appears when clicking on the remove-button.
20
32
  */
21
- removeDialogTitle: StringConstructor;
33
+ readonly removeDialogTitle: StringConstructor;
22
34
  /**
23
35
  * The text of the dialog which appears when clicking on the remove-button.
24
36
  */
25
- removeDialogText: StringConstructor;
37
+ readonly removeDialogText: StringConstructor;
26
38
  /**
27
39
  * The variant of the dialog which appears when clicking on the remove-button. Default is `remove`.
28
40
  */
29
- removeDialogVariant: {
30
- type: PropType<DialogVariant>;
31
- default: string;
41
+ readonly removeDialogVariant: {
42
+ readonly type: PropType<DialogVariant>;
43
+ readonly default: "remove";
32
44
  };
33
45
  /**
34
46
  * The text of the dialog's ok-button. Is already set by the `removeDialogVariant` but can be overridden.
35
47
  */
36
- removeDialogOkText: StringConstructor;
48
+ readonly removeDialogOkText: StringConstructor;
37
49
  /**
38
50
  * If set to `true` the modal will close itself when `onRemove` is called.
39
51
  */
40
- closeOnRemove: {
41
- type: BooleanConstructor;
42
- default: boolean;
52
+ readonly closeOnRemove: {
53
+ readonly type: BooleanConstructor;
54
+ readonly default: true;
43
55
  };
44
56
  /**
45
57
  * This is called, when the remove-button has been clicked and the dialog has been accepted.
46
58
  */
47
- onRemove: PropType<() => void>;
48
- maxWidth: {
49
- type: PropType<import("../utils/tailwind").TWMaxWidth>;
50
- default: string;
51
- };
52
- closeOnBackground: {
53
- type: BooleanConstructor;
54
- default: boolean;
55
- };
56
- form: PropType<import("./ValidatedForm").ValidatedForm>;
57
- hideHeader: BooleanConstructor;
58
- hideFooter: BooleanConstructor;
59
- hideX: BooleanConstructor;
60
- title: StringConstructor;
61
- okText: {
62
- type: StringConstructor;
63
- default: string;
64
- };
65
- okColor: {
66
- /**
67
- * If set to `true` the modal will close itself when `onRemove` is called.
68
- */
69
- type: StringConstructor;
70
- default: string;
71
- };
72
- closeOnOk: {
73
- type: BooleanConstructor;
74
- default: boolean;
75
- };
76
- hideOk: BooleanConstructor;
77
- okDisabled: BooleanConstructor;
78
- cancelText: {
79
- type: StringConstructor;
80
- default: string;
81
- };
82
- cancelColor: {
83
- type: StringConstructor;
84
- default: string;
85
- };
86
- hideCancel: BooleanConstructor;
87
- onOk: PropType<() => void>;
88
- onCancel: PropType<() => void>;
89
- modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
90
- header: PropType<() => JSX.Element>;
91
- footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
92
- value: PropType<boolean>;
93
- onUpdateValue: PropType<(newValue: boolean) => void>;
59
+ readonly onRemove: PropType<() => void>;
60
+ readonly maxWidth: {
61
+ readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
62
+ readonly default: "max-w-lg";
63
+ };
64
+ readonly closeOnBackground: {
65
+ readonly type: BooleanConstructor;
66
+ readonly default: false;
67
+ };
68
+ readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
69
+ readonly hideHeader: BooleanConstructor;
70
+ readonly hideFooter: BooleanConstructor;
71
+ readonly hideX: BooleanConstructor;
72
+ readonly title: StringConstructor;
73
+ readonly okText: {
74
+ readonly type: StringConstructor;
75
+ readonly default: string;
76
+ };
77
+ readonly okColor: {
78
+ readonly type: StringConstructor;
79
+ readonly default: "primary";
80
+ };
81
+ readonly closeOnOk: {
82
+ readonly type: BooleanConstructor;
83
+ readonly default: true;
84
+ };
85
+ readonly hideOk: BooleanConstructor;
86
+ readonly cancelText: {
87
+ readonly type: StringConstructor;
88
+ readonly default: string;
89
+ };
90
+ readonly cancelColor: {
91
+ readonly type: StringConstructor;
92
+ readonly default: "default";
93
+ };
94
+ readonly hideCancel: BooleanConstructor;
95
+ readonly onOk: PropType<() => void>;
96
+ readonly onCancel: PropType<() => void>;
97
+ readonly modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
98
+ readonly header: PropType<() => JSX.Element>;
99
+ readonly footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
100
+ /**
101
+ * The color of the remove-button.
102
+ */
103
+ readonly value: PropType<boolean>;
104
+ readonly onUpdateValue: PropType<(newValue: boolean) => void>;
94
105
  };
95
106
  /**
96
107
  * The `NCrudModal` is a {@link NFormModal} which has some convenience features for a CRUD-scenario.
@@ -101,201 +112,225 @@ declare const _default: import("vue").DefineComponent<{
101
112
  /**
102
113
  * The text of the remove-button.
103
114
  */
104
- removeText: {
105
- type: StringConstructor;
106
- default: string;
115
+ readonly removeText: {
116
+ readonly type: StringConstructor;
117
+ readonly default: string;
107
118
  };
108
119
  /**
109
120
  * The color of the remove-button.
110
121
  */
111
- removeColor: {
112
- type: StringConstructor;
113
- default: string;
122
+ readonly removeColor: {
123
+ readonly type: StringConstructor;
124
+ readonly default: "red";
114
125
  };
126
+ /**
127
+ * If set to `true` the remove-button is disabled.
128
+ */
129
+ readonly removeDisabled: BooleanConstructor;
130
+ /**
131
+ * If set to `true` the ok-button is hidden.
132
+ */
133
+ readonly hideRemove: BooleanConstructor;
134
+ /**
135
+ * If set to `true` the ok-button is disabled.
136
+ */
137
+ readonly okDisabled: BooleanConstructor;
115
138
  /**
116
139
  * The title of the dialog which appears when clicking on the remove-button.
117
140
  */
118
- removeDialogTitle: StringConstructor;
141
+ readonly removeDialogTitle: StringConstructor;
119
142
  /**
120
143
  * The text of the dialog which appears when clicking on the remove-button.
121
144
  */
122
- removeDialogText: StringConstructor;
145
+ readonly removeDialogText: StringConstructor;
123
146
  /**
124
147
  * The variant of the dialog which appears when clicking on the remove-button. Default is `remove`.
125
148
  */
126
- removeDialogVariant: {
127
- type: PropType<DialogVariant>;
128
- default: string;
149
+ readonly removeDialogVariant: {
150
+ readonly type: PropType<DialogVariant>;
151
+ readonly default: "remove";
129
152
  };
130
153
  /**
131
154
  * The text of the dialog's ok-button. Is already set by the `removeDialogVariant` but can be overridden.
132
155
  */
133
- removeDialogOkText: StringConstructor;
156
+ readonly removeDialogOkText: StringConstructor;
134
157
  /**
135
158
  * If set to `true` the modal will close itself when `onRemove` is called.
136
159
  */
137
- closeOnRemove: {
138
- type: BooleanConstructor;
139
- default: boolean;
160
+ readonly closeOnRemove: {
161
+ readonly type: BooleanConstructor;
162
+ readonly default: true;
140
163
  };
141
164
  /**
142
165
  * This is called, when the remove-button has been clicked and the dialog has been accepted.
143
166
  */
144
- onRemove: PropType<() => void>;
145
- maxWidth: {
146
- type: PropType<import("../utils/tailwind").TWMaxWidth>;
147
- default: string;
148
- };
149
- closeOnBackground: {
150
- type: BooleanConstructor;
151
- default: boolean;
152
- };
153
- form: PropType<import("./ValidatedForm").ValidatedForm>;
154
- hideHeader: BooleanConstructor;
155
- hideFooter: BooleanConstructor;
156
- hideX: BooleanConstructor;
157
- title: StringConstructor;
158
- okText: {
159
- type: StringConstructor;
160
- default: string;
161
- };
162
- okColor: {
163
- /**
164
- * If set to `true` the modal will close itself when `onRemove` is called.
165
- */
166
- type: StringConstructor;
167
- default: string;
168
- };
169
- closeOnOk: {
170
- type: BooleanConstructor;
171
- default: boolean;
172
- };
173
- hideOk: BooleanConstructor;
174
- okDisabled: BooleanConstructor;
175
- cancelText: {
176
- type: StringConstructor;
177
- default: string;
178
- };
179
- cancelColor: {
180
- type: StringConstructor;
181
- default: string;
182
- };
183
- hideCancel: BooleanConstructor;
184
- onOk: PropType<() => void>;
185
- onCancel: PropType<() => void>;
186
- modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
187
- header: PropType<() => JSX.Element>;
188
- footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
189
- value: PropType<boolean>;
190
- onUpdateValue: PropType<(newValue: boolean) => void>;
167
+ readonly onRemove: PropType<() => void>;
168
+ readonly maxWidth: {
169
+ readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
170
+ readonly default: "max-w-lg";
171
+ };
172
+ readonly closeOnBackground: {
173
+ readonly type: BooleanConstructor;
174
+ readonly default: false;
175
+ };
176
+ readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
177
+ readonly hideHeader: BooleanConstructor;
178
+ readonly hideFooter: BooleanConstructor;
179
+ readonly hideX: BooleanConstructor;
180
+ readonly title: StringConstructor;
181
+ readonly okText: {
182
+ readonly type: StringConstructor;
183
+ readonly default: string;
184
+ };
185
+ readonly okColor: {
186
+ readonly type: StringConstructor;
187
+ readonly default: "primary";
188
+ };
189
+ readonly closeOnOk: {
190
+ readonly type: BooleanConstructor;
191
+ readonly default: true;
192
+ };
193
+ readonly hideOk: BooleanConstructor;
194
+ readonly cancelText: {
195
+ readonly type: StringConstructor;
196
+ readonly default: string;
197
+ };
198
+ readonly cancelColor: {
199
+ readonly type: StringConstructor;
200
+ readonly default: "default";
201
+ };
202
+ readonly hideCancel: BooleanConstructor;
203
+ readonly onOk: PropType<() => void>;
204
+ readonly onCancel: PropType<() => void>;
205
+ readonly modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
206
+ readonly header: PropType<() => JSX.Element>;
207
+ readonly footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
208
+ /**
209
+ * The color of the remove-button.
210
+ */
211
+ readonly value: PropType<boolean>;
212
+ readonly onUpdateValue: PropType<(newValue: boolean) => void>;
191
213
  }, 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<{
192
214
  /**
193
215
  * The text of the remove-button.
194
216
  */
195
- removeText: {
196
- type: StringConstructor;
197
- default: string;
217
+ readonly removeText: {
218
+ readonly type: StringConstructor;
219
+ readonly default: string;
198
220
  };
199
221
  /**
200
222
  * The color of the remove-button.
201
223
  */
202
- removeColor: {
203
- type: StringConstructor;
204
- default: string;
224
+ readonly removeColor: {
225
+ readonly type: StringConstructor;
226
+ readonly default: "red";
205
227
  };
228
+ /**
229
+ * If set to `true` the remove-button is disabled.
230
+ */
231
+ readonly removeDisabled: BooleanConstructor;
232
+ /**
233
+ * If set to `true` the ok-button is hidden.
234
+ */
235
+ readonly hideRemove: BooleanConstructor;
236
+ /**
237
+ * If set to `true` the ok-button is disabled.
238
+ */
239
+ readonly okDisabled: BooleanConstructor;
206
240
  /**
207
241
  * The title of the dialog which appears when clicking on the remove-button.
208
242
  */
209
- removeDialogTitle: StringConstructor;
243
+ readonly removeDialogTitle: StringConstructor;
210
244
  /**
211
245
  * The text of the dialog which appears when clicking on the remove-button.
212
246
  */
213
- removeDialogText: StringConstructor;
247
+ readonly removeDialogText: StringConstructor;
214
248
  /**
215
249
  * The variant of the dialog which appears when clicking on the remove-button. Default is `remove`.
216
250
  */
217
- removeDialogVariant: {
218
- type: PropType<DialogVariant>;
219
- default: string;
251
+ readonly removeDialogVariant: {
252
+ readonly type: PropType<DialogVariant>;
253
+ readonly default: "remove";
220
254
  };
221
255
  /**
222
256
  * The text of the dialog's ok-button. Is already set by the `removeDialogVariant` but can be overridden.
223
257
  */
224
- removeDialogOkText: StringConstructor;
258
+ readonly removeDialogOkText: StringConstructor;
225
259
  /**
226
260
  * If set to `true` the modal will close itself when `onRemove` is called.
227
261
  */
228
- closeOnRemove: {
229
- type: BooleanConstructor;
230
- default: boolean;
262
+ readonly closeOnRemove: {
263
+ readonly type: BooleanConstructor;
264
+ readonly default: true;
231
265
  };
232
266
  /**
233
267
  * This is called, when the remove-button has been clicked and the dialog has been accepted.
234
268
  */
235
- onRemove: PropType<() => void>;
236
- maxWidth: {
237
- type: PropType<import("../utils/tailwind").TWMaxWidth>;
238
- default: string;
239
- };
240
- closeOnBackground: {
241
- type: BooleanConstructor;
242
- default: boolean;
243
- };
244
- form: PropType<import("./ValidatedForm").ValidatedForm>;
245
- hideHeader: BooleanConstructor;
246
- hideFooter: BooleanConstructor;
247
- hideX: BooleanConstructor;
248
- title: StringConstructor;
249
- okText: {
250
- type: StringConstructor;
251
- default: string;
252
- };
253
- okColor: {
254
- /**
255
- * If set to `true` the modal will close itself when `onRemove` is called.
256
- */
257
- type: StringConstructor;
258
- default: string;
259
- };
260
- closeOnOk: {
261
- type: BooleanConstructor;
262
- default: boolean;
263
- };
264
- hideOk: BooleanConstructor;
265
- okDisabled: BooleanConstructor;
266
- cancelText: {
267
- type: StringConstructor;
268
- default: string;
269
- };
270
- cancelColor: {
271
- type: StringConstructor;
272
- default: string;
273
- };
274
- hideCancel: BooleanConstructor;
275
- onOk: PropType<() => void>;
276
- onCancel: PropType<() => void>;
277
- modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
278
- header: PropType<() => JSX.Element>;
279
- footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
280
- value: PropType<boolean>;
281
- onUpdateValue: PropType<(newValue: boolean) => void>;
269
+ readonly onRemove: PropType<() => void>;
270
+ readonly maxWidth: {
271
+ readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
272
+ readonly default: "max-w-lg";
273
+ };
274
+ readonly closeOnBackground: {
275
+ readonly type: BooleanConstructor;
276
+ readonly default: false;
277
+ };
278
+ readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
279
+ readonly hideHeader: BooleanConstructor;
280
+ readonly hideFooter: BooleanConstructor;
281
+ readonly hideX: BooleanConstructor;
282
+ readonly title: StringConstructor;
283
+ readonly okText: {
284
+ readonly type: StringConstructor;
285
+ readonly default: string;
286
+ };
287
+ readonly okColor: {
288
+ readonly type: StringConstructor;
289
+ readonly default: "primary";
290
+ };
291
+ readonly closeOnOk: {
292
+ readonly type: BooleanConstructor;
293
+ readonly default: true;
294
+ };
295
+ readonly hideOk: BooleanConstructor;
296
+ readonly cancelText: {
297
+ readonly type: StringConstructor;
298
+ readonly default: string;
299
+ };
300
+ readonly cancelColor: {
301
+ readonly type: StringConstructor;
302
+ readonly default: "default";
303
+ };
304
+ readonly hideCancel: BooleanConstructor;
305
+ readonly onOk: PropType<() => void>;
306
+ readonly onCancel: PropType<() => void>;
307
+ readonly modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
308
+ readonly header: PropType<() => JSX.Element>;
309
+ readonly footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
310
+ /**
311
+ * The color of the remove-button.
312
+ */
313
+ readonly value: PropType<boolean>;
314
+ readonly onUpdateValue: PropType<(newValue: boolean) => void>;
282
315
  }>> & {}, {
283
- maxWidth: import("../utils/tailwind").TWMaxWidth;
284
- hideX: boolean;
285
- hideHeader: boolean;
286
- hideFooter: boolean;
287
- okText: string;
288
- okColor: string;
289
- closeOnOk: boolean;
290
- hideOk: boolean;
291
- okDisabled: boolean;
292
- cancelText: string;
293
- cancelColor: string;
294
- closeOnBackground: boolean;
295
- hideCancel: boolean;
296
- removeText: string;
297
- removeColor: string;
298
- removeDialogVariant: DialogVariant;
299
- closeOnRemove: boolean;
316
+ readonly maxWidth: import("../utils/tailwind").TWMaxWidth;
317
+ readonly hideX: boolean;
318
+ readonly hideHeader: boolean;
319
+ readonly hideFooter: boolean;
320
+ readonly okText: string;
321
+ readonly okColor: string;
322
+ readonly closeOnOk: boolean;
323
+ readonly hideOk: boolean;
324
+ readonly okDisabled: boolean;
325
+ readonly cancelText: string;
326
+ readonly cancelColor: string;
327
+ readonly closeOnBackground: boolean;
328
+ readonly hideCancel: boolean;
329
+ readonly removeText: string;
330
+ readonly removeColor: string;
331
+ readonly removeDisabled: boolean;
332
+ readonly hideRemove: boolean;
333
+ readonly removeDialogVariant: DialogVariant;
334
+ readonly closeOnRemove: boolean;
300
335
  }>;
301
336
  export default _default;
@@ -1,11 +1,11 @@
1
1
  import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
2
  import { trsl } from '../i18n';
3
- import { createComponent, createProps } from '../utils/component';
3
+ import { createComponent } from '../utils/component';
4
4
  import { ref } from 'vue';
5
5
  import NButton from './NButton';
6
6
  import NDialog from './NDialog';
7
7
  import NFormModal, { nFormModalProps } from './NFormModal';
8
- export const nCrudModalProps = createProps({
8
+ export const nCrudModalProps = {
9
9
  ...nFormModalProps,
10
10
  /**
11
11
  * The text of the remove-button.
@@ -21,6 +21,18 @@ export const nCrudModalProps = createProps({
21
21
  type: String,
22
22
  default: 'red'
23
23
  },
24
+ /**
25
+ * If set to `true` the remove-button is disabled.
26
+ */
27
+ removeDisabled: Boolean,
28
+ /**
29
+ * If set to `true` the ok-button is hidden.
30
+ */
31
+ hideRemove: Boolean,
32
+ /**
33
+ * If set to `true` the ok-button is disabled.
34
+ */
35
+ okDisabled: Boolean,
24
36
  /**
25
37
  * The title of the dialog which appears when clicking on the remove-button.
26
38
  */
@@ -51,7 +63,7 @@ export const nCrudModalProps = createProps({
51
63
  * This is called, when the remove-button has been clicked and the dialog has been accepted.
52
64
  */
53
65
  onRemove: Function
54
- });
66
+ };
55
67
  /**
56
68
  * The `NCrudModal` is a {@link NFormModal} which has some convenience features for a CRUD-scenario.
57
69
  * It has an integrated remove-button with a user-dialog to remove the editing element.
@@ -77,7 +89,8 @@ export default createComponent('NCrudModal', nCrudModalProps, (props, {
77
89
  "class": "flex justify-between"
78
90
  }, [_createVNode("div", null, [_createVNode(NButton, {
79
91
  "color": props.removeColor,
80
- "onClick": remove
92
+ "onClick": remove,
93
+ "disabled": props.removeDisabled
81
94
  }, {
82
95
  default: () => [props.removeText]
83
96
  })]), _createVNode("div", null, [_createVNode(NButton, {
@@ -1,5 +1,5 @@
1
1
  import { type PropType } from 'vue';
2
- import type { HeroIcon } from '../utils/utils';
2
+ import type { HeroIcon } from '../utils/tailwind';
3
3
  export type DialogVariant = 'success' | 'info' | 'warning' | 'danger' | 'remove';
4
4
  export declare const nDialogProps: {
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
2
  import { deferred } from '../utils/deferred';
3
- import { createComponent, createProps, extractProps } from '../utils/component';
3
+ import { createComponent, extractProps } from '../utils/component';
4
4
  import { CheckIcon, ExclamationTriangleIcon, LightBulbIcon, TrashIcon } from '@heroicons/vue/24/outline';
5
5
  import { computed, ref } from 'vue';
6
6
  import NIconCircle from './NIconCircle';
@@ -8,7 +8,7 @@ import NModal from './NModal';
8
8
  import { DialogTitle } from '@headlessui/vue';
9
9
  import { trsl } from '../i18n';
10
10
  import { vModelForRef } from '../utils/vModel';
11
- export const nDialogProps = createProps({
11
+ export const nDialogProps = {
12
12
  /**
13
13
  * The title of the dialog.
14
14
  */
@@ -60,7 +60,7 @@ export const nDialogProps = createProps({
60
60
  * If set to `true` the cancel-button is hidden.
61
61
  */
62
62
  hideCancel: Boolean
63
- });
63
+ };
64
64
  /**
65
65
  * A `NDialog` is an element to interact directly with the user.
66
66
  * It can be controlled via a ref to prompt the user and to receive their answer.