@naptics/vue-collection 0.2.15 → 0.3.0

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 (170) 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 +65 -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 +1 -70
  41. package/components/NList.d.ts +1 -43
  42. package/components/NList.js +1 -1
  43. package/components/NLoadingIndicator.d.ts +1 -49
  44. package/components/NModal.d.ts +12 -250
  45. package/components/NModal.js +15 -9
  46. package/components/NPagination.d.ts +1 -63
  47. package/components/NSearchbar.d.ts +1 -56
  48. package/components/NSearchbarList.d.ts +3 -63
  49. package/components/NSearchbarList.js +1 -1
  50. package/components/NSelect.d.ts +2 -148
  51. package/components/NSelect.js +1 -1
  52. package/components/NSuggestionList.d.ts +3 -126
  53. package/components/NSuggestionList.js +5 -2
  54. package/components/NTable.d.ts +1 -85
  55. package/components/NTable.js +12 -6
  56. package/components/NTableAction.d.ts +2 -46
  57. package/components/NTableAction.js +1 -1
  58. package/components/NTextArea.d.ts +2 -181
  59. package/components/NTextArea.js +1 -1
  60. package/components/NTooltip.d.ts +1 -105
  61. package/components/NTooltip.js +1 -1
  62. package/components/NValInput.d.ts +7 -182
  63. package/components/NValInput.js +1 -1
  64. package/env.d.ts +15 -0
  65. package/eslint.config.cjs +29 -0
  66. package/index.html +13 -0
  67. package/package.json +21 -19
  68. package/postcss.config.js +6 -0
  69. package/public/favicon.ico +0 -0
  70. package/scripts/build-lib.sh +52 -0
  71. package/scripts/sync-node-types.js +70 -0
  72. package/src/demo/App.css +9 -0
  73. package/src/demo/App.tsx +5 -0
  74. package/src/demo/components/ColorGrid.tsx +26 -0
  75. package/src/demo/components/ComponentGrid.tsx +26 -0
  76. package/src/demo/components/ComponentSection.tsx +30 -0
  77. package/src/demo/components/VariantSection.tsx +18 -0
  78. package/src/demo/i18n/de.ts +7 -0
  79. package/src/demo/i18n/en.ts +7 -0
  80. package/src/demo/i18n/index.ts +24 -0
  81. package/src/demo/main.ts +13 -0
  82. package/src/demo/router/index.ts +21 -0
  83. package/src/demo/views/HomeView.tsx +94 -0
  84. package/src/demo/views/NavigationView.tsx +43 -0
  85. package/src/demo/views/presentation/AlertView.tsx +40 -0
  86. package/src/demo/views/presentation/BadgeView.tsx +61 -0
  87. package/src/demo/views/presentation/BreadcrumbView.tsx +52 -0
  88. package/src/demo/views/presentation/ButtonView.tsx +49 -0
  89. package/src/demo/views/presentation/CheckboxView.tsx +59 -0
  90. package/src/demo/views/presentation/DropdownView.tsx +59 -0
  91. package/src/demo/views/presentation/DropzoneView.tsx +39 -0
  92. package/src/demo/views/presentation/IconButtonView.tsx +47 -0
  93. package/src/demo/views/presentation/IconCircleView.tsx +38 -0
  94. package/src/demo/views/presentation/InputView.tsx +179 -0
  95. package/src/demo/views/presentation/LinkView.tsx +50 -0
  96. package/src/demo/views/presentation/ListView.tsx +29 -0
  97. package/src/demo/views/presentation/LoadingIndicatorView.tsx +38 -0
  98. package/src/demo/views/presentation/ModalView.tsx +210 -0
  99. package/src/demo/views/presentation/PaginationView.tsx +25 -0
  100. package/src/demo/views/presentation/SearchbarView.tsx +80 -0
  101. package/src/demo/views/presentation/TableView.tsx +146 -0
  102. package/src/demo/views/presentation/TooltipView.tsx +86 -0
  103. package/src/lib/components/NAlert.tsx +85 -0
  104. package/src/lib/components/NBadge.tsx +75 -0
  105. package/src/lib/components/NBreadcrub.tsx +97 -0
  106. package/src/lib/components/NButton.tsx +80 -0
  107. package/src/lib/components/NCheckbox.tsx +55 -0
  108. package/src/lib/components/NCheckboxLabel.tsx +51 -0
  109. package/src/lib/components/NCrudModal.tsx +133 -0
  110. package/src/lib/components/NDialog.tsx +182 -0
  111. package/src/lib/components/NDropdown.tsx +167 -0
  112. package/src/lib/components/NDropzone.tsx +265 -0
  113. package/src/lib/components/NForm.tsx +32 -0
  114. package/src/lib/components/NFormModal.tsx +66 -0
  115. package/src/lib/components/NIconButton.tsx +92 -0
  116. package/src/lib/components/NIconCircle.tsx +78 -0
  117. package/src/lib/components/NInput.css +11 -0
  118. package/src/lib/components/NInput.tsx +139 -0
  119. package/src/lib/components/NInputPhone.tsx +53 -0
  120. package/src/lib/components/NInputSelect.tsx +126 -0
  121. package/src/lib/components/NInputSuggestion.tsx +80 -0
  122. package/src/lib/components/NLink.tsx +68 -0
  123. package/src/lib/components/NList.tsx +67 -0
  124. package/src/lib/components/NLoadingIndicator.css +46 -0
  125. package/src/lib/components/NLoadingIndicator.tsx +63 -0
  126. package/src/lib/components/NModal.tsx +243 -0
  127. package/src/lib/components/NPagination.css +15 -0
  128. package/src/lib/components/NPagination.tsx +131 -0
  129. package/src/lib/components/NSearchbar.tsx +78 -0
  130. package/src/lib/components/NSearchbarList.tsx +47 -0
  131. package/src/lib/components/NSelect.tsx +128 -0
  132. package/src/lib/components/NSuggestionList.tsx +216 -0
  133. package/src/lib/components/NTable.css +3 -0
  134. package/src/lib/components/NTable.tsx +247 -0
  135. package/src/lib/components/NTableAction.tsx +49 -0
  136. package/src/lib/components/NTextArea.tsx +159 -0
  137. package/src/lib/components/NTooltip.css +37 -0
  138. package/src/lib/components/NTooltip.tsx +250 -0
  139. package/src/lib/components/NValInput.tsx +163 -0
  140. package/src/lib/components/ValidatedForm.ts +71 -0
  141. package/src/lib/components/__tests__/NButton.spec.tsx +26 -0
  142. package/src/lib/components/__tests__/NCheckbox.spec.tsx +39 -0
  143. package/src/lib/i18n/de/vue-collection.json +58 -0
  144. package/src/lib/i18n/en/vue-collection.json +58 -0
  145. package/src/lib/i18n/index.ts +54 -0
  146. package/src/lib/index.ts +2 -0
  147. package/src/lib/jsx.d.ts +13 -0
  148. package/src/lib/utils/__tests__/identifiable.spec.ts +72 -0
  149. package/src/lib/utils/__tests__/validation.spec.ts +92 -0
  150. package/src/lib/utils/breakpoints.ts +47 -0
  151. package/src/lib/utils/component.tsx +131 -0
  152. package/src/lib/utils/deferred.ts +28 -0
  153. package/src/lib/utils/identifiable.ts +87 -0
  154. package/src/lib/utils/stringMaxLength.ts +25 -0
  155. package/src/lib/utils/tailwind.ts +41 -0
  156. package/src/lib/utils/utils.ts +90 -0
  157. package/src/lib/utils/vModel.ts +260 -0
  158. package/src/lib/utils/validation.ts +189 -0
  159. package/src/lib/utils/vue.ts +25 -0
  160. package/tailwind.config.js +38 -0
  161. package/tsconfig.config.json +9 -0
  162. package/tsconfig.demo.json +19 -0
  163. package/tsconfig.json +16 -0
  164. package/tsconfig.lib.json +18 -0
  165. package/tsconfig.vitest.json +8 -0
  166. package/utils/breakpoints.d.ts +1 -1
  167. package/utils/component.d.ts +3 -7
  168. package/utils/component.js +5 -2
  169. package/utils/identifiable.js +5 -1
  170. package/vite.config.ts +28 -0
