@everchron/ec-shards 4.2.0 → 4.3.0

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.
Files changed (65) hide show
  1. package/dist/ec-shards.common.js +2562 -1465
  2. package/dist/ec-shards.common.js.map +1 -1
  3. package/dist/ec-shards.css +1 -1
  4. package/dist/ec-shards.umd.js +2562 -1465
  5. package/dist/ec-shards.umd.js.map +1 -1
  6. package/dist/ec-shards.umd.min.js +2 -2
  7. package/dist/ec-shards.umd.min.js.map +1 -1
  8. package/dist/img/EU.d180ac2d.svg +1 -0
  9. package/dist/img/login-email-mfa.33936706.svg +1 -0
  10. package/dist/img/login-email.4b81db3a.svg +1 -0
  11. package/dist/img/login-sso-azure.a49f3fe4.svg +1 -0
  12. package/dist/img/login-sso-okta.55de1bbd.svg +1 -0
  13. package/package.json +4 -2
  14. package/src/assets/icons/login-key.svg +7 -0
  15. package/src/assets/images/fill-icons/login-email-mfa.svg +1 -0
  16. package/src/assets/images/fill-icons/login-email.svg +1 -0
  17. package/src/assets/images/fill-icons/login-sso-azure.svg +1 -0
  18. package/src/assets/images/fill-icons/login-sso-okta.svg +1 -0
  19. package/src/assets/images/flags/EU.svg +1 -0
  20. package/src/components/alert/alert.vue +2 -2
  21. package/src/components/breadcrumb-button/breadcrumb-button.vue +2 -2
  22. package/src/components/button/button.vue +2 -2
  23. package/src/components/button-context/button-context.vue +1 -1
  24. package/src/components/button-more/button-more.vue +1 -1
  25. package/src/components/button-table/button-table.vue +1 -1
  26. package/src/components/button-toolbar/button-toolbar.vue +4 -4
  27. package/src/components/button-toolbar-icon/button-toolbar-icon.vue +1 -1
  28. package/src/components/collection-control/collection-control.vue +1 -1
  29. package/src/components/context-menu/context-menu.vue +215 -0
  30. package/src/components/data-card/data-card.vue +1 -1
  31. package/src/components/data-grid/data-grid-row.vue +25 -1
  32. package/src/components/dialog/dialog.vue +24 -46
  33. package/src/components/document-state/document-state.vue +1 -1
  34. package/src/components/empty-state/empty-state.vue +1 -1
  35. package/src/components/excerpt-snippet/excerpt-snippet.vue +1 -1
  36. package/src/components/fill-icon/fill-icon.vue +59 -0
  37. package/src/components/flag/flag.vue +5 -0
  38. package/src/components/index.js +4 -0
  39. package/src/components/info-tooltip/info-tooltip.vue +1 -1
  40. package/src/components/input-addon/input-addon.vue +1 -1
  41. package/src/components/input-clear/input-clear.vue +1 -1
  42. package/src/components/input-search/input-search.vue +1 -1
  43. package/src/components/multiselect-option/multiselect-option.vue +1 -1
  44. package/src/components/multiselect-search-token/multiselect-search-token.vue +2 -2
  45. package/src/components/multiselect-token/multiselect-token.vue +1 -1
  46. package/src/components/overlay/overlay.vue +1 -1
  47. package/src/components/pagination/pagination.vue +138 -105
  48. package/src/components/party-entry/party-entry.vue +2 -2
  49. package/src/components/popover-header/popover-header.vue +1 -1
  50. package/src/components/segment/segment.vue +1 -1
  51. package/src/components/select/select.vue +24 -3
  52. package/src/components/separator/separator.vue +93 -0
  53. package/src/components/sequence-map-button/sequence-map-button.vue +1 -1
  54. package/src/components/tab-button/tab-button.vue +16 -5
  55. package/src/components/transcript-state/transcript-state.vue +1 -1
  56. package/src/components/tree-list-item/tree-list-item.vue +1 -1
  57. package/src/stories/Changelog.stories.mdx +29 -0
  58. package/src/stories/context-menu/context-menu.stories.js +69 -0
  59. package/src/stories/fill-icon/fill-icon.stories.js +24 -0
  60. package/src/stories/flag/flag.stories.js +6 -1
  61. package/src/stories/pagination/pagination.stories.js +0 -15
  62. package/src/stories/select/select.stories.js +16 -0
  63. package/src/stories/separator/.DS_Store +0 -0
  64. package/src/stories/separator/separator.stories.js +33 -0
  65. package/src/components/tiptap/tiptap.vue +0 -246
