@everchron/ec-shards 7.4.11 → 7.4.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everchron/ec-shards",
3
- "version": "7.4.11",
3
+ "version": "7.4.13",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -28,6 +28,17 @@
28
28
  >
29
29
  <ecs-icon v-if="option.icon" :type="option.icon" size="20" />
30
30
  <span v-if="option.type != 'divider'">{{ option.name}}</span>
31
+ <ecs-button
32
+ v-if="option.nested"
33
+ @click.stop="optionClicked(option.nested)"
34
+ :icon="option.nested.icon"
35
+ :title="option.nested.name"
36
+ :aria-label="option.nested.name"
37
+ :disabled="option.nested.disabled"
38
+ type="secondary"
39
+ icon-only
40
+ size="sml"
41
+ />
31
42
  <ecs-focus-ring :danger="option.type == 'danger'" />
32
43
  </li>
33
44
  </ul>
@@ -40,9 +51,10 @@ import vClickOutside from "v-click-outside"
40
51
  Vue.use(vClickOutside)
41
52
  import EcsIcon from '../icon/icon'
42
53
  import EcsFocusRing from '../mixins/focus-ring'
54
+ import EcsButton from '../button/button'
43
55
 
44
56
  export default {
45
- components: { EcsIcon, EcsFocusRing },
57
+ components: { EcsIcon, EcsFocusRing, EcsButton },
46
58
 
47
59
  props: {
48
60
  /** Unique String that acts as the id for the menu. */
@@ -56,7 +68,8 @@ export default {
56
68
  slug: 'duplicate',
57
69
  icon: 'evidence',
58
70
  disabled: false,
59
- type: ''
71
+ type: '',
72
+ nested: { ... }
60
73
  }``` */
61
74
  options: {
62
75
  type: Array,
@@ -258,6 +271,10 @@ export default {
258
271
  color: $color-gray-8;
259
272
  }
260
273
 
274
+ .ecs-button{
275
+ margin-left: auto;
276
+ }
277
+
261
278
  &:not(.disabled){
262
279
  &.danger:hover,
263
280
  &.danger:focus{
@@ -39,9 +39,15 @@ export const contextMenu = () => ({
39
39
  return {
40
40
  options: [
41
41
  {
42
- name: 'Duplicate',
42
+ name: 'View',
43
43
  slug: 'duplicate',
44
- icon: 'evidence'
44
+ icon: 'evidence',
45
+ nested: {
46
+ name: 'External',
47
+ slug: 'external',
48
+ icon: 'open-external',
49
+ disabled: false
50
+ }
45
51
  },
46
52
  {
47
53
  name: 'Edit',
@@ -53,7 +59,7 @@ export const contextMenu = () => ({
53
59
  type: 'divider',
54
60
  },
55
61
  {
56
- name: 'Delete',
62
+ name: 'Delete ',
57
63
  slug: 'delete',
58
64
  type: 'danger',
59
65
  icon: 'delete'