@naptics/vue-collection 0.0.7 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/components/NAlert.d.ts +12 -0
- package/components/NAlert.js +5 -1
- package/components/NBadge.d.ts +21 -3
- package/components/NBadge.js +5 -1
- package/components/NBreadcrub.d.ts +12 -0
- package/components/NBreadcrub.js +5 -1
- package/components/NButton.d.ts +21 -3
- package/components/NButton.js +5 -1
- package/components/NCheckbox.d.ts +12 -0
- package/components/NCheckbox.js +6 -2
- package/components/NCheckboxLabel.d.ts +3 -0
- package/components/NCheckboxLabel.js +8 -2
- package/components/NDropdown.d.ts +12 -0
- package/components/NDropdown.js +6 -2
- package/components/NDropzone.d.ts +12 -0
- package/components/NDropzone.js +6 -2
- package/components/NIconButton.d.ts +30 -6
- package/components/NIconButton.js +5 -1
- package/components/NIconCircle.d.ts +12 -0
- package/components/NIconCircle.js +6 -2
- package/components/NInput.d.ts +33 -3
- package/components/NInput.js +12 -2
- package/components/NInputPhone.d.ts +15 -3
- package/components/NInputSelect.d.ts +15 -3
- package/components/NInputSuggestion.d.ts +15 -3
- package/components/NLink.d.ts +12 -0
- package/components/NLink.js +5 -1
- package/components/NList.d.ts +12 -0
- package/components/NList.js +8 -2
- package/components/NLoadingIndicator.d.ts +12 -0
- package/components/NLoadingIndicator.js +6 -2
- package/components/NPagination.d.ts +12 -0
- package/components/NPagination.js +5 -1
- package/components/NSearchbar.d.ts +15 -3
- package/components/NSearchbar.js +8 -2
- package/components/NSearchbarList.d.ts +33 -3
- package/components/NSearchbarList.js +11 -2
- package/components/NSelect.d.ts +33 -3
- package/components/NSelect.js +9 -1
- package/components/NTable.d.ts +12 -0
- package/components/NTable.js +6 -2
- package/components/NTableAction.d.ts +12 -0
- package/components/NTableAction.js +5 -1
- package/components/NTextArea.d.ts +36 -12
- package/components/NTextArea.js +9 -1
- package/components/NTooltip.d.ts +39 -5
- package/components/NTooltip.js +23 -5
- package/components/NValInput.d.ts +15 -3
- package/components/NValInput.js +9 -4
- package/package.json +1 -1
|
@@ -47,6 +47,10 @@ export const nIconButtonProps = {
|
|
|
47
47
|
* If set to `true` the icon-button is disabled and no interaction is possible.
|
|
48
48
|
*/
|
|
49
49
|
disabled: Boolean,
|
|
50
|
+
/**
|
|
51
|
+
* Adds the classes to the top-level element.
|
|
52
|
+
*/
|
|
53
|
+
addClass: String,
|
|
50
54
|
/**
|
|
51
55
|
* This is called when the icon-button is clicked.
|
|
52
56
|
* It is only called when the `route` prop is not set on the icon-button.
|
|
@@ -58,7 +62,7 @@ export const nIconButtonProps = {
|
|
|
58
62
|
* The `NIconButton` is a regular button which does not have any text but an icon instead.
|
|
59
63
|
*/
|
|
60
64
|
export default createComponent('NIconButton', nIconButtonProps, props => {
|
|
61
|
-
const classes = () => ['block p-0.5 rounded-md focus:outline-none focus-visible:ring-2 -m-1', props.disabled ? `text-${props.color}-200 cursor-default` : `hover:bg-${props.color}-${props.shade} hover:bg-opacity-10 text-${props.color}-${props.shade} focus-visible:ring-${props.color}-${props.shade} cursor-pointer
|
|
65
|
+
const classes = () => ['block p-0.5 rounded-md focus:outline-none focus-visible:ring-2 -m-1', props.disabled ? `text-${props.color}-200 cursor-default` : `hover:bg-${props.color}-${props.shade} hover:bg-opacity-10 text-${props.color}-${props.shade} focus-visible:ring-${props.color}-${props.shade} cursor-pointer`, props.addClass];
|
|
62
66
|
const content = () => _createVNode(props.icon, {
|
|
63
67
|
"class": `w-${props.size} h-${props.size}`
|
|
64
68
|
}, null);
|
|
@@ -41,6 +41,10 @@ export declare const nIconCircleProps: {
|
|
|
41
41
|
readonly type: NumberConstructor;
|
|
42
42
|
readonly default: 100;
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Adds the classes to the top-level element.
|
|
46
|
+
*/
|
|
47
|
+
readonly addClass: StringConstructor;
|
|
44
48
|
};
|
|
45
49
|
/**
|
|
46
50
|
* The `NIconCircle` is an icon with a colored circle around it.
|
|
@@ -86,6 +90,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
86
90
|
readonly type: NumberConstructor;
|
|
87
91
|
readonly default: 100;
|
|
88
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* Adds the classes to the top-level element.
|
|
95
|
+
*/
|
|
96
|
+
readonly addClass: StringConstructor;
|
|
89
97
|
}, 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<{
|
|
90
98
|
/**
|
|
91
99
|
* The icon of the icon-circle.
|
|
@@ -127,6 +135,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
127
135
|
readonly type: NumberConstructor;
|
|
128
136
|
readonly default: 100;
|
|
129
137
|
};
|
|
138
|
+
/**
|
|
139
|
+
* Adds the classes to the top-level element.
|
|
140
|
+
*/
|
|
141
|
+
readonly addClass: StringConstructor;
|
|
130
142
|
}>> & {}, {
|
|
131
143
|
readonly color: string;
|
|
132
144
|
readonly iconShade: number;
|
|
@@ -40,7 +40,11 @@ export const nIconCircleProps = {
|
|
|
40
40
|
bgShade: {
|
|
41
41
|
type: Number,
|
|
42
42
|
default: 100
|
|
43
|
-
}
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* Adds the classes to the top-level element.
|
|
46
|
+
*/
|
|
47
|
+
addClass: String
|
|
44
48
|
};
|
|
45
49
|
const DEFAULT_CIRCLE_SIZE = 16;
|
|
46
50
|
const SCALING_FACTOR = 0.55;
|
|
@@ -57,7 +61,7 @@ export default createComponent('NIconCircle', nIconCircleProps, props => {
|
|
|
57
61
|
circleSize *= 4;
|
|
58
62
|
iconSize *= 4;
|
|
59
63
|
return () => _createVNode("div", {
|
|
60
|
-
"class": ['flex items-center justify-center rounded-full', `bg-${props.color}-${props.bgShade}
|
|
64
|
+
"class": ['flex items-center justify-center rounded-full', `bg-${props.color}-${props.bgShade}`, props.addClass],
|
|
61
65
|
"style": `width: ${circleSize}px; height: ${circleSize}px`
|
|
62
66
|
}, [_createVNode("div", {
|
|
63
67
|
"class": `text-${props.color}-${props.iconShade}`,
|
package/components/NInput.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type PropType } from 'vue';
|
|
|
2
2
|
import './NInput.css';
|
|
3
3
|
export declare const nInputProps: {
|
|
4
4
|
readonly tooltipText: StringConstructor;
|
|
5
|
-
readonly tooltipContent: PropType<() =>
|
|
5
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
6
6
|
readonly tooltipHide: BooleanConstructor;
|
|
7
7
|
readonly tooltipShow: BooleanConstructor;
|
|
8
8
|
readonly tooltipPlacement: {
|
|
@@ -13,6 +13,8 @@ export declare const nInputProps: {
|
|
|
13
13
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
14
14
|
readonly default: "max-w-xs";
|
|
15
15
|
};
|
|
16
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
17
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
16
18
|
/**
|
|
17
19
|
* The name of the input. Is displayed as a label above the input.
|
|
18
20
|
*/
|
|
@@ -59,6 +61,14 @@ export declare const nInputProps: {
|
|
|
59
61
|
* If set to `true` the input's label is hidden.
|
|
60
62
|
*/
|
|
61
63
|
readonly hideLabel: BooleanConstructor;
|
|
64
|
+
/**
|
|
65
|
+
* Adds the classes directly to the input (e.g. for shadow).
|
|
66
|
+
*/
|
|
67
|
+
readonly inputClass: StringConstructor;
|
|
68
|
+
/**
|
|
69
|
+
* Adds the classes to the top-level element.
|
|
70
|
+
*/
|
|
71
|
+
readonly addClass: StringConstructor;
|
|
62
72
|
/**
|
|
63
73
|
* This is called when the input reveices focus.
|
|
64
74
|
*/
|
|
@@ -81,7 +91,7 @@ export type NInputExposed = {
|
|
|
81
91
|
*/
|
|
82
92
|
declare const _default: import("vue").DefineComponent<{
|
|
83
93
|
readonly tooltipText: StringConstructor;
|
|
84
|
-
readonly tooltipContent: PropType<() =>
|
|
94
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
85
95
|
readonly tooltipHide: BooleanConstructor;
|
|
86
96
|
readonly tooltipShow: BooleanConstructor;
|
|
87
97
|
readonly tooltipPlacement: {
|
|
@@ -92,6 +102,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
102
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
93
103
|
readonly default: "max-w-xs";
|
|
94
104
|
};
|
|
105
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
106
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
95
107
|
/**
|
|
96
108
|
* The name of the input. Is displayed as a label above the input.
|
|
97
109
|
*/
|
|
@@ -138,6 +150,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
138
150
|
* If set to `true` the input's label is hidden.
|
|
139
151
|
*/
|
|
140
152
|
readonly hideLabel: BooleanConstructor;
|
|
153
|
+
/**
|
|
154
|
+
* Adds the classes directly to the input (e.g. for shadow).
|
|
155
|
+
*/
|
|
156
|
+
readonly inputClass: StringConstructor;
|
|
157
|
+
/**
|
|
158
|
+
* Adds the classes to the top-level element.
|
|
159
|
+
*/
|
|
160
|
+
readonly addClass: StringConstructor;
|
|
141
161
|
/**
|
|
142
162
|
* This is called when the input reveices focus.
|
|
143
163
|
*/
|
|
@@ -150,7 +170,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
150
170
|
readonly onUpdateValue: PropType<(newValue: string) => void>;
|
|
151
171
|
}, 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<{
|
|
152
172
|
readonly tooltipText: StringConstructor;
|
|
153
|
-
readonly tooltipContent: PropType<() =>
|
|
173
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
154
174
|
readonly tooltipHide: BooleanConstructor;
|
|
155
175
|
readonly tooltipShow: BooleanConstructor;
|
|
156
176
|
readonly tooltipPlacement: {
|
|
@@ -161,6 +181,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
161
181
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
162
182
|
readonly default: "max-w-xs";
|
|
163
183
|
};
|
|
184
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
185
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
164
186
|
/**
|
|
165
187
|
* The name of the input. Is displayed as a label above the input.
|
|
166
188
|
*/
|
|
@@ -207,6 +229,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
207
229
|
* If set to `true` the input's label is hidden.
|
|
208
230
|
*/
|
|
209
231
|
readonly hideLabel: BooleanConstructor;
|
|
232
|
+
/**
|
|
233
|
+
* Adds the classes directly to the input (e.g. for shadow).
|
|
234
|
+
*/
|
|
235
|
+
readonly inputClass: StringConstructor;
|
|
236
|
+
/**
|
|
237
|
+
* Adds the classes to the top-level element.
|
|
238
|
+
*/
|
|
239
|
+
readonly addClass: StringConstructor;
|
|
210
240
|
/**
|
|
211
241
|
* This is called when the input reveices focus.
|
|
212
242
|
*/
|
package/components/NInput.js
CHANGED
|
@@ -53,6 +53,14 @@ export const nInputProps = {
|
|
|
53
53
|
* If set to `true` the input's label is hidden.
|
|
54
54
|
*/
|
|
55
55
|
hideLabel: Boolean,
|
|
56
|
+
/**
|
|
57
|
+
* Adds the classes directly to the input (e.g. for shadow).
|
|
58
|
+
*/
|
|
59
|
+
inputClass: String,
|
|
60
|
+
/**
|
|
61
|
+
* Adds the classes to the top-level element.
|
|
62
|
+
*/
|
|
63
|
+
addClass: String,
|
|
56
64
|
/**
|
|
57
65
|
* This is called when the input reveices focus.
|
|
58
66
|
*/
|
|
@@ -72,7 +80,9 @@ export default createComponent('NInput', nInputProps, (props, context) => {
|
|
|
72
80
|
focus: () => inputRef.value?.focus()
|
|
73
81
|
};
|
|
74
82
|
context.expose(exposed);
|
|
75
|
-
return () => _createVNode("div",
|
|
83
|
+
return () => _createVNode("div", {
|
|
84
|
+
"class": props.addClass
|
|
85
|
+
}, [props.name && !props.hideLabel && _createVNode("label", {
|
|
76
86
|
"for": props.name,
|
|
77
87
|
"class": ['block text-sm font-medium mb-1', props.disabled ? 'text-default-300' : 'text-default-700']
|
|
78
88
|
}, [props.name]), _createVNode(NTooltip, _mergeProps({
|
|
@@ -94,7 +104,7 @@ export default createComponent('NInput', nInputProps, (props, context) => {
|
|
|
94
104
|
"onFocus": () => props.onFocus?.(),
|
|
95
105
|
"onBlur": () => props.onBlur?.(),
|
|
96
106
|
"onInvalid": event => event.preventDefault(),
|
|
97
|
-
"class": ['block w-full rounded-md border focus:outline-none focus:ring-1 ', props.small ? 'text-xs py-0.5 px-2' : 'py-2 px-4', props.disabled ? 'text-default-500 placeholder-default-300 bg-default-50' : 'text-default-900 placeholder-default-400 ', props.error ? 'border-red-500 focus:border-red-500 focus:ring-red-500 pr-10' : 'border-default-300 focus:border-primary-500 focus:ring-primary-500']
|
|
107
|
+
"class": ['block w-full rounded-md border focus:outline-none focus:ring-1 ', props.small ? 'text-xs py-0.5 px-2' : 'py-2 px-4', props.disabled ? 'text-default-500 placeholder-default-300 bg-default-50' : 'text-default-900 placeholder-default-400 ', props.error ? 'border-red-500 focus:border-red-500 focus:ring-red-500 pr-10' : 'border-default-300 focus:border-primary-500 focus:ring-primary-500', props.inputClass]
|
|
98
108
|
}, null), _withDirectives(_createVNode("div", {
|
|
99
109
|
"class": "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"
|
|
100
110
|
}, [_createVNode(ExclamationCircleIcon, {
|
|
@@ -11,7 +11,7 @@ export declare const nInputPhoneProps: {
|
|
|
11
11
|
readonly hideErrorMessage: BooleanConstructor;
|
|
12
12
|
readonly disableBlurValidation: BooleanConstructor;
|
|
13
13
|
readonly tooltipText: StringConstructor;
|
|
14
|
-
readonly tooltipContent: import("vue").PropType<() =>
|
|
14
|
+
readonly tooltipContent: import("vue").PropType<() => JSX.Element>;
|
|
15
15
|
readonly tooltipHide: BooleanConstructor;
|
|
16
16
|
readonly tooltipShow: BooleanConstructor;
|
|
17
17
|
readonly tooltipPlacement: {
|
|
@@ -22,6 +22,8 @@ export declare const nInputPhoneProps: {
|
|
|
22
22
|
readonly type: import("vue").PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
23
23
|
readonly default: "max-w-xs";
|
|
24
24
|
};
|
|
25
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
26
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
25
27
|
readonly name: StringConstructor;
|
|
26
28
|
readonly placeholder: StringConstructor;
|
|
27
29
|
readonly autocomplete: {
|
|
@@ -37,6 +39,8 @@ export declare const nInputPhoneProps: {
|
|
|
37
39
|
readonly disabled: BooleanConstructor;
|
|
38
40
|
readonly small: BooleanConstructor;
|
|
39
41
|
readonly hideLabel: BooleanConstructor;
|
|
42
|
+
readonly inputClass: StringConstructor;
|
|
43
|
+
readonly addClass: StringConstructor;
|
|
40
44
|
readonly onFocus: import("vue").PropType<() => void>;
|
|
41
45
|
readonly onBlur: import("vue").PropType<() => void>;
|
|
42
46
|
readonly value: import("vue").PropType<string>;
|
|
@@ -58,7 +62,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
62
|
readonly hideErrorMessage: BooleanConstructor;
|
|
59
63
|
readonly disableBlurValidation: BooleanConstructor;
|
|
60
64
|
readonly tooltipText: StringConstructor;
|
|
61
|
-
readonly tooltipContent: import("vue").PropType<() =>
|
|
65
|
+
readonly tooltipContent: import("vue").PropType<() => JSX.Element>;
|
|
62
66
|
readonly tooltipHide: BooleanConstructor;
|
|
63
67
|
readonly tooltipShow: BooleanConstructor;
|
|
64
68
|
readonly tooltipPlacement: {
|
|
@@ -69,6 +73,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
69
73
|
readonly type: import("vue").PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
70
74
|
readonly default: "max-w-xs";
|
|
71
75
|
};
|
|
76
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
77
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
72
78
|
readonly name: StringConstructor;
|
|
73
79
|
readonly placeholder: StringConstructor;
|
|
74
80
|
readonly autocomplete: {
|
|
@@ -84,6 +90,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
90
|
readonly disabled: BooleanConstructor;
|
|
85
91
|
readonly small: BooleanConstructor;
|
|
86
92
|
readonly hideLabel: BooleanConstructor;
|
|
93
|
+
readonly inputClass: StringConstructor;
|
|
94
|
+
readonly addClass: StringConstructor;
|
|
87
95
|
readonly onFocus: import("vue").PropType<() => void>;
|
|
88
96
|
readonly onBlur: import("vue").PropType<() => void>;
|
|
89
97
|
readonly value: import("vue").PropType<string>;
|
|
@@ -101,7 +109,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
109
|
readonly hideErrorMessage: BooleanConstructor;
|
|
102
110
|
readonly disableBlurValidation: BooleanConstructor;
|
|
103
111
|
readonly tooltipText: StringConstructor;
|
|
104
|
-
readonly tooltipContent: import("vue").PropType<() =>
|
|
112
|
+
readonly tooltipContent: import("vue").PropType<() => JSX.Element>;
|
|
105
113
|
readonly tooltipHide: BooleanConstructor;
|
|
106
114
|
readonly tooltipShow: BooleanConstructor;
|
|
107
115
|
readonly tooltipPlacement: {
|
|
@@ -112,6 +120,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
112
120
|
readonly type: import("vue").PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
113
121
|
readonly default: "max-w-xs";
|
|
114
122
|
};
|
|
123
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
124
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
115
125
|
readonly name: StringConstructor;
|
|
116
126
|
readonly placeholder: StringConstructor;
|
|
117
127
|
readonly autocomplete: {
|
|
@@ -127,6 +137,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
127
137
|
readonly disabled: BooleanConstructor;
|
|
128
138
|
readonly small: BooleanConstructor;
|
|
129
139
|
readonly hideLabel: BooleanConstructor;
|
|
140
|
+
readonly inputClass: StringConstructor;
|
|
141
|
+
readonly addClass: StringConstructor;
|
|
130
142
|
readonly onFocus: import("vue").PropType<() => void>;
|
|
131
143
|
readonly onBlur: import("vue").PropType<() => void>;
|
|
132
144
|
readonly value: import("vue").PropType<string>;
|
|
@@ -53,7 +53,7 @@ export declare const nInputSelectProps: {
|
|
|
53
53
|
*/
|
|
54
54
|
readonly listItem: PropType<(props: import("./NSuggestionList").ItemSlotProps<import("./NSuggestionList").SuggestionItem>) => JSX.Element>;
|
|
55
55
|
readonly tooltipText: StringConstructor;
|
|
56
|
-
readonly tooltipContent: PropType<() =>
|
|
56
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
57
57
|
readonly tooltipHide: BooleanConstructor;
|
|
58
58
|
readonly tooltipShow: BooleanConstructor;
|
|
59
59
|
readonly tooltipPlacement: {
|
|
@@ -64,6 +64,8 @@ export declare const nInputSelectProps: {
|
|
|
64
64
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
65
65
|
readonly default: "max-w-xs";
|
|
66
66
|
};
|
|
67
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
68
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
67
69
|
readonly name: StringConstructor;
|
|
68
70
|
readonly placeholder: StringConstructor;
|
|
69
71
|
readonly autocomplete: {
|
|
@@ -79,6 +81,8 @@ export declare const nInputSelectProps: {
|
|
|
79
81
|
readonly disabled: BooleanConstructor;
|
|
80
82
|
readonly small: BooleanConstructor;
|
|
81
83
|
readonly hideLabel: BooleanConstructor;
|
|
84
|
+
readonly inputClass: StringConstructor;
|
|
85
|
+
readonly addClass: StringConstructor;
|
|
82
86
|
readonly onFocus: PropType<() => void>;
|
|
83
87
|
readonly onBlur: PropType<() => void>;
|
|
84
88
|
};
|
|
@@ -143,7 +147,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
143
147
|
*/
|
|
144
148
|
readonly listItem: PropType<(props: import("./NSuggestionList").ItemSlotProps<import("./NSuggestionList").SuggestionItem>) => JSX.Element>;
|
|
145
149
|
readonly tooltipText: StringConstructor;
|
|
146
|
-
readonly tooltipContent: PropType<() =>
|
|
150
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
147
151
|
readonly tooltipHide: BooleanConstructor;
|
|
148
152
|
readonly tooltipShow: BooleanConstructor;
|
|
149
153
|
readonly tooltipPlacement: {
|
|
@@ -154,6 +158,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
154
158
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
155
159
|
readonly default: "max-w-xs";
|
|
156
160
|
};
|
|
161
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
162
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
157
163
|
readonly name: StringConstructor;
|
|
158
164
|
readonly placeholder: StringConstructor;
|
|
159
165
|
readonly autocomplete: {
|
|
@@ -169,6 +175,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
169
175
|
readonly disabled: BooleanConstructor;
|
|
170
176
|
readonly small: BooleanConstructor;
|
|
171
177
|
readonly hideLabel: BooleanConstructor;
|
|
178
|
+
readonly inputClass: StringConstructor;
|
|
179
|
+
readonly addClass: StringConstructor;
|
|
172
180
|
readonly onFocus: PropType<() => void>;
|
|
173
181
|
readonly onBlur: PropType<() => void>;
|
|
174
182
|
}, 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<{
|
|
@@ -224,7 +232,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
224
232
|
*/
|
|
225
233
|
readonly listItem: PropType<(props: import("./NSuggestionList").ItemSlotProps<import("./NSuggestionList").SuggestionItem>) => JSX.Element>;
|
|
226
234
|
readonly tooltipText: StringConstructor;
|
|
227
|
-
readonly tooltipContent: PropType<() =>
|
|
235
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
228
236
|
readonly tooltipHide: BooleanConstructor;
|
|
229
237
|
readonly tooltipShow: BooleanConstructor;
|
|
230
238
|
readonly tooltipPlacement: {
|
|
@@ -235,6 +243,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
235
243
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
236
244
|
readonly default: "max-w-xs";
|
|
237
245
|
};
|
|
246
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
247
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
238
248
|
readonly name: StringConstructor;
|
|
239
249
|
readonly placeholder: StringConstructor;
|
|
240
250
|
readonly autocomplete: {
|
|
@@ -250,6 +260,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
250
260
|
readonly disabled: BooleanConstructor;
|
|
251
261
|
readonly small: BooleanConstructor;
|
|
252
262
|
readonly hideLabel: BooleanConstructor;
|
|
263
|
+
readonly inputClass: StringConstructor;
|
|
264
|
+
readonly addClass: StringConstructor;
|
|
253
265
|
readonly onFocus: PropType<() => void>;
|
|
254
266
|
readonly onBlur: PropType<() => void>;
|
|
255
267
|
}>> & {}, {
|
|
@@ -35,7 +35,7 @@ export declare const nInputSuggestionProps: {
|
|
|
35
35
|
readonly hideErrorMessage: BooleanConstructor;
|
|
36
36
|
readonly disableBlurValidation: BooleanConstructor;
|
|
37
37
|
readonly tooltipText: StringConstructor;
|
|
38
|
-
readonly tooltipContent: PropType<() =>
|
|
38
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
39
39
|
readonly tooltipHide: BooleanConstructor;
|
|
40
40
|
readonly tooltipShow: BooleanConstructor;
|
|
41
41
|
readonly tooltipPlacement: {
|
|
@@ -46,6 +46,8 @@ export declare const nInputSuggestionProps: {
|
|
|
46
46
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
47
47
|
readonly default: "max-w-xs";
|
|
48
48
|
};
|
|
49
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
50
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
49
51
|
readonly name: StringConstructor;
|
|
50
52
|
readonly placeholder: StringConstructor;
|
|
51
53
|
readonly autocomplete: {
|
|
@@ -61,6 +63,8 @@ export declare const nInputSuggestionProps: {
|
|
|
61
63
|
readonly disabled: BooleanConstructor;
|
|
62
64
|
readonly small: BooleanConstructor;
|
|
63
65
|
readonly hideLabel: BooleanConstructor;
|
|
66
|
+
readonly inputClass: StringConstructor;
|
|
67
|
+
readonly addClass: StringConstructor;
|
|
64
68
|
readonly onFocus: PropType<() => void>;
|
|
65
69
|
readonly onBlur: PropType<() => void>;
|
|
66
70
|
readonly value: PropType<string>;
|
|
@@ -106,7 +110,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
106
110
|
readonly hideErrorMessage: BooleanConstructor;
|
|
107
111
|
readonly disableBlurValidation: BooleanConstructor;
|
|
108
112
|
readonly tooltipText: StringConstructor;
|
|
109
|
-
readonly tooltipContent: PropType<() =>
|
|
113
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
110
114
|
readonly tooltipHide: BooleanConstructor;
|
|
111
115
|
readonly tooltipShow: BooleanConstructor;
|
|
112
116
|
readonly tooltipPlacement: {
|
|
@@ -117,6 +121,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
117
121
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
118
122
|
readonly default: "max-w-xs";
|
|
119
123
|
};
|
|
124
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
125
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
120
126
|
readonly name: StringConstructor;
|
|
121
127
|
readonly placeholder: StringConstructor;
|
|
122
128
|
readonly autocomplete: {
|
|
@@ -132,6 +138,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
138
|
readonly disabled: BooleanConstructor;
|
|
133
139
|
readonly small: BooleanConstructor;
|
|
134
140
|
readonly hideLabel: BooleanConstructor;
|
|
141
|
+
readonly inputClass: StringConstructor;
|
|
142
|
+
readonly addClass: StringConstructor;
|
|
135
143
|
readonly onFocus: PropType<() => void>;
|
|
136
144
|
readonly onBlur: PropType<() => void>;
|
|
137
145
|
readonly value: PropType<string>;
|
|
@@ -172,7 +180,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
172
180
|
readonly hideErrorMessage: BooleanConstructor;
|
|
173
181
|
readonly disableBlurValidation: BooleanConstructor;
|
|
174
182
|
readonly tooltipText: StringConstructor;
|
|
175
|
-
readonly tooltipContent: PropType<() =>
|
|
183
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
176
184
|
readonly tooltipHide: BooleanConstructor;
|
|
177
185
|
readonly tooltipShow: BooleanConstructor;
|
|
178
186
|
readonly tooltipPlacement: {
|
|
@@ -183,6 +191,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
183
191
|
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
184
192
|
readonly default: "max-w-xs";
|
|
185
193
|
};
|
|
194
|
+
readonly tooltipWrapperAddClass: StringConstructor;
|
|
195
|
+
readonly tooltipContentAddClass: StringConstructor;
|
|
186
196
|
readonly name: StringConstructor;
|
|
187
197
|
readonly placeholder: StringConstructor;
|
|
188
198
|
readonly autocomplete: {
|
|
@@ -198,6 +208,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
198
208
|
readonly disabled: BooleanConstructor;
|
|
199
209
|
readonly small: BooleanConstructor;
|
|
200
210
|
readonly hideLabel: BooleanConstructor;
|
|
211
|
+
readonly inputClass: StringConstructor;
|
|
212
|
+
readonly addClass: StringConstructor;
|
|
201
213
|
readonly onFocus: PropType<() => void>;
|
|
202
214
|
readonly onBlur: PropType<() => void>;
|
|
203
215
|
readonly value: PropType<string>;
|
package/components/NLink.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ export declare const nLinkProps: {
|
|
|
29
29
|
readonly type: NumberConstructor;
|
|
30
30
|
readonly default: 500;
|
|
31
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Adds the classes to the top-level element.
|
|
34
|
+
*/
|
|
35
|
+
readonly addClass: StringConstructor;
|
|
32
36
|
/**
|
|
33
37
|
* This is called when the link is clicked but only, if the `route` prop is not set.
|
|
34
38
|
* If the `route` prop is not set, the link will act as a regular button.
|
|
@@ -66,6 +70,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
66
70
|
readonly type: NumberConstructor;
|
|
67
71
|
readonly default: 500;
|
|
68
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* Adds the classes to the top-level element.
|
|
75
|
+
*/
|
|
76
|
+
readonly addClass: StringConstructor;
|
|
69
77
|
/**
|
|
70
78
|
* This is called when the link is clicked but only, if the `route` prop is not set.
|
|
71
79
|
* If the `route` prop is not set, the link will act as a regular button.
|
|
@@ -99,6 +107,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
99
107
|
readonly type: NumberConstructor;
|
|
100
108
|
readonly default: 500;
|
|
101
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* Adds the classes to the top-level element.
|
|
112
|
+
*/
|
|
113
|
+
readonly addClass: StringConstructor;
|
|
102
114
|
/**
|
|
103
115
|
* This is called when the link is clicked but only, if the `route` prop is not set.
|
|
104
116
|
* If the `route` prop is not set, the link will act as a regular button.
|
package/components/NLink.js
CHANGED
|
@@ -30,6 +30,10 @@ export const nLinkProps = {
|
|
|
30
30
|
type: Number,
|
|
31
31
|
default: 500
|
|
32
32
|
},
|
|
33
|
+
/**
|
|
34
|
+
* Adds the classes to the top-level element.
|
|
35
|
+
*/
|
|
36
|
+
addClass: String,
|
|
33
37
|
/**
|
|
34
38
|
* This is called when the link is clicked but only, if the `route` prop is not set.
|
|
35
39
|
* If the `route` prop is not set, the link will act as a regular button.
|
|
@@ -46,7 +50,7 @@ export default createComponent('NLink', nLinkProps, (props, {
|
|
|
46
50
|
const shade = props.shade;
|
|
47
51
|
if (shade <= 500) return shade + 100;else return shade - 200;
|
|
48
52
|
});
|
|
49
|
-
const classes = computed(() => ['font-medium focus:outline-none focus-visible:ring-2 rounded-sm ring-offset-2 hover:underline text-left', `${props.textSize} text-${props.color}-${props.shade} hover:text-${props.color}-${hoverShade.value} focus-visible:ring-${props.color}-${props.shade}
|
|
53
|
+
const classes = computed(() => ['font-medium focus:outline-none focus-visible:ring-2 rounded-sm ring-offset-2 hover:underline text-left', `${props.textSize} text-${props.color}-${props.shade} hover:text-${props.color}-${hoverShade.value} focus-visible:ring-${props.color}-${props.shade}`, props.addClass]);
|
|
50
54
|
return () => props.route ? _createVNode(RouterLink, {
|
|
51
55
|
"to": props.route,
|
|
52
56
|
"class": classes.value
|
package/components/NList.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ export declare const nListProps: {
|
|
|
17
17
|
readonly type: PropType<ListItem[]>;
|
|
18
18
|
readonly default: () => never[];
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Adds the classes to the top-level element.
|
|
22
|
+
*/
|
|
23
|
+
readonly addClass: StringConstructor;
|
|
20
24
|
};
|
|
21
25
|
/**
|
|
22
26
|
* The `NList` displays key-value data in an appealing way.
|
|
@@ -29,6 +33,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
33
|
readonly type: PropType<ListItem[]>;
|
|
30
34
|
readonly default: () => never[];
|
|
31
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Adds the classes to the top-level element.
|
|
38
|
+
*/
|
|
39
|
+
readonly addClass: StringConstructor;
|
|
32
40
|
}, 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<{
|
|
33
41
|
/**
|
|
34
42
|
* The items which are displayed in the list.
|
|
@@ -37,6 +45,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
45
|
readonly type: PropType<ListItem[]>;
|
|
38
46
|
readonly default: () => never[];
|
|
39
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* Adds the classes to the top-level element.
|
|
50
|
+
*/
|
|
51
|
+
readonly addClass: StringConstructor;
|
|
40
52
|
}>> & {}, {
|
|
41
53
|
readonly items: ListItem[];
|
|
42
54
|
}>;
|
package/components/NList.js
CHANGED
|
@@ -7,13 +7,19 @@ export const nListProps = {
|
|
|
7
7
|
items: {
|
|
8
8
|
type: Array,
|
|
9
9
|
default: () => []
|
|
10
|
-
}
|
|
10
|
+
},
|
|
11
|
+
/**
|
|
12
|
+
* Adds the classes to the top-level element.
|
|
13
|
+
*/
|
|
14
|
+
addClass: String
|
|
11
15
|
};
|
|
12
16
|
/**
|
|
13
17
|
* The `NList` displays key-value data in an appealing way.
|
|
14
18
|
*/
|
|
15
19
|
export default createComponent('NList', nListProps, props => {
|
|
16
|
-
return () => _createVNode("dl",
|
|
20
|
+
return () => _createVNode("dl", {
|
|
21
|
+
"class": props.addClass
|
|
22
|
+
}, [props.items.map((item, index) => _createVNode("div", {
|
|
17
23
|
"key": index,
|
|
18
24
|
"class": ['py-5 px-4 sm:grid sm:grid-cols-3 sm:gap-4', index % 2 === 1 ? 'bg-white' : 'bg-default-50']
|
|
19
25
|
}, [_createVNode("dt", {
|
|
@@ -21,6 +21,10 @@ export declare const nLoadingIndicator: {
|
|
|
21
21
|
readonly type: NumberConstructor;
|
|
22
22
|
readonly default: 10;
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Adds the classes to the top-level element.
|
|
26
|
+
*/
|
|
27
|
+
readonly addClass: StringConstructor;
|
|
24
28
|
};
|
|
25
29
|
/**
|
|
26
30
|
* The `NLoadingIndicator` is a styled loading indicator.
|
|
@@ -47,6 +51,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
51
|
readonly type: NumberConstructor;
|
|
48
52
|
readonly default: 10;
|
|
49
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Adds the classes to the top-level element.
|
|
56
|
+
*/
|
|
57
|
+
readonly addClass: StringConstructor;
|
|
50
58
|
}, 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
59
|
/**
|
|
52
60
|
* The color of the loading-indicator.
|
|
@@ -69,6 +77,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
69
77
|
readonly type: NumberConstructor;
|
|
70
78
|
readonly default: 10;
|
|
71
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* Adds the classes to the top-level element.
|
|
82
|
+
*/
|
|
83
|
+
readonly addClass: StringConstructor;
|
|
72
84
|
}>> & {}, {
|
|
73
85
|
readonly color: string;
|
|
74
86
|
readonly shade: number;
|
|
@@ -23,7 +23,11 @@ export const nLoadingIndicator = {
|
|
|
23
23
|
size: {
|
|
24
24
|
type: Number,
|
|
25
25
|
default: 10
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Adds the classes to the top-level element.
|
|
29
|
+
*/
|
|
30
|
+
addClass: String
|
|
27
31
|
};
|
|
28
32
|
/**
|
|
29
33
|
* The `NLoadingIndicator` is a styled loading indicator.
|
|
@@ -35,7 +39,7 @@ export default createComponent('NLoadingIndicator', nLoadingIndicator, props =>
|
|
|
35
39
|
'n-loading-indicator-gap': `${gap.value}px`
|
|
36
40
|
}));
|
|
37
41
|
return () => _createVNode("div", {
|
|
38
|
-
"class":
|
|
42
|
+
"class": `lds-ellipsis ${props.addClass}`,
|
|
39
43
|
"style": `height:${props.size}px;width:${totalWidth.value}px`
|
|
40
44
|
}, [_createVNode("div", {
|
|
41
45
|
"class": `bg-${props.color}-${props.shade}`,
|
|
@@ -23,6 +23,10 @@ export declare const nPaginationProps: {
|
|
|
23
23
|
* If set to `true`, the pagination is displayed smaller.
|
|
24
24
|
*/
|
|
25
25
|
readonly small: BooleanConstructor;
|
|
26
|
+
/**
|
|
27
|
+
* Adds the classes to the top-level element.
|
|
28
|
+
*/
|
|
29
|
+
readonly addClass: StringConstructor;
|
|
26
30
|
/**
|
|
27
31
|
* This is called, when the visible pages, which are selectable in the pagination, have changed.
|
|
28
32
|
* This is useful as only these pages can be navigated to on the next click.
|
|
@@ -56,6 +60,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
60
|
* If set to `true`, the pagination is displayed smaller.
|
|
57
61
|
*/
|
|
58
62
|
readonly small: BooleanConstructor;
|
|
63
|
+
/**
|
|
64
|
+
* Adds the classes to the top-level element.
|
|
65
|
+
*/
|
|
66
|
+
readonly addClass: StringConstructor;
|
|
59
67
|
/**
|
|
60
68
|
* This is called, when the visible pages, which are selectable in the pagination, have changed.
|
|
61
69
|
* This is useful as only these pages can be navigated to on the next click.
|
|
@@ -85,6 +93,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
85
93
|
* If set to `true`, the pagination is displayed smaller.
|
|
86
94
|
*/
|
|
87
95
|
readonly small: BooleanConstructor;
|
|
96
|
+
/**
|
|
97
|
+
* Adds the classes to the top-level element.
|
|
98
|
+
*/
|
|
99
|
+
readonly addClass: StringConstructor;
|
|
88
100
|
/**
|
|
89
101
|
* This is called, when the visible pages, which are selectable in the pagination, have changed.
|
|
90
102
|
* This is useful as only these pages can be navigated to on the next click.
|
|
@@ -26,6 +26,10 @@ export const nPaginationProps = {
|
|
|
26
26
|
* If set to `true`, the pagination is displayed smaller.
|
|
27
27
|
*/
|
|
28
28
|
small: Boolean,
|
|
29
|
+
/**
|
|
30
|
+
* Adds the classes to the top-level element.
|
|
31
|
+
*/
|
|
32
|
+
addClass: String,
|
|
29
33
|
/**
|
|
30
34
|
* This is called, when the visible pages, which are selectable in the pagination, have changed.
|
|
31
35
|
* This is useful as only these pages can be navigated to on the next click.
|
|
@@ -73,7 +77,7 @@ export default createComponent('NPagination', nPaginationProps, props => {
|
|
|
73
77
|
}));
|
|
74
78
|
const classesForItem = item => ['pagination-item', item.selectable ? 'selectable ' : '', item.selected ? 'selected' : '', props.small ? '' : 'not-small'];
|
|
75
79
|
return () => _createVNode("nav", {
|
|
76
|
-
"class":
|
|
80
|
+
"class": ['inline-flex rounded-md shadow -space-x-px', props.addClass]
|
|
77
81
|
}, [_createVNode("button", {
|
|
78
82
|
"class": ['pagination-item selectable rounded-l-md', props.small ? '' : 'not-small'],
|
|
79
83
|
"onClick": previous
|