@limetech/lime-crm-building-blocks 1.95.0 → 1.96.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 (122) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/limebb-document-item.cjs.entry.js +174 -0
  4. package/dist/cjs/limebb-document-picker.cjs.entry.js +82 -0
  5. package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  15. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  17. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  18. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  20. package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -23
  21. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/cjs/random-string-aac0a74b.js +24 -0
  24. package/dist/collection/collection-manifest.json +2 -0
  25. package/dist/collection/components/document-picker/document-item/document-item.css +64 -0
  26. package/dist/collection/components/document-picker/document-item/document-item.js +265 -0
  27. package/dist/collection/components/document-picker/document-item/document-item.types.js +1 -0
  28. package/dist/collection/components/document-picker/document-picker.css +139 -0
  29. package/dist/collection/components/document-picker/document-picker.js +304 -0
  30. package/dist/collection/components/document-picker/document.types.js +1 -0
  31. package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
  32. package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
  33. package/dist/collection/components/feed/feed.js +1 -1
  34. package/dist/collection/components/icon-picker/icon-picker.js +1 -1
  35. package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
  36. package/dist/collection/components/info-tile/info-tile.js +1 -1
  37. package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
  38. package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
  39. package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
  40. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  41. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  42. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  43. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  44. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  45. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  46. package/dist/collection/components/text-editor/text-editor.js +1 -1
  47. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  48. package/dist/collection/util/format-bytes.js +36 -0
  49. package/dist/components/document-item.js +190 -0
  50. package/dist/components/feed-item-thumbnail-file-info.js +1 -1
  51. package/dist/components/feed-timeline-item.js +1 -1
  52. package/dist/components/kanban-group.js +1 -1
  53. package/dist/components/kanban-item.js +1 -1
  54. package/dist/components/limebb-document-item.d.ts +11 -0
  55. package/dist/components/limebb-document-item.js +6 -0
  56. package/dist/components/limebb-document-picker.d.ts +11 -0
  57. package/dist/components/limebb-document-picker.js +111 -0
  58. package/dist/components/limebb-feed.js +1 -1
  59. package/dist/components/limebb-icon-picker.js +1 -1
  60. package/dist/components/limebb-info-tile-format.js +1 -1
  61. package/dist/components/limebb-info-tile.js +1 -1
  62. package/dist/components/limebb-lime-query-builder.js +1 -1
  63. package/dist/components/limebb-locale-picker.js +1 -1
  64. package/dist/components/limebb-mention-group-counter.js +2 -2
  65. package/dist/components/limebb-percentage-visualizer.js +2 -2
  66. package/dist/components/limebb-text-editor.js +2 -22
  67. package/dist/components/limebb-trend-indicator.js +1 -1
  68. package/dist/components/live-docs-info.js +2 -2
  69. package/dist/components/notification-item.js +1 -1
  70. package/dist/components/random-string.js +22 -0
  71. package/dist/components/summary-popover.js +3 -3
  72. package/dist/esm/lime-crm-building-blocks.js +1 -1
  73. package/dist/esm/limebb-document-item.entry.js +170 -0
  74. package/dist/esm/limebb-document-picker.entry.js +78 -0
  75. package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
  76. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  77. package/dist/esm/limebb-feed.entry.js +1 -1
  78. package/dist/esm/limebb-icon-picker.entry.js +1 -1
  79. package/dist/esm/limebb-info-tile-format.entry.js +1 -1
  80. package/dist/esm/limebb-info-tile.entry.js +1 -1
  81. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  82. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  83. package/dist/esm/limebb-lime-query-builder.entry.js +1 -1
  84. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  85. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  86. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  87. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  88. package/dist/esm/limebb-notification-item.entry.js +1 -1
  89. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  90. package/dist/esm/limebb-text-editor.entry.js +2 -22
  91. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/random-string-f6ef6fbf.js +22 -0
  94. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  95. package/dist/lime-crm-building-blocks/{p-7ef3bace.entry.js → p-00e7e0d4.entry.js} +1 -1
  96. package/dist/lime-crm-building-blocks/p-11ac105b.entry.js +1 -0
  97. package/dist/lime-crm-building-blocks/p-4a82410e.entry.js +1 -0
  98. package/dist/lime-crm-building-blocks/{p-a694aae5.entry.js → p-50d3d61a.entry.js} +1 -1
  99. package/dist/lime-crm-building-blocks/{p-4ccce5cc.entry.js → p-5abe3fff.entry.js} +1 -1
  100. package/dist/lime-crm-building-blocks/{p-a44f543c.entry.js → p-61282e1a.entry.js} +1 -1
  101. package/dist/lime-crm-building-blocks/{p-16199127.entry.js → p-79d4668a.entry.js} +1 -1
  102. package/dist/lime-crm-building-blocks/{p-047c89de.entry.js → p-7c4bdc1b.entry.js} +1 -1
  103. package/dist/lime-crm-building-blocks/{p-8ef39ab8.entry.js → p-8064cbfb.entry.js} +1 -1
  104. package/dist/lime-crm-building-blocks/{p-88cc5b66.entry.js → p-82d33d43.entry.js} +1 -1
  105. package/dist/lime-crm-building-blocks/{p-d6a07ea4.entry.js → p-85b7291c.entry.js} +1 -1
  106. package/dist/lime-crm-building-blocks/{p-7db8652e.entry.js → p-8664381a.entry.js} +1 -1
  107. package/dist/lime-crm-building-blocks/{p-85e11ff7.entry.js → p-88c64360.entry.js} +1 -1
  108. package/dist/lime-crm-building-blocks/p-9d25ed5a.entry.js +1 -0
  109. package/dist/lime-crm-building-blocks/{p-8dce83ad.entry.js → p-9d9f25da.entry.js} +1 -1
  110. package/dist/lime-crm-building-blocks/{p-516210d4.entry.js → p-beb0d164.entry.js} +1 -1
  111. package/dist/lime-crm-building-blocks/{p-abf1c197.entry.js → p-c9126885.entry.js} +1 -1
  112. package/dist/lime-crm-building-blocks/{p-46d2f604.entry.js → p-e35299e0.entry.js} +1 -1
  113. package/dist/lime-crm-building-blocks/p-fbda77a7.js +1 -0
  114. package/dist/lime-crm-building-blocks/{p-d6af09a8.entry.js → p-ff0b244b.entry.js} +1 -1
  115. package/dist/types/components/document-picker/document-item/document-item.d.ts +46 -0
  116. package/dist/types/components/document-picker/document-item/document-item.types.d.ts +37 -0
  117. package/dist/types/components/document-picker/document-picker.d.ts +80 -0
  118. package/dist/types/components/document-picker/document.types.d.ts +2 -0
  119. package/dist/types/components.d.ts +240 -0
  120. package/dist/types/util/format-bytes.d.ts +20 -0
  121. package/package.json +2 -2
  122. package/dist/lime-crm-building-blocks/p-29346b1a.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as r,h as i,H as o}from"./p-1556b545.js";import{c as a}from"./p-1fba0ade.js";const s=class{constructor(o){e(this,o),this.interact=r(this,"interact",7),this.renderRelations=()=>{var e,r,o;if(null===(r=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===r?void 0:r.length)return i("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderAssigneesAvatar=e=>e.picture?i("img",{loading:"lazy",src:e.picture,alt:e.name.text}):i("limel-icon",{name:e.icon.name,style:{color:`${e.icon.color}`,"background-color":`${e.icon.backgroundColor}`}}),this.createMenuItem=e=>{var r,i;return"separator"in e?e:{value:e,text:null!==(r=e.label)&&void 0!==r?r:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.handleMenuItemSelect=e=>{var r;e.stopPropagation();const i=null===(r=e.detail.value)||void 0===r?void 0:r.command;i&&this.commandbus.handle(i)},this.handleKanbanItemClick=()=>{this.interact.emit(this.item)}}render(){var e,r;return i(o,{key:"15d9b0f4cb7074024a1869ca02e08bc60d6c3153",id:this.item.id.toString(),class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"is-selected":!!(null===(r=this.item)||void 0===r?void 0:r.selected)},style:{"--limebb-kanban-item-color-code":`${this.item.color}`},onClick:this.handleKanbanItemClick},this.renderHeader(),this.renderContent(),this.renderFooter())}renderHeader(){return i("div",{class:"header"},this.renderIcon(),this.renderHeading(),this.renderUnpromotedActionsMenu())}renderIcon(){var e,r,o,a;if(this.item.icon)return i("limel-icon",{class:"icon",badge:!0,name:null!==(r=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==r?r:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderContent(){return i("div",{class:"content"},this.renderValue(),this.renderRelations())}renderHeading(){if(this.item.heading)return i("limel-markdown",{class:"heading",value:this.item.heading})}renderValue(){if(this.item.value)return i("limel-markdown",{class:"body reset-img-height",value:this.item.value})}renderUnpromotedActionsMenu(){var e,r;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon",{class:"actions",name:"menu_2",slot:"trigger",size:"small",id:"item-actions-tooltip"}),i("limel-tooltip",{elementId:"item-actions-tooltip",label:null===(r=this.translator)||void 0===r?void 0:r.get("webclient.more-actions"),openDirection:"top-end"}))}renderFooter(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"footer"},this.renderAssignees())}renderAssignees(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"assignees"},this.item.assignees.map((e=>{var r;return i("limebb-summary-popover",Object.assign({icon:null===(r=e.icon)||void 0===r?void 0:r.name},e.picture&&{image:{src:e.picture,alt:e.name.text||""}},{heading:e.name.text,value:this.createLinkToAssignee(e)}),i("a",{slot:"trigger",class:"assignee",href:e.name.href,title:e.name.text},this.renderAssigneesAvatar(e),i("span",null,e.name.text)))})))}createLinkToAssignee(e){const r=this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+e.name.text+"</b>"});return`<a class="author" href="${e.name.href}" title="${e.name.text}">${r}</a>`}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.CommandBus)}};s.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limebb-kanban-item){position:relative;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem}:host(limebb-kanban-item):before{content:"";display:block;position:absolute;top:1rem;bottom:1rem;right:0;transform:translateX(50%);width:0.25rem;border-radius:1rem;background-color:var(--limebb-kanban-item-color-code)}.content{padding-top:0.25rem;min-height:3rem}.header{display:flex;align-items:flex-start;gap:0.5rem;min-height:1.75rem;padding:0.25rem 0.5rem;border-radius:0.5rem 0.5rem 0 0;background-color:rgb(var(--contrast-300))}.header a{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary);text-decoration:none}.header a:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}.header a:hover{color:rgb(var(--color-teal-light))}.header a:hover:before{opacity:0.3;transform:scale(1)}.heading{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.unpromoted-actions-menu{margin:-0.5rem -0.5rem -0.25rem auto}.body{--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:1rem;display:block;padding-left:0.5rem;padding-right:0.5rem;margin-top:-0.5rem;color:rgb(var(--contrast-1100));max-height:12rem;--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem)}limel-chip-set{--limel-chip-size:1.5rem;display:block;margin-left:-0.5rem;margin-right:0.5rem;padding-bottom:0.5rem}.footer{position:relative;display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.25rem 0.125rem;margin:0 0.25rem;border-top:1px dashed rgb(var(--contrast-300))}.header limel-icon,.footer limel-icon{flex-shrink:0;width:1.25rem;height:1.25rem}.header .actions{margin:0.5rem 0.25rem 0}.header .actions:hover{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)}.header .actions:hover:hover,.header .actions:hover:focus,.header .actions:hover:focus-visible{will-change:color, background-color, box-shadow, transform}.header .actions:hover:hover,.header .actions:hover: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)}.header .actions:hover: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)}.header .actions:hover:hover,.header .actions:hover:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.footer img{border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);flex-shrink:0;width:1.25rem;height:1.25rem}.assignees{display:flex;align-items:center;gap:0.25rem}.assignees:has(>:nth-child(2)) span{display:none}.assignees:has(>:nth-child(2)) img,.assignees:has(>:nth-child(2)) limel-icon{margin-right:-0.5rem}.assignees:hover img,.assignees:hover limel-icon,.assignees:focus-within img,.assignees:focus-within limel-icon{margin-right:0rem}.assignees:hover .assignee:not(:hover):not(:focus-visible) img,.assignees:hover .assignee:not(:hover):not(:focus-visible) limel-icon,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) img,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) limel-icon{filter:grayscale(1);opacity:0.6}.assignee{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;align-items:center;text-decoration:none;gap:0.25rem;margin-left:0;border-radius:1rem}.assignee:hover,.assignee:focus,.assignee:focus-visible{will-change:color, background-color, box-shadow, transform}.assignee:hover,.assignee:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.assignee:hover{box-shadow:var(--button-shadow-hovered)}.assignee: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)}.assignee:hover,.assignee:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.assignee:focus{outline:none}.assignee:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.assignee limel-icon,.assignee img{transition:margin 0.2s ease, opacity 0.2s ease, filter 0.2s ease}.assignee limel-icon{padding:0.125rem;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);background-color:rgb(var(--contrast-100))}.assignee span{font-size:0.75rem;color:rgb(var(--contrast-900));padding-right:0.5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';export{s as limebb_kanban_item}
1
+ import{r as e,c as r,h as i,H as o}from"./p-1556b545.js";import{c as a}from"./p-1fba0ade.js";const s=class{constructor(o){e(this,o),this.interact=r(this,"interact",7),this.renderRelations=()=>{var e,r,o;if(null===(r=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===r?void 0:r.length)return i("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderAssigneesAvatar=e=>e.picture?i("img",{loading:"lazy",src:e.picture,alt:e.name.text}):i("limel-icon",{name:e.icon.name,style:{color:`${e.icon.color}`,"background-color":`${e.icon.backgroundColor}`}}),this.createMenuItem=e=>{var r,i;return"separator"in e?e:{value:e,text:null!==(r=e.label)&&void 0!==r?r:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.handleMenuItemSelect=e=>{var r;e.stopPropagation();const i=null===(r=e.detail.value)||void 0===r?void 0:r.command;i&&this.commandbus.handle(i)},this.handleKanbanItemClick=()=>{this.interact.emit(this.item)}}render(){var e,r;return i(o,{key:"4219ff4f6c63ffdf95d24ad12000c4e23b1b53c2",id:this.item.id.toString(),class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"is-selected":!!(null===(r=this.item)||void 0===r?void 0:r.selected)},style:{"--limebb-kanban-item-color-code":`${this.item.color}`},onClick:this.handleKanbanItemClick},this.renderHeader(),this.renderContent(),this.renderFooter())}renderHeader(){return i("div",{class:"header"},this.renderIcon(),this.renderHeading(),this.renderUnpromotedActionsMenu())}renderIcon(){var e,r,o,a;if(this.item.icon)return i("limel-icon",{class:"icon",badge:!0,name:null!==(r=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==r?r:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderContent(){return i("div",{class:"content"},this.renderValue(),this.renderRelations())}renderHeading(){if(this.item.heading)return i("limel-markdown",{class:"heading",value:this.item.heading})}renderValue(){if(this.item.value)return i("limel-markdown",{class:"body reset-img-height",value:this.item.value})}renderUnpromotedActionsMenu(){var e,r;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon",{class:"actions",name:"menu_2",slot:"trigger",size:"small",id:"item-actions-tooltip"}),i("limel-tooltip",{elementId:"item-actions-tooltip",label:null===(r=this.translator)||void 0===r?void 0:r.get("webclient.more-actions"),openDirection:"top-end"}))}renderFooter(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"footer"},this.renderAssignees())}renderAssignees(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"assignees"},this.item.assignees.map((e=>{var r;return i("limebb-summary-popover",Object.assign({icon:null===(r=e.icon)||void 0===r?void 0:r.name},e.picture&&{image:{src:e.picture,alt:e.name.text||""}},{heading:e.name.text,value:this.createLinkToAssignee(e)}),i("a",{slot:"trigger",class:"assignee",href:e.name.href,title:e.name.text},this.renderAssigneesAvatar(e),i("span",null,e.name.text)))})))}createLinkToAssignee(e){const r=this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+e.name.text+"</b>"});return`<a class="author" href="${e.name.href}" title="${e.name.text}">${r}</a>`}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.CommandBus)}};s.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limebb-kanban-item){position:relative;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem}:host(limebb-kanban-item):before{content:"";display:block;position:absolute;top:1rem;bottom:1rem;right:0;transform:translateX(50%);width:0.25rem;border-radius:1rem;background-color:var(--limebb-kanban-item-color-code)}.content{padding-top:0.25rem;min-height:3rem}.header{display:flex;align-items:flex-start;gap:0.5rem;min-height:1.75rem;padding:0.25rem 0.5rem;border-radius:0.5rem 0.5rem 0 0;background-color:rgb(var(--contrast-300))}.header a{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary);text-decoration:none}.header a:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}.header a:hover{color:rgb(var(--color-teal-light))}.header a:hover:before{opacity:0.3;transform:scale(1)}.heading{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.unpromoted-actions-menu{margin:-0.5rem -0.5rem -0.25rem auto}.body{--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:1rem;display:block;padding-left:0.5rem;padding-right:0.5rem;margin-top:-0.5rem;color:rgb(var(--contrast-1100));max-height:12rem;--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem)}limel-chip-set{--limel-chip-size:1.5rem;display:block;margin-left:-0.5rem;margin-right:0.5rem;padding-bottom:0.5rem}.footer{position:relative;display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.25rem 0.125rem;margin:0 0.25rem;border-top:1px dashed rgb(var(--contrast-300))}.header limel-icon,.footer limel-icon{flex-shrink:0;width:1.25rem;height:1.25rem}.header .actions{margin:0.5rem 0.25rem 0}.header .actions:hover{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)}.header .actions:hover:hover,.header .actions:hover:focus,.header .actions:hover:focus-visible{will-change:color, background-color, box-shadow, transform}.header .actions:hover:hover,.header .actions:hover: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)}.header .actions:hover: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)}.header .actions:hover:hover,.header .actions:hover:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.footer img{border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);flex-shrink:0;width:1.25rem;height:1.25rem}.assignees{display:flex;align-items:center;gap:0.25rem}.assignees:has(>:nth-child(2)) span{display:none}.assignees:has(>:nth-child(2)) img,.assignees:has(>:nth-child(2)) limel-icon{margin-right:-0.5rem}.assignees:hover img,.assignees:hover limel-icon,.assignees:focus-within img,.assignees:focus-within limel-icon{margin-right:0rem}.assignees:hover .assignee:not(:hover):not(:focus-visible) img,.assignees:hover .assignee:not(:hover):not(:focus-visible) limel-icon,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) img,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) limel-icon{filter:grayscale(1);opacity:0.6}.assignee{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;align-items:center;text-decoration:none;gap:0.25rem;margin-left:0;border-radius:1rem}.assignee:hover,.assignee:focus,.assignee:focus-visible{will-change:color, background-color, box-shadow, transform}.assignee:hover,.assignee:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.assignee:hover{box-shadow:var(--button-shadow-hovered)}.assignee: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)}.assignee:hover,.assignee:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.assignee:focus{outline:none}.assignee:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.assignee limel-icon,.assignee img{transition:margin 0.2s ease, opacity 0.2s ease, filter 0.2s ease}.assignee limel-icon{padding:0.125rem;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);background-color:rgb(var(--contrast-100))}.assignee span{font-size:0.75rem;color:rgb(var(--contrast-900));padding-right:0.5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';export{s as limebb_kanban_item}
@@ -1 +1 @@
1
- import{r as e,h as t,H as i,g as o}from"./p-1556b545.js";import{c as r}from"./p-1fba0ade.js";const a=class{constructor(i){e(this,i),this.ui="standard",this.hasError=!1,this.isBundled=!1,this.headingCanExpand=!1,this.isHeadingExpanded=!1,this.showMore=!1,this.isTall=!1,this.collapsibleButtonId="a"+crypto.randomUUID(),this.setHeaderCollapsible=()=>{this.headingParagraphElement&&(this.headingCanExpand=this.isTextTruncated(this.headingParagraphElement))},this.bodyTextTall=e=>{if(!(null==e?void 0:e.length))return;const t=e[0].contentRect.height;this.isTall=t>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=t)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return t("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,i,o;if(null===(i=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===i?void 0:i.length)return t("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,i;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},t("limel-icon",{name:"angle_up"})),t("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.renderThumbnailCard=e=>{const{href:i,image:o,filename:r}=e;if(!o&&!r)return;const a="thumb-"+crypto.randomUUID();return[t("a",{class:"thumbnail-card-link",id:a,key:a,href:i||void 0},t("limel-card",{image:o,clickable:!!i},t("limebb-feed-item-thumbnail-file-info",{slot:"component",description:r})),this.showThumbnailTooltip(e,a))]},this.setBodyTextElement=e=>{this.bodyTextElement=e},this.toggleShowMore=()=>{this.showMore=!this.showMore,this.showMore||this.el.offsetHeight>=window.innerHeight&&this.el.scrollIntoView({behavior:"auto"})},this.toggleHeadingExpansion=()=>{this.isHeadingExpanded=!this.isHeadingExpanded},this.createMenuItem=e=>{var t,i;return"separator"in e?e:{value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let o={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?o=Object.assign(Object.assign({},o),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:o.text,iconOnly:!0}):e.icon&&(o=Object.assign(Object.assign({},o),{icon:e.icon})),o},this.handleMenuItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)},this.handleActionBarItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)}}componentDidLoad(){var e,t;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".heading");this.headingParagraphElement=null===(t=null==i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector("p"),this.headingParagraphElement&&(this.headingResizeObserver=new ResizeObserver(this.setHeaderCollapsible),this.headingResizeObserver.observe(this.headingParagraphElement)),this.bodyTextElement&&(this.bodyResizeObserver=new ResizeObserver(this.bodyTextTall),this.bodyResizeObserver.observe(this.bodyTextElement))}disconnectedCallback(){var e;null===(e=this.bodyResizeObserver)||void 0===e||e.disconnect()}render(){var e,o;const r=`helper-text-${this.item.id}`;return t(i,{key:"fcf4ac09958d87a2173381127bcbb589494923f5",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(o=this.item.author)||void 0===o?void 0:o.picture),"shows-less":!this.showMore,"expanded-heading":this.isHeadingExpanded,"shows-more":this.showMore,"is-tall":this.isTall},style:{"--body-text-height":`${this.bodyTextHeight}`,"--color-code":`${this.item.color}`},"aria-describedby":this.helperText?r:void 0,tabindex:"-1"},this.renderBadgeAndTimestamp(),this.renderContent(r))}renderBadgeAndTimestamp(){return t("div",{class:"left"},t("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),t("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,i,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return t("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(i=this.item.icon)||void 0===i?void 0:i.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}getIconName(){const{ui:e,icon:t}=this.item;return"error-message"===e?"error":(null==t?void 0:t.name)||"dot_circle"}renderContent(e){return t("div",{class:"right"},t("div",{class:"content"},this.renderThreadEffects(),this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderThumbnails(),this.renderRelations(),this.renderHelperText(e)),this.renderPromotedActions())}renderThreadEffects(){if(this.isThreadMessage)return t("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return t("span",{class:"helper-text",id:e},this.helperText)}renderAuthor(){if(this.item.author&&(!this.isBundled||this.item.heading)){if("string"==typeof this.item.author.name)return t("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:i,text:o}=this.item.author.name;return t("a",{class:"author",href:e,title:i},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:i}=this.item,o=this.getAuthorName(i),r=this.createLinkToAuthor(i);return t("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},t("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[t("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading})]}renderValue(){var e;if(this.item.value)return[t("div",{class:"markdown-container"},t("limel-markdown",{class:{"body-text":!0,opened:this.showMore,"no-table-styles":!(null===(e=this.item)||void 0===e?void 0:e.hasDefaultTableStyles),"reset-img-height":!0},value:this.item.value,lazyLoadImages:!0,ref:this.setBodyTextElement,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]}]}),this.renderShowMoreButton())]}renderThumbnails(){var e;const i=null===(e=this.item)||void 0===e?void 0:e.thumbnails;if(null==i?void 0:i.length)return t("div",{class:"thumbnails-grid",role:"group"},i.map(this.renderThumbnailCard))}showThumbnailTooltip(e,i){var o;const{href:r,filename:a}=e;if(r)return t("limel-tooltip",{elementId:i,label:(null===(o=this.translator)||void 0===o?void 0:o.get("webclient.go-to-context-label",{context:a}))||a})}getAuthorName(e){return"string"==typeof e.name?e.name:e.name.text}createLinkToAuthor(e){if("object"!=typeof e.name)return;const{href:t,title:i,text:o}=e.name;return`<a class="author" href="${t}" title="${i}">${this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+o+"</b>"})}</a>`}isTextTruncated(e){return e.offsetWidth<e.scrollWidth}renderShowMoreButton(){if(this.isTall)return[t("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},t("limel-icon",{name:"angle_down"})),t("limel-tooltip",{label:this.toggleShowMoreLabel(),elementId:"show-more-button",openDirection:"top"})]}toggleShowMoreLabel(){var e,t;return this.showMore?null===(e=this.translator)||void 0===e?void 0:e.get("webclient.show-less"):null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-more")}renderUnpromotedActionsMenu(){var e,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return t("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},t("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const i=this.item.promotedActions.map(this.createActionBarItem);return t("div",{class:"action-bar"},t("div",{class:"action-bar-hider"},t("limel-action-bar",{accessibleLabel:"Action bar",actions:i,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return o(this)}};a.style='@charset "UTF-8";limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:"";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-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);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover,#show-more-button:focus,#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}#show-more-button:hover,#show-more-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)}#show-more-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)}#show-more-button:hover,#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[ui=thread-message]){padding:0.25rem 0}:host(limebb-feed-timeline-item[ui=thread-message]) .content{border-radius:0;box-shadow:var(--button-shadow-normal);margin-bottom:0.25rem;background-color:var(--lime-elevated-surface-background-color)}:host(limebb-feed-timeline-item[ui=thread-message]) .header{padding-bottom:0.75rem;margin-bottom:0.25rem}:host(limebb-feed-timeline-item[ui=thread-message]) .header:before{content:"";position:absolute;top:calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);left:calc(var(--limebb-feed-item-paddings) * -1);right:calc(var(--limebb-feed-item-paddings) * -1);bottom:0;pointer-events:none;border-bottom:1px dashed rgb(var(--contrast-600))}:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects{transition:transform 0.2s ease;pointer-events:none;content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;box-shadow:var(--button-shadow-normal);transform:translate3d(-0.225rem, -0.125rem, 0) rotate(0.5deg);background-color:rgb(var(--contrast-300))}:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text{--body-text-min-height-set-by-code:3rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem);max-height:35rem}:host(limebb-feed-timeline-item.is-tall[ui=thread-message].shows-more) .body-text{overflow-y:auto}:host(limebb-feed-timeline-item[ui=error-message]) .icon{color:rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[ui=error-message]) .content{border:1px dashed rgb(var(--color-red-light));background-color:rgb(var(--color-red-lighter), 0.2)}.content{position:relative}.content:before,.content:after{content:"";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}:host(limebb-feed-timeline-item[ui=thread-message]) .content:before{top:0.25rem;bottom:unset;height:1.75rem}*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate;border-radius:0.5rem}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus),:host(limebb-feed-timeline-item:focus-within){--limebb-feed-item-timeline-color:var(--mdc-theme-primary);--limebb-feed-item-timestamp-color:var(--mdc-theme-primary)}.left:before{transition:background-color 0.2s ease;content:"";position:absolute;z-index:-1;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;border-radius:1rem;background-color:var(--limebb-feed-item-timeline-color, rgb(var(--contrast-600)))}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{position:relative;display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{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:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover,button.expand-heading:focus,button.expand-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-heading:hover,button.expand-heading:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color)}button.expand-heading:hover{box-shadow:var(--button-shadow-hovered)}button.expand-heading: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)}button.expand-heading:hover,button.expand-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading{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);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover,button.collapse-heading:focus,button.collapse-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.collapse-heading:hover,button.collapse-heading: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)}button.collapse-heading: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)}button.collapse-heading:hover,button.collapse-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);display:flex;flex-direction:column;align-items:center;gap:0.25rem;font-size:0.75rem;text-align:center;color:var(--limebb-feed-item-timestamp-color, rgb(var(--contrast-800)));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem;border-radius:1rem}.timestamp:after{width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--color-red-default))}:host(.is-new) .timestamp:after{content:""}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{cursor:help;border-radius:50%;width:2rem;height:2rem;object-fit:cover;background-color:var(--limebb-feed-background-color);box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--limel-chip-size:1.5rem;--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}.helper-text{transition:opacity 0.2s ease;opacity:0.6;font-size:x-small;margin-top:0.5rem;margin-bottom:-0.25rem}:host(limebb-feed-timeline-item:hover) .helper-text,:host(limebb-feed-timeline-item:focus-within) .helper-text{opacity:1}.thumbnail-card-link{--card-border-radius:0.5rem;border-radius:var(--card-border-radius);text-decoration:none;display:inline-block}.thumbnail-card-link:focus{outline:none}.thumbnail-card-link:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.thumbnails-grid{display:block;width:100%;padding:0.25rem 0;columns:10rem;gap:clamp(0.25rem, 2vmin, 0.75rem)}.thumbnails-grid>.thumbnail-card-link{display:block;break-inside:avoid;margin-bottom:clamp(0.25rem, 2vmin, 0.75rem)}@supports (grid-template-rows: masonry){.thumbnails-grid{column-width:initial;column-gap:initial;display:grid;grid-template-columns:repeat(auto-fill, minmax(10rem, 1fr));grid-template-rows:masonry;grid-auto-flow:dense;gap:0.5rem}.thumbnails-grid>.thumbnail-card-link{display:block;width:auto;margin:0;break-inside:auto}}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .left:before{background-color:rgb(var(--color-red-default));box-shadow:0 0 0 1px rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) img,:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .icon{box-shadow:var(--shadow-error-state)}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}';export{a as limebb_feed_timeline_item}
1
+ import{r as e,h as t,H as i,g as o}from"./p-1556b545.js";import{c as r}from"./p-1fba0ade.js";const a=class{constructor(i){e(this,i),this.ui="standard",this.hasError=!1,this.isBundled=!1,this.headingCanExpand=!1,this.isHeadingExpanded=!1,this.showMore=!1,this.isTall=!1,this.collapsibleButtonId="a"+crypto.randomUUID(),this.setHeaderCollapsible=()=>{this.headingParagraphElement&&(this.headingCanExpand=this.isTextTruncated(this.headingParagraphElement))},this.bodyTextTall=e=>{if(!(null==e?void 0:e.length))return;const t=e[0].contentRect.height;this.isTall=t>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=t)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return t("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,i,o;if(null===(i=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===i?void 0:i.length)return t("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,i;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},t("limel-icon",{name:"angle_up"})),t("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.renderThumbnailCard=e=>{const{href:i,image:o,filename:r}=e;if(!o&&!r)return;const a="thumb-"+crypto.randomUUID();return[t("a",{class:"thumbnail-card-link",id:a,key:a,href:i||void 0},t("limel-card",{image:o,clickable:!!i},t("limebb-feed-item-thumbnail-file-info",{slot:"component",description:r})),this.showThumbnailTooltip(e,a))]},this.setBodyTextElement=e=>{this.bodyTextElement=e},this.toggleShowMore=()=>{this.showMore=!this.showMore,this.showMore||this.el.offsetHeight>=window.innerHeight&&this.el.scrollIntoView({behavior:"auto"})},this.toggleHeadingExpansion=()=>{this.isHeadingExpanded=!this.isHeadingExpanded},this.createMenuItem=e=>{var t,i;return"separator"in e?e:{value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let o={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?o=Object.assign(Object.assign({},o),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:o.text,iconOnly:!0}):e.icon&&(o=Object.assign(Object.assign({},o),{icon:e.icon})),o},this.handleMenuItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)},this.handleActionBarItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)}}componentDidLoad(){var e,t;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".heading");this.headingParagraphElement=null===(t=null==i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector("p"),this.headingParagraphElement&&(this.headingResizeObserver=new ResizeObserver(this.setHeaderCollapsible),this.headingResizeObserver.observe(this.headingParagraphElement)),this.bodyTextElement&&(this.bodyResizeObserver=new ResizeObserver(this.bodyTextTall),this.bodyResizeObserver.observe(this.bodyTextElement))}disconnectedCallback(){var e;null===(e=this.bodyResizeObserver)||void 0===e||e.disconnect()}render(){var e,o;const r=`helper-text-${this.item.id}`;return t(i,{key:"ae530cfe3aa5c54f8c1d3ceae6630b606f5ca57f",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(o=this.item.author)||void 0===o?void 0:o.picture),"shows-less":!this.showMore,"expanded-heading":this.isHeadingExpanded,"shows-more":this.showMore,"is-tall":this.isTall},style:{"--body-text-height":`${this.bodyTextHeight}`,"--color-code":`${this.item.color}`},"aria-describedby":this.helperText?r:void 0,tabindex:"-1"},this.renderBadgeAndTimestamp(),this.renderContent(r))}renderBadgeAndTimestamp(){return t("div",{class:"left"},t("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),t("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,i,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return t("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(i=this.item.icon)||void 0===i?void 0:i.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}getIconName(){const{ui:e,icon:t}=this.item;return"error-message"===e?"error":(null==t?void 0:t.name)||"dot_circle"}renderContent(e){return t("div",{class:"right"},t("div",{class:"content"},this.renderThreadEffects(),this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderThumbnails(),this.renderRelations(),this.renderHelperText(e)),this.renderPromotedActions())}renderThreadEffects(){if(this.isThreadMessage)return t("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return t("span",{class:"helper-text",id:e},this.helperText)}renderAuthor(){if(this.item.author&&(!this.isBundled||this.item.heading)){if("string"==typeof this.item.author.name)return t("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:i,text:o}=this.item.author.name;return t("a",{class:"author",href:e,title:i},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:i}=this.item,o=this.getAuthorName(i),r=this.createLinkToAuthor(i);return t("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},t("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[t("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading})]}renderValue(){var e;if(this.item.value)return[t("div",{class:"markdown-container"},t("limel-markdown",{class:{"body-text":!0,opened:this.showMore,"no-table-styles":!(null===(e=this.item)||void 0===e?void 0:e.hasDefaultTableStyles),"reset-img-height":!0},value:this.item.value,lazyLoadImages:!0,ref:this.setBodyTextElement,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]}]}),this.renderShowMoreButton())]}renderThumbnails(){var e;const i=null===(e=this.item)||void 0===e?void 0:e.thumbnails;if(null==i?void 0:i.length)return t("div",{class:"thumbnails-grid",role:"group"},i.map(this.renderThumbnailCard))}showThumbnailTooltip(e,i){var o;const{href:r,filename:a}=e;if(r)return t("limel-tooltip",{elementId:i,label:(null===(o=this.translator)||void 0===o?void 0:o.get("webclient.go-to-context-label",{context:a}))||a})}getAuthorName(e){return"string"==typeof e.name?e.name:e.name.text}createLinkToAuthor(e){if("object"!=typeof e.name)return;const{href:t,title:i,text:o}=e.name;return`<a class="author" href="${t}" title="${i}">${this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+o+"</b>"})}</a>`}isTextTruncated(e){return e.offsetWidth<e.scrollWidth}renderShowMoreButton(){if(this.isTall)return[t("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},t("limel-icon",{name:"angle_down"})),t("limel-tooltip",{label:this.toggleShowMoreLabel(),elementId:"show-more-button",openDirection:"top"})]}toggleShowMoreLabel(){var e,t;return this.showMore?null===(e=this.translator)||void 0===e?void 0:e.get("webclient.show-less"):null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-more")}renderUnpromotedActionsMenu(){var e,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return t("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},t("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const i=this.item.promotedActions.map(this.createActionBarItem);return t("div",{class:"action-bar"},t("div",{class:"action-bar-hider"},t("limel-action-bar",{accessibleLabel:"Action bar",actions:i,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return o(this)}};a.style='@charset "UTF-8";limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:"";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-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);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover,#show-more-button:focus,#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}#show-more-button:hover,#show-more-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)}#show-more-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)}#show-more-button:hover,#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[ui=thread-message]){padding:0.25rem 0}:host(limebb-feed-timeline-item[ui=thread-message]) .content{border-radius:0;box-shadow:var(--button-shadow-normal);margin-bottom:0.25rem;background-color:var(--lime-elevated-surface-background-color)}:host(limebb-feed-timeline-item[ui=thread-message]) .header{padding-bottom:0.75rem;margin-bottom:0.25rem}:host(limebb-feed-timeline-item[ui=thread-message]) .header:before{content:"";position:absolute;top:calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);left:calc(var(--limebb-feed-item-paddings) * -1);right:calc(var(--limebb-feed-item-paddings) * -1);bottom:0;pointer-events:none;border-bottom:1px dashed rgb(var(--contrast-600))}:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects{transition:transform 0.2s ease;pointer-events:none;content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;box-shadow:var(--button-shadow-normal);transform:translate3d(-0.225rem, -0.125rem, 0) rotate(0.5deg);background-color:rgb(var(--contrast-300))}:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text{--body-text-min-height-set-by-code:3rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem);max-height:35rem}:host(limebb-feed-timeline-item.is-tall[ui=thread-message].shows-more) .body-text{overflow-y:auto}:host(limebb-feed-timeline-item[ui=error-message]) .icon{color:rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[ui=error-message]) .content{border:1px dashed rgb(var(--color-red-light));background-color:rgb(var(--color-red-lighter), 0.2)}.content{position:relative}.content:before,.content:after{content:"";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}:host(limebb-feed-timeline-item[ui=thread-message]) .content:before{top:0.25rem;bottom:unset;height:1.75rem}*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate;border-radius:0.5rem}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus),:host(limebb-feed-timeline-item:focus-within){--limebb-feed-item-timeline-color:var(--mdc-theme-primary);--limebb-feed-item-timestamp-color:var(--mdc-theme-primary)}.left:before{transition:background-color 0.2s ease;content:"";position:absolute;z-index:-1;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;border-radius:1rem;background-color:var(--limebb-feed-item-timeline-color, rgb(var(--contrast-600)))}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{position:relative;display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{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:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover,button.expand-heading:focus,button.expand-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-heading:hover,button.expand-heading:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color)}button.expand-heading:hover{box-shadow:var(--button-shadow-hovered)}button.expand-heading: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)}button.expand-heading:hover,button.expand-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading{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);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover,button.collapse-heading:focus,button.collapse-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.collapse-heading:hover,button.collapse-heading: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)}button.collapse-heading: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)}button.collapse-heading:hover,button.collapse-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);display:flex;flex-direction:column;align-items:center;gap:0.25rem;font-size:0.75rem;text-align:center;color:var(--limebb-feed-item-timestamp-color, rgb(var(--contrast-800)));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem;border-radius:1rem}.timestamp:after{width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--color-red-default))}:host(.is-new) .timestamp:after{content:""}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{cursor:help;border-radius:50%;width:2rem;height:2rem;object-fit:cover;background-color:var(--limebb-feed-background-color);box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--limel-chip-size:1.5rem;--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}.helper-text{transition:opacity 0.2s ease;opacity:0.6;font-size:x-small;margin-top:0.5rem;margin-bottom:-0.25rem}:host(limebb-feed-timeline-item:hover) .helper-text,:host(limebb-feed-timeline-item:focus-within) .helper-text{opacity:1}.thumbnail-card-link{--card-border-radius:0.5rem;border-radius:var(--card-border-radius);text-decoration:none;display:inline-block}.thumbnail-card-link:focus{outline:none}.thumbnail-card-link:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.thumbnails-grid{display:block;width:100%;padding:0.25rem 0;columns:10rem;gap:clamp(0.25rem, 2vmin, 0.75rem)}.thumbnails-grid>.thumbnail-card-link{display:block;break-inside:avoid;margin-bottom:clamp(0.25rem, 2vmin, 0.75rem)}@supports (grid-template-rows: masonry){.thumbnails-grid{column-width:initial;column-gap:initial;display:grid;grid-template-columns:repeat(auto-fill, minmax(10rem, 1fr));grid-template-rows:masonry;grid-auto-flow:dense;gap:0.5rem}.thumbnails-grid>.thumbnail-card-link{display:block;width:auto;margin:0;break-inside:auto}}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .left:before{background-color:rgb(var(--color-red-default));box-shadow:0 0 0 1px rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) img,:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .icon{box-shadow:var(--shadow-error-state)}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}';export{a as limebb_feed_timeline_item}
@@ -1 +1 @@
1
- import{r as o,h as r,H as t}from"./p-1556b545.js";import{g as e}from"./p-10e16feb.js";const a=class{valueChanged(o){this.numValue=this.parseValue(o)}constructor(t){o(this,t),this.suffix="%",this.reducePresence=!0,this.labelId="a"+crypto.randomUUID(),this.tooltipId="a"+crypto.randomUUID(),this.helperTextId="a"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}render(){return r(t,{key:"e3f051b38577e06c5b31fe18558747e9476ca7bd",class:this.getContainerClassList()},r("limel-notched-outline",{key:"2d7eed12e714dcbdd4d7fa366c7ab5079d0e0c79",id:this.tooltipId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,"aria-controls":this.helperTextId},r("div",{key:"13f6acd297b66716dca8581d99fb129fb1dec035",slot:"content",tabIndex:0},this.renderVisualization())),this.renderHelperLine(),this.renderTooltip())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[this.getArrowIcon(),r("span",null,this.renderGrowthPercentage(),this.renderGrowthAmount())]:r("span",{class:"no-value"},"–")}renderTooltip(){if(void 0===this.formerValue)return;const o=`${this.value} - ${this.formerValue>0?this.formerValue:"("+this.formerValue+")"} = ${this.calculateGrowth()} ${this.suffix} `,t=this.calculatePercentage();return r("limel-tooltip",{openDirection:"top-start",elementId:this.tooltipId,label:t+"%",helperLabel:o})}renderGrowthPercentage(){if(void 0===this.formerValue)return this.formatValue(this.numValue,this.suffix);const o=this.calculatePercentage();return null!==o?this.formatValue(o,"%"):void 0}renderGrowthAmount(){if(void 0===this.formerValue)return;const o=this.calculateGrowth();return r("span",{class:"growth-unit"},"( ",this.formatValue(o,this.suffix)," )")}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const o=this.getPercentage(),r=e(o);return Object.assign({},r&&{[r]:!0})}getPercentage(){return void 0===this.formerValue?this.numValue:this.calculatePercentage()}calculateGrowth(){return this.numValue-this.formerValue}calculatePercentage(){if(0===this.formerValue)return null;const o=((this.numValue-this.formerValue)/Math.abs(this.formerValue)*100).toFixed(2);return Number.parseFloat(o)}unifyMinusSign(o){return o.replaceAll("−","-")}convertToUnicodeMinus(o){return o.replaceAll("-","−")}parseValue(o){return"string"==typeof o?Number.parseFloat(this.unifyMinusSign(o)):o}formatValue(o,r){const t=`${o} ${r}`;return o>0?"+"+t:this.convertToUnicodeMinus(t)}getArrowIcon(){return r("limel-icon",{class:"icon",name:"right","aria-hidden":"true",role:"presentation"})}static get watchers(){return{value:["valueChanged"]}}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-trend-indicator){position:relative;display:block;height:100%;width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-trend-indicator):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}:host(limebb-trend-indicator[former-value]) div[slot=content]{cursor:help}div[slot=content] span{flex-shrink:0}.icon{flex-shrink:0;display:flex;transition-property:color, background-color, transform;transition-duration:0.4s;transition-timing-function:ease;width:1.25rem;height:1.25rem;border-radius:50%;padding:0.12rem;color:rgb(var(--color-white));background-color:rgb(var(--color-gray-default), 0.5)}:host(.has-value-40to30-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-30to20-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-20to10-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-10to0-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-0to10-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-10to20-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-20to30-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-30to40-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-200or-larger-negative) .icon{background-color:rgb(var(--color-red-darker));transform:rotate(90deg)}:host(.has-value-200to100-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-100to90-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-90to80-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(81deg)}:host(.has-value-80to70-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(72deg)}:host(.has-value-70to60-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(63deg)}:host(.has-value-60to50-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(54deg)}:host(.has-value-50to40-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(45deg)}:host(.has-value-40to30-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(36deg)}:host(.has-value-30to20-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(27deg)}:host(.has-value-20to10-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(18deg)}:host(.has-value-10to0-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(9deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default));transform:rotate(0deg)}:host(.has-value-0to10-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-9deg)}:host(.has-value-10to20-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-18deg)}:host(.has-value-20to30-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-27deg)}:host(.has-value-30to40-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-36deg)}:host(.has-value-40to50-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-45deg)}:host(.has-value-50to60-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-54deg)}:host(.has-value-60to70-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-63deg)}:host(.has-value-70to80-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-72deg)}:host(.has-value-80to90-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-81deg)}:host(.has-value-90to100-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-100to200-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-200or-larger-positive) .icon{background-color:rgb(var(--color-teal-darker));transform:rotate(-90deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default), 0.5);transform:rotate(0deg)}:host(.has-value-0) .icon polyline{color:transparent}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:before{transition:border-color 0.6s ease;content:"";position:absolute;inset:0;margin:auto;border:1px solid transparent;border-radius:50%}:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{transform:scale(1.2)}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:after{transform:scale(1.4);opacity:0.4}:host(.has-value-200to100-negative) .icon:before,:host(.has-value-200or-larger-negative) .icon:before{border-color:rgb(var(--color-red-dark))}:host(.has-value-200or-larger-negative) .icon:after{border-color:rgb(var(--color-red-darker))}:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{border-color:rgb(var(--color-teal-dark))}:host(.has-value-200or-larger-positive) .icon:after{border-color:rgb(var(--color-teal-darker))}.no-value{transform:translateY(0.5rem)}.growth-unit{padding-left:0.5rem;opacity:0.5}:host(limebb-trend-indicator:focus),:host(limebb-trend-indicator:focus-visible),:host(limebb-trend-indicator:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-trend-indicator){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-trend-indicator:focus) limel-helper-line,:host(limebb-trend-indicator:focus-visible) limel-helper-line,:host(limebb-trend-indicator:focus-within) limel-helper-line,:host(limebb-trend-indicator:hover) limel-helper-line{will-change:grid-template-rows}';export{a as limebb_trend_indicator}
1
+ import{r as o,h as r,H as e}from"./p-1556b545.js";import{g as t}from"./p-10e16feb.js";const a=class{valueChanged(o){this.numValue=this.parseValue(o)}constructor(e){o(this,e),this.suffix="%",this.reducePresence=!0,this.labelId="a"+crypto.randomUUID(),this.tooltipId="a"+crypto.randomUUID(),this.helperTextId="a"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}render(){return r(e,{key:"295196e1b1e9bf9e45f728341116ef8136a55e0b",class:this.getContainerClassList()},r("limel-notched-outline",{key:"aa9743e91c3891b259379c0802e61631ede2b421",id:this.tooltipId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,"aria-controls":this.helperTextId},r("div",{key:"5cf7728d597bd8c70710c13e251791e14fbf0cf6",slot:"content",tabIndex:0},this.renderVisualization())),this.renderHelperLine(),this.renderTooltip())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[this.getArrowIcon(),r("span",null,this.renderGrowthPercentage(),this.renderGrowthAmount())]:r("span",{class:"no-value"},"–")}renderTooltip(){if(void 0===this.formerValue)return;const o=`${this.value} - ${this.formerValue>0?this.formerValue:"("+this.formerValue+")"} = ${this.calculateGrowth()} ${this.suffix} `,e=this.calculatePercentage();return r("limel-tooltip",{openDirection:"top-start",elementId:this.tooltipId,label:e+"%",helperLabel:o})}renderGrowthPercentage(){if(void 0===this.formerValue)return this.formatValue(this.numValue,this.suffix);const o=this.calculatePercentage();return null!==o?this.formatValue(o,"%"):void 0}renderGrowthAmount(){if(void 0===this.formerValue)return;const o=this.calculateGrowth();return r("span",{class:"growth-unit"},"( ",this.formatValue(o,this.suffix)," )")}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const o=this.getPercentage(),r=t(o);return Object.assign({},r&&{[r]:!0})}getPercentage(){return void 0===this.formerValue?this.numValue:this.calculatePercentage()}calculateGrowth(){return this.numValue-this.formerValue}calculatePercentage(){if(0===this.formerValue)return null;const o=((this.numValue-this.formerValue)/Math.abs(this.formerValue)*100).toFixed(2);return Number.parseFloat(o)}unifyMinusSign(o){return o.replaceAll("−","-")}convertToUnicodeMinus(o){return o.replaceAll("-","−")}parseValue(o){return"string"==typeof o?Number.parseFloat(this.unifyMinusSign(o)):o}formatValue(o,r){const e=`${o} ${r}`;return o>0?"+"+e:this.convertToUnicodeMinus(e)}getArrowIcon(){return r("limel-icon",{class:"icon",name:"right","aria-hidden":"true",role:"presentation"})}static get watchers(){return{value:["valueChanged"]}}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-trend-indicator){position:relative;display:block;height:100%;width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-trend-indicator):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}:host(limebb-trend-indicator[former-value]) div[slot=content]{cursor:help}div[slot=content] span{flex-shrink:0}.icon{flex-shrink:0;display:flex;transition-property:color, background-color, transform;transition-duration:0.4s;transition-timing-function:ease;width:1.25rem;height:1.25rem;border-radius:50%;padding:0.12rem;color:rgb(var(--color-white));background-color:rgb(var(--color-gray-default), 0.5)}:host(.has-value-40to30-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-30to20-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-20to10-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-10to0-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-0to10-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-10to20-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-20to30-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-30to40-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-200or-larger-negative) .icon{background-color:rgb(var(--color-red-darker));transform:rotate(90deg)}:host(.has-value-200to100-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-100to90-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-90to80-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(81deg)}:host(.has-value-80to70-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(72deg)}:host(.has-value-70to60-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(63deg)}:host(.has-value-60to50-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(54deg)}:host(.has-value-50to40-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(45deg)}:host(.has-value-40to30-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(36deg)}:host(.has-value-30to20-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(27deg)}:host(.has-value-20to10-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(18deg)}:host(.has-value-10to0-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(9deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default));transform:rotate(0deg)}:host(.has-value-0to10-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-9deg)}:host(.has-value-10to20-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-18deg)}:host(.has-value-20to30-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-27deg)}:host(.has-value-30to40-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-36deg)}:host(.has-value-40to50-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-45deg)}:host(.has-value-50to60-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-54deg)}:host(.has-value-60to70-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-63deg)}:host(.has-value-70to80-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-72deg)}:host(.has-value-80to90-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-81deg)}:host(.has-value-90to100-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-100to200-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-200or-larger-positive) .icon{background-color:rgb(var(--color-teal-darker));transform:rotate(-90deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default), 0.5);transform:rotate(0deg)}:host(.has-value-0) .icon polyline{color:transparent}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:before{transition:border-color 0.6s ease;content:"";position:absolute;inset:0;margin:auto;border:1px solid transparent;border-radius:50%}:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{transform:scale(1.2)}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:after{transform:scale(1.4);opacity:0.4}:host(.has-value-200to100-negative) .icon:before,:host(.has-value-200or-larger-negative) .icon:before{border-color:rgb(var(--color-red-dark))}:host(.has-value-200or-larger-negative) .icon:after{border-color:rgb(var(--color-red-darker))}:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{border-color:rgb(var(--color-teal-dark))}:host(.has-value-200or-larger-positive) .icon:after{border-color:rgb(var(--color-teal-darker))}.no-value{transform:translateY(0.5rem)}.growth-unit{padding-left:0.5rem;opacity:0.5}:host(limebb-trend-indicator:focus),:host(limebb-trend-indicator:focus-visible),:host(limebb-trend-indicator:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-trend-indicator){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-trend-indicator:focus) limel-helper-line,:host(limebb-trend-indicator:focus-visible) limel-helper-line,:host(limebb-trend-indicator:focus-within) limel-helper-line,:host(limebb-trend-indicator:hover) limel-helper-line{will-change:grid-template-rows}';export{a as limebb_trend_indicator}