@everchron/ec-shards 0.6.95 → 0.6.99
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 +68 -34
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +68 -34
- 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/components/button-toolbar/button-toolbar.vue +39 -1
- package/src/components/modal/modal.vue +3 -3
- package/src/stories/button-toolbar/button-toolbar.stories.js +2 -1
- package/src/stories/button-toolbar/button-toolbar.stories.mdx +4 -3
package/package.json
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<a v-if="href" :href="href" :target="target" class="ecs-toolbar-button"
|
|
3
3
|
:class="[
|
|
4
4
|
iconClass,
|
|
5
5
|
active ? 'active' : '',
|
|
6
|
+
activeHighlight ? 'active-highlight' : '',
|
|
7
|
+
dropdown ? 'ecs-toolbar-button-dropdown' : '',
|
|
8
|
+
dropdownClass]"
|
|
9
|
+
@click="$emit('click', $event)">
|
|
10
|
+
|
|
11
|
+
<ecs-icon v-if="icon && iconPosition == 'left'" width="26" height="26" :type="icon" />
|
|
12
|
+
<slot></slot>
|
|
13
|
+
<span class="badge" v-if="badge" :style="{ background: badgeColor }"></span>
|
|
14
|
+
<ecs-icon v-if="icon && iconPosition == 'right'" width="26" height="26" :type="icon" />
|
|
15
|
+
</a>
|
|
16
|
+
|
|
17
|
+
<button v-else class="ecs-toolbar-button"
|
|
18
|
+
:class="[
|
|
19
|
+
iconClass,
|
|
20
|
+
active ? 'active' : '',
|
|
21
|
+
activeHighlight ? 'active-highlight' : '',
|
|
6
22
|
dropdown ? 'ecs-toolbar-button-dropdown' : '',
|
|
7
23
|
dropdownClass]"
|
|
8
24
|
@click="$emit('click', $event)">
|
|
@@ -23,6 +39,14 @@
|
|
|
23
39
|
},
|
|
24
40
|
|
|
25
41
|
props: {
|
|
42
|
+
href: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: null
|
|
45
|
+
},
|
|
46
|
+
target: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: null
|
|
49
|
+
},
|
|
26
50
|
icon: {
|
|
27
51
|
type: String,
|
|
28
52
|
default: null
|
|
@@ -40,6 +64,10 @@
|
|
|
40
64
|
type: Boolean,
|
|
41
65
|
default: false
|
|
42
66
|
},
|
|
67
|
+
activeHighlight: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false
|
|
70
|
+
},
|
|
43
71
|
badge: {
|
|
44
72
|
type: Boolean,
|
|
45
73
|
default: false
|
|
@@ -108,6 +136,16 @@
|
|
|
108
136
|
z-index: 2;
|
|
109
137
|
}
|
|
110
138
|
|
|
139
|
+
&.active-highlight{
|
|
140
|
+
background: rgba($blue-8, .1);
|
|
141
|
+
z-index: 2;
|
|
142
|
+
border: 1px solid $blue-5;
|
|
143
|
+
|
|
144
|
+
.icon{
|
|
145
|
+
color: $blue-10;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
111
149
|
&-icon-only{
|
|
112
150
|
width: 32px;
|
|
113
151
|
height: 32px;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<transition name="dialog-fade">
|
|
3
|
-
<div v-if="isShown" class="ecs-modal" :class="[typeClass,
|
|
3
|
+
<div v-if="isShown" class="ecs-modal" :class="[typeClass, clickthrough ? 'ecs-modal-click-through' : '']">
|
|
4
4
|
|
|
5
5
|
<div class="ecs-modal-dialog ecs-modal-sheet">
|
|
6
6
|
<div v-if="$slots.header" class="ecs-modal-header-wrap">
|
|
7
7
|
<slot name="header"></slot>
|
|
8
8
|
</div>
|
|
9
|
-
<div class="ecs-modal-content-wrap">
|
|
9
|
+
<div class="ecs-modal-content-wrap scrollbar">
|
|
10
10
|
<slot></slot>
|
|
11
11
|
</div>
|
|
12
12
|
<div v-if="$slots.footer" class="ecs-modal-footer-wrap">
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
validator: v => ['default', 'drawer',].includes(v),
|
|
36
36
|
default: 'default'
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
clickthrough: {
|
|
39
39
|
type: Boolean,
|
|
40
40
|
default: false
|
|
41
41
|
},
|
|
@@ -32,6 +32,7 @@ export const group = () => ({
|
|
|
32
32
|
template: `<ecs-button-toolbar-group>
|
|
33
33
|
<ecs-button-toolbar icon="marker" active />
|
|
34
34
|
<ecs-button-toolbar icon="rectangle" />
|
|
35
|
-
<ecs-button-toolbar icon="
|
|
35
|
+
<ecs-button-toolbar icon="rectangle" active-highlight />
|
|
36
|
+
<ecs-button-toolbar href="https://google.com" target="_blank" icon="delete" badge />
|
|
36
37
|
</ecs-button-toolbar-group>`,
|
|
37
38
|
});
|
|
@@ -69,8 +69,9 @@ Toolbar buttons can be grouped by wrapping them with the EcsToolbarButtonGroup c
|
|
|
69
69
|
```js
|
|
70
70
|
<ecs-button-toolbar-group>
|
|
71
71
|
<ecs-button-toolbar icon="marker" active />
|
|
72
|
-
<ecs-button-toolbar icon="
|
|
73
|
-
<ecs-button-toolbar icon="
|
|
72
|
+
<ecs-button-toolbar icon="rectangle" />
|
|
73
|
+
<ecs-button-toolbar icon="rectangle" active-highlight />
|
|
74
|
+
<ecs-button-toolbar icon="delete" badge />
|
|
74
75
|
</ecs-button-toolbar-group>
|
|
75
76
|
```
|
|
76
77
|
|
|
@@ -82,4 +83,4 @@ Toolbar buttons can be grouped by wrapping them with the EcsToolbarButtonGroup c
|
|
|
82
83
|
|
|
83
84
|
### EcsToolbarButtonGroup
|
|
84
85
|
|
|
85
|
-
<ArgsTable of={EcsButtonToolbarGroup} />
|
|
86
|
+
<ArgsTable of={EcsButtonToolbarGroup} />
|