@naptics/vue-collection 0.2.3 → 0.2.4
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/components/NAlert.d.ts +2 -2
- package/components/NAlert.js +3 -2
- package/components/NBadge.d.ts +2 -2
- package/components/NBadge.js +3 -2
- package/components/NBreadcrub.d.ts +2 -2
- package/components/NBreadcrub.js +3 -2
- package/components/NButton.d.ts +2 -2
- package/components/NButton.js +3 -2
- package/components/NCheckbox.d.ts +2 -2
- package/components/NCheckbox.js +3 -2
- package/components/NCheckboxLabel.d.ts +2 -2
- package/components/NCheckboxLabel.js +3 -2
- package/components/NCrudModal.d.ts +2 -2
- package/components/NCrudModal.js +3 -2
- package/components/NDialog.d.ts +2 -2
- package/components/NDialog.js +3 -2
- package/components/NDropdown.d.ts +4 -72
- package/components/NDropdown.js +3 -2
- package/components/NDropzone.d.ts +2 -2
- package/components/NDropzone.js +2 -1
- package/components/NForm.d.ts +2 -2
- package/components/NForm.js +3 -2
- package/components/NFormModal.d.ts +2 -2
- package/components/NFormModal.js +3 -2
- package/components/NIconButton.d.ts +2 -2
- package/components/NIconButton.js +3 -2
- package/components/NIconCircle.d.ts +2 -2
- package/components/NIconCircle.js +3 -2
- package/components/NInput.d.ts +2 -2
- package/components/NInput.js +3 -2
- package/components/NInputPhone.d.ts +2 -2
- package/components/NInputPhone.js +2 -1
- package/components/NInputSelect.d.ts +2 -2
- package/components/NInputSelect.js +3 -2
- package/components/NInputSuggestion.d.ts +2 -2
- package/components/NInputSuggestion.js +3 -2
- package/components/NLink.d.ts +2 -2
- package/components/NLink.js +3 -2
- package/components/NList.d.ts +2 -2
- package/components/NList.js +2 -1
- package/components/NLoadingIndicator.d.ts +2 -2
- package/components/NLoadingIndicator.js +3 -2
- package/components/NModal.d.ts +2 -2
- package/components/NModal.js +3 -2
- package/components/NPagination.d.ts +2 -2
- package/components/NPagination.js +2 -1
- package/components/NSearchbar.d.ts +2 -2
- package/components/NSearchbar.js +3 -2
- package/components/NSearchbarList.d.ts +2 -2
- package/components/NSearchbarList.js +3 -2
- package/components/NSelect.d.ts +2 -2
- package/components/NSelect.js +3 -2
- package/components/NSuggestionList.d.ts +4 -4
- package/components/NSuggestionList.js +3 -2
- package/components/NTable.d.ts +2 -2
- package/components/NTable.js +2 -1
- package/components/NTableAction.d.ts +2 -2
- package/components/NTableAction.js +3 -2
- package/components/NTextArea.d.ts +2 -2
- package/components/NTextArea.js +2 -1
- package/components/NTooltip.d.ts +2 -2
- package/components/NTooltip.js +2 -1
- package/components/NValInput.d.ts +2 -2
- package/components/NValInput.js +3 -2
- package/package.json +1 -1
package/components/NAlert.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare const nAlertProps: {
|
|
|
25
25
|
* The `NAlert` is a fully styled alert with multiple variants.
|
|
26
26
|
* It can be used as a normal blocking element or as part of an alert queue.
|
|
27
27
|
*/
|
|
28
|
-
declare const
|
|
28
|
+
declare const Component: import("vue").DefineComponent<{
|
|
29
29
|
/**
|
|
30
30
|
* The variant of the alert. This defines its color and icon.
|
|
31
31
|
*/
|
|
@@ -69,4 +69,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
69
69
|
readonly variant: AlertVariant;
|
|
70
70
|
readonly hideX: boolean;
|
|
71
71
|
}>;
|
|
72
|
-
export default
|
|
72
|
+
export { Component as NAlert, Component as default };
|
package/components/NAlert.js
CHANGED
|
@@ -29,7 +29,7 @@ export const nAlertProps = {
|
|
|
29
29
|
* The `NAlert` is a fully styled alert with multiple variants.
|
|
30
30
|
* It can be used as a normal blocking element or as part of an alert queue.
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
const Component = createComponent('NAlert', nAlertProps, (props, {
|
|
33
33
|
slots
|
|
34
34
|
}) => {
|
|
35
35
|
const variant = computed(() => VARIANTS[props.variant]);
|
|
@@ -80,4 +80,5 @@ const VARIANTS = {
|
|
|
80
80
|
}, null),
|
|
81
81
|
color: 'blue'
|
|
82
82
|
}
|
|
83
|
-
};
|
|
83
|
+
};
|
|
84
|
+
export { Component as NAlert, Component as default };
|
package/components/NBadge.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare const nBadgeProps: {
|
|
|
65
65
|
/**
|
|
66
66
|
* The `NBadge` is a styled element to wrap a text.
|
|
67
67
|
*/
|
|
68
|
-
declare const
|
|
68
|
+
declare const Component: import("vue").DefineComponent<{
|
|
69
69
|
readonly tooltipText: StringConstructor;
|
|
70
70
|
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
71
71
|
readonly tooltipHide: BooleanConstructor;
|
|
@@ -198,4 +198,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
198
198
|
readonly textShade: number;
|
|
199
199
|
readonly allCaps: boolean;
|
|
200
200
|
}>;
|
|
201
|
-
export default
|
|
201
|
+
export { Component as NBadge, Component as default };
|
package/components/NBadge.js
CHANGED
|
@@ -52,7 +52,7 @@ export const nBadgeProps = {
|
|
|
52
52
|
/**
|
|
53
53
|
* The `NBadge` is a styled element to wrap a text.
|
|
54
54
|
*/
|
|
55
|
-
|
|
55
|
+
const Component = createComponent('NBadge', nBadgeProps, (props, {
|
|
56
56
|
slots
|
|
57
57
|
}) => {
|
|
58
58
|
return () => _createVNode(NTooltip, mapTooltipProps(props), {
|
|
@@ -60,4 +60,5 @@ export default createComponent('NBadge', nBadgeProps, (props, {
|
|
|
60
60
|
"class": ['px-2 py-1 rounded-md font-semibold shadow', `${props.textSize} bg-${props.color}-${props.shade} text-${props.color}-${props.textShade}`, props.allCaps ? 'uppercase' : '', props.badgeClass]
|
|
61
61
|
}, [slots.default?.() || props.text])]
|
|
62
62
|
});
|
|
63
|
-
});
|
|
63
|
+
});
|
|
64
|
+
export { Component as NBadge, Component as default };
|
|
@@ -65,7 +65,7 @@ export type BreadcrumbItem = {
|
|
|
65
65
|
/**
|
|
66
66
|
* The `NBreadcrumb` is a styled breadcrumb which can be used as a navigation in hierarchical views.
|
|
67
67
|
*/
|
|
68
|
-
declare const
|
|
68
|
+
declare const Component: import("vue").DefineComponent<{
|
|
69
69
|
/**
|
|
70
70
|
* The items of the breadcrumb.
|
|
71
71
|
*/
|
|
@@ -170,4 +170,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
170
170
|
readonly items: BreadcrumbItem[];
|
|
171
171
|
readonly iconSize: number;
|
|
172
172
|
}>;
|
|
173
|
-
export default
|
|
173
|
+
export { Component as NBreadcrumb, Component as default };
|
package/components/NBreadcrub.js
CHANGED
|
@@ -55,7 +55,7 @@ export const nBreadcrumbProps = {
|
|
|
55
55
|
/**
|
|
56
56
|
* The `NBreadcrumb` is a styled breadcrumb which can be used as a navigation in hierarchical views.
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
const Component = createComponentWithSlots('NBreadcrumb', nBreadcrumbProps, ['seperator', 'item'], props => {
|
|
59
59
|
return () => _createVNode("div", {
|
|
60
60
|
"class": `flex flex-wrap items-center`
|
|
61
61
|
}, [props.items.map((item, index) => _createVNode(_Fragment, null, [props.item?.(item, index) || _createVNode(NLink, {
|
|
@@ -67,4 +67,5 @@ export default createComponentWithSlots('NBreadcrumb', nBreadcrumbProps, ['seper
|
|
|
67
67
|
}), index < props.items.length - 1 && (props.seperator?.(item, index) || _createVNode(props.icon, {
|
|
68
68
|
"class": `mx-2 w-${props.iconSize} h-${props.iconSize} text-${props.color}-500 ${props.iconClass}`
|
|
69
69
|
}, null))]))]);
|
|
70
|
-
});
|
|
70
|
+
});
|
|
71
|
+
export { Component as NBreadcrumb, Component as default };
|
package/components/NButton.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export declare const nButtonProps: {
|
|
|
56
56
|
/**
|
|
57
57
|
* The `NButton` is a styled button.
|
|
58
58
|
*/
|
|
59
|
-
declare const
|
|
59
|
+
declare const Component: import("vue").DefineComponent<{
|
|
60
60
|
readonly tooltipText: StringConstructor;
|
|
61
61
|
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
62
62
|
readonly tooltipHide: BooleanConstructor;
|
|
@@ -173,4 +173,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
173
|
readonly disabled: boolean;
|
|
174
174
|
readonly loading: boolean;
|
|
175
175
|
}>;
|
|
176
|
-
export default
|
|
176
|
+
export { Component as NButton, Component as default };
|
package/components/NButton.js
CHANGED
|
@@ -46,7 +46,7 @@ export const nButtonProps = {
|
|
|
46
46
|
/**
|
|
47
47
|
* The `NButton` is a styled button.
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
const Component = createComponent('NButton', nButtonProps, (props, {
|
|
50
50
|
slots
|
|
51
51
|
}) => {
|
|
52
52
|
const isDisabled = computed(() => props.loading || props.disabled);
|
|
@@ -68,4 +68,5 @@ export default createComponent('NButton', nButtonProps, (props, {
|
|
|
68
68
|
"shade": 600
|
|
69
69
|
}, null)])])]
|
|
70
70
|
});
|
|
71
|
-
});
|
|
71
|
+
});
|
|
72
|
+
export { Component as NButton, Component as default };
|
|
@@ -16,7 +16,7 @@ export declare const nCheckboxProps: {
|
|
|
16
16
|
/**
|
|
17
17
|
* The `NCheckbox` is a styled checkbox.
|
|
18
18
|
*/
|
|
19
|
-
declare const
|
|
19
|
+
declare const Component: import("vue").DefineComponent<{
|
|
20
20
|
/**
|
|
21
21
|
* The color of the checkbox.
|
|
22
22
|
*/
|
|
@@ -48,4 +48,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
48
|
readonly color: string;
|
|
49
49
|
readonly disabled: boolean;
|
|
50
50
|
}>;
|
|
51
|
-
export default
|
|
51
|
+
export { Component as NCheckbox, Component as default };
|
package/components/NCheckbox.js
CHANGED
|
@@ -19,7 +19,7 @@ export const nCheckboxProps = {
|
|
|
19
19
|
/**
|
|
20
20
|
* The `NCheckbox` is a styled checkbox.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
const Component = createComponent('NCheckbox', nCheckboxProps, props => {
|
|
23
23
|
const toggle = () => {
|
|
24
24
|
props.onUpdateValue?.(!props.value);
|
|
25
25
|
forceUpdate();
|
|
@@ -39,4 +39,5 @@ export default createComponent('NCheckbox', nCheckboxProps, props => {
|
|
|
39
39
|
"key": updateKey.value,
|
|
40
40
|
"class": [`h-5 w-5 border-default-300 rounded focus:outline-none focus:ring-0 focus-visible:ring-2 focus-visible:ring-${props.color}-500`, props.disabled ? `cursor-default bg-default-100 text-${props.color}-200` : `cursor-pointer text-${props.color}-400`]
|
|
41
41
|
}, null);
|
|
42
|
-
});
|
|
42
|
+
});
|
|
43
|
+
export { Component as NCheckbox, Component as default };
|
|
@@ -22,7 +22,7 @@ export declare const nCheckboxLabelProps: {
|
|
|
22
22
|
/**
|
|
23
23
|
* The `NCheckboxLabel` is a checkbox with a title and a description.
|
|
24
24
|
*/
|
|
25
|
-
declare const
|
|
25
|
+
declare const Component: import("vue").DefineComponent<{
|
|
26
26
|
/**
|
|
27
27
|
* The title of the checkbox.
|
|
28
28
|
*/
|
|
@@ -67,4 +67,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
67
67
|
readonly disabled: boolean;
|
|
68
68
|
readonly compact: boolean;
|
|
69
69
|
}>;
|
|
70
|
-
export default
|
|
70
|
+
export { Component as NCheckboxLabel, Component as default };
|
|
@@ -19,7 +19,7 @@ export const nCheckboxLabelProps = {
|
|
|
19
19
|
/**
|
|
20
20
|
* The `NCheckboxLabel` is a checkbox with a title and a description.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
const Component = createComponent('NCheckboxLabel', nCheckboxLabelProps, props => {
|
|
23
23
|
const toggleValue = () => {
|
|
24
24
|
if (!props.disabled) props.onUpdateValue?.(!props.value);
|
|
25
25
|
};
|
|
@@ -38,4 +38,5 @@ export default createComponent('NCheckboxLabel', nCheckboxLabelProps, props => {
|
|
|
38
38
|
"onClick": toggleValue,
|
|
39
39
|
"class": ['select-none', props.disabled ? '' : 'cursor-pointer']
|
|
40
40
|
}, [props.description])])])]);
|
|
41
|
-
});
|
|
41
|
+
});
|
|
42
|
+
export { Component as NCheckboxLabel, Component as default };
|
|
@@ -105,7 +105,7 @@ export declare const nCrudModalProps: {
|
|
|
105
105
|
* It has an integrated remove-button with a user-dialog to remove the editing element.
|
|
106
106
|
* When the dialog is accepted `onRemove` is called.
|
|
107
107
|
*/
|
|
108
|
-
declare const
|
|
108
|
+
declare const Component: import("vue").DefineComponent<{
|
|
109
109
|
/**
|
|
110
110
|
* The text of the remove-button.
|
|
111
111
|
*/
|
|
@@ -324,4 +324,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
324
324
|
readonly removeDialogVariant: DialogVariant;
|
|
325
325
|
readonly closeOnRemove: boolean;
|
|
326
326
|
}>;
|
|
327
|
-
export default
|
|
327
|
+
export { Component as NCrudModal, Component as default };
|
package/components/NCrudModal.js
CHANGED
|
@@ -69,7 +69,7 @@ export const nCrudModalProps = {
|
|
|
69
69
|
* It has an integrated remove-button with a user-dialog to remove the editing element.
|
|
70
70
|
* When the dialog is accepted `onRemove` is called.
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
const Component = createComponentWithSlots('NCrudModal', nCrudModalProps, ['modal', 'footer', 'header'], (props, {
|
|
73
73
|
slots
|
|
74
74
|
}) => {
|
|
75
75
|
const removeDialog = ref();
|
|
@@ -116,4 +116,5 @@ export default createComponentWithSlots('NCrudModal', nCrudModalProps, ['modal',
|
|
|
116
116
|
"okText": props.removeDialogOkText
|
|
117
117
|
}, null)]
|
|
118
118
|
});
|
|
119
|
-
});
|
|
119
|
+
});
|
|
120
|
+
export { Component as NCrudModal, Component as default };
|
package/components/NDialog.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export type NDialogExposed = {
|
|
|
77
77
|
* ...
|
|
78
78
|
* <NDialog ref={dialogRef} />
|
|
79
79
|
*/
|
|
80
|
-
declare const
|
|
80
|
+
declare const Component: import("vue").DefineComponent<{
|
|
81
81
|
/**
|
|
82
82
|
* The title of the dialog.
|
|
83
83
|
*/
|
|
@@ -187,4 +187,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
187
187
|
cancelColor: string;
|
|
188
188
|
hideCancel: boolean;
|
|
189
189
|
}>;
|
|
190
|
-
export default
|
|
190
|
+
export { Component as NDialog, Component as default };
|
package/components/NDialog.js
CHANGED
|
@@ -76,7 +76,7 @@ export const nDialogProps = {
|
|
|
76
76
|
* ...
|
|
77
77
|
* <NDialog ref={dialogRef} />
|
|
78
78
|
*/
|
|
79
|
-
|
|
79
|
+
const Component = createComponent('NDialog', nDialogProps, (props, context) => {
|
|
80
80
|
const showDialog = ref(false);
|
|
81
81
|
let deferredPromise = null;
|
|
82
82
|
const show = () => {
|
|
@@ -157,4 +157,5 @@ const VARIANT_DEFAULTS = {
|
|
|
157
157
|
okText: trsl('vue-collection.action.remove'),
|
|
158
158
|
okColor: 'red'
|
|
159
159
|
}
|
|
160
|
-
};
|
|
160
|
+
};
|
|
161
|
+
export { Component as NDialog, Component as default };
|
|
@@ -63,7 +63,7 @@ export type DropdownItem = {
|
|
|
63
63
|
* The `NDropdown` consists of a button and a panel with multiple actions.
|
|
64
64
|
* It is useful to group multiple actions together in one place.
|
|
65
65
|
*/
|
|
66
|
-
declare const
|
|
66
|
+
declare const Component: import("vue").DefineComponent<{
|
|
67
67
|
/**
|
|
68
68
|
* The title of the dropdown-button.
|
|
69
69
|
*/
|
|
@@ -94,41 +94,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
94
94
|
* The passed parameter is the HeadlessUI `MenuButton` which should be
|
|
95
95
|
* used to create the button for the Dropdown to work properly.
|
|
96
96
|
*/
|
|
97
|
-
readonly button: PropType<(button:
|
|
98
|
-
disabled: {
|
|
99
|
-
type: BooleanConstructor;
|
|
100
|
-
default: boolean;
|
|
101
|
-
};
|
|
102
|
-
as: {
|
|
103
|
-
type: (ObjectConstructor | StringConstructor)[];
|
|
104
|
-
default: string;
|
|
105
|
-
};
|
|
106
|
-
id: {
|
|
107
|
-
type: StringConstructor;
|
|
108
|
-
default: () => string;
|
|
109
|
-
};
|
|
110
|
-
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
111
|
-
[key: string]: any;
|
|
112
|
-
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
113
|
-
[key: string]: any;
|
|
114
|
-
}>[] | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
115
|
-
disabled: {
|
|
116
|
-
type: BooleanConstructor;
|
|
117
|
-
default: boolean;
|
|
118
|
-
};
|
|
119
|
-
as: {
|
|
120
|
-
type: (ObjectConstructor | StringConstructor)[];
|
|
121
|
-
default: string;
|
|
122
|
-
};
|
|
123
|
-
id: {
|
|
124
|
-
type: StringConstructor;
|
|
125
|
-
default: () => string;
|
|
126
|
-
};
|
|
127
|
-
}>>, {
|
|
128
|
-
as: string | Record<string, any>;
|
|
129
|
-
disabled: boolean;
|
|
130
|
-
id: string;
|
|
131
|
-
}>) => JSX.Element>;
|
|
97
|
+
readonly button: PropType<(button: typeof MenuButton) => JSX.Element>;
|
|
132
98
|
}, import("vue").RenderFunction, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
133
99
|
/**
|
|
134
100
|
* The title of the dropdown-button.
|
|
@@ -160,44 +126,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
160
126
|
* The passed parameter is the HeadlessUI `MenuButton` which should be
|
|
161
127
|
* used to create the button for the Dropdown to work properly.
|
|
162
128
|
*/
|
|
163
|
-
readonly button: PropType<(button:
|
|
164
|
-
disabled: {
|
|
165
|
-
type: BooleanConstructor;
|
|
166
|
-
default: boolean;
|
|
167
|
-
};
|
|
168
|
-
as: {
|
|
169
|
-
type: (ObjectConstructor | StringConstructor)[];
|
|
170
|
-
default: string;
|
|
171
|
-
};
|
|
172
|
-
id: {
|
|
173
|
-
type: StringConstructor;
|
|
174
|
-
default: () => string;
|
|
175
|
-
};
|
|
176
|
-
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
177
|
-
[key: string]: any;
|
|
178
|
-
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
179
|
-
[key: string]: any;
|
|
180
|
-
}>[] | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
181
|
-
disabled: {
|
|
182
|
-
type: BooleanConstructor;
|
|
183
|
-
default: boolean;
|
|
184
|
-
};
|
|
185
|
-
as: {
|
|
186
|
-
type: (ObjectConstructor | StringConstructor)[];
|
|
187
|
-
default: string;
|
|
188
|
-
};
|
|
189
|
-
id: {
|
|
190
|
-
type: StringConstructor;
|
|
191
|
-
default: () => string;
|
|
192
|
-
};
|
|
193
|
-
}>>, {
|
|
194
|
-
as: string | Record<string, any>;
|
|
195
|
-
disabled: boolean;
|
|
196
|
-
id: string;
|
|
197
|
-
}>) => JSX.Element>;
|
|
129
|
+
readonly button: PropType<(button: typeof MenuButton) => JSX.Element>;
|
|
198
130
|
}>> & {}, {
|
|
199
131
|
readonly right: boolean;
|
|
200
132
|
readonly disabled: boolean;
|
|
201
133
|
readonly items: DropdownItem[] | DropdownItem[][];
|
|
202
134
|
}>;
|
|
203
|
-
export default
|
|
135
|
+
export { Component as NDropdown, Component as default };
|
package/components/NDropdown.js
CHANGED
|
@@ -44,7 +44,7 @@ export const nDropdownProps = {
|
|
|
44
44
|
* The `NDropdown` consists of a button and a panel with multiple actions.
|
|
45
45
|
* It is useful to group multiple actions together in one place.
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
const Component = createComponentWithSlots('NDropdown', nDropdownProps, ['button'], (props, {
|
|
48
48
|
slots
|
|
49
49
|
}) => {
|
|
50
50
|
const items = computed(() => {
|
|
@@ -111,4 +111,5 @@ export default createComponentWithSlots('NDropdown', nDropdownProps, ['button'],
|
|
|
111
111
|
})]
|
|
112
112
|
})]
|
|
113
113
|
});
|
|
114
|
-
});
|
|
114
|
+
});
|
|
115
|
+
export { Component as NDropdown, Component as default };
|
|
@@ -53,7 +53,7 @@ export declare const nDropzoneProps: {
|
|
|
53
53
|
* The `NDropzone` is an area where files can be added by the user by drag & drop.
|
|
54
54
|
* Files can also be selected with a file chooser by clicking on the dropzone.
|
|
55
55
|
*/
|
|
56
|
-
declare const
|
|
56
|
+
declare const Component: import("vue").DefineComponent<{
|
|
57
57
|
/**
|
|
58
58
|
* A description which files are allowed for this dropzone.
|
|
59
59
|
* This should include everything the user needs to know about
|
|
@@ -159,4 +159,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
159
159
|
readonly maxLengthFileNames: number;
|
|
160
160
|
readonly height: string;
|
|
161
161
|
}>;
|
|
162
|
-
export default
|
|
162
|
+
export { Component as NDropzone, Component as default };
|
package/components/NDropzone.js
CHANGED
|
@@ -66,7 +66,7 @@ export const nDropzoneProps = {
|
|
|
66
66
|
* The `NDropzone` is an area where files can be added by the user by drag & drop.
|
|
67
67
|
* Files can also be selected with a file chooser by clicking on the dropzone.
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
const Component = createComponent('NDropzone', nDropzoneProps, props => {
|
|
70
70
|
const fileError = ref();
|
|
71
71
|
const filterAndUpdateFiles = files => {
|
|
72
72
|
// filter for mime type and max size
|
|
@@ -194,6 +194,7 @@ export default createComponent('NDropzone', nDropzoneProps, props => {
|
|
|
194
194
|
})])])])])])]);
|
|
195
195
|
};
|
|
196
196
|
});
|
|
197
|
+
export { Component as NDropzone, Component as default };
|
|
197
198
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers
|
|
198
199
|
const MIME_FORMAT = /^(image|audio|application|video|text)\/\*$/;
|
|
199
200
|
const EXTENSION_FORMAT = /^\.\w{2,20}$/;
|
package/components/NForm.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const nFormProps: {
|
|
|
17
17
|
* If it contains a button of type `submit` in it's hierarchy,
|
|
18
18
|
* it catches the submit event and passes it to the {@link ValidatedForm} in its `form` prop.
|
|
19
19
|
*/
|
|
20
|
-
declare const
|
|
20
|
+
declare const Component: import("vue").DefineComponent<{
|
|
21
21
|
/**
|
|
22
22
|
* The {@link ValidatedForm} which will be used to validate the inputs.
|
|
23
23
|
* All inputs in this forms hierarchy should be added to the {@link ValidatedForm}.
|
|
@@ -40,4 +40,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
40
|
*/
|
|
41
41
|
readonly onSubmit: PropType<() => void>;
|
|
42
42
|
}>> & {}, {}>;
|
|
43
|
-
export default
|
|
43
|
+
export { Component as NForm, Component as default };
|
package/components/NForm.js
CHANGED
|
@@ -17,7 +17,7 @@ export const nFormProps = {
|
|
|
17
17
|
* If it contains a button of type `submit` in it's hierarchy,
|
|
18
18
|
* it catches the submit event and passes it to the {@link ValidatedForm} in its `form` prop.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
const Component = createComponent('NForm', nFormProps, (props, context) => {
|
|
21
21
|
const onSubmit = event => {
|
|
22
22
|
event.preventDefault();
|
|
23
23
|
if (!props.form || props.form.validate().isValid) props.onSubmit?.();
|
|
@@ -25,4 +25,5 @@ export default createComponent('NForm', nFormProps, (props, context) => {
|
|
|
25
25
|
return () => _createVNode("form", {
|
|
26
26
|
"onSubmit": onSubmit
|
|
27
27
|
}, [context.slots.default?.()]);
|
|
28
|
-
});
|
|
28
|
+
});
|
|
29
|
+
export { Component as NForm, Component as default };
|
|
@@ -62,7 +62,7 @@ export declare const nFormModalProps: {
|
|
|
62
62
|
* When submitting a `NFormModal` the form is first validated and
|
|
63
63
|
* only if the validation is succesful the `onOk` event is called.
|
|
64
64
|
*/
|
|
65
|
-
declare const
|
|
65
|
+
declare const Component: import("vue").DefineComponent<{
|
|
66
66
|
/**
|
|
67
67
|
* The maximum width of the modal. A regular tailwind class.
|
|
68
68
|
*/
|
|
@@ -187,4 +187,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
187
187
|
readonly closeOnBackground: boolean;
|
|
188
188
|
readonly hideCancel: boolean;
|
|
189
189
|
}>;
|
|
190
|
-
export default
|
|
190
|
+
export { Component as NFormModal, Component as default };
|
package/components/NFormModal.js
CHANGED
|
@@ -31,7 +31,7 @@ export const nFormModalProps = {
|
|
|
31
31
|
* When submitting a `NFormModal` the form is first validated and
|
|
32
32
|
* only if the validation is succesful the `onOk` event is called.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
const Component = createComponentWithSlots('NFormModal', nFormModalProps, ['modal', 'header', 'footer'], (props, {
|
|
35
35
|
slots
|
|
36
36
|
}) => {
|
|
37
37
|
const onOk = () => {
|
|
@@ -55,4 +55,5 @@ export default createComponentWithSlots('NFormModal', nFormModalProps, ['modal',
|
|
|
55
55
|
default: () => [slots.default?.()]
|
|
56
56
|
})]
|
|
57
57
|
});
|
|
58
|
-
});
|
|
58
|
+
});
|
|
59
|
+
export { Component as NFormModal, Component as default };
|
|
@@ -77,7 +77,7 @@ export declare const nIconButtonProps: {
|
|
|
77
77
|
/**
|
|
78
78
|
* The `NIconButton` is a regular button which does not have any text but an icon instead.
|
|
79
79
|
*/
|
|
80
|
-
declare const
|
|
80
|
+
declare const Component: import("vue").DefineComponent<{
|
|
81
81
|
readonly tooltipText: StringConstructor;
|
|
82
82
|
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
83
83
|
readonly tooltipHide: BooleanConstructor;
|
|
@@ -232,4 +232,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
232
232
|
readonly tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
233
233
|
readonly disabled: boolean;
|
|
234
234
|
}>;
|
|
235
|
-
export default
|
|
235
|
+
export { Component as NIconButton, Component as default };
|
|
@@ -63,7 +63,7 @@ export const nIconButtonProps = {
|
|
|
63
63
|
/**
|
|
64
64
|
* The `NIconButton` is a regular button which does not have any text but an icon instead.
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
const Component = createComponent('NIconButton', nIconButtonProps, props => {
|
|
67
67
|
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.buttonClass];
|
|
68
68
|
const content = () => _createVNode(props.icon, {
|
|
69
69
|
"class": `w-${props.size} h-${props.size}`
|
|
@@ -84,4 +84,5 @@ export default createComponent('NIconButton', nIconButtonProps, props => {
|
|
|
84
84
|
}, [content()])]
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
|
-
});
|
|
87
|
+
});
|
|
88
|
+
export { Component as NIconButton, Component as default };
|
|
@@ -45,7 +45,7 @@ export declare const nIconCircleProps: {
|
|
|
45
45
|
/**
|
|
46
46
|
* The `NIconCircle` is an icon with a colored circle around it.
|
|
47
47
|
*/
|
|
48
|
-
declare const
|
|
48
|
+
declare const Component: import("vue").DefineComponent<{
|
|
49
49
|
/**
|
|
50
50
|
* The icon of the icon-circle.
|
|
51
51
|
*/
|
|
@@ -132,4 +132,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
132
|
readonly iconShade: number;
|
|
133
133
|
readonly bgShade: number;
|
|
134
134
|
}>;
|
|
135
|
-
export default
|
|
135
|
+
export { Component as NIconCircle, Component as default };
|
|
@@ -47,7 +47,7 @@ const SCALING_FACTOR = 0.55;
|
|
|
47
47
|
/**
|
|
48
48
|
* The `NIconCircle` is an icon with a colored circle around it.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
const Component = createComponent('NIconCircle', nIconCircleProps, props => {
|
|
51
51
|
let circleSize = props.circleSize;
|
|
52
52
|
let iconSize = props.iconSize;
|
|
53
53
|
if (circleSize == null) {
|
|
@@ -63,4 +63,5 @@ export default createComponent('NIconCircle', nIconCircleProps, props => {
|
|
|
63
63
|
"class": `text-${props.color}-${props.iconShade}`,
|
|
64
64
|
"style": `width: ${iconSize}px; height: ${iconSize}px`
|
|
65
65
|
}, [_createVNode(props.icon, null, null)])]);
|
|
66
|
-
});
|
|
66
|
+
});
|
|
67
|
+
export { Component as NIconCircle, Component as default };
|
package/components/NInput.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ export type NInputExposed = {
|
|
|
86
86
|
/**
|
|
87
87
|
* The base class of inputs. A styled input with a lot of configuration possibilities but no validation.
|
|
88
88
|
*/
|
|
89
|
-
declare const
|
|
89
|
+
declare const Component: import("vue").DefineComponent<{
|
|
90
90
|
readonly tooltipText: StringConstructor;
|
|
91
91
|
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
92
92
|
readonly tooltipHide: BooleanConstructor;
|
|
@@ -250,4 +250,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
250
250
|
readonly autocomplete: string;
|
|
251
251
|
readonly hideLabel: boolean;
|
|
252
252
|
}>;
|
|
253
|
-
export default
|
|
253
|
+
export { Component as NInput, Component as default };
|
package/components/NInput.js
CHANGED
|
@@ -70,7 +70,7 @@ export const nInputProps = {
|
|
|
70
70
|
/**
|
|
71
71
|
* The base class of inputs. A styled input with a lot of configuration possibilities but no validation.
|
|
72
72
|
*/
|
|
73
|
-
|
|
73
|
+
const Component = createComponent('NInput', nInputProps, (props, context) => {
|
|
74
74
|
const inputRef = ref();
|
|
75
75
|
const exposed = {
|
|
76
76
|
focus: () => inputRef.value?.focus()
|
|
@@ -106,4 +106,5 @@ export default createComponent('NInput', nInputProps, (props, context) => {
|
|
|
106
106
|
"aria-hidden": "true"
|
|
107
107
|
}, null)]), [[_vShow, props.error && !props.small]])])]
|
|
108
108
|
})]);
|
|
109
|
-
});
|
|
109
|
+
});
|
|
110
|
+
export { Component as NInput, Component as default };
|
|
@@ -49,7 +49,7 @@ export declare const nInputPhoneProps: {
|
|
|
49
49
|
/**
|
|
50
50
|
* The `NInputPhone` autoformats phone numbers and checks if they are valid.
|
|
51
51
|
*/
|
|
52
|
-
declare const
|
|
52
|
+
declare const Component: import("vue").DefineComponent<{
|
|
53
53
|
readonly input: import("vue").PropType<(props: import("./NValInput").InputSlotProps) => JSX.Element>;
|
|
54
54
|
readonly optional: BooleanConstructor;
|
|
55
55
|
readonly rules: {
|
|
@@ -159,4 +159,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
159
159
|
readonly hideErrorMessage: boolean;
|
|
160
160
|
readonly disableBlurValidation: boolean;
|
|
161
161
|
}>;
|
|
162
|
-
export default
|
|
162
|
+
export { Component as NInputPhone, Component as default };
|
|
@@ -8,12 +8,13 @@ export const nInputPhoneProps = nValInputProps;
|
|
|
8
8
|
/**
|
|
9
9
|
* The `NInputPhone` autoformats phone numbers and checks if they are valid.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
const Component = createComponent('NInputPhoneSuspended', nInputPhoneProps, props => {
|
|
12
12
|
// Async components have to be wrapped in a suspense component.
|
|
13
13
|
return () => _createVNode(Suspense, null, {
|
|
14
14
|
default: () => [_createVNode(NPhoneInput, props, null)]
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
+
export { Component as NInputPhone, Component as default };
|
|
17
18
|
const NPhoneInput = createComponent('NInputPhone', nInputPhoneProps, async props => {
|
|
18
19
|
// import dynamically for better codesplitting as the library is pretty large
|
|
19
20
|
const {
|
|
@@ -95,7 +95,7 @@ export type InputSelectOption = Identifiable & {
|
|
|
95
95
|
* The user is forced to use a value from the specified options of the input.
|
|
96
96
|
* While they type, the list of options is shown to them and filtered based on their input.
|
|
97
97
|
*/
|
|
98
|
-
declare const
|
|
98
|
+
declare const Component: import("vue").DefineComponent<{
|
|
99
99
|
/**
|
|
100
100
|
* The id of the currently selected option of this input.
|
|
101
101
|
*/
|
|
@@ -281,4 +281,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
281
281
|
readonly maxItems: number;
|
|
282
282
|
readonly hideList: boolean;
|
|
283
283
|
}>;
|
|
284
|
-
export default
|
|
284
|
+
export { Component as NInputSelect, Component as default };
|
|
@@ -64,7 +64,7 @@ export const nInputSelectProps = {
|
|
|
64
64
|
* The user is forced to use a value from the specified options of the input.
|
|
65
65
|
* While they type, the list of options is shown to them and filtered based on their input.
|
|
66
66
|
*/
|
|
67
|
-
|
|
67
|
+
const Component = createComponentWithSlots('NInputSelect', nInputSelectProps, ['listItem'], props => {
|
|
68
68
|
const inputRef = ref();
|
|
69
69
|
const inputValue = ref('');
|
|
70
70
|
watch(() => props.value, newValue => {
|
|
@@ -111,4 +111,5 @@ export default createComponentWithSlots('NInputSelect', nInputSelectProps, ['lis
|
|
|
111
111
|
inputRef?.value?.validate();
|
|
112
112
|
}
|
|
113
113
|
}, null);
|
|
114
|
-
});
|
|
114
|
+
});
|
|
115
|
+
export { Component as NInputSelect, Component as default };
|
|
@@ -70,7 +70,7 @@ export declare const nInputSuggestionProps: {
|
|
|
70
70
|
* `NInputSuggestion` is an input, which shows a list of possible suggestions to the user
|
|
71
71
|
* which is filtered while typing. Contrary to {@link NInputSelect} the user is not required to choose any of the suggestions.
|
|
72
72
|
*/
|
|
73
|
-
declare const
|
|
73
|
+
declare const Component: import("vue").DefineComponent<{
|
|
74
74
|
/**
|
|
75
75
|
* If set to `true` the list is hidden even if there are still matching items in the list.
|
|
76
76
|
*/
|
|
@@ -221,4 +221,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
221
221
|
readonly hideList: boolean;
|
|
222
222
|
readonly suggestions: string[];
|
|
223
223
|
}>;
|
|
224
|
-
export default
|
|
224
|
+
export { Component as NInputSuggestion, Component as default };
|
|
@@ -27,7 +27,7 @@ export const nInputSuggestionProps = {
|
|
|
27
27
|
* `NInputSuggestion` is an input, which shows a list of possible suggestions to the user
|
|
28
28
|
* which is filtered while typing. Contrary to {@link NInputSelect} the user is not required to choose any of the suggestions.
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
const Component = createComponent('NInputSuggestion', nInputSuggestionProps, props => {
|
|
31
31
|
const suggestionItems = computed(() => props.suggestions.filter(suggestion => suggestion.includes(props.value || '')).map((value, index) => ({
|
|
32
32
|
id: index.toString(),
|
|
33
33
|
label: value
|
|
@@ -60,4 +60,5 @@ export default createComponent('NInputSuggestion', nInputSuggestionProps, props
|
|
|
60
60
|
inputRef?.value?.validate();
|
|
61
61
|
}
|
|
62
62
|
}, null);
|
|
63
|
-
});
|
|
63
|
+
});
|
|
64
|
+
export { Component as NInputSuggestion, Component as default };
|
package/components/NLink.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare const nLinkProps: {
|
|
|
38
38
|
/**
|
|
39
39
|
* The `NLink` is a styled text which can be used as a {@link RouterLink} or a regular button.
|
|
40
40
|
*/
|
|
41
|
-
declare const
|
|
41
|
+
declare const Component: import("vue").DefineComponent<{
|
|
42
42
|
/**
|
|
43
43
|
* The text of the link. Can also be set in the default slot.
|
|
44
44
|
*/
|
|
@@ -108,4 +108,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
108
108
|
readonly color: string;
|
|
109
109
|
readonly shade: number;
|
|
110
110
|
}>;
|
|
111
|
-
export default
|
|
111
|
+
export { Component as NLink, Component as default };
|
package/components/NLink.js
CHANGED
|
@@ -39,7 +39,7 @@ export const nLinkProps = {
|
|
|
39
39
|
/**
|
|
40
40
|
* The `NLink` is a styled text which can be used as a {@link RouterLink} or a regular button.
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
const Component = createComponent('NLink', nLinkProps, (props, {
|
|
43
43
|
slots
|
|
44
44
|
}) => {
|
|
45
45
|
const hoverShade = computed(() => {
|
|
@@ -56,4 +56,5 @@ export default createComponent('NLink', nLinkProps, (props, {
|
|
|
56
56
|
"onClick": props.onClick,
|
|
57
57
|
"class": classes.value
|
|
58
58
|
}, [slots.default?.() || props.text]);
|
|
59
|
-
});
|
|
59
|
+
});
|
|
60
|
+
export { Component as NLink, Component as default };
|
package/components/NList.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const nListProps: {
|
|
|
29
29
|
/**
|
|
30
30
|
* The `NList` displays key-value data in an appealing way.
|
|
31
31
|
*/
|
|
32
|
-
declare const
|
|
32
|
+
declare const Component: import("vue").DefineComponent<{
|
|
33
33
|
/**
|
|
34
34
|
* The items which are displayed in the list.
|
|
35
35
|
*/
|
|
@@ -64,4 +64,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
64
64
|
}>> & {}, {
|
|
65
65
|
readonly items: ListItem[];
|
|
66
66
|
}>;
|
|
67
|
-
export default
|
|
67
|
+
export { Component as NList, Component as default };
|
package/components/NList.js
CHANGED
|
@@ -20,7 +20,7 @@ export const nListProps = {
|
|
|
20
20
|
/**
|
|
21
21
|
* The `NList` displays key-value data in an appealing way.
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const Component = createComponent('NList', nListProps, props => {
|
|
24
24
|
return () => _createVNode("dl", null, [props.items.map((item, index) => _createVNode("div", {
|
|
25
25
|
"key": index,
|
|
26
26
|
"class": ['py-5 px-4 sm:grid sm:grid-cols-3 sm:gap-4', index % 2 === 1 ? 'bg-white' : 'bg-default-50']
|
|
@@ -30,6 +30,7 @@ export default createComponent('NList', nListProps, props => {
|
|
|
30
30
|
"class": `mt-1 text-sm sm:mt-0 sm:col-span-2 ${props.textClass}`
|
|
31
31
|
}, [buildElement(item.text)])]))]);
|
|
32
32
|
});
|
|
33
|
+
export { Component as NList, Component as default };
|
|
33
34
|
function buildElement(element) {
|
|
34
35
|
if (typeof element === 'function') return element();else return _createVNode(_Fragment, null, [element]);
|
|
35
36
|
}
|
|
@@ -25,7 +25,7 @@ export declare const nLoadingIndicator: {
|
|
|
25
25
|
/**
|
|
26
26
|
* The `NLoadingIndicator` is a styled loading indicator.
|
|
27
27
|
*/
|
|
28
|
-
declare const
|
|
28
|
+
declare const Component: import("vue").DefineComponent<{
|
|
29
29
|
/**
|
|
30
30
|
* The color of the loading-indicator.
|
|
31
31
|
*/
|
|
@@ -74,4 +74,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
74
|
readonly shade: number;
|
|
75
75
|
readonly size: number;
|
|
76
76
|
}>;
|
|
77
|
-
export default
|
|
77
|
+
export { Component as NLoadingIndicator, Component as default };
|
|
@@ -28,7 +28,7 @@ export const nLoadingIndicator = {
|
|
|
28
28
|
/**
|
|
29
29
|
* The `NLoadingIndicator` is a styled loading indicator.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
const Component = createComponent('NLoadingIndicator', nLoadingIndicator, props => {
|
|
32
32
|
const gap = computed(() => props.size / 13 * 24);
|
|
33
33
|
const totalWidth = computed(() => gap.value * 2 + props.size);
|
|
34
34
|
useCssVars(() => ({
|
|
@@ -50,4 +50,5 @@ export default createComponent('NLoadingIndicator', nLoadingIndicator, props =>
|
|
|
50
50
|
"class": `bg-${props.color}-${props.shade}`,
|
|
51
51
|
"style": `height:${props.size}px;width:${props.size}px;left:${2 * gap.value}px`
|
|
52
52
|
}, null)]);
|
|
53
|
-
});
|
|
53
|
+
});
|
|
54
|
+
export { Component as NLoadingIndicator, Component as default };
|
package/components/NModal.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ export type ModalSlotProps = {
|
|
|
111
111
|
* The `NModal` is the base component for all modals and dialogs.
|
|
112
112
|
* It provides the core mechanics to display a window in front of everything else.
|
|
113
113
|
*/
|
|
114
|
-
declare const
|
|
114
|
+
declare const Component: import("vue").DefineComponent<{
|
|
115
115
|
/**
|
|
116
116
|
* If set to `true` the header of the modal is hidden.
|
|
117
117
|
*/
|
|
@@ -330,4 +330,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
330
330
|
readonly closeOnBackground: boolean;
|
|
331
331
|
readonly hideCancel: boolean;
|
|
332
332
|
}>;
|
|
333
|
-
export default
|
|
333
|
+
export { Component as NModal, Component as default };
|
package/components/NModal.js
CHANGED
|
@@ -112,7 +112,7 @@ export const nModalProps = {
|
|
|
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.
|
|
114
114
|
*/
|
|
115
|
-
|
|
115
|
+
const Component = createComponentWithSlots('NModal', nModalProps, ['modal', 'header', 'footer'], (props, {
|
|
116
116
|
slots
|
|
117
117
|
}) => {
|
|
118
118
|
const ok = () => {
|
|
@@ -207,4 +207,5 @@ export default createComponentWithSlots('NModal', nModalProps, ['modal', 'header
|
|
|
207
207
|
})])]
|
|
208
208
|
})]
|
|
209
209
|
});
|
|
210
|
-
});
|
|
210
|
+
});
|
|
211
|
+
export { Component as NModal, Component as default };
|
|
@@ -33,7 +33,7 @@ export declare const nPaginationProps: {
|
|
|
33
33
|
/**
|
|
34
34
|
* The `NPagination` is a styled pagination component.
|
|
35
35
|
*/
|
|
36
|
-
declare const
|
|
36
|
+
declare const Component: import("vue").DefineComponent<{
|
|
37
37
|
/**
|
|
38
38
|
* The page number which is currently selected.
|
|
39
39
|
*/
|
|
@@ -96,4 +96,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
96
96
|
readonly value: number;
|
|
97
97
|
readonly total: number;
|
|
98
98
|
}>;
|
|
99
|
-
export default
|
|
99
|
+
export { Component as NPagination, Component as default };
|
|
@@ -36,7 +36,7 @@ export const nPaginationProps = {
|
|
|
36
36
|
/**
|
|
37
37
|
* The `NPagination` is a styled pagination component.
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
const Component = createComponent('NPagination', nPaginationProps, props => {
|
|
40
40
|
const numbers = computed(() => {
|
|
41
41
|
if (props.total <= 7) {
|
|
42
42
|
return range(1, props.total);
|
|
@@ -95,6 +95,7 @@ export default createComponent('NPagination', nPaginationProps, props => {
|
|
|
95
95
|
"aria-hidden": "true"
|
|
96
96
|
}, null)])]);
|
|
97
97
|
});
|
|
98
|
+
export { Component as NPagination, Component as default };
|
|
98
99
|
function range(from, to) {
|
|
99
100
|
const array = [];
|
|
100
101
|
for (let i = from; i <= to; i++) {
|
|
@@ -35,7 +35,7 @@ export type NSearchbarExposed = {
|
|
|
35
35
|
/**
|
|
36
36
|
* The `NSearchbar` is a styled input with a search icon.
|
|
37
37
|
*/
|
|
38
|
-
declare const
|
|
38
|
+
declare const Component: import("vue").DefineComponent<{
|
|
39
39
|
/**
|
|
40
40
|
* The placeholder of the search-bar.
|
|
41
41
|
*/
|
|
@@ -91,4 +91,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
91
91
|
readonly small: boolean;
|
|
92
92
|
readonly placeholder: string;
|
|
93
93
|
}>;
|
|
94
|
-
export default
|
|
94
|
+
export { Component as NSearchbar, Component as default };
|
package/components/NSearchbar.js
CHANGED
|
@@ -33,7 +33,7 @@ export const nSearchbarProps = {
|
|
|
33
33
|
/**
|
|
34
34
|
* The `NSearchbar` is a styled input with a search icon.
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
const Component = createComponent('NSearchbar', nSearchbarProps, (props, context) => {
|
|
37
37
|
const inputRef = ref();
|
|
38
38
|
const exposed = {
|
|
39
39
|
focus: () => {
|
|
@@ -60,4 +60,5 @@ export default createComponent('NSearchbar', nSearchbarProps, (props, context) =
|
|
|
60
60
|
"onFocus": props.onFocus,
|
|
61
61
|
"onBlur": props.onBlur
|
|
62
62
|
}, null)]);
|
|
63
|
-
});
|
|
63
|
+
});
|
|
64
|
+
export { Component as NSearchbar, Component as default };
|
|
@@ -29,7 +29,7 @@ export declare const nSearchbarListProps: {
|
|
|
29
29
|
/**
|
|
30
30
|
* The `NSearchbarList` is a {@link NSearchbar} with a {@link NSuggestionList}.
|
|
31
31
|
*/
|
|
32
|
-
declare const
|
|
32
|
+
declare const Component: import("vue").DefineComponent<{
|
|
33
33
|
/**
|
|
34
34
|
* @see {@link nSearchbarProps.placeholder}
|
|
35
35
|
*/
|
|
@@ -90,4 +90,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
90
|
readonly maxItems: number;
|
|
91
91
|
readonly hideList: boolean;
|
|
92
92
|
}>;
|
|
93
|
-
export default
|
|
93
|
+
export { Component as NSearchbarList, Component as default };
|
|
@@ -19,7 +19,7 @@ export const nSearchbarListProps = {
|
|
|
19
19
|
/**
|
|
20
20
|
* The `NSearchbarList` is a {@link NSearchbar} with a {@link NSuggestionList}.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
const Component = createComponentWithSlots('NSearchbarList', nSearchbarListProps, ['listItem'], props => {
|
|
23
23
|
const searchbarRef = ref();
|
|
24
24
|
return () => _createVNode(NSuggestionList, _mergeProps(props, {
|
|
25
25
|
"inputValue": props.value || '',
|
|
@@ -37,4 +37,5 @@ export default createComponentWithSlots('NSearchbarList', nSearchbarListProps, [
|
|
|
37
37
|
}, null),
|
|
38
38
|
"onRequestInputFocus": () => searchbarRef.value?.focus()
|
|
39
39
|
}), null);
|
|
40
|
-
});
|
|
40
|
+
});
|
|
41
|
+
export { Component as NSearchbarList, Component as default };
|
package/components/NSelect.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export type NSelectExposed = NValInputExposed;
|
|
|
62
62
|
/**
|
|
63
63
|
* The `NSelect` is a styled html select-input.
|
|
64
64
|
*/
|
|
65
|
-
declare const
|
|
65
|
+
declare const Component: import("vue").DefineComponent<{
|
|
66
66
|
readonly tooltipText: StringConstructor;
|
|
67
67
|
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
68
68
|
readonly tooltipHide: BooleanConstructor;
|
|
@@ -177,4 +177,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
177
|
readonly disabled: boolean;
|
|
178
178
|
readonly optional: boolean;
|
|
179
179
|
}>;
|
|
180
|
-
export default
|
|
180
|
+
export { Component as NSelect, Component as default };
|
package/components/NSelect.js
CHANGED
|
@@ -47,7 +47,7 @@ export const nSelectProps = {
|
|
|
47
47
|
/**
|
|
48
48
|
* The `NSelect` is a styled html select-input.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
const Component = createComponent('NSelect', nSelectProps, (props, context) => {
|
|
51
51
|
const inputRef = ref();
|
|
52
52
|
const exposed = {
|
|
53
53
|
focus: () => inputRef.value?.focus(),
|
|
@@ -85,4 +85,5 @@ export default createComponent('NSelect', nSelectProps, (props, context) => {
|
|
|
85
85
|
}, [option.label]))])]
|
|
86
86
|
})])
|
|
87
87
|
}), null);
|
|
88
|
-
});
|
|
88
|
+
});
|
|
89
|
+
export { Component as NSelect, Component as default };
|
|
@@ -149,7 +149,7 @@ export type SuggestionItem = Identifiable & {
|
|
|
149
149
|
/**
|
|
150
150
|
* The `NSuggestionList` can be added to an input and adds a list below it which is shown when the input is focused.
|
|
151
151
|
*/
|
|
152
|
-
declare const
|
|
152
|
+
declare const Component: import("vue").DefineComponent<{
|
|
153
153
|
/**
|
|
154
154
|
* The slot for the input, which will be enhanced with the suggestion list.
|
|
155
155
|
*/
|
|
@@ -201,7 +201,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
201
201
|
/**
|
|
202
202
|
* The slot for every item of the list.
|
|
203
203
|
*/
|
|
204
|
-
readonly listItem: PropType<(props: ItemSlotProps
|
|
204
|
+
readonly listItem: PropType<(props: ItemSlotProps) => JSX.Element>;
|
|
205
205
|
/**
|
|
206
206
|
* This function is called, when the input and the suggestion list are really blurred.
|
|
207
207
|
* This means, it's not just the input temporarly beeing blurred because the user clicks on the item list,
|
|
@@ -260,7 +260,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
260
260
|
/**
|
|
261
261
|
* The slot for every item of the list.
|
|
262
262
|
*/
|
|
263
|
-
readonly listItem: PropType<(props: ItemSlotProps
|
|
263
|
+
readonly listItem: PropType<(props: ItemSlotProps) => JSX.Element>;
|
|
264
264
|
/**
|
|
265
265
|
* This function is called, when the input and the suggestion list are really blurred.
|
|
266
266
|
* This means, it's not just the input temporarly beeing blurred because the user clicks on the item list,
|
|
@@ -273,4 +273,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
273
273
|
readonly maxItems: number;
|
|
274
274
|
readonly hideList: boolean;
|
|
275
275
|
}>;
|
|
276
|
-
export default
|
|
276
|
+
export { Component as NSuggestionList, Component as default };
|
|
@@ -72,7 +72,7 @@ export const nSuggestionListProps = {
|
|
|
72
72
|
/**
|
|
73
73
|
* The `NSuggestionList` can be added to an input and adds a list below it which is shown when the input is focused.
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
const Component = createComponentWithSlots('NSuggestionList', nSuggestionListProps, ['input', 'listItem'], props => {
|
|
76
76
|
const selectedIndex = ref(null);
|
|
77
77
|
const displayItems = computed(() => props.items.slice(0, props.maxItems));
|
|
78
78
|
const isInFocus = ref(false);
|
|
@@ -153,4 +153,5 @@ export default createComponentWithSlots('NSuggestionList', nSuggestionListProps,
|
|
|
153
153
|
}, null), _createVNode("span", null, [_createTextVNode(" "), trsl('vue-collection.text.loading-search-results')])]) : _createVNode("div", null, [trsl('vue-collection.text.no-search-results', {
|
|
154
154
|
input: props.inputValue
|
|
155
155
|
})])])])])])]);
|
|
156
|
-
});
|
|
156
|
+
});
|
|
157
|
+
export { Component as NSuggestionList, Component as default };
|
package/components/NTable.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export declare const nTableProps: {
|
|
|
85
85
|
/**
|
|
86
86
|
* The `NTable` is a styled html table which accepts data and displays it appropriately.
|
|
87
87
|
*/
|
|
88
|
-
declare const
|
|
88
|
+
declare const Component: import("vue").DefineComponent<{
|
|
89
89
|
/**
|
|
90
90
|
* The headings of the table. These define which columns are shown in the table and in which order.
|
|
91
91
|
*/
|
|
@@ -170,4 +170,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
170
170
|
}>> & {}, {
|
|
171
171
|
readonly items: TableRow[];
|
|
172
172
|
}>;
|
|
173
|
-
export default
|
|
173
|
+
export { Component as NTable, Component as default };
|
package/components/NTable.js
CHANGED
|
@@ -51,7 +51,7 @@ export const nTableProps = {
|
|
|
51
51
|
/**
|
|
52
52
|
* The `NTable` is a styled html table which accepts data and displays it appropriately.
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
const Component = createComponent('NTable', nTableProps, props => {
|
|
55
55
|
const headings = computed(() => {
|
|
56
56
|
// filter out details headings
|
|
57
57
|
const headings = props.headings.filter(heading => !isHeadingDetail(heading));
|
|
@@ -109,6 +109,7 @@ export default createComponent('NTable', nTableProps, props => {
|
|
|
109
109
|
"colspan": headings.value.length - 1
|
|
110
110
|
}, [item[detail.key] && buildItem(item[detail.key])])]))])]))])]);
|
|
111
111
|
});
|
|
112
|
+
export { Component as NTable, Component as default };
|
|
112
113
|
/**
|
|
113
114
|
* Builds a JSX-Element out of the item
|
|
114
115
|
*/
|
|
@@ -26,7 +26,7 @@ export declare const nTableActionProps: {
|
|
|
26
26
|
* The `NTableAction` is a button or {@link RouterLink} which is styled to fit into a table.
|
|
27
27
|
* It is basically styled as an emphasized text in the table.
|
|
28
28
|
*/
|
|
29
|
-
declare const
|
|
29
|
+
declare const Component: import("vue").DefineComponent<{
|
|
30
30
|
/**
|
|
31
31
|
* The route of the action. If set the component will be a {@link RouterLink}.
|
|
32
32
|
*/
|
|
@@ -71,4 +71,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
71
71
|
}>> & {}, {
|
|
72
72
|
readonly type: "button" | "submit" | "reset";
|
|
73
73
|
}>;
|
|
74
|
-
export default
|
|
74
|
+
export { Component as NTableAction, Component as default };
|
|
@@ -28,7 +28,7 @@ export const nTableActionProps = {
|
|
|
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.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
const Component = createComponent('NTableAction', nTableActionProps, (props, {
|
|
32
32
|
slots
|
|
33
33
|
}) => {
|
|
34
34
|
const content = () => slots.default?.() || _createVNode(_Fragment, null, [props.text]);
|
|
@@ -46,4 +46,5 @@ export default createComponent('NTableAction', nTableActionProps, (props, {
|
|
|
46
46
|
"onClick": props.onClick
|
|
47
47
|
}, [content()]);
|
|
48
48
|
};
|
|
49
|
-
});
|
|
49
|
+
});
|
|
50
|
+
export { Component as NTableAction, Component as default };
|
|
@@ -87,7 +87,7 @@ export type NTextAreaExposed = {
|
|
|
87
87
|
*/
|
|
88
88
|
focus(): void;
|
|
89
89
|
};
|
|
90
|
-
declare const
|
|
90
|
+
declare const Component: import("vue").DefineComponent<{
|
|
91
91
|
readonly optional: BooleanConstructor;
|
|
92
92
|
readonly rules: {
|
|
93
93
|
readonly type: PropType<import("../utils/validation").ValidationRule | import("../utils/validation").ValidationRule[]>;
|
|
@@ -264,4 +264,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
264
264
|
readonly disableBlurValidation: boolean;
|
|
265
265
|
readonly resizable: boolean;
|
|
266
266
|
}>;
|
|
267
|
-
export default
|
|
267
|
+
export { Component as NTextArea, Component as default };
|
package/components/NTextArea.js
CHANGED
|
@@ -70,7 +70,7 @@ export const nTextAreaProps = {
|
|
|
70
70
|
...nTextAreaBaseProps,
|
|
71
71
|
...validationProps
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
const Component = createComponent('NTextArea', nTextAreaProps, (props, context) => {
|
|
74
74
|
const textAreaRef = ref();
|
|
75
75
|
const exposed = {
|
|
76
76
|
focus: () => textAreaRef.value?.focus()
|
|
@@ -91,6 +91,7 @@ export default createComponent('NTextArea', nTextAreaProps, (props, context) =>
|
|
|
91
91
|
}), null)
|
|
92
92
|
}), null);
|
|
93
93
|
});
|
|
94
|
+
export { Component as NTextArea, Component as default };
|
|
94
95
|
/**
|
|
95
96
|
* The `NTextArea` wraps the html text area with all the features from {@link NInput} and {@link NValInput}.
|
|
96
97
|
*/
|
package/components/NTooltip.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ export declare function mapTooltipProps(props: ExtractedProps<typeof nToolTipPro
|
|
|
131
131
|
* <NButton />
|
|
132
132
|
* </NTooltip>
|
|
133
133
|
*/
|
|
134
|
-
declare const
|
|
134
|
+
declare const Component: import("vue").DefineComponent<{
|
|
135
135
|
/**
|
|
136
136
|
* The text content of the tooltip.
|
|
137
137
|
*/
|
|
@@ -236,5 +236,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
236
236
|
readonly placement: TooltipPlacement;
|
|
237
237
|
readonly maxWidth: TWMaxWidth;
|
|
238
238
|
}>;
|
|
239
|
-
export default
|
|
239
|
+
export { Component as NTooltip, Component as default };
|
|
240
240
|
export type TooltipPlacement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
package/components/NTooltip.js
CHANGED
|
@@ -130,7 +130,7 @@ export function mapTooltipProps(props) {
|
|
|
130
130
|
* <NButton />
|
|
131
131
|
* </NTooltip>
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
const Component = createComponent('NTooltip', nTooltipProps, (props, {
|
|
134
134
|
slots
|
|
135
135
|
}) => {
|
|
136
136
|
return () => _createVNode("div", {
|
|
@@ -139,6 +139,7 @@ export default createComponent('NTooltip', nTooltipProps, (props, {
|
|
|
139
139
|
default: () => [slots.default?.()]
|
|
140
140
|
}) : slots.default?.()]);
|
|
141
141
|
});
|
|
142
|
+
export { Component as NTooltip, Component as default };
|
|
142
143
|
const NTooltipBase = createComponent('NTooltipBase', nTooltipProps, (props, {
|
|
143
144
|
slots
|
|
144
145
|
}) => {
|
|
@@ -138,7 +138,7 @@ export type NValInputExposed = {
|
|
|
138
138
|
/**
|
|
139
139
|
* The `NValInput` is a `NInput` with custom validation.
|
|
140
140
|
*/
|
|
141
|
-
declare const
|
|
141
|
+
declare const Component: import("vue").DefineComponent<{
|
|
142
142
|
/**
|
|
143
143
|
* A slot to replace the input.
|
|
144
144
|
*/
|
|
@@ -306,4 +306,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
306
306
|
readonly hideErrorMessage: boolean;
|
|
307
307
|
readonly disableBlurValidation: boolean;
|
|
308
308
|
}>;
|
|
309
|
-
export default
|
|
309
|
+
export { Component as NValInput, Component as default };
|
package/components/NValInput.js
CHANGED
|
@@ -53,7 +53,7 @@ export const nValInputProps = {
|
|
|
53
53
|
/**
|
|
54
54
|
* The `NValInput` is a `NInput` with custom validation.
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
const Component = createComponentWithSlots('NValInput', nValInputProps, ['input'], (props, context) => {
|
|
57
57
|
const rules = computed(() => {
|
|
58
58
|
const otherRules = Array.isArray(props.rules) ? props.rules : [props.rules];
|
|
59
59
|
return props.optional ? otherRules : [required, ...otherRules];
|
|
@@ -101,4 +101,5 @@ export default createComponentWithSlots('NValInput', nValInputProps, ['input'],
|
|
|
101
101
|
}), null), showErrorMessage.value && _createVNode("p", {
|
|
102
102
|
"class": "text-red-500 text-xs mt-1"
|
|
103
103
|
}, [errorMessage.value])]);
|
|
104
|
-
});
|
|
104
|
+
});
|
|
105
|
+
export { Component as NValInput, Component as default };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@naptics/vue-collection",
|
|
3
3
|
"author": "Timo Siegenthaler",
|
|
4
4
|
"description": "Vue Collection is a collection of styled and fully functional Vue components which can easily be integrated into our projects.",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.4",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|