@limetech/lime-elements 37.45.2 → 37.46.1

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 (196) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/component-cba208a8.js +2448 -0
  3. package/dist/cjs/component-cba208a8.js.map +1 -0
  4. package/dist/cjs/{dom-ee8ee17d.js → debounce-2e5f4b7e.js} +1 -31
  5. package/dist/cjs/debounce-2e5f4b7e.js.map +1 -0
  6. package/dist/cjs/dom-81eaa633.js +34 -0
  7. package/dist/cjs/dom-81eaa633.js.map +1 -0
  8. package/dist/cjs/lime-elements.cjs.js +1 -1
  9. package/dist/cjs/{limel-action-bar_3.cjs.entry.js → limel-action-bar_4.cjs.entry.js} +68 -1
  10. package/dist/cjs/limel-action-bar_4.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{limel-breadcrumbs_7.cjs.entry.js → limel-breadcrumbs_5.cjs.entry.js} +412 -3357
  12. package/dist/cjs/limel-breadcrumbs_5.cjs.entry.js.map +1 -0
  13. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-chip_2.cjs.entry.js +2 -2
  15. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js +610 -0
  16. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js.map +1 -0
  17. package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
  18. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  20. package/dist/cjs/limel-form.cjs.entry.js +1 -1
  21. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  22. package/dist/cjs/{limel-portal.cjs.entry.js → limel-icon_2.cjs.entry.js} +201 -1
  23. package/dist/cjs/limel-icon_2.cjs.entry.js.map +1 -0
  24. package/dist/cjs/limel-picker.cjs.entry.js +3 -2
  25. package/dist/cjs/limel-picker.cjs.entry.js.map +1 -1
  26. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +294 -16
  27. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
  28. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  29. package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
  30. package/dist/cjs/limel-text-editor.cjs.entry.js.map +1 -1
  31. package/dist/cjs/{link-helper-b7e6c8df.js → link-helper-563b01c0.js} +3 -1
  32. package/dist/cjs/link-helper-563b01c0.js.map +1 -0
  33. package/dist/cjs/loader.cjs.js +1 -1
  34. package/dist/cjs/{translations-988a3f51.js → translations-83a68e56.js} +25 -1
  35. package/dist/cjs/translations-83a68e56.js.map +1 -0
  36. package/dist/collection/collection-manifest.json +1 -0
  37. package/dist/collection/components/chip/chip.js +2 -2
  38. package/dist/collection/components/text-editor/link-menu/editor-link-menu.css +12 -0
  39. package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +201 -0
  40. package/dist/collection/components/text-editor/link-menu/editor-link-menu.js.map +1 -0
  41. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js +72 -11
  42. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js.map +1 -1
  43. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-items.js +6 -0
  44. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-items.js.map +1 -1
  45. package/dist/collection/components/text-editor/prosemirror-adapter/menu/types.js.map +1 -1
  46. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link-plugin.js +172 -0
  47. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link-plugin.js.map +1 -0
  48. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +4 -0
  49. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +53 -6
  50. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js.map +1 -1
  51. package/dist/collection/components/text-editor/text-editor.css +1 -0
  52. package/dist/collection/translations/da.js +4 -0
  53. package/dist/collection/translations/da.js.map +1 -1
  54. package/dist/collection/translations/en.js +4 -0
  55. package/dist/collection/translations/en.js.map +1 -1
  56. package/dist/collection/translations/fi.js +4 -0
  57. package/dist/collection/translations/fi.js.map +1 -1
  58. package/dist/collection/translations/nl.js +4 -0
  59. package/dist/collection/translations/nl.js.map +1 -1
  60. package/dist/collection/translations/no.js +4 -0
  61. package/dist/collection/translations/no.js.map +1 -1
  62. package/dist/collection/translations/sv.js +4 -0
  63. package/dist/collection/translations/sv.js.map +1 -1
  64. package/dist/collection/util/link-helper.js +1 -1
  65. package/dist/collection/util/link-helper.js.map +1 -1
  66. package/dist/esm/component-db286494.js +2440 -0
  67. package/dist/esm/component-db286494.js.map +1 -0
  68. package/dist/esm/{dom-ae531ebc.js → debounce-9a05c91c.js} +2 -31
  69. package/dist/esm/debounce-9a05c91c.js.map +1 -0
  70. package/dist/esm/dom-0b0170a0.js +32 -0
  71. package/dist/esm/dom-0b0170a0.js.map +1 -0
  72. package/dist/esm/lime-elements.js +1 -1
  73. package/dist/esm/{limel-action-bar_3.entry.js → limel-action-bar_4.entry.js} +68 -2
  74. package/dist/esm/limel-action-bar_4.entry.js.map +1 -0
  75. package/dist/esm/{limel-breadcrumbs_7.entry.js → limel-breadcrumbs_5.entry.js} +404 -3347
  76. package/dist/esm/limel-breadcrumbs_5.entry.js.map +1 -0
  77. package/dist/esm/limel-callout.entry.js +1 -1
  78. package/dist/esm/limel-chip_2.entry.js +2 -2
  79. package/dist/esm/limel-dynamic-label_4.entry.js +603 -0
  80. package/dist/esm/limel-dynamic-label_4.entry.js.map +1 -0
  81. package/dist/esm/limel-file-viewer.entry.js +1 -1
  82. package/dist/esm/limel-file.entry.js +1 -1
  83. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  84. package/dist/esm/limel-form.entry.js +1 -1
  85. package/dist/esm/limel-form.entry.js.map +1 -1
  86. package/dist/esm/{limel-portal.entry.js → limel-icon_2.entry.js} +201 -2
  87. package/dist/esm/limel-icon_2.entry.js.map +1 -0
  88. package/dist/esm/limel-picker.entry.js +2 -1
  89. package/dist/esm/limel-picker.entry.js.map +1 -1
  90. package/dist/esm/limel-prosemirror-adapter.entry.js +294 -16
  91. package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
  92. package/dist/esm/limel-snackbar.entry.js +1 -1
  93. package/dist/esm/limel-text-editor.entry.js +1 -1
  94. package/dist/esm/limel-text-editor.entry.js.map +1 -1
  95. package/dist/esm/{link-helper-725a9166.js → link-helper-2a16b323.js} +2 -2
  96. package/dist/esm/link-helper-2a16b323.js.map +1 -0
  97. package/dist/esm/loader.js +1 -1
  98. package/dist/esm/{translations-e73d7840.js → translations-5ae8ec7b.js} +25 -1
  99. package/dist/esm/translations-5ae8ec7b.js.map +1 -0
  100. package/dist/lime-elements/lime-elements.esm.js +1 -1
  101. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  102. package/dist/lime-elements/p-18c97232.js +2 -0
  103. package/dist/lime-elements/p-18c97232.js.map +1 -0
  104. package/dist/lime-elements/{p-5cfed8a8.entry.js → p-26a43fd9.entry.js} +5 -5
  105. package/dist/lime-elements/p-29e0e5bd.js +2 -0
  106. package/dist/lime-elements/p-29e0e5bd.js.map +1 -0
  107. package/dist/lime-elements/{p-dfc28411.entry.js → p-42b6ba6d.entry.js} +2 -2
  108. package/dist/lime-elements/{p-c8ce7cd4.entry.js → p-4bd0b7fb.entry.js} +2 -2
  109. package/dist/lime-elements/p-50b604b9.entry.js +2 -0
  110. package/dist/lime-elements/p-50b604b9.entry.js.map +1 -0
  111. package/dist/lime-elements/{p-ab13cb4a.entry.js → p-5e2604e5.entry.js} +2 -2
  112. package/dist/lime-elements/p-5e7b7b03.js +2 -0
  113. package/dist/lime-elements/p-5e7b7b03.js.map +1 -0
  114. package/dist/lime-elements/{p-516619d3.js → p-6465625e.js} +2 -2
  115. package/dist/lime-elements/p-6465625e.js.map +1 -0
  116. package/dist/lime-elements/{p-7681dae8.entry.js → p-70bfa812.entry.js} +2 -2
  117. package/dist/lime-elements/p-8d71c9e5.entry.js +2 -0
  118. package/dist/lime-elements/p-8d71c9e5.entry.js.map +1 -0
  119. package/dist/lime-elements/p-8f10b7e4.entry.js +2 -0
  120. package/dist/lime-elements/p-8f10b7e4.entry.js.map +1 -0
  121. package/dist/lime-elements/{p-e3eb403a.entry.js → p-91a8c244.entry.js} +2 -2
  122. package/dist/lime-elements/p-b8bfe44d.entry.js +2 -0
  123. package/dist/lime-elements/{p-3f4d2f62.entry.js.map → p-b8bfe44d.entry.js.map} +1 -1
  124. package/dist/lime-elements/p-bcfb5db5.entry.js +68 -0
  125. package/dist/lime-elements/p-bcfb5db5.entry.js.map +1 -0
  126. package/dist/lime-elements/p-d4d2593b.entry.js +2 -0
  127. package/dist/lime-elements/p-d4d2593b.entry.js.map +1 -0
  128. package/dist/lime-elements/p-eb9ab3d4.entry.js +2 -0
  129. package/dist/lime-elements/p-eb9ab3d4.entry.js.map +1 -0
  130. package/dist/lime-elements/p-f764b655.js +200 -0
  131. package/dist/lime-elements/p-f764b655.js.map +1 -0
  132. package/dist/lime-elements/{p-cfe4e725.entry.js → p-fe5e8f22.entry.js} +2 -2
  133. package/dist/lime-elements/{p-cfe4e725.entry.js.map → p-fe5e8f22.entry.js.map} +1 -1
  134. package/dist/types/components/file-viewer/file-viewer.d.ts +126 -0
  135. package/dist/types/components/progress-flow/progress-flow-item/progress-flow-item.d.ts +36 -0
  136. package/dist/types/components/progress-flow/progress-flow.d.ts +49 -0
  137. package/dist/types/components/text-editor/link-menu/editor-link-menu.d.ts +47 -0
  138. package/dist/types/components/text-editor/prosemirror-adapter/menu/menu-commands.d.ts +5 -2
  139. package/dist/types/components/text-editor/prosemirror-adapter/menu/types.d.ts +49 -0
  140. package/dist/types/components/text-editor/prosemirror-adapter/plugins/link-plugin.d.ts +9 -0
  141. package/dist/types/components/text-editor/prosemirror-adapter/prosemirror-adapter.d.ts +14 -3
  142. package/dist/types/components.d.ts +79 -0
  143. package/dist/types/translations/da.d.ts +4 -0
  144. package/dist/types/translations/en.d.ts +4 -0
  145. package/dist/types/translations/fi.d.ts +4 -0
  146. package/dist/types/translations/nl.d.ts +4 -0
  147. package/dist/types/translations/no.d.ts +4 -0
  148. package/dist/types/translations/sv.d.ts +4 -0
  149. package/dist/types/util/link-helper.d.ts +1 -0
  150. package/package.json +2 -2
  151. package/dist/cjs/dom-ee8ee17d.js.map +0 -1
  152. package/dist/cjs/limel-action-bar_3.cjs.entry.js.map +0 -1
  153. package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js.map +0 -1
  154. package/dist/cjs/limel-dynamic-label_2.cjs.entry.js +0 -91
  155. package/dist/cjs/limel-dynamic-label_2.cjs.entry.js.map +0 -1
  156. package/dist/cjs/limel-icon.cjs.entry.js +0 -208
  157. package/dist/cjs/limel-icon.cjs.entry.js.map +0 -1
  158. package/dist/cjs/limel-portal.cjs.entry.js.map +0 -1
  159. package/dist/cjs/link-helper-b7e6c8df.js.map +0 -1
  160. package/dist/cjs/translations-988a3f51.js.map +0 -1
  161. package/dist/esm/dom-ae531ebc.js.map +0 -1
  162. package/dist/esm/limel-action-bar_3.entry.js.map +0 -1
  163. package/dist/esm/limel-breadcrumbs_7.entry.js.map +0 -1
  164. package/dist/esm/limel-dynamic-label_2.entry.js +0 -86
  165. package/dist/esm/limel-dynamic-label_2.entry.js.map +0 -1
  166. package/dist/esm/limel-icon.entry.js +0 -204
  167. package/dist/esm/limel-icon.entry.js.map +0 -1
  168. package/dist/esm/limel-portal.entry.js.map +0 -1
  169. package/dist/esm/link-helper-725a9166.js.map +0 -1
  170. package/dist/esm/translations-e73d7840.js.map +0 -1
  171. package/dist/lime-elements/p-2f453044.entry.js +0 -266
  172. package/dist/lime-elements/p-2f453044.entry.js.map +0 -1
  173. package/dist/lime-elements/p-35a4a846.entry.js +0 -2
  174. package/dist/lime-elements/p-35a4a846.entry.js.map +0 -1
  175. package/dist/lime-elements/p-3f4d2f62.entry.js +0 -2
  176. package/dist/lime-elements/p-516619d3.js.map +0 -1
  177. package/dist/lime-elements/p-5c9fbe6f.entry.js +0 -2
  178. package/dist/lime-elements/p-5c9fbe6f.entry.js.map +0 -1
  179. package/dist/lime-elements/p-714d6937.js +0 -2
  180. package/dist/lime-elements/p-714d6937.js.map +0 -1
  181. package/dist/lime-elements/p-a0fc1875.entry.js +0 -2
  182. package/dist/lime-elements/p-a0fc1875.entry.js.map +0 -1
  183. package/dist/lime-elements/p-a2d19673.entry.js +0 -2
  184. package/dist/lime-elements/p-a2d19673.entry.js.map +0 -1
  185. package/dist/lime-elements/p-c5f96fcd.entry.js +0 -2
  186. package/dist/lime-elements/p-c5f96fcd.entry.js.map +0 -1
  187. package/dist/lime-elements/p-cd6b9ff0.js +0 -2
  188. package/dist/lime-elements/p-cd6b9ff0.js.map +0 -1
  189. package/dist/lime-elements/p-f548d996.entry.js +0 -2
  190. package/dist/lime-elements/p-f548d996.entry.js.map +0 -1
  191. /package/dist/lime-elements/{p-5cfed8a8.entry.js.map → p-26a43fd9.entry.js.map} +0 -0
  192. /package/dist/lime-elements/{p-dfc28411.entry.js.map → p-42b6ba6d.entry.js.map} +0 -0
  193. /package/dist/lime-elements/{p-c8ce7cd4.entry.js.map → p-4bd0b7fb.entry.js.map} +0 -0
  194. /package/dist/lime-elements/{p-ab13cb4a.entry.js.map → p-5e2604e5.entry.js.map} +0 -0
  195. /package/dist/lime-elements/{p-7681dae8.entry.js.map → p-70bfa812.entry.js.map} +0 -0
  196. /package/dist/lime-elements/{p-e3eb403a.entry.js.map → p-91a8c244.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as e,H as o,g as r}from"./p-443111b3.js";import{i as s}from"./p-91741e79.js";import{c as a}from"./p-3ccdc4a3.js";import{m as n,r as l}from"./p-869d6d77.js";import{g as h,a as c}from"./p-2f777fdb.js";const d=":host(limel-action-bar){--action-bar-item-height:2rem;--limel-action-bar-item-text-color:var(\n --action-bar-item-text-color,\n rgb(var(--contrast-1100))\n );box-sizing:border-box;display:inline-flex;align-items:center;padding:0.125rem 0.25rem;max-width:100%;border-radius:var(--action-bar-border-radius);background-color:var(--action-bar-background-color, rgb(var(--contrast-100)))}:host(limel-action-bar),.items{gap:0.25rem}@media (pointer: coarse){:host(limel-action-bar),.items{gap:0.5rem}}.items{display:inline-flex;max-width:100%;min-width:0}:host(limel-action-bar.is-full-width){width:100%}:host(limel-action-bar.is-floating){--action-bar-border-radius:100vw;border:1px solid rgb(var(--contrast-400));padding-right:0.125rem;padding-left:0.125rem;max-width:calc(100% - 2rem);box-shadow:var(--shadow-depth-16), var(--shadow-depth-8)}";const m=class{constructor(o){t(this,o);this.itemSelected=i(this,"itemSelected",7);this.firstRender=true;this.actionBarItems=[];this.renderActionBarItem=(t,i)=>e("limel-action-bar-item",{item:t,onSelect:this.handleSelect,isVisible:this.isVisible(i),role:"gridcell"});this.renderOverflowMenu=t=>{if(!(this.actions.length-this.overflowCutoff)){return}return e("limel-action-bar-overflow-menu",{openDirection:this.openDirection,items:t,onSelect:this.handleSelect,role:"gridcell"})};this.handleSelect=t=>{t.stopPropagation();if(s(t.detail)){this.itemSelected.emit(t.detail)}};this.handleIntersection=t=>{const i=t.filter((t=>t.isIntersecting));const e=t.filter((t=>!t.isIntersecting));if(this.firstRender){this.overflowCutoff=i.length}else{this.overflowCutoff=this.overflowCutoff+i.length-e.length}this.firstRender=false};this.actions=[];this.accessibleLabel=undefined;this.layout=undefined;this.openDirection=undefined;this.overflowCutoff=this.actions.length}render(){let t=[];if(this.actions.length){t=this.actions.slice(this.overflowCutoff)}return e(o,{"aria-label":this.accessibleLabel,class:{"is-full-width":this.layout==="fullWidth","is-floating":this.layout==="floating"},role:"grid"},e("div",{class:"items",role:"rowgroup"},this.actions.map(this.renderActionBarItem)),this.renderOverflowMenu(t))}connectedCallback(){}componentDidRender(){var t;if(this.haveItemsChanged()){(t=this.intersectionObserver)===null||t===void 0?void 0:t.disconnect();this.createIntersectionObserver()}}disconnectedCallback(){var t;(t=this.intersectionObserver)===null||t===void 0?void 0:t.disconnect();this.intersectionObserver=undefined;this.actionBarItems=[];this.connectedCallback=()=>this.createIntersectionObserver()}isVisible(t){return t<this.overflowCutoff}createIntersectionObserver(){const t={root:this.host.shadowRoot.querySelector(".items"),rootMargin:"0px",threshold:1};this.overflowCutoff=this.actions.length;this.firstRender=true;this.actionBarItems=[];this.intersectionObserver=new IntersectionObserver(this.handleIntersection,t);this.host.shadowRoot.querySelectorAll("limel-action-bar-item").forEach((t=>{this.observe(t)}))}observe(t){this.intersectionObserver.observe(t);this.actionBarItems.push(t)}haveItemsChanged(){const t=this.actionBarItems.some((t=>!this.host.shadowRoot.contains(t)));const i=Array.from(this.host.shadowRoot.querySelectorAll("limel-action-bar-item")).some((t=>!this.actionBarItems.includes(t)));return t||i}get host(){return r(this)}};m.style=d;const b='@charset "UTF-8";limel-action-bar-item{transition:opacity 0.2s ease-in-out;position:relative;display:flex;align-items:center}limel-action-bar-item:not([is-visible]){opacity:0;pointer-events:none}button{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:0.25rem;width:100%;min-width:var(--action-bar-item-height);max-width:var(--action-bar-item-max-width, 10rem);height:var(--action-bar-item-height);color:var(--limel-action-bar-item-text-color);border-radius:var(--action-bar-item-height);font-size:0.875rem;padding:0 0.25rem}button:not([disabled]){transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color)}button:not([disabled]):hover{color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color);box-shadow:var(--button-shadow-hovered)}button:not([disabled]):active{background-color:var(--action-bar-background-color);box-shadow:var(--button-shadow-inset-pressed);transform:translate3d(0, 0.05rem, 0)}button:not([disabled]):focus{outline:none}button:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button:has(.text){padding:0 0.5rem}button[disabled]{opacity:0.4}button.is-selected{color:var(--mdc-theme-primary) !important}button.is-selected:not(:hover){box-shadow:var(--button-shadow-inset)}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0.25rem}limel-icon{flex-shrink:0;width:calc(var(--action-bar-item-height) - 0.75rem);height:calc(var(--action-bar-item-height) - 0.75rem);color:var(--action-bar-item-icon-color, var(--limel-action-bar-item-text-color))}div[role=separator]{width:1px;height:1.5rem;border-radius:var(--action-bar-item-height);background-color:var(--limel-action-bar-item-text-color);opacity:0.2}@media (pointer: fine){div[role=separator]{margin-right:0.5rem;margin-left:0.5rem}}limel-menu{--notification-badge-background-color:rgb(var(--contrast-600));--notification-badge-text-color:rgb(var(--contrast-1200))}limel-menu[open] button{box-shadow:var(--button-shadow-inset)}button[slot=trigger]{animation:fade-in ease-out 0.25s;font-size:0.75rem;font-weight:bold;transform:translate3d(0, 0, 0)}@keyframes fade-in{0%{scale:0.8;opacity:0}100%{scale:1;opacity:1}}';const u=class{constructor(e){t(this,e);this.select=i(this,"select",7);this.handleClick=t=>{t.stopPropagation();this.select.emit(this.item)};this.item=undefined;this.isVisible=true;this.selected=false;this.tooltipId=a()}componentWillLoad(){n(this.host)}componentDidLoad(){this.triggerIconColorWarning()}disconnectedCallback(){l(this.host)}render(){if(!this.isItem(this.item)&&this.item.separator){return e("div",{role:"separator"})}return e("button",{id:this.tooltipId,type:"button",onClick:this.handleClick,disabled:this.isDisabled(),class:{"is-selected":this.isItem(this.item)&&this.item.selected}},this.renderIcon(),this.renderLabel(),this.renderTooltip())}isItem(t){return!("separator"in t)}isDisabled(){if(this.isItem(this.item)&&this.item.disabled){return true}if(!this.isVisible){return true}}renderIcon(){if(this.isItem(this.item)&&!this.item.icon){return}if("icon"in this.item){const t=h(this.item.icon);const i=c(this.item.icon,this.item.iconColor);return e("limel-icon",{name:t,style:{"--action-bar-item-icon-color":`${i}`}})}}renderLabel(){if(!this.isItem(this.item)||this.item.iconOnly){return}return e("span",{class:"text"},this.item.text)}renderTooltip(){if(!this.isItem(this.item)){return}if(this.item.text){return e("limel-tooltip",{elementId:this.tooltipId,label:this.item.text,helperLabel:this.item.commandText})}if(this.item.commandText){return e("limel-tooltip",{elementId:this.tooltipId,label:this.item.commandText})}}triggerIconColorWarning(){if(this.isItem(this.item)&&this.item.iconColor){console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}}get host(){return r(this)}};u.style=b;const g=class{constructor(e){t(this,e);this.select=i(this,"select",7);this.countOverflowedItems=()=>`+${this.numberOfMenuItems}`;this.handleSelect=t=>{t.stopPropagation();this.select.emit(t.detail)};this.items=undefined;this.openDirection="bottom-end"}render(){return[e("limel-menu",{openDirection:this.openDirection,items:this.items,onSelect:this.handleSelect},e("button",{slot:"trigger"},this.countOverflowedItems()))]}get numberOfMenuItems(){return this.items.filter((t=>this.isMenuItem(t))).length}isMenuItem(t){return!("separator"in t)}};export{m as limel_action_bar,u as limel_action_bar_item,g as limel_action_bar_overflow_menu};