@@ -26,7 +26,7 @@ export declare const nButtonProps: {
26
26
  * The html attribute, which indicates the type of the button.
27
27
  */
28
28
  readonly type: {
29
- readonly type: PropType<"button" | "submit" | "reset">;
29
+ readonly type: PropType<"submit" | "button" | "reset">;
30
30
  readonly default: "button";
31
31
  };
32
32
  /**
@@ -56,121 +56,5 @@ export declare const nButtonProps: {
56
56
  /**
57
57
  * The `NButton` is a styled button.
58
58
  */
59
- declare const Component: import("vue").DefineComponent<{
60
- readonly tooltipText: StringConstructor;
61
- readonly tooltipContent: PropType<() => JSX.Element>;
62
- readonly tooltipHide: BooleanConstructor;
63
- readonly tooltipShow: BooleanConstructor;
64
- readonly tooltipPlacement: {
65
- readonly type: PropType<import("./NTooltip").TooltipPlacement>;
66
- readonly default: "auto";
67
- };
68
- readonly tooltipMaxWidth: {
69
- readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
70
- readonly default: "max-w-xs";
71
- };
72
- readonly tooltipWrapperClass: StringConstructor;
73
- readonly tooltipContentClass: StringConstructor;
74
- readonly tooltipArrowClass: StringConstructor;
75
- /**
76
- * The color of the button.
77
- */
78
- readonly color: {
79
- readonly type: StringConstructor;
80
- readonly default: "primary";
81
- };
82
- /**
83
- * The html attribute, which indicates the type of the button.
84
- */
85
- readonly type: {
86
- readonly type: PropType<"button" | "submit" | "reset">;
87
- readonly default: "button";
88
- };
89
- /**
90
- * If set to `true` the button is disabled and no interaction is possible.
91
- */
92
- readonly disabled: BooleanConstructor;
93
- /**
94
- * If set to `true` the button will show a loading animation.
95
- * Setting `loading` to `true` will also disable the button.
96
- */
97
- readonly loading: BooleanConstructor;
98
- /**
99
- * If set to `true` the button will appear smaller.
100
- */
101
- readonly small: BooleanConstructor;
102
- /**
103
- * Adds the classes to the button.
104
- * Use this instead of `class` to style the button, because the button is wrapped inside
105
- * a div for the tooltip and `class` would be applied to the wrapping div.
106
- */
107
- readonly buttonClass: StringConstructor;
108
- /**
109
- * This is called, when the button is clicked.
110
- */
111
- readonly onClick: PropType<() => void>;
112
- }, 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<{
113
- readonly tooltipText: StringConstructor;
114
- readonly tooltipContent: PropType<() => JSX.Element>;
115
- readonly tooltipHide: BooleanConstructor;
116
- readonly tooltipShow: BooleanConstructor;
117
- readonly tooltipPlacement: {
118
- readonly type: PropType<import("./NTooltip").TooltipPlacement>;
119
- readonly default: "auto";
120
- };
121
- readonly tooltipMaxWidth: {
122
- readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
123
- readonly default: "max-w-xs";
124
- };
125
- readonly tooltipWrapperClass: StringConstructor;
126
- readonly tooltipContentClass: StringConstructor;
127
- readonly tooltipArrowClass: StringConstructor;
128
- /**
129
- * The color of the button.
130
- */
131
- readonly color: {
132
- readonly type: StringConstructor;
133
- readonly default: "primary";
134
- };
135
- /**
136
- * The html attribute, which indicates the type of the button.
137
- */
138
- readonly type: {
139
- readonly type: PropType<"button" | "submit" | "reset">;
140
- readonly default: "button";
141
- };
142
- /**
143
- * If set to `true` the button is disabled and no interaction is possible.
144
- */
145
- readonly disabled: BooleanConstructor;
146
- /**
147
- * If set to `true` the button will show a loading animation.
148
- * Setting `loading` to `true` will also disable the button.
149
- */
150
- readonly loading: BooleanConstructor;
151
- /**
152
- * If set to `true` the button will appear smaller.
153
- */
154
- readonly small: BooleanConstructor;
155
- /**
156
- * Adds the classes to the button.
157
- * Use this instead of `class` to style the button, because the button is wrapped inside
158
- * a div for the tooltip and `class` would be applied to the wrapping div.
159
- */
160
- readonly buttonClass: StringConstructor;
161
- /**
162
- * This is called, when the button is clicked.
163
- */
164
- readonly onClick: PropType<() => void>;
165
- }>> & {}, {
166
- readonly small: boolean;
167
- readonly color: string;
168
- readonly type: "button" | "submit" | "reset";
169
- readonly tooltipHide: boolean;
170
- readonly tooltipShow: boolean;
171
- readonly tooltipPlacement: import("./NTooltip").TooltipPlacement;
172
- readonly tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
173
- readonly disabled: boolean;
174
- readonly loading: boolean;
175
- }>;
59
+ declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
176
60
  export { Component as NButton, Component as default };
@@ -16,36 +16,5 @@ export declare const nCheckboxProps: {
16
16
  /**
17
17
  * The `NCheckbox` is a styled checkbox.
18
18
  */
19
- declare const Component: import("vue").DefineComponent<{
20
- /**
21
- * The color of the checkbox.
22
- */
23
- readonly color: {
24
- readonly type: StringConstructor;
25
- readonly default: "primary";
26
- };
27
- /**
28
- * If set to `true` the checkbox is disabled and no interaction is possible.
29
- */
30
- readonly disabled: BooleanConstructor;
31
- readonly value: import("vue").PropType<boolean>;
32
- readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
33
- }, 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<{
34
- /**
35
- * The color of the checkbox.
36
- */
37
- readonly color: {
38
- readonly type: StringConstructor;
39
- readonly default: "primary";
40
- };
41
- /**
42
- * If set to `true` the checkbox is disabled and no interaction is possible.
43
- */
44
- readonly disabled: BooleanConstructor;
45
- readonly value: import("vue").PropType<boolean>;
46
- readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
47
- }>> & {}, {
48
- readonly color: string;
49
- readonly disabled: boolean;
50
- }>;
19
+ declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
51
20
  export { Component as NCheckbox, Component as default };
@@ -22,49 +22,5 @@ export declare const nCheckboxLabelProps: {
22
22
  /**
23
23
  * The `NCheckboxLabel` is a checkbox with a title and a description.
24
24
  */
25
- declare const Component: import("vue").DefineComponent<{
26
- /**
27
- * The title of the checkbox.
28
- */
29
- readonly title: StringConstructor;
30
- /**
31
- * The description of the checkbox.
32
- */
33
- readonly description: StringConstructor;
34
- /**
35
- * If set to `true`, a smaller margin is applied between the label and the checkbox.
36
- */
37
- readonly compact: BooleanConstructor;
38
- readonly color: {
39
- readonly type: StringConstructor;
40
- readonly default: "primary";
41
- };
42
- readonly disabled: BooleanConstructor;
43
- readonly value: import("vue").PropType<boolean>;
44
- readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
45
- }, 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<{
46
- /**
47
- * The title of the checkbox.
48
- */
49
- readonly title: StringConstructor;
50
- /**
51
- * The description of the checkbox.
52
- */
53
- readonly description: StringConstructor;
54
- /**
55
- * If set to `true`, a smaller margin is applied between the label and the checkbox.
56
- */
57
- readonly compact: BooleanConstructor;
58
- readonly color: {
59
- readonly type: StringConstructor;
60
- readonly default: "primary";
61
- };
62
- readonly disabled: BooleanConstructor;
63
- readonly value: import("vue").PropType<boolean>;
64
- readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
65
- }>> & {}, {
66
- readonly color: string;
67
- readonly disabled: boolean;
68
- readonly compact: boolean;
69
- }>;
25
+ declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
70
26
  export { Component as NCheckboxLabel, Component as default };
@@ -1,4 +1,4 @@
1
- import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
1
+ import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
2
  import { createComponent } from '../utils/component';
3
3
  import NCheckbox, { nCheckboxProps } from './NCheckbox';
4
4
  export const nCheckboxLabelProps = {
@@ -69,19 +69,6 @@ export declare const nCrudModalProps: {
69
69
  readonly hideHeader: BooleanConstructor;
70
70
  readonly hideFooter: BooleanConstructor;
71
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
72
  readonly verticalPosition: {
86
73
  readonly type: PropType<"start" | "center" | "end">;
87
74
  readonly default: "center";
@@ -89,102 +76,7 @@ export declare const nCrudModalProps: {
89
76
  readonly horizontalPosition: {
90
77
  readonly type: PropType<"start" | "center" | "end">;
91
78
  readonly default: "center";
92
- }; /**
93
- * This is called, when the remove-button has been clicked and the dialog has been accepted.
94
- */
95
- readonly hideOk: BooleanConstructor;
96
- readonly cancelText: {
97
- readonly type: StringConstructor;
98
- readonly default: string;
99
- };
100
- readonly cancelColor: {
101
- readonly type: StringConstructor;
102
- readonly default: "default";
103
- };
104
- readonly hideCancel: BooleanConstructor;
105
- readonly onOk: PropType<() => void>;
106
- readonly onCancel: PropType<() => void>;
107
- readonly modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
108
- readonly content: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
109
- readonly header: PropType<() => JSX.Element>;
110
- readonly footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
111
- readonly value: PropType<boolean>;
112
- readonly onUpdateValue: PropType<(newValue: boolean) => void>;
113
- };
114
- /**
115
- * The `NCrudModal` is a {@link NFormModal} which has some convenience features for a CRUD-scenario.
116
- * It has an integrated remove-button with a user-dialog to remove the editing element.
117
- * When the dialog is accepted `onRemove` is called.
118
- */
119
- declare const Component: import("vue").DefineComponent<{
120
- /**
121
- * The text of the remove-button.
122
- */
123
- readonly removeText: {
124
- readonly type: StringConstructor;
125
- readonly default: string;
126
- };
127
- /**
128
- * The color of the remove-button.
129
- */
130
- readonly removeColor: {
131
- readonly type: StringConstructor;
132
- readonly default: "red";
133
79
  };
134
- /**
135
- * If set to `true` the remove-button is disabled.
136
- */
137
- readonly removeDisabled: BooleanConstructor;
138
- /**
139
- * If set to `true` the ok-button is hidden.
140
- */
141
- readonly hideRemove: BooleanConstructor;
142
- /**
143
- * If set to `true` the ok-button is disabled.
144
- */
145
- readonly okDisabled: BooleanConstructor;
146
- /**
147
- * The title of the dialog which appears when clicking on the remove-button.
148
- */
149
- readonly removeDialogTitle: StringConstructor;
150
- /**
151
- * The text of the dialog which appears when clicking on the remove-button.
152
- */
153
- readonly removeDialogText: StringConstructor;
154
- /**
155
- * The variant of the dialog which appears when clicking on the remove-button. Default is `remove`.
156
- */
157
- readonly removeDialogVariant: {
158
- readonly type: PropType<DialogVariant>;
159
- readonly default: "remove";
160
- };
161
- /**
162
- * The text of the dialog's ok-button. Is already set by the `removeDialogVariant` but can be overridden.
163
- */
164
- readonly removeDialogOkText: StringConstructor;
165
- /**
166
- * If set to `true` the modal will close itself when `onRemove` is called.
167
- */
168
- readonly closeOnRemove: {
169
- readonly type: BooleanConstructor;
170
- readonly default: true;
171
- };
172
- /**
173
- * This is called, when the remove-button has been clicked and the dialog has been accepted.
174
- */
175
- readonly onRemove: PropType<() => void>;
176
- readonly maxWidth: {
177
- readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
178
- readonly default: "max-w-lg";
179
- };
180
- readonly closeOnBackground: {
181
- readonly type: BooleanConstructor;
182
- readonly default: false;
183
- };
184
- readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
185
- readonly hideHeader: BooleanConstructor;
186
- readonly hideFooter: BooleanConstructor;
187
- readonly hideX: BooleanConstructor;
188
80
  readonly title: StringConstructor;
189
81
  readonly okText: {
190
82
  readonly type: StringConstructor;
@@ -198,16 +90,6 @@ declare const Component: import("vue").DefineComponent<{
198
90
  readonly type: BooleanConstructor;
199
91
  readonly default: true;
200
92
  };
201
- readonly verticalPosition: {
202
- readonly type: PropType<"start" | "center" | "end">;
203
- readonly default: "center";
204
- };
205
- readonly horizontalPosition: {
206
- readonly type: PropType<"start" | "center" | "end">;
207
- readonly default: "center";
208
- }; /**
209
- * This is called, when the remove-button has been clicked and the dialog has been accepted.
210
- */
211
93
  readonly hideOk: BooleanConstructor;
212
94
  readonly cancelText: {
213
95
  readonly type: StringConstructor;
@@ -226,137 +108,11 @@ declare const Component: import("vue").DefineComponent<{
226
108
  readonly footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
227
109
  readonly value: PropType<boolean>;
228
110
  readonly onUpdateValue: PropType<(newValue: boolean) => void>;
229
- }, 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<{
230
- /**
231
- * The text of the remove-button.
232
- */
233
- readonly removeText: {
234
- readonly type: StringConstructor;
235
- readonly default: string;
236
- };
237
- /**
238
- * The color of the remove-button.
239
- */
240
- readonly removeColor: {
241
- readonly type: StringConstructor;
242
- readonly default: "red";
243
- };
244
- /**
245
- * If set to `true` the remove-button is disabled.
246
- */
247
- readonly removeDisabled: BooleanConstructor;
248
- /**
249
- * If set to `true` the ok-button is hidden.
250
- */
251
- readonly hideRemove: BooleanConstructor;
252
- /**
253
- * If set to `true` the ok-button is disabled.
254
- */
255
- readonly okDisabled: BooleanConstructor;
256
- /**
257
- * The title of the dialog which appears when clicking on the remove-button.
258
- */
259
- readonly removeDialogTitle: StringConstructor;
260
- /**
261
- * The text of the dialog which appears when clicking on the remove-button.
262
- */
263
- readonly removeDialogText: StringConstructor;
264
- /**
265
- * The variant of the dialog which appears when clicking on the remove-button. Default is `remove`.
266
- */
267
- readonly removeDialogVariant: {
268
- readonly type: PropType<DialogVariant>;
269
- readonly default: "remove";
270
- };
271
- /**
272
- * The text of the dialog's ok-button. Is already set by the `removeDialogVariant` but can be overridden.
273
- */
274
- readonly removeDialogOkText: StringConstructor;
275
- /**
276
- * If set to `true` the modal will close itself when `onRemove` is called.
277
- */
278
- readonly closeOnRemove: {
279
- readonly type: BooleanConstructor;
280
- readonly default: true;
281
- };
282
- /**
283
- * This is called, when the remove-button has been clicked and the dialog has been accepted.
284
- */
285
- readonly onRemove: PropType<() => void>;
286
- readonly maxWidth: {
287
- readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
288
- readonly default: "max-w-lg";
289
- };
290
- readonly closeOnBackground: {
291
- readonly type: BooleanConstructor;
292
- readonly default: false;
293
- };
294
- readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
295
- readonly hideHeader: BooleanConstructor;
296
- readonly hideFooter: BooleanConstructor;
297
- readonly hideX: BooleanConstructor;
298
- readonly title: StringConstructor;
299
- readonly okText: {
300
- readonly type: StringConstructor;
301
- readonly default: string;
302
- };
303
- readonly okColor: {
304
- readonly type: StringConstructor;
305
- readonly default: "primary";
306
- };
307
- readonly closeOnOk: {
308
- readonly type: BooleanConstructor;
309
- readonly default: true;
310
- };
311
- readonly verticalPosition: {
312
- readonly type: PropType<"start" | "center" | "end">;
313
- readonly default: "center";
314
- };
315
- readonly horizontalPosition: {
316
- readonly type: PropType<"start" | "center" | "end">;
317
- readonly default: "center";
318
- }; /**
319
- * This is called, when the remove-button has been clicked and the dialog has been accepted.
320
- */
321
- readonly hideOk: BooleanConstructor;
322
- readonly cancelText: {
323
- readonly type: StringConstructor;
324
- readonly default: string;
325
- };
326
- readonly cancelColor: {
327
- readonly type: StringConstructor;
328
- readonly default: "default";
329
- };
330
- readonly hideCancel: BooleanConstructor;
331
- readonly onOk: PropType<() => void>;
332
- readonly onCancel: PropType<() => void>;
333
- readonly modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
334
- readonly content: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
335
- readonly header: PropType<() => JSX.Element>;
336
- readonly footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
337
- readonly value: PropType<boolean>;
338
- readonly onUpdateValue: PropType<(newValue: boolean) => void>;
339
- }>> & {}, {
340
- readonly maxWidth: import("../utils/tailwind").TWMaxWidth;
341
- readonly hideX: boolean;
342
- readonly hideHeader: boolean;
343
- readonly hideFooter: boolean;
344
- readonly okText: string;
345
- readonly okColor: string;
346
- readonly closeOnOk: boolean;
347
- readonly verticalPosition: "start" | "center" | "end";
348
- readonly horizontalPosition: "start" | "center" | "end";
349
- readonly hideOk: boolean;
350
- readonly okDisabled: boolean;
351
- readonly cancelText: string;
352
- readonly cancelColor: string;
353
- readonly closeOnBackground: boolean;
354
- readonly hideCancel: boolean;
355
- readonly removeText: string;
356
- readonly removeColor: string;
357
- readonly removeDisabled: boolean;
358
- readonly hideRemove: boolean;
359
- readonly removeDialogVariant: DialogVariant;
360
- readonly closeOnRemove: boolean;
361
- }>;
111
+ };
112
+ /**
113
+ * The `NCrudModal` is a {@link NFormModal} which has some convenience features for a CRUD-scenario.
114
+ * It has an integrated remove-button with a user-dialog to remove the editing element.
115
+ * When the dialog is accepted `onRemove` is called.
116
+ */
117
+ declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
362
118
  export { Component as NCrudModal, 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 { trsl } from '../i18n';
3
3
  import { createComponentWithSlots } from '../utils/component';
4
4
  import { ref } from 'vue';
@@ -77,114 +77,5 @@ export type NDialogExposed = {
77
77
  * ...
78
78
  * <NDialog ref={dialogRef} />
79
79
  */
80
- declare const Component: import("vue").DefineComponent<{
81
- /**
82
- * The title of the dialog.
83
- */
84
- title: StringConstructor;
85
- /**
86
- * The text of the dialog.
87
- */
88
- text: StringConstructor;
89
- /**
90
- * The variant of the dialog.
91
- * This determines the default icon and its color
92
- * as well as the default text and color of the ok-button.
93
- */
94
- variant: {
95
- type: PropType<DialogVariant>;
96
- default: string;
97
- };
98
- /**
99
- * The icon of the alert. This overrides the `icon` of the `variant`.
100
- */
101
- icon: PropType<HeroIcon>;
102
- /**
103
- * The color of the alert's icon. This overrides the `iconColor` of the `variant`.
104
- */
105
- iconColor: StringConstructor;
106
- /**
107
- * The text of the ok-button. This overrides the `okText` of the `variant`.
108
- */
109
- okText: StringConstructor;
110
- /**
111
- * The color of the ok-button. This overrides the `okColor` of the `variant`.
112
- */
113
- okColor: StringConstructor;
114
- /**
115
- * The text of the cancel-button.
116
- */
117
- cancelText: {
118
- type: StringConstructor;
119
- default: string;
120
- };
121
- /**
122
- * The color of the cancel-button.
123
- */
124
- cancelColor: {
125
- type: StringConstructor;
126
- default: string;
127
- };
128
- /**
129
- * If set to `true` the cancel-button is hidden.
130
- */
131
- hideCancel: BooleanConstructor;
132
- }, 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<{
133
- /**
134
- * The title of the dialog.
135
- */
136
- title: StringConstructor;
137
- /**
138
- * The text of the dialog.
139
- */
140
- text: StringConstructor;
141
- /**
142
- * The variant of the dialog.
143
- * This determines the default icon and its color
144
- * as well as the default text and color of the ok-button.
145
- */
146
- variant: {
147
- type: PropType<DialogVariant>;
148
- default: string;
149
- };
150
- /**
151
- * The icon of the alert. This overrides the `icon` of the `variant`.
152
- */
153
- icon: PropType<HeroIcon>;
154
- /**
155
- * The color of the alert's icon. This overrides the `iconColor` of the `variant`.
156
- */
157
- iconColor: StringConstructor;
158
- /**
159
- * The text of the ok-button. This overrides the `okText` of the `variant`.
160
- */
161
- okText: StringConstructor;
162
- /**
163
- * The color of the ok-button. This overrides the `okColor` of the `variant`.
164
- */
165
- okColor: StringConstructor;
166
- /**
167
- * The text of the cancel-button.
168
- */
169
- cancelText: {
170
- type: StringConstructor;
171
- default: string;
172
- };
173
- /**
174
- * The color of the cancel-button.
175
- */
176
- cancelColor: {
177
- type: StringConstructor;
178
- default: string;
179
- };
180
- /**
181
- * If set to `true` the cancel-button is hidden.
182
- */
183
- hideCancel: BooleanConstructor;
184
- }>> & {}, {
185
- variant: DialogVariant;
186
- cancelText: string;
187
- cancelColor: string;
188
- hideCancel: boolean;
189
- }>;
80
+ declare const Component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
190
81
  export { Component as NDialog, 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 { deferred } from '../utils/deferred';
3
3
  import { createComponent, extractProps } from '../utils/component';
4
4
  import { CheckIcon, ExclamationTriangleIcon, LightBulbIcon, TrashIcon } from '@heroicons/vue/24/outline';