@everchron/ec-shards 0.7.12 → 0.7.15
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/dist/ec-shards.common.js +109 -56
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +109 -56
- package/dist/ec-shards.umd.js.map +1 -1
- package/dist/ec-shards.umd.min.js +2 -2
- package/dist/ec-shards.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons/swap.svg +6 -0
- package/src/components/button-toolbar/button-toolbar.vue +21 -4
- package/src/components/overlay/overlay.vue +19 -1
- package/src/stories/button-toolbar/button-toolbar.stories.js +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path vector-effect="non-scaling-stroke" d="M10.9 6L7 9.9L10.9 13.8" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path vector-effect="non-scaling-stroke" d="M22.1667 9.89996H7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path vector-effect="non-scaling-stroke" d="M18.2667 24.6333L22.1667 20.7333L18.2667 16.8333" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path vector-effect="non-scaling-stroke" d="M7 20.7333H22.1667" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
</svg>
|
|
@@ -3,30 +3,32 @@
|
|
|
3
3
|
:class="[
|
|
4
4
|
iconClass,
|
|
5
5
|
active ? 'active' : '',
|
|
6
|
+
loading ? 'loading' : '',
|
|
6
7
|
activeHighlight ? 'active-highlight' : '',
|
|
7
8
|
dropdown ? 'ecs-toolbar-button-dropdown' : '',
|
|
8
9
|
dropdownClass]"
|
|
9
10
|
@click="$emit('click', $event)">
|
|
10
11
|
|
|
11
|
-
<ecs-icon v-if="icon && iconPosition == 'left'" :width="iconSize" :height="iconSize" :color="iconTint" :type="
|
|
12
|
+
<ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :width="iconSize" :height="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
|
|
12
13
|
<slot></slot>
|
|
13
14
|
<span class="badge" v-if="badge" :style="{ background: badgeColor }"></span>
|
|
14
|
-
<ecs-icon v-if="icon && iconPosition == 'right'" :width="iconSize" :height="iconSize" :color="iconTint" :type="
|
|
15
|
+
<ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :width="iconSize" :height="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
|
|
15
16
|
</a>
|
|
16
17
|
|
|
17
18
|
<button v-else class="ecs-toolbar-button"
|
|
18
19
|
:class="[
|
|
19
20
|
iconClass,
|
|
20
21
|
active ? 'active' : '',
|
|
22
|
+
loading ? 'loading' : '',
|
|
21
23
|
activeHighlight ? 'active-highlight' : '',
|
|
22
24
|
dropdown ? 'ecs-toolbar-button-dropdown' : '',
|
|
23
25
|
dropdownClass]"
|
|
24
26
|
@click="$emit('click', $event)">
|
|
25
27
|
|
|
26
|
-
<ecs-icon v-if="icon && iconPosition == 'left'" :width="iconSize" :height="iconSize" :color="iconTint" :type="
|
|
28
|
+
<ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :width="iconSize" :height="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
|
|
27
29
|
<slot></slot>
|
|
28
30
|
<span class="badge" v-if="badge" :style="{ background: badgeColor }"></span>
|
|
29
|
-
<ecs-icon v-if="icon && iconPosition == 'right'" :width="iconSize" :height="iconSize" :color="iconTint" :type="
|
|
31
|
+
<ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :width="iconSize" :height="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
|
|
30
32
|
</button>
|
|
31
33
|
</template>
|
|
32
34
|
|
|
@@ -51,6 +53,10 @@
|
|
|
51
53
|
type: String,
|
|
52
54
|
default: null
|
|
53
55
|
},
|
|
56
|
+
loading: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
54
60
|
iconSize: {
|
|
55
61
|
type: String,
|
|
56
62
|
default: '26'
|
|
@@ -99,6 +105,12 @@
|
|
|
99
105
|
return this.icon
|
|
100
106
|
},
|
|
101
107
|
|
|
108
|
+
iconType() {
|
|
109
|
+
if (this.loading)
|
|
110
|
+
return 'loading'
|
|
111
|
+
return this.icon
|
|
112
|
+
},
|
|
113
|
+
|
|
102
114
|
iconTint() {
|
|
103
115
|
if (this.activeHighlight)
|
|
104
116
|
return '#0961EB'
|
|
@@ -197,6 +209,11 @@
|
|
|
197
209
|
}
|
|
198
210
|
}
|
|
199
211
|
|
|
212
|
+
&.loading{
|
|
213
|
+
cursor: wait;
|
|
214
|
+
opacity: .7;
|
|
215
|
+
}
|
|
216
|
+
|
|
200
217
|
&-dropdown{
|
|
201
218
|
padding-right: 22px;
|
|
202
219
|
|
|
@@ -12,7 +12,17 @@
|
|
|
12
12
|
<div v-if="$slots.headercontrols" class="ecs-overlay-header-controls">
|
|
13
13
|
<slot name="headercontrols"></slot>
|
|
14
14
|
</div>
|
|
15
|
-
<ecs-button-toolbar
|
|
15
|
+
<ecs-button-toolbar
|
|
16
|
+
v-if="$slots.sidebar && width <= 1500"
|
|
17
|
+
@click="sidebarToggle"
|
|
18
|
+
:icon="sidebarIcon"
|
|
19
|
+
:title="showSidebar ? 'Hide ' + sidebarTitle : 'Show ' + sidebarTitle"
|
|
20
|
+
:active="showSidebar"
|
|
21
|
+
:badge="sidebarIconBadge"
|
|
22
|
+
:badge-color="sidebarIconBadgeColor"
|
|
23
|
+
:loading="sidebarIconLoading"
|
|
24
|
+
class="sidebar-button"
|
|
25
|
+
/>
|
|
16
26
|
<ecs-button-toolbar @click="$emit('close')" :disabled="closeDisabled" icon="close">{{ closeText }}</ecs-button-toolbar>
|
|
17
27
|
</div>
|
|
18
28
|
<div ref="content" class="ecs-overlay-content scrollbar">
|
|
@@ -99,6 +109,14 @@
|
|
|
99
109
|
sidebarIconBadge: {
|
|
100
110
|
type: Boolean,
|
|
101
111
|
default: false
|
|
112
|
+
},
|
|
113
|
+
sidebarIconBadgeColor: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: '#FF4B62'
|
|
116
|
+
},
|
|
117
|
+
sidebarIconLoading: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: false
|
|
102
120
|
}
|
|
103
121
|
},
|
|
104
122
|
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
|
|
9
9
|
export const regular = () => ({
|
|
10
10
|
components: { EcsButtonToolbar },
|
|
11
|
-
template: `<ecs-button-toolbar icon="marker"></ecs-button-toolbar>`,
|
|
11
|
+
template: `<ecs-button-toolbar loading icon="marker"></ecs-button-toolbar>`,
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
export const regularText = () => ({
|