2
- //# sourceMappingURL=p-35a4a846.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["actionBarCss","ActionBar","this","firstRender","actionBarItems","renderActionBarItem","item","index","h","onSelect","handleSelect","isVisible","role","renderOverflowMenu","items","actions","length","overflowCutoff","openDirection","event","stopPropagation","isItem","detail","itemSelected","emit","handleIntersection","entries","intersectingItems","filter","entry","isIntersecting","notIntersectingItems","render","overflowActions","slice","Host","accessibleLabel","class","layout","map","connectedCallback","componentDidRender","haveItemsChanged","_a","intersectionObserver","disconnect","createIntersectionObserver","disconnectedCallback","undefined","options","root","host","shadowRoot","querySelector","rootMargin","threshold","IntersectionObserver","querySelectorAll","forEach","actionBarItem","observe","push","someItemRemoved","some","contains","someItemAdded","Array","from","includes","actionBarItemCss","ActionBarButton","constructor","hostRef","handleClick","select","tooltipId","createRandomString","componentWillLoad","makeEnterClickable","componentDidLoad","triggerIconColorWarning","removeEnterClickable","separator","id","type","onClick","disabled","isDisabled","selected","renderIcon","renderLabel","renderTooltip","icon","name","getIconName","color","getIconColor","iconColor","style","iconOnly","text","elementId","label","helperLabel","commandText","console","warn","ActionBarOverflowMenu","countOverflowedItems","numberOfMenuItems","slot","isMenuItem"],"sources":["./src/components/action-bar/action-bar.scss?tag=limel-action-bar&encapsulation=shadow","./src/components/action-bar/action-bar.tsx","./src/components/action-bar/action-bar-item/action-bar-item.scss?tag=limel-action-bar-item","./src/components/action-bar/action-bar-item/action-bar-item.tsx","./src/components/action-bar/action-bar-item/action-bar-overflow-menu.tsx"],"sourcesContent":["/**\n* @prop --action-bar-item-text-color: Text color of action bar items, defaults to `--contrast-1100`.\n* @prop --action-bar-item-icon-color: Color of the icons displayed on each action bar item. Defaults to the text color. To specify a color for an individual item, use the `iconColor` prop instead.\n* @prop --action-bar-item-max-width: Maximum width of a button in the action bar. Defaults to `10rem`. Keep in mind that the buttons should not appear too big.\n* @prop --action-bar-border-radius: Defines the roundness of the corners of the action bar. Defaults to `0`.\n* @prop --action-bar-background-color: Background color of the whole component. Defaults to `--contrast-100`.\n*/\n\n:host(limel-action-bar) {\n --action-bar-item-height: 2rem;\n\n --limel-action-bar-item-text-color: var(\n --action-bar-item-text-color,\n rgb(var(--contrast-1100))\n );\n\n box-sizing: border-box;\n\n display: inline-flex;\n align-items: center;\n padding: 0.125rem 0.25rem;\n max-width: 100%;\n border-radius: var(--action-bar-border-radius);\n\n background-color: var(\n --action-bar-background-color,\n rgb(var(--contrast-100))\n );\n}\n\n:host(limel-action-bar),\n.items {\n gap: 0.25rem;\n @media (pointer: coarse) {\n gap: 0.5rem;\n }\n}\n\n.items {\n display: inline-flex;\n max-width: 100%;\n min-width: 0;\n}\n\n:host(limel-action-bar.is-full-width) {\n width: 100%;\n}\n\n:host(limel-action-bar.is-floating) {\n --action-bar-border-radius: 100vw;\n border: 1px solid rgb(var(--contrast-400));\n\n padding-right: 0.125rem;\n padding-left: 0.125rem;\n\n max-width: calc(100% - 2rem);\n box-shadow: var(--shadow-depth-16), var(--shadow-depth-8);\n}\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n Element,\n} from '@stencil/core';\nimport { ListSeparator } from '../list/list-item.types';\nimport { MenuItem, OpenDirection } from '../menu/menu.types';\nimport { ActionBarItem } from './action-bar.types';\nimport { isItem } from './isItem';\n\n/**\n * An action bar is a user interface element commonly found in software applications and websites.\n * It typically appears at the top of the screen or within a specific section\n * and serves as a centralized hub for accessing various actions and commands\n * relevant to the current context or page.\n *\n * The action bar often contains a set of clickable icons or buttons (icons + labels)\n * that represent specific actions, such as saving, deleting, editing, sharing,\n * or bulk operations for selected items.\n *\n * The purpose of an action bar is to provide quick and convenient access to\n * frequently used functionalities, enabling users to perform common tasks efficiently.\n * It enhances usability by organizing important actions in a visually prominent and easily accessible location.\n *\n * The action bar's design and layout can vary based on the platform or application,\n * but its primary goal remains consistent—to\n * empower users to interact with the software and perform desired actions effortlessly.\n *\n * @exampleComponent limel-example-action-bar\n * @exampleComponent limel-example-action-bar-overflow-menu\n * @exampleComponent limel-example-action-bar-selected-item\n * @exampleComponent limel-example-action-bar-colors\n * @exampleComponent limel-example-action-bar-floating\n * @exampleComponent limel-example-action-bar-styling\n * @exampleComponent limel-example-action-bar-as-primary-component\n */\n@Component({\n tag: 'limel-action-bar',\n shadow: true,\n styleUrl: 'action-bar.scss',\n})\nexport class ActionBar {\n /**\n * Items that are placed in the action bar.\n * These represent primary actions.\n */\n @Prop()\n public actions: Array<ActionBarItem | ListSeparator> = [];\n\n /**\n * A label used to describe the purpose of the element to users\n * of assistive technologies, like screen readers.\n * Example value: \"toolbar\"\n */\n @Prop({ reflect: true })\n public accessibleLabel?: string;\n\n /**\n * - When set to `fullWidth`, the component will take the\n * entire width of its container.\n * - When set to `floating`, the component will get basic stylings\n * to visualize the floating state.\n * :::note\n * You should still properly position the component\n * according to the structure of your user interface.\n * For example, use an `absolute` or `fixed` position.\n * :::\n */\n @Prop({ reflect: true })\n public layout?: 'fullWidth' | 'floating';\n\n /**\n * Defines the location that the content of the overflow menu\n * appears, in relation to its trigger.\n */\n @Prop({ reflect: true })\n public openDirection: OpenDirection;\n\n /**\n * Fired when a action bar item has been clicked.\n * @public\n */\n @Event()\n public itemSelected: EventEmitter<ActionBarItem>;\n\n @Element()\n private host: HTMLElement;\n\n @State()\n private overflowCutoff: number = this.actions.length;\n\n private intersectionObserver: IntersectionObserver;\n private firstRender = true;\n private actionBarItems: HTMLLimelActionBarItemElement[] = [];\n\n public render() {\n let overflowActions: Array<MenuItem | ListSeparator> = [];\n if (this.actions.length) {\n overflowActions = this.actions.slice(this.overflowCutoff);\n }\n\n return (\n <Host\n aria-label={this.accessibleLabel}\n class={{\n 'is-full-width': this.layout === 'fullWidth',\n 'is-floating': this.layout === 'floating',\n }}\n role=\"grid\"\n >\n <div class=\"items\" role=\"rowgroup\">\n {this.actions.map(this.renderActionBarItem)}\n </div>\n {this.renderOverflowMenu(overflowActions)}\n </Host>\n );\n }\n\n public connectedCallback() {}\n\n public componentDidRender() {\n if (this.haveItemsChanged()) {\n this.intersectionObserver?.disconnect();\n this.createIntersectionObserver();\n }\n }\n\n public disconnectedCallback() {\n this.intersectionObserver?.disconnect();\n this.intersectionObserver = undefined;\n this.actionBarItems = [];\n this.connectedCallback = () => this.createIntersectionObserver();\n }\n\n private renderActionBarItem = (item: ActionBarItem, index: number) => {\n return (\n <limel-action-bar-item\n item={item}\n onSelect={this.handleSelect}\n isVisible={this.isVisible(index)}\n role=\"gridcell\"\n />\n );\n };\n\n private renderOverflowMenu = (items: Array<MenuItem | ListSeparator>) => {\n if (!(this.actions.length - this.overflowCutoff)) {\n return;\n }\n\n return (\n <limel-action-bar-overflow-menu\n openDirection={this.openDirection}\n items={items}\n onSelect={this.handleSelect}\n role=\"gridcell\"\n />\n );\n };\n\n private isVisible(index: number) {\n return index < this.overflowCutoff;\n }\n\n private handleSelect = (\n event: CustomEvent<ActionBarItem | ListSeparator>,\n ) => {\n event.stopPropagation();\n if (isItem(event.detail)) {\n this.itemSelected.emit(event.detail);\n }\n };\n\n private handleIntersection = (entries: IntersectionObserverEntry[]) => {\n const intersectingItems = entries.filter(\n (entry) => entry.isIntersecting,\n );\n\n const notIntersectingItems = entries.filter(\n (entry) => !entry.isIntersecting,\n );\n\n if (this.firstRender) {\n this.overflowCutoff = intersectingItems.length;\n } else {\n this.overflowCutoff =\n this.overflowCutoff +\n intersectingItems.length -\n notIntersectingItems.length;\n }\n\n this.firstRender = false;\n };\n\n private createIntersectionObserver() {\n const options = {\n root: this.host.shadowRoot.querySelector('.items'),\n rootMargin: '0px',\n threshold: 1.0,\n };\n\n this.overflowCutoff = this.actions.length;\n this.firstRender = true;\n\n this.actionBarItems = [];\n\n this.intersectionObserver = new IntersectionObserver(\n this.handleIntersection,\n options,\n );\n\n this.host.shadowRoot\n .querySelectorAll('limel-action-bar-item')\n .forEach((actionBarItem) => {\n this.observe(actionBarItem);\n });\n }\n\n private observe(actionBarItem: HTMLLimelActionBarItemElement) {\n this.intersectionObserver.observe(actionBarItem);\n this.actionBarItems.push(actionBarItem);\n }\n\n private haveItemsChanged() {\n const someItemRemoved = this.actionBarItems.some(\n (actionBarItem: HTMLLimelActionBarItemElement) =>\n !this.host.shadowRoot.contains(actionBarItem),\n );\n\n const someItemAdded = Array.from(\n this.host.shadowRoot.querySelectorAll('limel-action-bar-item'),\n ).some(\n (actionBarItem: HTMLLimelActionBarItemElement) =>\n !this.actionBarItems.includes(actionBarItem),\n );\n\n return someItemRemoved || someItemAdded;\n }\n}\n","@use '../../../style/mixins';\n@use '../../../style/functions';\n\nlimel-action-bar-item {\n transition: opacity 0.2s ease-in-out;\n position: relative;\n display: flex;\n align-items: center;\n\n &:not([is-visible]) {\n opacity: 0;\n pointer-events: none;\n }\n}\n\nbutton {\n all: unset;\n\n &:not([disabled]) {\n @include mixins.is-flat-inset-clickable(\n $color: var(--limel-action-bar-item-text-color),\n $color--hovered: var(--limel-action-bar-item-text-color),\n $background-color: var(--action-bar-background-color),\n $background-color--hovered: var(--action-bar-background-color),\n $background-color--inset: var(--action-bar-background-color)\n );\n @include mixins.visualize-keyboard-focus;\n }\n\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.25rem;\n\n width: 100%;\n min-width: var(--action-bar-item-height);\n max-width: var(--action-bar-item-max-width, 10rem);\n height: var(--action-bar-item-height);\n color: var(--limel-action-bar-item-text-color);\n\n border-radius: var(--action-bar-item-height);\n font-size: functions.pxToRem(14);\n padding: 0 0.25rem;\n\n &:has(.text) {\n padding: 0 0.5rem;\n }\n\n &[disabled] {\n opacity: 0.4;\n }\n\n &.is-selected {\n &:not(:hover) {\n box-shadow: var(--button-shadow-inset);\n }\n color: var(--mdc-theme-primary) !important;\n }\n}\n\n.text {\n @include mixins.truncate-text();\n padding: 0 0.25rem;\n}\n\nlimel-icon {\n flex-shrink: 0;\n width: calc(var(--action-bar-item-height) - 0.75rem);\n height: calc(var(--action-bar-item-height) - 0.75rem);\n color: var(\n --action-bar-item-icon-color,\n var(--limel-action-bar-item-text-color)\n );\n}\n\ndiv[role='separator'] {\n width: 1px;\n height: 1.5rem;\n border-radius: var(--action-bar-item-height);\n background-color: var(--limel-action-bar-item-text-color);\n opacity: 0.2;\n\n @media (pointer: fine) {\n margin-right: 0.5rem;\n margin-left: 0.5rem;\n }\n}\n\n// 👇 Overflow menu\n\nlimel-menu {\n --notification-badge-background-color: rgb(var(--contrast-600));\n --notification-badge-text-color: rgb(var(--contrast-1200));\n\n &[open] {\n button {\n box-shadow: var(--button-shadow-inset);\n }\n }\n}\n\nbutton[slot='trigger'] {\n animation: fade-in ease-out 0.25s;\n font-size: 0.75rem;\n font-weight: bold;\n transform: translate3d(0, 0, 0);\n}\n\n@keyframes fade-in {\n 0% {\n scale: 0.8;\n opacity: 0;\n }\n 100% {\n scale: 1;\n opacity: 1;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\nimport { ActionBarItem } from '../../action-bar/action-bar.types';\nimport { ListSeparator } from '../../list/list-item.types';\nimport { createRandomString } from '../../../util/random-string';\nimport {\n makeEnterClickable,\n removeEnterClickable,\n} from '../../../util/make-enter-clickable';\nimport { getIconColor, getIconName } from '../../icon/get-icon-props';\n\n/**\n * @private\n */\n@Component({\n tag: 'limel-action-bar-item',\n shadow: false,\n styleUrl: 'action-bar-item.scss',\n})\nexport class ActionBarButton {\n /**\n * Item that is placed in the action bar.\n */\n @Prop()\n public item!: ActionBarItem | ListSeparator;\n\n /**\n * Fired when a action bar item has been clicked.\n * @public\n */\n @Event()\n public select: EventEmitter<ActionBarItem | ListSeparator>;\n\n /**\n * When the item is displayed in the available width,\n * this will be `false`.\n */\n @Prop({ reflect: true })\n public isVisible: boolean = true;\n\n /**\n * When the item is selected, this will be `true`.\n */\n @Prop({ reflect: true })\n public selected: boolean = false;\n\n @Element()\n private host: HTMLLimelActionBarItemElement;\n\n /**\n * Used to attach the right tooltip to the right button\n */\n private tooltipId: string;\n\n constructor() {\n this.tooltipId = createRandomString();\n }\n\n public componentWillLoad() {\n makeEnterClickable(this.host);\n }\n\n public componentDidLoad() {\n this.triggerIconColorWarning();\n }\n\n public disconnectedCallback() {\n removeEnterClickable(this.host);\n }\n\n public render() {\n if (!this.isItem(this.item) && this.item.separator) {\n return <div role=\"separator\" />;\n }\n\n return (\n <button\n id={this.tooltipId}\n type=\"button\"\n onClick={this.handleClick}\n disabled={this.isDisabled()}\n class={{\n 'is-selected': this.isItem(this.item) && this.item.selected,\n }}\n >\n {this.renderIcon()}\n {this.renderLabel()}\n {this.renderTooltip()}\n </button>\n );\n }\n\n private handleClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.select.emit(this.item);\n };\n\n private isItem(item: ActionBarItem | ListSeparator): item is ActionBarItem {\n return !('separator' in item);\n }\n\n private isDisabled() {\n if (this.isItem(this.item) && this.item.disabled) {\n return true;\n }\n\n if (!this.isVisible) {\n return true;\n }\n }\n\n private renderIcon() {\n if (this.isItem(this.item) && !this.item.icon) {\n return;\n }\n\n if ('icon' in this.item) {\n const name = getIconName(this.item.icon);\n const color = getIconColor(this.item.icon, this.item.iconColor);\n\n return (\n <limel-icon\n name={name}\n style={{\n '--action-bar-item-icon-color': `${color}`,\n }}\n />\n );\n }\n }\n\n private renderLabel() {\n if (!this.isItem(this.item) || this.item.iconOnly) {\n return;\n }\n\n return <span class=\"text\">{this.item.text}</span>;\n }\n\n private renderTooltip() {\n if (!this.isItem(this.item)) {\n return;\n }\n\n if (this.item.text) {\n return (\n <limel-tooltip\n elementId={this.tooltipId}\n label={this.item.text}\n helperLabel={this.item.commandText}\n />\n );\n }\n\n if (this.item.commandText) {\n return (\n <limel-tooltip\n elementId={this.tooltipId}\n label={this.item.commandText}\n />\n );\n }\n }\n\n private triggerIconColorWarning() {\n if (this.isItem(this.item) && this.item.iconColor) {\n /* eslint-disable-next-line no-console */\n console.warn(\n \"The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.\",\n );\n }\n }\n}\n","import { Component, Prop, h, Event, EventEmitter } from '@stencil/core';\nimport { ActionBarItem } from '../../action-bar/action-bar.types';\nimport { ListSeparator } from '../../list/list-item.types';\nimport { MenuItem, OpenDirection } from '../../menu/menu.types';\nimport { LimelMenuCustomEvent } from '../../../components';\n\n/**\n * @private\n */\n@Component({\n tag: 'limel-action-bar-overflow-menu',\n shadow: false,\n})\nexport class ActionBarOverflowMenu {\n /**\n * List of the items that should be rendered in the overflow menu.\n */\n @Prop()\n public items: Array<MenuItem | ListSeparator>;\n\n /**\n * Defines the location that the content of the overflow menu\n * appears, in relation to its trigger.\n * It defaults to `bottom-end`, since in normal scenarios\n * (for example when the action bar is not floating at the bottom of the screen)\n * this menu is the right-most item in the user interface of the component.\n */\n @Prop({ reflect: true })\n public openDirection: OpenDirection = 'bottom-end';\n\n /**\n * Fired when an item in the action bar overflow menu has been clicked.\n * @public\n */\n @Event()\n public select: EventEmitter<ActionBarItem>;\n\n public render() {\n return [\n <limel-menu\n openDirection={this.openDirection}\n items={this.items}\n onSelect={this.handleSelect}\n >\n <button slot=\"trigger\">{this.countOverflowedItems()}</button>\n </limel-menu>,\n ];\n }\n\n private countOverflowedItems = () => {\n return `+${this.numberOfMenuItems}`;\n };\n\n private handleSelect = (event: LimelMenuCustomEvent<MenuItem>) => {\n event.stopPropagation();\n this.select.emit(event.detail);\n };\n\n private get numberOfMenuItems() {\n return this.items.filter((item) => this.isMenuItem(item)).length;\n }\n\n private isMenuItem(item: MenuItem | ListSeparator): item is MenuItem {\n return !('separator' in item);\n }\n}\n"],"mappings":"8NAAA,MAAMA,EAAe,o1B,MC8CRC,EAAS,M,oEAmDVC,KAAAC,YAAc,KACdD,KAAAE,eAAkD,GAyClDF,KAAAG,oBAAsB,CAACC,EAAqBC,IAE5CC,EAAA,yBACIF,KAAMA,EACNG,SAAUP,KAAKQ,aACfC,UAAWT,KAAKS,UAAUJ,GAC1BK,KAAK,aAKTV,KAAAW,mBAAsBC,IAC1B,KAAMZ,KAAKa,QAAQC,OAASd,KAAKe,gBAAiB,CAC9C,M,CAGJ,OACIT,EAAA,kCACIU,cAAehB,KAAKgB,cACpBJ,MAAOA,EACPL,SAAUP,KAAKQ,aACfE,KAAK,YACP,EAQFV,KAAAQ,aACJS,IAEAA,EAAMC,kBACN,GAAIC,EAAOF,EAAMG,QAAS,CACtBpB,KAAKqB,aAAaC,KAAKL,EAAMG,O,GAI7BpB,KAAAuB,mBAAsBC,IAC1B,MAAMC,EAAoBD,EAAQE,QAC7BC,GAAUA,EAAMC,iBAGrB,MAAMC,EAAuBL,EAAQE,QAChCC,IAAWA,EAAMC,iBAGtB,GAAI5B,KAAKC,YAAa,CAClBD,KAAKe,eAAiBU,EAAkBX,M,KACrC,CACHd,KAAKe,eACDf,KAAKe,eACLU,EAAkBX,OAClBe,EAAqBf,M,CAG7Bd,KAAKC,YAAc,KAAK,E,aAhJ2B,G,sGA0CtBD,KAAKa,QA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AAGH,M,EAO/CL,cACJ,IAAKxF,KAAKmB,OAAOnB,KAAKI,OAASJ,KAAKI,KAAK6F,SAAU,CAC/C,M,CAGJ,OAAO3F,EAAA,QAAM6B,MAAM,QAAQnC,KAAKI,KAAK8F,K,CAGjCT,gBACJ,IAAKzF,KAAKmB,OAAOnB,KAAKI,MAAO,CACzB,M,CAGJ,GAAIJ,KAAKI,KAAK8F,KAAM,CAChB,OACI5F,EAAA,iBACI6F,UAAWnG,KAAKyE,UAChB2B,MAAOpG,KAAKI,KAAK8F,KACjBG,YAAarG,KAAKI,KAAKkG,a,CAKnC,GAAItG,KAAKI,KAAKkG,YAAa,CACvB,OACIhG,EAAA,iBACI6F,UAAWnG,KAAKyE,UAChB2B,MAAOpG,KAAKI,KAAKkG,a,EAMzBxB,0BACJ,GAAI9E,KAAKmB,OAAOnB,KAAKI,OAASJ,KAAKI,KAAK2F,UAAW,CAE/CQ,QAAQC,KACJ,uK,8CCjKHC,EAAqB,M,wDAoCtBzG,KAAA0G,qBAAuB,IACpB,IAAI1G,KAAK2G,oBAGZ3G,KAAAQ,aAAgBS,IACpBA,EAAMC,kBACNlB,KAAKwE,OAAOlD,KAAKL,EAAMG,OAAO,E,wCA3BI,Y,CAS/BU,SACH,MAAO,CACHxB,EAAA,cACIU,cAAehB,KAAKgB,cACpBJ,MAAOZ,KAAKY,MACZL,SAAUP,KAAKQ,cAEfF,EAAA,UAAQsG,KAAK,WAAW5G,KAAK0G,yB,CAc7BC,wBACR,OAAO3G,KAAKY,MAAMc,QAAQtB,GAASJ,KAAK6G,WAAWzG,KAAOU,M,CAGtD+F,WAAWzG,GACf,QAAS,cAAeA,E"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as s,g as e}from"./p-443111b3.js";import{d as n,i as h}from"./p-714d6937.js";import{T as r,E as o,a as l,b as a,c,d,A as u,e as f,f as p,g as m}from"./p-e03dfe70.js";import{c as y}from"./p-3ccdc4a3.js";import{g,c as b}from"./p-2f777fdb.js";import"./p-c93050d6.js";import"./p-365098fe.js";import"./p-d529bb7d.js";import"./p-858c6b82.js";const v=":host{position:relative;display:block}:host([hidden]){display:none}";const w=300;const j="limel-chip-set";const C=class{constructor(s){t(this,s);this.change=i(this,"change",7);this.interact=i(this,"interact",7);this.action=i(this,"action",7);this.chipSetEditMode=false;this.getValueId=t=>{const i=t.value;if(!!i&&typeof i==="object"){return i.id}return i};this.createChips=t=>{if(!t){return[]}if(this.multiple){const i=t;return i.map(this.createChip)}const i=t;return[this.createChip(i)]};this.createChip=t=>{const i=g(t.icon);const s=b(t.icon,t.iconColor);const e=this.getValueId(t);return{id:`${e}`,text:t.text,removable:true,icon:i?{name:i,color:s}:undefined,value:t,menuItems:t.actions}};this.search=async t=>{const i=setTimeout((()=>{this.loading=true}));const s=await this.searcher(this.textValue);clearTimeout(i);this.handleSearchResult(t,s)};this.disabled=false;this.readonly=false;this.label=undefined;this.searchLabel=undefined;this.helperText=undefined;this.leadingIcon=undefined;this.emptyResultMessage=undefined;this.required=false;this.invalid=false;this.value=undefined;this.searcher=undefined;this.multiple=false;this.delimiter=null;this.actions=[];this.actionPosition="bottom";this.actionScrollBehavior="sticky";this.badgeIcons=false;this.items=undefined;this.textValue="";this.loading=false;this.chips=[];this.handleTextInput=this.handleTextInput.bind(this);this.handleInputKeyDown=this.handleInputKeyDown.bind(this);this.handleDropdownKeyDown=this.handleDropdownKeyDown.bind(this);this.handleInputFieldFocus=this.handleInputFieldFocus.bind(this);this.handleChange=this.handleChange.bind(this);this.handleInteract=this.handleInteract.bind(this);this.handleListChange=this.handleListChange.bind(this);this.handleActionListChange=this.handleActionListChange.bind(this);this.handleStopEditAndBlur=this.handleStopEditAndBlur.bind(this);this.handleCloseMenu=this.handleCloseMenu.bind(this);this.onListKeyDown=this.onListKeyDown.bind(this);this.portalId=y();this.debouncedSearch=n(this.search,w)}componentWillLoad(){this.chips=this.createChips(this.value)}componentDidLoad(){this.chipSet=this.host.shadowRoot.querySelector(j)}async componentWillUpdate(){this.chipSetEditMode=false;if(this.chipSet){this.chipSetEditMode=await this.chipSet.getEditMode()}}render(){const t={};if(!this.multiple){t.maxItems=1}return[s("limel-chip-set",Object.assign({type:"input",inputType:"search",label:this.label,helperText:this.helperText,leadingIcon:this.leadingIcon,value:this.chips,disabled:this.disabled,invalid:this.invalid,delimiter:this.renderDelimiter(),readonly:this.readonly,required:this.required,searchLabel:this.searchLabel,onInput:this.handleTextInput,onKeyDown:this.handleInputKeyDown,onChange:this.handleChange,onInteract:this.handleInteract,onStartEdit:this.handleInputFieldFocus,onStopEdit:this.handleStopEditAndBlur,emptyInputOnBlur:false,clearAllButton:this.multiple&&!this.chipSetEditMode},t)),this.renderDropdown()]}onChangeValue(){this.chips=this.createChips(this.value)}renderDelimiter(){if(this.multiple){return this.delimiter}return null}renderDropdown(){const t=this.getDropdownContent();const i=[];if(this.shouldShowDropDownContent()){const s=this.getActionContent();if(this.actionPosition==="top"){i.push(s)}if(t){i.push(t)}if(this.actionPosition==="bottom"){i.push(s)}}return this.renderPortal(i)}getActionContent(){var t,i;const e=(i=(t=this.actions)===null||t===void 0?void 0:t.length)!==null&&i!==void 0?i:0;if(e===0){return null}return[s("limel-list",{class:{"static-actions-list":true,"is-on-top":this.actionPosition==="top","is-at-bottom":this.actionPosition==="bottom","has-position-sticky":this.actionScrollBehavior==="sticky"},badgeIcons:true,type:"selectable",onChange:this.handleActionListChange,items:this.actions.map(this.removeUnusedPropertiesOnAction)})]}removeUnusedPropertiesOnAction(t){return Object.assign(Object.assign({},t),{actions:[]})}shouldShowDropDownContent(){if(this.isFull()){return false}return!!this.chipSetEditMode}getDropdownContent(){if(!this.shouldShowDropDownContent()){return}if(this.loading){return this.renderSpinner()}if(!this.items||!this.items.length){return this.renderEmptyMessage()}return this.renderListResult()}isFull(){return!this.multiple&&!!this.value}renderSpinner(){return s("div",{style:{width:"100%",display:"flex","align-items":"center","justify-content":"center",padding:"1rem 0"}},s("limel-spinner",{limeBranded:false}))}renderEmptyMessage(){if(!this.emptyResultMessage){return}const t={color:"rgb(var(--contrast-1100))","text-align":"center",margin:"0.5rem 1rem"};return s("p",{style:t},this.emptyResultMessage)}renderListResult(){return s("limel-list",{badgeIcons:this.badgeIcons,onChange:this.handleListChange,onKeyDown:this.onListKeyDown,type:"selectable",items:this.items})}onListKeyDown(t){const i=[r,o,l].includes(t.key);const s=[a,c,d].includes(t.keyCode);if(i||s){this.chipSet.setFocus()}}renderPortal(t=[]){const i=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index");return s("limel-portal",{visible:t.length>0,containerId:this.portalId,inheritParentWidth:true,containerStyle:{"z-index":i}},s("limel-menu-surface",{open:t.length>0,allowClicksElement:this.host,style:{"--mdc-menu-min-width":"100%","max-height":"inherit",display:"flex"},onDismiss:this.handleCloseMenu},t))}handleStopEditAndBlur(){const t=this.host.shadowRoot.activeElement||document.activeElement;const i=document.querySelector(`#${this.portalId}`);if(h(t,this.host)||h(t,i)){return}this.clearInputField()}async handleTextInput(t){t.stopPropagation();const i=t.detail;this.textValue=i;this.debouncedSearch(i);if(i===""){this.debouncedSearch.flush()}}handleListChange(t){var i;t.stopPropagation();if(!this.value||this.value!==t.detail){let i=t.detail;if(this.multiple){i=[...this.value,t.detail]}this.change.emit(i);this.items=[]}if(this.multiple){(i=this.chipSet)===null||i===void 0?void 0:i.setFocus(true)}}handleActionListChange(t){t.stopPropagation();if(!t.detail){return}this.action.emit(t.detail.value);this.items=[]}handleInputFieldFocus(){const t=this.textValue;this.debouncedSearch(t)}handleChange(t){t.stopPropagation();let i=null;if(this.multiple){const s=t.detail;i=s.map((t=>this.value.find((i=>{const s=this.getValueId(i);return`${s}`===t.id}))))}this.change.emit(i)}handleInteract(t){t.stopPropagation();this.interact.emit(t.detail?t.detail.value:t.detail)}handleInputKeyDown(t){const i=(t.key===r||t.keyCode===a)&&!t.altKey&&!t.metaKey&&!t.shiftKey;const s=t.key===u||t.keyCode===f;const e=t.key===p||t.keyCode===m;if(!i&&!s&&!e){return}const n=document.querySelector(` #${this.portalId} limel-list`);if(!n){return}t.preventDefault();if(i||e){const t=n.shadowRoot.querySelector(".mdc-deprecated-list-item:first-child");t.focus();return}if(s){const t=n.shadowRoot.querySelector(".mdc-deprecated-list-item:last-child");t.focus()}}handleDropdownKeyDown(t){const i=t.key===o||t.keyCode===c;if(i){t.preventDefault();this.textValue="";this.chipSet.setFocus(true)}}handleSearchResult(t,i){if(t===this.textValue){this.items=i;if(this.multiple){const t=this.value;this.items=i.filter((i=>!t.includes(i)))}this.loading=false}}handleCloseMenu(){if(this.items.length>0){return}this.clearInputField()}clearInputField(){this.chipSet.emptyInput();this.textValue="";this.handleSearchResult("",[]);this.debouncedSearch.cancel()}get host(){return e(this)}static get watchers(){return{value:["onChangeValue"]}}};C.style=v;export{C as limel_picker};
2
- //# sourceMappingURL=p-3f4d2f62.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getHref","value","href","String","trim","isValid","prependProtocol","getTarget","url","isRelativeLink","input","hasKnownProtocol","hasRelativeProtocol","knownProtocols","some","knownProtocol","indexOf","startsWith"],"sources":["./src/util/link-helper.ts"],"sourcesContent":["export function getHref(value: string) {\n const href = value ? String(value.trim()) : '';\n if (isValid(href)) {\n return href;\n }\n\n return prependProtocol(href);\n}\n\nexport function getTarget(value: string) {\n const url = getHref(value);\n if (isRelativeLink(url)) {\n return '_self';\n }\n\n return '_blank';\n}\n\nexport function prependProtocol(input: string) {\n if (!input) {\n return input;\n }\n\n return 'https://' + input;\n}\n\nfunction isValid(href: string) {\n return (\n hasKnownProtocol(href) ||\n isRelativeLink(href) ||\n hasRelativeProtocol(href)\n );\n}\n\nfunction hasKnownProtocol(input: string) {\n const knownProtocols = [\n 'ftp',\n 'ftps',\n 'https',\n 'http',\n\n // `file` may or may not work, due to cross-origin restrictions and browser settings.\n 'file',\n\n // m-files is a protocol used by the M-Files desktop app or something.\n // It's not a web protocol, but it allows open M-Files links in their app.\n 'm-files',\n ];\n\n return knownProtocols.some((knownProtocol) => {\n return input.indexOf(knownProtocol + '://') === 0;\n });\n}\n\nfunction isRelativeLink(input: string) {\n if (hasRelativeProtocol(input)) {\n return false;\n }\n\n return input.startsWith('/') || input.startsWith('#');\n}\n\nfunction hasRelativeProtocol(input: string) {\n return input.startsWith('//');\n}\n"],"mappings":"SAAgBA,EAAQC,GACpB,MAAMC,EAAOD,EAAQE,OAAOF,EAAMG,QAAU,GAC5C,GAAIC,EAAQH,GAAO,CACf,OAAOA,C,CAGX,OAAOI,EAAgBJ,EAC3B,C,SAEgBK,EAAUN,GACtB,MAAMO,EAAMR,EAAQC,GACpB,GAAIQ,EAAeD,GAAM,CACrB,MAAO,O,CAGX,MAAO,QACX,C,SAEgBF,EAAgBI,GAC5B,IAAKA,EAAO,CACR,OAAOA,C,CAGX,MAAO,WAAaA,CACxB,CAEA,SAASL,EAAQH,GACb,OACIS,EAAiBT,IACjBO,EAAeP,IACfU,EAAoBV,EAE5B,CAEA,SAASS,EAAiBD,GACtB,MAAMG,EAAiB,CACnB,MACA,OACA,QACA,OAGA,OAIA,WAGJ,OAAOA,EAAeC,MAAMC,GACjBL,EAAMM,QAAQD,EAAgB,SAAW,GAExD,CAEA,SAASN,EAAeC,GACpB,GAAIE,EAAoBF,GAAQ,CAC5B,OAAO,K,CAGX,OAAOA,EAAMO,WAAW,MAAQP,EAAMO,WAAW,IACrD,CAEA,SAASL,EAAoBF,GACzB,OAAOA,EAAMO,WAAW,KAC5B,Q"}
@@ -1,2 +0,0 @@
1
- import{r as t,h as i,g as e}from"./p-443111b3.js";import{g as r}from"./p-2c35fb9d.js";class s{constructor(t){this.promises={};this.cache=t}async get(t,i=""){const e=await this.cache;const r=this.getUrl(t,i);let s=await e.match(r);if(!s){s=await this.fetchData(r,e)}return this.getIcon(s)}async fetchData(t,i){let e=this.promises[t];if(e===undefined){e=i.add(t);this.promises[t]=e}await e;return i.match(t)}async getIcon(t){let i=await t.text();i=i.replace(/#000000/g,"currentColor");if(!this.validSvg(i)){throw new Error("Invalid SVG")}return i}validSvg(t){const i=new DOMParser;const e=i.parseFromString(t,"image/svg+xml");return e.documentElement.tagName.toLowerCase()==="svg"}getUrl(t,i){let e=i||"";if(i&&!i.endsWith("/")){e=`${i}/`}return`${e}assets/icons/${t}.svg`}}class n{constructor(){this.cache={};this.resolveFunctions={}}async get(t,i=""){if(!this.cache[t]){this.cache[t]=await this.getIcon(t,i)}return this.cache[t]}getIcon(t,i){return new Promise((e=>{if(!this.resolveFunctions[t]){this.resolveFunctions[t]=[];this.fetchData(t,i)}this.resolveFunctions[t].push(e)}))}async fetchData(t,i){let e=i||"";if(i&&!i.endsWith("/")){e=`${i}/`}const r=await fetch(`${e}assets/icons/${t}.svg`);let s=await r.text();s=s.replace(/#000000/g,"currentColor");if(!this.validSvg(s)){throw new Error("Invalid SVG")}this.resolvePromises(t,s)}validSvg(t){const i=new DOMParser;const e=i.parseFromString(t,"image/svg+xml");return e.documentElement.tagName.toLowerCase()==="svg"}resolvePromises(t,i){const e=this.resolveFunctions[t];e.forEach((t=>{t(i)}));this.resolveFunctions[t]=null}}const o="@limetech/lime-elements/icons";function a(){try{const t=caches.open(o);return new s(t)}catch(t){return new n}}const h=(()=>a())();const m=":host{background-color:var(--icon-background-color, transparent);border-radius:50%;display:inline-block;line-height:0;box-sizing:border-box}:host svg{fill:currentColor;height:100%;pointer-events:none;width:100%}:host div{margin:var(--limel-icon-svg-margin, 0)}:host([hidden]){display:none}:host([size=x-small]){height:0.9375rem !important;width:0.9375rem !important}:host([size=small]){height:1.25rem !important;width:1.25rem !important}:host([size=medium]){height:1.5625rem !important;width:1.5625rem !important}:host([size=large]){height:1.875rem !important;width:1.875rem !important}:host([badge][size=x-small]){height:1.4375rem !important;width:1.4375rem !important;--limel-icon-svg-margin:0.25rem}:host([badge][size=small]){height:1.875rem !important;width:1.875rem !important;--limel-icon-svg-margin:0.3125rem}:host([badge][size=medium]){height:2.5rem !important;width:2.5rem !important;--limel-icon-svg-margin:0.5rem}:host([badge][size=large]){height:2.875rem !important;width:2.875rem !important;--limel-icon-svg-margin:0.5rem}";const c=class{constructor(i){t(this,i);this.size=undefined;this.name=undefined;this.badge=undefined}componentDidLoad(){this.loadIcon(this.name)}render(){return i("div",{class:"container"})}async loadIcon(t){if(t===undefined||t===""){return}const i=await this.loadSvg(t);this.renderSvg(i)}loadSvg(t){return h.get(t,r.iconPath)}renderSvg(t){const i=this.host.shadowRoot.querySelector("div.container");if(i){i.innerHTML=t}}get host(){return e(this)}static get watchers(){return{name:["loadIcon"]}}};c.style=m;export{c as limel_icon};
2
- //# sourceMappingURL=p-5c9fbe6f.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CacheStorageIconCache","constructor","cache","this","promises","async","name","path","url","getUrl","response","match","fetchData","getIcon","requestPromise","undefined","add","svgData","text","replace","validSvg","Error","data","parser","DOMParser","svgDoc","parseFromString","documentElement","tagName","toLowerCase","iconPath","endsWith","InMemoryIconCache","resolveFunctions","Promise","resolve","push","fetch","resolvePromises","resolves","forEach","CACHE_NAME","createIconCache","caches","open","_a","iconCache","iconCss","Icon","componentDidLoad","loadIcon","render","h","class","loadSvg","renderSvg","get","globalConfig","container","host","shadowRoot","querySelector","innerHTML"],"sources":["./src/global/icon-cache/cache-storage-icon-cache.ts","./src/global/icon-cache/in-memory-icon-cache.ts","./src/global/icon-cache/factory.ts","./src/components/icon/icon.scss?tag=limel-icon&encapsulation=shadow","./src/components/icon/icon.tsx"],"sourcesContent":["export class CacheStorageIconCache {\n /*\n * Cache of all loaded SVGs\n */\n private cache: Promise<Cache>;\n\n private promises: Record<string, Promise<void>> = {};\n\n constructor(cache: Promise<Cache>) {\n this.cache = cache;\n }\n\n /**\n * Get icon data from the cache\n *\n * @param name - Name of the icon\n * @param path - Path on the server where the assets are located\n * @returns SVG markup\n */\n public async get(name: string, path = ''): Promise<string> {\n const cache = await this.cache;\n const url = this.getUrl(name, path);\n\n let response = await cache.match(url);\n if (!response) {\n response = await this.fetchData(url, cache);\n }\n\n return this.getIcon(response);\n }\n\n private async fetchData(url: string, cache: Cache): Promise<Response> {\n let requestPromise = this.promises[url];\n if (requestPromise === undefined) {\n requestPromise = cache.add(url);\n this.promises[url] = requestPromise;\n }\n\n await requestPromise;\n\n return cache.match(url);\n }\n\n /*\n * Get icon data from a response\n */\n private async getIcon(response: Response): Promise<string> {\n let svgData = await response.text();\n\n // Some of the icons in the Icons8 library have hard coded black color on some of the paths.\n // In order to apply coloring with CSS, these have to be set to 'currentColor'\n svgData = svgData.replace(/#000000/g, 'currentColor');\n\n if (!this.validSvg(svgData)) {\n throw new Error('Invalid SVG');\n }\n\n return svgData;\n }\n\n /*\n * Check if the given data is a valid SVG document\n */\n private validSvg(data) {\n const parser = new DOMParser();\n const svgDoc = parser.parseFromString(data, 'image/svg+xml');\n\n return svgDoc.documentElement.tagName.toLowerCase() === 'svg';\n }\n\n private getUrl(name: string, path: string): string {\n let iconPath = path || '';\n if (path && !path.endsWith('/')) {\n iconPath = `${path}/`;\n }\n\n return `${iconPath}assets/icons/${name}.svg`;\n }\n}\n","export class InMemoryIconCache {\n /*\n * Cache of all loaded SVGs\n */\n private cache = {};\n\n /*\n * Contains resolve functions for all unresolved promises that are waiting for SVG data.\n */\n private resolveFunctions = {};\n\n /**\n * Get icon data from the cache\n *\n * @param name - Name of the icon\n * @param path - Path on the server where the assets are located\n * @returns SVG markup\n */\n public async get(name: string, path = ''): Promise<string> {\n if (!this.cache[name]) {\n this.cache[name] = await this.getIcon(name, path);\n }\n\n return this.cache[name];\n }\n\n /*\n * Creates and returns a promise that will be resolved when SVG data is available\n */\n private getIcon(name, path) {\n return new Promise((resolve) => {\n if (!this.resolveFunctions[name]) {\n this.resolveFunctions[name] = [];\n this.fetchData(name, path);\n }\n\n this.resolveFunctions[name].push(resolve);\n });\n }\n\n /*\n * Fetch SVG data from the server\n */\n private async fetchData(name, path) {\n let iconPath = path || '';\n if (path && !path.endsWith('/')) {\n iconPath = `${path}/`;\n }\n\n const response = await fetch(`${iconPath}assets/icons/${name}.svg`);\n\n let svgData = await response.text();\n\n // Some of the icons in the Icons8 library have hard coded black color on some of the paths.\n // In order to apply coloring with CSS, these have to be set to 'currentColor'\n svgData = svgData.replace(/#000000/g, 'currentColor');\n if (!this.validSvg(svgData)) {\n throw new Error('Invalid SVG');\n }\n\n this.resolvePromises(name, svgData);\n }\n\n /*\n * Check if the given data is a valid SVG document\n */\n private validSvg(data) {\n const parser = new DOMParser();\n const svgDoc = parser.parseFromString(data, 'image/svg+xml');\n\n return svgDoc.documentElement.tagName.toLowerCase() === 'svg';\n }\n\n /*\n * Resolve all promises waiting for data for a specific icon\n */\n private resolvePromises(name, svgData) {\n const resolves = this.resolveFunctions[name];\n resolves.forEach((resolve) => {\n resolve(svgData);\n });\n this.resolveFunctions[name] = null;\n }\n}\n","import { CacheStorageIconCache } from './cache-storage-icon-cache';\nimport { InMemoryIconCache } from './in-memory-icon-cache';\n\nconst CACHE_NAME = '@limetech/lime-elements/icons';\n\nfunction createIconCache() {\n try {\n const cache = caches.open(CACHE_NAME);\n\n return new CacheStorageIconCache(cache);\n } catch {\n return new InMemoryIconCache();\n }\n}\n\nexport default (() => {\n return createIconCache();\n})();\n","@use '../../style/functions';\n\n/**\n * @prop --icon-background-color: Background color when attribute `badge` is set to `true`. Defaults to `transparent`.\n */\n\n:host {\n background-color: var(--icon-background-color, transparent);\n border-radius: 50%;\n display: inline-block;\n line-height: 0;\n box-sizing: border-box;\n\n svg {\n fill: currentColor;\n height: 100%;\n pointer-events: none;\n width: 100%;\n }\n\n div {\n margin: var(--limel-icon-svg-margin, 0);\n }\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host([size='x-small']) {\n height: functions.pxToRem(15) !important;\n width: functions.pxToRem(15) !important;\n}\n:host([size='small']) {\n height: functions.pxToRem(20) !important;\n width: functions.pxToRem(20) !important;\n}\n:host([size='medium']) {\n height: functions.pxToRem(25) !important;\n width: functions.pxToRem(25) !important;\n}\n:host([size='large']) {\n height: functions.pxToRem(30) !important;\n width: functions.pxToRem(30) !important;\n}\n\n:host([badge][size='x-small']) {\n height: functions.pxToRem(23) !important;\n width: functions.pxToRem(23) !important;\n\n --limel-icon-svg-margin: #{functions.pxToRem(4)};\n}\n:host([badge][size='small']) {\n height: functions.pxToRem(30) !important;\n width: functions.pxToRem(30) !important;\n\n --limel-icon-svg-margin: #{functions.pxToRem(5)};\n}\n:host([badge][size='medium']) {\n height: functions.pxToRem(40) !important;\n width: functions.pxToRem(40) !important;\n\n --limel-icon-svg-margin: #{functions.pxToRem(8)};\n}\n:host([badge][size='large']) {\n height: functions.pxToRem(46) !important;\n width: functions.pxToRem(46) !important;\n\n --limel-icon-svg-margin: #{functions.pxToRem(8)};\n}\n","import { Component, Element, h, Prop, Watch } from '@stencil/core';\nimport { globalConfig } from '../../global/config';\nimport iconCache from '../../global/icon-cache/factory';\nimport { IconSize } from './icon.types';\n\n/**\n * Search for an icon and **click on it to copy its name to clipboard**.\n * <limel-example-icon-finder />\n *\n * *******\n *\n * :::important\n * To install your icon set correctly, please read the [documentation here](#/).\n * :::\n *\n * The size and color of the icon is normally set in CSS, however there are a few\n * standard sizes defined that can be used with the `size` property.\n *\n * :::note\n * There are icons included in the `@lundalogik/lime-icons8` package which are\n * designed by our designers at Lime.\n * The names of these icons start with `-lime-`, which makes them easy to\n * find using the Icon Finder tool below.\n *\n * Some of the multi-colored `-lime-` icons use our own CSS variables\n * (instead of HEX or RGB) values to visualize their colors. Thus, you must import\n * our color palette css files into your project to render the icons properly.\n * Read more about our [Color System](#/DesignGuidelines/color-system.md/)\n * and how to do this.\n * :::\n *\n * @exampleComponent limel-example-icon-name\n * @exampleComponent limel-example-icon-size\n * @exampleComponent limel-example-icon-color\n */\n@Component({\n tag: 'limel-icon',\n shadow: true,\n styleUrl: 'icon.scss',\n})\nexport class Icon {\n /**\n * Size of the icon\n */\n @Prop({ reflect: true })\n public size: IconSize;\n\n /**\n * Name of the icon\n */\n @Prop({ reflect: true })\n public name: string;\n\n /**\n * Set to `true` to give the icon a round background with some padding.\n * Only works when the `size` attribute is also set.\n */\n @Prop({ reflect: true })\n public badge: boolean;\n\n @Element()\n private host: HTMLLimelIconElement;\n\n public componentDidLoad() {\n this.loadIcon(this.name);\n }\n\n public render() {\n return <div class=\"container\" />;\n }\n\n @Watch('name')\n protected async loadIcon(name: string) {\n if (name === undefined || name === '') {\n return;\n }\n\n const svgData = await this.loadSvg(name);\n this.renderSvg(svgData);\n }\n\n /**\n * Load the SVG data for the icon from the icon cache\n *\n * @param name - name of the icon\n * @returns the icon SVG data\n */\n private loadSvg(name: string) {\n return iconCache.get(name, globalConfig.iconPath);\n }\n\n /*\n * There is no way to style external SVG files with CSS, i.e. SVGs loaded\n * with <img src=\"file.svg\" /> or <object data=\"file.svg\" type=\"image/svg+xml\" />\n * will remain the way they look in the file.\n * Therefore we inject the svg as inline markup instead.\n */\n private renderSvg(svgData: string) {\n const container = this.host.shadowRoot.querySelector('div.container');\n if (container) {\n container.innerHTML = svgData;\n }\n }\n}\n"],"mappings":"4FAAaA,EAQTC,YAAYC,GAFJC,KAAAC,SAA0C,GAG9CD,KAAKD,MAAQA,C,CAUVG,UAAUC,EAAcC,EAAO,IAClC,MAAML,QAAcC,KAAKD,MACzB,MAAMM,EAAML,KAAKM,OAAOH,EAAMC,GAE9B,IAAIG,QAAiBR,EAAMS,MAAMH,GACjC,IAAKE,EAAU,CACXA,QAAiBP,KAAKS,UAAUJ,EAAKN,E,CAGzC,OAAOC,KAAKU,QAAQH,E,CAGhBL,gBAAgBG,EAAaN,GACjC,IAAIY,EAAiBX,KAAKC,SAASI,GACnC,GAAIM,IAAmBC,UAAW,CAC9BD,EAAiBZ,EAAMc,IAAIR,GAC3BL,KAAKC,SAASI,GAAOM,C,OAGnBA,EAEN,OAAOZ,EAAMS,MAAMH,E,CAMfH,cAAcK,GAClB,IAAIO,QAAgBP,EAASQ,OAI7BD,EAAUA,EAAQE,QAAQ,WAAY,gBAEtC,IAAKhB,KAAKiB,SAASH,GAAU,CACzB,MAA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BhC,EAAMW,GAC1B,MAAMsB,EAAWpC,KAAK8B,iBAAiB3B,GACvCiC,EAASC,SAASL,IACdA,EAAQlB,EAAQ,IAEpBd,KAAK8B,iBAAiB3B,GAAQ,I,EC9EtC,MAAMmC,EAAa,gCAEnB,SAASC,IACL,IACI,MAAMxC,EAAQyC,OAAOC,KAAKH,GAE1B,OAAO,IAAIzC,EAAsBE,E,CACnC,MAAA2C,GACE,OAAO,IAAIb,C,CAEnB,CAEA,MAAAc,EAAe,KACJJ,IADI,GCff,MAAMK,EAAU,8gC,MCwCHC,EAAI,M,sFAuBNC,mBACH9C,KAAK+C,SAAS/C,KAAKG,K,CAGhB6C,SACH,OAAOC,EAAA,OAAKC,MAAM,a,CAIZhD,eAAeC,GACrB,GAAIA,IAASS,WAAaT,IAAS,GAAI,CACnC,M,CAGJ,MAAMW,QAAgBd,KAAKmD,QAAQhD,GACnCH,KAAKoD,UAAUtC,E,CASXqC,QAAQhD,GACZ,OAAOwC,EAAUU,IAAIlD,EAAMmD,EAAa3B,S,CASpCyB,UAAUtC,GACd,MAAMyC,EAAYvD,KAAKwD,KAAKC,WAAWC,cAAc,iBACrD,GAAIH,EAAW,CACXA,EAAUI,UAAY7C,C"}
@@ -1,2 +0,0 @@
1
- import{r as n,i as e}from"./p-c93050d6.js";import{t}from"./p-365098fe.js";var r=function(){return n.Date.now()};var i="Expected a function";var u=Math.max,f=Math.min;function o(n,o,a){var d,c,s,m,l,v,p=0,T=false,h=false,w=true;if(typeof n!="function"){throw new TypeError(i)}o=t(o)||0;if(e(a)){T=!!a.leading;h="maxWait"in a;s=h?u(t(a.maxWait)||0,o):s;w="trailing"in a?!!a.trailing:w}function x(e){var t=d,r=c;d=c=undefined;p=e;m=n.apply(r,t);return m}function g(n){p=n;l=setTimeout(E,o);return T?x(n):m}function j(n){var e=n-v,t=n-p,r=o-e;return h?f(r,s-t):r}function y(n){var e=n-v,t=n-p;return v===undefined||e>=o||e<0||h&&t>=s}function E(){var n=r();if(y(n)){return M(n)}l=setTimeout(E,j(n))}function M(n){l=undefined;if(w&&d){return x(n)}d=c=undefined;return m}function W(){if(l!==undefined){clearTimeout(l)}p=0;d=v=c=l=undefined}function b(){return l===undefined?m:M(r())}function k(){var n=r(),e=y(n);d=arguments;c=this;v=n;if(e){if(l===undefined){return g(v)}if(h){clearTimeout(l);l=setTimeout(E,o);return x(v)}}if(l===undefined){l=setTimeout(E,o)}return m}k.cancel=W;k.flush=b;return k}function a(n,e){if(!e){return false}if(e.contains(n)){return true}let t=n;let r=0;const i=1e3;while(r<i&&t&&t.getRootNode().nodeName==="#document-fragment"){t=t.getRootNode().host;if(e.contains(t)){return true}r+=1}return e.contains(t)}export{o as d,a as i};
2
- //# sourceMappingURL=p-714d6937.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["now","root","Date","FUNC_ERROR_TEXT","nativeMax","Math","max","nativeMin","min","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","toNumber","isObject","invokeFunc","time","args","thisArg","undefined","apply","leadingEdge","setTimeout","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","clearTimeout","flush","debounced","isInvoking","arguments","this","isDescendant","element","parent","contains","currentNode","i","DEPTH","getRootNode","nodeName","host"],"sources":["./node_modules/lodash-es/now.js","./node_modules/lodash-es/debounce.js","./src/util/dom.ts"],"sourcesContent":["import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","/**\n * Check if an element is a descendant of another, even if it is located within a shadow root\n *\n * @param element - The element to check\n * @param parent - The parent element\n * @returns True if the element is a descendant of the parent element, false otherwise\n */\nexport function isDescendant(element: Node, parent: Node): boolean {\n if (!parent) {\n return false;\n }\n\n if (parent.contains(element)) {\n return true;\n }\n\n let currentNode: Node = element;\n let i = 0; // Just in case something weird happens, let's not crash the browser…\n const DEPTH = 1000; // Max depth to search.\n\n while (\n i < DEPTH &&\n currentNode &&\n currentNode.getRootNode().nodeName === '#document-fragment'\n ) {\n currentNode = (currentNode.getRootNode() as any).host;\n if (parent.contains(currentNode)) {\n return true;\n }\n\n i += 1;\n }\n\n return parent.contains(currentNode);\n}\n"],"mappings":"0EAkBA,IAAIA,EAAM,WACR,OAAOC,EAAKC,KAAKF,KACnB,ECfA,IAAIG,EAAkB,sBAGtB,IAAIC,EAAYC,KAAKC,IACjBC,EAAYF,KAAKG,IAwDrB,SAASC,EAASC,EAAMC,EAAMC,GAC5B,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAiB,EACjBC,EAAU,MAC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