@tak-ps/vue-tabler 3.9.0 → 3.11.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.
- package/CHANGELOG.md +8 -0
- package/components/List.vue +1 -1
- package/components/Schema.vue +3 -3
- package/components/input/Colour.vue +98 -0
- package/components/{Enum.vue → input/Enum.vue} +3 -20
- package/components/{Input.vue → input/Input.vue} +3 -20
- package/components/{Range.vue → input/Range.vue} +3 -20
- package/components/{Toggle.vue → input/Toggle.vue} +5 -21
- package/components/internal/Label.vue +50 -0
- package/lib.js +8 -5
- package/package.json +1 -1
- /package/components/{Select.vue → input/Select.vue} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
## Version History
|
|
12
12
|
|
|
13
|
+
### v3.11.0
|
|
14
|
+
|
|
15
|
+
- :tada: Add `TablerColour` Component
|
|
16
|
+
|
|
17
|
+
### v3.10.0
|
|
18
|
+
|
|
19
|
+
- :tada: Use uniform `TablerLabel` internal class for inputs & allow slot use to the right of label
|
|
20
|
+
|
|
13
21
|
### v3.9.0
|
|
14
22
|
|
|
15
23
|
- :tada: Add `TablerRange`
|
package/components/List.vue
CHANGED
package/components/Schema.vue
CHANGED
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
</template>
|
|
64
64
|
|
|
65
65
|
<script>
|
|
66
|
-
import TablerInput from './Input.vue';
|
|
67
|
-
import TablerToggle from './Toggle.vue';
|
|
68
|
-
import TablerEnum from './Enum.vue';
|
|
66
|
+
import TablerInput from './input/Input.vue';
|
|
67
|
+
import TablerToggle from './input/Toggle.vue';
|
|
68
|
+
import TablerEnum from './input/Enum.vue';
|
|
69
69
|
import {
|
|
70
70
|
PlusIcon,
|
|
71
71
|
TrashIcon,
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class='row'>
|
|
3
|
+
<TablerLabel :label='label' :description='description' :required='required'><slot/></TablerLabel>
|
|
4
|
+
<div class='col-12'>
|
|
5
|
+
<div class="row g-2">
|
|
6
|
+
<div :key='color' v-for='color in [
|
|
7
|
+
"dark", "white", "blue", "azure", "indigo", "purple", "pink", "red", "orange", "yellow", "lime"
|
|
8
|
+
]'
|
|
9
|
+
class="col-auto">
|
|
10
|
+
<label class="form-colorinput">
|
|
11
|
+
<input :disabled='disabled' v-model='current' :value='color' type="radio" class="form-colorinput-input">
|
|
12
|
+
<span class="form-colorinput-color bg-dark" :class='[
|
|
13
|
+
`bg-${color}`
|
|
14
|
+
]'></span>
|
|
15
|
+
</label>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import TablerLabel from '../internal/Label.vue';
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
name: 'TablerEnum',
|
|
27
|
+
props: {
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
default: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
required: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
required: false
|
|
39
|
+
},
|
|
40
|
+
description: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: false
|
|
43
|
+
},
|
|
44
|
+
disabled: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
48
|
+
label: String,
|
|
49
|
+
},
|
|
50
|
+
data: function() {
|
|
51
|
+
return {
|
|
52
|
+
current: '',
|
|
53
|
+
invertColours: {
|
|
54
|
+
'#1d273b': 'dark',
|
|
55
|
+
'#ffffff': 'white',
|
|
56
|
+
'#206bc4': 'blue',
|
|
57
|
+
'#4299e1': 'azure',
|
|
58
|
+
'#4263eb': 'indigo',
|
|
59
|
+
'#ae3ec9': 'purple',
|
|
60
|
+
'#d6336c': 'pink',
|
|
61
|
+
'#d63939': 'red',
|
|
62
|
+
'#f76707': 'orange',
|
|
63
|
+
'#f59f00': 'yellow',
|
|
64
|
+
'#74b816': 'lime'
|
|
65
|
+
}
|
|
66
|
+
colours: {
|
|
67
|
+
dark: '#1d273b',
|
|
68
|
+
white: '#ffffff',
|
|
69
|
+
blue: '#206bc4',
|
|
70
|
+
azure: '#4299e1',
|
|
71
|
+
indigo: '#4263eb',
|
|
72
|
+
purple: '#ae3ec9',
|
|
73
|
+
pink: '#d6336c',
|
|
74
|
+
red: '#d63939',
|
|
75
|
+
orange: '#f76707',
|
|
76
|
+
yellow: '#f59f00',
|
|
77
|
+
lime: '#74b816'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
mounted: function() {
|
|
82
|
+
if (!this.modelValue && this.default) this.current = this.invertColours[this.default]
|
|
83
|
+
else this.current = this.invertColours[this.modelValue];
|
|
84
|
+
},
|
|
85
|
+
watch: {
|
|
86
|
+
modelValue: function() {
|
|
87
|
+
this.current = this.invertColours[this.modelValue];
|
|
88
|
+
},
|
|
89
|
+
current: function() {
|
|
90
|
+
if (this.colours[this.current] === this.modelValue) return;
|
|
91
|
+
this.$emit('update:modelValue', this.colours[this.current]);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
components: {
|
|
95
|
+
TablerLabel
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class='row'>
|
|
3
|
-
<
|
|
4
|
-
<span v-if='description' style='margin-right: 4px;'>
|
|
5
|
-
<InfoSquareIcon @click='help = true' size='20' class='cursor-pointer'/>
|
|
6
|
-
<Help v-if='help' @click='help = false' :label='label || placeholder' :description='description'/>
|
|
7
|
-
</span>
|
|
8
|
-
<label
|
|
9
|
-
v-if='label'
|
|
10
|
-
class="form-label"
|
|
11
|
-
v-text='label'
|
|
12
|
-
:class='{
|
|
13
|
-
"required": required
|
|
14
|
-
}'
|
|
15
|
-
></label>
|
|
16
|
-
</div>
|
|
3
|
+
<TablerLabel :label='label' :description='description' :required='required'><slot/></TablerLabel>
|
|
17
4
|
<div class='col-12'>
|
|
18
5
|
<select v-model='current' :disabled='disabled' class='form-select'>
|
|
19
6
|
<option :key='option' v-for='option in options' :value="option" v-text='option'></option>
|
|
@@ -23,10 +10,7 @@
|
|
|
23
10
|
</template>
|
|
24
11
|
|
|
25
12
|
<script>
|
|
26
|
-
import
|
|
27
|
-
InfoSquareIcon
|
|
28
|
-
} from 'vue-tabler-icons';
|
|
29
|
-
import Help from './Help.vue';
|
|
13
|
+
import TablerLabel from '../internal/Label.vue';
|
|
30
14
|
|
|
31
15
|
export default {
|
|
32
16
|
name: 'TablerEnum',
|
|
@@ -76,8 +60,7 @@ export default {
|
|
|
76
60
|
}
|
|
77
61
|
},
|
|
78
62
|
components: {
|
|
79
|
-
|
|
80
|
-
Help
|
|
63
|
+
TablerLabel
|
|
81
64
|
}
|
|
82
65
|
}
|
|
83
66
|
</script>
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class='row'>
|
|
3
|
-
<
|
|
4
|
-
<span v-if='description' style='margin-right: 4px;'>
|
|
5
|
-
<InfoSquareIcon @click='help = true' size='20' class='cursor-pointer'/>
|
|
6
|
-
<Help v-if='help' @click='help = false' :label='label || placeholder' :description='description'/>
|
|
7
|
-
</span>
|
|
8
|
-
<label
|
|
9
|
-
v-if='label'
|
|
10
|
-
class="form-label"
|
|
11
|
-
v-text='label'
|
|
12
|
-
:class='{
|
|
13
|
-
"required": required
|
|
14
|
-
}'
|
|
15
|
-
></label>
|
|
16
|
-
</div>
|
|
3
|
+
<TablerLabel :label='label || placeholder' :description='description' :required='required'><slot/></TablerLabel>
|
|
17
4
|
<div class='col-12'>
|
|
18
5
|
<template v-if='!rows || rows <= 1'>
|
|
19
6
|
<input :disabled='disabled' :value='modelValue' @input='event => current = event.target.value' :type='type' :class='{
|
|
@@ -31,10 +18,7 @@
|
|
|
31
18
|
</template>
|
|
32
19
|
|
|
33
20
|
<script>
|
|
34
|
-
import
|
|
35
|
-
InfoSquareIcon
|
|
36
|
-
} from 'vue-tabler-icons';
|
|
37
|
-
import Help from './Help.vue';
|
|
21
|
+
import TablerLabel from '../internal/Label.vue';
|
|
38
22
|
|
|
39
23
|
export default {
|
|
40
24
|
name: 'TablerInput',
|
|
@@ -92,8 +76,7 @@ export default {
|
|
|
92
76
|
}
|
|
93
77
|
},
|
|
94
78
|
components: {
|
|
95
|
-
|
|
96
|
-
InfoSquareIcon
|
|
79
|
+
TablerLabel
|
|
97
80
|
}
|
|
98
81
|
}
|
|
99
82
|
</script>
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class='row'>
|
|
3
|
-
<
|
|
4
|
-
<span v-if='description' style='margin-right: 4px;'>
|
|
5
|
-
<InfoSquareIcon @click='help = true' size='20' class='cursor-pointer'/>
|
|
6
|
-
<Help v-if='help' @click='help = false' :label='label' :description='description'/>
|
|
7
|
-
</span>
|
|
8
|
-
<label
|
|
9
|
-
v-if='label'
|
|
10
|
-
class="form-label"
|
|
11
|
-
v-text='label'
|
|
12
|
-
:class='{
|
|
13
|
-
"required": required
|
|
14
|
-
}'
|
|
15
|
-
></label>
|
|
16
|
-
</div>
|
|
3
|
+
<TablerLabel :label='label' :description='description' :required='required'><slot/></TablerLabel>
|
|
17
4
|
<div class='col-12'>
|
|
18
5
|
<input :disabled='disabled' v-model='current' type="range" class="form-range" :min="min" :max="max" :step="step">
|
|
19
6
|
</div>
|
|
@@ -21,10 +8,7 @@
|
|
|
21
8
|
</template>
|
|
22
9
|
|
|
23
10
|
<script>
|
|
24
|
-
import
|
|
25
|
-
InfoSquareIcon
|
|
26
|
-
} from 'vue-tabler-icons';
|
|
27
|
-
import Help from './Help.vue';
|
|
11
|
+
import TablerLabel from '../internal/Label.vue';
|
|
28
12
|
|
|
29
13
|
export default {
|
|
30
14
|
name: 'TablerRange',
|
|
@@ -72,8 +56,7 @@ export default {
|
|
|
72
56
|
}
|
|
73
57
|
},
|
|
74
58
|
components: {
|
|
75
|
-
|
|
76
|
-
InfoSquareIcon
|
|
59
|
+
TablerLabel
|
|
77
60
|
}
|
|
78
61
|
}
|
|
79
62
|
</script>
|
|
@@ -1,30 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<InfoSquareIcon @click='help = true' size='20' class='cursor-pointer'/>
|
|
6
|
-
<Help v-if='help' @click='help = false' :label='label || placeholder' :description='description'/>
|
|
7
|
-
</span>
|
|
8
|
-
<label
|
|
9
|
-
v-if='label'
|
|
10
|
-
class='form-label my-1 mx-2'
|
|
11
|
-
:class='{
|
|
12
|
-
"required": required
|
|
13
|
-
}'
|
|
14
|
-
v-text='label'
|
|
15
|
-
/>
|
|
16
|
-
<label class="ms-auto form-check form-switch pt-2">
|
|
3
|
+
<TablerLabel :label='label' :required='required' :description='description'>
|
|
4
|
+
<label class='form-switch'>
|
|
17
5
|
<input v-model='current' :disabled='disabled' class="form-check-input" type="checkbox">
|
|
18
6
|
</label>
|
|
19
|
-
</
|
|
7
|
+
</TablerLabel>
|
|
20
8
|
</div>
|
|
21
9
|
</template>
|
|
22
10
|
|
|
23
11
|
<script>
|
|
24
|
-
import
|
|
25
|
-
InfoSquareIcon
|
|
26
|
-
} from 'vue-tabler-icons';
|
|
27
|
-
import Help from './Help.vue';
|
|
12
|
+
import TablerLabel from '../internal/Label.vue';
|
|
28
13
|
|
|
29
14
|
export default {
|
|
30
15
|
name: 'TablerToggle',
|
|
@@ -68,8 +53,7 @@ export default {
|
|
|
68
53
|
}
|
|
69
54
|
},
|
|
70
55
|
components: {
|
|
71
|
-
|
|
72
|
-
Help
|
|
56
|
+
TablerLabel
|
|
73
57
|
}
|
|
74
58
|
}
|
|
75
59
|
</script>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class='col-12 d-flex my-1'>
|
|
3
|
+
<span v-if='description' class='align-self-center'>
|
|
4
|
+
<InfoSquareIcon @click='help = true' size='20' class='cursor-pointer'/>
|
|
5
|
+
<Help v-if='help' @click='help = false' :label='label || placeholder' :description='description'/>
|
|
6
|
+
</span>
|
|
7
|
+
<div
|
|
8
|
+
v-if='label'
|
|
9
|
+
class="align-self-center px-2"
|
|
10
|
+
v-text='label'
|
|
11
|
+
:class='{
|
|
12
|
+
"required": required
|
|
13
|
+
}'
|
|
14
|
+
></div>
|
|
15
|
+
<div class='ms-auto align-self-center'>
|
|
16
|
+
<slot/>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import {
|
|
23
|
+
InfoSquareIcon
|
|
24
|
+
} from 'vue-tabler-icons';
|
|
25
|
+
import Help from '../Help.vue';
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
name: 'TablerInternalLabel',
|
|
29
|
+
props: {
|
|
30
|
+
required: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
description: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: '',
|
|
37
|
+
},
|
|
38
|
+
label: String,
|
|
39
|
+
},
|
|
40
|
+
data: function() {
|
|
41
|
+
return {
|
|
42
|
+
help: false,
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
components: {
|
|
46
|
+
Help,
|
|
47
|
+
InfoSquareIcon
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</script>
|
package/lib.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
+
// Inputs
|
|
2
|
+
export { default as TablerRange } from './components/input/Range.vue'
|
|
3
|
+
export { default as TablerColours } from './components/input/Colour.vue'
|
|
4
|
+
export { default as TablerSelect } from './components/input/Select.vue'
|
|
5
|
+
export { default as TablerToggle } from './components/input/Toggle.vue'
|
|
6
|
+
export { default as TablerInput } from './components/input/Input.vue'
|
|
7
|
+
export { default as TablerEnum } from './components/input/Enum.vue';
|
|
8
|
+
|
|
1
9
|
export { default as TablerDropdown } from './components/Dropdown.vue'
|
|
2
|
-
export { default as TablerRange } from './components/Range.vue'
|
|
3
10
|
export { default as TablerPager } from './components/Pager.vue'
|
|
4
11
|
export { default as TablerNone } from './components/None.vue'
|
|
5
12
|
export { default as TablerError } from './components/Err.vue'
|
|
6
13
|
export { default as TablerList } from './components/List.vue'
|
|
7
14
|
export { default as TablerHelp } from './components/Help.vue'
|
|
8
|
-
export { default as TablerSelect } from './components/Select.vue'
|
|
9
15
|
export { default as TablerModal } from './components/Modal.vue'
|
|
10
16
|
export { default as TablerProgress } from './components/Progress.vue'
|
|
11
17
|
export { default as TablerLoading } from './components/Loading.vue'
|
|
12
|
-
export { default as TablerToggle } from './components/Toggle.vue'
|
|
13
|
-
export { default as TablerInput } from './components/Input.vue'
|
|
14
18
|
export { default as TablerBreadCrumb } from './components/BreadCrumb.vue';
|
|
15
19
|
export { default as TablerBytes } from './components/Bytes.vue';
|
|
16
|
-
export { default as TablerEnum } from './components/Enum.vue';
|
|
17
20
|
export { default as TablerEpoch } from './components/Epoch.vue';
|
|
18
21
|
export { default as TablerEpochRange } from './components/EpochRange.vue';
|
|
19
22
|
export { default as TablerMarkdown } from './components/Markdown.vue';
|
package/package.json
CHANGED
|
File without changes
|