vue-intergrall-plugins 0.0.129 → 0.0.130

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "0.0.129",
3
+ "version": "0.0.130",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <span class="simple-btn--icon" :class="{'custom' : !showFaIcon}">
3
+ <fa-icon v-if="showFaIcon" :icon="icon" />
4
+ <span v-else v-html="icon" />
5
+ </span>
6
+ </template>
7
+
8
+ <script>
9
+ export default {
10
+ props: {
11
+ icon: [String, Array],
12
+ default: ""
13
+ },
14
+ computed: {
15
+ showFaIcon() {
16
+ return Array.isArray(this.icon) && this.icon.length
17
+ }
18
+ }
19
+ }
20
+ </script>
21
+
22
+ <style>
23
+ .simple-btn--icon.custom > span {
24
+ width: 20px;
25
+ height: 20px;
26
+ }
27
+ </style>
@@ -0,0 +1,126 @@
1
+ <template>
2
+ <div class="simple-btn default-btn-style"
3
+ :style="`background-color: ${bg}; color: ${color};${aditionalStyle}`"
4
+ :class="[customClass]"
5
+ @click="$emit(emitter, params)"
6
+ >
7
+ <template v-if="!btnCustom">
8
+ <IconButton :icon="faIcon.length ? faIcon : svgIcon" />
9
+ </template>
10
+ <span class="icon-container default-btn-style" :style="`background-color: ${bg};`" v-else>
11
+ <IconButton :icon="faIcon.length ? faIcon : svgIcon" />
12
+ </span>
13
+ <span class="simple-btn--text" v-text="btnText"></span>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import IconButton from './IconButton'
19
+
20
+ export default {
21
+ components: { IconButton },
22
+ props: {
23
+ emitter: {
24
+ type: String,
25
+ required: true
26
+ },
27
+ params: {
28
+ type: [String, Object, Array, Number, Boolean],
29
+ required: false,
30
+ default: ''
31
+ },
32
+ bg: {
33
+ type: String,
34
+ required: true
35
+ },
36
+ color: {
37
+ type: String,
38
+ required: true
39
+ },
40
+ aditionalStyle: {
41
+ type: String,
42
+ default: ''
43
+ },
44
+ btnText: {
45
+ type: [String, Number],
46
+ default: ""
47
+ },
48
+ faIcon: {
49
+ type: Array,
50
+ default: () => { return [] }
51
+ },
52
+ svgIcon: {
53
+ type: String,
54
+ default: ""
55
+ },
56
+ customClass: {
57
+ type: String,
58
+ default: ''
59
+ },
60
+ btnCustom: {
61
+ type: Boolean,
62
+ default: false
63
+ }
64
+ }
65
+ }
66
+ </script>
67
+
68
+ <style>
69
+ .default-btn-style {
70
+ transition-duration: 300ms;
71
+ user-select: none;
72
+ cursor: pointer;
73
+ box-shadow: inset 0 -2px rgba(0, 0, 0, 0.2);
74
+ opacity: .9;
75
+ border-radius: 5px;
76
+ display: flex;
77
+ justify-content: center;
78
+ align-items: center;
79
+ padding: 5px;
80
+ cursor: pointer;
81
+ }
82
+ .default-btn-style:hover{
83
+ opacity: 1;
84
+ }
85
+ .default-btn-style:active{
86
+ opacity: 1;
87
+ box-shadow: inset 0 -1px rgba(0, 0, 0, 0.2);
88
+ -webkit-transform: translateY(1px);
89
+ -moz-transform: translateY(1px);
90
+ -o-transform: translateY(1px);
91
+ -ms-transform: translateY(1px);
92
+ transform: translateY(1px);
93
+ }
94
+
95
+ .simple-btn {
96
+ position: relative;
97
+ }
98
+
99
+ .simple-btn--icon {
100
+ display: flex;
101
+ justify-content: center;
102
+ align-items: center;
103
+ margin-right: 5px;
104
+ }
105
+ .simple-btn--icon.custom {
106
+ min-width: 25px;
107
+ }
108
+
109
+ .icon-container {
110
+ position: absolute;
111
+ left: -15px;
112
+ padding: 5px;
113
+ width: 40px;
114
+ height: 40px;
115
+ display: flex;
116
+ justify-content: center;
117
+ align-items: center;
118
+ border-radius: 50%;
119
+ }
120
+ .icon-container svg {
121
+ color: rgba(255, 255, 255, .5);
122
+ width: 23px;
123
+ height: 23px;
124
+ }
125
+
126
+ </style>