@naptics/vue-collection 0.2.1 → 0.2.3
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
|
1
|
+
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
2
2
|
import { createComponent } from '../utils/component';
|
|
3
3
|
import NCheckbox, { nCheckboxProps } from './NCheckbox';
|
|
4
4
|
export const nCheckboxLabelProps = {
|
|
@@ -24,8 +24,10 @@ export default createComponent('NCheckboxLabel', nCheckboxLabelProps, props => {
|
|
|
24
24
|
if (!props.disabled) props.onUpdateValue?.(!props.value);
|
|
25
25
|
};
|
|
26
26
|
return () => _createVNode("div", {
|
|
27
|
-
"class": `flex items-center`
|
|
28
|
-
}, [_createVNode(NCheckbox, props,
|
|
27
|
+
"class": `flex ${props.description ? 'items-start' : 'items-center'}`
|
|
28
|
+
}, [_createVNode(NCheckbox, _mergeProps(props, {
|
|
29
|
+
"class": props.description ? 'mt-1' : ''
|
|
30
|
+
}), null), _createVNode("div", {
|
|
29
31
|
"class": `${props.compact ? 'ml-2' : 'ml-3'} text-sm`
|
|
30
32
|
}, [_createVNode("label", {
|
|
31
33
|
"onClick": toggleValue,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as _createVNode
|
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
|
2
2
|
import { createComponent } from '../utils/component';
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/vue/24/solid';
|
|
4
4
|
import { computed, watch } from 'vue';
|
|
@@ -77,9 +77,7 @@ export default createComponent('NPagination', nPaginationProps, props => {
|
|
|
77
77
|
}, [_createVNode("button", {
|
|
78
78
|
"class": ['pagination-item selectable rounded-l-md', props.small ? '' : 'not-small'],
|
|
79
79
|
"onClick": previous
|
|
80
|
-
}, [_createVNode(
|
|
81
|
-
"class": "sr-only"
|
|
82
|
-
}, [_createTextVNode("Previous")]), _createVNode(ChevronLeftIcon, {
|
|
80
|
+
}, [_createVNode(ChevronLeftIcon, {
|
|
83
81
|
"class": "h-5 w-5",
|
|
84
82
|
"aria-hidden": "true"
|
|
85
83
|
}, null)]), items.value.map((item, index) => item.selectable ? _createVNode("button", {
|
|
@@ -92,9 +90,7 @@ export default createComponent('NPagination', nPaginationProps, props => {
|
|
|
92
90
|
}, [item.label])), _createVNode("button", {
|
|
93
91
|
"class": ['pagination-item selectable rounded-r-md', props.small ? '' : 'not-small'],
|
|
94
92
|
"onClick": next
|
|
95
|
-
}, [_createVNode(
|
|
96
|
-
"class": "sr-only"
|
|
97
|
-
}, [_createTextVNode("Next")]), _createVNode(ChevronRightIcon, {
|
|
93
|
+
}, [_createVNode(ChevronRightIcon, {
|
|
98
94
|
"class": "h-5 w-5",
|
|
99
95
|
"aria-hidden": "true"
|
|
100
96
|
}, null)])]);
|
package/components/NSearchbar.js
CHANGED
|
@@ -41,10 +41,7 @@ export default createComponent('NSearchbar', nSearchbarProps, (props, context) =
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
context.expose(exposed);
|
|
44
|
-
return () => _createVNode("div",
|
|
45
|
-
"for": "search",
|
|
46
|
-
"class": "sr-only"
|
|
47
|
-
}, [props.placeholder]), _createVNode("div", {
|
|
44
|
+
return () => _createVNode("div", {
|
|
48
45
|
"class": "relative"
|
|
49
46
|
}, [_createVNode("div", {
|
|
50
47
|
"class": "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"
|
|
@@ -62,5 +59,5 @@ export default createComponent('NSearchbar', nSearchbarProps, (props, context) =
|
|
|
62
59
|
"class": ['block w-full pl-10 pr-4 rounded-md border focus:outline-none focus:ring-1 transition placeholder-default-400 border-default-300 focus:border-primary-500 focus:ring-primary-500', props.small ? 'py-1' : 'py-2', props.inputClass],
|
|
63
60
|
"onFocus": props.onFocus,
|
|
64
61
|
"onBlur": props.onBlur
|
|
65
|
-
}, null)])
|
|
62
|
+
}, null)]);
|
|
66
63
|
});
|
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.3",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|