@naptics/vue-collection 0.0.6 → 0.1.0

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.
Files changed (77) hide show
  1. package/README.md +8 -6
  2. package/components/NAlert.d.ts +20 -20
  3. package/components/NAlert.js +3 -3
  4. package/components/NBadge.d.ts +87 -87
  5. package/components/NBadge.js +3 -3
  6. package/components/NBreadcrub.d.ts +57 -57
  7. package/components/NBreadcrub.js +3 -3
  8. package/components/NButton.d.ts +69 -69
  9. package/components/NButton.js +3 -3
  10. package/components/NCheckbox.d.ts +20 -20
  11. package/components/NCheckbox.js +3 -3
  12. package/components/NCheckboxLabel.d.ts +30 -30
  13. package/components/NCheckboxLabel.js +3 -3
  14. package/components/NCrudModal.d.ts +238 -203
  15. package/components/NCrudModal.js +17 -4
  16. package/components/NDialog.d.ts +1 -1
  17. package/components/NDialog.js +3 -3
  18. package/components/NDropdown.d.ts +25 -25
  19. package/components/NDropdown.js +3 -3
  20. package/components/NDropzone.d.ts +52 -52
  21. package/components/NDropzone.js +3 -3
  22. package/components/NForm.d.ts +6 -6
  23. package/components/NForm.js +3 -3
  24. package/components/NFormModal.d.ts +136 -136
  25. package/components/NFormModal.js +3 -3
  26. package/components/NIconButton.d.ts +100 -94
  27. package/components/NIconButton.js +3 -3
  28. package/components/NIconCircle.d.ts +46 -46
  29. package/components/NIconCircle.js +3 -3
  30. package/components/NInput.d.ts +94 -94
  31. package/components/NInput.js +3 -3
  32. package/components/NInputPhone.d.ts +125 -125
  33. package/components/NInputPhone.js +2 -2
  34. package/components/NInputSelect.d.ts +131 -131
  35. package/components/NInputSelect.js +3 -3
  36. package/components/NInputSuggestion.d.ts +179 -167
  37. package/components/NInputSuggestion.js +3 -3
  38. package/components/NLink.d.ts +32 -32
  39. package/components/NLink.js +3 -3
  40. package/components/NList.d.ts +10 -10
  41. package/components/NList.js +3 -3
  42. package/components/NLoadingIndicator.d.ts +30 -30
  43. package/components/NLoadingIndicator.js +3 -3
  44. package/components/NModal.d.ts +118 -118
  45. package/components/NModal.js +3 -3
  46. package/components/NPagination.d.ts +30 -30
  47. package/components/NPagination.js +3 -3
  48. package/components/NSearchbar.d.ts +29 -29
  49. package/components/NSearchbar.js +3 -3
  50. package/components/NSearchbarList.d.ts +53 -62
  51. package/components/NSearchbarList.js +3 -3
  52. package/components/NSelect.d.ts +64 -64
  53. package/components/NSelect.js +3 -3
  54. package/components/NSuggestionList.d.ts +84 -84
  55. package/components/NSuggestionList.js +7 -7
  56. package/components/NTable.d.ts +29 -29
  57. package/components/NTable.js +3 -3
  58. package/components/NTableAction.d.ts +19 -19
  59. package/components/NTableAction.js +3 -3
  60. package/components/NTextArea.d.ts +118 -124
  61. package/components/NTextArea.js +5 -5
  62. package/components/NTooltip.d.ts +44 -44
  63. package/components/NTooltip.js +4 -4
  64. package/components/NValInput.d.ts +134 -134
  65. package/components/NValInput.js +5 -5
  66. package/index.d.ts +2 -2
  67. package/index.js +2 -2
  68. package/package.json +3 -1
  69. package/utils/breakpoints.d.ts +3 -0
  70. package/utils/breakpoints.js +3 -0
  71. package/utils/component.d.ts +0 -8
  72. package/utils/component.js +0 -10
  73. package/utils/identifiable.d.ts +8 -8
  74. package/utils/identifiable.js +4 -2
  75. package/utils/tailwind.d.ts +2 -0
  76. package/utils/utils.d.ts +25 -12
  77. package/utils/utils.js +30 -9
