@everchron/ec-shards 0.8.6 → 0.8.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 +123 -0
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +123 -0
- 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/assets/icons/color-bucket.svg +7 -0
- package/src/components/dropdown/dropdown.vue +117 -0
- package/src/components/index.js +2 -0
- package/src/stories/collection-control/.DS_Store +0 -0
- package/src/stories/comment/.DS_Store +0 -0
- package/src/stories/data-card/.DS_Store +0 -0
- package/src/stories/data-list-item/.DS_Store +0 -0
- package/src/stories/dialog/.DS_Store +0 -0
- package/src/stories/dialog-header/.DS_Store +0 -0
- package/src/stories/directory-entry/.DS_Store +0 -0
- package/src/stories/document-state/.DS_Store +0 -0
- package/src/stories/dropdown/dropdown.stories.js +38 -0
- package/src/stories/dropzone/.DS_Store +0 -0
- package/src/stories/empty-state/.DS_Store +0 -0
- package/src/stories/excerpt-snippet/.DS_Store +0 -0
- package/src/stories/file-icon/.DS_Store +0 -0
- package/src/stories/file-list-item/.DS_Store +0 -0
- package/src/stories/flag/.DS_Store +0 -0
- package/src/stories/form-group/.DS_Store +0 -0
- package/src/stories/form-headline/.DS_Store +0 -0
- package/src/stories/form-set/.DS_Store +0 -0
- package/src/stories/formatted/.DS_Store +0 -0
- package/src/stories/icon/.DS_Store +0 -0
- package/src/stories/index-toolbar/.DS_Store +0 -0
- package/src/stories/info-tooltip/.DS_Store +0 -0
- package/src/stories/input/.DS_Store +0 -0
- package/src/stories/input-group/.DS_Store +0 -0
- package/src/stories/input-search/.DS_Store +0 -0
- package/src/stories/jumper-document/.DS_Store +0 -0
- package/src/stories/jumper-index/.DS_Store +0 -0
- package/src/stories/jumper-page/.DS_Store +0 -0
- package/src/stories/layout-data-table/.DS_Store +0 -0
- package/src/stories/layout-directory/.DS_Store +0 -0
- package/src/stories/layout-index/.DS_Store +0 -0
- package/src/stories/map/.DS_Store +0 -0
- package/src/stories/modal/.DS_Store +0 -0
- package/src/stories/multiselect-option/.DS_Store +0 -0
- package/src/stories/multiselect-search-token/.DS_Store +0 -0
- package/src/stories/multiselect-token/.DS_Store +0 -0
- package/src/stories/overlay/.DS_Store +0 -0
- package/src/stories/pagination/.DS_Store +0 -0
- package/src/stories/party-entry/.DS_Store +0 -0
- package/src/stories/popover-header/.DS_Store +0 -0
- package/src/stories/popover-list/.DS_Store +0 -0
- package/src/stories/popover-list-headline/.DS_Store +0 -0
- package/src/stories/popover-list-item/.DS_Store +0 -0
- package/src/stories/progress/.DS_Store +0 -0
- package/src/stories/quicklink/.DS_Store +0 -0
- package/src/stories/radiobutton/.DS_Store +0 -0
- package/src/stories/rating-favorability/.DS_Store +0 -0
- package/src/stories/rating-star-read/.DS_Store +0 -0
- package/src/stories/rating-star-write/.DS_Store +0 -0
- package/src/stories/scroll-container/.DS_Store +0 -0
- package/src/stories/section/.DS_Store +0 -0
- package/src/stories/segment/.DS_Store +0 -0
- package/src/stories/select/.DS_Store +0 -0
- package/src/stories/sequence-map-button/.DS_Store +0 -0
- package/src/stories/sidebar/.DS_Store +0 -0
- package/src/stories/sidebar-footer/.DS_Store +0 -0
- package/src/stories/sidebar-header/.DS_Store +0 -0
- package/src/stories/skeleton-loader/.DS_Store +0 -0
- package/src/stories/sortbutton/.DS_Store +0 -0
- package/src/stories/sticker/.DS_Store +0 -0
- package/src/stories/structured-content/.DS_Store +0 -0
- package/src/stories/switch/.DS_Store +0 -0
- package/src/stories/tabs/.DS_Store +0 -0
- package/src/stories/tag/.DS_Store +0 -0
- package/src/stories/toast/.DS_Store +0 -0
- package/src/stories/tree-list/.DS_Store +0 -0
- package/src/stories/tree-list-item/.DS_Store +0 -0
- package/src/stories/video/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M9.86283 19.7861L5.809 15.7323C4.91308 14.8364 4.91308 13.3847 5.809 12.4888L11.9125 6.38531L19.2098 13.6826L13.1063 19.7861C12.2104 20.681 10.7577 20.681 9.86283 19.7861V19.7861Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke" />
|
|
3
|
+
<path vector-effect="non-scaling-stroke" d="M22.4566 16.9218C22.4566 16.9218 20.1632 19.4102 20.1632 20.9356C20.1632 22.1966 21.1956 23.229 22.4566 23.229C23.7176 23.229 24.75 22.1966 24.75 20.9345C24.75 19.4102 22.4566 16.9218 22.4566 16.9218V16.9218Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path vector-effect="non-scaling-stroke" d="M11.9125 6.3875L10.7317 5.185" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path vector-effect="non-scaling-stroke" d="M19.2142 13.6783H5.17416" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path vector-effect="non-scaling-stroke" d="M5.705 25.2267H15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div @click="handleClick" class="ecs-dropdown" :class="[sizeClass, disabled ? 'disabled' : '', inline ? 'inline' : '']">
|
|
3
|
+
<div class="ecs-dropdown-inner">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
props: {
|
|
12
|
+
/** Sets the size of the dropdown component. */
|
|
13
|
+
size: {
|
|
14
|
+
type: String,
|
|
15
|
+
validator: v => ['sml', 'md', 'lg'].includes(v),
|
|
16
|
+
default: 'md'
|
|
17
|
+
},
|
|
18
|
+
/** Turns the dropdown into disabled mode. */
|
|
19
|
+
disabled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
/** Sets the dropdown to an inline element, which means it will adjust to the width of it's content, not to parent width. */
|
|
24
|
+
inline: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
computed: {
|
|
31
|
+
sizeClass() {
|
|
32
|
+
if (this.size && this.size !== '')
|
|
33
|
+
return `ecs-dropdown-${this.size}`
|
|
34
|
+
return this.size
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
methods: {
|
|
39
|
+
handleClick (e) {
|
|
40
|
+
if(!this.disabled)
|
|
41
|
+
/** Emits the click event, if dropdown is not set to disabled. */
|
|
42
|
+
this.$emit('click', e)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style lang="scss" scoped>
|
|
49
|
+
@import "../tokens/tokens";
|
|
50
|
+
@import "../mixins/svg-uri";
|
|
51
|
+
|
|
52
|
+
.ecs-dropdown{
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
border: $input-border-width solid rgba($gray-8, .4);
|
|
56
|
+
border-radius: 4px;
|
|
57
|
+
position: relative;
|
|
58
|
+
background: #FFF;
|
|
59
|
+
transition: .2s;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
user-select: none;
|
|
62
|
+
|
|
63
|
+
&:hover,
|
|
64
|
+
&:focus{
|
|
65
|
+
border-color: darken(rgba($gray-8, .4), 4%);
|
|
66
|
+
box-shadow: 0 1px 1px rgba($gray-8, .1);
|
|
67
|
+
|
|
68
|
+
&:after{
|
|
69
|
+
opacity: .5;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.inline{
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.disabled{
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
opacity: .5;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:after{
|
|
83
|
+
width: 11px;
|
|
84
|
+
height: 7px;
|
|
85
|
+
content: "";
|
|
86
|
+
opacity: .4;
|
|
87
|
+
transition: .2s;
|
|
88
|
+
margin-left: 16px;
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
background: svg-uri('<svg xmlns="http://www.w3.org/2000/svg" width="11" height="7" viewBox="0 0 11 7"><polyline fill="none" stroke="#{$gray-13}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" points="2.081 2.033 5.603 5.052 9.145 2.016"/></svg>');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&-sml{
|
|
94
|
+
height: 24px;
|
|
95
|
+
padding: 0 8px;
|
|
96
|
+
font-size: 12px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&-md{
|
|
100
|
+
height: 32px;
|
|
101
|
+
padding: 0 8px;
|
|
102
|
+
font-size: 14px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&-lg{
|
|
106
|
+
height: 40px;
|
|
107
|
+
padding: 0 12px;
|
|
108
|
+
font-size: 14px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&-inner{
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
flex: 1;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
</style>
|
package/src/components/index.js
CHANGED
|
@@ -32,6 +32,7 @@ import EcsDialog from "./dialog/dialog.vue"
|
|
|
32
32
|
import EcsDialogHeader from "./dialog-header/dialog-header.vue"
|
|
33
33
|
import EcsDirectoryEntry from "./directory-entry/directory-entry.vue"
|
|
34
34
|
import EcsDocumentState from "./document-state/document-state.vue"
|
|
35
|
+
import EcsDropdown from "./dropdown/dropdown.vue"
|
|
35
36
|
import EcsDropzone from "./dropzone/dropzone.vue"
|
|
36
37
|
import EcsEmptyState from "./empty-state/empty-state.vue"
|
|
37
38
|
import EcsExcerptSnippet from "./excerpt-snippet/excerpt-snippet.vue"
|
|
@@ -143,6 +144,7 @@ const Components = {
|
|
|
143
144
|
EcsDialogHeader,
|
|
144
145
|
EcsDirectoryEntry,
|
|
145
146
|
EcsDocumentState,
|
|
147
|
+
EcsDropdown,
|
|
146
148
|
EcsDropzone,
|
|
147
149
|
EcsEmptyState,
|
|
148
150
|
EcsExcerptSnippet,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import EcsDropdown from '@components/dropdown/dropdown';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Action/Dropdown',
|
|
5
|
+
component: EcsDropdown
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const dropdown = () => ({
|
|
9
|
+
components: { EcsDropdown },
|
|
10
|
+
template: `<ecs-dropdown>
|
|
11
|
+
Dropdown
|
|
12
|
+
</ecs-dropdown>
|
|
13
|
+
`,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const dropdownSizes = () => ({
|
|
17
|
+
components: { EcsDropdown },
|
|
18
|
+
template: `<div>
|
|
19
|
+
<ecs-dropdown size="sml" class="mb-6">
|
|
20
|
+
Dropdown
|
|
21
|
+
</ecs-dropdown>
|
|
22
|
+
<ecs-dropdown size="md" class="mb-6">
|
|
23
|
+
Dropdown
|
|
24
|
+
</ecs-dropdown>
|
|
25
|
+
<ecs-dropdown size="lg" class="mb-6">
|
|
26
|
+
Dropdown
|
|
27
|
+
</ecs-dropdown>
|
|
28
|
+
</div>
|
|
29
|
+
`,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const dropdownInline = () => ({
|
|
33
|
+
components: { EcsDropdown },
|
|
34
|
+
template: `<ecs-dropdown inline>
|
|
35
|
+
Dropdown
|
|
36
|
+
</ecs-dropdown>
|
|
37
|
+
`,
|
|
38
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|