@@ -0,0 +1 @@
1
+ <svg fill="none" height="15" viewBox="0 0 20 15" width="20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m0 0h20v15h-20z"/></clipPath><mask id="b" height="15" maskUnits="userSpaceOnUse" width="20" x="0" y="0"><path d="m20 0h-20v15h20z" fill="#fff"/></mask><mask id="c" height="15" maskUnits="userSpaceOnUse" width="20" x="0" y="0"><path clip-rule="evenodd" d="m0 0v15h20v-15z" fill="#fff" fill-rule="evenodd"/></mask><g clip-path="url(#a)"><g clip-rule="evenodd" fill-rule="evenodd" mask="url(#b)"><path d="m0 0v15h20v-15z" fill="#f7fcff"/><g mask="url(#c)"><path d="m0 0v15h20v-15z" fill="#3d58db"/><path d="m9.26516 3.02849.73474-.38628.7347.38628-.1403-.81814.5944-.63909h-.8214l-.3674-.804048-.36737.804048h-.82146l.59441.63909zm0 10.85551.73474-.3863.7347.3863-.1403-.8181.5944-.6391h-.8214l-.3674-.804-.36737.804h-.82146l.59441.6391zm-5.78226-5.37274.14031-.81814-.5944-.63908h.82145l.36736-.80405.36738.80405h.82145l-.59442.63908.14033.81814-.73474-.38627zm1.35153 1.77004-.14032.8181.73474-.3862.73472.3862-.14031-.8181.59441-.63909h-.82146l-.36736-.80404-.36737.80404h-.82146zm9.74357.4319-.7347.3862.1402-.8181-.5944-.63909h.8215l.3674-.80404.3674.80404h.8214l-.5944.63909.1402.8181zm-9.74357-5.6756-.14032.81814.73474-.38628.73472.38628-.14031-.81814.59441-.63909h-.82146l-.36736-.80405-.36737.80405h-.82146zm9.74357.43186-.7347.38628.1402-.81814-.5944-.63909h.8215l.3674-.80405.3674.80405h.8214l-.5944.63909.1402.81814zm-7.918 6.89424-.14033.8182.73473-.3864.73473.3864-.14032-.8182.59441-.6391h-.82145l-.36737-.804-.36737.804h-.82145zm5.4173.8182.1403-.8182-.5944-.6391h.8215l.3673-.804.3674.804h.8215l-.5945.6391.1404.8182-.7348-.3864zm-5.4173-10.25995-.14033.81814.73473-.38628.73473.38628-.14032-.81814.59441-.63909h-.82145l-.36737-.80405-.36737.80405h-.82145zm5.4173.81814.1403-.81814-.5944-.63909h.8215l.3673-.80405.3674.80405h.8215l-.5945.63909.1404.81814-.7348-.38628zm3.0627 3.87915-.1404.81812.7348-.38626.7347.38626-.1403-.81812.5943-.6391h-.8213l-.3674-.80404-.3674.80404h-.8215z" fill="#ffd018"/></g></g></g></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="20" viewBox="0 0 23 20" width="23" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m1 3h14v14h-14z"/></clipPath><rect fill="#a1a6b0" height="16" rx="6" width="16" y="2"/><g clip-path="url(#a)" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m10.1875 9.63542v1.67708c0 .3481.1383.6819.3844.9281.2462.2461.58.3844.9281.3844h.4375c.3481 0 .6819-.1383.9281-.3844.2461-.2462.3844-.58.3844-.9281v-2.1875c0-1.16032-.4609-2.27312-1.2814-3.09359s-1.9333-1.28141-3.0936-1.28141h-1.75c-1.16032 0-2.27312.46094-3.09359 1.28141s-1.28141 1.93327-1.28141 3.09359v1.75c0 1.1603.46094 2.2731 1.28141 3.0936s1.93327 1.2814 3.09359 1.2814h3.2083"/><path d="m8.36458 7.8125h-.72916c-1.00677 0-1.82292.81615-1.82292 1.82292v.72918c0 1.0068.81615 1.8229 1.82292 1.8229h.72916c1.00677 0 1.82292-.8161 1.82292-1.8229v-.72918c0-1.00677-.81615-1.82292-1.82292-1.82292z"/></g><rect fill="#0eba65" height="8" rx="2" width="12" x="11"/><path d="m15 9.5h-2c-1.933 0-3.5-1.567-3.5-3.5v-3l1.5 1v2c0 1.10457.8954 2 2 2h2z" fill="#a1a6b0"/><g stroke="#fff" stroke-linecap="round" stroke-linejoin="round"><path d="m14.7089 5.48572c.8435 0 1.5273-.71634 1.5273-1.6 0-.88365-.6838-1.6-1.5273-1.6s-1.5273.71635-1.5273 1.6c0 .88366.6838 1.6 1.5273 1.6z"/><path d="m20.8181 3.88571h-4.5818"/><path d="m20.8181 5.48571v-1.6"/><path d="m18.5273 5.48571v-1.6"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="20" viewBox="0 0 16 20" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m1 3h14v14h-14z"/></clipPath><rect fill="#a1a6b0" height="16" rx="6" width="16" y="2"/><g clip-path="url(#a)" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m10.1875 9.63542v1.67708c0 .3481.1383.6819.3844.9281.2462.2461.58.3844.9281.3844h.4375c.3481 0 .6819-.1383.9281-.3844.2461-.2462.3844-.58.3844-.9281v-2.1875c0-1.16032-.4609-2.27312-1.2814-3.09359s-1.9333-1.28141-3.0936-1.28141h-1.75c-1.16032 0-2.27312.46094-3.09359 1.28141s-1.28141 1.93327-1.28141 3.09359v1.75c0 1.1603.46094 2.2731 1.28141 3.0936s1.93327 1.2814 3.09359 1.2814h3.2083"/><path d="m8.36458 7.8125h-.72916c-1.00677 0-1.82292.81615-1.82292 1.82292v.72918c0 1.0068.81615 1.8229 1.82292 1.8229h.72916c1.00677 0 1.82292-.8161 1.82292-1.8229v-.72918c0-1.00677-.81615-1.82292-1.82292-1.82292z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="20" viewBox="0 0 15 20" width="15" xmlns="http://www.w3.org/2000/svg"><path d="m7 2.5h-7v7h7z" fill="#f25022"/><path d="m7 10.5h-7v7h7z" fill="#00a4ef"/><path d="m15 2.5h-7v7h7z" fill="#7fba00"/><path d="m15 10.5h-7v7h7z" fill="#ffb900"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="20" viewBox="0 0 16 20" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="10" r="6" stroke="#357bbb" stroke-width="4"/></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everchron/ec-shards",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -24,7 +24,9 @@
24
24
  "*.js",
