@naptics/vue-collection 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/components/NAlert.d.ts +20 -20
- package/components/NAlert.js +3 -3
- package/components/NBadge.d.ts +87 -87
- package/components/NBadge.js +3 -3
- package/components/NBreadcrub.d.ts +57 -57
- package/components/NBreadcrub.js +3 -3
- package/components/NButton.d.ts +69 -69
- package/components/NButton.js +3 -3
- package/components/NCheckbox.d.ts +20 -20
- package/components/NCheckbox.js +3 -3
- package/components/NCheckboxLabel.d.ts +30 -30
- package/components/NCheckboxLabel.js +3 -3
- package/components/NCrudModal.d.ts +238 -203
- package/components/NCrudModal.js +17 -4
- package/components/NDialog.d.ts +1 -1
- package/components/NDialog.js +3 -3
- package/components/NDropdown.d.ts +25 -25
- package/components/NDropdown.js +3 -3
- package/components/NDropzone.d.ts +52 -52
- package/components/NDropzone.js +3 -3
- package/components/NForm.d.ts +6 -6
- package/components/NForm.js +3 -3
- package/components/NFormModal.d.ts +136 -136
- package/components/NFormModal.js +3 -3
- package/components/NIconButton.d.ts +94 -94
- package/components/NIconButton.js +3 -3
- package/components/NIconCircle.d.ts +46 -46
- package/components/NIconCircle.js +3 -3
- package/components/NInput.d.ts +94 -94
- package/components/NInput.js +3 -3
- package/components/NInputPhone.d.ts +125 -125
- package/components/NInputPhone.js +2 -2
- package/components/NInputSelect.d.ts +131 -131
- package/components/NInputSelect.js +3 -3
- package/components/NInputSuggestion.d.ts +179 -167
- package/components/NInputSuggestion.js +3 -3
- package/components/NLink.d.ts +32 -32
- package/components/NLink.js +3 -3
- package/components/NList.d.ts +10 -10
- package/components/NList.js +3 -3
- package/components/NLoadingIndicator.d.ts +30 -30
- package/components/NLoadingIndicator.js +3 -3
- package/components/NModal.d.ts +118 -118
- package/components/NModal.js +3 -3
- package/components/NPagination.d.ts +30 -30
- package/components/NPagination.js +3 -3
- package/components/NSearchbar.d.ts +29 -29
- package/components/NSearchbar.js +3 -3
- package/components/NSearchbarList.d.ts +53 -62
- package/components/NSearchbarList.js +3 -3
- package/components/NSelect.d.ts +64 -64
- package/components/NSelect.js +3 -3
- package/components/NSuggestionList.d.ts +84 -84
- package/components/NSuggestionList.js +7 -7
- package/components/NTable.d.ts +29 -29
- package/components/NTable.js +3 -3
- package/components/NTableAction.d.ts +19 -19
- package/components/NTableAction.js +3 -3
- package/components/NTextArea.d.ts +118 -118
- package/components/NTextArea.js +5 -5
- package/components/NTooltip.d.ts +42 -42
- package/components/NTooltip.js +3 -3
- package/components/NValInput.d.ts +134 -134
- package/components/NValInput.js +5 -5
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +3 -1
- package/utils/breakpoints.d.ts +3 -0
- package/utils/breakpoints.js +3 -0
- package/utils/component.d.ts +0 -8
- package/utils/component.js +0 -10
- package/utils/identifiable.d.ts +8 -8
- package/utils/identifiable.js +4 -2
- package/utils/tailwind.d.ts +2 -0
- package/utils/utils.d.ts +25 -12
- package/utils/utils.js +30 -9
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ const smallSizes = '1|2|3|4|5|6|7|8|9|10|11|12|14|16|18|20'
|
|
|
60
60
|
|
|
61
61
|
/** @type {import('tailwindcss').Config} */
|
|
62
62
|
module.exports = {
|
|
63
|
-
content: ['./src/**/*.{tsx,ts}', './node_modules/@naptics/vue-collection/**/*.
|
|
63
|
+
content: ['./src/**/*.{tsx,ts}', './node_modules/@naptics/vue-collection/**/*.js'],
|
|
64
64
|
safelist: [
|
|
65
65
|
{
|
|
66
66
|
pattern: new RegExp(`^(bg|text)-(${usedColors})-(${allShades})$`),
|
package/components/NAlert.d.ts
CHANGED
|
@@ -4,22 +4,22 @@ export declare const nAlertProps: {
|
|
|
4
4
|
/**
|
|
5
5
|
* The variant of the alert. This defines its color and icon.
|
|
6
6
|
*/
|
|
7
|
-
variant: {
|
|
8
|
-
type: PropType<AlertVariant>;
|
|
9
|
-
default:
|
|
7
|
+
readonly variant: {
|
|
8
|
+
readonly type: PropType<AlertVariant>;
|
|
9
|
+
readonly default: "success";
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* The text of the alert.
|
|
13
13
|
*/
|
|
14
|
-
text: StringConstructor;
|
|
14
|
+
readonly text: StringConstructor;
|
|
15
15
|
/**
|
|
16
16
|
* If set to `true` the X-button of the alert is hidden.
|
|
17
17
|
*/
|
|
18
|
-
hideX: BooleanConstructor;
|
|
18
|
+
readonly hideX: BooleanConstructor;
|
|
19
19
|
/**
|
|
20
20
|
* This is called, when the X-button is clicked.
|
|
21
21
|
*/
|
|
22
|
-
onDismiss: PropType<() => void>;
|
|
22
|
+
readonly onDismiss: PropType<() => void>;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* The `NAlert` is a fully styled alert with multiple variants.
|
|
@@ -29,44 +29,44 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
/**
|
|
30
30
|
* The variant of the alert. This defines its color and icon.
|
|
31
31
|
*/
|
|
32
|
-
variant: {
|
|
33
|
-
type: PropType<AlertVariant>;
|
|
34
|
-
default:
|
|
32
|
+
readonly variant: {
|
|
33
|
+
readonly type: PropType<AlertVariant>;
|
|
34
|
+
readonly default: "success";
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* The text of the alert.
|
|
38
38
|
*/
|
|
39
|
-
text: StringConstructor;
|
|
39
|
+
readonly text: StringConstructor;
|
|
40
40
|
/**
|
|
41
41
|
* If set to `true` the X-button of the alert is hidden.
|
|
42
42
|
*/
|
|
43
|
-
hideX: BooleanConstructor;
|
|
43
|
+
readonly hideX: BooleanConstructor;
|
|
44
44
|
/**
|
|
45
45
|
* This is called, when the X-button is clicked.
|
|
46
46
|
*/
|
|
47
|
-
onDismiss: PropType<() => void>;
|
|
47
|
+
readonly onDismiss: PropType<() => void>;
|
|
48
48
|
}, 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<{
|
|
49
49
|
/**
|
|
50
50
|
* The variant of the alert. This defines its color and icon.
|
|
51
51
|
*/
|
|
52
|
-
variant: {
|
|
53
|
-
type: PropType<AlertVariant>;
|
|
54
|
-
default:
|
|
52
|
+
readonly variant: {
|
|
53
|
+
readonly type: PropType<AlertVariant>;
|
|
54
|
+
readonly default: "success";
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* The text of the alert.
|
|
58
58
|
*/
|
|
59
|
-
text: StringConstructor;
|
|
59
|
+
readonly text: StringConstructor;
|
|
60
60
|
/**
|
|
61
61
|
* If set to `true` the X-button of the alert is hidden.
|
|
62
62
|
*/
|
|
63
|
-
hideX: BooleanConstructor;
|
|
63
|
+
readonly hideX: BooleanConstructor;
|
|
64
64
|
/**
|
|
65
65
|
* This is called, when the X-button is clicked.
|
|
66
66
|
*/
|
|
67
|
-
onDismiss: PropType<() => void>;
|
|
67
|
+
readonly onDismiss: PropType<() => void>;
|
|
68
68
|
}>> & {}, {
|
|
69
|
-
variant: AlertVariant;
|
|
70
|
-
hideX: boolean;
|
|
69
|
+
readonly variant: AlertVariant;
|
|
70
|
+
readonly hideX: boolean;
|
|
71
71
|
}>;
|
|
72
72
|
export default _default;
|
package/components/NAlert.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
|
2
|
-
import { createComponent
|
|
2
|
+
import { createComponent } from '../utils/component';
|
|
3
3
|
import { CheckCircleIcon, ExclamationCircleIcon, InformationCircleIcon, XMarkIcon } from '@heroicons/vue/24/solid';
|
|
4
4
|
import { computed } from 'vue';
|
|
5
5
|
import NIconButton from './NIconButton';
|
|
6
6
|
import NLoadingIndicator from './NLoadingIndicator';
|
|
7
|
-
export const nAlertProps =
|
|
7
|
+
export const nAlertProps = {
|
|
8
8
|
/**
|
|
9
9
|
* The variant of the alert. This defines its color and icon.
|
|
10
10
|
*/
|
|
@@ -24,7 +24,7 @@ export const nAlertProps = createProps({
|
|
|
24
24
|
* This is called, when the X-button is clicked.
|
|
25
25
|
*/
|
|
26
26
|
onDismiss: Function
|
|
27
|
-
}
|
|
27
|
+
};
|
|
28
28
|
/**
|
|
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.
|
package/components/NBadge.d.ts
CHANGED
|
@@ -1,174 +1,174 @@
|
|
|
1
1
|
import type { TWTextSize } from '../utils/tailwind';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
export declare const nBadgeProps: {
|
|
4
|
-
tooltipText: StringConstructor;
|
|
5
|
-
tooltipContent: PropType<() => void>;
|
|
6
|
-
tooltipHide: BooleanConstructor;
|
|
7
|
-
tooltipShow: BooleanConstructor;
|
|
8
|
-
tooltipPlacement: {
|
|
9
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
10
|
-
default:
|
|
4
|
+
readonly tooltipText: StringConstructor;
|
|
5
|
+
readonly tooltipContent: PropType<() => void>;
|
|
6
|
+
readonly tooltipHide: BooleanConstructor;
|
|
7
|
+
readonly tooltipShow: BooleanConstructor;
|
|
8
|
+
readonly tooltipPlacement: {
|
|
9
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
10
|
+
readonly default: "auto";
|
|
11
11
|
};
|
|
12
|
-
tooltipMaxWidth: {
|
|
13
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
14
|
-
default:
|
|
12
|
+
readonly tooltipMaxWidth: {
|
|
13
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
14
|
+
readonly default: "max-w-xs";
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* The text of the badge. Can alternatively be passed in the default slot.
|
|
18
18
|
*/
|
|
19
|
-
text: StringConstructor;
|
|
19
|
+
readonly text: StringConstructor;
|
|
20
20
|
/**
|
|
21
21
|
* The text size, a standard tailwind text-size class.
|
|
22
22
|
*/
|
|
23
|
-
textSize: {
|
|
24
|
-
type: PropType<TWTextSize>;
|
|
25
|
-
default:
|
|
23
|
+
readonly textSize: {
|
|
24
|
+
readonly type: PropType<TWTextSize>;
|
|
25
|
+
readonly default: "text-sm";
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* The color of the badge.
|
|
29
29
|
*/
|
|
30
|
-
color: {
|
|
31
|
-
type: StringConstructor;
|
|
32
|
-
default:
|
|
30
|
+
readonly color: {
|
|
31
|
+
readonly type: StringConstructor;
|
|
32
|
+
readonly default: "primary";
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* The background shade of the badge.
|
|
36
36
|
*/
|
|
37
|
-
shade: {
|
|
38
|
-
type: NumberConstructor;
|
|
39
|
-
default:
|
|
37
|
+
readonly shade: {
|
|
38
|
+
readonly type: NumberConstructor;
|
|
39
|
+
readonly default: 200;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* The text shade of the badge.
|
|
43
43
|
*/
|
|
44
|
-
textShade: {
|
|
45
|
-
type: NumberConstructor;
|
|
46
|
-
default:
|
|
44
|
+
readonly textShade: {
|
|
45
|
+
readonly type: NumberConstructor;
|
|
46
|
+
readonly default: 900;
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
49
|
* If set to `true` the badges text is all-caps. Default is `true`.
|
|
50
50
|
*/
|
|
51
|
-
allCaps: {
|
|
52
|
-
type: BooleanConstructor;
|
|
53
|
-
default:
|
|
51
|
+
readonly allCaps: {
|
|
52
|
+
readonly type: BooleanConstructor;
|
|
53
|
+
readonly default: true;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* The `NBadge` is a styled element to wrap a text.
|
|
58
58
|
*/
|
|
59
59
|
declare const _default: import("vue").DefineComponent<{
|
|
60
|
-
tooltipText: StringConstructor;
|
|
61
|
-
tooltipContent: PropType<() => void>;
|
|
62
|
-
tooltipHide: BooleanConstructor;
|
|
63
|
-
tooltipShow: BooleanConstructor;
|
|
64
|
-
tooltipPlacement: {
|
|
65
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
66
|
-
default:
|
|
60
|
+
readonly tooltipText: StringConstructor;
|
|
61
|
+
readonly tooltipContent: PropType<() => void>;
|
|
62
|
+
readonly tooltipHide: BooleanConstructor;
|
|
63
|
+
readonly tooltipShow: BooleanConstructor;
|
|
64
|
+
readonly tooltipPlacement: {
|
|
65
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
66
|
+
readonly default: "auto";
|
|
67
67
|
};
|
|
68
|
-
tooltipMaxWidth: {
|
|
69
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
70
|
-
default:
|
|
68
|
+
readonly tooltipMaxWidth: {
|
|
69
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
70
|
+
readonly default: "max-w-xs";
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
73
73
|
* The text of the badge. Can alternatively be passed in the default slot.
|
|
74
74
|
*/
|
|
75
|
-
text: StringConstructor;
|
|
75
|
+
readonly text: StringConstructor;
|
|
76
76
|
/**
|
|
77
77
|
* The text size, a standard tailwind text-size class.
|
|
78
78
|
*/
|
|
79
|
-
textSize: {
|
|
80
|
-
type: PropType<TWTextSize>;
|
|
81
|
-
default:
|
|
79
|
+
readonly textSize: {
|
|
80
|
+
readonly type: PropType<TWTextSize>;
|
|
81
|
+
readonly default: "text-sm";
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
84
84
|
* The color of the badge.
|
|
85
85
|
*/
|
|
86
|
-
color: {
|
|
87
|
-
type: StringConstructor;
|
|
88
|
-
default:
|
|
86
|
+
readonly color: {
|
|
87
|
+
readonly type: StringConstructor;
|
|
88
|
+
readonly default: "primary";
|
|
89
89
|
};
|
|
90
90
|
/**
|
|
91
91
|
* The background shade of the badge.
|
|
92
92
|
*/
|
|
93
|
-
shade: {
|
|
94
|
-
type: NumberConstructor;
|
|
95
|
-
default:
|
|
93
|
+
readonly shade: {
|
|
94
|
+
readonly type: NumberConstructor;
|
|
95
|
+
readonly default: 200;
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
98
98
|
* The text shade of the badge.
|
|
99
99
|
*/
|
|
100
|
-
textShade: {
|
|
101
|
-
type: NumberConstructor;
|
|
102
|
-
default:
|
|
100
|
+
readonly textShade: {
|
|
101
|
+
readonly type: NumberConstructor;
|
|
102
|
+
readonly default: 900;
|
|
103
103
|
};
|
|
104
104
|
/**
|
|
105
105
|
* If set to `true` the badges text is all-caps. Default is `true`.
|
|
106
106
|
*/
|
|
107
|
-
allCaps: {
|
|
108
|
-
type: BooleanConstructor;
|
|
109
|
-
default:
|
|
107
|
+
readonly allCaps: {
|
|
108
|
+
readonly type: BooleanConstructor;
|
|
109
|
+
readonly default: true;
|
|
110
110
|
};
|
|
111
111
|
}, 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<{
|
|
112
|
-
tooltipText: StringConstructor;
|
|
113
|
-
tooltipContent: PropType<() => void>;
|
|
114
|
-
tooltipHide: BooleanConstructor;
|
|
115
|
-
tooltipShow: BooleanConstructor;
|
|
116
|
-
tooltipPlacement: {
|
|
117
|
-
type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
118
|
-
default:
|
|
112
|
+
readonly tooltipText: StringConstructor;
|
|
113
|
+
readonly tooltipContent: PropType<() => void>;
|
|
114
|
+
readonly tooltipHide: BooleanConstructor;
|
|
115
|
+
readonly tooltipShow: BooleanConstructor;
|
|
116
|
+
readonly tooltipPlacement: {
|
|
117
|
+
readonly type: PropType<import("./NTooltip").TooltipPlacement>;
|
|
118
|
+
readonly default: "auto";
|
|
119
119
|
};
|
|
120
|
-
tooltipMaxWidth: {
|
|
121
|
-
type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
122
|
-
default:
|
|
120
|
+
readonly tooltipMaxWidth: {
|
|
121
|
+
readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
|
|
122
|
+
readonly default: "max-w-xs";
|
|
123
123
|
};
|
|
124
124
|
/**
|
|
125
125
|
* The text of the badge. Can alternatively be passed in the default slot.
|
|
126
126
|
*/
|
|
127
|
-
text: StringConstructor;
|
|
127
|
+
readonly text: StringConstructor;
|
|
128
128
|
/**
|
|
129
129
|
* The text size, a standard tailwind text-size class.
|
|
130
130
|
*/
|
|
131
|
-
textSize: {
|
|
132
|
-
type: PropType<TWTextSize>;
|
|
133
|
-
default:
|
|
131
|
+
readonly textSize: {
|
|
132
|
+
readonly type: PropType<TWTextSize>;
|
|
133
|
+
readonly default: "text-sm";
|
|
134
134
|
};
|
|
135
135
|
/**
|
|
136
136
|
* The color of the badge.
|
|
137
137
|
*/
|
|
138
|
-
color: {
|
|
139
|
-
type: StringConstructor;
|
|
140
|
-
default:
|
|
138
|
+
readonly color: {
|
|
139
|
+
readonly type: StringConstructor;
|
|
140
|
+
readonly default: "primary";
|
|
141
141
|
};
|
|
142
142
|
/**
|
|
143
143
|
* The background shade of the badge.
|
|
144
144
|
*/
|
|
145
|
-
shade: {
|
|
146
|
-
type: NumberConstructor;
|
|
147
|
-
default:
|
|
145
|
+
readonly shade: {
|
|
146
|
+
readonly type: NumberConstructor;
|
|
147
|
+
readonly default: 200;
|
|
148
148
|
};
|
|
149
149
|
/**
|
|
150
150
|
* The text shade of the badge.
|
|
151
151
|
*/
|
|
152
|
-
textShade: {
|
|
153
|
-
type: NumberConstructor;
|
|
154
|
-
default:
|
|
152
|
+
readonly textShade: {
|
|
153
|
+
readonly type: NumberConstructor;
|
|
154
|
+
readonly default: 900;
|
|
155
155
|
};
|
|
156
156
|
/**
|
|
157
157
|
* If set to `true` the badges text is all-caps. Default is `true`.
|
|
158
158
|
*/
|
|
159
|
-
allCaps: {
|
|
160
|
-
type: BooleanConstructor;
|
|
161
|
-
default:
|
|
159
|
+
readonly allCaps: {
|
|
160
|
+
readonly type: BooleanConstructor;
|
|
161
|
+
readonly default: true;
|
|
162
162
|
};
|
|
163
163
|
}>> & {}, {
|
|
164
|
-
color: string;
|
|
165
|
-
shade: number;
|
|
166
|
-
tooltipHide: boolean;
|
|
167
|
-
tooltipShow: boolean;
|
|
168
|
-
tooltipPlacement: import("./NTooltip").TooltipPlacement;
|
|
169
|
-
tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
170
|
-
textSize: TWTextSize;
|
|
171
|
-
textShade: number;
|
|
172
|
-
allCaps: boolean;
|
|
164
|
+
readonly color: string;
|
|
165
|
+
readonly shade: number;
|
|
166
|
+
readonly tooltipHide: boolean;
|
|
167
|
+
readonly tooltipShow: boolean;
|
|
168
|
+
readonly tooltipPlacement: import("./NTooltip").TooltipPlacement;
|
|
169
|
+
readonly tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
|
|
170
|
+
readonly textSize: TWTextSize;
|
|
171
|
+
readonly textShade: number;
|
|
172
|
+
readonly allCaps: boolean;
|
|
173
173
|
}>;
|
|
174
174
|
export default _default;
|
package/components/NBadge.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
|
2
|
-
import { createComponent
|
|
2
|
+
import { createComponent } from '../utils/component';
|
|
3
3
|
import NTooltip, { mapTooltipProps, nToolTipPropsForImplementor } from './NTooltip';
|
|
4
|
-
export const nBadgeProps =
|
|
4
|
+
export const nBadgeProps = {
|
|
5
5
|
/**
|
|
6
6
|
* The text of the badge. Can alternatively be passed in the default slot.
|
|
7
7
|
*/
|
|
@@ -42,7 +42,7 @@ export const nBadgeProps = createProps({
|
|
|
42
42
|
default: true
|
|
43
43
|
},
|
|
44
44
|
...nToolTipPropsForImplementor
|
|
45
|
-
}
|
|
45
|
+
};
|
|
46
46
|
/**
|
|
47
47
|
* The `NBadge` is a styled element to wrap a text.
|
|
48
48
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HeroIcon } from '../utils/
|
|
1
|
+
import type { HeroIcon } from '../utils/tailwind';
|
|
2
2
|
import type { TWTextSize } from '../utils/tailwind';
|
|
3
3
|
import type { PropType } from 'vue';
|
|
4
4
|
import type { RouteLocationRaw } from 'vue-router';
|
|
@@ -6,47 +6,47 @@ export declare const nBreadcrumbProps: {
|
|
|
6
6
|
/**
|
|
7
7
|
* The items of the breadcrumb.
|
|
8
8
|
*/
|
|
9
|
-
items: {
|
|
10
|
-
type: PropType<BreadcrumbItem[]>;
|
|
11
|
-
default: () => never[];
|
|
9
|
+
readonly items: {
|
|
10
|
+
readonly type: PropType<BreadcrumbItem[]>;
|
|
11
|
+
readonly default: () => never[];
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* The color of the breadcrumbs text and icons.
|
|
15
15
|
*/
|
|
16
|
-
color: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
default:
|
|
16
|
+
readonly color: {
|
|
17
|
+
readonly type: StringConstructor;
|
|
18
|
+
readonly default: "primary";
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* The text-size of the breadcrumb labels.
|
|
22
22
|
*/
|
|
23
|
-
textSize: {
|
|
24
|
-
type: PropType<TWTextSize>;
|
|
25
|
-
default:
|
|
23
|
+
readonly textSize: {
|
|
24
|
+
readonly type: PropType<TWTextSize>;
|
|
25
|
+
readonly default: "text-base";
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* The icon which is used as a seperator between two breadcrumb items.
|
|
29
29
|
*/
|
|
30
|
-
icon: {
|
|
31
|
-
type: PropType<HeroIcon>;
|
|
32
|
-
default: import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}>;
|
|
30
|
+
readonly icon: {
|
|
31
|
+
readonly type: PropType<HeroIcon>;
|
|
32
|
+
readonly default: import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}>;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* The size of the icon in tailwind units.
|
|
36
36
|
*/
|
|
37
|
-
iconSize: {
|
|
38
|
-
type: NumberConstructor;
|
|
39
|
-
default:
|
|
37
|
+
readonly iconSize: {
|
|
38
|
+
readonly type: NumberConstructor;
|
|
39
|
+
readonly default: 5;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* A slot the replace the breadcrumb labels.
|
|
43
43
|
*/
|
|
44
|
-
item: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
44
|
+
readonly item: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
45
45
|
/**
|
|
46
46
|
* A slot to replace the separators between the breadcrumb labels.
|
|
47
47
|
* The passsed item is the item before the seperator.
|
|
48
48
|
*/
|
|
49
|
-
seperator: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
49
|
+
readonly seperator: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
50
50
|
};
|
|
51
51
|
export type BreadcrumbItem = {
|
|
52
52
|
/**
|
|
@@ -65,97 +65,97 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
65
65
|
/**
|
|
66
66
|
* The items of the breadcrumb.
|
|
67
67
|
*/
|
|
68
|
-
items: {
|
|
69
|
-
type: PropType<BreadcrumbItem[]>;
|
|
70
|
-
default: () => never[];
|
|
68
|
+
readonly items: {
|
|
69
|
+
readonly type: PropType<BreadcrumbItem[]>;
|
|
70
|
+
readonly default: () => never[];
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
73
73
|
* The color of the breadcrumbs text and icons.
|
|
74
74
|
*/
|
|
75
|
-
color: {
|
|
76
|
-
type: StringConstructor;
|
|
77
|
-
default:
|
|
75
|
+
readonly color: {
|
|
76
|
+
readonly type: StringConstructor;
|
|
77
|
+
readonly default: "primary";
|
|
78
78
|
};
|
|
79
79
|
/**
|
|
80
80
|
* The text-size of the breadcrumb labels.
|
|
81
81
|
*/
|
|
82
|
-
textSize: {
|
|
83
|
-
type: PropType<TWTextSize>;
|
|
84
|
-
default:
|
|
82
|
+
readonly textSize: {
|
|
83
|
+
readonly type: PropType<TWTextSize>;
|
|
84
|
+
readonly default: "text-base";
|
|
85
85
|
};
|
|
86
86
|
/**
|
|
87
87
|
* The icon which is used as a seperator between two breadcrumb items.
|
|
88
88
|
*/
|
|
89
|
-
icon: {
|
|
90
|
-
type: PropType<HeroIcon>;
|
|
91
|
-
default: import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}>;
|
|
89
|
+
readonly icon: {
|
|
90
|
+
readonly type: PropType<HeroIcon>;
|
|
91
|
+
readonly default: import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}>;
|
|
92
92
|
};
|
|
93
93
|
/**
|
|
94
94
|
* The size of the icon in tailwind units.
|
|
95
95
|
*/
|
|
96
|
-
iconSize: {
|
|
97
|
-
type: NumberConstructor;
|
|
98
|
-
default:
|
|
96
|
+
readonly iconSize: {
|
|
97
|
+
readonly type: NumberConstructor;
|
|
98
|
+
readonly default: 5;
|
|
99
99
|
};
|
|
100
100
|
/**
|
|
101
101
|
* A slot the replace the breadcrumb labels.
|
|
102
102
|
*/
|
|
103
|
-
item: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
103
|
+
readonly item: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
104
104
|
/**
|
|
105
105
|
* A slot to replace the separators between the breadcrumb labels.
|
|
106
106
|
* The passsed item is the item before the seperator.
|
|
107
107
|
*/
|
|
108
|
-
seperator: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
108
|
+
readonly seperator: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
109
109
|
}, 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<{
|
|
110
110
|
/**
|
|
111
111
|
* The items of the breadcrumb.
|
|
112
112
|
*/
|
|
113
|
-
items: {
|
|
114
|
-
type: PropType<BreadcrumbItem[]>;
|
|
115
|
-
default: () => never[];
|
|
113
|
+
readonly items: {
|
|
114
|
+
readonly type: PropType<BreadcrumbItem[]>;
|
|
115
|
+
readonly default: () => never[];
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
118
118
|
* The color of the breadcrumbs text and icons.
|
|
119
119
|
*/
|
|
120
|
-
color: {
|
|
121
|
-
type: StringConstructor;
|
|
122
|
-
default:
|
|
120
|
+
readonly color: {
|
|
121
|
+
readonly type: StringConstructor;
|
|
122
|
+
readonly default: "primary";
|
|
123
123
|
};
|
|
124
124
|
/**
|
|
125
125
|
* The text-size of the breadcrumb labels.
|
|
126
126
|
*/
|
|
127
|
-
textSize: {
|
|
128
|
-
type: PropType<TWTextSize>;
|
|
129
|
-
default:
|
|
127
|
+
readonly textSize: {
|
|
128
|
+
readonly type: PropType<TWTextSize>;
|
|
129
|
+
readonly default: "text-base";
|
|
130
130
|
};
|
|
131
131
|
/**
|
|
132
132
|
* The icon which is used as a seperator between two breadcrumb items.
|
|
133
133
|
*/
|
|
134
|
-
icon: {
|
|
135
|
-
type: PropType<HeroIcon>;
|
|
136
|
-
default: import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}>;
|
|
134
|
+
readonly icon: {
|
|
135
|
+
readonly type: PropType<HeroIcon>;
|
|
136
|
+
readonly default: import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}>;
|
|
137
137
|
};
|
|
138
138
|
/**
|
|
139
139
|
* The size of the icon in tailwind units.
|
|
140
140
|
*/
|
|
141
|
-
iconSize: {
|
|
142
|
-
type: NumberConstructor;
|
|
143
|
-
default:
|
|
141
|
+
readonly iconSize: {
|
|
142
|
+
readonly type: NumberConstructor;
|
|
143
|
+
readonly default: 5;
|
|
144
144
|
};
|
|
145
145
|
/**
|
|
146
146
|
* A slot the replace the breadcrumb labels.
|
|
147
147
|
*/
|
|
148
|
-
item: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
148
|
+
readonly item: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
149
149
|
/**
|
|
150
150
|
* A slot to replace the separators between the breadcrumb labels.
|
|
151
151
|
* The passsed item is the item before the seperator.
|
|
152
152
|
*/
|
|
153
|
-
seperator: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
153
|
+
readonly seperator: PropType<(item: BreadcrumbItem, index: number) => JSX.Element>;
|
|
154
154
|
}>> & {}, {
|
|
155
|
-
color: string;
|
|
156
|
-
icon: HeroIcon;
|
|
157
|
-
textSize: TWTextSize;
|
|
158
|
-
items: BreadcrumbItem[];
|
|
159
|
-
iconSize: number;
|
|
155
|
+
readonly color: string;
|
|
156
|
+
readonly icon: HeroIcon;
|
|
157
|
+
readonly textSize: TWTextSize;
|
|
158
|
+
readonly items: BreadcrumbItem[];
|
|
159
|
+
readonly iconSize: number;
|
|
160
160
|
}>;
|
|
161
161
|
export default _default;
|
package/components/NBreadcrub.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createVNode as _createVNode, Fragment as _Fragment } from "vue";
|
|
2
|
-
import { createComponent
|
|
2
|
+
import { createComponent } from '../utils/component';
|
|
3
3
|
import { ChevronRightIcon } from '@heroicons/vue/24/solid';
|
|
4
4
|
import NLink from './NLink';
|
|
5
|
-
export const nBreadcrumbProps =
|
|
5
|
+
export const nBreadcrumbProps = {
|
|
6
6
|
/**
|
|
7
7
|
* The items of the breadcrumb.
|
|
8
8
|
*/
|
|
@@ -47,7 +47,7 @@ export const nBreadcrumbProps = createProps({
|
|
|
47
47
|
* The passsed item is the item before the seperator.
|
|
48
48
|
*/
|
|
49
49
|
seperator: Function
|
|
50
|
-
}
|
|
50
|
+
};
|
|
51
51
|
/**
|
|
52
52
|
* The `NBreadcrumb` is a styled breadcrumb which can be used as a navigation in hierarchical views.
|
|
53
53
|
*/
|