@everchron/ec-shards 2.1.8 → 2.1.9
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 +49 -31
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +49 -31
- 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-list-item/data-list-item.vue +53 -19
- package/src/stories/Changelog.stories.mdx +6 -0
- package/src/stories/data-list/data-list-item.stories.js +19 -1
package/package.json
CHANGED
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
:class="[
|
|
5
5
|
small ? 'ecs-data-list-item-sml' : '',
|
|
6
6
|
full ? 'ecs-data-list-item-full' : '',
|
|
7
|
-
plain ? '' : '
|
|
7
|
+
plain ? 'plain' : 'filled',
|
|
8
|
+
indent ? 'indent' : '',
|
|
9
|
+
plain && bordered ? 'bordered' : ''
|
|
8
10
|
]">
|
|
9
|
-
<div class="ecs-data-list-identifier">
|
|
10
|
-
{{identifier}}
|
|
11
|
+
<div v-if="hasIdentifier" class="ecs-data-list-identifier">
|
|
12
|
+
{{ identifier }}
|
|
11
13
|
<ecs-button-more type="ellipsis"
|
|
12
14
|
v-if="$slots.collapse"
|
|
13
15
|
class="ecs-data-list-expand-button"
|
|
@@ -43,8 +45,7 @@
|
|
|
43
45
|
props: {
|
|
44
46
|
/** The label that shows up to the left of the list item. Usually describes the content to the left, e.g.: "Type", "Profiles", etc. */
|
|
45
47
|
identifier: {
|
|
46
|
-
type: String
|
|
47
|
-
required: true
|
|
48
|
+
type: String
|
|
48
49
|
},
|
|
49
50
|
/** Renders the list item in a smaller variant. */
|
|
50
51
|
small: {
|
|
@@ -90,6 +91,16 @@
|
|
|
90
91
|
plain: {
|
|
91
92
|
type: Boolean,
|
|
92
93
|
default: false
|
|
94
|
+
},
|
|
95
|
+
/** Adds a border bottom to each item (except the last in the list). **Important** the border is only applied when used in combination with the `plain` prop. */
|
|
96
|
+
bordered: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: false
|
|
99
|
+
},
|
|
100
|
+
/** Determines if there should be a left/right padding in the content areas. */
|
|
101
|
+
indent: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: true
|
|
93
104
|
}
|
|
94
105
|
},
|
|
95
106
|
|
|
@@ -104,7 +115,12 @@
|
|
|
104
115
|
if (this.type && this.type !== '')
|
|
105
116
|
return `data-list-data-${this.type}`
|
|
106
117
|
return this.type
|
|
107
|
-
}
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
hasIdentifier() {
|
|
121
|
+
if ((this.identifier && this.identifier !== '') || this.$slots.collapse)
|
|
122
|
+
return true
|
|
123
|
+
},
|
|
108
124
|
},
|
|
109
125
|
|
|
110
126
|
methods : {
|
|
@@ -195,10 +211,15 @@
|
|
|
195
211
|
}
|
|
196
212
|
}
|
|
197
213
|
|
|
198
|
-
&.
|
|
214
|
+
&.filled{
|
|
199
215
|
.ecs-data-list-identifier{
|
|
200
216
|
background: rgba($color-gray-6, .1);
|
|
201
217
|
color: $color-gray-10;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&.indent{
|
|
222
|
+
.ecs-data-list-identifier{
|
|
202
223
|
padding: 6px 8px;
|
|
203
224
|
}
|
|
204
225
|
|
|
@@ -206,24 +227,37 @@
|
|
|
206
227
|
padding: 6px 0 6px 8px;
|
|
207
228
|
}
|
|
208
229
|
}
|
|
230
|
+
|
|
231
|
+
&.bordered{
|
|
232
|
+
border-bottom: 1px solid $color-gray-3;
|
|
233
|
+
margin-bottom: 0;
|
|
234
|
+
}
|
|
209
235
|
}
|
|
210
236
|
|
|
211
237
|
> div{
|
|
212
|
-
&:first-child
|
|
213
|
-
|
|
238
|
+
&:first-child{
|
|
239
|
+
> .ecs-data-list-item .ecs-data-list-identifier{
|
|
240
|
+
border-top-left-radius: $border-radius-small;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
> .ecs-data-list-item.ecs-data-list-item-full .ecs-data-list-identifier{
|
|
244
|
+
border-top-left-radius: $border-radius-small;
|
|
245
|
+
border-top-right-radius: $border-radius-small;
|
|
246
|
+
}
|
|
214
247
|
}
|
|
215
248
|
|
|
216
|
-
&:last-child
|
|
217
|
-
|
|
218
|
-
|
|
249
|
+
&:last-child{
|
|
250
|
+
> .ecs-data-list-item .ecs-data-list-identifier{
|
|
251
|
+
border-bottom-left-radius: $border-radius-small;
|
|
252
|
+
}
|
|
219
253
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
254
|
+
> .ecs-data-list-item.ecs-data-list-item-full .ecs-data-list-identifier{
|
|
255
|
+
border-bottom-left-radius: 0;
|
|
256
|
+
}
|
|
224
257
|
|
|
225
|
-
|
|
226
|
-
|
|
258
|
+
.ecs-data-list-item.bordered{
|
|
259
|
+
border-bottom: none;
|
|
260
|
+
}
|
|
227
261
|
}
|
|
228
262
|
}
|
|
229
263
|
|
|
@@ -250,7 +284,7 @@
|
|
|
250
284
|
}
|
|
251
285
|
|
|
252
286
|
&-data{
|
|
253
|
-
|
|
287
|
+
flex: 1;
|
|
254
288
|
padding: 6px 0;
|
|
255
289
|
position: relative;
|
|
256
290
|
z-index: 0;
|
|
@@ -6,6 +6,12 @@ import { Meta } from '@storybook/addon-docs/blocks';
|
|
|
6
6
|
Changelog
|
|
7
7
|
</h1>
|
|
8
8
|
|
|
9
|
+
## Version 2.1.9 (1 November 2022)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- Added `indent` and `bordered` props to EcsDataListItem for more variants in possible style.
|
|
14
|
+
|
|
9
15
|
## Version 2.1.8 (30 October 2022)
|
|
10
16
|
|
|
11
17
|
### Features
|
|
@@ -11,7 +11,7 @@ export const dataListItem = () => ({
|
|
|
11
11
|
components: { EcsDataList, EcsDataListItem, EcsButton },
|
|
12
12
|
template: `<ecs-data-list>
|
|
13
13
|
<ecs-data-list-item identifier="Identifier">Data</ecs-data-list-item>
|
|
14
|
-
<ecs-data-list-item identifier="Identifier">Data</ecs-data-list-item>
|
|
14
|
+
<ecs-data-list-item escape identifier="Identifier">Data</ecs-data-list-item>
|
|
15
15
|
<ecs-data-list-item identifier="Identifier"><a href="https://google.com" target="_blank">Google</a></ecs-data-list-item>
|
|
16
16
|
</ecs-data-list>`
|
|
17
17
|
});
|
|
@@ -25,6 +25,24 @@ export const dataListItemFull = () => ({
|
|
|
25
25
|
</ecs-data-list>`
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
+
export const dataListItemPlain = () => ({
|
|
29
|
+
components: { EcsDataList, EcsDataListItem, EcsButton },
|
|
30
|
+
template: `<ecs-data-list>
|
|
31
|
+
<ecs-data-list-item plain identifier="Identifier">Data</ecs-data-list-item>
|
|
32
|
+
<ecs-data-list-item plain full identifier="Identifier">Full Data</ecs-data-list-item>
|
|
33
|
+
<ecs-data-list-item plain identifier="Identifier"><a href="https://google.com" target="_blank">Google</a></ecs-data-list-item>
|
|
34
|
+
</ecs-data-list>`
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const dataListItemPlainBordered = () => ({
|
|
38
|
+
components: { EcsDataList, EcsDataListItem, EcsButton },
|
|
39
|
+
template: `<ecs-data-list>
|
|
40
|
+
<ecs-data-list-item plain bordered identifier="Identifier">Data</ecs-data-list-item>
|
|
41
|
+
<ecs-data-list-item plain bordered full identifier="Identifier">Full Data</ecs-data-list-item>
|
|
42
|
+
<ecs-data-list-item plain bordered identifier="Identifier"><a href="https://google.com" target="_blank">Google</a></ecs-data-list-item>
|
|
43
|
+
</ecs-data-list>`
|
|
44
|
+
});
|
|
45
|
+
|
|
28
46
|
export const dataListItemExpandable = () => ({
|
|
29
47
|
components: { EcsDataList, EcsDataListItem },
|
|
30
48
|
template: `<ecs-data-list>
|