@limetech/lime-elements 38.23.5 → 38.24.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 (131) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-action-bar_2.cjs.entry.js +1 -1
  4. package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-badge.cjs.entry.js +42 -0
  6. package/dist/cjs/limel-badge.cjs.entry.js.map +1 -0
  7. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-chart.cjs.entry.js +1 -1
  9. package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
  10. package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
  12. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-linear-progress.cjs.entry.js +1 -1
  15. package/dist/cjs/{limel-portal_2.cjs.entry.js → limel-portal_3.cjs.entry.js} +107 -11
  16. package/dist/cjs/limel-portal_3.cjs.entry.js.map +1 -0
  17. package/dist/cjs/limel-profile-picture.cjs.entry.js +536 -0
  18. package/dist/cjs/limel-profile-picture.cjs.entry.js.map +1 -0
  19. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
  20. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  21. package/dist/cjs/limel-table.cjs.entry.js +1 -1
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/cjs/{translations-2746c4c6.js → translations-7499f391.js} +25 -1
  24. package/dist/cjs/translations-7499f391.js.map +1 -0
  25. package/dist/collection/collection-manifest.json +1 -0
  26. package/dist/collection/components/profile-picture/profile-picture.css +255 -0
  27. package/dist/collection/components/profile-picture/profile-picture.js +554 -0
  28. package/dist/collection/components/profile-picture/profile-picture.js.map +1 -0
  29. package/dist/collection/translations/da.js +3 -0
  30. package/dist/collection/translations/da.js.map +1 -1
  31. package/dist/collection/translations/de.js +3 -0
  32. package/dist/collection/translations/de.js.map +1 -1
  33. package/dist/collection/translations/en.js +3 -0
  34. package/dist/collection/translations/en.js.map +1 -1
  35. package/dist/collection/translations/fi.js +3 -0
  36. package/dist/collection/translations/fi.js.map +1 -1
  37. package/dist/collection/translations/fr.js +3 -0
  38. package/dist/collection/translations/fr.js.map +1 -1
  39. package/dist/collection/translations/nl.js +3 -0
  40. package/dist/collection/translations/nl.js.map +1 -1
  41. package/dist/collection/translations/no.js +3 -0
  42. package/dist/collection/translations/no.js.map +1 -1
  43. package/dist/collection/translations/sv.js +3 -0
  44. package/dist/collection/translations/sv.js.map +1 -1
  45. package/dist/collection/util/image-resize.js +305 -0
  46. package/dist/collection/util/image-resize.js.map +1 -0
  47. package/dist/esm/lime-elements.js +1 -1
  48. package/dist/esm/limel-action-bar_2.entry.js +1 -1
  49. package/dist/esm/limel-ai-avatar.entry.js +1 -1
  50. package/dist/esm/limel-badge.entry.js +38 -0
  51. package/dist/esm/limel-badge.entry.js.map +1 -0
  52. package/dist/esm/limel-callout.entry.js +1 -1
  53. package/dist/esm/limel-chart.entry.js +1 -1
  54. package/dist/esm/limel-chip_2.entry.js +1 -1
  55. package/dist/esm/limel-collapsible-section.entry.js +1 -1
  56. package/dist/esm/limel-file-viewer.entry.js +1 -1
  57. package/dist/esm/limel-file.entry.js +1 -1
  58. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  59. package/dist/esm/limel-linear-progress.entry.js +1 -1
  60. package/dist/esm/{limel-portal_2.entry.js → limel-portal_3.entry.js} +107 -12
  61. package/dist/esm/limel-portal_3.entry.js.map +1 -0
  62. package/dist/esm/limel-profile-picture.entry.js +532 -0
  63. package/dist/esm/limel-profile-picture.entry.js.map +1 -0
  64. package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
  65. package/dist/esm/limel-snackbar.entry.js +1 -1
  66. package/dist/esm/limel-table.entry.js +1 -1
  67. package/dist/esm/loader.js +1 -1
  68. package/dist/esm/{translations-0c3c0779.js → translations-1d617679.js} +25 -1
  69. package/dist/esm/translations-1d617679.js.map +1 -0
  70. package/dist/lime-elements/lime-elements.esm.js +1 -1
  71. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  72. package/dist/lime-elements/{p-6edfe426.entry.js → p-011f5d81.entry.js} +2 -2
  73. package/dist/lime-elements/p-18a3c28a.entry.js +2 -0
  74. package/dist/lime-elements/p-18a3c28a.entry.js.map +1 -0
  75. package/dist/lime-elements/{p-8a7bc823.entry.js → p-20d1913a.entry.js} +2 -2
  76. package/dist/lime-elements/{p-244e13f5.entry.js → p-3f698d18.entry.js} +2 -2
  77. package/dist/lime-elements/{p-9abbe61a.entry.js → p-441c1eab.entry.js} +2 -2
  78. package/dist/lime-elements/{p-b957a3ca.entry.js → p-4558a60e.entry.js} +2 -2
  79. package/dist/lime-elements/p-58777116.js +2 -0
  80. package/dist/lime-elements/p-58777116.js.map +1 -0
  81. package/dist/lime-elements/{p-d7e93894.entry.js → p-597e6f79.entry.js} +2 -2
  82. package/dist/lime-elements/{p-208f87d2.entry.js → p-78abbc50.entry.js} +2 -2
  83. package/dist/lime-elements/p-7e3a4f49.entry.js +2 -0
  84. package/dist/lime-elements/p-7e3a4f49.entry.js.map +1 -0
  85. package/dist/lime-elements/{p-e4d64dd2.entry.js → p-8ae75f4a.entry.js} +2 -2
  86. package/dist/lime-elements/{p-5018673b.entry.js → p-99de518a.entry.js} +2 -2
  87. package/dist/lime-elements/p-b5a96409.entry.js +2 -0
  88. package/dist/lime-elements/p-b5a96409.entry.js.map +1 -0
  89. package/dist/lime-elements/{p-2173d6d5.entry.js → p-bd619d56.entry.js} +2 -2
  90. package/dist/lime-elements/{p-65d5d2fb.entry.js → p-bd6878ee.entry.js} +2 -2
  91. package/dist/lime-elements/{p-5bf57c21.entry.js → p-ce29c097.entry.js} +2 -2
  92. package/dist/lime-elements/{p-00aee6b6.entry.js → p-e7201ebd.entry.js} +2 -2
  93. package/dist/types/components/profile-picture/profile-picture.d.ts +126 -0
  94. package/dist/types/components.d.ts +203 -0
  95. package/dist/types/translations/da.d.ts +3 -0
  96. package/dist/types/translations/de.d.ts +3 -0
  97. package/dist/types/translations/en.d.ts +3 -0
  98. package/dist/types/translations/fi.d.ts +3 -0
  99. package/dist/types/translations/fr.d.ts +3 -0
  100. package/dist/types/translations/nl.d.ts +3 -0
  101. package/dist/types/translations/no.d.ts +3 -0
  102. package/dist/types/translations/sv.d.ts +3 -0
  103. package/dist/types/util/image-resize.d.ts +138 -0
  104. package/package.json +1 -1
  105. package/dist/cjs/limel-badge_2.cjs.entry.js +0 -138
  106. package/dist/cjs/limel-badge_2.cjs.entry.js.map +0 -1
  107. package/dist/cjs/limel-portal_2.cjs.entry.js.map +0 -1
  108. package/dist/cjs/translations-2746c4c6.js.map +0 -1
  109. package/dist/esm/limel-badge_2.entry.js +0 -133
  110. package/dist/esm/limel-badge_2.entry.js.map +0 -1
  111. package/dist/esm/limel-portal_2.entry.js.map +0 -1
  112. package/dist/esm/translations-0c3c0779.js.map +0 -1
  113. package/dist/lime-elements/p-29b1f083.entry.js +0 -2
  114. package/dist/lime-elements/p-29b1f083.entry.js.map +0 -1
  115. package/dist/lime-elements/p-c8825e88.js +0 -2
  116. package/dist/lime-elements/p-c8825e88.js.map +0 -1
  117. package/dist/lime-elements/p-fe7243c1.entry.js +0 -2
  118. package/dist/lime-elements/p-fe7243c1.entry.js.map +0 -1
  119. /package/dist/lime-elements/{p-6edfe426.entry.js.map → p-011f5d81.entry.js.map} +0 -0
  120. /package/dist/lime-elements/{p-8a7bc823.entry.js.map → p-20d1913a.entry.js.map} +0 -0
  121. /package/dist/lime-elements/{p-244e13f5.entry.js.map → p-3f698d18.entry.js.map} +0 -0
  122. /package/dist/lime-elements/{p-9abbe61a.entry.js.map → p-441c1eab.entry.js.map} +0 -0
  123. /package/dist/lime-elements/{p-b957a3ca.entry.js.map → p-4558a60e.entry.js.map} +0 -0
  124. /package/dist/lime-elements/{p-d7e93894.entry.js.map → p-597e6f79.entry.js.map} +0 -0
  125. /package/dist/lime-elements/{p-208f87d2.entry.js.map → p-78abbc50.entry.js.map} +0 -0
  126. /package/dist/lime-elements/{p-e4d64dd2.entry.js.map → p-8ae75f4a.entry.js.map} +0 -0
  127. /package/dist/lime-elements/{p-5018673b.entry.js.map → p-99de518a.entry.js.map} +0 -0
  128. /package/dist/lime-elements/{p-2173d6d5.entry.js.map → p-bd619d56.entry.js.map} +0 -0
  129. /package/dist/lime-elements/{p-65d5d2fb.entry.js.map → p-bd6878ee.entry.js.map} +0 -0
  130. /package/dist/lime-elements/{p-5bf57c21.entry.js.map → p-ce29c097.entry.js.map} +0 -0
  131. /package/dist/lime-elements/{p-00aee6b6.entry.js.map → p-e7201ebd.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i,g as o}from"./p-288f0842.js";import{t as s}from"./p-c8825e88.js";function r(t,e){const i=t||e;if(!i){return"unknown"}const o=i.split(".").pop().toLowerCase();const s={pdf:"pdf",jpg:"image",jpeg:"image",heic:"image",bmp:"image",png:"image",gif:"image",svg:"image",svgz:"image",ep:"image",eps:"image",avi:"video",flv:"video",h264:"video",mov:"video",mp4:"video",mwv:"video",mkv:"video",mp3:"audio",wav:"audio",wma:"audio",ogg:"audio",txt:"text",json:"text",html:"text",xml:"text",doc:"office",docx:"office",odt:"office",dot:"office",dotx:"office",docm:"office",dotm:"office",pot:"office",ppt:"office",pptx:"office",odp:"office",potx:"office",potm:"office",pps:"office",ppsx:"office",ppsm:"office",pptm:"office",ppam:"office",pages:"office",xls:"office",xlsx:"office",xlsm:"office",xlsb:"office",ods:"office",csv:"office",numbers:"office"};return s[o]||"unknown"}class n{constructor(t){this.requestFullscreen=()=>{if(this.enter){this.enter()}};this.exitFullscreen=()=>{if(this.exit){this.exit.bind(window.document)()}};this.toggle=()=>{const t=window.document;const e=t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement;if(e){this.exitFullscreen()}else{this.requestFullscreen()}};this.enter=t.requestFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen;this.enter=this.enter.bind(t);const e=window.document;this.exit=e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen}isSupported(){return!!this.requestFullscreen}}const l='@charset "UTF-8";:host{isolation:isolate;position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;height:100%}*{box-sizing:border-box}img,video,audio,object,iframe{max-height:100%;max-width:100%;box-sizing:border-box}iframe{border:none;width:100%;height:100%;min-height:20rem}img{min-width:7rem;object-fit:contain}video{width:100%;height:auto}audio{width:100%}object{width:100%;height:100%}object[type="application/pdf"]{min-height:20rem}object[type="text/plain"]{border-radius:0.25rem;padding-right:2rem;overflow-y:auto}:host(:fullscreen){background-color:rgb(var(--color-gray-darker))}:host(:fullscreen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}:host(:-webkit-full-screen){background-color:rgb(var(--color-gray-darker))}:host(:-webkit-full-screen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}.buttons{position:absolute;z-index:1;top:0.25rem;right:0.25rem;display:flex;flex-direction:column;gap:0.25rem}@media (pointer: coarse){.buttons{gap:0.5rem}}.no-support{display:flex;flex-direction:column;align-items:center;border:1px dashed rgb(var(--contrast-600));border-radius:0.5rem;padding:1.25rem}.no-support .icon--warning{color:rgb(var(--color-orange-default))}[class^=button--]{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);display:flex;align-items:center;justify-content:center;border-radius:50%;width:2rem;height:2rem;background-color:rgba(var(--contrast-100), 0.8);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem)}[class^=button--]:hover,[class^=button--]:focus,[class^=button--]:focus-visible{will-change:color, background-color, box-shadow, transform}[class^=button--]:hover,[class^=button--]:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}[class^=button--]:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}[class^=button--]:hover,[class^=button--]:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}[class^=button--]:focus{outline:none}[class^=button--]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}[class^=button--] limel-icon{transition:color 0.2s ease;width:1.25rem;color:rgb(var(--contrast-1200))}[class^=button--]:hover limel-icon{color:rgb(var(--contrast-1400))}.action-menu-for-pdf-files,.action-menu-for-office-files{position:absolute;right:0.75rem}.action-menu-for-pdf-files{bottom:0.75rem}.action-menu-for-office-files{top:0.75rem}';const a=class{constructor(o){t(this,o);this.action=e(this,"action",7);this.renderPdf=()=>[i("div",{class:"action-menu-for-pdf-files"},this.renderActionMenu()),i("iframe",{src:this.fileUrl,loading:"lazy"})];this.renderImage=()=>[this.renderButtons(),i("img",{src:this.fileUrl,alt:this.alt,loading:"lazy"})];this.renderVideo=()=>i("video",{controls:true},i("source",{src:this.fileUrl}));this.renderAudio=()=>i("audio",{controls:true},i("source",{src:this.fileUrl}));this.renderText=()=>[this.renderButtons(),i("object",{data:this.fileUrl,type:"text/plain"},`Text content from: ${this.filename||this.url}`,i("a",{href:this.fileUrl,target:"_blank",rel:"noopener noreferrer"},"Open text file in new tab"))];this.renderOffice=()=>[i("div",{class:"action-menu-for-office-files"},this.renderActionMenu()),i("iframe",{src:this.getOfficeViewerUrl()+this.fileUrl+"&embedded=true",loading:"lazy"})];this.isOfficeFileAccessibleViaURL=()=>this.fileType==="office"&&!(this.fileUrl.startsWith("http://")||this.fileUrl.startsWith("https://"));this.getOfficeViewerUrl=()=>{const t={"microsoft-office":"https://view.officeapps.live.com/op/embed.aspx?src=","google-drive":"https://docs.google.com/gview?url="};return t[this.officeViewer]};this.renderNoFileSupportMessage=()=>i("div",{class:"no-support",role:"alert"},i("limel-icon",{class:"icon--warning",name:"brake_warning",size:"large",role:"presentation"}),i("p",null,this.getTranslation("file-viewer.message.unsupported-filetype")),this.renderDownloadButton());this.renderButtons=()=>i("div",{class:"buttons"},this.renderActionMenu(),this.renderToggleFullscreenButton(),this.renderDownloadButton(),this.renderOpenInNewTabButton());this.renderToggleFullscreenButton=()=>{if(!this.allowFullscreen||!this.fullscreen.isSupported()){return}const t=this.isFullscreen?"multiply":"fit_to_width";const e=this.isFullscreen?this.getTranslation("file-viewer.exit-fullscreen"):this.getTranslation("file-viewer.open-in-fullscreen");return[i("button",{class:"button--toggle-fullscreen",id:"tooltip-toggle-fullscreen",role:"button",onClick:this.handleToggleFullscreen},i("limel-icon",{name:t}),i("limel-tooltip",{label:e,elementId:"tooltip-toggle-fullscreen",openDirection:"left"}))]};this.renderDownloadButton=()=>{var t;if(!this.allowDownload||this.isFullscreen){return}return i("a",{class:"button--download",id:"tooltip-download",role:"button",download:(t=this.filename)!==null&&t!==void 0?t:"",href:this.fileUrl,target:"_blank"},i("limel-icon",{name:"download_2"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.download"),elementId:"tooltip-download",openDirection:"left"}))};this.renderOpenInNewTabButton=()=>{if(!this.allowOpenInNewTab||this.isFullscreen){return}return i("a",{class:"button--new-tab",id:"tooltip-new-tab",role:"button",href:this.fileUrl,target:"_blank",rel:"noopener noreferrer"},i("limel-icon",{name:"external_link"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.open-in-new-tab"),elementId:"tooltip-new-tab",openDirection:"left"}))};this.renderActionMenu=()=>{if(!this.actions||this.isFullscreen){return}return i("limel-menu",{class:"action-menu",items:this.actions,onSelect:this.emitOnAction,"open-direction":"left"},i("button",{class:"button--action",id:"tooltip-more",role:"button",slot:"trigger"},i("limel-icon",{name:"menu_2"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.more-actions"),elementId:"tooltip-more",openDirection:"left"})))};this.createURL=async t=>{if(["pdf"].includes(t)){const t=await fetch(this.url);const e=await t.blob();this.fileUrl=URL.createObjectURL(e)}else{this.fileUrl=this.url}this.loading=false};this.handleToggleFullscreen=()=>{if(this.fullscreen.isSupported()){this.fullscreen.toggle();this.isFullscreen=!this.isFullscreen}};this.emitOnAction=t=>{t.stopPropagation();this.action.emit(t.detail)};this.url=undefined;this.filename=undefined;this.alt=undefined;this.allowFullscreen=false;this.allowOpenInNewTab=false;this.allowDownload=false;this.language="en";this.officeViewer="microsoft-office";this.actions=undefined;this.isFullscreen=false;this.fileType=undefined;this.loading=true;this.fileUrl="";this.fullscreen=new n(this.HostElement)}async componentWillLoad(){this.fileType=r(this.filename,this.url);await this.createURL(this.fileType)}render(){if(!this.isOfficeFileAccessibleViaURL){return this.renderNoFileSupportMessage()}if(this.loading){return i("limel-spinner",{size:"x-small",limeBranded:false})}return this.renderFileViewer()}async watchUrl(t,e){if(t===e){return}this.loading=true;this.fileType=r(this.filename,this.fileUrl);await this.createURL(this.fileType)}renderFileViewer(){const t={pdf:this.renderPdf,image:this.renderImage,video:this.renderVideo,audio:this.renderAudio,text:this.renderText,office:this.renderOffice};const e=t[this.fileType]||this.renderNoFileSupportMessage;return e()}getTranslation(t){return s.get(t,this.language)}get HostElement(){return o(this)}static get watchers(){return{url:["watchUrl"]}}};a.style=l;export{a as limel_file_viewer};
2
- //# sourceMappingURL=p-65d5d2fb.entry.js.map
1
+ import{r as t,c as e,h as i,g as o}from"./p-288f0842.js";import{t as s}from"./p-58777116.js";function r(t,e){const i=t||e;if(!i){return"unknown"}const o=i.split(".").pop().toLowerCase();const s={pdf:"pdf",jpg:"image",jpeg:"image",heic:"image",bmp:"image",png:"image",gif:"image",svg:"image",svgz:"image",ep:"image",eps:"image",avi:"video",flv:"video",h264:"video",mov:"video",mp4:"video",mwv:"video",mkv:"video",mp3:"audio",wav:"audio",wma:"audio",ogg:"audio",txt:"text",json:"text",html:"text",xml:"text",doc:"office",docx:"office",odt:"office",dot:"office",dotx:"office",docm:"office",dotm:"office",pot:"office",ppt:"office",pptx:"office",odp:"office",potx:"office",potm:"office",pps:"office",ppsx:"office",ppsm:"office",pptm:"office",ppam:"office",pages:"office",xls:"office",xlsx:"office",xlsm:"office",xlsb:"office",ods:"office",csv:"office",numbers:"office"};return s[o]||"unknown"}class n{constructor(t){this.requestFullscreen=()=>{if(this.enter){this.enter()}};this.exitFullscreen=()=>{if(this.exit){this.exit.bind(window.document)()}};this.toggle=()=>{const t=window.document;const e=t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement;if(e){this.exitFullscreen()}else{this.requestFullscreen()}};this.enter=t.requestFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen;this.enter=this.enter.bind(t);const e=window.document;this.exit=e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen}isSupported(){return!!this.requestFullscreen}}const l='@charset "UTF-8";:host{isolation:isolate;position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;height:100%}*{box-sizing:border-box}img,video,audio,object,iframe{max-height:100%;max-width:100%;box-sizing:border-box}iframe{border:none;width:100%;height:100%;min-height:20rem}img{min-width:7rem;object-fit:contain}video{width:100%;height:auto}audio{width:100%}object{width:100%;height:100%}object[type="application/pdf"]{min-height:20rem}object[type="text/plain"]{border-radius:0.25rem;padding-right:2rem;overflow-y:auto}:host(:fullscreen){background-color:rgb(var(--color-gray-darker))}:host(:fullscreen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}:host(:-webkit-full-screen){background-color:rgb(var(--color-gray-darker))}:host(:-webkit-full-screen) object[type="text/plain"]{max-width:50rem;max-height:calc(100% - 2rem)}.buttons{position:absolute;z-index:1;top:0.25rem;right:0.25rem;display:flex;flex-direction:column;gap:0.25rem}@media (pointer: coarse){.buttons{gap:0.5rem}}.no-support{display:flex;flex-direction:column;align-items:center;border:1px dashed rgb(var(--contrast-600));border-radius:0.5rem;padding:1.25rem}.no-support .icon--warning{color:rgb(var(--color-orange-default))}[class^=button--]{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);display:flex;align-items:center;justify-content:center;border-radius:50%;width:2rem;height:2rem;background-color:rgba(var(--contrast-100), 0.8);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem)}[class^=button--]:hover,[class^=button--]:focus,[class^=button--]:focus-visible{will-change:color, background-color, box-shadow, transform}[class^=button--]:hover,[class^=button--]:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}[class^=button--]:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}[class^=button--]:hover,[class^=button--]:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}[class^=button--]:focus{outline:none}[class^=button--]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}[class^=button--] limel-icon{transition:color 0.2s ease;width:1.25rem;color:rgb(var(--contrast-1200))}[class^=button--]:hover limel-icon{color:rgb(var(--contrast-1400))}.action-menu-for-pdf-files,.action-menu-for-office-files{position:absolute;right:0.75rem}.action-menu-for-pdf-files{bottom:0.75rem}.action-menu-for-office-files{top:0.75rem}';const a=class{constructor(o){t(this,o);this.action=e(this,"action",7);this.renderPdf=()=>[i("div",{class:"action-menu-for-pdf-files"},this.renderActionMenu()),i("iframe",{src:this.fileUrl,loading:"lazy"})];this.renderImage=()=>[this.renderButtons(),i("img",{src:this.fileUrl,alt:this.alt,loading:"lazy"})];this.renderVideo=()=>i("video",{controls:true},i("source",{src:this.fileUrl}));this.renderAudio=()=>i("audio",{controls:true},i("source",{src:this.fileUrl}));this.renderText=()=>[this.renderButtons(),i("object",{data:this.fileUrl,type:"text/plain"},`Text content from: ${this.filename||this.url}`,i("a",{href:this.fileUrl,target:"_blank",rel:"noopener noreferrer"},"Open text file in new tab"))];this.renderOffice=()=>[i("div",{class:"action-menu-for-office-files"},this.renderActionMenu()),i("iframe",{src:this.getOfficeViewerUrl()+this.fileUrl+"&embedded=true",loading:"lazy"})];this.isOfficeFileAccessibleViaURL=()=>this.fileType==="office"&&!(this.fileUrl.startsWith("http://")||this.fileUrl.startsWith("https://"));this.getOfficeViewerUrl=()=>{const t={"microsoft-office":"https://view.officeapps.live.com/op/embed.aspx?src=","google-drive":"https://docs.google.com/gview?url="};return t[this.officeViewer]};this.renderNoFileSupportMessage=()=>i("div",{class:"no-support",role:"alert"},i("limel-icon",{class:"icon--warning",name:"brake_warning",size:"large",role:"presentation"}),i("p",null,this.getTranslation("file-viewer.message.unsupported-filetype")),this.renderDownloadButton());this.renderButtons=()=>i("div",{class:"buttons"},this.renderActionMenu(),this.renderToggleFullscreenButton(),this.renderDownloadButton(),this.renderOpenInNewTabButton());this.renderToggleFullscreenButton=()=>{if(!this.allowFullscreen||!this.fullscreen.isSupported()){return}const t=this.isFullscreen?"multiply":"fit_to_width";const e=this.isFullscreen?this.getTranslation("file-viewer.exit-fullscreen"):this.getTranslation("file-viewer.open-in-fullscreen");return[i("button",{class:"button--toggle-fullscreen",id:"tooltip-toggle-fullscreen",role:"button",onClick:this.handleToggleFullscreen},i("limel-icon",{name:t}),i("limel-tooltip",{label:e,elementId:"tooltip-toggle-fullscreen",openDirection:"left"}))]};this.renderDownloadButton=()=>{var t;if(!this.allowDownload||this.isFullscreen){return}return i("a",{class:"button--download",id:"tooltip-download",role:"button",download:(t=this.filename)!==null&&t!==void 0?t:"",href:this.fileUrl,target:"_blank"},i("limel-icon",{name:"download_2"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.download"),elementId:"tooltip-download",openDirection:"left"}))};this.renderOpenInNewTabButton=()=>{if(!this.allowOpenInNewTab||this.isFullscreen){return}return i("a",{class:"button--new-tab",id:"tooltip-new-tab",role:"button",href:this.fileUrl,target:"_blank",rel:"noopener noreferrer"},i("limel-icon",{name:"external_link"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.open-in-new-tab"),elementId:"tooltip-new-tab",openDirection:"left"}))};this.renderActionMenu=()=>{if(!this.actions||this.isFullscreen){return}return i("limel-menu",{class:"action-menu",items:this.actions,onSelect:this.emitOnAction,"open-direction":"left"},i("button",{class:"button--action",id:"tooltip-more",role:"button",slot:"trigger"},i("limel-icon",{name:"menu_2"}),i("limel-tooltip",{label:this.getTranslation("file-viewer.more-actions"),elementId:"tooltip-more",openDirection:"left"})))};this.createURL=async t=>{if(["pdf"].includes(t)){const t=await fetch(this.url);const e=await t.blob();this.fileUrl=URL.createObjectURL(e)}else{this.fileUrl=this.url}this.loading=false};this.handleToggleFullscreen=()=>{if(this.fullscreen.isSupported()){this.fullscreen.toggle();this.isFullscreen=!this.isFullscreen}};this.emitOnAction=t=>{t.stopPropagation();this.action.emit(t.detail)};this.url=undefined;this.filename=undefined;this.alt=undefined;this.allowFullscreen=false;this.allowOpenInNewTab=false;this.allowDownload=false;this.language="en";this.officeViewer="microsoft-office";this.actions=undefined;this.isFullscreen=false;this.fileType=undefined;this.loading=true;this.fileUrl="";this.fullscreen=new n(this.HostElement)}async componentWillLoad(){this.fileType=r(this.filename,this.url);await this.createURL(this.fileType)}render(){if(!this.isOfficeFileAccessibleViaURL){return this.renderNoFileSupportMessage()}if(this.loading){return i("limel-spinner",{size:"x-small",limeBranded:false})}return this.renderFileViewer()}async watchUrl(t,e){if(t===e){return}this.loading=true;this.fileType=r(this.filename,this.fileUrl);await this.createURL(this.fileType)}renderFileViewer(){const t={pdf:this.renderPdf,image:this.renderImage,video:this.renderVideo,audio:this.renderAudio,text:this.renderText,office:this.renderOffice};const e=t[this.fileType]||this.renderNoFileSupportMessage;return e()}getTranslation(t){return s.get(t,this.language)}get HostElement(){return o(this)}static get watchers(){return{url:["watchUrl"]}}};a.style=l;export{a as limel_file_viewer};
2
+ //# sourceMappingURL=p-bd6878ee.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as a,h as r,H as t}from"./p-288f0842.js";import{t as e}from"./p-c8825e88.js";const i=':host(limel-ai-avatar){display:flex;justify-content:center;align-self:center;position:relative;aspect-ratio:1;max-width:10rem;max-height:8rem;min-width:1.75rem;min-height:1.75rem;border-radius:0.5rem}*{box-sizing:border-box}:host(limel-ai-avatar[is-thinking]:not([is-thinking=false])){--ai-avatar-animation-play-state:running;--ai-avatar-orbitals-opacity:0.6;--ai-avatar-orbitals-animation-play-state:running}.core,.orbitals{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;aspect-ratio:1;border-radius:50%}.core{opacity:0.3;width:70%;animation:breathe 3s ease infinite var(--ai-avatar-animation-play-state, paused);background-color:rgb(var(--color-glaucous-darker), 0.6);mix-blend-mode:plus-lighter}.orbitals{mix-blend-mode:plus-lighter;width:clamp(0.375rem, 20%, 3.5rem);animation:rotate 5s linear infinite var(--ai-avatar-orbitals-animation-play-state, paused);transition:opacity 0.2s ease;opacity:var(--ai-avatar-orbitals-opacity, 0)}.orbitals:after,.orbitals:before{content:"";display:block;position:absolute;inset:0;margin:auto;width:clamp(0.125rem, 50%, 0.75rem);aspect-ratio:1;border-radius:50%;background-color:rgb(var(--color-glaucous-lighter))}.orbitals:before{animation:orbit 1s linear infinite var(--ai-avatar-orbitals-animation-play-state, paused);opacity:0.6;transform-origin:-220% 0;margin-right:-70%}.orbitals:after{animation:orbit 2s linear infinite var(--ai-avatar-orbitals-animation-play-state, paused);opacity:0.8;scale:0.7;transform-origin:0% -250%;margin-bottom:-70%}@keyframes orbit{0%{transform:rotateZ(0deg) translate3d(0, 0, 0)}100%{transform:rotateZ(360deg) translate3d(0, 0, 0)}}@keyframes breathe{1%,100%{transform:scale(1)}50%{transform:scale(0.86)}}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}svg{position:absolute;margin:auto;mix-blend-mode:screen;animation-iteration-count:infinite;animation-play-state:var(--ai-avatar-animation-play-state, paused)}.red{rotate:20deg;color:rgb(var(--color-red-default));animation-name:rotate, scale-circle-one;animation-duration:5s}.green{rotate:36deg;color:rgb(var(--color-green-default));animation-name:rotate, scale-circle-two;animation-duration:5.5s}.blue{rotate:100deg;color:rgb(var(--color-blue-default));animation-name:rotate, scale-circle-three;animation-duration:4.5s}.orange{rotate:165deg;color:rgb(var(--color-orange-default));animation-name:rotate, scale-circle-four;animation-duration:6.5s}@keyframes scale-circle-one{0%,100%{transform:scaleX(1) scaleY(0.8)}25%,75%{transform:scaleX(0.8) scaleY(0.9)}50%{transform:scaleX(1) scaleY(0.7)}}@keyframes scale-circle-two{0%,100%{transform:scaleX(0.8) scaleY(1)}25%,75%{transform:scaleX(0.9) scaleY(0.75)}50%{transform:scaleX(0.72) scaleY(1)}}@keyframes scale-circle-three{0%,100%{transform:scaleX(0.9) scaleY(0.8)}50%{transform:scaleX(0.75) scaleY(0.9)}}@keyframes scale-circle-four{0%,100%{transform:scaleX(0.8) scaleY(0.95)}25%,75%{transform:scaleX(0.95) scaleY(0.75)}50%{transform:scaleX(0.75) scaleY(0.95)}}';const o=class{constructor(r){a(this,r);this.getTranslation=a=>e.get(a,this.language);this.isThinking=false;this.language=document.documentElement.lang}render(){return r(t,{role:"img","aria-label":this.getHostAriaLabel()},this.renderCircle("red"),this.renderCircle("green"),this.renderCircle("blue"),this.renderCircle("orange"),r("div",{class:"core"}),r("div",{class:"orbitals"}))}getHostAriaLabel(){let a="";if(this.isThinking){a=` (${this.getTranslation("ai-avatar.thinking")})`}return`${this.getTranslation("ai-avatar.label")}${a}`}renderCircle(a){return r("svg",{class:a,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",role:"presentation"},r("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"currentColor","stroke-width":"6"}))}};o.style=i;export{o as limel_ai_avatar};
2
- //# sourceMappingURL=p-5bf57c21.entry.js.map
1
+ import{r as a,h as r,H as t}from"./p-288f0842.js";import{t as e}from"./p-58777116.js";const i=':host(limel-ai-avatar){display:flex;justify-content:center;align-self:center;position:relative;aspect-ratio:1;max-width:10rem;max-height:8rem;min-width:1.75rem;min-height:1.75rem;border-radius:0.5rem}*{box-sizing:border-box}:host(limel-ai-avatar[is-thinking]:not([is-thinking=false])){--ai-avatar-animation-play-state:running;--ai-avatar-orbitals-opacity:0.6;--ai-avatar-orbitals-animation-play-state:running}.core,.orbitals{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;aspect-ratio:1;border-radius:50%}.core{opacity:0.3;width:70%;animation:breathe 3s ease infinite var(--ai-avatar-animation-play-state, paused);background-color:rgb(var(--color-glaucous-darker), 0.6);mix-blend-mode:plus-lighter}.orbitals{mix-blend-mode:plus-lighter;width:clamp(0.375rem, 20%, 3.5rem);animation:rotate 5s linear infinite var(--ai-avatar-orbitals-animation-play-state, paused);transition:opacity 0.2s ease;opacity:var(--ai-avatar-orbitals-opacity, 0)}.orbitals:after,.orbitals:before{content:"";display:block;position:absolute;inset:0;margin:auto;width:clamp(0.125rem, 50%, 0.75rem);aspect-ratio:1;border-radius:50%;background-color:rgb(var(--color-glaucous-lighter))}.orbitals:before{animation:orbit 1s linear infinite var(--ai-avatar-orbitals-animation-play-state, paused);opacity:0.6;transform-origin:-220% 0;margin-right:-70%}.orbitals:after{animation:orbit 2s linear infinite var(--ai-avatar-orbitals-animation-play-state, paused);opacity:0.8;scale:0.7;transform-origin:0% -250%;margin-bottom:-70%}@keyframes orbit{0%{transform:rotateZ(0deg) translate3d(0, 0, 0)}100%{transform:rotateZ(360deg) translate3d(0, 0, 0)}}@keyframes breathe{1%,100%{transform:scale(1)}50%{transform:scale(0.86)}}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}svg{position:absolute;margin:auto;mix-blend-mode:screen;animation-iteration-count:infinite;animation-play-state:var(--ai-avatar-animation-play-state, paused)}.red{rotate:20deg;color:rgb(var(--color-red-default));animation-name:rotate, scale-circle-one;animation-duration:5s}.green{rotate:36deg;color:rgb(var(--color-green-default));animation-name:rotate, scale-circle-two;animation-duration:5.5s}.blue{rotate:100deg;color:rgb(var(--color-blue-default));animation-name:rotate, scale-circle-three;animation-duration:4.5s}.orange{rotate:165deg;color:rgb(var(--color-orange-default));animation-name:rotate, scale-circle-four;animation-duration:6.5s}@keyframes scale-circle-one{0%,100%{transform:scaleX(1) scaleY(0.8)}25%,75%{transform:scaleX(0.8) scaleY(0.9)}50%{transform:scaleX(1) scaleY(0.7)}}@keyframes scale-circle-two{0%,100%{transform:scaleX(0.8) scaleY(1)}25%,75%{transform:scaleX(0.9) scaleY(0.75)}50%{transform:scaleX(0.72) scaleY(1)}}@keyframes scale-circle-three{0%,100%{transform:scaleX(0.9) scaleY(0.8)}50%{transform:scaleX(0.75) scaleY(0.9)}}@keyframes scale-circle-four{0%,100%{transform:scaleX(0.8) scaleY(0.95)}25%,75%{transform:scaleX(0.95) scaleY(0.75)}50%{transform:scaleX(0.75) scaleY(0.95)}}';const o=class{constructor(r){a(this,r);this.getTranslation=a=>e.get(a,this.language);this.isThinking=false;this.language=document.documentElement.lang}render(){return r(t,{role:"img","aria-label":this.getHostAriaLabel()},this.renderCircle("red"),this.renderCircle("green"),this.renderCircle("blue"),this.renderCircle("orange"),r("div",{class:"core"}),r("div",{class:"orbitals"}))}getHostAriaLabel(){let a="";if(this.isThinking){a=` (${this.getTranslation("ai-avatar.thinking")})`}return`${this.getTranslation("ai-avatar.label")}${a}`}renderCircle(a){return r("svg",{class:a,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",role:"presentation"},r("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"currentColor","stroke-width":"6"}))}};o.style=i;export{o as limel_ai_avatar};
2
+ //# sourceMappingURL=p-ce29c097.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as i,c as t,h as e,H as s,g as n}from"./p-288f0842.js";import{t as r}from"./p-c8825e88.js";import{i as a}from"./p-fc998171.js";import{a as o,E as l}from"./p-aa25f475.js";const h='@charset "UTF-8";: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)));transition:max-width 0.3s ease}: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-shrunk) .items{opacity:0}:host(limel-action-bar:not(.is-shrunk)) .items{opacity:1}: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)}:host(limel-action-bar.is-shrunk){max-width:5rem;transition:max-width 0.3s ease-in-out}:host(limel-action-bar.is-shrunk) .expand-shrink{transition:transform 0.3s ease;transform:rotateY(180deg)}:host(limel-action-bar:not(.is-shrunk)){max-width:100%;transition:max-width 0.3s ease-in-out}:host(limel-action-bar:not(.is-shrunk)) .expand-shrink{transition:transform 0.3s ease;transform:rotateY(0deg)}:host(limel-action-bar.can-be-shrunk.is-full-width) .expand-shrink{margin-left:auto}.expand-shrink{all:unset;box-sizing:border-box;border-radius:50%;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent;display:flex;justify-content:center;align-items:center}.expand-shrink:hover,.expand-shrink:focus,.expand-shrink:focus-visible{will-change:color, background-color, box-shadow, transform}.expand-shrink:hover,.expand-shrink:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.expand-shrink:hover{box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.expand-shrink:hover,.expand-shrink:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink limel-icon{width:1.5rem;height:1.5rem;padding:0.125rem;color:var(--action-bar-shrink-icon-color, rgb(var(--contrast-1000)))}';const c=class{constructor(s){i(this,s);this.itemSelected=t(this,"itemSelected",7);this.hasRendered=false;this.isFirstIntersectionCheck=true;this.actionBarItems=[];this.renderActionBarItem=(i,t)=>e("limel-action-bar-item",{item:i,onSelect:this.handleSelect,isVisible:this.isVisible(t),role:"gridcell"});this.renderOverflowMenu=i=>{if(!(this.actions.length-this.overflowCutoff)){return}const t={name:"more",color:"rgb(var(--contrast-1000))",title:this.getTranslation("action-bar.actions")};return e("limel-action-bar-overflow-menu",{openDirection:this.openDirection,items:i,onSelect:this.handleSelect,role:"gridcell",overFlowIcon:this.actionBarIsShrunk?t:undefined})};this.handleCollapseExpandClick=()=>{this.actionBarIsShrunk=!this.actionBarIsShrunk};this.handleSelect=i=>{i.stopPropagation();if(a(i.detail)){this.itemSelected.emit(i.detail)}};this.getTranslation=i=>r.get(i,this.language);this.handleIntersection=i=>{const t=i.filter((i=>i.isIntersecting));const e=i.filter((i=>!i.isIntersecting));if(this.isFirstIntersectionCheck){this.overflowCutoff=t.length}else{this.overflowCutoff=this.overflowCutoff+t.length-e.length}this.isFirstIntersectionCheck=false};this.actions=[];this.language=document.documentElement.lang;this.accessibleLabel=undefined;this.layout=undefined;this.collapsible=false;this.openDirection=undefined;this.overflowCutoff=this.actions.length;this.actionBarIsShrunk=false}connectedCallback(){if(this.hasRendered){this.createIntersectionObserver()}}componentDidRender(){var i;if(this.haveItemsChanged()){(i=this.intersectionObserver)===null||i===void 0?void 0:i.disconnect();this.createIntersectionObserver()}}disconnectedCallback(){var i;(i=this.intersectionObserver)===null||i===void 0?void 0:i.disconnect();this.intersectionObserver=undefined;this.actionBarItems=[]}render(){this.hasRendered=true;let i=[];if(this.actions.length>0){i=this.actions.slice(this.overflowCutoff)}return e(s,{"aria-label":this.accessibleLabel,class:{"is-full-width":this.layout==="fullWidth","is-floating":this.layout==="floating","is-shrunk":this.actionBarIsShrunk&&this.collapsible,"can-be-shrunk":!!this.collapsible},role:"grid"},e("div",{class:"items",role:"rowgroup"},this.actions.map(this.renderActionBarItem)),this.renderOverflowMenu(i),this.renderCollapseExpandButton())}renderCollapseExpandButton(){if(!this.collapsible||this.actions.length<=1){return}return e("button",{class:{"expand-shrink":true},"aria-label":this.tooltipLabel,type:"button",onClick:this.handleCollapseExpandClick},e("limel-icon",{name:"double_left",id:"tooltip-expand-shrink-button"}),e("limel-tooltip",{label:this.tooltipLabel,elementId:"tooltip-expand-shrink-button"}))}isVisible(i){return i<this.overflowCutoff}get tooltipLabel(){let i="action-bar.collapse";if(this.actionBarIsShrunk){i="action-bar.expand"}return this.getTranslation(i)}createIntersectionObserver(){const i={root:this.host.shadowRoot.querySelector(".items"),rootMargin:"0px",threshold:1};this.overflowCutoff=this.actions.length;this.isFirstIntersectionCheck=true;this.actionBarItems=[];this.intersectionObserver=new IntersectionObserver(this.handleIntersection,i);for(const i of this.host.shadowRoot.querySelectorAll("limel-action-bar-item")){this.observe(i)}}observe(i){this.intersectionObserver.observe(i);this.actionBarItems.push(i)}haveItemsChanged(){const i=this.actionBarItems.some((i=>!this.host.shadowRoot.contains(i)));const t=[...this.host.shadowRoot.querySelectorAll("limel-action-bar-item")].some((i=>!this.actionBarItems.includes(i)));return i||t}get host(){return n(this)}};c.style=h;const d=":host(limel-text-editor-link-menu){animation:fade 0.2s ease forwards;animation-delay:0.1s;opacity:0;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;max-width:calc(100vw - 2rem);border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-16)}.actions{display:flex;justify-content:end;gap:0.5rem}@keyframes fade{0%{scale:0.86;opacity:0}100%{scale:1;opacity:1}}";const m=class{constructor(e){i(this,e);this.cancel=t(this,"cancel",7);this.save=t(this,"save",7);this.linkChange=t(this,"linkChange",7);this.getTranslation=i=>r.get(i,this.language);this.isValid=i=>{try{new URL(i)}catch(i){return false}return true};this.handleKeyDown=i=>{var t;if(i.key!==o){return}if(this.saveButton){this.saveButton.focus()}i.preventDefault();if(this.isValid((t=this.link)===null||t===void 0?void 0:t.href)){this.handleSave(i)}};this.handleCancel=i=>{if(i instanceof KeyboardEvent&&i.key!==l){return}i.stopPropagation();i.preventDefault();this.cancel.emit()};this.handleSave=i=>{i.stopPropagation();this.save.emit()};this.handleLinkInputAction=i=>{window.open(this.link.href,"_blank");i.stopPropagation()};this.handleLinkTitleChange=i=>{var t;this.emitLinkChange(i.detail,(t=this.link)===null||t===void 0?void 0:t.href)};this.handleLinkValueChange=i=>{var t;const e=i.detail;this.emitLinkChange((t=this.link)===null||t===void 0?void 0:t.text,e)};this.emitLinkChange=(i,t)=>{const e={text:i,href:t};this.linkChange.emit(e)};this.link=undefined;this.language="en";this.isOpen=false}connectedCallback(){this.setupGlobalHandlers()}disconnectedCallback(){this.teardownGlobalHandlers()}setupGlobalHandlers(){if(this.isOpen){document.addEventListener("keyup",this.handleCancel)}}teardownGlobalHandlers(){document.removeEventListener("keyup",this.handleCancel)}componentDidLoad(){this.focusOnTextInput()}focusOnTextInput(){if(this.textInput){const i=this.textInput.shadowRoot.querySelector("input");if(i){requestAnimationFrame((()=>{i.focus()}))}}}render(){var i,t;const s=this.isValid(this.link.href);return[e("limel-input-field",{label:this.getTranslation("editor-link-menu.text"),value:((i=this.link)===null||i===void 0?void 0:i.text)||"",leadingIcon:"text_cursor",onChange:this.handleLinkTitleChange,onKeyDown:this.handleKeyDown,ref:i=>this.textInput=i}),e("limel-input-field",{label:this.getTranslation("editor-link-menu.link"),value:((t=this.link)===null||t===void 0?void 0:t.href)||"",type:"text",leadingIcon:"-lime-text-link",trailingIcon:"external_link",invalid:!s,onChange:this.handleLinkValueChange,onAction:this.handleLinkInputAction,onKeyDown:this.handleKeyDown}),e("div",{class:"actions"},e("limel-button",{label:this.getTranslation("cancel"),onClick:this.handleCancel}),e("limel-button",{primary:true,label:this.getTranslation("save"),disabled:!s,onClick:this.handleSave,ref:i=>this.saveButton=i,slot:"button"}))]}};m.style=d;export{c as limel_action_bar,m as limel_text_editor_link_menu};
2
- //# sourceMappingURL=p-00aee6b6.entry.js.map
1
+ import{r as i,c as t,h as e,H as s,g as n}from"./p-288f0842.js";import{t as r}from"./p-58777116.js";import{i as a}from"./p-fc998171.js";import{a as o,E as l}from"./p-aa25f475.js";const h='@charset "UTF-8";: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)));transition:max-width 0.3s ease}: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-shrunk) .items{opacity:0}:host(limel-action-bar:not(.is-shrunk)) .items{opacity:1}: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)}:host(limel-action-bar.is-shrunk){max-width:5rem;transition:max-width 0.3s ease-in-out}:host(limel-action-bar.is-shrunk) .expand-shrink{transition:transform 0.3s ease;transform:rotateY(180deg)}:host(limel-action-bar:not(.is-shrunk)){max-width:100%;transition:max-width 0.3s ease-in-out}:host(limel-action-bar:not(.is-shrunk)) .expand-shrink{transition:transform 0.3s ease;transform:rotateY(0deg)}:host(limel-action-bar.can-be-shrunk.is-full-width) .expand-shrink{margin-left:auto}.expand-shrink{all:unset;box-sizing:border-box;border-radius:50%;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent;display:flex;justify-content:center;align-items:center}.expand-shrink:hover,.expand-shrink:focus,.expand-shrink:focus-visible{will-change:color, background-color, box-shadow, transform}.expand-shrink:hover,.expand-shrink:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.expand-shrink:hover{box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.expand-shrink:hover,.expand-shrink:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink limel-icon{width:1.5rem;height:1.5rem;padding:0.125rem;color:var(--action-bar-shrink-icon-color, rgb(var(--contrast-1000)))}';const c=class{constructor(s){i(this,s);this.itemSelected=t(this,"itemSelected",7);this.hasRendered=false;this.isFirstIntersectionCheck=true;this.actionBarItems=[];this.renderActionBarItem=(i,t)=>e("limel-action-bar-item",{item:i,onSelect:this.handleSelect,isVisible:this.isVisible(t),role:"gridcell"});this.renderOverflowMenu=i=>{if(!(this.actions.length-this.overflowCutoff)){return}const t={name:"more",color:"rgb(var(--contrast-1000))",title:this.getTranslation("action-bar.actions")};return e("limel-action-bar-overflow-menu",{openDirection:this.openDirection,items:i,onSelect:this.handleSelect,role:"gridcell",overFlowIcon:this.actionBarIsShrunk?t:undefined})};this.handleCollapseExpandClick=()=>{this.actionBarIsShrunk=!this.actionBarIsShrunk};this.handleSelect=i=>{i.stopPropagation();if(a(i.detail)){this.itemSelected.emit(i.detail)}};this.getTranslation=i=>r.get(i,this.language);this.handleIntersection=i=>{const t=i.filter((i=>i.isIntersecting));const e=i.filter((i=>!i.isIntersecting));if(this.isFirstIntersectionCheck){this.overflowCutoff=t.length}else{this.overflowCutoff=this.overflowCutoff+t.length-e.length}this.isFirstIntersectionCheck=false};this.actions=[];this.language=document.documentElement.lang;this.accessibleLabel=undefined;this.layout=undefined;this.collapsible=false;this.openDirection=undefined;this.overflowCutoff=this.actions.length;this.actionBarIsShrunk=false}connectedCallback(){if(this.hasRendered){this.createIntersectionObserver()}}componentDidRender(){var i;if(this.haveItemsChanged()){(i=this.intersectionObserver)===null||i===void 0?void 0:i.disconnect();this.createIntersectionObserver()}}disconnectedCallback(){var i;(i=this.intersectionObserver)===null||i===void 0?void 0:i.disconnect();this.intersectionObserver=undefined;this.actionBarItems=[]}render(){this.hasRendered=true;let i=[];if(this.actions.length>0){i=this.actions.slice(this.overflowCutoff)}return e(s,{"aria-label":this.accessibleLabel,class:{"is-full-width":this.layout==="fullWidth","is-floating":this.layout==="floating","is-shrunk":this.actionBarIsShrunk&&this.collapsible,"can-be-shrunk":!!this.collapsible},role:"grid"},e("div",{class:"items",role:"rowgroup"},this.actions.map(this.renderActionBarItem)),this.renderOverflowMenu(i),this.renderCollapseExpandButton())}renderCollapseExpandButton(){if(!this.collapsible||this.actions.length<=1){return}return e("button",{class:{"expand-shrink":true},"aria-label":this.tooltipLabel,type:"button",onClick:this.handleCollapseExpandClick},e("limel-icon",{name:"double_left",id:"tooltip-expand-shrink-button"}),e("limel-tooltip",{label:this.tooltipLabel,elementId:"tooltip-expand-shrink-button"}))}isVisible(i){return i<this.overflowCutoff}get tooltipLabel(){let i="action-bar.collapse";if(this.actionBarIsShrunk){i="action-bar.expand"}return this.getTranslation(i)}createIntersectionObserver(){const i={root:this.host.shadowRoot.querySelector(".items"),rootMargin:"0px",threshold:1};this.overflowCutoff=this.actions.length;this.isFirstIntersectionCheck=true;this.actionBarItems=[];this.intersectionObserver=new IntersectionObserver(this.handleIntersection,i);for(const i of this.host.shadowRoot.querySelectorAll("limel-action-bar-item")){this.observe(i)}}observe(i){this.intersectionObserver.observe(i);this.actionBarItems.push(i)}haveItemsChanged(){const i=this.actionBarItems.some((i=>!this.host.shadowRoot.contains(i)));const t=[...this.host.shadowRoot.querySelectorAll("limel-action-bar-item")].some((i=>!this.actionBarItems.includes(i)));return i||t}get host(){return n(this)}};c.style=h;const d=":host(limel-text-editor-link-menu){animation:fade 0.2s ease forwards;animation-delay:0.1s;opacity:0;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;max-width:calc(100vw - 2rem);border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-16)}.actions{display:flex;justify-content:end;gap:0.5rem}@keyframes fade{0%{scale:0.86;opacity:0}100%{scale:1;opacity:1}}";const m=class{constructor(e){i(this,e);this.cancel=t(this,"cancel",7);this.save=t(this,"save",7);this.linkChange=t(this,"linkChange",7);this.getTranslation=i=>r.get(i,this.language);this.isValid=i=>{try{new URL(i)}catch(i){return false}return true};this.handleKeyDown=i=>{var t;if(i.key!==o){return}if(this.saveButton){this.saveButton.focus()}i.preventDefault();if(this.isValid((t=this.link)===null||t===void 0?void 0:t.href)){this.handleSave(i)}};this.handleCancel=i=>{if(i instanceof KeyboardEvent&&i.key!==l){return}i.stopPropagation();i.preventDefault();this.cancel.emit()};this.handleSave=i=>{i.stopPropagation();this.save.emit()};this.handleLinkInputAction=i=>{window.open(this.link.href,"_blank");i.stopPropagation()};this.handleLinkTitleChange=i=>{var t;this.emitLinkChange(i.detail,(t=this.link)===null||t===void 0?void 0:t.href)};this.handleLinkValueChange=i=>{var t;const e=i.detail;this.emitLinkChange((t=this.link)===null||t===void 0?void 0:t.text,e)};this.emitLinkChange=(i,t)=>{const e={text:i,href:t};this.linkChange.emit(e)};this.link=undefined;this.language="en";this.isOpen=false}connectedCallback(){this.setupGlobalHandlers()}disconnectedCallback(){this.teardownGlobalHandlers()}setupGlobalHandlers(){if(this.isOpen){document.addEventListener("keyup",this.handleCancel)}}teardownGlobalHandlers(){document.removeEventListener("keyup",this.handleCancel)}componentDidLoad(){this.focusOnTextInput()}focusOnTextInput(){if(this.textInput){const i=this.textInput.shadowRoot.querySelector("input");if(i){requestAnimationFrame((()=>{i.focus()}))}}}render(){var i,t;const s=this.isValid(this.link.href);return[e("limel-input-field",{label:this.getTranslation("editor-link-menu.text"),value:((i=this.link)===null||i===void 0?void 0:i.text)||"",leadingIcon:"text_cursor",onChange:this.handleLinkTitleChange,onKeyDown:this.handleKeyDown,ref:i=>this.textInput=i}),e("limel-input-field",{label:this.getTranslation("editor-link-menu.link"),value:((t=this.link)===null||t===void 0?void 0:t.href)||"",type:"text",leadingIcon:"-lime-text-link",trailingIcon:"external_link",invalid:!s,onChange:this.handleLinkValueChange,onAction:this.handleLinkInputAction,onKeyDown:this.handleKeyDown}),e("div",{class:"actions"},e("limel-button",{label:this.getTranslation("cancel"),onClick:this.handleCancel}),e("limel-button",{primary:true,label:this.getTranslation("save"),disabled:!s,onClick:this.handleSave,ref:i=>this.saveButton=i,slot:"button"}))]}};m.style=d;export{c as limel_action_bar,m as limel_text_editor_link_menu};
2
+ //# sourceMappingURL=p-e7201ebd.entry.js.map
@@ -0,0 +1,126 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { FileInfo } from '../../global/shared-types/file.types';
3
+ import { Icon } from '../../global/shared-types/icon.types';
4
+ import { Languages } from '../date-picker/date.types';
5
+ import { ResizeOptions } from '../../util/image-resize';
6
+ /**
7
+ * This component displays a profile picture, while allowing the user
8
+ * to change it via a file input or drag-and-drop.
9
+ *
10
+ * It supports client-side image resizing and conversion,
11
+ * as well as a simple lazy-loading mechanism.
12
+ *
13
+ * @exampleComponent limel-example-profile-picture-basic
14
+ * @exampleComponent limel-example-profile-picture-helper-text
15
+ * @exampleComponent limel-example-profile-picture-icon
16
+ * @exampleComponent limel-example-profile-picture-with-value
17
+ * @exampleComponent limel-example-profile-picture-loading
18
+ * @exampleComponent limel-example-profile-picture-image-fit
19
+ * @exampleComponent limel-example-profile-picture-composite
20
+ * @exampleComponent limel-example-profile-picture-resize-contain
21
+ * @exampleComponent limel-example-profile-picture-resize-cover
22
+ * @exampleComponent limel-example-profile-picture-resize-fallback
23
+ * @exampleComponent limel-example-profile-picture-styling
24
+ * @beta
25
+ */
26
+ export declare class ProfilePicture {
27
+ /**
28
+ * Defines the language for translations.
29
+ * Will translate the translatable strings on the components.
30
+ */
31
+ language: Languages;
32
+ /**
33
+ * Accessible label for the the browse button.
34
+ */
35
+ label: string;
36
+ /**
37
+ * Placeholder icon of the component, displayed when no image is present.
38
+ */
39
+ icon: string | Icon;
40
+ /**
41
+ * Helper text shown as a tooltip on hover or focus.
42
+ */
43
+ helperText?: string;
44
+ /**
45
+ * Disables user interaction.
46
+ * Prevents uploading new pictures or removing existing ones.
47
+ */
48
+ disabled: boolean;
49
+ /**
50
+ * Readonly prevents changing the value but allows interaction like focus.
51
+ */
52
+ readonly: boolean;
53
+ /**
54
+ * Marks the control as required.
55
+ */
56
+ required: boolean;
57
+ /**
58
+ * Marks the control as invalid.
59
+ */
60
+ invalid: boolean;
61
+ /**
62
+ * Set to `true` to put the component in the `loading` state,
63
+ * and render an indeterminate progress indicator inside.
64
+ * This does _not_ disable the interactivity of the component!
65
+ */
66
+ loading: boolean;
67
+ /**
68
+ * Current image to display. Either a URL string or a `FileInfo` with an href.
69
+ */
70
+ value?: string | FileInfo;
71
+ /**
72
+ * How the image should fit within the container.
73
+ * - `cover` will fill the container and crop excess parts.
74
+ * - `contain` will scale the image to fit within the container without cropping.
75
+ */
76
+ imageFit: 'cover' | 'contain';
77
+ /**
78
+ * A comma-separated list of accepted file types.
79
+ */
80
+ accept: string;
81
+ /**
82
+ * Optional client-side resize before emitting the file.
83
+ * If provided, the selected image will be resized on the client device.
84
+ * :::note
85
+ * HEIC may not decode in all browsers; when decoding fails, the original
86
+ * file will be emitted. See the examples for more info.
87
+ * :::
88
+ */
89
+ resize?: ResizeOptions;
90
+ /**
91
+ * Emitted when the picture changes (first FileInfo only).
92
+ */
93
+ change: EventEmitter<FileInfo | undefined>;
94
+ /**
95
+ * Emitted when a file is rejected by accept filter.
96
+ */
97
+ filesRejected: EventEmitter<FileInfo[]>;
98
+ private objectUrl?;
99
+ private imageError;
100
+ private isErrorMessagePopoverOpen;
101
+ private removeButtonId;
102
+ private browseButtonId;
103
+ disconnectedCallback(): void;
104
+ protected handleValueChange(): void;
105
+ render(): any;
106
+ private get hasValue();
107
+ private renderBrowseButton;
108
+ private renderAvatar;
109
+ private renderIcon;
110
+ private renderClearButton;
111
+ private renderSpinner;
112
+ private renderHelperText;
113
+ private getUnsupportedPreviewContext;
114
+ private shouldShowErrorMessage;
115
+ private renderErrorMessage;
116
+ private handleNewFiles;
117
+ private handleRejectedFiles;
118
+ private getImageSrc;
119
+ private revokeObjectUrl;
120
+ private handleClear;
121
+ private onImageError;
122
+ private openPopover;
123
+ private onPopoverClose;
124
+ private getTranslation;
125
+ }
126
+ //# sourceMappingURL=profile-picture.d.ts.map
@@ -38,6 +38,7 @@ import { CustomElementDefinition } from "./global/shared-types/custom-element.ty
38
38
  import { PickerValue } from "./components/picker/value.types";
39
39
  import { Searcher } from "./components/picker/searcher.types";
40
40
  import { ActionPosition, ActionScrollBehavior } from "./components/picker/actions.types";
41
+ import { ResizeOptions } from "./util/image-resize";
41
42
  import { FlowItem } from "./components/progress-flow/progress-flow.types";
42
43
  import { EditorImage, EditorMetadata, ImageInserter, TriggerCharacter, TriggerEventDetail } from "./components/text-editor/text-editor.types";
43
44
  import { EditorUiType } from "./components/text-editor/types";
@@ -80,6 +81,7 @@ export { CustomElementDefinition } from "./global/shared-types/custom-element.ty
80
81
  export { PickerValue } from "./components/picker/value.types";
81
82
  export { Searcher } from "./components/picker/searcher.types";
82
83
  export { ActionPosition, ActionScrollBehavior } from "./components/picker/actions.types";
84
+ export { ResizeOptions } from "./util/image-resize";
83
85
  export { FlowItem } from "./components/progress-flow/progress-flow.types";
84
86
  export { EditorImage, EditorMetadata, ImageInserter, TriggerCharacter, TriggerEventDetail } from "./components/text-editor/text-editor.types";
85
87
  export { EditorUiType } from "./components/text-editor/types";
@@ -2304,6 +2306,78 @@ export namespace Components {
2304
2306
  */
2305
2307
  "visible": boolean;
2306
2308
  }
2309
+ /**
2310
+ * This component displays a profile picture, while allowing the user
2311
+ * to change it via a file input or drag-and-drop.
2312
+ * It supports client-side image resizing and conversion,
2313
+ * as well as a simple lazy-loading mechanism.
2314
+ * @exampleComponent limel-example-profile-picture-basic
2315
+ * @exampleComponent limel-example-profile-picture-helper-text
2316
+ * @exampleComponent limel-example-profile-picture-icon
2317
+ * @exampleComponent limel-example-profile-picture-with-value
2318
+ * @exampleComponent limel-example-profile-picture-loading
2319
+ * @exampleComponent limel-example-profile-picture-image-fit
2320
+ * @exampleComponent limel-example-profile-picture-composite
2321
+ * @exampleComponent limel-example-profile-picture-resize-contain
2322
+ * @exampleComponent limel-example-profile-picture-resize-cover
2323
+ * @exampleComponent limel-example-profile-picture-resize-fallback
2324
+ * @exampleComponent limel-example-profile-picture-styling
2325
+ * @beta
2326
+ */
2327
+ interface LimelProfilePicture {
2328
+ /**
2329
+ * A comma-separated list of accepted file types.
2330
+ */
2331
+ "accept": string;
2332
+ /**
2333
+ * Disables user interaction. Prevents uploading new pictures or removing existing ones.
2334
+ */
2335
+ "disabled": boolean;
2336
+ /**
2337
+ * Helper text shown as a tooltip on hover or focus.
2338
+ */
2339
+ "helperText"?: string;
2340
+ /**
2341
+ * Placeholder icon of the component, displayed when no image is present.
2342
+ */
2343
+ "icon": string | Icon;
2344
+ /**
2345
+ * How the image should fit within the container. - `cover` will fill the container and crop excess parts. - `contain` will scale the image to fit within the container without cropping.
2346
+ */
2347
+ "imageFit": 'cover' | 'contain';
2348
+ /**
2349
+ * Marks the control as invalid.
2350
+ */
2351
+ "invalid": boolean;
2352
+ /**
2353
+ * Accessible label for the the browse button.
2354
+ */
2355
+ "label": string;
2356
+ /**
2357
+ * Defines the language for translations. Will translate the translatable strings on the components.
2358
+ */
2359
+ "language": Languages;
2360
+ /**
2361
+ * Set to `true` to put the component in the `loading` state, and render an indeterminate progress indicator inside. This does _not_ disable the interactivity of the component!
2362
+ */
2363
+ "loading": boolean;
2364
+ /**
2365
+ * Readonly prevents changing the value but allows interaction like focus.
2366
+ */
2367
+ "readonly": boolean;
2368
+ /**
2369
+ * Marks the control as required.
2370
+ */
2371
+ "required": boolean;
2372
+ /**
2373
+ * Optional client-side resize before emitting the file. If provided, the selected image will be resized on the client device. :::note HEIC may not decode in all browsers; when decoding fails, the original file will be emitted. See the examples for more info. :::
2374
+ */
2375
+ "resize"?: ResizeOptions;
2376
+ /**
2377
+ * Current image to display. Either a URL string or a `FileInfo` with an href.
2378
+ */
2379
+ "value"?: string | FileInfo;
2380
+ }
2307
2381
  /**
2308
2382
  * @exampleComponent limel-example-progress-flow-basic
2309
2383
  * @exampleComponent limel-example-progress-flow-secondary-text
@@ -3166,6 +3240,10 @@ export interface LimelPopoverCustomEvent<T> extends CustomEvent<T> {
3166
3240
  detail: T;
3167
3241
  target: HTMLLimelPopoverElement;
3168
3242
  }
3243
+ export interface LimelProfilePictureCustomEvent<T> extends CustomEvent<T> {
3244
+ detail: T;
3245
+ target: HTMLLimelProfilePictureElement;
3246
+ }
3169
3247
  export interface LimelProgressFlowCustomEvent<T> extends CustomEvent<T> {
3170
3248
  detail: T;
3171
3249
  target: HTMLLimelProgressFlowElement;
@@ -4371,6 +4449,30 @@ declare global {
4371
4449
  prototype: HTMLLimelPortalElement;
4372
4450
  new (): HTMLLimelPortalElement;
4373
4451
  };
4452
+ /**
4453
+ * This component displays a profile picture, while allowing the user
4454
+ * to change it via a file input or drag-and-drop.
4455
+ * It supports client-side image resizing and conversion,
4456
+ * as well as a simple lazy-loading mechanism.
4457
+ * @exampleComponent limel-example-profile-picture-basic
4458
+ * @exampleComponent limel-example-profile-picture-helper-text
4459
+ * @exampleComponent limel-example-profile-picture-icon
4460
+ * @exampleComponent limel-example-profile-picture-with-value
4461
+ * @exampleComponent limel-example-profile-picture-loading
4462
+ * @exampleComponent limel-example-profile-picture-image-fit
4463
+ * @exampleComponent limel-example-profile-picture-composite
4464
+ * @exampleComponent limel-example-profile-picture-resize-contain
4465
+ * @exampleComponent limel-example-profile-picture-resize-cover
4466
+ * @exampleComponent limel-example-profile-picture-resize-fallback
4467
+ * @exampleComponent limel-example-profile-picture-styling
4468
+ * @beta
4469
+ */
4470
+ interface HTMLLimelProfilePictureElement extends Components.LimelProfilePicture, HTMLStencilElement {
4471
+ }
4472
+ var HTMLLimelProfilePictureElement: {
4473
+ prototype: HTMLLimelProfilePictureElement;
4474
+ new (): HTMLLimelProfilePictureElement;
4475
+ };
4374
4476
  /**
4375
4477
  * @exampleComponent limel-example-progress-flow-basic
4376
4478
  * @exampleComponent limel-example-progress-flow-secondary-text
@@ -4777,6 +4879,7 @@ declare global {
4777
4879
  "limel-popover": HTMLLimelPopoverElement;
4778
4880
  "limel-popover-surface": HTMLLimelPopoverSurfaceElement;
4779
4881
  "limel-portal": HTMLLimelPortalElement;
4882
+ "limel-profile-picture": HTMLLimelProfilePictureElement;
4780
4883
  "limel-progress-flow": HTMLLimelProgressFlowElement;
4781
4884
  "limel-progress-flow-item": HTMLLimelProgressFlowItemElement;
4782
4885
  "limel-prosemirror-adapter": HTMLLimelProsemirrorAdapterElement;
@@ -7204,6 +7307,86 @@ declare namespace LocalJSX {
7204
7307
  */
7205
7308
  "visible"?: boolean;
7206
7309
  }
7310
+ /**
7311
+ * This component displays a profile picture, while allowing the user
7312
+ * to change it via a file input or drag-and-drop.
7313
+ * It supports client-side image resizing and conversion,
7314
+ * as well as a simple lazy-loading mechanism.
7315
+ * @exampleComponent limel-example-profile-picture-basic
7316
+ * @exampleComponent limel-example-profile-picture-helper-text
7317
+ * @exampleComponent limel-example-profile-picture-icon
7318
+ * @exampleComponent limel-example-profile-picture-with-value
7319
+ * @exampleComponent limel-example-profile-picture-loading
7320
+ * @exampleComponent limel-example-profile-picture-image-fit
7321
+ * @exampleComponent limel-example-profile-picture-composite
7322
+ * @exampleComponent limel-example-profile-picture-resize-contain
7323
+ * @exampleComponent limel-example-profile-picture-resize-cover
7324
+ * @exampleComponent limel-example-profile-picture-resize-fallback
7325
+ * @exampleComponent limel-example-profile-picture-styling
7326
+ * @beta
7327
+ */
7328
+ interface LimelProfilePicture {
7329
+ /**
7330
+ * A comma-separated list of accepted file types.
7331
+ */
7332
+ "accept"?: string;
7333
+ /**
7334
+ * Disables user interaction. Prevents uploading new pictures or removing existing ones.
7335
+ */
7336
+ "disabled"?: boolean;
7337
+ /**
7338
+ * Helper text shown as a tooltip on hover or focus.
7339
+ */
7340
+ "helperText"?: string;
7341
+ /**
7342
+ * Placeholder icon of the component, displayed when no image is present.
7343
+ */
7344
+ "icon"?: string | Icon;
7345
+ /**
7346
+ * How the image should fit within the container. - `cover` will fill the container and crop excess parts. - `contain` will scale the image to fit within the container without cropping.
7347
+ */
7348
+ "imageFit"?: 'cover' | 'contain';
7349
+ /**
7350
+ * Marks the control as invalid.
7351
+ */
7352
+ "invalid"?: boolean;
7353
+ /**
7354
+ * Accessible label for the the browse button.
7355
+ */
7356
+ "label"?: string;
7357
+ /**
7358
+ * Defines the language for translations. Will translate the translatable strings on the components.
7359
+ */
7360
+ "language"?: Languages;
7361
+ /**
7362
+ * Set to `true` to put the component in the `loading` state, and render an indeterminate progress indicator inside. This does _not_ disable the interactivity of the component!
7363
+ */
7364
+ "loading"?: boolean;
7365
+ /**
7366
+ * Emitted when the picture changes (first FileInfo only).
7367
+ */
7368
+ "onChange"?: (event: LimelProfilePictureCustomEvent<FileInfo | undefined>) => void;
7369
+ /**
7370
+ * Emitted when a file is rejected by accept filter.
7371
+ */
7372
+ "onFilesRejected"?: (event: LimelProfilePictureCustomEvent<FileInfo[]>) => void;
7373
+ /**
7374
+ * Readonly prevents changing the value but allows interaction like focus.
7375
+ */
7376
+ "readonly"?: boolean;
7377
+ /**
7378
+ * Marks the control as required.
7379
+ */
7380
+ "required"?: boolean;
7381
+ /**
7382
+ * Optional client-side resize before emitting the file. If provided, the selected image will be resized on the client device. :::note HEIC may not decode in all browsers; when decoding fails, the original file will be emitted. See the examples for more info. :::
7383
+ */
7384
+ "resize"?: ResizeOptions;
7385
+ /**
7386
+ * Current image to display. Either a URL string or a `FileInfo` with an href.
7387
+ */
7388
+ "value"?: string | FileInfo;
7389
+ }
7207
7390
  /**
7208
7391
  * @exampleComponent limel-example-progress-flow-basic
7209
7392
  * @exampleComponent limel-example-progress-flow-secondary-text
@@ -8138,6 +8321,7 @@ declare namespace LocalJSX {
8138
8321
  "limel-popover": LimelPopover;
8139
8322
  "limel-popover-surface": LimelPopoverSurface;
8140
8323
  "limel-portal": LimelPortal;
8324
+ "limel-profile-picture": LimelProfilePicture;
8141
8325
  "limel-progress-flow": LimelProgressFlow;
8142
8326
  "limel-progress-flow-item": LimelProgressFlowItem;
8143
8327
  "limel-prosemirror-adapter": LimelProsemirrorAdapter;
@@ -9040,6 +9224,25 @@ declare module "@stencil/core" {
9040
9224
  * @exampleComponent limel-example-portal-basic
9041
9225
  */
9042
9226
  "limel-portal": LocalJSX.LimelPortal & JSXBase.HTMLAttributes<HTMLLimelPortalElement>;
9227
+ /**
9228
+ * This component displays a profile picture, while allowing the user
9229
+ * to change it via a file input or drag-and-drop.
9230
+ * It supports client-side image resizing and conversion,
9231
+ * as well as a simple lazy-loading mechanism.
9232
+ * @exampleComponent limel-example-profile-picture-basic
9233
+ * @exampleComponent limel-example-profile-picture-helper-text
9234
+ * @exampleComponent limel-example-profile-picture-icon
9235
+ * @exampleComponent limel-example-profile-picture-with-value
9236
+ * @exampleComponent limel-example-profile-picture-loading
9237
+ * @exampleComponent limel-example-profile-picture-image-fit
9238
+ * @exampleComponent limel-example-profile-picture-composite
9239
+ * @exampleComponent limel-example-profile-picture-resize-contain
9240
+ * @exampleComponent limel-example-profile-picture-resize-cover
9241
+ * @exampleComponent limel-example-profile-picture-resize-fallback
9242
+ * @exampleComponent limel-example-profile-picture-styling
9243
+ * @beta
9244
+ */
9245
+ "limel-profile-picture": LocalJSX.LimelProfilePicture & JSXBase.HTMLAttributes<HTMLLimelProfilePictureElement>;
9043
9246
  /**
9044
9247
  * @exampleComponent limel-example-progress-flow-basic
9045
9248
  * @exampleComponent limel-example-progress-flow-secondary-text
@@ -50,6 +50,9 @@ declare const _default: {
50
50
  'ai-avatar.thinking': string;
51
51
  'table.select-all': string;
52
52
  'table.select-row': string;
53
+ 'profile-picture.remove': string;
54
+ 'profile-picture.unsupported-preview.title': string;
55
+ 'profile-picture.unsupported-preview.description': string;
53
56
  };
54
57
  export default _default;
55
58
  //# sourceMappingURL=da.d.ts.map
@@ -50,6 +50,9 @@ declare const _default: {
50
50
  'ai-avatar.thinking': string;
51
51
  'table.select-all': string;
52
52
  'table.select-row': string;
53
+ 'profile-picture.remove': string;
54
+ 'profile-picture.unsupported-preview.title': string;
55
+ 'profile-picture.unsupported-preview.description': string;
53
56
  };
54
57
  export default _default;
55
58
  //# sourceMappingURL=de.d.ts.map
@@ -50,6 +50,9 @@ declare const _default: {
50
50
  'ai-avatar.thinking': string;
51
51
  'table.select-all': string;
52
52
  'table.select-row': string;
53
+ 'profile-picture.remove': string;
54
+ 'profile-picture.unsupported-preview.title': string;
55
+ 'profile-picture.unsupported-preview.description': string;
53
56
  };
54
57
  export default _default;
55
58
  //# sourceMappingURL=en.d.ts.map
@@ -50,6 +50,9 @@ declare const _default: {
50
50
  'ai-avatar.thinking': string;
51
51
  'table.select-all': string;
52
52
  'table.select-row': string;
53
+ 'profile-picture.remove': string;
54
+ 'profile-picture.unsupported-preview.title': string;
55
+ 'profile-picture.unsupported-preview.description': string;
53
56
  };
54
57
  export default _default;
55
58
  //# sourceMappingURL=fi.d.ts.map
@@ -50,6 +50,9 @@ declare const _default: {
50
50
  'ai-avatar.thinking': string;
51
51
  'table.select-all': string;
52
52
  'table.select-row': string;
53
+ 'profile-picture.remove': string;
54
+ 'profile-picture.unsupported-preview.title': string;
55
+ 'profile-picture.unsupported-preview.description': string;
53
56
  };
54
57
  export default _default;
55
58
  //# sourceMappingURL=fr.d.ts.map
@@ -50,6 +50,9 @@ declare const _default: {
50
50
  'ai-avatar.thinking': string;
51
51
  'table.select-all': string;
52
52
  'table.select-row': string;
53
+ 'profile-picture.remove': string;
54
+ 'profile-picture.unsupported-preview.title': string;
55
+ 'profile-picture.unsupported-preview.description': string;
53
56
  };
54
57
  export default _default;
55
58
  //# sourceMappingURL=nl.d.ts.map
@@ -50,6 +50,9 @@ declare const _default: {
50
50
  'ai-avatar.thinking': string;
51
51
  'table.select-all': string;
52
52
  'table.select-row': string;
53
+ 'profile-picture.remove': string;
54
+ 'profile-picture.unsupported-preview.title': string;
55
+ 'profile-picture.unsupported-preview.description': string;
53
56
  };
54
57
  export default _default;
55
58
  //# sourceMappingURL=no.d.ts.map
@@ -50,6 +50,9 @@ declare const _default: {
50
50
  'ai-avatar.thinking': string;
51
51
  'table.select-all': string;
52
52
  'table.select-row': string;
53
+ 'profile-picture.remove': string;
54
+ 'profile-picture.unsupported-preview.title': string;
55
+ 'profile-picture.unsupported-preview.description': string;
53
56
  };
54
57
  export default _default;
55
58
  //# sourceMappingURL=sv.d.ts.map