@naptics/vue-collection 0.1.10 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/components/NAlert.d.ts +0 -12
  2. package/components/NAlert.js +1 -5
  3. package/components/NBadge.d.ts +21 -12
  4. package/components/NBadge.js +5 -3
  5. package/components/NBreadcrub.d.ts +3 -15
  6. package/components/NBreadcrub.js +3 -7
  7. package/components/NButton.d.ts +21 -12
  8. package/components/NButton.js +5 -3
  9. package/components/NCheckbox.d.ts +0 -12
  10. package/components/NCheckbox.js +2 -6
  11. package/components/NCheckboxLabel.d.ts +0 -3
  12. package/components/NCheckboxLabel.js +2 -8
  13. package/components/NDropdown.d.ts +89 -14
  14. package/components/NDropdown.js +9 -7
  15. package/components/NDropzone.d.ts +0 -12
  16. package/components/NDropzone.js +2 -6
  17. package/components/NFormModal.js +11 -7
  18. package/components/NIconButton.d.ts +21 -12
  19. package/components/NIconButton.js +5 -3
  20. package/components/NIconCircle.d.ts +0 -12
  21. package/components/NIconCircle.js +2 -6
  22. package/components/NInput.d.ts +9 -18
  23. package/components/NInput.js +1 -7
  24. package/components/NInputPhone.d.ts +9 -9
  25. package/components/NInputSelect.d.ts +9 -9
  26. package/components/NInputSuggestion.d.ts +9 -9
  27. package/components/NLink.d.ts +0 -12
  28. package/components/NLink.js +1 -5
  29. package/components/NList.d.ts +0 -12
  30. package/components/NList.js +2 -8
  31. package/components/NLoadingIndicator.d.ts +0 -12
  32. package/components/NLoadingIndicator.js +2 -6
  33. package/components/NPagination.d.ts +0 -12
  34. package/components/NPagination.js +1 -5
  35. package/components/NSearchbar.d.ts +0 -12
  36. package/components/NSearchbar.js +1 -7
  37. package/components/NSearchbarList.d.ts +0 -12
  38. package/components/NSearchbarList.js +1 -6
  39. package/components/NSelect.d.ts +9 -18
  40. package/components/NSelect.js +0 -4
  41. package/components/NTable.d.ts +27 -53
  42. package/components/NTable.js +21 -30
  43. package/components/NTableAction.d.ts +0 -12
  44. package/components/NTableAction.js +1 -5
  45. package/components/NTextArea.d.ts +9 -18
  46. package/components/NTextArea.js +0 -4
  47. package/components/NTooltip.d.ts +32 -12
  48. package/components/NTooltip.js +21 -11
  49. package/components/NValInput.d.ts +9 -9
  50. package/components/NValInput.js +4 -9
  51. package/package.json +1 -1
  52. package/utils/utils.d.ts +7 -0
  53. package/utils/utils.js +9 -0
