@everchron/ec-shards 0.7.48 → 0.7.51
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 +233 -111
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +233 -111
- 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/assets/icons/clipboard.svg +8 -0
- package/src/components/button-more/button-more.vue +1 -1
- package/src/components/index.js +2 -0
- package/src/components/input/input.vue +9 -5
- package/src/components/layout-data-table/layout-data-table.vue +136 -0
- package/src/components/modal-header/modal-header.vue +1 -0
- package/src/components/segment/segment.vue +1 -1
- package/src/stories/input-group/input-group.stories.mdx +2 -2
- package/src/stories/layout-data-table/layout-data-table.stories.js +19 -0
- package/src/stories/layout-data-table/layout-data-table.stories.mdx +36 -0
- package/src/stories/segment/segment.stories.js +1 -1
- package/src/stories/segment/segment.stories.mdx +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path vector-effect="non-scaling-stroke" d="M10.6667 6.33335L12.075 4.57294C12.2808 4.31619 12.5917 4.16669 12.9211 4.16669H17.08C17.4093 4.16669 17.7202 4.31619 17.9261 4.57294L19.3333 6.33335V7.41669C19.3333 8.01469 18.848 8.50002 18.25 8.50002H11.75C11.152 8.50002 10.6667 8.01469 10.6667 7.41669V6.33335Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path vector-effect="non-scaling-stroke" d="M23.6667 14V8.49998C23.6667 7.3029 22.6971 6.33331 21.5 6.33331H19.3333" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path vector-effect="non-scaling-stroke" d="M10.6667 6.33331H8.50001C7.30293 6.33331 6.33334 7.3029 6.33334 8.49998V22.5833C6.33334 23.7804 7.30293 24.75 8.50001 24.75H11.75H14" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path vector-effect="non-scaling-stroke" d="M10.6667 12.9167H19.3333" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path vector-effect="non-scaling-stroke" d="M10.6667 17.3333H12.8333" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
<rect vector-effect="non-scaling-stroke" x="17" y="17" width="8" height="9" rx="2" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
</svg>
|
package/src/components/index.js
CHANGED
|
@@ -55,6 +55,7 @@ import EcsJumperIndex from "./jumper-index/jumper-index.vue"
|
|
|
55
55
|
import EcsJumperPage from "./jumper-page/jumper-page.vue"
|
|
56
56
|
import EcsLayoutIndex from "./layout-index/layout-index.vue"
|
|
57
57
|
import EcsLayoutDirectory from "./layout-directory/layout-directory.vue"
|
|
58
|
+
import EcsLayoutDataTable from "./layout-data-table/layout-data-table.vue"
|
|
58
59
|
import EcsMap from "./map/map.vue"
|
|
59
60
|
import EcsModal from "./modal/modal.vue"
|
|
60
61
|
import EcsModalHeader from "./modal-header/modal-header.vue"
|
|
@@ -160,6 +161,7 @@ const Components = {
|
|
|
160
161
|
EcsJumperPage,
|
|
161
162
|
EcsLayoutIndex,
|
|
162
163
|
EcsLayoutDirectory,
|
|
164
|
+
EcsLayoutDataTable,
|
|
163
165
|
EcsMap,
|
|
164
166
|
EcsModal,
|
|
165
167
|
EcsModalHeader,
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
error ? 'ecs-form-control-error' : null
|
|
20
20
|
]"
|
|
21
21
|
v-bind="$attrs"
|
|
22
|
-
:min="min"
|
|
22
|
+
:min="min" :max="max" :step="step"
|
|
23
23
|
:ref="refr"
|
|
24
24
|
:id="refr"
|
|
25
25
|
/>
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
:class="[
|
|
37
37
|
sizeClass,
|
|
38
38
|
formatClass,
|
|
39
|
-
cssClass,
|
|
40
39
|
subtle ? 'ecs-form-control-subtle' : null,
|
|
41
40
|
error ? 'ecs-form-control-error' : null
|
|
42
41
|
]"
|
|
@@ -97,9 +96,10 @@
|
|
|
97
96
|
type: Boolean,
|
|
98
97
|
default: false
|
|
99
98
|
},
|
|
100
|
-
cssClass: String,
|
|
101
99
|
refr: String,
|
|
102
|
-
min: Number
|
|
100
|
+
min: Number,
|
|
101
|
+
max: Number,
|
|
102
|
+
step: Number
|
|
103
103
|
},
|
|
104
104
|
|
|
105
105
|
computed: {
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
@import "../tokens/tokens";
|
|
123
123
|
@import "../mixins/svg-uri";
|
|
124
124
|
|
|
125
|
-
.ecs-form-control
|
|
125
|
+
.ecs-form-control{
|
|
126
126
|
display: block;
|
|
127
127
|
width: 100%;
|
|
128
128
|
padding: $input-padding-y $input-padding-x;
|
|
@@ -197,4 +197,8 @@
|
|
|
197
197
|
font-family: $sf;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
+
|
|
201
|
+
textarea.ecs-form-control{
|
|
202
|
+
resize: vertical;
|
|
203
|
+
}
|
|
200
204
|
</style>
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ecs-data-layout">
|
|
3
|
+
<div class="ecs-data-layout-content">
|
|
4
|
+
<div v-if="$slots.toolbar" class="ecs-data-layout-toolbar">
|
|
5
|
+
<slot name="toolbar"></slot>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<ecs-action-toolbar v-if="$slots.actionbar" v-show="showActionbar">
|
|
9
|
+
<slot name="actionbar"></slot>
|
|
10
|
+
</ecs-action-toolbar>
|
|
11
|
+
|
|
12
|
+
<div class="ecs-data-layout-data">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div v-if="$slots.sidebarcontent || $slots.sidebarheader" class="ecs-data-layout-sidebar" :class="sidebarExpanded ? 'expanded' : ''">
|
|
18
|
+
<div class="ecs-data-layout-sidebar-inner">
|
|
19
|
+
<div v-if="$slots.sidebarheader" class="ecs-data-layout-sidebar-header">
|
|
20
|
+
<slot name="sidebarheader"></slot>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="ecs-data-layout-sidebar-content scrollbar scrollbar-sml">
|
|
24
|
+
<slot name="sidebarcontent"></slot>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
import EcsActionToolbar from '../action-toolbar/action-toolbar'
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
components: { EcsActionToolbar },
|
|
36
|
+
|
|
37
|
+
props: {
|
|
38
|
+
sidebarExpanded: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
41
|
+
},
|
|
42
|
+
showActionbar: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style lang="scss" scoped>
|
|
51
|
+
@import "../tokens/tokens";
|
|
52
|
+
@import "../mixins/svg-uri";
|
|
53
|
+
|
|
54
|
+
$bar-height: 41px;
|
|
55
|
+
|
|
56
|
+
.ecs-data-layout{
|
|
57
|
+
display: flex;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
background: #FFF;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
|
|
63
|
+
&-toolbar{
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
width: 100%;
|
|
67
|
+
padding: 0 12px;
|
|
68
|
+
background: #FFF;
|
|
69
|
+
height: $bar-height;
|
|
70
|
+
border-bottom: 1px solid $gray-3;
|
|
71
|
+
position: relative;
|
|
72
|
+
z-index: 3;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&-content{
|
|
76
|
+
flex: 1;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
position: relative;
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
transition: .4s;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&-data{
|
|
85
|
+
flex: 1;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&-sidebar{
|
|
90
|
+
width: 0;
|
|
91
|
+
min-width: 0;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
height: 100%;
|
|
94
|
+
background: #FFF;
|
|
95
|
+
border-left: 1px solid #FFF;
|
|
96
|
+
transition: .4s;
|
|
97
|
+
|
|
98
|
+
&.expanded{
|
|
99
|
+
min-width: 320px;
|
|
100
|
+
width: 25%;
|
|
101
|
+
max-width: 500px;
|
|
102
|
+
border-left-color: $gray-3;
|
|
103
|
+
|
|
104
|
+
.ecs-data-layout-sidebar-inner{
|
|
105
|
+
opacity: 1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&-inner{
|
|
110
|
+
width: 100%;
|
|
111
|
+
min-width: 320px;
|
|
112
|
+
height: 100%;
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
transition: .5s;
|
|
117
|
+
opacity: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&-header{
|
|
121
|
+
height: $bar-height;
|
|
122
|
+
flex-shrink: 0;
|
|
123
|
+
border-bottom: 1px solid $gray-3;
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
padding: 0 16px 0 20px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&-content{
|
|
130
|
+
flex: 1;
|
|
131
|
+
padding: 20px;
|
|
132
|
+
overflow: auto;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ecs-segments" :class="[inline ? 'ecs-segments-inline' : '']">
|
|
3
3
|
<label v-for="option in options" :key="option.id" :for="option.id">
|
|
4
|
-
<input type="radio" :name="name" :value="option.id" :id="option.id" :checked="value==option.id" @click="$emit('click', option.id)"
|
|
4
|
+
<input type="radio" :name="name" :value="option.id" :id="option.id" :checked="value==option.id" :disabled="option.disabled" @click="$emit('click', option.id)">
|
|
5
5
|
<span class="ecs-segment" :title="option.title">
|
|
6
6
|
<ecs-icon v-if="option.icon" :class="[option.icon && option.label ? 'icon-spacing' : '']" :type="option.icon" width="20" height="20" color="#2F333C" />
|
|
7
7
|
{{ option.label }}
|
|
@@ -47,8 +47,8 @@ Use the EcsInputAddon component to add a prefix to an EcsInput. Prefixes can con
|
|
|
47
47
|
<ecs-input />
|
|
48
48
|
</ecs-input-group>
|
|
49
49
|
<ecs-input-group>
|
|
50
|
-
<ecs-input-addon icon="link" />
|
|
51
50
|
<ecs-input />
|
|
51
|
+
<ecs-input-addon>Suffix</ecs-input-addon>
|
|
52
52
|
</ecs-input-group>
|
|
53
53
|
```
|
|
54
54
|
|
|
@@ -119,4 +119,4 @@ Use the EcsInputClear component to add an input clear button.
|
|
|
119
119
|
|
|
120
120
|
### Input Clear Button
|
|
121
121
|
|
|
122
|
-
<ArgsTable of={EcsInputClear} />
|
|
122
|
+
<ArgsTable of={EcsInputClear} />
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import EcsLayoutDataTable from '@components/layout-data-table/layout-data-table';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Layouts/Data Table',
|
|
5
|
+
component: EcsLayoutDataTable
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const dataTable = () => ({
|
|
9
|
+
components: { EcsLayoutDataTable },
|
|
10
|
+
template: `<ecs-layout-data-table sidebar-expanded>
|
|
11
|
+
<template slot="toolbar">toolbar</template>
|
|
12
|
+
<template slot="actionbar">actionbar</template>
|
|
13
|
+
|
|
14
|
+
table
|
|
15
|
+
|
|
16
|
+
<template slot="sidebarheader">sidebarheader</template>
|
|
17
|
+
<template slot="sidebarcontent">sidebar</template>
|
|
18
|
+
</ecs-layout-data-table>`,
|
|
19
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Meta, Story, ArgsTable, Canvas, Description } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import EcsLayoutDataTable from '@components/layout-data-table/layout-data-table';
|
|
3
|
+
import * as stories from './layout-data-table.stories.js';
|
|
4
|
+
|
|
5
|
+
<Meta
|
|
6
|
+
title="Layouts/Data Table"
|
|
7
|
+
component={EcsLayoutDataTable} />
|
|
8
|
+
|
|
9
|
+
# Data Table `EcsLayoutDataTable`
|
|
10
|
+
|
|
11
|
+
The data table layout is commonly used in App Settings pages. It always features a larger content area (which is most of the time filled by a full width data table component) and an optional sidebar that can expand or collapse.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
<Canvas withSource="none" withToolbar={true}>
|
|
15
|
+
<Story name="Data Table" height="900px">
|
|
16
|
+
{stories.dataTable()}
|
|
17
|
+
</Story>
|
|
18
|
+
</Canvas>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
<ecs-layout-data-table sidebar-expanded>
|
|
23
|
+
<template slot="toolbar">toolbar</template>
|
|
24
|
+
<template slot="actionbar">actionbar</template>
|
|
25
|
+
|
|
26
|
+
table
|
|
27
|
+
|
|
28
|
+
<template slot="sidebarheader">sidebarheader</template>
|
|
29
|
+
<template slot="sidebarcontent">sidebar</template>
|
|
30
|
+
</ecs-layout-data-table>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Props and Slots
|
|
35
|
+
|
|
36
|
+
<ArgsTable of={EcsLayoutDataTable} />
|
|
@@ -20,7 +20,7 @@ The segment control is a visual alternative to radiobutton group.
|
|
|
20
20
|
options: [
|
|
21
21
|
{ label: 'Orange', id: 'orange' },
|
|
22
22
|
{ label: 'Apple', id: 'apple' },
|
|
23
|
-
{ label: 'Grapefruit', id: 'grapefruit' }
|
|
23
|
+
{ label: 'Grapefruit', id: 'grapefruit', disabled: true }
|
|
24
24
|
]
|
|
25
25
|
|
|
26
26
|
<ecs-segment :options="options" :value="value" name="fruits"></ecs-segment>
|