@@ -5,57 +5,57 @@ export declare const nFormModalProps: {
5
5
  /**
6
6
  * The maximum width of the modal. A regular tailwind class.
7
7
  */
8
- maxWidth: {
9
- type: PropType<TWMaxWidth>;
10
- default: string;
8
+ readonly maxWidth: {
9
+ readonly type: PropType<TWMaxWidth>;
10
+ readonly default: "max-w-lg";
11
11
  };
12
12
  /**
13
13
  * If set to `true` the modal closes when clicking on the background.
14
14
  * Default is `false` as the accidental reseting of the whole form is very annoying.
15
15
  */
16
- closeOnBackground: {
17
- type: BooleanConstructor;
18
- default: boolean;
16
+ readonly closeOnBackground: {
17
+ readonly type: BooleanConstructor;
18
+ readonly default: false;
19
19
  };
20
20
  /**
21
21
  * The {@link ValidatedForm} to validate the inputs.
22
22
  * All inputs should be added to the form.
23
23
  */
24
- form: PropType<ValidatedForm>;
25
- hideHeader: BooleanConstructor;
26
- hideFooter: BooleanConstructor;
27
- hideX: BooleanConstructor;
28
- title: StringConstructor;
29
- okText: {
30
- type: StringConstructor;
31
- default: string;
32
- };
33
- okColor: {
34
- type: StringConstructor;
35
- default: string;
36
- };
37
- closeOnOk: {
38
- type: BooleanConstructor;
39
- default: boolean;
40
- };
41
- hideOk: BooleanConstructor;
42
- okDisabled: BooleanConstructor;
43
- cancelText: {
44
- type: StringConstructor;
45
- default: string;
46
- };
47
- cancelColor: {
48
- type: StringConstructor;
49
- default: string;
50
- };
51
- hideCancel: BooleanConstructor;
52
- onOk: PropType<() => void>;
53
- onCancel: PropType<() => void>;
54
- modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
55
- header: PropType<() => JSX.Element>;
56
- footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
57
- value: PropType<boolean>;
58
- onUpdateValue: PropType<(newValue: boolean) => void>;
24
+ readonly form: PropType<ValidatedForm>;
25
+ readonly hideHeader: BooleanConstructor;
26
+ readonly hideFooter: BooleanConstructor;
27
+ readonly hideX: BooleanConstructor;
28
+ readonly title: StringConstructor;
29
+ readonly okText: {
30
+ readonly type: StringConstructor;
31
+ readonly default: string;
32
+ };
33
+ readonly okColor: {
34
+ readonly type: StringConstructor;
35
+ readonly default: "primary";
36
+ };
37
+ readonly closeOnOk: {
38
+ readonly type: BooleanConstructor;
39
+ readonly default: true;
40
+ };
41
+ readonly hideOk: BooleanConstructor;
42
+ readonly okDisabled: BooleanConstructor;
43
+ readonly cancelText: {
44
+ readonly type: StringConstructor;
45
+ readonly default: string;
46
+ };
47
+ readonly cancelColor: {
48
+ readonly type: StringConstructor;
49
+ readonly default: "default";
50
+ };
51
+ readonly hideCancel: BooleanConstructor;
52
+ readonly onOk: PropType<() => void>;
53
+ readonly onCancel: PropType<() => void>;
54
+ readonly modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
55
+ readonly header: PropType<() => JSX.Element>;
56
+ readonly footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
57
+ readonly value: PropType<boolean>;
58
+ readonly onUpdateValue: PropType<(newValue: boolean) => void>;
59
59
  };
60
60
  /**
61
61
  * The `NFormModal` is a {@link NModal} with an integrated form.
@@ -66,125 +66,125 @@ declare const _default: import("vue").DefineComponent<{
66
66
  /**
67
67
  * The maximum width of the modal. A regular tailwind class.
68
68
  */
69
- maxWidth: {
70
- type: PropType<TWMaxWidth>;
71
- default: string;
69
+ readonly maxWidth: {
70
+ readonly type: PropType<TWMaxWidth>;
71
+ readonly default: "max-w-lg";
72
72
  };
73
73
  /**
74
74
  * If set to `true` the modal closes when clicking on the background.
75
75
  * Default is `false` as the accidental reseting of the whole form is very annoying.
76
76
  */
77
- closeOnBackground: {
78
- type: BooleanConstructor;
79
- default: boolean;
77
+ readonly closeOnBackground: {
78
+ readonly type: BooleanConstructor;
79
+ readonly default: false;
80
80
  };
81
81
  /**
82
82
  * The {@link ValidatedForm} to validate the inputs.
83
83
  * All inputs should be added to the form.
84
84
  */
85
- form: PropType<ValidatedForm>;
86
- hideHeader: BooleanConstructor;
87
- hideFooter: BooleanConstructor;
88
- hideX: BooleanConstructor;
89
- title: StringConstructor;
90
- okText: {
91
- type: StringConstructor;
92
- default: string;
93
- };
94
- okColor: {
95
- type: StringConstructor;
96
- default: string;
97
- };
98
- closeOnOk: {
99
- type: BooleanConstructor;
100
- default: boolean;
101
- };
102
- hideOk: BooleanConstructor;
103
- okDisabled: BooleanConstructor;
104
- cancelText: {
105
- type: StringConstructor;
106
- default: string;
107
- };
108
- cancelColor: {
109
- type: StringConstructor;
110
- default: string;
111
- };
112
- hideCancel: BooleanConstructor;
113
- onOk: PropType<() => void>;
114
- onCancel: PropType<() => void>;
115
- modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
116
- header: PropType<() => JSX.Element>;
117
- footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
118
- value: PropType<boolean>;
119
- onUpdateValue: PropType<(newValue: boolean) => void>;
85
+ readonly form: PropType<ValidatedForm>;
86
+ readonly hideHeader: BooleanConstructor;
87
+ readonly hideFooter: BooleanConstructor;
88
+ readonly hideX: BooleanConstructor;
89
+ readonly title: StringConstructor;
90
+ readonly okText: {
91
+ readonly type: StringConstructor;
92
+ readonly default: string;
93
+ };
94
+ readonly okColor: {
95
+ readonly type: StringConstructor;
96
+ readonly default: "primary";
97
+ };
98
+ readonly closeOnOk: {
99
+ readonly type: BooleanConstructor;
100
+ readonly default: true;
101
+ };
102
+ readonly hideOk: BooleanConstructor;
103
+ readonly okDisabled: BooleanConstructor;
104
+ readonly cancelText: {
105
+ readonly type: StringConstructor;
106
+ readonly default: string;
107
+ };
108
+ readonly cancelColor: {
109
+ readonly type: StringConstructor;
110
+ readonly default: "default";
111
+ };
112
+ readonly hideCancel: BooleanConstructor;
113
+ readonly onOk: PropType<() => void>;
114
+ readonly onCancel: PropType<() => void>;
115
+ readonly modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
116
+ readonly header: PropType<() => JSX.Element>;
117
+ readonly footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
118
+ readonly value: PropType<boolean>;
119
+ readonly onUpdateValue: PropType<(newValue: boolean) => void>;
120
120
  }, 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<{
121
121
  /**
122
122
  * The maximum width of the modal. A regular tailwind class.
123
123
  */
124
- maxWidth: {
125
- type: PropType<TWMaxWidth>;
126
- default: string;
124
+ readonly maxWidth: {
125
+ readonly type: PropType<TWMaxWidth>;
126
+ readonly default: "max-w-lg";
127
127
  };
128
128
  /**
129
129
  * If set to `true` the modal closes when clicking on the background.
130
130
  * Default is `false` as the accidental reseting of the whole form is very annoying.
131
131
  */
132
- closeOnBackground: {
133
- type: BooleanConstructor;
134
- default: boolean;
132
+ readonly closeOnBackground: {
133
+ readonly type: BooleanConstructor;
134
+ readonly default: false;
135
135
  };
136
136
  /**
137
137
  * The {@link ValidatedForm} to validate the inputs.
138
138
  * All inputs should be added to the form.
139
139
  */
140
- form: PropType<ValidatedForm>;
141
- hideHeader: BooleanConstructor;
142
- hideFooter: BooleanConstructor;
143
- hideX: BooleanConstructor;
144
- title: StringConstructor;
145
- okText: {
146
- type: StringConstructor;
147
- default: string;
148
- };
149
- okColor: {
150
- type: StringConstructor;
151
- default: string;
152
- };
153
- closeOnOk: {
154
- type: BooleanConstructor;
155
- default: boolean;
156
- };
157
- hideOk: BooleanConstructor;
158
- okDisabled: BooleanConstructor;
159
- cancelText: {
160
- type: StringConstructor;
161
- default: string;
162
- };
163
- cancelColor: {
164
- type: StringConstructor;
165
- default: string;
166
- };
167
- hideCancel: BooleanConstructor;
168
- onOk: PropType<() => void>;
169
- onCancel: PropType<() => void>;
170
- modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
171
- header: PropType<() => JSX.Element>;
172
- footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
173
- value: PropType<boolean>;
174
- onUpdateValue: PropType<(newValue: boolean) => void>;
140
+ readonly form: PropType<ValidatedForm>;
141
+ readonly hideHeader: BooleanConstructor;
142
+ readonly hideFooter: BooleanConstructor;
143
+ readonly hideX: BooleanConstructor;
144
+ readonly title: StringConstructor;
145
+ readonly okText: {
146
+ readonly type: StringConstructor;
147
+ readonly default: string;
148
+ };
149
+ readonly okColor: {
150
+ readonly type: StringConstructor;
151
+ readonly default: "primary";
152
+ };
153
+ readonly closeOnOk: {
154
+ readonly type: BooleanConstructor;
155
+ readonly default: true;
156
+ };
157
+ readonly hideOk: BooleanConstructor;
158
+ readonly okDisabled: BooleanConstructor;
159
+ readonly cancelText: {
160
+ readonly type: StringConstructor;
161
+ readonly default: string;
162
+ };
163
+ readonly cancelColor: {
164
+ readonly type: StringConstructor;
165
+ readonly default: "default";
166
+ };
167
+ readonly hideCancel: BooleanConstructor;
168
+ readonly onOk: PropType<() => void>;
169
+ readonly onCancel: PropType<() => void>;
170
+ readonly modal: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
171
+ readonly header: PropType<() => JSX.Element>;
172
+ readonly footer: PropType<(props: import("./NModal").ModalSlotProps) => JSX.Element>;
173
+ readonly value: PropType<boolean>;
174
+ readonly onUpdateValue: PropType<(newValue: boolean) => void>;
175
175
  }>> & {}, {
176
- maxWidth: TWMaxWidth;
177
- hideX: boolean;
178
- hideHeader: boolean;
179
- hideFooter: boolean;
180
- okText: string;
181
- okColor: string;
182
- closeOnOk: boolean;
183
- hideOk: boolean;
184
- okDisabled: boolean;
185
- cancelText: string;
186
- cancelColor: string;
187
- closeOnBackground: boolean;
188
- hideCancel: boolean;
176
+ readonly maxWidth: TWMaxWidth;
177
+ readonly hideX: boolean;
178
+ readonly hideHeader: boolean;
179
+ readonly hideFooter: boolean;
180
+ readonly okText: string;
181
+ readonly okColor: string;
182
+ readonly closeOnOk: boolean;
183
+ readonly hideOk: boolean;
184
+ readonly okDisabled: boolean;
185
+ readonly cancelText: string;
186
+ readonly cancelColor: string;
187
+ readonly closeOnBackground: boolean;
188
+ readonly hideCancel: boolean;
189
189
  }>;
190
190
  export default _default;
@@ -1,9 +1,9 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { createComponent, createProps } from '../utils/component';
2
+ import { createComponent } from '../utils/component';
3
3
  import { reactive, toRefs } from 'vue';
4
4
  import NForm from './NForm';
5
5
  import NModal, { nModalProps } from './NModal';
6
- export const nFormModalProps = createProps({
6
+ export const nFormModalProps = {
7
7
  ...nModalProps,
8
8
  /**
9
9
  * The maximum width of the modal. A regular tailwind class.
@@ -25,7 +25,7 @@ export const nFormModalProps = createProps({
25
25
  * All inputs should be added to the form.
26
26
  */
27
27
  form: Object
28
- });
28
+ };
29
29
  /**
30
30
  * The `NFormModal` is a {@link NModal} with an integrated form.
31
31
  * When submitting a `NFormModal` the form is first validated and
@@ -1,202 +1,208 @@
1
- import type { HeroIcon } from '../utils/utils';
1
+ import type { HeroIcon } from '../utils/tailwind';
2
2
  import type { PropType } from 'vue';
3
3
  import { type RouteLocationRaw } from 'vue-router';
4
4
  export declare const nIconButtonProps: {
5
- tooltipText: StringConstructor;
6
- tooltipContent: PropType<() => void>;
7
- tooltipHide: BooleanConstructor;
8
- tooltipShow: BooleanConstructor;
9
- tooltipPlacement: {
10
- type: PropType<import("./NTooltip").TooltipPlacement>;
11
- default: string;
5
+ readonly tooltipText: StringConstructor;
6
+ readonly tooltipContent: PropType<() => JSX.Element>;
7
+ readonly tooltipHide: BooleanConstructor;
8
+ readonly tooltipShow: BooleanConstructor;
9
+ readonly tooltipPlacement: {
10
+ readonly type: PropType<import("./NTooltip").TooltipPlacement>; /**
11
+ * If set to `true` the icon-button is disabled and no interaction is possible.
12
+ */
13
+ readonly default: "auto";
12
14
  };
13
- tooltipMaxWidth: {
14
- type: PropType<import("../utils/tailwind").TWMaxWidth>;
15
- default: string;
15
+ readonly tooltipMaxWidth: {
16
+ readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
17
+ readonly default: "max-w-xs";
16
18
  };
17
19
  /**
18
20
  * The icon of the icon-button.
19
21
  */
20
- icon: {
21
- type: PropType<HeroIcon>;
22
- required: true;
22
+ readonly icon: {
23
+ readonly type: PropType<HeroIcon>;
24
+ readonly required: true;
23
25
  };
24
26
  /**
25
27
  * The route of the icon-button. If this is set, the icon-button becomes a {@link RouterLink}.
26
28
  */
27
- route: PropType<RouteLocationRaw>;
29
+ readonly route: PropType<RouteLocationRaw>;
28
30
  /**
29
31
  * The color of the icon-button.
30
32
  */
31
- color: {
32
- type: StringConstructor;
33
- default: string;
33
+ readonly color: {
34
+ readonly type: StringConstructor;
35
+ readonly default: "default";
34
36
  };
35
37
  /**
36
38
  * The shade of the icon-button.
37
39
  */
38
- shade: {
39
- type: NumberConstructor;
40
- default: number;
40
+ readonly shade: {
41
+ readonly type: NumberConstructor;
42
+ readonly default: 500;
41
43
  };
42
44
  /**
43
45
  * The size of the icon in tailwind-units.
44
46
  */
45
- size: {
46
- type: NumberConstructor;
47
- default: number;
47
+ readonly size: {
48
+ readonly type: NumberConstructor;
49
+ readonly default: 5;
48
50
  };
49
51
  /**
50
52
  * The html attribute, which indicates the type of the button.
51
53
  */
52
- type: {
53
- type: PropType<"button" | "submit" | "reset">;
54
- default: string;
54
+ readonly type: {
55
+ readonly type: PropType<"button" | "submit" | "reset">;
56
+ readonly default: "button";
55
57
  };
56
58
  /**
57
59
  * If set to `true` the icon-button is disabled and no interaction is possible.
58
60
  */
59
- disabled: BooleanConstructor;
61
+ readonly disabled: BooleanConstructor;
60
62
  /**
61
63
  * This is called when the icon-button is clicked.
62
64
  * It is only called when the `route` prop is not set on the icon-button.
63
65
  */
64
- onClick: PropType<() => void>;
66
+ readonly onClick: PropType<() => void>;
65
67
  };
66
68
  /**
67
69
  * The `NIconButton` is a regular button which does not have any text but an icon instead.
68
70
  */
69
71
  declare const _default: import("vue").DefineComponent<{
70
- tooltipText: StringConstructor;
71
- tooltipContent: PropType<() => void>;
72
- tooltipHide: BooleanConstructor;
73
- tooltipShow: BooleanConstructor;
74
- tooltipPlacement: {
75
- type: PropType<import("./NTooltip").TooltipPlacement>;
76
- default: string;
72
+ readonly tooltipText: StringConstructor;
73
+ readonly tooltipContent: PropType<() => JSX.Element>;
74
+ readonly tooltipHide: BooleanConstructor;
75
+ readonly tooltipShow: BooleanConstructor;
76
+ readonly tooltipPlacement: {
77
+ readonly type: PropType<import("./NTooltip").TooltipPlacement>; /**
78
+ * If set to `true` the icon-button is disabled and no interaction is possible.
79
+ */
80
+ readonly default: "auto";
77
81
  };
78
- tooltipMaxWidth: {
79
- type: PropType<import("../utils/tailwind").TWMaxWidth>;
80
- default: string;
82
+ readonly tooltipMaxWidth: {
83
+ readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
84
+ readonly default: "max-w-xs";
81
85
  };
82
86
  /**
83
87
  * The icon of the icon-button.
84
88
  */
85
- icon: {
86
- type: PropType<HeroIcon>;
87
- required: true;
89
+ readonly icon: {
90
+ readonly type: PropType<HeroIcon>;
91
+ readonly required: true;
88
92
  };
89
93
  /**
90
94
  * The route of the icon-button. If this is set, the icon-button becomes a {@link RouterLink}.
91
95
  */
92
- route: PropType<RouteLocationRaw>;
96
+ readonly route: PropType<RouteLocationRaw>;
93
97
  /**
94
98
  * The color of the icon-button.
95
99
  */
96
- color: {
97
- type: StringConstructor;
98
- default: string;
100
+ readonly color: {
101
+ readonly type: StringConstructor;
102
+ readonly default: "default";
99
103
  };
100
104
  /**
101
105
  * The shade of the icon-button.
102
106
  */
103
- shade: {
104
- type: NumberConstructor;
105
- default: number;
107
+ readonly shade: {
108
+ readonly type: NumberConstructor;
109
+ readonly default: 500;
106
110
  };
107
111
  /**
108
112
  * The size of the icon in tailwind-units.
109
113
  */
110
- size: {
111
- type: NumberConstructor;
112
- default: number;
114
+ readonly size: {
115
+ readonly type: NumberConstructor;
116
+ readonly default: 5;
113
117
  };
114
118
  /**
115
119
  * The html attribute, which indicates the type of the button.
116
120
  */
117
- type: {
118
- type: PropType<"button" | "submit" | "reset">;
119
- default: string;
121
+ readonly type: {
122
+ readonly type: PropType<"button" | "submit" | "reset">;
123
+ readonly default: "button";
120
124
  };
121
125
  /**
122
126
  * If set to `true` the icon-button is disabled and no interaction is possible.
123
127
  */
124
- disabled: BooleanConstructor;
128
+ readonly disabled: BooleanConstructor;
125
129
  /**
126
130
  * This is called when the icon-button is clicked.
127
131
  * It is only called when the `route` prop is not set on the icon-button.
128
132
  */
129
- onClick: PropType<() => void>;
133
+ readonly onClick: PropType<() => void>;
130
134
  }, 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<{
131
- tooltipText: StringConstructor;
132
- tooltipContent: PropType<() => void>;
133
- tooltipHide: BooleanConstructor;
134
- tooltipShow: BooleanConstructor;
135
- tooltipPlacement: {
136
- type: PropType<import("./NTooltip").TooltipPlacement>;
137
- default: string;
135
+ readonly tooltipText: StringConstructor;
136
+ readonly tooltipContent: PropType<() => JSX.Element>;
137
+ readonly tooltipHide: BooleanConstructor;
138
+ readonly tooltipShow: BooleanConstructor;
139
+ readonly tooltipPlacement: {
140
+ readonly type: PropType<import("./NTooltip").TooltipPlacement>; /**
141
+ * If set to `true` the icon-button is disabled and no interaction is possible.
142
+ */
143
+ readonly default: "auto";
138
144
  };
139
- tooltipMaxWidth: {
140
- type: PropType<import("../utils/tailwind").TWMaxWidth>;
141
- default: string;
145
+ readonly tooltipMaxWidth: {
146
+ readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
147
+ readonly default: "max-w-xs";
142
148
  };
143
149
  /**
144
150
  * The icon of the icon-button.
145
151
  */
146
- icon: {
147
- type: PropType<HeroIcon>;
148
- required: true;
152
+ readonly icon: {
153
+ readonly type: PropType<HeroIcon>;
154
+ readonly required: true;
149
155
  };
150
156
  /**
151
157
  * The route of the icon-button. If this is set, the icon-button becomes a {@link RouterLink}.
152
158
  */
153
- route: PropType<RouteLocationRaw>;
159
+ readonly route: PropType<RouteLocationRaw>;
154
160
  /**
155
161
  * The color of the icon-button.
156
162
  */
157
- color: {
158
- type: StringConstructor;
159
- default: string;
163
+ readonly color: {
164
+ readonly type: StringConstructor;
165
+ readonly default: "default";
160
166
  };
161
167
  /**
162
168
  * The shade of the icon-button.
163
169
  */
164
- shade: {
165
- type: NumberConstructor;
166
- default: number;
170
+ readonly shade: {
171
+ readonly type: NumberConstructor;
172
+ readonly default: 500;
167
173
  };
168
174
  /**
169
175
  * The size of the icon in tailwind-units.
170
176
  */
171
- size: {
172
- type: NumberConstructor;
173
- default: number;
177
+ readonly size: {
178
+ readonly type: NumberConstructor;
179
+ readonly default: 5;
174
180
  };
175
181
  /**
176
182
  * The html attribute, which indicates the type of the button.
177
183
  */
178
- type: {
179
- type: PropType<"button" | "submit" | "reset">;
180
- default: string;
184
+ readonly type: {
185
+ readonly type: PropType<"button" | "submit" | "reset">;
186
+ readonly default: "button";
181
187
  };
182
188
  /**
183
189
  * If set to `true` the icon-button is disabled and no interaction is possible.
184
190
  */
185
- disabled: BooleanConstructor;
191
+ readonly disabled: BooleanConstructor;
186
192
  /**
187
193
  * This is called when the icon-button is clicked.
188
194
  * It is only called when the `route` prop is not set on the icon-button.
189
195
  */
190
- onClick: PropType<() => void>;
196
+ readonly onClick: PropType<() => void>;
191
197
  }>> & {}, {
192
- color: string;
193
- type: "button" | "submit" | "reset";
194
- shade: number;
195
- size: number;
196
- tooltipHide: boolean;
197
- tooltipShow: boolean;
198
- tooltipPlacement: import("./NTooltip").TooltipPlacement;
199
- tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
200
- disabled: boolean;
198
+ readonly color: string;
199
+ readonly shade: number;
200
+ readonly size: number;
201
+ readonly type: "button" | "submit" | "reset";
202
+ readonly tooltipHide: boolean;
203
+ readonly tooltipShow: boolean;
204
+ readonly tooltipPlacement: import("./NTooltip").TooltipPlacement;
205
+ readonly tooltipMaxWidth: import("../utils/tailwind").TWMaxWidth;
206
+ readonly disabled: boolean;
201
207
  }>;
202
208
  export default _default;
@@ -1,12 +1,12 @@
1
1
  import { isVNode as _isVNode, createVNode as _createVNode } from "vue";
2
- import { createComponent, createProps } from '../utils/component';
2
+ import { createComponent } from '../utils/component';
3
3
  import { RouterLink } from 'vue-router';
4
4
  import { nButtonProps } from './NButton';
5
5
  import NTooltip, { mapTooltipProps, nToolTipPropsForImplementor } from './NTooltip';
6
6
  function _isSlot(s) {
7
7
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
8
8
  }
9
- export const nIconButtonProps = createProps({
9
+ export const nIconButtonProps = {
10
10
  /**
11
11
  * The icon of the icon-button.
12
12
  */
@@ -53,7 +53,7 @@ export const nIconButtonProps = createProps({
53
53
  */
54
54
  onClick: Function,
55
55
  ...nToolTipPropsForImplementor
56
- });
56
+ };
57
57
  /**
58
58
  * The `NIconButton` is a regular button which does not have any text but an icon instead.
59
59
  */