@@ -16,10 +16,6 @@ export declare const nAlertProps: {
16
16
  * If set to `true` the X-button of the alert is hidden.
17
17
  */
18
18
  readonly hideX: BooleanConstructor;
19
- /**
20
- * Adds the classes to the top-level element.
21
- */
22
- readonly addClass: StringConstructor;
23
19
  /**
24
20
  * This is called, when the X-button is clicked.
25
21
  */
@@ -45,10 +41,6 @@ declare const _default: import("vue").DefineComponent<{
45
41
  * If set to `true` the X-button of the alert is hidden.
46
42
  */
47
43
  readonly hideX: BooleanConstructor;
48
- /**
49
- * Adds the classes to the top-level element.
50
- */
51
- readonly addClass: StringConstructor;
52
44
  /**
53
45
  * This is called, when the X-button is clicked.
54
46
  */
@@ -69,10 +61,6 @@ declare const _default: import("vue").DefineComponent<{
69
61
  * If set to `true` the X-button of the alert is hidden.
70
62
  */
71
63
  readonly hideX: BooleanConstructor;
72
- /**
73
- * Adds the classes to the top-level element.
74
- */
75
- readonly addClass: StringConstructor;
76
64
  /**
77
65
  * This is called, when the X-button is clicked.
78
66
  */
@@ -20,10 +20,6 @@ export const nAlertProps = {
20
20
  * If set to `true` the X-button of the alert is hidden.
21
21
  */
22
22
  hideX: Boolean,
23
- /**
24
- * Adds the classes to the top-level element.
25
- */
26
- addClass: String,
27
23
  /**
28
24
  * This is called, when the X-button is clicked.
29
25
  */
@@ -38,7 +34,7 @@ export default createComponent('NAlert', nAlertProps, (props, {
38
34
  }) => {
39
35
  const variant = computed(() => VARIANTS[props.variant]);
40
36
  return () => _createVNode("div", {
41
- "class": `rounded-md p-3 shadow-lg bg-${variant.value.color}-50 ${props.addClass}`
37
+ "class": `rounded-md p-3 shadow-lg bg-${variant.value.color}-50`
42
38
  }, [_createVNode("div", {
43
39
  "class": "flex items-center"
44
40
  }, [_createVNode("div", {
@@ -13,8 +13,9 @@ export declare const nBadgeProps: {
13
13
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
14
14
  readonly default: "max-w-xs";
15
15
  };
16
- readonly tooltipWrapperAddClass: StringConstructor;
17
- readonly tooltipContentAddClass: StringConstructor;
16
+ readonly tooltipWrapperClass: StringConstructor;
17
+ readonly tooltipContentClass: StringConstructor;
18
+ readonly tooltipArrowClass: StringConstructor;
18
19
  /**
19
20
  * The text of the badge. Can alternatively be passed in the default slot.
20
21
  */
@@ -55,9 +56,11 @@ export declare const nBadgeProps: {
55
56
  readonly default: true;
56
57
  };
57
58
  /**
58
- * Adds the classes to the top-level element.
59
+ * Adds the classes to the badge.
60
+ * Use this instead of `class` to style the button, because the button is wrapped inside
61
+ * a div for the tooltip and `class` would be applied to the wrapping div.
59
62
  */
60
- readonly addClass: StringConstructor;
63
+ readonly badgeClass: StringConstructor;
61
64
  };
62
65
  /**
63
66
  * The `NBadge` is a styled element to wrap a text.
@@ -75,8 +78,9 @@ declare const _default: import("vue").DefineComponent<{
75
78
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
76
79
  readonly default: "max-w-xs";
77
80
  };
78
- readonly tooltipWrapperAddClass: StringConstructor;
79
- readonly tooltipContentAddClass: StringConstructor;
81
+ readonly tooltipWrapperClass: StringConstructor;
82
+ readonly tooltipContentClass: StringConstructor;
83
+ readonly tooltipArrowClass: StringConstructor;
80
84
  /**
81
85
  * The text of the badge. Can alternatively be passed in the default slot.
82
86
  */
@@ -117,9 +121,11 @@ declare const _default: import("vue").DefineComponent<{
117
121
  readonly default: true;
118
122
  };
119
123
  /**
120
- * Adds the classes to the top-level element.
124
+ * Adds the classes to the badge.
125
+ * Use this instead of `class` to style the button, because the button is wrapped inside
126
+ * a div for the tooltip and `class` would be applied to the wrapping div.
121
127
  */
122
- readonly addClass: StringConstructor;
128
+ readonly badgeClass: StringConstructor;
123
129
  }, 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<{
124
130
  readonly tooltipText: StringConstructor;
125
131
  readonly tooltipContent: PropType<() => JSX.Element>;
@@ -133,8 +139,9 @@ declare const _default: import("vue").DefineComponent<{
133
139
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
134
140
  readonly default: "max-w-xs";
135
141
  };
136
- readonly tooltipWrapperAddClass: StringConstructor;
137
- readonly tooltipContentAddClass: StringConstructor;
142
+ readonly tooltipWrapperClass: StringConstructor;
143
+ readonly tooltipContentClass: StringConstructor;
144
+ readonly tooltipArrowClass: StringConstructor;
138
145
  /**
139
146
  * The text of the badge. Can alternatively be passed in the default slot.
140
147
  */
@@ -175,9 +182,11 @@ declare const _default: import("vue").DefineComponent<{
175
182
  readonly default: true;
176
183
  };
177
184
  /**
178
- * Adds the classes to the top-level element.
185
+ * Adds the classes to the badge.
186
+ * Use this instead of `class` to style the button, because the button is wrapped inside
187
+ * a div for the tooltip and `class` would be applied to the wrapping div.
179
188
  */
180
- readonly addClass: StringConstructor;
189
+ readonly badgeClass: StringConstructor;
181
190
  }>> & {}, {
182
191
  readonly color: string;
183
192
  readonly shade: number;
@@ -42,9 +42,11 @@ export const nBadgeProps = {
42
42
  default: true
43
43
  },
44
44
  /**
45
- * Adds the classes to the top-level element.
45
+ * Adds the classes to the badge.
46
+ * Use this instead of `class` to style the button, because the button is wrapped inside
47
+ * a div for the tooltip and `class` would be applied to the wrapping div.
46
48
  */
47
- addClass: String,
49
+ badgeClass: String,
48
50
  ...nToolTipPropsForImplementor
49
51
  };
50
52
  /**
@@ -55,7 +57,7 @@ export default createComponent('NBadge', nBadgeProps, (props, {
55
57
  }) => {
56
58
  return () => _createVNode(NTooltip, mapTooltipProps(props), {
57
59
  default: () => [_createVNode("div", {
58
- "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.addClass]
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]
59
61
  }, [slots.default?.() || props.text])]
60
62
  });
61
63
  });
@@ -38,14 +38,10 @@ export declare const nBreadcrumbProps: {
38
38
  readonly type: NumberConstructor;
39
39
  readonly default: 5;
40
40
  };
41
- /**
42
- * Adds the classes to the top-level element.
43
- */
44
- readonly addClass: StringConstructor;
45
41
  /**
46
42
  * Adds the classes to the separator icons.
47
43
  */
48
- readonly addIconClass: StringConstructor;
44
+ readonly iconClass: StringConstructor;
49
45
  /**
50
46
  * A slot the replace the breadcrumb labels.
51
47
  */
@@ -105,14 +101,10 @@ declare const _default: import("vue").DefineComponent<{
105
101
  readonly type: NumberConstructor;
106
102
  readonly default: 5;
107
103
  };
108
- /**
109
- * Adds the classes to the top-level element.
110
- */
111
- readonly addClass: StringConstructor;
112
104
  /**
113
105
  * Adds the classes to the separator icons.
114
106
  */
115
- readonly addIconClass: StringConstructor;
107
+ readonly iconClass: StringConstructor;
116
108
  /**
117
109
  * A slot the replace the breadcrumb labels.
118
110
  */
@@ -158,14 +150,10 @@ declare const _default: import("vue").DefineComponent<{
158
150
  readonly type: NumberConstructor;
159
151
  readonly default: 5;
160
152
  };
161
- /**
162
- * Adds the classes to the top-level element.
163
- */
164
- readonly addClass: StringConstructor;
165
153
  /**
166
154
  * Adds the classes to the separator icons.
167
155
  */
168
- readonly addIconClass: StringConstructor;
156
+ readonly iconClass: StringConstructor;
169
157
  /**
170
158
  * A slot the replace the breadcrumb labels.
171
159
  */
@@ -38,14 +38,10 @@ export const nBreadcrumbProps = {
38
38
  type: Number,
39
39
  default: 5
40
40
  },
41
- /**
42
- * Adds the classes to the top-level element.
43
- */
44
- addClass: String,
45
41
  /**
46
42
  * Adds the classes to the separator icons.
47
43
  */
48
- addIconClass: String,
44
+ iconClass: String,
49
45
  /**
50
46
  * A slot the replace the breadcrumb labels.
51
47
  */
@@ -61,7 +57,7 @@ export const nBreadcrumbProps = {
61
57
  */
62
58
  export default createComponentWithSlots('NBreadcrumb', nBreadcrumbProps, ['seperator', 'item'], props => {
63
59
  return () => _createVNode("div", {
64
- "class": `flex flex-wrap items-center ${props.addClass}`
60
+ "class": `flex flex-wrap items-center`
65
61
  }, [props.items.map((item, index) => _createVNode(_Fragment, null, [props.item?.(item, index) || _createVNode(NLink, {
66
62
  "textSize": props.textSize,
67
63
  "route": item.route,
@@ -69,6 +65,6 @@ export default createComponentWithSlots('NBreadcrumb', nBreadcrumbProps, ['seper
69
65
  }, {
70
66
  default: () => [item.label]
71
67
  }), index < props.items.length - 1 && (props.seperator?.(item, index) || _createVNode(props.icon, {
72
- "class": `mx-2 w-${props.iconSize} h-${props.iconSize} text-${props.color}-500 ${props.addIconClass}`
68
+ "class": `mx-2 w-${props.iconSize} h-${props.iconSize} text-${props.color}-500 ${props.iconClass}`
73
69
  }, null))]))]);
74
70
  });
@@ -12,8 +12,9 @@ export declare const nButtonProps: {
12
12
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
13
13
  readonly default: "max-w-xs";
14
14
  };
15
- readonly tooltipWrapperAddClass: StringConstructor;
16
- readonly tooltipContentAddClass: StringConstructor;
15
+ readonly tooltipWrapperClass: StringConstructor;
16
+ readonly tooltipContentClass: StringConstructor;
17
+ readonly tooltipArrowClass: StringConstructor;
17
18
  /**
18
19
  * The color of the button.
19
20
  */
@@ -42,9 +43,11 @@ export declare const nButtonProps: {
42
43
  */
43
44
  readonly small: BooleanConstructor;
44
45
  /**
45
- * Adds the classes to the top-level element.
46
+ * Adds the classes to the button.
47
+ * Use this instead of `class` to style the button, because the button is wrapped inside
48
+ * a div for the tooltip and `class` would be applied to the wrapping div.
46
49
  */
47
- readonly addClass: StringConstructor;
50
+ readonly buttonClass: StringConstructor;
48
51
  /**
49
52
  * This is called, when the button is clicked.
50
53
  */
@@ -66,8 +69,9 @@ declare const _default: import("vue").DefineComponent<{
66
69
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
67
70
  readonly default: "max-w-xs";
68
71
  };
69
- readonly tooltipWrapperAddClass: StringConstructor;
70
- readonly tooltipContentAddClass: StringConstructor;
72
+ readonly tooltipWrapperClass: StringConstructor;
73
+ readonly tooltipContentClass: StringConstructor;
74
+ readonly tooltipArrowClass: StringConstructor;
71
75
  /**
72
76
  * The color of the button.
73
77
  */
@@ -96,9 +100,11 @@ declare const _default: import("vue").DefineComponent<{
96
100
  */
97
101
  readonly small: BooleanConstructor;
98
102
  /**
99
- * Adds the classes to the top-level element.
103
+ * Adds the classes to the button.
104
+ * Use this instead of `class` to style the button, because the button is wrapped inside
105
+ * a div for the tooltip and `class` would be applied to the wrapping div.
100
106
  */
101
- readonly addClass: StringConstructor;
107
+ readonly buttonClass: StringConstructor;
102
108
  /**
103
109
  * This is called, when the button is clicked.
104
110
  */
@@ -116,8 +122,9 @@ declare const _default: import("vue").DefineComponent<{
116
122
  readonly type: PropType<import("../utils/tailwind").TWMaxWidth>;
117
123
  readonly default: "max-w-xs";
118
124
  };
119
- readonly tooltipWrapperAddClass: StringConstructor;
120
- readonly tooltipContentAddClass: StringConstructor;
125
+ readonly tooltipWrapperClass: StringConstructor;
126
+ readonly tooltipContentClass: StringConstructor;
127
+ readonly tooltipArrowClass: StringConstructor;
121
128
  /**
122
129
  * The color of the button.
123
130
  */
@@ -146,9 +153,11 @@ declare const _default: import("vue").DefineComponent<{
146
153
  */
147
154
  readonly small: BooleanConstructor;
148
155
  /**
149
- * Adds the classes to the top-level element.
156
+ * Adds the classes to the button.
157
+ * Use this instead of `class` to style the button, because the button is wrapped inside
158
+ * a div for the tooltip and `class` would be applied to the wrapping div.
150
159
  */
151
- readonly addClass: StringConstructor;
160
+ readonly buttonClass: StringConstructor;
152
161
  /**
153
162
  * This is called, when the button is clicked.
154
163
  */
@@ -32,9 +32,11 @@ export const nButtonProps = {
32
32
  */
33
33
  small: Boolean,
34
34
  /**
35
- * Adds the classes to the top-level element.
35
+ * Adds the classes to the button.
36
+ * Use this instead of `class` to style the button, because the button is wrapped inside
37
+ * a div for the tooltip and `class` would be applied to the wrapping div.
36
38
  */
37
- addClass: String,
39
+ buttonClass: String,
38
40
  /**
39
41
  * This is called, when the button is clicked.
40
42
  */
@@ -52,7 +54,7 @@ export default createComponent('NButton', nButtonProps, (props, {
52
54
  default: () => [_createVNode("button", {
53
55
  "disabled": isDisabled.value,
54
56
  "type": props.type,
55
- "class": [`block w-full font-medium rounded-md focus:outline-none focus-visible:ring-2 shadow text-${props.color}-900 relative`, isDisabled.value ? `bg-${props.color}-100 text-opacity-20 cursor-default` : `bg-${props.color}-200 hover:bg-${props.color}-300 focus-visible:ring-${props.color}-500`, props.small ? 'py-1 px-2 text-xs' : 'py-2 px-4 text-sm', props.addClass],
57
+ "class": [`block w-full font-medium rounded-md focus:outline-none focus-visible:ring-2 shadow text-${props.color}-900 relative`, isDisabled.value ? `bg-${props.color}-100 text-opacity-20 cursor-default` : `bg-${props.color}-200 hover:bg-${props.color}-300 focus-visible:ring-${props.color}-500`, props.small ? 'py-1 px-2 text-xs' : 'py-2 px-4 text-sm', props.buttonClass],
56
58
  "onClick": props.onClick
57
59
  }, [_createVNode("span", {
58
60
  "class": {
@@ -10,10 +10,6 @@ export declare const nCheckboxProps: {
10
10
  * If set to `true` the checkbox is disabled and no interaction is possible.
11
11
  */
12
12
  readonly disabled: BooleanConstructor;
13
- /**
14
- * Adds the classes to the top-level element.
15
- */
16
- readonly addClass: StringConstructor;
17
13
  readonly value: import("vue").PropType<boolean>;
18
14
  readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
19
15
  };
@@ -32,10 +28,6 @@ declare const _default: import("vue").DefineComponent<{
32
28
  * If set to `true` the checkbox is disabled and no interaction is possible.
33
29
  */
34
30
  readonly disabled: BooleanConstructor;
35
- /**
36
- * Adds the classes to the top-level element.
37
- */
38
- readonly addClass: StringConstructor;
39
31
  readonly value: import("vue").PropType<boolean>;
40
32
  readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
41
33
  }, 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<{
@@ -50,10 +42,6 @@ declare const _default: import("vue").DefineComponent<{
50
42
  * If set to `true` the checkbox is disabled and no interaction is possible.
51
43
  */
52
44
  readonly disabled: BooleanConstructor;
53
- /**
54
- * Adds the classes to the top-level element.
55
- */
56
- readonly addClass: StringConstructor;
57
45
  readonly value: import("vue").PropType<boolean>;
58
46
  readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
59
47
  }>> & {}, {
@@ -14,11 +14,7 @@ export const nCheckboxProps = {
14
14
  /**
15
15
  * If set to `true` the checkbox is disabled and no interaction is possible.
16
16
  */
17
- disabled: Boolean,
18
- /**
19
- * Adds the classes to the top-level element.
20
- */
21
- addClass: String
17
+ disabled: Boolean
22
18
  };
23
19
  /**
24
20
  * The `NCheckbox` is a styled checkbox.
@@ -41,6 +37,6 @@ export default createComponent('NCheckbox', nCheckboxProps, props => {
41
37
  "disabled": props.disabled,
42
38
  "onClick": toggle,
43
39
  "key": updateKey.value,
44
- "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`, props.addClass]
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`]
45
41
  }, null);
46
42
  });
@@ -16,7 +16,6 @@ export declare const nCheckboxLabelProps: {
16
16
  readonly default: "primary";
17
17
  };
18
18
  readonly disabled: BooleanConstructor;
19
- readonly addClass: StringConstructor;
20
19
  readonly value: import("vue").PropType<boolean>;
21
20
  readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
22
21
  };
@@ -41,7 +40,6 @@ declare const _default: import("vue").DefineComponent<{
41
40
  readonly default: "primary";
42
41
  };
43
42
  readonly disabled: BooleanConstructor;
44
- readonly addClass: StringConstructor;
45
43
  readonly value: import("vue").PropType<boolean>;
46
44
  readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
47
45
  }, 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<{
@@ -62,7 +60,6 @@ declare const _default: import("vue").DefineComponent<{
62
60
  readonly default: "primary";
63
61
  };
64
62
  readonly disabled: BooleanConstructor;
65
- readonly addClass: StringConstructor;
66
63
  readonly value: import("vue").PropType<boolean>;
67
64
  readonly onUpdateValue: import("vue").PropType<(newValue: boolean) => void>;
68
65
  }>> & {}, {
@@ -1,5 +1,4 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { computed } from 'vue';
3
2
  import { createComponent } from '../utils/component';
4
3
  import NCheckbox, { nCheckboxProps } from './NCheckbox';
5
4
  export const nCheckboxLabelProps = {
@@ -24,14 +23,9 @@ export default createComponent('NCheckboxLabel', nCheckboxLabelProps, props => {
24
23
  const toggleValue = () => {
25
24
  if (!props.disabled) props.onUpdateValue?.(!props.value);
26
25
  };
27
- // addClass is not passed as it is used on the top-level element.
28
- const childProps = computed(() => ({
29
- ...props,
30
- addClass: undefined
31
- }));
32
26
  return () => _createVNode("div", {
33
- "class": `flex items-center ${props.addClass}`
34
- }, [_createVNode(NCheckbox, childProps.value, null), _createVNode("div", {
27
+ "class": `flex items-center`
28
+ }, [_createVNode(NCheckbox, props, null), _createVNode("div", {
35
29
  "class": `${props.compact ? 'ml-2' : 'ml-3'} text-sm`
36
30
  }, [_createVNode("label", {
37
31
  "onClick": toggleValue,
@@ -1,5 +1,6 @@
1
1
  import { type PropType } from 'vue';
2
2
  import { type RouteLocationRaw } from 'vue-router';
3
+ import { MenuButton } from '@headlessui/vue';
3
4
  import type { HeroIcon } from '../utils/tailwind';
4
5
  export declare const nDropdownProps: {
5
6
  /**
@@ -24,13 +25,15 @@ export declare const nDropdownProps: {
24
25
  */
25
26
  readonly disabled: BooleanConstructor;
26
27
  /**
27
- * A slot to replace the button of the dropdown.
28
+ * Adds the classes to the Button of the dropdown.
28
29
  */
29
- readonly button: PropType<() => JSX.Element>;
30
+ readonly buttonClass: StringConstructor;
30
31
  /**
31
- * Adds the classes to the top-level element.
32
+ * A slot to replace the button of the dropdown.
33
+ * The passed parameter is the HeadlessUI `MenuButton` which should be
34
+ * used to create the button for the Dropdown to work properly.
32
35
  */
33
- readonly addClass: StringConstructor;
36
+ readonly button: PropType<(button: typeof MenuButton) => JSX.Element>;
34
37
  };
35
38
  export type DropdownItem = {
36
39
  /**
@@ -83,13 +86,49 @@ declare const _default: import("vue").DefineComponent<{
83
86
  */
84
87
  readonly disabled: BooleanConstructor;
85
88
  /**
86
- * A slot to replace the button of the dropdown.
89
+ * Adds the classes to the Button of the dropdown.
87
90
  */
88
- readonly button: PropType<() => JSX.Element>;
91
+ readonly buttonClass: StringConstructor;
89
92
  /**
90
- * Adds the classes to the top-level element.
91
- */
92
- readonly addClass: StringConstructor;
93
+ * A slot to replace the button of the dropdown.
94
+ * The passed parameter is the HeadlessUI `MenuButton` which should be
95
+ * used to create the button for the Dropdown to work properly.
96
+ */
97
+ readonly button: PropType<(button: import("vue").DefineComponent<{
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>;
93
132
  }, 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<{
94
133
  /**
95
134
  * The title of the dropdown-button.
@@ -113,13 +152,49 @@ declare const _default: import("vue").DefineComponent<{
113
152
  */
114
153
  readonly disabled: BooleanConstructor;
115
154
  /**
116
- * A slot to replace the button of the dropdown.
155
+ * Adds the classes to the Button of the dropdown.
117
156
  */
118
- readonly button: PropType<() => JSX.Element>;
157
+ readonly buttonClass: StringConstructor;
119
158
  /**
120
- * Adds the classes to the top-level element.
121
- */
122
- readonly addClass: StringConstructor;
159
+ * A slot to replace the button of the dropdown.
160
+ * The passed parameter is the HeadlessUI `MenuButton` which should be
161
+ * used to create the button for the Dropdown to work properly.
162
+ */
163
+ readonly button: PropType<(button: import("vue").DefineComponent<{
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>;
123
198
  }>> & {}, {
124
199
  readonly right: boolean;
125
200
  readonly disabled: boolean;
@@ -30,13 +30,15 @@ export const nDropdownProps = {
30
30
  */
31
31
  disabled: Boolean,
32
32
  /**
33
- * A slot to replace the button of the dropdown.
33
+ * Adds the classes to the Button of the dropdown.
34
34
  */
35
- button: Function,
35
+ buttonClass: String,
36
36
  /**
37
- * Adds the classes to the top-level element.
37
+ * A slot to replace the button of the dropdown.
38
+ * The passed parameter is the HeadlessUI `MenuButton` which should be
39
+ * used to create the button for the Dropdown to work properly.
38
40
  */
39
- addClass: String
41
+ button: Function
40
42
  };
41
43
  /**
42
44
  * The `NDropdown` consists of a button and a panel with multiple actions.
@@ -56,13 +58,13 @@ export default createComponentWithSlots('NDropdown', nDropdownProps, ['button'],
56
58
  }, null), _createVNode("span", null, [item.label])]);
57
59
  return () => _createVNode(Menu, {
58
60
  "as": "div",
59
- "class": `relative inline-block text-left ${props.addClass}`
61
+ "class": `relative inline-block text-left`
60
62
  }, {
61
63
  default: () => [_createVNode("div", {
62
64
  "class": "flex"
63
- }, [props.button?.() || _createVNode(MenuButton, {
65
+ }, [props.button?.(MenuButton) || _createVNode(MenuButton, {
64
66
  "disabled": props.disabled,
65
- "class": ['shadow w-full flex justify-between items-center text-default-700 rounded-md border bg-white border-default-300 px-4 py-2 text-sm font-medium focus:outline-none focus:ring-offset-2 focus-visible:ring-2 focus-visible:ring-primary-500', props.disabled ? 'text-opacity-20 cursor-default' : 'hover:bg-default-100']
67
+ "class": ['shadow w-full flex justify-between items-center text-default-700 rounded-md border bg-white border-default-300 px-4 py-2 text-sm font-medium focus:outline-none focus:ring-offset-2 focus-visible:ring-2 focus-visible:ring-primary-500', props.disabled ? 'text-opacity-20 cursor-default' : 'hover:bg-default-100', props.buttonClass]
66
68
  }, {
67
69
  default: () => [_createVNode("span", null, [props.title]), _createVNode(ChevronDownIcon, {
68
70
  "class": "-mr-1 ml-2 h-5 w-5 flex-shrink-0",
@@ -46,10 +46,6 @@ export declare const nDropzoneProps: {
46
46
  readonly type: StringConstructor;
47
47
  readonly default: "min-h-36";
48
48
  };
49
- /**
50
- * Adds the classes to the top-level element.
51
- */
52
- readonly addClass: StringConstructor;
53
49
  readonly value: import("vue").PropType<File[]>;
54
50
  readonly onUpdateValue: import("vue").PropType<(newValue: File[]) => void>;
55
51
  };
@@ -105,10 +101,6 @@ declare const _default: import("vue").DefineComponent<{
105
101
  readonly type: StringConstructor;
106
102
  readonly default: "min-h-36";
107
103
  };
108
- /**
109
- * Adds the classes to the top-level element.
110
- */
111
- readonly addClass: StringConstructor;
112
104
  readonly value: import("vue").PropType<File[]>;
113
105
  readonly onUpdateValue: import("vue").PropType<(newValue: File[]) => void>;
114
106
  }, 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<{
@@ -159,10 +151,6 @@ declare const _default: import("vue").DefineComponent<{
159
151
  readonly type: StringConstructor;
160
152
  readonly default: "min-h-36";
161
153
  };
162
- /**
163
- * Adds the classes to the top-level element.
164
- */
165
- readonly addClass: StringConstructor;
166
154
  readonly value: import("vue").PropType<File[]>;
167
155
  readonly onUpdateValue: import("vue").PropType<(newValue: File[]) => void>;
168
156
  }>> & {}, {