@everchron/ec-shards 0.5.26 → 0.5.30
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 +866 -517
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +866 -517
- 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/.DS_Store +0 -0
- package/src/assets/.DS_Store +0 -0
- package/src/assets/icons/.DS_Store +0 -0
- package/src/assets/images/.DS_Store +0 -0
- package/src/assets/images/spinner/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/action-toolbar/action-toolbar.vue +6 -52
- package/src/components/button/button.vue +4 -2
- package/src/components/button-table/button-table.vue +13 -1
- package/src/components/checkbox/checkbox.vue +3 -2
- package/src/components/form-check/form-check.vue +25 -6
- package/src/components/layout-index/layout-index.vue +0 -4
- package/src/components/radiobutton/radiobutton.vue +5 -2
- package/src/components/video/video.vue +7 -2
- package/src/stories/.DS_Store +0 -0
- package/src/stories/button-table/button-table.stories.js +5 -0
- package/src/stories/button-table/button-table.stories.mdx +13 -1
- package/src/stories/checkbox/checkbox.stories.js +2 -0
- package/src/stories/radiobutton/radiobutton.stories.js +2 -0
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ecs-action-toolbar" :class="[show ? `show` : '']">
|
|
3
|
-
<
|
|
4
|
-
<ecs-checkbox :class="{loading}">
|
|
5
|
-
<span class="number">{{selected}}</span>
|
|
6
|
-
<span class="type">Selected {{selectedType}}</span>
|
|
7
|
-
</ecs-checkbox>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<span class="divider" v-if="hasSelection"></span>
|
|
11
|
-
|
|
12
|
-
<div class="ecs-action-toolbar-actions" v-if="$slots.default">
|
|
13
|
-
<slot></slot>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<div class="ecs-action-toolbar-custom" v-if="$slots.custom">
|
|
17
|
-
<slot name="custom"></slot>
|
|
18
|
-
</div>
|
|
3
|
+
<slot></slot>
|
|
19
4
|
</div>
|
|
20
5
|
</template>
|
|
21
6
|
|
|
@@ -62,14 +47,11 @@
|
|
|
62
47
|
margin-top: -$toolbar_sub_height;
|
|
63
48
|
background: #FFF;
|
|
64
49
|
box-shadow: 0 1px 0 rgba($gray-10, .2);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
&.show{
|
|
69
|
-
margin-top: 0;
|
|
70
|
-
opacity: 1;
|
|
71
|
-
}
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
72
52
|
|
|
53
|
+
<style lang="scss">
|
|
54
|
+
.ecs-action-toolbar{
|
|
73
55
|
.divider{
|
|
74
56
|
height: 26px;
|
|
75
57
|
width: 1px;
|
|
@@ -78,28 +60,6 @@
|
|
|
78
60
|
background: #E2E3E4;
|
|
79
61
|
}
|
|
80
62
|
|
|
81
|
-
&-selection{
|
|
82
|
-
min-width: 165px;
|
|
83
|
-
padding-right: 10px;
|
|
84
|
-
|
|
85
|
-
.ecs-form-check{
|
|
86
|
-
margin-bottom: 0;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.ecs-form-check-label{
|
|
90
|
-
font-size: 12px;
|
|
91
|
-
line-height: 21px;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.number{
|
|
95
|
-
font-weight: 500;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.type{
|
|
99
|
-
color: $gray-10;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
63
|
&-actions{
|
|
104
64
|
display: flex;
|
|
105
65
|
align-items: center;
|
|
@@ -108,11 +68,5 @@
|
|
|
108
68
|
margin: 0 5px;
|
|
109
69
|
}
|
|
110
70
|
}
|
|
111
|
-
|
|
112
|
-
&-custom{
|
|
113
|
-
display: flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
width: 100%;
|
|
116
|
-
}
|
|
117
71
|
}
|
|
118
|
-
</style>
|
|
72
|
+
</style>
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
fullWidth ? `ecs-button-full-width` : '',
|
|
10
10
|
loading ? `loading` : '',
|
|
11
11
|
iconOnly ? `ecs-button-icon-only` : '']"
|
|
12
|
-
@click="$emit('click', $event)"
|
|
12
|
+
@click="$emit('click', $event)"
|
|
13
|
+
@hover="$emit('hover', $event)">
|
|
13
14
|
|
|
14
15
|
<ecs-icon v-if="icon || loading" :type="iconType" :width="iconSize" :height="iconSize" />
|
|
15
16
|
<slot></slot>
|
|
@@ -25,7 +26,8 @@
|
|
|
25
26
|
fullWidth ? `ecs-button-full-width` : '',
|
|
26
27
|
loading ? `loading` : '',
|
|
27
28
|
iconOnly ? `ecs-button-icon-only` : '']"
|
|
28
|
-
@click="$emit('click', $event)"
|
|
29
|
+
@click="$emit('click', $event)"
|
|
30
|
+
@hover="$emit('hover', $event)">
|
|
29
31
|
|
|
30
32
|
<ecs-icon v-if="icon || loading" :type="iconType" :width="iconSize" :height="iconSize" />
|
|
31
33
|
<slot></slot>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
3
|
class="ecs-button-table"
|
|
4
|
-
:class="[ active ?
|
|
4
|
+
:class="[ active ? 'active' : '', hasLabel, subtle ? 'subtle' : '' ]"
|
|
5
5
|
@click="$emit('click', $event)">
|
|
6
6
|
|
|
7
7
|
<ecs-icon v-if="icon" :type="icon" width="20" height="20" />
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
|
|
20
20
|
props: {
|
|
21
21
|
active: Boolean,
|
|
22
|
+
subtle: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
22
26
|
icon: {
|
|
23
27
|
type: String
|
|
24
28
|
},
|
|
@@ -65,6 +69,14 @@
|
|
|
65
69
|
padding: 4px;
|
|
66
70
|
}
|
|
67
71
|
|
|
72
|
+
&.subtle{
|
|
73
|
+
background: transparent;
|
|
74
|
+
|
|
75
|
+
&:hover{
|
|
76
|
+
background: rgba($gray-8, .1);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
68
80
|
&:hover{
|
|
69
81
|
background: rgba($gray-8, .2);
|
|
70
82
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ecs-form-check :class="[
|
|
3
3
|
inline ? `ecs-form-check-inline` : '',
|
|
4
|
-
disabled ? `disabled` : ''
|
|
4
|
+
disabled ? `disabled` : '',
|
|
5
|
+
$slots.default ? '' : 'stand-alone']">
|
|
5
6
|
|
|
6
7
|
<input
|
|
7
8
|
class="ecs-form-check-input"
|
|
@@ -131,7 +132,7 @@
|
|
|
131
132
|
width: 18px;
|
|
132
133
|
height: 18px;
|
|
133
134
|
left: 0;
|
|
134
|
-
top:
|
|
135
|
+
top: 0;
|
|
135
136
|
background: svg-uri('<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><polyline fill="none" stroke="#{$blue-10}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" points="6 9.259 8.347 11.998 12 6"/></svg>');
|
|
136
137
|
}
|
|
137
138
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ecs-form-check"
|
|
3
3
|
:class="[
|
|
4
|
-
inline ?
|
|
5
|
-
disabled ?
|
|
4
|
+
inline ? 'ecs-form-check-inline' : '',
|
|
5
|
+
disabled ? 'disabled' : '']">
|
|
6
6
|
|
|
7
7
|
<slot></slot>
|
|
8
8
|
</div>
|
|
@@ -30,38 +30,54 @@
|
|
|
30
30
|
.ecs-form-check {
|
|
31
31
|
position: relative;
|
|
32
32
|
display: block;
|
|
33
|
+
height: 18px;
|
|
33
34
|
margin-bottom: $form-check-margin-bottom;
|
|
35
|
+
|
|
36
|
+
&.stand-alone{
|
|
37
|
+
margin-bottom: 0;
|
|
38
|
+
width: 18px;
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
&-inline{
|
|
35
42
|
display: inline-block;
|
|
36
43
|
margin-right: 30px;
|
|
37
44
|
}
|
|
45
|
+
|
|
38
46
|
&.disabled {
|
|
39
47
|
.ecs-form-check-label {
|
|
40
48
|
color: $gray-8;
|
|
41
49
|
}
|
|
42
50
|
}
|
|
51
|
+
|
|
43
52
|
&.loading{
|
|
44
53
|
.form-check-label{
|
|
45
54
|
opacity: .6;
|
|
46
55
|
cursor: wait;
|
|
47
56
|
}
|
|
48
57
|
}
|
|
49
|
-
|
|
58
|
+
|
|
59
|
+
.ecs-tooltip-info {
|
|
50
60
|
left: 3px;
|
|
51
61
|
top: 3px;
|
|
52
62
|
}
|
|
53
63
|
}
|
|
64
|
+
|
|
54
65
|
.ecs-form-check-label {
|
|
55
|
-
|
|
66
|
+
min-width: 18px;
|
|
67
|
+
height: 18px;
|
|
56
68
|
margin-bottom: 0;
|
|
69
|
+
padding-left: 30px;
|
|
57
70
|
}
|
|
71
|
+
|
|
58
72
|
.ecs-form-check-input {
|
|
59
73
|
position: absolute;
|
|
60
74
|
opacity: 0;
|
|
75
|
+
|
|
61
76
|
& + label {
|
|
62
77
|
position: relative;
|
|
63
78
|
cursor: pointer;
|
|
64
79
|
}
|
|
80
|
+
|
|
65
81
|
// Box
|
|
66
82
|
& + label:before {
|
|
67
83
|
content: '';
|
|
@@ -69,24 +85,27 @@
|
|
|
69
85
|
vertical-align: text-top;
|
|
70
86
|
position: absolute;
|
|
71
87
|
left: 0;
|
|
72
|
-
top:
|
|
88
|
+
top: 0;
|
|
73
89
|
width: 18px;
|
|
74
90
|
height: 18px;
|
|
75
91
|
background: white;
|
|
76
92
|
border: 1px solid rgba($gray-8, .4);
|
|
77
93
|
border-radius: 2px;
|
|
78
94
|
}
|
|
95
|
+
|
|
79
96
|
// Box focus
|
|
80
97
|
&:focus + label:before {
|
|
81
98
|
outline: none;
|
|
82
99
|
border-color: rgba($blue-10, .3);
|
|
83
100
|
box-shadow: 0 0 0 2px rgba($blue-10, .2);
|
|
84
101
|
}
|
|
102
|
+
|
|
85
103
|
// Box checked
|
|
86
104
|
&:checked + label:before {
|
|
87
105
|
background: rgba($blue-10, .07);
|
|
88
106
|
border-color: rgba($blue-10, .3);
|
|
89
107
|
}
|
|
108
|
+
|
|
90
109
|
// Disabled state label
|
|
91
110
|
&:disabled + label {
|
|
92
111
|
cursor: auto;
|
|
@@ -97,7 +116,7 @@
|
|
|
97
116
|
label{
|
|
98
117
|
display: inline-block;
|
|
99
118
|
font-size: 14px;
|
|
100
|
-
line-height:
|
|
119
|
+
line-height: 18px;
|
|
101
120
|
margin-bottom: $form-text-margin-bottom;
|
|
102
121
|
-webkit-user-select: none;
|
|
103
122
|
-moz-user-select: none;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ecs-form-check :class="[
|
|
3
3
|
inline ? `ecs-form-check-inline` : '',
|
|
4
|
-
disabled ? `disabled` : ''
|
|
4
|
+
disabled ? `disabled` : '',
|
|
5
|
+
$slots.default ? '' : 'stand-alone']">
|
|
5
6
|
|
|
6
7
|
<input
|
|
7
8
|
class="ecs-form-check-input"
|
|
@@ -115,16 +116,18 @@
|
|
|
115
116
|
&[type="radio"] + label:before{
|
|
116
117
|
border-radius: 100%;
|
|
117
118
|
}
|
|
119
|
+
|
|
118
120
|
&:checked + label:after {
|
|
119
121
|
content: '';
|
|
120
122
|
position: absolute;
|
|
121
123
|
}
|
|
124
|
+
|
|
122
125
|
&[type="radio"]:checked + label:after{
|
|
123
126
|
border-radius: 100%;
|
|
124
127
|
background: $blue-10;
|
|
125
128
|
width: 6px;
|
|
126
129
|
height: 6px;
|
|
127
|
-
top:
|
|
130
|
+
top: 6px;
|
|
128
131
|
left: 6px;
|
|
129
132
|
}
|
|
130
133
|
}
|
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
:loop="loop"
|
|
6
6
|
:controls="controls"
|
|
7
7
|
class="ecs-video"
|
|
8
|
+
:src="mp4Source"
|
|
8
9
|
>
|
|
10
|
+
<!--
|
|
9
11
|
<source v-if="webmSource" :src="webmSource" type='video/webm; codecs="vp8, vorbis"' />
|
|
10
12
|
<source v-if="mp4Source" :src="mp4Source" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
|
|
11
13
|
<source v-if="ogvSource" :src="ogvSource" type='video/ogg; codecs="theora, vorbis"' />
|
|
14
|
+
-->
|
|
12
15
|
</video>
|
|
13
16
|
</template>
|
|
14
17
|
|
|
@@ -31,11 +34,12 @@
|
|
|
31
34
|
type: Boolean,
|
|
32
35
|
default: true
|
|
33
36
|
},
|
|
34
|
-
|
|
37
|
+
mp4Source: {
|
|
35
38
|
type: String,
|
|
36
39
|
default: null
|
|
37
40
|
},
|
|
38
|
-
|
|
41
|
+
/*
|
|
42
|
+
webmSource: {
|
|
39
43
|
type: String,
|
|
40
44
|
default: null
|
|
41
45
|
},
|
|
@@ -43,6 +47,7 @@
|
|
|
43
47
|
type: String,
|
|
44
48
|
default: null
|
|
45
49
|
}
|
|
50
|
+
*/
|
|
46
51
|
}
|
|
47
52
|
}
|
|
48
53
|
</script>
|
|
Binary file
|
|
@@ -14,3 +14,8 @@ export const iconOnly = () => ({
|
|
|
14
14
|
components: { EcsButtonTable },
|
|
15
15
|
template: `<ecs-button-table icon="expand" active />`,
|
|
16
16
|
});
|
|
17
|
+
|
|
18
|
+
export const subtle = () => ({
|
|
19
|
+
components: { EcsButtonTable },
|
|
20
|
+
template: `<ecs-button-table icon="person" subtle label="5" />`,
|
|
21
|
+
});
|
|
@@ -33,7 +33,19 @@ Add text (usually a count) by using the `label` attribute. An icon should always
|
|
|
33
33
|
</Canvas>
|
|
34
34
|
|
|
35
35
|
```js
|
|
36
|
-
<ecs-button-table icon="
|
|
36
|
+
<ecs-button-table icon="expand" active />
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Subtle Variant
|
|
40
|
+
|
|
41
|
+
<Canvas withSource="none" withToolbar={true}>
|
|
42
|
+
<Story name="subtle" height="60px">
|
|
43
|
+
{stories.subtle()}
|
|
44
|
+
</Story>
|
|
45
|
+
</Canvas>
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
<ecs-button-table icon="person" subtle label="5" />
|
|
37
49
|
```
|
|
38
50
|
|
|
39
51
|
## Props and Events
|
|
@@ -15,6 +15,8 @@ export const checkbox = () => ({
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
template: `<div>
|
|
18
|
+
<ecs-checkbox />
|
|
19
|
+
<hr style="border: none; border-bottom: 1px solid #DADEE6; margin: 20px 0">
|
|
18
20
|
<ecs-checkbox v-model="first" name="name">Label</ecs-checkbox>
|
|
19
21
|
<ecs-checkbox v-model="second" name="name">Checked</ecs-checkbox>
|
|
20
22
|
<ecs-checkbox v-model="third" name="name" disabled>Disabled</ecs-checkbox>
|
|
@@ -13,6 +13,8 @@ export const radiobutton = () => ({
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
template: `<div>
|
|
16
|
+
<ecs-radiobutton />
|
|
17
|
+
<hr style="border: none; border-bottom: 1px solid #DADEE6; margin: 20px 0">
|
|
16
18
|
<ecs-radiobutton name="fruits" v-model="selected" value="orange">Label</ecs-radiobutton>
|
|
17
19
|
<ecs-radiobutton name="fruits" v-model="selected" value="apple" checked>Checked</ecs-radiobutton>
|
|
18
20
|
<ecs-radiobutton name="fruits" v-model="selected" value="grape" disabled>Disabled</ecs-radiobutton>
|