vx-vue 1.0.5 → 1.0.6

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 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,183 +1,42 @@
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.4+
8
- * Tailwind CSS 3.4+
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
- ### Accordion
49
- An Accordion; requires AccordionPanels as child components. Key navigation with tab, cursor up, cursor down is provided.
50
- If `activeIndex` is an array multiple panels can be open at the same time; if it is a number only one panel at a time can be open.
51
-
52
- | props | events | slots |
53
- |-------------------------------|------------------------|-------|
54
- | `activeIndex [Number, Array]` | `update:active-index` | |
55
-
56
- ### AccordionPanel
57
- **Only** useful as child component of an Accordion component.
58
-
59
- | props | events | slots |
60
- |------------------------------------------|----------------------------------|-----------------------|
61
- | `show [Boolean]`<br>`disabled [Boolean]` | `keyup`<br>`keydown`<br>`select` | `header`<br>`default` |
62
-
63
-
64
- ### Autocomplete
65
- A component which provides suggestions with each keystroke.
66
-
67
- | props | events | slots |
68
- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|-----------|
69
- | `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` |
70
-
71
- ### Confirm
72
- A promise-based component which can either take one ("confirm") or two buttons ("confirm", "cancel"). Clicking "confirm" resolves, "cancel" rejects the promise.
73
-
74
- | props | events | slots |
75
- |-------|--------|----------------------------------|
76
- | none | none | `title`<br/>`icon`<br/>`message` |
77
-
78
- ### DateInput
79
- An input element for guided date inputs, which also serves as child component of the datepicker component.
80
-
81
- | props | events | slots |
82
- |-----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|-----------|
83
- | `modelValue [Date]`<br/>`outputFormat [String]`<br/>`inputFormat [String]`<br/>`showButton [Boolean]`<br/>`locale [String]` | `update:modelValue`<br/>`toggle-datepicker` | `default` |
84
-
85
- ### Datepicker
86
- A not-too-fancy datepicker.
87
-
88
- | props | events | slots |
89
- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|-----------|
90
- | `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` |
91
-
92
- ### FormFileButton
93
- A thinly wrapped type-file input that allows proper styling and integration.
94
-
95
- | props | events | slots |
96
- |-----------------------------------------------------------------------------------------------------------|-------------------------------------|-------|
97
- | `modelValue [Array]`<br/>`accept [String]`<br/>`multiple [Boolean]`<br/>`name [String]`<br/>`id [String]` | `update:modelValue`<br/>`form-data` | none |
98
-
99
- ### FormSelect
100
- A select element adapted for Vue.js integration.
101
-
102
- | props | events | slots |
103
- |----------------------------------------------------------------------------------|---------------------|-------|
104
- | `modelValue [String, Number]`<br/>`options [Array]`<br/>`disabledLabel [String]` | `update:modelValue` | none |
105
-
106
- ### FormSwitch
107
- Nothing more than a fancy checkbox.
108
-
109
- | props | events | slots |
110
- |----------------------|---------------------|------------------------|
111
- | `modelValue [Mixed]` | `update:modelValue` | `default`<br/>`handle` |
112
-
113
- ### MessageToast
114
- Displays a notification message which can either be dismissed by the user and/or by itself after a configurable timeout.
115
-
116
- | props | events | slots |
117
- |----------------------------------------------------------------------------------------------|-----------------------|----------------------------------|
118
- | `title [String]`<br/>`message [String, Array]`<br/>`timeout [Number]`<br/>`active [Boolean]` | `timeout`<br/>`close` | `icon`<br/>`title`<br/>`default` |
119
-
120
- ### Modal
121
- A modal overlay which provides slots.
122
-
123
- | props | events | slots |
124
- |-------------------------------------------------------------------------------------------------------|-------------------|-----------------------|
125
- | `show [Boolean]`<br/>`containerClass [String]`<br/>`headerClass [String]`<br/>`contentClass [String]` | `clicked-outside` | `title`<br/>`default` |
126
-
127
- ### Pagination
128
- A pagination component for an arbitrary list of items; rather opinionated in its responsive layout.
129
-
130
- | props | events | slots |
131
- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-------|
132
- | `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` | none |
133
-
134
- ### PasswordInput
135
- A simple input element paired with a toggle button which toggles the input element between between `type='password'` and `type='text'`
136
-
137
- | props | events | slots |
138
- |-----------------------|---------------------|-----------|
139
- | `modelValue [String]` | `update:modelValue` | `default` |
140
-
141
- ### SimpleTree
142
- A collapsible tree component which is implemented by a single recursive component.
143
-
144
- | props | events | slots |
145
- |-------------------|--------------------------------|-------|
146
- | `branch [Object]` | `branch-selected`<br/>`expand` | none |
147
-
148
- ### Slider
149
- A slider replacing and enhancing an `input type="range"`.
150
-
151
- The component can have one or more thumbs: `modelValue` can either be a number or an array of numbers and the length of the array determines the number of thumbs.
152
-
153
- | props | events | slots |
154
- |---------------------------------------------------------------------------------------------------------------|---------------------|-------|
155
- | `modelValue [Number]`<br/>`min [Number]`<br/>`max [Number]`<br/>`vertical [Boolean]`<br/>`disabled [Boolean]` | `update:modelValue` | none |
156
-
157
- ### Sortable
158
- A sortable table; the `columns` prop specifies the columns and their sorting options.
159
-
160
- | props | events | slots |
161
- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|--------------------------------------------------|
162
- | `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 }` |
163
-
164
- ### Spinner
165
- Well, an animated circular spinner; colorized with `currentColor`.
166
-
167
- | props | events | slots |
168
- |-----------------------------------------------|--------|-------|
169
- | `radius [Number]`<br/>`strokeWidth [Number]` | | |
170
-
171
- ### SubmitButton
172
- A button which will be disabled when `busy` is true and display a spinner to its right. Apart from a default theme a `success` and `error` theme are provided with matching spinner. In any case the spinner can be styled by a separate class string.
173
-
174
- | props | events | slots |
175
- |--------------------------------------------------------------------|-----------|-----------|
176
- | `busy [Boolean]`<br/>`theme [String]`<br/>`spinnerClass [String]` | `submit` | `default` |
177
-
178
- ### Tabs
179
- A responsive tabs component. The items array holds objects with a required `name [String]` and optional `badge [String]`, `icon [Component]` and `disabled [Boolean]` properties.
180
-
181
- | props | events | slots |
182
- |--------------------------------------------|-----------------------|----------------------|
183
- | `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.5+
8
+ * Tailwind CSS 3.4+
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.
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .messagetoast-fade-enter-from[data-v-61927b01],.messagetoast-fade-leave-to[data-v-61927b01]{--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-61927b01],.messagetoast-fade-leave-from[data-v-61927b01]{--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-61927b01],.messagetoast-fade-leave-active[data-v-61927b01]{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}tbody tr[data-v-5bcd12cd]:nth-of-type(2n){background-color:rgb(var(--vxvue-color-50))}tbody tr:nth-of-type(odd) td.active[data-v-5bcd12cd]{background-color:rgb(var(--vxvue-highlight-50))}tbody tr:nth-of-type(2n) td.active[data-v-5bcd12cd]{background-color:rgb(var(--vxvue-highlight-100))}thead th.active[data-v-5bcd12cd]{background-color:rgb(var(--vxvue-highlight-800))}button.success[data-v-6ed8744e]{background-color:rgb(var(--success-color));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}button.success[data-v-6ed8744e]:hover{background-color:rgb(var(--success-color-700))}button.success[data-v-6ed8744e]:focus{--tw-ring-color: rgb(var(--success-color)) }button.error[data-v-6ed8744e]{background-color:rgb(var(--error-color));color:rgb(var(--error-color-50))}button.error[data-v-6ed8744e]:hover{background-color:rgb(var(--error-color-600))}button.error[data-v-6ed8744e]:focus{--tw-ring-color: rgb(var(--error-color-600)) }button[data-v-6ed8744e]:disabled{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}button[data-v-6ed8744e]:disabled:hover{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity))}button[data-v-6ed8744e]:disabled:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}
1
+ .messagetoast-fade-enter-from[data-v-1300160b],.messagetoast-fade-leave-to[data-v-1300160b]{--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-1300160b],.messagetoast-fade-leave-from[data-v-1300160b]{--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-1300160b],.messagetoast-fade-leave-active[data-v-1300160b]{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}tbody tr[data-v-6abd4b76]:nth-of-type(2n){background-color:rgb(var(--vxvue-color-50))}tbody tr:nth-of-type(odd) td.active[data-v-6abd4b76]{background-color:rgb(var(--vxvue-highlight-50))}tbody tr:nth-of-type(2n) td.active[data-v-6abd4b76]{background-color:rgb(var(--vxvue-highlight-100))}thead th.active[data-v-6abd4b76]{background-color:rgb(var(--vxvue-highlight-800))}button.success[data-v-2eba6082]{background-color:rgb(var(--success-color));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}button.success[data-v-2eba6082]:hover{background-color:rgb(var(--success-color-700))}button.success[data-v-2eba6082]:focus{--tw-ring-color: rgb(var(--success-color)) }button.error[data-v-2eba6082]{background-color:rgb(var(--error-color));color:rgb(var(--error-color-50))}button.error[data-v-2eba6082]:hover{background-color:rgb(var(--error-color-600))}button.error[data-v-2eba6082]:focus{--tw-ring-color: rgb(var(--error-color-600)) }button[data-v-2eba6082]:disabled{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}button[data-v-2eba6082]:disabled:hover{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity))}button[data-v-2eba6082]:disabled:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}