@everchron/ec-shards 0.6.86 → 0.6.90
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 +116 -87
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +116 -87
- 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/components/data-card/data-card.vue +1 -1
- package/src/components/layout-index/layout-index.vue +4 -0
- package/src/components/modal/modal.vue +30 -3
- package/src/components/modal-base/modal-base.vue +17 -3
- package/src/components/party-entry/party-entry.vue +37 -3
- package/src/stories/modal/modal.stories.js +16 -1
- package/src/stories/modal/modal.stories.mdx +9 -1
- package/src/stories/party-entry/party-entry.stories.js +12 -0
- package/src/stories/party-entry/party-entry.stories.mdx +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<transition name="dialog-fade">
|
|
3
|
-
<div v-if="isShown" class="ecs-modal">
|
|
3
|
+
<div v-if="isShown" class="ecs-modal" :class="typeClass">
|
|
4
4
|
|
|
5
5
|
<div class="ecs-modal-dialog ecs-modal-sheet">
|
|
6
6
|
<div v-if="$slots.header" class="ecs-modal-header-wrap">
|
|
@@ -29,6 +29,11 @@
|
|
|
29
29
|
show: {
|
|
30
30
|
type: Boolean,
|
|
31
31
|
default: false
|
|
32
|
+
},
|
|
33
|
+
type: {
|
|
34
|
+
type: String,
|
|
35
|
+
validator: v => ['default', 'drawer',].includes(v),
|
|
36
|
+
default: 'default'
|
|
32
37
|
}
|
|
33
38
|
},
|
|
34
39
|
|
|
@@ -38,6 +43,14 @@
|
|
|
38
43
|
}
|
|
39
44
|
},
|
|
40
45
|
|
|
46
|
+
computed: {
|
|
47
|
+
typeClass() {
|
|
48
|
+
if (this.type && this.type !== '')
|
|
49
|
+
return `ecs-modal-${this.type}`
|
|
50
|
+
return this.type
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
|
|
41
54
|
methods : {
|
|
42
55
|
toggleShow(){
|
|
43
56
|
this.isShown = !this.isShown
|
|
@@ -59,8 +72,6 @@
|
|
|
59
72
|
|
|
60
73
|
.ecs-modal{
|
|
61
74
|
&-sheet{
|
|
62
|
-
margin: 30px auto;
|
|
63
|
-
width: 780px;
|
|
64
75
|
background: #FFFFFF;
|
|
65
76
|
background-clip: padding-box;
|
|
66
77
|
border-radius: 4px;
|
|
@@ -74,6 +85,22 @@
|
|
|
74
85
|
}
|
|
75
86
|
}
|
|
76
87
|
|
|
88
|
+
// Default modal variant
|
|
89
|
+
|
|
90
|
+
.ecs-modal-default{
|
|
91
|
+
.ecs-modal-sheet{
|
|
92
|
+
margin: 30px auto;
|
|
93
|
+
width: 780px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ecs-modal-drawer{
|
|
98
|
+
.ecs-modal-sheet{
|
|
99
|
+
margin: 5px auto;
|
|
100
|
+
width: calc(100vw - 10px);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
77
104
|
.ecs-modal{
|
|
78
105
|
&-inner{
|
|
79
106
|
display: flex;
|
|
@@ -13,15 +13,29 @@
|
|
|
13
13
|
background: transparent;
|
|
14
14
|
will-change: transform;
|
|
15
15
|
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
16
|
justify-content: center;
|
|
18
17
|
|
|
18
|
+
&-default{
|
|
19
|
+
align-items: center;
|
|
20
|
+
|
|
21
|
+
.ecs-modal-dialog{
|
|
22
|
+
max-height: calc(100vh - 60px);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-drawer{
|
|
27
|
+
align-items: flex-end;
|
|
28
|
+
|
|
29
|
+
.ecs-modal-dialog{
|
|
30
|
+
max-height: calc(60vh - 140px);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
19
34
|
&-dialog{
|
|
20
35
|
position: relative;
|
|
21
36
|
display: flex;
|
|
22
37
|
flex-direction: column;
|
|
23
38
|
margin: 0 auto;
|
|
24
|
-
max-height: calc(100vh - 60px);
|
|
25
39
|
z-index: 1072;
|
|
26
40
|
overflow: hidden;
|
|
27
41
|
transform: translateY(0) scale(1);
|
|
@@ -57,4 +71,4 @@
|
|
|
57
71
|
}
|
|
58
72
|
}
|
|
59
73
|
|
|
60
|
-
</style>
|
|
74
|
+
</style>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="ecs-
|
|
3
|
-
:class="[
|
|
2
|
+
<div class="ecs-party-entry"
|
|
3
|
+
:class="[
|
|
4
|
+
party,
|
|
5
|
+
shared ? 'shared' : '',
|
|
6
|
+
background ? 'ecs-party-entry-background' : ''
|
|
7
|
+
]">
|
|
4
8
|
<ecs-icon v-if="icon && iconPosition == 'left'" :type="iconType" :color="iconColor" :style="'margin-right:'+iconSpacing" :width="iconSize" :height="iconSize" />
|
|
5
9
|
<slot></slot>
|
|
6
10
|
<ecs-icon v-if="icon && iconPosition == 'right'" :type="iconType" :color="iconColor" :style="'margin-left:'+iconSpacing" :width="iconSize" :height="iconSize" />
|
|
@@ -22,6 +26,10 @@
|
|
|
22
26
|
validator: v => ['client', 'opposing', 'joint', 'other', 'court', 'unaffiliated'].includes(v),
|
|
23
27
|
required: true
|
|
24
28
|
},
|
|
29
|
+
background: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
25
33
|
shared: {
|
|
26
34
|
type: Boolean,
|
|
27
35
|
default: false
|
|
@@ -82,7 +90,7 @@
|
|
|
82
90
|
@import "../tokens/tokens";
|
|
83
91
|
@import "../mixins/svg-uri";
|
|
84
92
|
|
|
85
|
-
.ecs-
|
|
93
|
+
.ecs-party-entry{
|
|
86
94
|
position: relative;
|
|
87
95
|
display: inline-flex;
|
|
88
96
|
align-items: center;
|
|
@@ -130,5 +138,31 @@
|
|
|
130
138
|
&.unaffiliated{
|
|
131
139
|
color: $party-other-text;
|
|
132
140
|
}
|
|
141
|
+
|
|
142
|
+
&-background{
|
|
143
|
+
&.client{
|
|
144
|
+
background-color: $party-client-background;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&.opposing{
|
|
148
|
+
background-color: $party-opposition-background;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&.joint{
|
|
152
|
+
background-color: $party-joint-background;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&.other{
|
|
156
|
+
background-color: $party-other-background;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.court{
|
|
160
|
+
background-color: $party-court-background;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.unaffiliated{
|
|
164
|
+
background-color: $party-other-background;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
133
167
|
}
|
|
134
168
|
</style>
|
|
@@ -24,6 +24,21 @@ export const regular = () => ({
|
|
|
24
24
|
</div>`,
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
+
export const drawer = () => ({
|
|
28
|
+
components: { EcsModal },
|
|
29
|
+
data() {
|
|
30
|
+
return {
|
|
31
|
+
showdialog: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
template: `<div>
|
|
35
|
+
<button @click="showdialog = !showdialog">Open</button>
|
|
36
|
+
<ecs-modal type="drawer" :show="showdialog">
|
|
37
|
+
<p>Modal Content Slot</p>
|
|
38
|
+
</ecs-modal>
|
|
39
|
+
</div>`,
|
|
40
|
+
});
|
|
41
|
+
|
|
27
42
|
export const headers = () => ({
|
|
28
43
|
components: { EcsModal, EcsModalHeader, EcsSequenceMap, EcsSequenceMapButton },
|
|
29
44
|
data() {
|
|
@@ -109,4 +124,4 @@ export const footer = () => ({
|
|
|
109
124
|
</template>
|
|
110
125
|
</ecs-modal>
|
|
111
126
|
</div>`,
|
|
112
|
-
});
|
|
127
|
+
});
|
|
@@ -25,6 +25,14 @@ Modals are simple dialog windows that allow fully custom content. There are no s
|
|
|
25
25
|
</ecs-modal>
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
The modal type `drawer` is an alternative template that shows a full width modal sheet at the bottom of the screen.
|
|
29
|
+
|
|
30
|
+
<Canvas withSource="none" withToolbar={true}>
|
|
31
|
+
<Story name="Drawer" height="800px">
|
|
32
|
+
{stories.drawer()}
|
|
33
|
+
</Story>
|
|
34
|
+
</Canvas>
|
|
35
|
+
|
|
28
36
|
## Modal Headers
|
|
29
37
|
|
|
30
38
|
You can add a header to a modal by utilizing the `header` slot. Headers can be of `type`: none (default), `scroll` and `tabs`.
|
|
@@ -57,4 +65,4 @@ You can add a footer to a modal by utilizing the `footer` slot.
|
|
|
57
65
|
|
|
58
66
|
### Modal Footer
|
|
59
67
|
|
|
60
|
-
<ArgsTable of={EcsModalFooter} />
|
|
68
|
+
<ArgsTable of={EcsModalFooter} />
|
|
@@ -33,3 +33,15 @@ export const partyEntrySides = () => ({
|
|
|
33
33
|
<ecs-party-entry icon="document" party="unaffiliated">Unaffiliated</ecs-party-entry>
|
|
34
34
|
</main>`,
|
|
35
35
|
});
|
|
36
|
+
|
|
37
|
+
export const partyEntryWithBackground = () => ({
|
|
38
|
+
components: { EcsPartyEntry },
|
|
39
|
+
template: `<main>
|
|
40
|
+
<ecs-party-entry background icon="document" party="opposing">Opposition</ecs-party-entry>
|
|
41
|
+
<ecs-party-entry background icon="document" party="client">Client</ecs-party-entry>
|
|
42
|
+
<ecs-party-entry background icon="document" party="joint">Joint</ecs-party-entry>
|
|
43
|
+
<ecs-party-entry background icon="document" party="other">Other</ecs-party-entry>
|
|
44
|
+
<ecs-party-entry background icon="document" party="court">Court</ecs-party-entry>
|
|
45
|
+
<ecs-party-entry background icon="document" party="unaffiliated">Unaffiliated</ecs-party-entry>
|
|
46
|
+
</main>`,
|
|
47
|
+
});
|
|
@@ -56,6 +56,12 @@ Use the `party` attribute to set the party side. The following sides are availab
|
|
|
56
56
|
</Story>
|
|
57
57
|
</Canvas>
|
|
58
58
|
|
|
59
|
+
<Canvas withSource="none" withToolbar={true}>
|
|
60
|
+
<Story name="Party Entry with Background" height="80px">
|
|
61
|
+
{stories.partyEntryWithBackground()}
|
|
62
|
+
</Story>
|
|
63
|
+
</Canvas>
|
|
64
|
+
|
|
59
65
|
```js
|
|
60
66
|
<ecs-party-entry icon="document" party="opposing">Opposition</ecs-party-entry>
|
|
61
67
|
<ecs-party-entry icon="document" party="client">Client</ecs-party-entry>
|