@tak-ps/vue-tabler 3.72.0 → 3.73.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/Delete.vue +4 -1
- package/components/InlineAlert.vue +75 -0
- package/components/input/FileInput.vue +103 -0
- package/components/internal/Label.vue +4 -1
- package/lib.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/components/Delete.vue
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class='col-lg-12'>
|
|
3
|
+
<div
|
|
4
|
+
class='alert d-flex'
|
|
5
|
+
:class='`alert-${props.severity} ${props.dismissable ? "alert-dismissible" : ""}`'
|
|
6
|
+
role='alert'
|
|
7
|
+
>
|
|
8
|
+
<div class='alert-icon'>
|
|
9
|
+
<IconInfoCircle
|
|
10
|
+
v-if='props.severity === "info"'
|
|
11
|
+
:size='24'
|
|
12
|
+
stroke='1'
|
|
13
|
+
/>
|
|
14
|
+
<IconExclamationCircle
|
|
15
|
+
v-else-if='props.severity === "danger"'
|
|
16
|
+
:size='24'
|
|
17
|
+
stroke='1'
|
|
18
|
+
/>
|
|
19
|
+
<IconAlertTriangle
|
|
20
|
+
v-else-if='props.severity === "warning"'
|
|
21
|
+
:size='24'
|
|
22
|
+
stroke='1'
|
|
23
|
+
/>
|
|
24
|
+
<IconCheck
|
|
25
|
+
v-else-if='props.severity === "success"'
|
|
26
|
+
:size='24'
|
|
27
|
+
stroke='1'
|
|
28
|
+
/>
|
|
29
|
+
<IconQuestionMark
|
|
30
|
+
v-else
|
|
31
|
+
:size='24'
|
|
32
|
+
stroke='1'
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div>
|
|
37
|
+
<h4
|
|
38
|
+
class='alert-heading'
|
|
39
|
+
v-text='props.title'
|
|
40
|
+
/>
|
|
41
|
+
<div
|
|
42
|
+
v-if='props.description'
|
|
43
|
+
class='alert-description'
|
|
44
|
+
v-text='props.description'
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
<a
|
|
48
|
+
v-if='props.dismissable'
|
|
49
|
+
class='btn-close'
|
|
50
|
+
data-bs-dismiss='alert'
|
|
51
|
+
aria-label='close'
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script setup lang='ts'>
|
|
58
|
+
import { withDefaults } from 'vue'
|
|
59
|
+
import {
|
|
60
|
+
IconQuestionMark,
|
|
61
|
+
IconInfoCircle,
|
|
62
|
+
IconExclamationCircle,
|
|
63
|
+
IconAlertTriangle
|
|
64
|
+
} from '@tabler/icons-vue';
|
|
65
|
+
|
|
66
|
+
const props = withDefaults(defineProps<{
|
|
67
|
+
severity: string // info, danger, warning, success
|
|
68
|
+
title: string
|
|
69
|
+
description?: string
|
|
70
|
+
dismissable: boolean
|
|
71
|
+
}>(), {
|
|
72
|
+
severity: 'info',
|
|
73
|
+
dismissable: false,
|
|
74
|
+
});
|
|
75
|
+
</script>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class='row'>
|
|
3
|
+
<TablerLabel
|
|
4
|
+
v-if='label'
|
|
5
|
+
:label='label'
|
|
6
|
+
:description='description'
|
|
7
|
+
:required='required'
|
|
8
|
+
>
|
|
9
|
+
<slot />
|
|
10
|
+
</TablerLabel>
|
|
11
|
+
<div class='col-12'>
|
|
12
|
+
<input
|
|
13
|
+
ref='text-input'
|
|
14
|
+
:disabled='disabled'
|
|
15
|
+
:autofocus='autofocus'
|
|
16
|
+
:accept='accept'
|
|
17
|
+
type='file'
|
|
18
|
+
:class='{
|
|
19
|
+
"is-invalid": errorstr
|
|
20
|
+
}'
|
|
21
|
+
class='form-control'
|
|
22
|
+
:placeholder='placeholder||label||""'
|
|
23
|
+
@change='$emit("change", $event)'
|
|
24
|
+
@blur='$emit("blur")'
|
|
25
|
+
>
|
|
26
|
+
<span
|
|
27
|
+
v-if='loading'
|
|
28
|
+
class='input-icon-addon'
|
|
29
|
+
>
|
|
30
|
+
<div
|
|
31
|
+
class='spinner-border spinner-border-sm text-secondary'
|
|
32
|
+
role='status'
|
|
33
|
+
/>
|
|
34
|
+
</span>
|
|
35
|
+
<div
|
|
36
|
+
v-if='errorstr'
|
|
37
|
+
class='invalid-feedback'
|
|
38
|
+
v-text='errorstr'
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import TablerLabel from '../internal/Label.vue';
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
name: 'TablerFileInput',
|
|
49
|
+
components: {
|
|
50
|
+
TablerLabel
|
|
51
|
+
},
|
|
52
|
+
props: {
|
|
53
|
+
modelValue: {
|
|
54
|
+
type: [String, Number],
|
|
55
|
+
required: true
|
|
56
|
+
},
|
|
57
|
+
autofocus: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
},
|
|
61
|
+
loading: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false
|
|
64
|
+
},
|
|
65
|
+
required: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false,
|
|
68
|
+
},
|
|
69
|
+
disabled: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
73
|
+
accept: {
|
|
74
|
+
type: String,
|
|
75
|
+
},
|
|
76
|
+
description: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: '',
|
|
79
|
+
},
|
|
80
|
+
label: String,
|
|
81
|
+
placeholder: String,
|
|
82
|
+
error: String,
|
|
83
|
+
},
|
|
84
|
+
emits: ['blur', 'change'],
|
|
85
|
+
data: function() {
|
|
86
|
+
return {
|
|
87
|
+
help: false,
|
|
88
|
+
internal_error: '',
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
computed: {
|
|
92
|
+
errorstr: function() {
|
|
93
|
+
if (this.error) return this.error;
|
|
94
|
+
return this.internal_error;
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
mounted: function() {
|
|
98
|
+
if (this.autofocus) {
|
|
99
|
+
this.$refs['text-input'].focus();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</script>
|
package/lib.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// Inputs
|
|
2
|
-
export { default as TablerAlert } from './components/Alert.vue'
|
|
3
2
|
export { default as TablerTimeZone } from './components/input/TimeZone.vue'
|
|
4
3
|
export { default as TablerRange } from './components/input/Range.vue'
|
|
5
4
|
export { default as TablerColour } from './components/input/Colour.vue'
|
|
@@ -9,6 +8,8 @@ export { default as TablerInput } from './components/input/Input.vue'
|
|
|
9
8
|
export { default as TablerFileInput } from './components/input/FileInput.vue'
|
|
10
9
|
export { default as TablerEnum } from './components/input/Enum.vue';
|
|
11
10
|
|
|
11
|
+
export { default as TablerAlert } from './components/Alert.vue'
|
|
12
|
+
export { default as TablerInlineAlert } from './components/InlineAlert.vue'
|
|
12
13
|
export { default as TablerButton } from './components/Button.vue'
|
|
13
14
|
export { default as TablerRefreshButton } from './components/RefreshButton.vue'
|
|
14
15
|
export { default as TablerIconButton } from './components/IconButton.vue'
|