25
25
  "*.svg"
26
26
  ],
27
- "dependencies": {},
27
+ "dependencies": {
28
+ "v-click-outside": "^2.1.3"
29
+ },
28
30
  "peerDependencies": {
29
31
  "vue": "2.x.x"
30
32
  },
@@ -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 vector-effect="non-scaling-stroke" d="M6.27057 9.16667C7.52203 7.29365 9.34268 5.87275 11.4636 5.11383C13.5846 4.35492 15.8934 4.29821 18.049 4.9521C20.2046 5.60599 22.0929 6.93579 23.4348 8.74512C24.7767 10.5544 25.5011 12.7474 25.5011 15C25.5011 17.2526 24.7767 19.4456 23.4348 21.2549C22.0929 23.0642 20.2046 24.394 18.049 25.0479C15.8934 25.7018 13.5846 25.6451 11.4636 24.8862C9.34268 24.1272 7.52203 22.7064 6.27057 20.8333" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path vector-effect="non-scaling-stroke" d="M6.83333 17.3333C8.122 17.3333 9.16667 16.2886 9.16667 15C9.16667 13.7113 8.122 12.6666 6.83333 12.6666C5.54467 12.6666 4.5 13.7113 4.5 15C4.5 16.2886 5.54467 17.3333 6.83333 17.3333Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path vector-effect="non-scaling-stroke" d="M16.1667 15H9.16669" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path vector-effect="non-scaling-stroke" d="M16.1667 17.3333V15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path vector-effect="non-scaling-stroke" d="M12.6667 17.3333V15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="20" viewBox="0 0 23 20" width="23" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m1 3h14v14h-14z"/></clipPath><rect fill="#a1a6b0" height="16" rx="6" width="16" y="2"/><g clip-path="url(#a)" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m10.1875 9.63542v1.67708c0 .3481.1383.6819.3844.9281.2462.2461.58.3844.9281.3844h.4375c.3481 0 .6819-.1383.9281-.3844.2461-.2462.3844-.58.3844-.9281v-2.1875c0-1.16032-.4609-2.27312-1.2814-3.09359s-1.9333-1.28141-3.0936-1.28141h-1.75c-1.16032 0-2.27312.46094-3.09359 1.28141s-1.28141 1.93327-1.28141 3.09359v1.75c0 1.1603.46094 2.2731 1.28141 3.0936s1.93327 1.2814 3.09359 1.2814h3.2083"/><path d="m8.36458 7.8125h-.72916c-1.00677 0-1.82292.81615-1.82292 1.82292v.72918c0 1.0068.81615 1.8229 1.82292 1.8229h.72916c1.00677 0 1.82292-.8161 1.82292-1.8229v-.72918c0-1.00677-.81615-1.82292-1.82292-1.82292z"/></g><rect fill="#0eba65" height="8" rx="2" width="12" x="11"/><path d="m15 9.5h-2c-1.933 0-3.5-1.567-3.5-3.5v-3l1.5 1v2c0 1.10457.8954 2 2 2h2z" fill="#a1a6b0"/><g stroke="#fff" stroke-linecap="round" stroke-linejoin="round"><path d="m14.7089 5.48572c.8435 0 1.5273-.71634 1.5273-1.6 0-.88365-.6838-1.6-1.5273-1.6s-1.5273.71635-1.5273 1.6c0 .88366.6838 1.6 1.5273 1.6z"/><path d="m20.8181 3.88571h-4.5818"/><path d="m20.8181 5.48571v-1.6"/><path d="m18.5273 5.48571v-1.6"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="20" viewBox="0 0 16 20" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m1 3h14v14h-14z"/></clipPath><rect fill="#a1a6b0" height="16" rx="6" width="16" y="2"/><g clip-path="url(#a)" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m10.1875 9.63542v1.67708c0 .3481.1383.6819.3844.9281.2462.2461.58.3844.9281.3844h.4375c.3481 0 .6819-.1383.9281-.3844.2461-.2462.3844-.58.3844-.9281v-2.1875c0-1.16032-.4609-2.27312-1.2814-3.09359s-1.9333-1.28141-3.0936-1.28141h-1.75c-1.16032 0-2.27312.46094-3.09359 1.28141s-1.28141 1.93327-1.28141 3.09359v1.75c0 1.1603.46094 2.2731 1.28141 3.0936s1.93327 1.2814 3.09359 1.2814h3.2083"/><path d="m8.36458 7.8125h-.72916c-1.00677 0-1.82292.81615-1.82292 1.82292v.72918c0 1.0068.81615 1.8229 1.82292 1.8229h.72916c1.00677 0 1.82292-.8161 1.82292-1.8229v-.72918c0-1.00677-.81615-1.82292-1.82292-1.82292z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="20" viewBox="0 0 15 20" width="15" xmlns="http://www.w3.org/2000/svg"><path d="m7 2.5h-7v7h7z" fill="#f25022"/><path d="m7 10.5h-7v7h7z" fill="#00a4ef"/><path d="m15 2.5h-7v7h7z" fill="#7fba00"/><path d="m15 10.5h-7v7h7z" fill="#ffb900"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="20" viewBox="0 0 16 20" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="10" r="6" stroke="#357bbb" stroke-width="4"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="15" viewBox="0 0 20 15" width="20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m0 0h20v15h-20z"/></clipPath><mask id="b" height="15" maskUnits="userSpaceOnUse" width="20" x="0" y="0"><path d="m20 0h-20v15h20z" fill="#fff"/></mask><mask id="c" height="15" maskUnits="userSpaceOnUse" width="20" x="0" y="0"><path clip-rule="evenodd" d="m0 0v15h20v-15z" fill="#fff" fill-rule="evenodd"/></mask><g clip-path="url(#a)"><g clip-rule="evenodd" fill-rule="evenodd" mask="url(#b)"><path d="m0 0v15h20v-15z" fill="#f7fcff"/><g mask="url(#c)"><path d="m0 0v15h20v-15z" fill="#3d58db"/><path d="m9.26516 3.02849.73474-.38628.7347.38628-.1403-.81814.5944-.63909h-.8214l-.3674-.804048-.36737.804048h-.82146l.59441.63909zm0 10.85551.73474-.3863.7347.3863-.1403-.8181.5944-.6391h-.8214l-.3674-.804-.36737.804h-.82146l.59441.6391zm-5.78226-5.37274.14031-.81814-.5944-.63908h.82145l.36736-.80405.36738.80405h.82145l-.59442.63908.14033.81814-.73474-.38627zm1.35153 1.77004-.14032.8181.73474-.3862.73472.3862-.14031-.8181.59441-.63909h-.82146l-.36736-.80404-.36737.80404h-.82146zm9.74357.4319-.7347.3862.1402-.8181-.5944-.63909h.8215l.3674-.80404.3674.80404h.8214l-.5944.63909.1402.8181zm-9.74357-5.6756-.14032.81814.73474-.38628.73472.38628-.14031-.81814.59441-.63909h-.82146l-.36736-.80405-.36737.80405h-.82146zm9.74357.43186-.7347.38628.1402-.81814-.5944-.63909h.8215l.3674-.80405.3674.80405h.8214l-.5944.63909.1402.81814zm-7.918 6.89424-.14033.8182.73473-.3864.73473.3864-.14032-.8182.59441-.6391h-.82145l-.36737-.804-.36737.804h-.82145zm5.4173.8182.1403-.8182-.5944-.6391h.8215l.3673-.804.3674.804h.8215l-.5945.6391.1404.8182-.7348-.3864zm-5.4173-10.25995-.14033.81814.73473-.38628.73473.38628-.14032-.81814.59441-.63909h-.82145l-.36737-.80405-.36737.80405h-.82145zm5.4173.81814.1403-.81814-.5944-.63909h.8215l.3673-.80405.3674.80405h.8215l-.5945.63909.1404.81814-.7348-.38628zm3.0627 3.87915-.1404.81812.7348-.38626.7347.38626-.1403-.81812.5943-.6391h-.8213l-.3674-.80404-.3674.80404h-.8215z" fill="#ffd018"/></g></g></g></svg>
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <div v-if="show" class="ecs-alert" :class="[typeClass, dismissable ? 'ecs-alert-dismissable' : '', inset ? 'ecs-alert-inset' : '']">
3
3
  <button v-if="dismissable" @click="dismiss" class="close">
