vx-vue 0.7.7 → 0.7.9
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/LICENSE +21 -21
- package/README.md +64 -64
- package/dist/style.css +1 -1
- package/dist/vxvue.es.js +226 -217
- package/dist/vxvue.umd.js +1 -1
- package/package.json +40 -40
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Gregor Kofler
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Gregor Kofler
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
# vxVue
|
|
2
|
-
|
|
3
|
-
## Introduction
|
|
4
|
-
VxVue provides a handful of reusable Vue components styled with Tailwind CSS. All components are geared towards simplicity leaving room for customizations, extensions or adaptations. At some point a more verbose documentation than this brief readme might emerge.
|
|
5
|
-
|
|
6
|
-
## Requirements
|
|
7
|
-
* Vue.js 3.*
|
|
8
|
-
* Tailwind CSS 3.*
|
|
9
|
-
|
|
10
|
-
The official Tailwind CSS forms plugin is used to provide basic styling of the form components using the class strategy which allows the styling of non-form elements consistently.
|
|
11
|
-
An easy to configure color theming is applied. `vxvue` and `vxvue-alt` are used as the two colors scales. Since Tailwind won't observe classes in imported components tailwind.config.js should also list the node package in the content array.
|
|
12
|
-
```javascript
|
|
13
|
-
module.exports = {
|
|
14
|
-
content: [
|
|
15
|
-
'./node_modules/vx-vue/**/*.js',
|
|
16
|
-
...
|
|
17
|
-
],
|
|
18
|
-
theme: {
|
|
19
|
-
extend: {
|
|
20
|
-
colors: {
|
|
21
|
-
'vxvue': {
|
|
22
|
-
DEFAULT: ...,
|
|
23
|
-
'50': ...,
|
|
24
|
-
...
|
|
25
|
-
'900': ...
|
|
26
|
-
},
|
|
27
|
-
'vxvue-alt': {
|
|
28
|
-
...
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
To use the few scoped styles along with your CSS add
|
|
36
|
-
|
|
37
|
-
```javascript
|
|
38
|
-
import 'vx-vue/vx-vue.css'
|
|
39
|
-
```
|
|
40
|
-
to your main.js or index.js file.
|
|
41
|
-
|
|
42
|
-
The components use an extra color palette.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## Provided components
|
|
46
|
-
So far the following components have been implemented:
|
|
47
|
-
|
|
48
|
-
| element | description | props | events | slots |
|
|
49
|
-
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|--------------------------------------------------|
|
|
50
|
-
| `autocomplete` | component which provides suggestions with each keystroke | `modelValue [String]`<br/>`search [Function]`<br/>`baseClass [String]`<br/>`resultListClass [String]`<br/>`resultItemClass [String]`<br/>`inputClass [String]`<br/>`autoSelect [Boolean]`<br/>`getResultValue [Function]` | `update:modelValue`<br/>`blur`<br/>`submit` | `result` |
|
|
51
|
-
| `confirm` | promise-based component which can either take one ("confirm") or two buttons ("confirm", "cancel") | | | `title`<br/>`icon`<br/>`message` |
|
|
52
|
-
| `date-input` | input element for guided date inputs, also used by the datepicker | `modelValue [Date]`<br/>`outputFormat [String]`<br/>`inputFormat [String]`<br/>`showButton [Boolean]`<br/>`locale [String]` | `update:modelValue`<br/>`toggle-datepicker` | `default` |
|
|
53
|
-
| `datepicker` | a bare bones datepicker component | `modelValue [Date]`<br/>`validFrom [Date]`<br/>`validUntil [Date]`<br/>`dayNames [Array]`<br/>`locale [String]`<br/>`startOfWeekIndex [Number]`<br/>`hasInput [Boolean]` | `update:modelValue`<br/>`month-change`<br/>`year-change` | `default` |
|
|
54
|
-
| `form-file-button` | a thinly wrapped type-file input to allow proper styling and integration | `modelValue [Array]`<br/>`accept [String]`<br/>`multiple [Boolean]`<br/>`name [String]`<br/>`id [String]` | `update:modelValue`<br/>`form-data` | |
|
|
55
|
-
| `form-select` | a select element adapted for Vue.js integration | `modelValue [String, Number]`<br/>`options [Array]`<br/>`disabledLabel [String]` | `update:modelValue` | |
|
|
56
|
-
| `form-switch` | a fancy checkbox | `modelValue [Mixed]` | `update:modelValue` | `default` |
|
|
57
|
-
| `message-toast` | displays a notification which dismisses itself after a configurable timeout | `title [String]`<br/>`message [String, Array]`<br/>`timeout [Number]`<br/>`active [Boolean]` | `timeout`<br/>`close` | `icon`<br/>`title`<br/>`default` |
|
|
58
|
-
| `modal` | modal overlay | `show [Boolean]`<br/>`containerClass [String]`<br/>`headerClass [String]`<br/>`contentClass [String]` | `clicked-outside` | `title`<br/>`default` |
|
|
59
|
-
| `pagination` | a pagination component for arbitrary items; opinionated in its layout | `page [Number]`<br/>`total [Number]`<br/>`perPage [Number]`<br/>`showNavButtons [Boolean]`<br/>`prevText [String]`<br/>`nextText [String]`<br/>`showAllPages [Boolean]`<br/>`markerPosition ['above', 'below']` | `update:page` | |
|
|
60
|
-
| `password-input` | a simple input with toggle button which toggles between `type='button'` and `type='text'` | `modelValue [String]` | `update:modelValue` | `default` |
|
|
61
|
-
| `simple-tree` | a simple tree implemented with a recursive component | `branch [Object]` | `branch-selected`<br/>`expand` | |
|
|
62
|
-
| `slider` | a slider with one or more thumbs; `modelValue` can be a number or an array of numbers; the length of the array determines the number of thumbs | `modelValue [Number]`<br/>`min [Number]`<br/>`max [Number]`<br/>`vertical [Boolean]`<br/>`disabled [Boolean]` | `update:modelValue` | |
|
|
63
|
-
| `sortable` | a sortable table; the `columns` prop specifies the columns and their sorting options | `columns [Array]`<br/>`rows [Array]`<br/>`offset [Number]`<br/>`count [Number]`<br/>`sortProp [String]`<br/>`sortDirection ['asc', 'desc']`<br/>`keyProperty [String]` | `before-sort`<br/>`after-sort` | `{ column: prop }-header`<br/>`{ column: prop }` |
|
|
64
|
-
| `tabs` | a tabs component which allows both badges and icons | `items [Array]`<br/>`activeIndex [Number]` | `update:active-index` | `icon`<br/>`default` |
|
|
1
|
+
# vxVue
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
VxVue provides a handful of reusable Vue components styled with Tailwind CSS. All components are geared towards simplicity leaving room for customizations, extensions or adaptations. At some point a more verbose documentation than this brief readme might emerge.
|
|
5
|
+
|
|
6
|
+
## Requirements
|
|
7
|
+
* Vue.js 3.*
|
|
8
|
+
* Tailwind CSS 3.*
|
|
9
|
+
|
|
10
|
+
The official Tailwind CSS forms plugin is used to provide basic styling of the form components using the class strategy which allows the styling of non-form elements consistently.
|
|
11
|
+
An easy to configure color theming is applied. `vxvue` and `vxvue-alt` are used as the two colors scales. Since Tailwind won't observe classes in imported components tailwind.config.js should also list the node package in the content array.
|
|
12
|
+
```javascript
|
|
13
|
+
module.exports = {
|
|
14
|
+
content: [
|
|
15
|
+
'./node_modules/vx-vue/**/*.js',
|
|
16
|
+
...
|
|
17
|
+
],
|
|
18
|
+
theme: {
|
|
19
|
+
extend: {
|
|
20
|
+
colors: {
|
|
21
|
+
'vxvue': {
|
|
22
|
+
DEFAULT: ...,
|
|
23
|
+
'50': ...,
|
|
24
|
+
...
|
|
25
|
+
'900': ...
|
|
26
|
+
},
|
|
27
|
+
'vxvue-alt': {
|
|
28
|
+
...
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
To use the few scoped styles along with your CSS add
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
import 'vx-vue/vx-vue.css'
|
|
39
|
+
```
|
|
40
|
+
to your main.js or index.js file.
|
|
41
|
+
|
|
42
|
+
The components use an extra color palette.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## Provided components
|
|
46
|
+
So far the following components have been implemented:
|
|
47
|
+
|
|
48
|
+
| element | description | props | events | slots |
|
|
49
|
+
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|--------------------------------------------------|
|
|
50
|
+
| `autocomplete` | component which provides suggestions with each keystroke | `modelValue [String]`<br/>`search [Function]`<br/>`baseClass [String]`<br/>`resultListClass [String]`<br/>`resultItemClass [String]`<br/>`inputClass [String]`<br/>`autoSelect [Boolean]`<br/>`getResultValue [Function]` | `update:modelValue`<br/>`blur`<br/>`submit` | `result` |
|
|
51
|
+
| `confirm` | promise-based component which can either take one ("confirm") or two buttons ("confirm", "cancel") | | | `title`<br/>`icon`<br/>`message` |
|
|
52
|
+
| `date-input` | input element for guided date inputs, also used by the datepicker | `modelValue [Date]`<br/>`outputFormat [String]`<br/>`inputFormat [String]`<br/>`showButton [Boolean]`<br/>`locale [String]` | `update:modelValue`<br/>`toggle-datepicker` | `default` |
|
|
53
|
+
| `datepicker` | a bare bones datepicker component | `modelValue [Date]`<br/>`validFrom [Date]`<br/>`validUntil [Date]`<br/>`dayNames [Array]`<br/>`locale [String]`<br/>`startOfWeekIndex [Number]`<br/>`hasInput [Boolean]` | `update:modelValue`<br/>`month-change`<br/>`year-change` | `default` |
|
|
54
|
+
| `form-file-button` | a thinly wrapped type-file input to allow proper styling and integration | `modelValue [Array]`<br/>`accept [String]`<br/>`multiple [Boolean]`<br/>`name [String]`<br/>`id [String]` | `update:modelValue`<br/>`form-data` | |
|
|
55
|
+
| `form-select` | a select element adapted for Vue.js integration | `modelValue [String, Number]`<br/>`options [Array]`<br/>`disabledLabel [String]` | `update:modelValue` | |
|
|
56
|
+
| `form-switch` | a fancy checkbox | `modelValue [Mixed]` | `update:modelValue` | `default` |
|
|
57
|
+
| `message-toast` | displays a notification which dismisses itself after a configurable timeout | `title [String]`<br/>`message [String, Array]`<br/>`timeout [Number]`<br/>`active [Boolean]` | `timeout`<br/>`close` | `icon`<br/>`title`<br/>`default` |
|
|
58
|
+
| `modal` | modal overlay | `show [Boolean]`<br/>`containerClass [String]`<br/>`headerClass [String]`<br/>`contentClass [String]` | `clicked-outside` | `title`<br/>`default` |
|
|
59
|
+
| `pagination` | a pagination component for arbitrary items; opinionated in its layout | `page [Number]`<br/>`total [Number]`<br/>`perPage [Number]`<br/>`showNavButtons [Boolean]`<br/>`prevText [String]`<br/>`nextText [String]`<br/>`showAllPages [Boolean]`<br/>`markerPosition ['above', 'below']` | `update:page` | |
|
|
60
|
+
| `password-input` | a simple input with toggle button which toggles between `type='button'` and `type='text'` | `modelValue [String]` | `update:modelValue` | `default` |
|
|
61
|
+
| `simple-tree` | a simple tree implemented with a recursive component | `branch [Object]` | `branch-selected`<br/>`expand` | |
|
|
62
|
+
| `slider` | a slider with one or more thumbs; `modelValue` can be a number or an array of numbers; the length of the array determines the number of thumbs | `modelValue [Number]`<br/>`min [Number]`<br/>`max [Number]`<br/>`vertical [Boolean]`<br/>`disabled [Boolean]` | `update:modelValue` | |
|
|
63
|
+
| `sortable` | a sortable table; the `columns` prop specifies the columns and their sorting options | `columns [Array]`<br/>`rows [Array]`<br/>`offset [Number]`<br/>`count [Number]`<br/>`sortProp [String]`<br/>`sortDirection ['asc', 'desc']`<br/>`keyProperty [String]` | `before-sort`<br/>`after-sort` | `{ column: prop }-header`<br/>`{ column: prop }` |
|
|
64
|
+
| `tabs` | a tabs component which allows both badges and icons | `items [Array]`<br/>`activeIndex [Number]` | `update:active-index` | `icon`<br/>`default` |
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.messagetoast-fade-enter-from[data-v-
|
|
1
|
+
.messagetoast-fade-enter-from[data-v-dbccf282],.messagetoast-fade-leave-to[data-v-dbccf282]{--tw-translate-y: -2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0}.messagetoast-fade-enter-to[data-v-dbccf282],.messagetoast-fade-leave-from[data-v-dbccf282]{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.messagetoast-fade-enter-active[data-v-dbccf282],.messagetoast-fade-leave-active[data-v-dbccf282]{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}tbody tr[data-v-5f719421]:nth-of-type(odd){--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}tbody tr[data-v-5f719421]:nth-of-type(2n){--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}tbody tr:nth-of-type(odd) td.active[data-v-5f719421]{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity))}tbody tr:nth-of-type(2n) td.active[data-v-5f719421]{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity))}thead th.active[data-v-5f719421]{--tw-bg-opacity: 1;background-color:rgb(146 64 14 / var(--tw-bg-opacity))}
|