@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.
- 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 -66
- package/index.js +2 -67
- 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
package/components/NTable.d.ts
CHANGED
|
@@ -45,9 +45,9 @@ export declare const nTableProps: {
|
|
|
45
45
|
/**
|
|
46
46
|
* The headings of the table. These define which columns are shown in the table and in which order.
|
|
47
47
|
*/
|
|
48
|
-
headings: {
|
|
49
|
-
type: PropType<TableHeading[]>;
|
|
50
|
-
required: true;
|
|
48
|
+
readonly headings: {
|
|
49
|
+
readonly type: PropType<TableHeading[]>;
|
|
50
|
+
readonly required: true;
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
53
|
* Details can be added additionally to headings.
|
|
@@ -57,9 +57,9 @@ export declare const nTableProps: {
|
|
|
57
57
|
* in the same way as if the details were normal headings.
|
|
58
58
|
* Note that details can be added dynamically by adding the `breakpoint` property to the headings.
|
|
59
59
|
*/
|
|
60
|
-
details: {
|
|
61
|
-
type: PropType<TableDetail[]>;
|
|
62
|
-
default: () => never[];
|
|
60
|
+
readonly details: {
|
|
61
|
+
readonly type: PropType<TableDetail[]>;
|
|
62
|
+
readonly default: () => never[];
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
65
65
|
* The items of the table. They consist of an array of table rows.
|
|
@@ -82,9 +82,9 @@ export declare const nTableProps: {
|
|
|
82
82
|
* { id: 2, name: 'Franzi', status: () => <NBadge ... />, action: ... } // Row 2
|
|
83
83
|
* ]
|
|
84
84
|
*/
|
|
85
|
-
items: {
|
|
86
|
-
type: PropType<TableRow[]>;
|
|
87
|
-
default: () => never[];
|
|
85
|
+
readonly items: {
|
|
86
|
+
readonly type: PropType<TableRow[]>;
|
|
87
|
+
readonly default: () => never[];
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
90
|
/**
|
|
@@ -94,9 +94,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
94
94
|
/**
|
|
95
95
|
* The headings of the table. These define which columns are shown in the table and in which order.
|
|
96
96
|
*/
|
|
97
|
-
headings: {
|
|
98
|
-
type: PropType<TableHeading[]>;
|
|
99
|
-
required: true;
|
|
97
|
+
readonly headings: {
|
|
98
|
+
readonly type: PropType<TableHeading[]>;
|
|
99
|
+
readonly required: true;
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
102
102
|
* Details can be added additionally to headings.
|
|
@@ -106,9 +106,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
106
106
|
* in the same way as if the details were normal headings.
|
|
107
107
|
* Note that details can be added dynamically by adding the `breakpoint` property to the headings.
|
|
108
108
|
*/
|
|
109
|
-
details: {
|
|
110
|
-
type: PropType<TableDetail[]>;
|
|
111
|
-
default: () => never[];
|
|
109
|
+
readonly details: {
|
|
110
|
+
readonly type: PropType<TableDetail[]>;
|
|
111
|
+
readonly default: () => never[];
|
|
112
112
|
};
|
|
113
113
|
/**
|
|
114
114
|
* The items of the table. They consist of an array of table rows.
|
|
@@ -131,17 +131,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
131
131
|
* { id: 2, name: 'Franzi', status: () => <NBadge ... />, action: ... } // Row 2
|
|
132
132
|
* ]
|
|
133
133
|
*/
|
|
134
|
-
items: {
|
|
135
|
-
type: PropType<TableRow[]>;
|
|
136
|
-
default: () => never[];
|
|
134
|
+
readonly items: {
|
|
135
|
+
readonly type: PropType<TableRow[]>;
|
|
136
|
+
readonly default: () => never[];
|
|
137
137
|
};
|
|
138
138
|
}, 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<{
|
|
139
139
|
/**
|
|
140
140
|
* The headings of the table. These define which columns are shown in the table and in which order.
|
|
141
141
|
*/
|
|
142
|
-
headings: {
|
|
143
|
-
type: PropType<TableHeading[]>;
|
|
144
|
-
required: true;
|
|
142
|
+
readonly headings: {
|
|
143
|
+
readonly type: PropType<TableHeading[]>;
|
|
144
|
+
readonly required: true;
|
|
145
145
|
};
|
|
146
146
|
/**
|
|
147
147
|
* Details can be added additionally to headings.
|
|
@@ -151,9 +151,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
151
151
|
* in the same way as if the details were normal headings.
|
|
152
152
|
* Note that details can be added dynamically by adding the `breakpoint` property to the headings.
|
|
153
153
|
*/
|
|
154
|
-
details: {
|
|
155
|
-
type: PropType<TableDetail[]>;
|
|
156
|
-
default: () => never[];
|
|
154
|
+
readonly details: {
|
|
155
|
+
readonly type: PropType<TableDetail[]>;
|
|
156
|
+
readonly default: () => never[];
|
|
157
157
|
};
|
|
158
158
|
/**
|
|
159
159
|
* The items of the table. They consist of an array of table rows.
|
|
@@ -176,12 +176,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
176
176
|
* { id: 2, name: 'Franzi', status: () => <NBadge ... />, action: ... } // Row 2
|
|
177
177
|
* ]
|
|
178
178
|
*/
|
|
179
|
-
items: {
|
|
180
|
-
type: PropType<TableRow[]>;
|
|
181
|
-
default: () => never[];
|
|
179
|
+
readonly items: {
|
|
180
|
+
readonly type: PropType<TableRow[]>;
|
|
181
|
+
readonly default: () => never[];
|
|
182
182
|
};
|
|
183
183
|
}>> & {}, {
|
|
184
|
-
details: TableDetail[];
|
|
185
|
-
items: TableRow[];
|
|
184
|
+
readonly details: TableDetail[];
|
|
185
|
+
readonly items: TableRow[];
|
|
186
186
|
}>;
|
|
187
187
|
export default _default;
|
package/components/NTable.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Fragment as _Fragment, createVNode as _createVNode } from "vue";
|
|
2
2
|
import { isWidthBreakpoint } from '../utils/breakpoints';
|
|
3
|
-
import { createComponent
|
|
3
|
+
import { createComponent } from '../utils/component';
|
|
4
4
|
import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/vue/24/solid';
|
|
5
5
|
import { computed, Fragment, ref, watch } from 'vue';
|
|
6
6
|
import NIconButton from './NIconButton';
|
|
7
7
|
import './NTable.css';
|
|
8
8
|
const N_TABLE_ACTION_KEY = 'action';
|
|
9
|
-
export const nTableProps =
|
|
9
|
+
export const nTableProps = {
|
|
10
10
|
/**
|
|
11
11
|
* The headings of the table. These define which columns are shown in the table and in which order.
|
|
12
12
|
*/
|
|
@@ -51,7 +51,7 @@ export const nTableProps = createProps({
|
|
|
51
51
|
type: Array,
|
|
52
52
|
default: () => []
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
55
|
/**
|
|
56
56
|
* The `NTable` is a styled html table which accepts data and displays it appropriately.
|
|
57
57
|
*/
|
|
@@ -4,23 +4,23 @@ export declare const nTableActionProps: {
|
|
|
4
4
|
/**
|
|
5
5
|
* The route of the action. If set the component will be a {@link RouterLink}.
|
|
6
6
|
*/
|
|
7
|
-
route: PropType<RouteLocationRaw>;
|
|
7
|
+
readonly route: PropType<RouteLocationRaw>;
|
|
8
8
|
/**
|
|
9
9
|
* The text of the action.
|
|
10
10
|
*/
|
|
11
|
-
text: StringConstructor;
|
|
11
|
+
readonly text: StringConstructor;
|
|
12
12
|
/**
|
|
13
13
|
* The html attribute, which indicates the type of the button.
|
|
14
14
|
*/
|
|
15
|
-
type: {
|
|
16
|
-
type: PropType<"button" | "submit" | "reset">;
|
|
17
|
-
default:
|
|
15
|
+
readonly type: {
|
|
16
|
+
readonly type: PropType<"button" | "submit" | "reset">;
|
|
17
|
+
readonly default: "button";
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* This is called when the action is clicked.
|
|
21
21
|
* It is only called when the `route` prop is not set on the action.
|
|
22
22
|
*/
|
|
23
|
-
onClick: PropType<() => void>;
|
|
23
|
+
readonly onClick: PropType<() => void>;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* The `NTableAction` is a button or {@link RouterLink} which is styled to fit into a table.
|
|
@@ -30,45 +30,45 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
/**
|
|
31
31
|
* The route of the action. If set the component will be a {@link RouterLink}.
|
|
32
32
|
*/
|
|
33
|
-
route: PropType<RouteLocationRaw>;
|
|
33
|
+
readonly route: PropType<RouteLocationRaw>;
|
|
34
34
|
/**
|
|
35
35
|
* The text of the action.
|
|
36
36
|
*/
|
|
37
|
-
text: StringConstructor;
|
|
37
|
+
readonly text: StringConstructor;
|
|
38
38
|
/**
|
|
39
39
|
* The html attribute, which indicates the type of the button.
|
|
40
40
|
*/
|
|
41
|
-
type: {
|
|
42
|
-
type: PropType<"button" | "submit" | "reset">;
|
|
43
|
-
default:
|
|
41
|
+
readonly type: {
|
|
42
|
+
readonly type: PropType<"button" | "submit" | "reset">;
|
|
43
|
+
readonly default: "button";
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
46
|
* This is called when the action is clicked.
|
|
47
47
|
* It is only called when the `route` prop is not set on the action.
|
|
48
48
|
*/
|
|
49
|
-
onClick: PropType<() => void>;
|
|
49
|
+
readonly onClick: PropType<() => void>;
|
|
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 route of the action. If set the component will be a {@link RouterLink}.
|
|
53
53
|
*/
|
|
54
|
-
route: PropType<RouteLocationRaw>;
|
|
54
|
+
readonly route: PropType<RouteLocationRaw>;
|
|
55
55
|
/**
|
|
56
56
|
* The text of the action.
|
|
57
57
|
*/
|
|
58
|
-
text: StringConstructor;
|
|
58
|
+
readonly text: StringConstructor;
|
|
59
59
|
/**
|
|
60
60
|
* The html attribute, which indicates the type of the button.
|
|
61
61
|
*/
|
|
62
|
-
type: {
|
|
63
|
-
type: PropType<"button" | "submit" | "reset">;
|
|
64
|
-
default:
|
|
62
|
+
readonly type: {
|
|
63
|
+
readonly type: PropType<"button" | "submit" | "reset">;
|
|
64
|
+
readonly default: "button";
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
67
|
* This is called when the action is clicked.
|
|
68
68
|
* It is only called when the `route` prop is not set on the action.
|
|
69
69
|
*/
|
|
70
|
-
onClick: PropType<() => void>;
|
|
70
|
+
readonly onClick: PropType<() => void>;
|
|
71
71
|
}>> & {}, {
|
|
72
|
-
type: "button" | "submit" | "reset";
|
|
72
|
+
readonly type: "button" | "submit" | "reset";
|
|
73
73
|
}>;
|
|
74
74
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isVNode as _isVNode, createVNode as _createVNode, Fragment as _Fragment } from "vue";
|
|
2
|
-
import { createComponent
|
|
2
|
+
import { createComponent } from '../utils/component';
|
|
3
3
|
import { RouterLink } from 'vue-router';
|
|
4
4
|
import { nButtonProps } from './NButton';
|
|
5
5
|
function _isSlot(s) {
|
|
6
6
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
7
7
|
}
|
|
8
|
-
export const nTableActionProps =
|
|
8
|
+
export const nTableActionProps = {
|
|
9
9
|
/**
|
|
10
10
|
* The route of the action. If set the component will be a {@link RouterLink}.
|
|
11
11
|
*/
|
|
@@ -23,7 +23,7 @@ export const nTableActionProps = createProps({
|
|
|
23
23
|
* It is only called when the `route` prop is not set on the action.
|
|
24
24
|
*/
|
|
25
25
|
onClick: Function
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
27
|
/**
|
|
28
28
|
* The `NTableAction` is a button or {@link RouterLink} which is styled to fit into a table.
|
|
29
29
|
* It is basically styled as an emphasized text in the table.
|
|
@@ -1,80 +1,80 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
2
|
export declare const nTextAreaProps: {
|
|
3
|
-
optional: BooleanConstructor;
|
|
4
|
-
rules: {
|
|
5
|
-
type: PropType<import("../utils/validation").ValidationRule | import("../utils/validation").ValidationRule[]>;
|
|
6
|
-
default: () => never[];
|
|
3
|
+
readonly optional: BooleanConstructor;
|
|
4
|
+
readonly rules: {
|
|
5
|
+
readonly type: PropType<import("../utils/validation").ValidationRule | import("../utils/validation").ValidationRule[]>;
|
|
6
|
+
readonly default: () => never[];
|
|
7
7
|
};
|
|
8
|
-
form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
9
|
-
error: BooleanConstructor;
|
|
10
|
-
errorMessage: StringConstructor;
|
|
11
|
-
hideErrorMessage: BooleanConstructor;
|
|
12
|
-
disableBlurValidation: BooleanConstructor;
|
|
13
|
-
tooltipText: StringConstructor;
|
|
14
|
-
tooltipContent: PropType<() => void>;
|
|
15
|
-
tooltipHide: BooleanConstructor;
|
|
16
|
-
tooltipShow: BooleanConstructor;
|
|
17
|
-
tooltipPlacement: {
|
|
18
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
19
|
-
default:
|
|
8
|
+
readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
9
|
+
readonly error: BooleanConstructor;
|
|
10
|
+
readonly errorMessage: StringConstructor;
|
|
11
|
+
readonly hideErrorMessage: BooleanConstructor;
|
|
12
|
+
readonly disableBlurValidation: BooleanConstructor;
|
|
13
|
+
readonly tooltipText: StringConstructor;
|
|
14
|
+
readonly tooltipContent: PropType<() => void>;
|
|
15
|
+
readonly tooltipHide: BooleanConstructor;
|
|
16
|
+
readonly tooltipShow: BooleanConstructor;
|
|
17
|
+
readonly tooltipPlacement: {
|
|
18
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
19
|
+
readonly default: "auto";
|
|
20
20
|
};
|
|
21
|
-
tooltipMaxWidth: {
|
|
22
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>; /**
|
|
21
|
+
readonly tooltipMaxWidth: {
|
|
22
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>; /**
|
|
23
23
|
* If set to `true` the text area is displayed with a red border.
|
|
24
24
|
*/
|
|
25
|
-
default:
|
|
25
|
+
readonly default: "max-w-xs";
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* The name of the text area. Is displayed as a label above the text area.
|
|
29
29
|
*/
|
|
30
|
-
name: StringConstructor;
|
|
30
|
+
readonly name: StringConstructor;
|
|
31
31
|
/**
|
|
32
32
|
* The placeholder of the text area.
|
|
33
33
|
*/
|
|
34
|
-
placeholder: StringConstructor;
|
|
34
|
+
readonly placeholder: StringConstructor;
|
|
35
35
|
/**
|
|
36
36
|
* The html autocomplete attribute of the text area.
|
|
37
37
|
*/
|
|
38
|
-
autocomplete: {
|
|
39
|
-
type: StringConstructor;
|
|
40
|
-
default:
|
|
38
|
+
readonly autocomplete: {
|
|
39
|
+
readonly type: StringConstructor;
|
|
40
|
+
readonly default: "off";
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
43
|
* If set to `true`, the text area is resizable in y-direction.
|
|
44
44
|
*/
|
|
45
|
-
resizable: {
|
|
46
|
-
type: BooleanConstructor;
|
|
47
|
-
default:
|
|
45
|
+
readonly resizable: {
|
|
46
|
+
readonly type: BooleanConstructor;
|
|
47
|
+
readonly default: true;
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* The initial height of the text area in terms of
|
|
51
51
|
* how many text rows fit inside the text area.
|
|
52
52
|
* The height can be change if {@link nTextAreaProps.resizable} is `true`
|
|
53
53
|
*/
|
|
54
|
-
rows: NumberConstructor;
|
|
54
|
+
readonly rows: NumberConstructor;
|
|
55
55
|
/**
|
|
56
56
|
* The maximum length of the input string. Entering longer strings are simply
|
|
57
57
|
* prevented, but no error message is shown to the user.
|
|
58
58
|
*/
|
|
59
|
-
maxLength: NumberConstructor;
|
|
59
|
+
readonly maxLength: NumberConstructor;
|
|
60
60
|
/**
|
|
61
61
|
* If set to `true` the text area is disabled and no interaction is possible.
|
|
62
62
|
*/
|
|
63
|
-
disabled: BooleanConstructor;
|
|
63
|
+
readonly disabled: BooleanConstructor;
|
|
64
64
|
/**
|
|
65
65
|
* If set to `true` the text area's label is hidden.
|
|
66
66
|
*/
|
|
67
|
-
hideLabel: BooleanConstructor;
|
|
67
|
+
readonly hideLabel: BooleanConstructor;
|
|
68
68
|
/**
|
|
69
69
|
* This is called when the text area reveices focus.
|
|
70
70
|
*/
|
|
71
|
-
onFocus: PropType<() => void>;
|
|
71
|
+
readonly onFocus: PropType<() => void>;
|
|
72
72
|
/**
|
|
73
73
|
* This is called when the text area looses focus.
|
|
74
74
|
*/
|
|
75
|
-
onBlur: PropType<() => void>;
|
|
76
|
-
value: PropType<string>;
|
|
77
|
-
onUpdateValue: PropType<(newValue: string) => void>;
|
|
75
|
+
readonly onBlur: PropType<() => void>;
|
|
76
|
+
readonly value: PropType<string>;
|
|
77
|
+
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
78
78
|
};
|
|
79
79
|
export type NTextAreaExposed = {
|
|
80
80
|
/**
|
|
@@ -83,170 +83,170 @@ export type NTextAreaExposed = {
|
|
|
83
83
|
focus(): void;
|
|
84
84
|
};
|
|
85
85
|
declare const _default: import("vue").DefineComponent<{
|
|
86
|
-
optional: BooleanConstructor;
|
|
87
|
-
rules: {
|
|
88
|
-
type: PropType<import("../utils/validation").ValidationRule | import("../utils/validation").ValidationRule[]>;
|
|
89
|
-
default: () => never[];
|
|
86
|
+
readonly optional: BooleanConstructor;
|
|
87
|
+
readonly rules: {
|
|
88
|
+
readonly type: PropType<import("../utils/validation").ValidationRule | import("../utils/validation").ValidationRule[]>;
|
|
89
|
+
readonly default: () => never[];
|
|
90
90
|
};
|
|
91
|
-
form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
92
|
-
error: BooleanConstructor;
|
|
93
|
-
errorMessage: StringConstructor;
|
|
94
|
-
hideErrorMessage: BooleanConstructor;
|
|
95
|
-
disableBlurValidation: BooleanConstructor;
|
|
96
|
-
tooltipText: StringConstructor;
|
|
97
|
-
tooltipContent: PropType<() => void>;
|
|
98
|
-
tooltipHide: BooleanConstructor;
|
|
99
|
-
tooltipShow: BooleanConstructor;
|
|
100
|
-
tooltipPlacement: {
|
|
101
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
102
|
-
default:
|
|
91
|
+
readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
92
|
+
readonly error: BooleanConstructor;
|
|
93
|
+
readonly errorMessage: StringConstructor;
|
|
94
|
+
readonly hideErrorMessage: BooleanConstructor;
|
|
95
|
+
readonly disableBlurValidation: BooleanConstructor;
|
|
96
|
+
readonly tooltipText: StringConstructor;
|
|
97
|
+
readonly tooltipContent: PropType<() => void>;
|
|
98
|
+
readonly tooltipHide: BooleanConstructor;
|
|
99
|
+
readonly tooltipShow: BooleanConstructor;
|
|
100
|
+
readonly tooltipPlacement: {
|
|
101
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
102
|
+
readonly default: "auto";
|
|
103
103
|
};
|
|
104
|
-
tooltipMaxWidth: {
|
|
105
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>; /**
|
|
104
|
+
readonly tooltipMaxWidth: {
|
|
105
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>; /**
|
|
106
106
|
* If set to `true` the text area is displayed with a red border.
|
|
107
107
|
*/
|
|
108
|
-
default:
|
|
108
|
+
readonly default: "max-w-xs";
|
|
109
109
|
};
|
|
110
110
|
/**
|
|
111
111
|
* The name of the text area. Is displayed as a label above the text area.
|
|
112
112
|
*/
|
|
113
|
-
name: StringConstructor;
|
|
113
|
+
readonly name: StringConstructor;
|
|
114
114
|
/**
|
|
115
115
|
* The placeholder of the text area.
|
|
116
116
|
*/
|
|
117
|
-
placeholder: StringConstructor;
|
|
117
|
+
readonly placeholder: StringConstructor;
|
|
118
118
|
/**
|
|
119
119
|
* The html autocomplete attribute of the text area.
|
|
120
120
|
*/
|
|
121
|
-
autocomplete: {
|
|
122
|
-
type: StringConstructor;
|
|
123
|
-
default:
|
|
121
|
+
readonly autocomplete: {
|
|
122
|
+
readonly type: StringConstructor;
|
|
123
|
+
readonly default: "off";
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
126
126
|
* If set to `true`, the text area is resizable in y-direction.
|
|
127
127
|
*/
|
|
128
|
-
resizable: {
|
|
129
|
-
type: BooleanConstructor;
|
|
130
|
-
default:
|
|
128
|
+
readonly resizable: {
|
|
129
|
+
readonly type: BooleanConstructor;
|
|
130
|
+
readonly default: true;
|
|
131
131
|
};
|
|
132
132
|
/**
|
|
133
133
|
* The initial height of the text area in terms of
|
|
134
134
|
* how many text rows fit inside the text area.
|
|
135
135
|
* The height can be change if {@link nTextAreaProps.resizable} is `true`
|
|
136
136
|
*/
|
|
137
|
-
rows: NumberConstructor;
|
|
137
|
+
readonly rows: NumberConstructor;
|
|
138
138
|
/**
|
|
139
139
|
* The maximum length of the input string. Entering longer strings are simply
|
|
140
140
|
* prevented, but no error message is shown to the user.
|
|
141
141
|
*/
|
|
142
|
-
maxLength: NumberConstructor;
|
|
142
|
+
readonly maxLength: NumberConstructor;
|
|
143
143
|
/**
|
|
144
144
|
* If set to `true` the text area is disabled and no interaction is possible.
|
|
145
145
|
*/
|
|
146
|
-
disabled: BooleanConstructor;
|
|
146
|
+
readonly disabled: BooleanConstructor;
|
|
147
147
|
/**
|
|
148
148
|
* If set to `true` the text area's label is hidden.
|
|
149
149
|
*/
|
|
150
|
-
hideLabel: BooleanConstructor;
|
|
150
|
+
readonly hideLabel: BooleanConstructor;
|
|
151
151
|
/**
|
|
152
152
|
* This is called when the text area reveices focus.
|
|
153
153
|
*/
|
|
154
|
-
onFocus: PropType<() => void>;
|
|
154
|
+
readonly onFocus: PropType<() => void>;
|
|
155
155
|
/**
|
|
156
156
|
* This is called when the text area looses focus.
|
|
157
157
|
*/
|
|
158
|
-
onBlur: PropType<() => void>;
|
|
159
|
-
value: PropType<string>;
|
|
160
|
-
onUpdateValue: PropType<(newValue: string) => void>;
|
|
158
|
+
readonly onBlur: PropType<() => void>;
|
|
159
|
+
readonly value: PropType<string>;
|
|
160
|
+
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
161
161
|
}, 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<{
|
|
162
|
-
optional: BooleanConstructor;
|
|
163
|
-
rules: {
|
|
164
|
-
type: PropType<import("../utils/validation").ValidationRule | import("../utils/validation").ValidationRule[]>;
|
|
165
|
-
default: () => never[];
|
|
162
|
+
readonly optional: BooleanConstructor;
|
|
163
|
+
readonly rules: {
|
|
164
|
+
readonly type: PropType<import("../utils/validation").ValidationRule | import("../utils/validation").ValidationRule[]>;
|
|
165
|
+
readonly default: () => never[];
|
|
166
166
|
};
|
|
167
|
-
form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
168
|
-
error: BooleanConstructor;
|
|
169
|
-
errorMessage: StringConstructor;
|
|
170
|
-
hideErrorMessage: BooleanConstructor;
|
|
171
|
-
disableBlurValidation: BooleanConstructor;
|
|
172
|
-
tooltipText: StringConstructor;
|
|
173
|
-
tooltipContent: PropType<() => void>;
|
|
174
|
-
tooltipHide: BooleanConstructor;
|
|
175
|
-
tooltipShow: BooleanConstructor;
|
|
176
|
-
tooltipPlacement: {
|
|
177
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
178
|
-
default:
|
|
167
|
+
readonly form: PropType<import("./ValidatedForm").ValidatedForm>;
|
|
168
|
+
readonly error: BooleanConstructor;
|
|
169
|
+
readonly errorMessage: StringConstructor;
|
|
170
|
+
readonly hideErrorMessage: BooleanConstructor;
|
|
171
|
+
readonly disableBlurValidation: BooleanConstructor;
|
|
172
|
+
readonly tooltipText: StringConstructor;
|
|
173
|
+
readonly tooltipContent: PropType<() => void>;
|
|
174
|
+
readonly tooltipHide: BooleanConstructor;
|
|
175
|
+
readonly tooltipShow: BooleanConstructor;
|
|
176
|
+
readonly tooltipPlacement: {
|
|
177
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
178
|
+
readonly default: "auto";
|
|
179
179
|
};
|
|
180
|
-
tooltipMaxWidth: {
|
|
181
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>; /**
|
|
180
|
+
readonly tooltipMaxWidth: {
|
|
181
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>; /**
|
|
182
182
|
* If set to `true` the text area is displayed with a red border.
|
|
183
183
|
*/
|
|
184
|
-
default:
|
|
184
|
+
readonly default: "max-w-xs";
|
|
185
185
|
};
|
|
186
186
|
/**
|
|
187
187
|
* The name of the text area. Is displayed as a label above the text area.
|
|
188
188
|
*/
|
|
189
|
-
name: StringConstructor;
|
|
189
|
+
readonly name: StringConstructor;
|
|
190
190
|
/**
|
|
191
191
|
* The placeholder of the text area.
|
|
192
192
|
*/
|
|
193
|
-
placeholder: StringConstructor;
|
|
193
|
+
readonly placeholder: StringConstructor;
|
|
194
194
|
/**
|
|
195
195
|
* The html autocomplete attribute of the text area.
|
|
196
196
|
*/
|
|
197
|
-
autocomplete: {
|
|
198
|
-
type: StringConstructor;
|
|
199
|
-
default:
|
|
197
|
+
readonly autocomplete: {
|
|
198
|
+
readonly type: StringConstructor;
|
|
199
|
+
readonly default: "off";
|
|
200
200
|
};
|
|
201
201
|
/**
|
|
202
202
|
* If set to `true`, the text area is resizable in y-direction.
|
|
203
203
|
*/
|
|
204
|
-
resizable: {
|
|
205
|
-
type: BooleanConstructor;
|
|
206
|
-
default:
|
|
204
|
+
readonly resizable: {
|
|
205
|
+
readonly type: BooleanConstructor;
|
|
206
|
+
readonly default: true;
|
|
207
207
|
};
|
|
208
208
|
/**
|
|
209
209
|
* The initial height of the text area in terms of
|
|
210
210
|
* how many text rows fit inside the text area.
|
|
211
211
|
* The height can be change if {@link nTextAreaProps.resizable} is `true`
|
|
212
212
|
*/
|
|
213
|
-
rows: NumberConstructor;
|
|
213
|
+
readonly rows: NumberConstructor;
|
|
214
214
|
/**
|
|
215
215
|
* The maximum length of the input string. Entering longer strings are simply
|
|
216
216
|
* prevented, but no error message is shown to the user.
|
|
217
217
|
*/
|
|
218
|
-
maxLength: NumberConstructor;
|
|
218
|
+
readonly maxLength: NumberConstructor;
|
|
219
219
|
/**
|
|
220
220
|
* If set to `true` the text area is disabled and no interaction is possible.
|
|
221
221
|
*/
|
|
222
|
-
disabled: BooleanConstructor;
|
|
222
|
+
readonly disabled: BooleanConstructor;
|
|
223
223
|
/**
|
|
224
224
|
* If set to `true` the text area's label is hidden.
|
|
225
225
|
*/
|
|
226
|
-
hideLabel: BooleanConstructor;
|
|
226
|
+
readonly hideLabel: BooleanConstructor;
|
|
227
227
|
/**
|
|
228
228
|
* This is called when the text area reveices focus.
|
|
229
229
|
*/
|
|
230
|
-
onFocus: PropType<() => void>;
|
|
230
|
+
readonly onFocus: PropType<() => void>;
|
|
231
231
|
/**
|
|
232
232
|
* This is called when the text area looses focus.
|
|
233
233
|
*/
|
|
234
|
-
onBlur: PropType<() => void>;
|
|
235
|
-
value: PropType<string>;
|
|
236
|
-
onUpdateValue: PropType<(newValue: string) => void>;
|
|
234
|
+
readonly onBlur: PropType<() => void>;
|
|
235
|
+
readonly value: PropType<string>;
|
|
236
|
+
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
237
237
|
}>> & {}, {
|
|
238
|
-
tooltipHide: boolean;
|
|
239
|
-
tooltipShow: boolean;
|
|
240
|
-
tooltipPlacement: import("./NTooltip").TooltipPlacement;
|
|
241
|
-
tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
242
|
-
disabled: boolean;
|
|
243
|
-
error: boolean;
|
|
244
|
-
autocomplete: string;
|
|
245
|
-
hideLabel: boolean;
|
|
246
|
-
optional: boolean;
|
|
247
|
-
rules: import("../utils/validation").ValidationRule | import("../utils/validation").ValidationRule[];
|
|
248
|
-
hideErrorMessage: boolean;
|
|
249
|
-
disableBlurValidation: boolean;
|
|
250
|
-
resizable: boolean;
|
|
238
|
+
readonly tooltipHide: boolean;
|
|
239
|
+
readonly tooltipShow: boolean;
|
|
240
|
+
readonly tooltipPlacement: import("./NTooltip").TooltipPlacement;
|
|
241
|
+
readonly tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
242
|
+
readonly disabled: boolean;
|
|
243
|
+
readonly error: boolean;
|
|
244
|
+
readonly autocomplete: string;
|
|
245
|
+
readonly hideLabel: boolean;
|
|
246
|
+
readonly optional: boolean;
|
|
247
|
+
readonly rules: import("../utils/validation").ValidationRule | import("../utils/validation").ValidationRule[];
|
|
248
|
+
readonly hideErrorMessage: boolean;
|
|
249
|
+
readonly disableBlurValidation: boolean;
|
|
250
|
+
readonly resizable: boolean;
|
|
251
251
|
}>;
|
|
252
252
|
export default _default;
|
package/components/NTextArea.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
2
|
-
import { createComponent
|
|
2
|
+
import { createComponent } from '../utils/component';
|
|
3
3
|
import { ref } from 'vue';
|
|
4
4
|
import { ExclamationCircleIcon } from '@heroicons/vue/24/solid';
|
|
5
5
|
import NTooltip, { mapTooltipProps, nToolTipPropsForImplementor } from './NTooltip';
|
|
6
6
|
import { vModelProps } from '../utils/vModel';
|
|
7
7
|
import NValInput, { validationProps } from './NValInput';
|
|
8
|
-
const nTextAreaBaseProps =
|
|
8
|
+
const nTextAreaBaseProps = {
|
|
9
9
|
...vModelProps(String),
|
|
10
10
|
/**
|
|
11
11
|
* The name of the text area. Is displayed as a label above the text area.
|
|
@@ -61,11 +61,11 @@ const nTextAreaBaseProps = createProps({
|
|
|
61
61
|
*/
|
|
62
62
|
onBlur: Function,
|
|
63
63
|
...nToolTipPropsForImplementor
|
|
64
|
-
}
|
|
65
|
-
export const nTextAreaProps =
|
|
64
|
+
};
|
|
65
|
+
export const nTextAreaProps = {
|
|
66
66
|
...nTextAreaBaseProps,
|
|
67
67
|
...validationProps
|
|
68
|
-
}
|
|
68
|
+
};
|
|
69
69
|
export default createComponent('NTextArea', nTextAreaProps, (props, context) => {
|
|
70
70
|
const textAreaRef = ref();
|
|
71
71
|
const exposed = {
|