4
- <ecs-icon type="close" width="20" height="20" />
4
+ <ecs-icon type="close" size="20" />
5
5
  </button>
6
6
  <div class="ecs-alert-inner">
7
7
  <h4 v-if="headline" class="ecs-alert-headline">
8
- <ecs-icon v-if="icon" :type="icon" width="20" height="20" />
8
+ <ecs-icon v-if="icon" :type="icon" size="20" />
9
9
  {{ headline }}
10
10
  </h4>
11
11
  <div v-if="$slots.default" class="ecs-alert-content">
@@ -7,8 +7,8 @@
7
7
  typeClass
8
8
  ]"
9
9
  >
10
- <ecs-icon v-if="icon" :type="icon" width="20" height="20" />
11
- <ecs-icon v-if="type == 'more'" type="more" width="20" height="20" />
10
+ <ecs-icon v-if="icon" :type="icon" size="20" />
11
+ <ecs-icon v-if="type == 'more'" type="more" size="20" />
12
12
  <span v-if="type != 'more'">
13
13
  <slot></slot>
14
14
  </span>
@@ -13,7 +13,7 @@
13
13
  @mouseover="$emit('mouseover', $event)"
14
14
  @mouseleave="$emit('mouseleave', $event)">
15
15
 
16
- <ecs-icon v-if="icon || loading" :type="iconType" :width="iconSize" :height="iconSize" />
16
+ <ecs-icon v-if="icon || loading" :type="iconType" :size="iconSize" />
17
17
  <slot></slot>
