@naptics/vue-collection 0.0.6 → 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.
- package/README.md +1 -1
- package/components/NAlert.d.ts +20 -20
- package/components/NAlert.js +3 -3
- package/components/NBadge.d.ts +87 -87
- package/components/NBadge.js +3 -3
- package/components/NBreadcrub.d.ts +57 -57
- package/components/NBreadcrub.js +3 -3
- package/components/NButton.d.ts +69 -69
- package/components/NButton.js +3 -3
- package/components/NCheckbox.d.ts +20 -20
- package/components/NCheckbox.js +3 -3
- package/components/NCheckboxLabel.d.ts +30 -30
- package/components/NCheckboxLabel.js +3 -3
- package/components/NCrudModal.d.ts +238 -203
- package/components/NCrudModal.js +17 -4
- package/components/NDialog.d.ts +1 -1
- package/components/NDialog.js +3 -3
- package/components/NDropdown.d.ts +25 -25
- package/components/NDropdown.js +3 -3
- package/components/NDropzone.d.ts +52 -52
- package/components/NDropzone.js +3 -3
- package/components/NForm.d.ts +6 -6
- package/components/NForm.js +3 -3
- package/components/NFormModal.d.ts +136 -136
- package/components/NFormModal.js +3 -3
- package/components/NIconButton.d.ts +94 -94
- package/components/NIconButton.js +3 -3
- package/components/NIconCircle.d.ts +46 -46
- package/components/NIconCircle.js +3 -3
- package/components/NInput.d.ts +94 -94
- package/components/NInput.js +3 -3
- package/components/NInputPhone.d.ts +125 -125
- package/components/NInputPhone.js +2 -2
- package/components/NInputSelect.d.ts +131 -131
- package/components/NInputSelect.js +3 -3
- package/components/NInputSuggestion.d.ts +179 -167
- package/components/NInputSuggestion.js +3 -3
- package/components/NLink.d.ts +32 -32
- package/components/NLink.js +3 -3
- package/components/NList.d.ts +10 -10
- package/components/NList.js +3 -3
- package/components/NLoadingIndicator.d.ts +30 -30
- package/components/NLoadingIndicator.js +3 -3
- package/components/NModal.d.ts +118 -118
- package/components/NModal.js +3 -3
- package/components/NPagination.d.ts +30 -30
- package/components/NPagination.js +3 -3
- package/components/NSearchbar.d.ts +29 -29
- package/components/NSearchbar.js +3 -3
- package/components/NSearchbarList.d.ts +53 -62
- package/components/NSearchbarList.js +3 -3
- package/components/NSelect.d.ts +64 -64
- package/components/NSelect.js +3 -3
- package/components/NSuggestionList.d.ts +84 -84
- package/components/NSuggestionList.js +7 -7
- package/components/NTable.d.ts +29 -29
- package/components/NTable.js +3 -3
- package/components/NTableAction.d.ts +19 -19
- package/components/NTableAction.js +3 -3
- package/components/NTextArea.d.ts +118 -118
- package/components/NTextArea.js +5 -5
- package/components/NTooltip.d.ts +42 -42
- package/components/NTooltip.js +3 -3
- package/components/NValInput.d.ts +134 -134
- package/components/NValInput.js +5 -5
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +3 -1
- package/utils/breakpoints.d.ts +3 -0
- package/utils/breakpoints.js +3 -0
- package/utils/component.d.ts +0 -8
- package/utils/component.js +0 -10
- package/utils/identifiable.d.ts +8 -8
- package/utils/identifiable.js +4 -2
- package/utils/tailwind.d.ts +2 -0
- package/utils/utils.d.ts +25 -12
- package/utils/utils.js +30 -9
|
@@ -3,23 +3,23 @@ export declare const nLoadingIndicator: {
|
|
|
3
3
|
/**
|
|
4
4
|
* The color of the loading-indicator.
|
|
5
5
|
*/
|
|
6
|
-
color: {
|
|
7
|
-
type: StringConstructor;
|
|
8
|
-
default:
|
|
6
|
+
readonly color: {
|
|
7
|
+
readonly type: StringConstructor;
|
|
8
|
+
readonly default: "primary";
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* The shade of the loading-indicator.
|
|
12
12
|
*/
|
|
13
|
-
shade: {
|
|
14
|
-
type: NumberConstructor;
|
|
15
|
-
default:
|
|
13
|
+
readonly shade: {
|
|
14
|
+
readonly type: NumberConstructor;
|
|
15
|
+
readonly default: 400;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* The height of the loading-indicator in px.
|
|
19
19
|
*/
|
|
20
|
-
size: {
|
|
21
|
-
type: NumberConstructor;
|
|
22
|
-
default:
|
|
20
|
+
readonly size: {
|
|
21
|
+
readonly type: NumberConstructor;
|
|
22
|
+
readonly default: 10;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
@@ -29,49 +29,49 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
/**
|
|
30
30
|
* The color of the loading-indicator.
|
|
31
31
|
*/
|
|
32
|
-
color: {
|
|
33
|
-
type: StringConstructor;
|
|
34
|
-
default:
|
|
32
|
+
readonly color: {
|
|
33
|
+
readonly type: StringConstructor;
|
|
34
|
+
readonly default: "primary";
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* The shade of the loading-indicator.
|
|
38
38
|
*/
|
|
39
|
-
shade: {
|
|
40
|
-
type: NumberConstructor;
|
|
41
|
-
default:
|
|
39
|
+
readonly shade: {
|
|
40
|
+
readonly type: NumberConstructor;
|
|
41
|
+
readonly default: 400;
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
44
|
* The height of the loading-indicator in px.
|
|
45
45
|
*/
|
|
46
|
-
size: {
|
|
47
|
-
type: NumberConstructor;
|
|
48
|
-
default:
|
|
46
|
+
readonly size: {
|
|
47
|
+
readonly type: NumberConstructor;
|
|
48
|
+
readonly default: 10;
|
|
49
49
|
};
|
|
50
50
|
}, import("vue").RenderFunction, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
51
|
/**
|
|
52
52
|
* The color of the loading-indicator.
|
|
53
53
|
*/
|
|
54
|
-
color: {
|
|
55
|
-
type: StringConstructor;
|
|
56
|
-
default:
|
|
54
|
+
readonly color: {
|
|
55
|
+
readonly type: StringConstructor;
|
|
56
|
+
readonly default: "primary";
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
59
|
* The shade of the loading-indicator.
|
|
60
60
|
*/
|
|
61
|
-
shade: {
|
|
62
|
-
type: NumberConstructor;
|
|
63
|
-
default:
|
|
61
|
+
readonly shade: {
|
|
62
|
+
readonly type: NumberConstructor;
|
|
63
|
+
readonly default: 400;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* The height of the loading-indicator in px.
|
|
67
67
|
*/
|
|
68
|
-
size: {
|
|
69
|
-
type: NumberConstructor;
|
|
70
|
-
default:
|
|
68
|
+
readonly size: {
|
|
69
|
+
readonly type: NumberConstructor;
|
|
70
|
+
readonly default: 10;
|
|
71
71
|
};
|
|
72
72
|
}>> & {}, {
|
|
73
|
-
color: string;
|
|
74
|
-
shade: number;
|
|
75
|
-
size: number;
|
|
73
|
+
readonly color: string;
|
|
74
|
+
readonly shade: number;
|
|
75
|
+
readonly size: number;
|
|
76
76
|
}>;
|
|
77
77
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
|
2
|
-
import { createComponent
|
|
2
|
+
import { createComponent } from '../utils/component';
|
|
3
3
|
import { computed, useCssVars } from 'vue';
|
|
4
4
|
import './NLoadingIndicator.css';
|
|
5
|
-
export const nLoadingIndicator =
|
|
5
|
+
export const nLoadingIndicator = {
|
|
6
6
|
/**
|
|
7
7
|
* The color of the loading-indicator.
|
|
8
8
|
*/
|
|
@@ -24,7 +24,7 @@ export const nLoadingIndicator = createProps({
|
|
|
24
24
|
type: Number,
|
|
25
25
|
default: 10
|
|
26
26
|
}
|
|
27
|
-
}
|
|
27
|
+
};
|
|
28
28
|
/**
|
|
29
29
|
* The `NLoadingIndicator` is a styled loading indicator.
|
|
30
30
|
*/
|
package/components/NModal.d.ts
CHANGED
|
@@ -4,104 +4,104 @@ export declare const nModalProps: {
|
|
|
4
4
|
/**
|
|
5
5
|
* If set to `true` the header of the modal is hidden.
|
|
6
6
|
*/
|
|
7
|
-
hideHeader: BooleanConstructor;
|
|
7
|
+
readonly hideHeader: BooleanConstructor;
|
|
8
8
|
/**
|
|
9
9
|
* If set to `true` the footer of the modal is hidden.
|
|
10
10
|
*/
|
|
11
|
-
hideFooter: BooleanConstructor;
|
|
11
|
+
readonly hideFooter: BooleanConstructor;
|
|
12
12
|
/**
|
|
13
13
|
* If set to `true` the X-button in the top right is hidden.
|
|
14
14
|
*/
|
|
15
|
-
hideX: BooleanConstructor;
|
|
15
|
+
readonly hideX: BooleanConstructor;
|
|
16
16
|
/**
|
|
17
17
|
* The maximum width of the modal. A regular tailwind class.
|
|
18
18
|
*/
|
|
19
|
-
maxWidth: {
|
|
20
|
-
type: PropType<TWMaxWidth>;
|
|
21
|
-
default:
|
|
19
|
+
readonly maxWidth: {
|
|
20
|
+
readonly type: PropType<TWMaxWidth>;
|
|
21
|
+
readonly default: "max-w-md";
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* The title of the modal which is displayed in the header.
|
|
25
25
|
*/
|
|
26
|
-
title: StringConstructor;
|
|
26
|
+
readonly title: StringConstructor;
|
|
27
27
|
/**
|
|
28
28
|
* The text of the ok-button.
|
|
29
29
|
*/
|
|
30
|
-
okText: {
|
|
31
|
-
type: StringConstructor;
|
|
32
|
-
default: string;
|
|
30
|
+
readonly okText: {
|
|
31
|
+
readonly type: StringConstructor;
|
|
32
|
+
readonly default: string;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* The color of the ok-button.
|
|
36
36
|
*/
|
|
37
|
-
okColor: {
|
|
38
|
-
type: StringConstructor;
|
|
39
|
-
default:
|
|
37
|
+
readonly okColor: {
|
|
38
|
+
readonly type: StringConstructor;
|
|
39
|
+
readonly default: "primary";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* If set to `true` the modal is closed when `onOk` is called.
|
|
43
43
|
*/
|
|
44
|
-
closeOnOk: {
|
|
45
|
-
type: BooleanConstructor;
|
|
46
|
-
default:
|
|
44
|
+
readonly closeOnOk: {
|
|
45
|
+
readonly type: BooleanConstructor;
|
|
46
|
+
readonly default: true;
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
49
|
* If set to `true` the ok-button is hidden.
|
|
50
50
|
*/
|
|
51
|
-
hideOk: BooleanConstructor;
|
|
51
|
+
readonly hideOk: BooleanConstructor;
|
|
52
52
|
/**
|
|
53
53
|
* If set to `true` the ok-button is disabled.
|
|
54
54
|
*/
|
|
55
|
-
okDisabled: BooleanConstructor;
|
|
55
|
+
readonly okDisabled: BooleanConstructor;
|
|
56
56
|
/**
|
|
57
57
|
* The text of the cancel-button.
|
|
58
58
|
*/
|
|
59
|
-
cancelText: {
|
|
60
|
-
type: StringConstructor;
|
|
61
|
-
default: string;
|
|
59
|
+
readonly cancelText: {
|
|
60
|
+
readonly type: StringConstructor;
|
|
61
|
+
readonly default: string;
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
64
64
|
* The color of the cancel-button.
|
|
65
65
|
*/
|
|
66
|
-
cancelColor: {
|
|
67
|
-
type: StringConstructor;
|
|
68
|
-
default:
|
|
66
|
+
readonly cancelColor: {
|
|
67
|
+
readonly type: StringConstructor;
|
|
68
|
+
readonly default: "default";
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
71
|
* If set to `true`, the modal is closed when clicking on the background.
|
|
72
72
|
* This will call `onCancel`. Default is `true`.
|
|
73
73
|
*/
|
|
74
|
-
closeOnBackground: {
|
|
75
|
-
type: BooleanConstructor;
|
|
76
|
-
default:
|
|
74
|
+
readonly closeOnBackground: {
|
|
75
|
+
readonly type: BooleanConstructor;
|
|
76
|
+
readonly default: true;
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
79
|
* If set to `true` the cancel-button is hidden.
|
|
80
80
|
*/
|
|
81
|
-
hideCancel: BooleanConstructor;
|
|
81
|
+
readonly hideCancel: BooleanConstructor;
|
|
82
82
|
/**
|
|
83
83
|
* This is called when the ok-button was clicked.
|
|
84
84
|
*/
|
|
85
|
-
onOk: PropType<() => void>;
|
|
85
|
+
readonly onOk: PropType<() => void>;
|
|
86
86
|
/**
|
|
87
87
|
* This is called when the cancel-button or X-button was clicked or
|
|
88
88
|
* if the modal was closed by clicking on the background.
|
|
89
89
|
*/
|
|
90
|
-
onCancel: PropType<() => void>;
|
|
90
|
+
readonly onCancel: PropType<() => void>;
|
|
91
91
|
/**
|
|
92
92
|
* A slot to replace the whole modal content including all buttons, header and footer.
|
|
93
93
|
*/
|
|
94
|
-
modal: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
94
|
+
readonly modal: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
95
95
|
/**
|
|
96
96
|
* A slot to replace the whole header section (excluding the x).
|
|
97
97
|
*/
|
|
98
|
-
header: PropType<() => JSX.Element>;
|
|
98
|
+
readonly header: PropType<() => JSX.Element>;
|
|
99
99
|
/**
|
|
100
100
|
* A slot to replace the whole footer section.
|
|
101
101
|
*/
|
|
102
|
-
footer: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
103
|
-
value: PropType<boolean>;
|
|
104
|
-
onUpdateValue: PropType<(newValue: boolean) => void>;
|
|
102
|
+
readonly footer: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
103
|
+
readonly value: PropType<boolean>;
|
|
104
|
+
readonly onUpdateValue: PropType<(newValue: boolean) => void>;
|
|
105
105
|
};
|
|
106
106
|
export type ModalSlotProps = {
|
|
107
107
|
ok: () => void;
|
|
@@ -115,219 +115,219 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
115
115
|
/**
|
|
116
116
|
* If set to `true` the header of the modal is hidden.
|
|
117
117
|
*/
|
|
118
|
-
hideHeader: BooleanConstructor;
|
|
118
|
+
readonly hideHeader: BooleanConstructor;
|
|
119
119
|
/**
|
|
120
120
|
* If set to `true` the footer of the modal is hidden.
|
|
121
121
|
*/
|
|
122
|
-
hideFooter: BooleanConstructor;
|
|
122
|
+
readonly hideFooter: BooleanConstructor;
|
|
123
123
|
/**
|
|
124
124
|
* If set to `true` the X-button in the top right is hidden.
|
|
125
125
|
*/
|
|
126
|
-
hideX: BooleanConstructor;
|
|
126
|
+
readonly hideX: BooleanConstructor;
|
|
127
127
|
/**
|
|
128
128
|
* The maximum width of the modal. A regular tailwind class.
|
|
129
129
|
*/
|
|
130
|
-
maxWidth: {
|
|
131
|
-
type: PropType<TWMaxWidth>;
|
|
132
|
-
default:
|
|
130
|
+
readonly maxWidth: {
|
|
131
|
+
readonly type: PropType<TWMaxWidth>;
|
|
132
|
+
readonly default: "max-w-md";
|
|
133
133
|
};
|
|
134
134
|
/**
|
|
135
135
|
* The title of the modal which is displayed in the header.
|
|
136
136
|
*/
|
|
137
|
-
title: StringConstructor;
|
|
137
|
+
readonly title: StringConstructor;
|
|
138
138
|
/**
|
|
139
139
|
* The text of the ok-button.
|
|
140
140
|
*/
|
|
141
|
-
okText: {
|
|
142
|
-
type: StringConstructor;
|
|
143
|
-
default: string;
|
|
141
|
+
readonly okText: {
|
|
142
|
+
readonly type: StringConstructor;
|
|
143
|
+
readonly default: string;
|
|
144
144
|
};
|
|
145
145
|
/**
|
|
146
146
|
* The color of the ok-button.
|
|
147
147
|
*/
|
|
148
|
-
okColor: {
|
|
149
|
-
type: StringConstructor;
|
|
150
|
-
default:
|
|
148
|
+
readonly okColor: {
|
|
149
|
+
readonly type: StringConstructor;
|
|
150
|
+
readonly default: "primary";
|
|
151
151
|
};
|
|
152
152
|
/**
|
|
153
153
|
* If set to `true` the modal is closed when `onOk` is called.
|
|
154
154
|
*/
|
|
155
|
-
closeOnOk: {
|
|
156
|
-
type: BooleanConstructor;
|
|
157
|
-
default:
|
|
155
|
+
readonly closeOnOk: {
|
|
156
|
+
readonly type: BooleanConstructor;
|
|
157
|
+
readonly default: true;
|
|
158
158
|
};
|
|
159
159
|
/**
|
|
160
160
|
* If set to `true` the ok-button is hidden.
|
|
161
161
|
*/
|
|
162
|
-
hideOk: BooleanConstructor;
|
|
162
|
+
readonly hideOk: BooleanConstructor;
|
|
163
163
|
/**
|
|
164
164
|
* If set to `true` the ok-button is disabled.
|
|
165
165
|
*/
|
|
166
|
-
okDisabled: BooleanConstructor;
|
|
166
|
+
readonly okDisabled: BooleanConstructor;
|
|
167
167
|
/**
|
|
168
168
|
* The text of the cancel-button.
|
|
169
169
|
*/
|
|
170
|
-
cancelText: {
|
|
171
|
-
type: StringConstructor;
|
|
172
|
-
default: string;
|
|
170
|
+
readonly cancelText: {
|
|
171
|
+
readonly type: StringConstructor;
|
|
172
|
+
readonly default: string;
|
|
173
173
|
};
|
|
174
174
|
/**
|
|
175
175
|
* The color of the cancel-button.
|
|
176
176
|
*/
|
|
177
|
-
cancelColor: {
|
|
178
|
-
type: StringConstructor;
|
|
179
|
-
default:
|
|
177
|
+
readonly cancelColor: {
|
|
178
|
+
readonly type: StringConstructor;
|
|
179
|
+
readonly default: "default";
|
|
180
180
|
};
|
|
181
181
|
/**
|
|
182
182
|
* If set to `true`, the modal is closed when clicking on the background.
|
|
183
183
|
* This will call `onCancel`. Default is `true`.
|
|
184
184
|
*/
|
|
185
|
-
closeOnBackground: {
|
|
186
|
-
type: BooleanConstructor;
|
|
187
|
-
default:
|
|
185
|
+
readonly closeOnBackground: {
|
|
186
|
+
readonly type: BooleanConstructor;
|
|
187
|
+
readonly default: true;
|
|
188
188
|
};
|
|
189
189
|
/**
|
|
190
190
|
* If set to `true` the cancel-button is hidden.
|
|
191
191
|
*/
|
|
192
|
-
hideCancel: BooleanConstructor;
|
|
192
|
+
readonly hideCancel: BooleanConstructor;
|
|
193
193
|
/**
|
|
194
194
|
* This is called when the ok-button was clicked.
|
|
195
195
|
*/
|
|
196
|
-
onOk: PropType<() => void>;
|
|
196
|
+
readonly onOk: PropType<() => void>;
|
|
197
197
|
/**
|
|
198
198
|
* This is called when the cancel-button or X-button was clicked or
|
|
199
199
|
* if the modal was closed by clicking on the background.
|
|
200
200
|
*/
|
|
201
|
-
onCancel: PropType<() => void>;
|
|
201
|
+
readonly onCancel: PropType<() => void>;
|
|
202
202
|
/**
|
|
203
203
|
* A slot to replace the whole modal content including all buttons, header and footer.
|
|
204
204
|
*/
|
|
205
|
-
modal: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
205
|
+
readonly modal: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
206
206
|
/**
|
|
207
207
|
* A slot to replace the whole header section (excluding the x).
|
|
208
208
|
*/
|
|
209
|
-
header: PropType<() => JSX.Element>;
|
|
209
|
+
readonly header: PropType<() => JSX.Element>;
|
|
210
210
|
/**
|
|
211
211
|
* A slot to replace the whole footer section.
|
|
212
212
|
*/
|
|
213
|
-
footer: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
214
|
-
value: PropType<boolean>;
|
|
215
|
-
onUpdateValue: PropType<(newValue: boolean) => void>;
|
|
213
|
+
readonly footer: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
214
|
+
readonly value: PropType<boolean>;
|
|
215
|
+
readonly onUpdateValue: PropType<(newValue: boolean) => void>;
|
|
216
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
217
|
/**
|
|
218
218
|
* If set to `true` the header of the modal is hidden.
|
|
219
219
|
*/
|
|
220
|
-
hideHeader: BooleanConstructor;
|
|
220
|
+
readonly hideHeader: BooleanConstructor;
|
|
221
221
|
/**
|
|
222
222
|
* If set to `true` the footer of the modal is hidden.
|
|
223
223
|
*/
|
|
224
|
-
hideFooter: BooleanConstructor;
|
|
224
|
+
readonly hideFooter: BooleanConstructor;
|
|
225
225
|
/**
|
|
226
226
|
* If set to `true` the X-button in the top right is hidden.
|
|
227
227
|
*/
|
|
228
|
-
hideX: BooleanConstructor;
|
|
228
|
+
readonly hideX: BooleanConstructor;
|
|
229
229
|
/**
|
|
230
230
|
* The maximum width of the modal. A regular tailwind class.
|
|
231
231
|
*/
|
|
232
|
-
maxWidth: {
|
|
233
|
-
type: PropType<TWMaxWidth>;
|
|
234
|
-
default:
|
|
232
|
+
readonly maxWidth: {
|
|
233
|
+
readonly type: PropType<TWMaxWidth>;
|
|
234
|
+
readonly default: "max-w-md";
|
|
235
235
|
};
|
|
236
236
|
/**
|
|
237
237
|
* The title of the modal which is displayed in the header.
|
|
238
238
|
*/
|
|
239
|
-
title: StringConstructor;
|
|
239
|
+
readonly title: StringConstructor;
|
|
240
240
|
/**
|
|
241
241
|
* The text of the ok-button.
|
|
242
242
|
*/
|
|
243
|
-
okText: {
|
|
244
|
-
type: StringConstructor;
|
|
245
|
-
default: string;
|
|
243
|
+
readonly okText: {
|
|
244
|
+
readonly type: StringConstructor;
|
|
245
|
+
readonly default: string;
|
|
246
246
|
};
|
|
247
247
|
/**
|
|
248
248
|
* The color of the ok-button.
|
|
249
249
|
*/
|
|
250
|
-
okColor: {
|
|
251
|
-
type: StringConstructor;
|
|
252
|
-
default:
|
|
250
|
+
readonly okColor: {
|
|
251
|
+
readonly type: StringConstructor;
|
|
252
|
+
readonly default: "primary";
|
|
253
253
|
};
|
|
254
254
|
/**
|
|
255
255
|
* If set to `true` the modal is closed when `onOk` is called.
|
|
256
256
|
*/
|
|
257
|
-
closeOnOk: {
|
|
258
|
-
type: BooleanConstructor;
|
|
259
|
-
default:
|
|
257
|
+
readonly closeOnOk: {
|
|
258
|
+
readonly type: BooleanConstructor;
|
|
259
|
+
readonly default: true;
|
|
260
260
|
};
|
|
261
261
|
/**
|
|
262
262
|
* If set to `true` the ok-button is hidden.
|
|
263
263
|
*/
|
|
264
|
-
hideOk: BooleanConstructor;
|
|
264
|
+
readonly hideOk: BooleanConstructor;
|
|
265
265
|
/**
|
|
266
266
|
* If set to `true` the ok-button is disabled.
|
|
267
267
|
*/
|
|
268
|
-
okDisabled: BooleanConstructor;
|
|
268
|
+
readonly okDisabled: BooleanConstructor;
|
|
269
269
|
/**
|
|
270
270
|
* The text of the cancel-button.
|
|
271
271
|
*/
|
|
272
|
-
cancelText: {
|
|
273
|
-
type: StringConstructor;
|
|
274
|
-
default: string;
|
|
272
|
+
readonly cancelText: {
|
|
273
|
+
readonly type: StringConstructor;
|
|
274
|
+
readonly default: string;
|
|
275
275
|
};
|
|
276
276
|
/**
|
|
277
277
|
* The color of the cancel-button.
|
|
278
278
|
*/
|
|
279
|
-
cancelColor: {
|
|
280
|
-
type: StringConstructor;
|
|
281
|
-
default:
|
|
279
|
+
readonly cancelColor: {
|
|
280
|
+
readonly type: StringConstructor;
|
|
281
|
+
readonly default: "default";
|
|
282
282
|
};
|
|
283
283
|
/**
|
|
284
284
|
* If set to `true`, the modal is closed when clicking on the background.
|
|
285
285
|
* This will call `onCancel`. Default is `true`.
|
|
286
286
|
*/
|
|
287
|
-
closeOnBackground: {
|
|
288
|
-
type: BooleanConstructor;
|
|
289
|
-
default:
|
|
287
|
+
readonly closeOnBackground: {
|
|
288
|
+
readonly type: BooleanConstructor;
|
|
289
|
+
readonly default: true;
|
|
290
290
|
};
|
|
291
291
|
/**
|
|
292
292
|
* If set to `true` the cancel-button is hidden.
|
|
293
293
|
*/
|
|
294
|
-
hideCancel: BooleanConstructor;
|
|
294
|
+
readonly hideCancel: BooleanConstructor;
|
|
295
295
|
/**
|
|
296
296
|
* This is called when the ok-button was clicked.
|
|
297
297
|
*/
|
|
298
|
-
onOk: PropType<() => void>;
|
|
298
|
+
readonly onOk: PropType<() => void>;
|
|
299
299
|
/**
|
|
300
300
|
* This is called when the cancel-button or X-button was clicked or
|
|
301
301
|
* if the modal was closed by clicking on the background.
|
|
302
302
|
*/
|
|
303
|
-
onCancel: PropType<() => void>;
|
|
303
|
+
readonly onCancel: PropType<() => void>;
|
|
304
304
|
/**
|
|
305
305
|
* A slot to replace the whole modal content including all buttons, header and footer.
|
|
306
306
|
*/
|
|
307
|
-
modal: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
307
|
+
readonly modal: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
308
308
|
/**
|
|
309
309
|
* A slot to replace the whole header section (excluding the x).
|
|
310
310
|
*/
|
|
311
|
-
header: PropType<() => JSX.Element>;
|
|
311
|
+
readonly header: PropType<() => JSX.Element>;
|
|
312
312
|
/**
|
|
313
313
|
* A slot to replace the whole footer section.
|
|
314
314
|
*/
|
|
315
|
-
footer: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
316
|
-
value: PropType<boolean>;
|
|
317
|
-
onUpdateValue: PropType<(newValue: boolean) => void>;
|
|
315
|
+
readonly footer: PropType<(props: ModalSlotProps) => JSX.Element>;
|
|
316
|
+
readonly value: PropType<boolean>;
|
|
317
|
+
readonly onUpdateValue: PropType<(newValue: boolean) => void>;
|
|
318
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;
|
|
319
|
+
readonly maxWidth: TWMaxWidth;
|
|
320
|
+
readonly hideX: boolean;
|
|
321
|
+
readonly hideHeader: boolean;
|
|
322
|
+
readonly hideFooter: boolean;
|
|
323
|
+
readonly okText: string;
|
|
324
|
+
readonly okColor: string;
|
|
325
|
+
readonly closeOnOk: boolean;
|
|
326
|
+
readonly hideOk: boolean;
|
|
327
|
+
readonly okDisabled: boolean;
|
|
328
|
+
readonly cancelText: string;
|
|
329
|
+
readonly cancelColor: string;
|
|
330
|
+
readonly closeOnBackground: boolean;
|
|
331
|
+
readonly hideCancel: boolean;
|
|
332
332
|
}>;
|
|
333
333
|
export default _default;
|
package/components/NModal.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue";
|
|
2
|
-
import { createComponent
|
|
2
|
+
import { createComponent } from '../utils/component';
|
|
3
3
|
import { Dialog, DialogOverlay, DialogTitle, TransitionRoot, TransitionChild } from '@headlessui/vue';
|
|
4
4
|
import NButton from './NButton';
|
|
5
5
|
import NIconButton from './NIconButton';
|
|
6
6
|
import { XMarkIcon } from '@heroicons/vue/24/solid';
|
|
7
7
|
import { trsl } from '../i18n';
|
|
8
8
|
import { vModelProps } from '../utils/vModel';
|
|
9
|
-
export const nModalProps =
|
|
9
|
+
export const nModalProps = {
|
|
10
10
|
...vModelProps(Boolean),
|
|
11
11
|
/**
|
|
12
12
|
* If set to `true` the header of the modal is hidden.
|
|
@@ -107,7 +107,7 @@ export const nModalProps = createProps({
|
|
|
107
107
|
* A slot to replace the whole footer section.
|
|
108
108
|
*/
|
|
109
109
|
footer: Function
|
|
110
|
-
}
|
|
110
|
+
};
|
|
111
111
|
/**
|
|
112
112
|
* The `NModal` is the base component for all modals and dialogs.
|
|
113
113
|
* It provides the core mechanics to display a window in front of everything else.
|