@everchron/ec-shards 4.1.0 → 4.1.2
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 +87 -88
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +87 -88
- package/dist/ec-shards.umd.js.map +1 -1
- package/dist/ec-shards.umd.min.js +1 -1
- package/dist/ec-shards.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/data-grid/data-grid-row.vue +3 -1
- package/src/components/data-grid/data-grid.vue +29 -2
- package/src/components/entry-link/entry-link.vue +2 -27
- package/src/stories/data-grid/data-grid-row.stories.js +2 -2
- package/src/stories/data-grid/data-grid.stories.js +19 -0
- package/src/stories/entry-link/entry-link.stories.js +0 -5
package/package.json
CHANGED
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
&.selected{
|
|
58
58
|
border-bottom-color: $color-blue-3;
|
|
59
|
+
background-color: #F4F9FF;
|
|
59
60
|
|
|
60
61
|
&:hover:before{
|
|
61
62
|
background-color: $color-blue-5;
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
|
|
66
67
|
&.opened{
|
|
67
68
|
border-bottom-color: $color-blue-3;
|
|
69
|
+
background-color: $color-blue-2;
|
|
68
70
|
|
|
69
71
|
&:hover:before{
|
|
70
72
|
background-color: $color-blue-5;
|
|
@@ -78,6 +80,7 @@
|
|
|
78
80
|
|
|
79
81
|
&.droppable{
|
|
80
82
|
border-bottom-color: $color-green-4;
|
|
83
|
+
background-color: $color-green-2;
|
|
81
84
|
cursor: copy;
|
|
82
85
|
|
|
83
86
|
&:hover:before{
|
|
@@ -97,4 +100,3 @@
|
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
</style>
|
|
100
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ecs-data-grid scrollbar" :class="$slots.empty ? 'empty' : ' '">
|
|
3
|
-
<div class="ecs-data-grid-head">
|
|
3
|
+
<div class="ecs-data-grid-head" :class="sidebarOverlay ? 'sidebar-space' : ''">
|
|
4
4
|
<!-- @slot Slot for the table head row cells. -->
|
|
5
5
|
<slot name="head"></slot>
|
|
6
6
|
</div>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<slot name="empty"></slot>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
|
-
<div v-else class="ecs-data-grid-rows" :class="striped ? 'striped' : ''">
|
|
13
|
+
<div v-else class="ecs-data-grid-rows" :class="[striped ? 'striped' : '', sidebarOverlay ? 'sidebar-space' : '']">
|
|
14
14
|
<!-- @slot Default slot for the table rows. -->
|
|
15
15
|
<slot></slot>
|
|
16
16
|
</div>
|
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
striped: {
|
|
25
25
|
type: Boolean,
|
|
26
26
|
default: true
|
|
27
|
+
},
|
|
28
|
+
/** If there is a sidebar overlaying this table, use this prop to add some forced padding on the right side, to avoid the sidebar blocking any actual content of the table rows. */
|
|
29
|
+
sidebarOverlay: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
27
32
|
}
|
|
28
33
|
},
|
|
29
34
|
|
|
@@ -72,16 +77,38 @@
|
|
|
72
77
|
position: sticky;
|
|
73
78
|
top: 0;
|
|
74
79
|
box-shadow: 0 1px 0 rgba($color-gray-6, .4);
|
|
80
|
+
|
|
81
|
+
&.sidebar-space{
|
|
82
|
+
padding-right: 54px;
|
|
83
|
+
}
|
|
75
84
|
}
|
|
76
85
|
|
|
77
86
|
&-rows{
|
|
78
87
|
flex: 1;
|
|
79
88
|
min-width: fit-content;
|
|
89
|
+
|
|
90
|
+
&.sidebar-space .ecs-data-grid-row{
|
|
91
|
+
padding-right: 54px;
|
|
92
|
+
}
|
|
80
93
|
}
|
|
81
94
|
|
|
82
95
|
&-empty{
|
|
83
96
|
flex: 1;
|
|
84
97
|
}
|
|
85
98
|
}
|
|
99
|
+
|
|
100
|
+
.ecs-data-grid-rows.striped{
|
|
101
|
+
.ecs-data-grid-row.default:nth-child(even){
|
|
102
|
+
background-color: #FBFBFC;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ecs-data-grid-row.added:nth-child(even){
|
|
106
|
+
animation: highlight-to-gray 8s ease forwards;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ecs-data-grid-row.added:nth-child(odd){
|
|
110
|
+
animation: highlight-to-white 8s ease forwards;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
86
113
|
</style>
|
|
87
114
|
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
<ecs-button-more v-if="moreButton" @click.stop="handleMoreButtonClick" type="ellipsis" :title="moreButtonTitle" />
|
|
15
|
-
<ecs-icon :type="hoverIcon" size="14" class="hover-icon" />
|
|
16
15
|
</div>
|
|
17
16
|
</template>
|
|
18
17
|
|
|
@@ -30,11 +29,6 @@
|
|
|
30
29
|
icon: {
|
|
31
30
|
type: String
|
|
32
31
|
},
|
|
33
|
-
/** If set, an icon will be added to the right of the button on mouse over. This is used to indicate what's going to happen when clicking the hovered element (e.g. opens document in new tab). The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
|
|
34
|
-
hoverIcon: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: 'open-external'
|
|
37
|
-
},
|
|
38
32
|
/** The text content of the link. */
|
|
39
33
|
label: {
|
|
40
34
|
type: String,
|
|
@@ -90,7 +84,7 @@
|
|
|
90
84
|
transition: .2s color, .2s background, .2s box-shadow, .2s opacity;
|
|
91
85
|
white-space: nowrap;
|
|
92
86
|
cursor: pointer;
|
|
93
|
-
z-index:
|
|
87
|
+
z-index: 0;
|
|
94
88
|
flex-shrink: 0;
|
|
95
89
|
max-width: 100%;
|
|
96
90
|
color: $color-gray-15;
|
|
@@ -114,11 +108,6 @@
|
|
|
114
108
|
transform: scale(1);
|
|
115
109
|
}
|
|
116
110
|
|
|
117
|
-
.hover-icon{
|
|
118
|
-
transform: translateX(0) scale(1);
|
|
119
|
-
opacity: 1;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
111
|
.entry-icon{
|
|
123
112
|
color: $color-gray-7;
|
|
124
113
|
}
|
|
@@ -136,7 +125,7 @@
|
|
|
136
125
|
|
|
137
126
|
.entry-icon{
|
|
138
127
|
color: $color-gray-6;
|
|
139
|
-
margin
|
|
128
|
+
margin: 0 $spacing-5 0 -2px;
|
|
140
129
|
}
|
|
141
130
|
|
|
142
131
|
&-label{
|
|
@@ -151,22 +140,8 @@
|
|
|
151
140
|
}
|
|
152
141
|
}
|
|
153
142
|
|
|
154
|
-
.hover-icon{
|
|
155
|
-
transform: translateX(-50%) scale(.5);
|
|
156
|
-
opacity: 0;
|
|
157
|
-
transition: .3s;
|
|
158
|
-
margin-left: $spacing-5;
|
|
159
|
-
color: $color-gray-8;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
143
|
.ecs-button-more-ellipsis{
|
|
163
144
|
margin: 0 $spacing-5 0 $spacing-10;
|
|
164
|
-
|
|
165
|
-
&:hover + .hover-icon{
|
|
166
|
-
transform: translateX(-50%) scale(.5);
|
|
167
|
-
opacity: 0;
|
|
168
|
-
margin-right: -20px;
|
|
169
|
-
}
|
|
170
145
|
}
|
|
171
146
|
|
|
172
147
|
.prepend{
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
export const states = () => ({
|
|
14
14
|
components: { EcsDataGrid, EcsDataGridGroup, EcsDataGridRow, EcsDataGridHeadCell, EcsDataGridCell },
|
|
15
15
|
template: `<div style="width: 100%; height: 500px">
|
|
16
|
-
<ecs-data-grid striped>
|
|
16
|
+
<ecs-data-grid striped sidebar-overlay>
|
|
17
17
|
<template slot="head">
|
|
18
18
|
<ecs-data-grid-head-cell name="First Column" :width="400" fixed-left fixed-left-last />
|
|
19
19
|
<ecs-data-grid-head-cell name="Second Column" :width="500" />
|
|
@@ -68,7 +68,7 @@ export const newRowStates = () => ({
|
|
|
68
68
|
template: `<div style="width: 100%; height: 400px">
|
|
69
69
|
<ecs-button @click="addRows" style="position:absolute; bottom: 16px; left: 16px;">Add Rows</ecs-button>
|
|
70
70
|
|
|
71
|
-
<ecs-data-grid>
|
|
71
|
+
<ecs-data-grid sidebar-overlay>
|
|
72
72
|
<template slot="head">
|
|
73
73
|
<ecs-data-grid-head-cell name="First Column" :width="400" fixed-left fixed-left-last />
|
|
74
74
|
<ecs-data-grid-head-cell name="Second Column" :width="500" />
|
|
@@ -46,3 +46,22 @@ export const gridStriped = () => ({
|
|
|
46
46
|
</ecs-data-grid>
|
|
47
47
|
</div>`,
|
|
48
48
|
});
|
|
49
|
+
|
|
50
|
+
export const gridSidebarPadding = () => ({
|
|
51
|
+
components: { EcsDataGrid, EcsDataGridGroup, EcsDataGridRow, EcsDataGridHeadCell, EcsDataGridCell },
|
|
52
|
+
template: `<div style="width: 100%; height: 500px">
|
|
53
|
+
<ecs-data-grid striped sidebar-overlay>
|
|
54
|
+
<template slot="head">
|
|
55
|
+
<ecs-data-grid-head-cell name="First Column" :min-width="200" :width="400" fixed-left fixed-left-last />
|
|
56
|
+
<ecs-data-grid-head-cell name="Second Column" :min-width="300" :width="500" />
|
|
57
|
+
<ecs-data-grid-head-cell name="Third Column" :min-width="140" :width="200" />
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<ecs-data-grid-row v-for="index in 100" :key="index">
|
|
61
|
+
<ecs-data-grid-cell column="first" :min-width="200" :width="400" fixed-left fixed-left-last>First Column</ecs-data-grid-cell>
|
|
62
|
+
<ecs-data-grid-cell column="second" :min-width="300" :width="500">Second Column</ecs-data-grid-cell>
|
|
63
|
+
<ecs-data-grid-cell column="third" :min-width="140" :width="200">Third Column</ecs-data-grid-cell>
|
|
64
|
+
</ecs-data-grid-row>
|
|
65
|
+
</ecs-data-grid>
|
|
66
|
+
</div>`,
|
|
67
|
+
});
|
|
@@ -20,11 +20,6 @@ export const entryLinkMoreButton = () => ({
|
|
|
20
20
|
template: `<ecs-entry-link icon="transcript" emphasized label="Entry Link Headline" more-button />`,
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
export const entryLinkHoverIcon = () => ({
|
|
24
|
-
components: { EcsEntryLink },
|
|
25
|
-
template: `<ecs-entry-link hover-icon="view" label="Change the :hover icon" />`,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
23
|
export const entryLinkEscaping = () => ({
|
|
29
24
|
components: { EcsEntryLink },
|
|
30
25
|
template: `<div style="width:500px">
|