18
18
  </a>
19
19
 
@@ -31,7 +31,7 @@
31
31
  @mouseover="$emit('mouseover', $event)"
32
32
  @mouseleave="$emit('mouseleave', $event)">
33
33
 
34
- <ecs-icon v-if="icon || loading" :type="iconType" :width="iconSize" :height="iconSize" />
34
+ <ecs-icon v-if="icon || loading" :type="iconType" :size="iconSize" />
35
35
  <slot></slot>
36
36
  </button>
37
37
 
@@ -5,7 +5,7 @@
5
5
  :style="selectedColorText"
6
6
  @click="$emit('click', $event)">
7
7
 
8
- <ecs-icon v-if="icon || loading" :type="iconType" width="20" height="20" />
8
+ <ecs-icon v-if="icon || loading" :type="iconType" size="20" />
9
9
  <div v-if="selectedColor" class="ecs-context-button-color" :style="selectedColorBackground" />
10
10
  <slot></slot>
11
11
  </button>
@@ -5,7 +5,7 @@
5
5
  ]"
6
6
  @click="$emit('click', $event)">
7
7
 
8
- <ecs-icon v-if="type == 'ellipsis'" type="more" width="20" height="20" color="#FFF" />
8
+ <ecs-icon v-if="type == 'ellipsis'" type="more" size="20" color="#FFF" />
9
9
  <slot></slot>
10
10
  </button>
11
11
  </template>
@@ -15,7 +15,7 @@
15
15
  @mouseover="$emit('mouseover', $event)"
16
16
  @mouseleave="$emit('mouseleave', $event)">
17
17
 
18
- <ecs-icon v-if="icon || loading" :type="iconType" :width="iconSize" :height="iconSize" />
18
+ <ecs-icon v-if="icon || loading" :type="iconType" :size="iconSize" />
19
19
  <div v-if="label != null" class="button-label">{{ label }}</div>
20
20
  <div v-if="chevron" class="chevron" :class="active ? 'expand' : ''" />
21
21
  </button>
@@ -9,10 +9,10 @@
9
9
  dropdownClass]"
10
10
  @click="$emit('click', $event)">
11
11
 
12
- <ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :width="iconSize" :height="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
12
+ <ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :size="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
13
13
  <slot></slot>
14
14
  <span class="badge" v-if="badge" :style="{ background: badgeColor }"></span>
15
- <ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :width="iconSize" :height="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
15
+ <ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :size="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
16
16
  </a>
17
17
 
18
18
  <button v-else class="ecs-toolbar-button"
@@ -25,10 +25,10 @@
25
25
  dropdownClass]"
26
26
  @click="$emit('click', $event)">
27
27
 
28
- <ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :width="iconSize" :height="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
28
+ <ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :size="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
29
29
  <slot></slot>
30
30
  <span class="badge" v-if="badge" :style="{ background: badgeColor }"></span>
31
- <ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :width="iconSize" :height="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
31
+ <ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :size="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
32
32
  </button>
33
33
  </template>
34
34
 
@@ -8,7 +8,7 @@
8
8
  <ecs-icon :type="icon" />
9
9
  <span v-if="hasBadge" class="badge" />
10
10
  <div class="sub-icon">
11
- <ecs-icon v-if="subIcon" :type="subIcon" width="14" height="14" />
11
+ <ecs-icon v-if="subIcon" :type="subIcon" size="14" />
12
12
  </div>
13
13
  </button>
14
14
  </template>
@@ -8,7 +8,7 @@
8
8
  isVisible || nonInteractive ? '' : 'collapsed',
9
9
  nonInteractive ? '' : 'interactive',
10
10
  ]">
11
- <ecs-icon v-if="icon" :type="icon" color="#858E9E" :width="iconSize" :height="iconSize" />
11
+ <ecs-icon v-if="icon" :type="icon" color="#858E9E" :size="iconSize" />
12
12
  <div class="description" v-if="label">{{ label }}</div>
13
13
  <div class="collection"
14
14
  @mouseover="toggleTooltip"
@@ -0,0 +1,215 @@
1
+ <template>
2
+ <div class="ecs-context-menu" :class="opened ? ' opened': ''" :id="elementId" :style="[postionStyles]" v-click-outside="onClickOutside">
3
+ <ul>
4
+ <li
5
+ v-for="(option, index) in options"
6
+ :key="index"
7
+ @click.stop="optionClicked(option)"
8
+ :class="[
9
+ option.type === 'divider' ? 'ecs-context-menu-divider' : 'ecs-context-menu-item',
10
+ option.type === 'danger' ? 'danger' : '',
11
+ option.disabled ? 'disabled' : ''
12
+ ]"
13
+ >
14
+ <ecs-icon v-if="option.icon" :type="option.icon" size="20" />
15
+ <span v-if="option.type != 'divider'">{{ option.name}}</span>
16
+ </li>
17
+ </ul>
18
+ </div>
19
+ </template>
20
+
21
+ <script>
22
+ import Vue from "vue";
23
+ import vClickOutside from "v-click-outside"
24
+ Vue.use(vClickOutside)
25
+ import EcsIcon from '../icon/icon'
26
+
27
+ export default {
28
+ components: { EcsIcon },
29
+
30
+ props: {
31
+ /** Unique String that acts as the id for the menu. */
32
+ elementId: {
33
+ type: String,
34
+ required: true
35
+ },
36
+ /** Array of menu options to show. Component will use the `name` parameter as the label. Array needs to contain objects with the following structure:
37
+ ```{
38
+ name: 'Duplicate',
39
+ slug: 'duplicate',
40
+ icon: 'evidence',
41
+ disabled: false,
42
+ type: ''
43
+ }``` */
44
+ options: {
45
+ type: Array,
46
+ required: true
47
+ },
48
+ /** If passed, an icon will appear. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
49
+ icon: {
50
+ type: String
51
+ }
52
+ },
53
+
54
+ data() {
55
+ return {
56
+ item: null,
57
+ menuWidth: null,
58
+ menuHeight: null,
59
+ opened: false,
60
+ left: 0,
61
+ top: 0
62
+ };
63
+ },
64
+
65
+ computed: {
66
+ postionStyles(){
67
+ return { left: this.left + 'px', top: this.top + 'px'}
68
+ }
69
+ },
70
+
71
+ methods: {
72
+ showMenu(event, item) {
73
+ this.item = item
74
+
75
+ let menu = document.getElementById(this.elementId)
76
+ if (!menu) {
77
+ return
78
+ }
79
+
80
+ if (!this.menuWidth || !this.menuHeight) {
81
+ menu.style.visibility = "hidden"
82
+ menu.style.display = "block"
83
+ this.menuWidth = menu.offsetWidth
84
+ this.menuHeight = menu.offsetHeight
85
+ menu.removeAttribute("style")
86
+ }
87
+
88
+ if (this.menuWidth + event.pageX >= window.innerWidth) {
89
+ this.left = event.pageX - this.menuWidth + 2
90
+ } else {
91
+ this.left = event.pageX - 2
92
+ }
93
+
94
+ if (this.menuHeight + event.pageY >= window.innerHeight) {
95
+ this.top = event.pageY - this.menuHeight + 2
96
+ } else {
97
+ this.top = event.pageY - 2
98
+ }
99
+
100
+ this.opened = true
101
+ },
102
+
103
+ hideContextMenu() {
104
+ const element = document.getElementById(this.elementId)
105
+ if (element) {
106
+ this.opened = false
107
+ /** Emitted when closing the context menu. */
108
+ this.$emit("menu-closed")
109
+ }
110
+ },
111
+
112
+ onClickOutside() {
113
+ this.hideContextMenu()
114
+ },
115
+
116
+ optionClicked(option) {
117
+ this.hideContextMenu()
118
+
119
+ /** When a menu item is clicked, the component will emit an event with a value containing the clicked item and the menu option that was clicked. Register for this event to capture the selection result. */
120
+ this.$emit("option-clicked", {
121
+ item: this.item,
122
+ option: option
123
+ })
124
+ },
125
+
126
+ onEscKeyRelease(event) {
127
+ if (event.keyCode === 27) {
128
+ this.hideContextMenu()
129
+ }
130
+ }
131
+ },
132
+
133
+ mounted() {
134
+ document.body.addEventListener("keyup", this.onEscKeyRelease)
135
+ },
136
+
137
+ beforeDestroy() {
138
+ document.removeEventListener("keyup", this.onEscKeyRelease)
139
+ }
140
+ };
141
+ </script>
142
+
143
+ <style lang="scss" scoped>
144
+ @import "../../tokens/build/scss/tokens.scss";
145
+ @import "../mixins/svg-uri";
146
+
147
+ .ecs-context-menu{
148
+ top: 0;
149
+ left: 0;
150
+ margin: 0;
151
+ padding: 0;
152
+ display: none;
153
+ list-style: none;
154
+ position: absolute;
155
+ z-index: 1000000;
156
+ border-radius: $border-radius-medium;
157
+ background: rgba(255, 255, 255, 0.94);
158
+ box-shadow: 0px 0px 0px 1px rgba(71, 75, 96, 0.05), 0px 2px 8px rgba(71, 75, 96, 0.15);
159
+ backdrop-filter: blur(7px);
160
+ padding: $spacing-5 0;
161
+
162
+ &.opened{
163
+ display: block;
164
+ }
165
+
166
+ &-item{
167
+ display: flex;
168
+ align-items: center;
169
+ height: $spacing-40;
170
+ column-gap: $spacing-10;
171
+ padding: 0 $spacing-15;
172
+ font-size: $type-scale-3-font-size;
173
+ line-height: $type-scale-3-line-height;
174
+ color: $color-gray-15;
175
+ cursor: pointer;
176
+
177
+ .icon{
178
+ color: $color-gray-8;
179
+ }
180
+
181
+ &:not(.disabled){
182
+ &.danger:hover{
183
+ background: $color-red-1;
184
+
185
+ .icon{
186
+ color: $color-red-10;
187
+ }
188
+ }
189
+
190
+ &:hover{
191
+ background: $color-blue-1;
192
+
193
+ .icon{
194
+ color: $color-blue-10;
195
+ }
196
+ }
197
+ }
198
+
199
+ &.disabled{
200
+ cursor: not-allowed;
201
+ color: $color-gray-7;
202
+
203
+ .icon{
204
+ color: $color-gray-5;
205
+ }
206
+ }
207
+ }
208
+
209
+ &-divider{
210
+ margin: $spacing-5 0;
211
+ height: 1px;
212
+ background: $color-gray-3;
213
+ }
214
+ }
215
+ </style>
@@ -15,7 +15,7 @@
15
15
  <slot name="control"></slot>
16
16
  </div>
17
17
 
18
- <ecs-icon v-if="icon" :type="icon" :color="iconColor" :spinning="spinning" width="26" height="26" />
18
+ <ecs-icon v-if="icon" :type="icon" :color="iconColor" :spinning="spinning" size="26" />
19
19
  <ecs-skeleton-loader v-if="icon && loading" type="rect" :width="26" :height="26" />
20
20
 
21
21
  <div class="ecs-data-card-inner">
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="ecs-data-grid-row" :class="state">
2
+ <div class="ecs-data-grid-row" :class="state" ref="grid_row">
3
3
  <div v-if="state == 'droppable'" @click="handleDropzoneClick" class="ecs-data-grid-row-drop-zone" />
4
4
 
5
5
  <!-- @slot All of the row's cells go here. There should **never** be any other child component other than EcsDataGridCell be used. -->
@@ -16,6 +16,13 @@
16
16
  type: String,
17
17
  validator: v => ['default', 'selected', 'opened', 'added', 'droppable'].includes(v),
18
18
  default: 'default'
19
+ },
20
+
21
+ /** Determines if listener should be added for listed mouse event. */
22
+ mouseEvent: {
23
+ type: String,
24
+ validator: v => ['', 'click', 'contextmenu'].includes(v),
25
+ default: ''
19
26
  }
20
27
  },
21
28
 
@@ -23,7 +30,24 @@
23
30
  handleDropzoneClick(){
24
31
  /** Emitted when clicking (eg. dropping a bunch of other rows via lift & drop) the rows dropzone. */
25
32
  this.$emit('rowdrop')
33
+ },
34
+
35
+ handleRowClick(event){
36
+ /** Emitted when left or right clicking in the component. */
37
+ this.$emit("click", event)
38
+ event.preventDefault()
39
+ event.stopPropagation()
26
40
  }
41
+ },
42
+
43
+ mounted() {
44
+ if(this.mouseEvent)
45
+ this.$refs.grid_row.addEventListener(this.mouseEvent, this.handleRowClick)
46
+ },
47
+
48
+ beforeDestroy() {
49
+ if(this.mouseEvent)
50
+ this.$refs.grid_row.removeEventListener(this.mouseEvent, this.handleRowClick)
27
51
  }
28
52
  }
29
53
  </script>
@@ -1,14 +1,14 @@
1
1
  <template>
2
- <dialog ref="dialog" :class="[large ? 'ecs-dialog-large' : '']" class="ecs-dialog">
3
- <div class="ecs-dialog-body">
4
- <slot></slot>
5
- </div>
6
-
7
- <div v-if="$slots.actions" class="ecs-dialog-footer" :class="[stackedFooter ? 'ecs-dialog-footer-stacked' : '']">
8
- <!-- @slot Slot for the dialog footer buttons. Should only contain EcsButtonDialog components. -->
9
- <slot name="actions"></slot>
10
- </div>
11
- </dialog>
2
+ <dialog v-if="lazyLoad" ref="dialog" :class="[large ? 'ecs-dialog-large' : '']" class="ecs-dialog">
3
+ <div class="ecs-dialog-body">
4
+ <slot></slot>
5
+ </div>
6
+
7
+ <div v-if="$slots.actions" class="ecs-dialog-footer" :class="[stackedFooter ? 'ecs-dialog-footer-stacked' : '']">
8
+ <!-- @slot Slot for the dialog footer buttons. Should only contain EcsButtonDialog components. -->
9
+ <slot name="actions"></slot>
10
+ </div>
11
+ </dialog>
12
12
  </template>
13
13
 
14
14
  <script>
@@ -33,7 +33,8 @@
33
33
 
34
34
  data () {
35
35
  return {
36
- isShown: this.show
36
+ isShown: this.show,
37
+ lazyLoad: false
37
38
  }
38
39
  },
39
40
 
@@ -49,10 +50,17 @@
49
50
  show(){
50
51
  this.isShown = this.show
51
52
 
52
- if(this.isShown)
53
- this.$refs.dialog.showModal()
54
- else
53
+ if(this.isShown){
54
+ this.lazyLoad = true
55
+ this.$nextTick(() => {
56
+ this.$refs.dialog.showModal()
57
+ })
58
+ } else {
55
59
  this.$refs.dialog.close()
60
+ this.$nextTick(() => {
61
+ this.lazyLoad = false
62
+ })
63
+ }
56
64
  }
57
65
  },
58
66
 
@@ -80,8 +88,8 @@
80
88
  display: flex;
81
89
  flex-direction: column;
82
90
  margin: auto;
83
- margin-bottom: auto;
84
- margin-top: auto;
91
+ margin-bottom: auto !important;
92
+ margin-top: auto !important;
85
93
  border: none;
86
94
  padding: 0;
87
95
  overflow: visible;
@@ -159,36 +167,6 @@
159
167
  }
160
168
  }
161
169
 
162
- &-user{
163
- display: flex;
164
- align-items: center;
165
- margin: 20px 0 15px 0;
166
- background: #FFF;
167
- border-radius: $border-radius-small;
168
- padding: 10px;
169
- border: 1px solid rgba($color-gray-8, .2);
170
- text-align: left;
171
-
172
- span{
173
- display: block;
174
- }
175
-
176
- .avatar{
177
- margin-right: 12px;
178
- }
179
-
180
- .title{
181
- font-size: $type-scale-4-font-size;
182
- margin-bottom: 5px;
183
- color: $color-gray-13;
184
- }
185
-
186
- .sub{
187
- font-size: $type-scale-3-font-size;
188
- color: $color-gray-8;
189
- }
190
- }
191
-
192
170
  &-footer{
193
171
  display: flex;
194
172
  justify-content: space-between;
@@ -5,7 +5,7 @@
5
5
  <div v-if="instantView" class="instant" />
6
6
  <div v-else class="no-instant" />
7
7
  <span v-if="loading" class="loading">
8
- <ecs-icon type="loading" width="18px" height="18px" color="#202127" />
8
+ <ecs-icon type="loading" size="18" color="#202127" />
9
9
  </span>
10
10
  </div>
11
11
  </template>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="ecs-empty-state">
3
- <ecs-icon v-if="type!='loading'" :type="type" :color="iconColor" :width="iconSize" :height="iconSize" />
3
+ <ecs-icon v-if="type!='loading'" :type="type" :color="iconColor" :size="iconSize" />
4
4
  <div v-else class="ecs-empty-state-loading" />
5
5
  <div v-if="type!='loading'" class="ecs-empty-state-message" :class="size">
6
6
  <slot></slot>
@@ -3,7 +3,7 @@
3
3
  <div class="ecs-excerpt-title">
4
4
  <div class="ecs-excerpt-title-headline">
5
5
  <ecs-skeleton-loader v-if="icon && loading" type="rect" :width="20" :height="20" />
6
- <ecs-icon v-if="icon && !loading" :type="icon" width="20" height="20" />
6
+ <ecs-icon v-if="icon && !loading" :type="icon" size="20" />
7
7
  <ecs-skeleton-loader v-if="loading" type="single" :width="20" />
8
8
  <span v-else>{{ headline }}</span>
9
9
  </div>