@limetech/lime-elements 39.9.3 → 39.9.5

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 (160) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/{device-BhCO7T3N.js → device-CDZCRYph.js} +7 -2
  3. package/dist/cjs/{keycodes-CpIh7o5A.js → keycodes-B75-uKOK.js} +2 -0
  4. package/dist/cjs/lime-elements.cjs.js +1 -1
  5. package/dist/cjs/limel-badge.cjs.entry.js +2 -2
  6. package/dist/cjs/limel-banner.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +17 -5
  8. package/dist/cjs/limel-button-group.cjs.entry.js +1 -1
  9. package/dist/cjs/limel-checkbox.cjs.entry.js +1 -1
  10. package/dist/cjs/limel-chip_2.cjs.entry.js +2 -2
  11. package/dist/cjs/limel-circular-progress.cjs.entry.js +1 -1
  12. package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-date-picker.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
  15. package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +2 -2
  16. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  17. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  18. package/dist/cjs/limel-header.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-help.cjs.entry.js +2 -2
  20. package/dist/cjs/limel-helper-line_2.cjs.entry.js +2 -2
  21. package/dist/cjs/limel-info-tile.cjs.entry.js +2 -2
  22. package/dist/cjs/limel-picker.cjs.entry.js +1 -1
  23. package/dist/cjs/limel-popover_2.cjs.entry.js +5 -5
  24. package/dist/cjs/limel-select.cjs.entry.js +34 -10
  25. package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
  26. package/dist/cjs/limel-snackbar.cjs.entry.js +2 -2
  27. package/dist/cjs/limel-switch.cjs.entry.js +1 -1
  28. package/dist/cjs/limel-tab-bar.cjs.entry.js +2 -2
  29. package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
  30. package/dist/cjs/limel-table.cjs.entry.js +3 -3
  31. package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +1 -1
  32. package/dist/cjs/loader.cjs.js +1 -1
  33. package/dist/collection/components/badge/badge.js +3 -3
  34. package/dist/collection/components/banner/banner.js +2 -2
  35. package/dist/collection/components/button-group/button-group.js +2 -2
  36. package/dist/collection/components/checkbox/checkbox.js +2 -2
  37. package/dist/collection/components/chip-set/chip-set.js +2 -2
  38. package/dist/collection/components/circular-progress/circular-progress.js +2 -2
  39. package/dist/collection/components/code-editor/code-editor.js +2 -2
  40. package/dist/collection/components/dialog/dialog.js +3 -3
  41. package/dist/collection/components/dynamic-label/dynamic-label.js +1 -1
  42. package/dist/collection/components/file/file.js +2 -2
  43. package/dist/collection/components/file-dropzone/file-dropzone.js +2 -2
  44. package/dist/collection/components/file-input/file-input.js +2 -2
  45. package/dist/collection/components/header/header.js +2 -2
  46. package/dist/collection/components/help/help.js +3 -3
  47. package/dist/collection/components/helper-line/helper-line.js +3 -3
  48. package/dist/collection/components/info-tile/info-tile.js +3 -3
  49. package/dist/collection/components/linear-progress/linear-progress.js +1 -1
  50. package/dist/collection/components/list/list.js +2 -2
  51. package/dist/collection/components/menu/menu.js +15 -3
  52. package/dist/collection/components/popover/popover.js +4 -4
  53. package/dist/collection/components/select/select.js +33 -9
  54. package/dist/collection/components/shortcut/shortcut.js +2 -2
  55. package/dist/collection/components/snackbar/snackbar.js +3 -3
  56. package/dist/collection/components/spinner/spinner.js +2 -2
  57. package/dist/collection/components/switch/switch.js +2 -2
  58. package/dist/collection/components/tab-bar/tab-bar.js +3 -3
  59. package/dist/collection/components/tab-panel/tab-panel.js +2 -2
  60. package/dist/collection/components/table/table.js +4 -4
  61. package/dist/collection/util/device.js +26 -2
  62. package/dist/collection/util/hotkeys.js +213 -0
  63. package/dist/collection/util/keycodes.js +2 -0
  64. package/dist/esm/device-CY72JnWG.js +26 -0
  65. package/dist/esm/{keycodes-CxzDbuiY.js → keycodes-rI0IeKpx.js} +2 -0
  66. package/dist/esm/lime-elements.js +1 -1
  67. package/dist/esm/limel-badge.entry.js +2 -2
  68. package/dist/esm/limel-banner.entry.js +1 -1
  69. package/dist/esm/limel-breadcrumbs_7.entry.js +17 -5
  70. package/dist/esm/limel-button-group.entry.js +1 -1
  71. package/dist/esm/limel-checkbox.entry.js +1 -1
  72. package/dist/esm/limel-chip_2.entry.js +2 -2
  73. package/dist/esm/limel-circular-progress.entry.js +1 -1
  74. package/dist/esm/limel-code-editor.entry.js +1 -1
  75. package/dist/esm/limel-date-picker.entry.js +1 -1
  76. package/dist/esm/limel-dialog.entry.js +2 -2
  77. package/dist/esm/limel-file-dropzone_2.entry.js +2 -2
  78. package/dist/esm/limel-file.entry.js +1 -1
  79. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  80. package/dist/esm/limel-header.entry.js +1 -1
  81. package/dist/esm/limel-help.entry.js +2 -2
  82. package/dist/esm/limel-helper-line_2.entry.js +2 -2
  83. package/dist/esm/limel-info-tile.entry.js +2 -2
  84. package/dist/esm/limel-picker.entry.js +1 -1
  85. package/dist/esm/limel-popover_2.entry.js +5 -5
  86. package/dist/esm/limel-select.entry.js +34 -10
  87. package/dist/esm/limel-shortcut.entry.js +1 -1
  88. package/dist/esm/limel-snackbar.entry.js +2 -2
  89. package/dist/esm/limel-switch.entry.js +1 -1
  90. package/dist/esm/limel-tab-bar.entry.js +2 -2
  91. package/dist/esm/limel-tab-panel.entry.js +1 -1
  92. package/dist/esm/limel-table.entry.js +3 -3
  93. package/dist/esm/limel-text-editor-link-menu.entry.js +1 -1
  94. package/dist/esm/loader.js +1 -1
  95. package/dist/lime-elements/lime-elements.esm.js +1 -1
  96. package/dist/lime-elements/{p-eaac5ad2.entry.js → p-0e1c15c8.entry.js} +1 -1
  97. package/dist/lime-elements/{p-db51323c.entry.js → p-1590b341.entry.js} +1 -1
  98. package/dist/lime-elements/{p-518fe33c.entry.js → p-1d4285b1.entry.js} +1 -1
  99. package/dist/lime-elements/{p-57c53ed4.entry.js → p-268d2a30.entry.js} +1 -1
  100. package/dist/lime-elements/{p-1a3a7374.entry.js → p-30e54f05.entry.js} +1 -1
  101. package/dist/lime-elements/{p-444c7966.entry.js → p-607ad3b7.entry.js} +1 -1
  102. package/dist/lime-elements/{p-b6ccc921.entry.js → p-61253dea.entry.js} +1 -1
  103. package/dist/lime-elements/p-62d6a350.entry.js +23 -0
  104. package/dist/lime-elements/{p-2af214de.entry.js → p-6614bbfc.entry.js} +1 -1
  105. package/dist/lime-elements/{p-b3622713.entry.js → p-6e0078f1.entry.js} +1 -1
  106. package/dist/lime-elements/{p-08d1b87a.entry.js → p-6fd84e57.entry.js} +1 -1
  107. package/dist/lime-elements/{p-cdd5b814.entry.js → p-72a4841a.entry.js} +3 -3
  108. package/dist/lime-elements/{p-266c228c.entry.js → p-86a001e2.entry.js} +1 -1
  109. package/dist/lime-elements/{p-aeebf410.entry.js → p-87c5e951.entry.js} +1 -1
  110. package/dist/lime-elements/{p-74cd80a9.entry.js → p-95ed243e.entry.js} +1 -1
  111. package/dist/lime-elements/{p-287c4fb1.entry.js → p-9859b556.entry.js} +1 -1
  112. package/dist/lime-elements/p-9d51583a.entry.js +1 -0
  113. package/dist/lime-elements/p-CY72JnWG.js +1 -0
  114. package/dist/lime-elements/p-a30bf079.entry.js +1 -0
  115. package/dist/lime-elements/{p-1547b9c8.entry.js → p-abdede40.entry.js} +1 -1
  116. package/dist/lime-elements/{p-bb38bb3c.entry.js → p-b91b1aed.entry.js} +1 -1
  117. package/dist/lime-elements/{p-37b41bad.entry.js → p-bbaaf7c1.entry.js} +1 -1
  118. package/dist/lime-elements/{p-d6d177bc.entry.js → p-be0cbddb.entry.js} +1 -1
  119. package/dist/lime-elements/{p-f70b8487.entry.js → p-c5b6ac7a.entry.js} +1 -1
  120. package/dist/lime-elements/{p-268a695b.entry.js → p-ce20d720.entry.js} +1 -1
  121. package/dist/lime-elements/{p-2292181d.entry.js → p-e14b7393.entry.js} +1 -1
  122. package/dist/lime-elements/{p-13f4d39d.entry.js → p-f92f4f00.entry.js} +1 -1
  123. package/dist/lime-elements/{p-ef9bb368.entry.js → p-f9cfcd03.entry.js} +1 -1
  124. package/dist/types/components/badge/badge.d.ts +1 -1
  125. package/dist/types/components/banner/banner.d.ts +1 -1
  126. package/dist/types/components/button-group/button-group.d.ts +1 -1
  127. package/dist/types/components/checkbox/checkbox.d.ts +1 -1
  128. package/dist/types/components/chip-set/chip-set.d.ts +1 -1
  129. package/dist/types/components/circular-progress/circular-progress.d.ts +1 -1
  130. package/dist/types/components/code-editor/code-editor.d.ts +1 -1
  131. package/dist/types/components/dialog/dialog.d.ts +1 -1
  132. package/dist/types/components/dynamic-label/dynamic-label.d.ts +1 -1
  133. package/dist/types/components/file/file.d.ts +1 -1
  134. package/dist/types/components/file-dropzone/file-dropzone.d.ts +1 -1
  135. package/dist/types/components/file-input/file-input.d.ts +1 -1
  136. package/dist/types/components/header/header.d.ts +1 -1
  137. package/dist/types/components/help/help.d.ts +1 -1
  138. package/dist/types/components/helper-line/helper-line.d.ts +1 -1
  139. package/dist/types/components/info-tile/info-tile.d.ts +1 -1
  140. package/dist/types/components/linear-progress/linear-progress.d.ts +1 -1
  141. package/dist/types/components/list/list.d.ts +1 -1
  142. package/dist/types/components/menu/menu.d.ts +2 -0
  143. package/dist/types/components/select/select.d.ts +3 -2
  144. package/dist/types/components/shortcut/shortcut.d.ts +1 -1
  145. package/dist/types/components/snackbar/snackbar.d.ts +1 -1
  146. package/dist/types/components/spinner/spinner.d.ts +1 -1
  147. package/dist/types/components/switch/switch.d.ts +1 -1
  148. package/dist/types/components/tab-bar/tab-bar.d.ts +1 -1
  149. package/dist/types/components/tab-panel/tab-panel.d.ts +1 -1
  150. package/dist/types/components/table/table.d.ts +1 -1
  151. package/dist/types/components.d.ts +104 -104
  152. package/dist/types/util/device.d.ts +4 -0
  153. package/dist/types/util/hotkeys.d.ts +23 -0
  154. package/package.json +1 -1
  155. package/dist/esm/device-SlH7g-uH.js +0 -21
  156. package/dist/lime-elements/p-05ff053d.entry.js +0 -1
  157. package/dist/lime-elements/p-767935ac.entry.js +0 -1
  158. package/dist/lime-elements/p-SlH7g-uH.js +0 -1
  159. package/dist/lime-elements/p-b2ea92be.entry.js +0 -23
  160. /package/dist/lime-elements/{p-CxzDbuiY.js → p-rI0IeKpx.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{r as t,c as e,h as i,a as l,H as n}from"./p-DBTJNfo7.js";import{m as r,r as d}from"./p-BgTwPGeH.js";import{c as o}from"./p-JbKhhoXs.js";import{g as a,b as c}from"./p-CgNJbSP4.js";import{T as s,A as m,b as h,E as f,a as u,S as x,c as p,d as b}from"./p-CxzDbuiY.js";import{b as g,a as v,g as _}from"./p-5KsJICvh.js";import{g as y}from"./p-Dnt5w_Bp.js";import{d as w}from"./p-BviYUVSD.js";import{M as k}from"./p-DZkKQUDM.js";import{_ as I,a as T,M as E,m as C,d as A,c as O,b as z}from"./p-ChRGk668.js";import{f as S,z as L}from"./p-BqiDn_Sf.js";import{i as R}from"./p-DtS35Df5.js";import{g as D}from"./p-Dx8swykg.js";import{M as j}from"./p-BN1-aIOw.js";import{i as F}from"./p-B9Ofc5RB.js";import"./p-BJQylLSL.js";import"./p-D6dCQvwl.js";import"./p-BOEi1C7r.js";import"./p-oiMYqRQ0.js";import"./p-C9yTLqR8.js";import"./p-ZcW3uvZL.js";import"./p-Cs5T63LB.js";import"./p-f_1nwOC8.js";import"./p-efBXH4mj.js";const N=class{constructor(l){t(this,l),this.select=e(this,"select"),this.divider="›",this.renderSteps=()=>{const t=this.items.slice(0,-1);return this.areItemsLinks(this.items)?t.map(this.renderAsLink):t.map(this.renderAsButton)},this.renderAsButton=t=>{const e=o();return[i("button",{role:"listitem",id:e,class:"step",onClick:this.handleClick(t)},this.renderIcon(t),this.renderLabel(t)),this.renderTooltip(t,e)]},this.renderAsLink=t=>{const e=o();return[i("a",{role:"listitem",id:e,class:"step",href:t.link.href,title:t.link.title},this.renderIcon(t),this.renderLabel(t)),this.renderTooltip(t,e)]},this.renderLastStep=()=>{const t=this.items.slice(-1);return i("li",{class:"last step",tabindex:"-1","aria-current":this.areItemsLinks(this.items)?"page":"step"},this.renderIcon(t[0]),i("span",{class:"text"},t[0].text))},this.renderIcon=t=>{const e=a(t.icon),l=c(t.icon);if(e)return i("limel-icon",{style:{color:`${l}`},name:e})},this.renderLabel=t=>{if("icon-only"!==t.type)return i("span",{class:"text"},t.text)},this.renderTooltip=(t,e)=>{if("icon-only"===t.type)return i("limel-tooltip",{elementId:e,label:t.text})},this.areItemsLinks=t=>t.some((t=>"link"in t)),this.handleClick=t=>e=>{e.stopPropagation(),this.select.emit(t)}}render(){return i("ol",{key:"f50410ba0661038c303f8fbadb9147f858e70647",role:"navigation","aria-label":"Breadcrumb",style:{"--limel-breadcrumbs-divider":`'${this.divider}'`}},this.renderSteps(),this.renderLastStep())}componentWillLoad(){r(this.host)}disconnectedCallback(){d(this.host)}get host(){return l(this)}};N.style='@charset "UTF-8";:host(limel-breadcrumbs){--limel-breadcrumbs-item-height:1.5rem;--limel-breadcrumbs-gap:0.75rem;--limel-breadcrumbs-gap:0.75rem;--limel-breadcrumbs-item-text-color:var( --breadcrumbs-item-text-color, rgb(var(--contrast-1500)) );--limel-overflow-mask-horizontal:linear-gradient( to right, transparent 0%, black calc(0% + var(--limel-left-edge-fade-width, 1rem)), black calc(100% - var(--limel-right-edge-fade-width, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-horizontal);mask-image:var(--limel-overflow-mask-horizontal);padding-left:var(--limel-left-edge-fade-width, 1rem);padding-right:var(--limel-right-edge-fade-width, 1rem);--limel-left-edge-fade-width:0.5rem;--limel-right-edge-fade-width:0.5rem}ol,li,.step{all:unset}*{box-sizing:border-box}ol{padding:0.5rem;gap:var(--limel-breadcrumbs-gap)}.step{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;max-width:var(--breadcrumbs-item-max-width, 10rem);height:var(--limel-breadcrumbs-item-height);color:var(--limel-breadcrumbs-item-text-color);border-radius:100vw;font-size:var(--limel-theme-default-font-size);padding:0 0.25rem}.step:not(:has(.text)){padding:0 0.125rem}.step:not(.last):focus{outline:none}.step:not(.last):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.step:not(.last):after{content:var(--limel-breadcrumbs-divider);display:flex;align-items:center;justify-content:center;width:var(--limel-breadcrumbs-gap);position:absolute;top:0;right:calc(var(--limel-breadcrumbs-gap) * -1);bottom:0;left:auto;text-align:center}a.step{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--limel-breadcrumbs-item-text-color)}a.step: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.step:hover{color:rgb(var(--color-blue-default))}a.step:hover:before{opacity:0.3;transform:scale(1)}button.step:not(.last){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-breadcrumbs-item-text-color);background-color:transparent}button.step:not(.last):hover,button.step:not(.last):focus,button.step:not(.last):focus-visible{will-change:color, background-color, box-shadow, transform}button.step:not(.last):hover,button.step:not(.last):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.step:not(.last):hover{box-shadow:var(--button-shadow-hovered)}button.step:not(.last):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.step:not(.last):hover,button.step:not(.last):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limel-icon{flex-shrink:0;width:calc(var(--limel-breadcrumbs-item-height) - 0.25rem);height:calc(var(--limel-breadcrumbs-item-height) - 0.25rem)}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0.25rem}.last{opacity:0.7}:host(limel-breadcrumbs){box-sizing:border-box;display:flex;width:100%;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}:host(limel-breadcrumbs)::-webkit-scrollbar{display:none}:host(limel-breadcrumbs){direction:rtl}ol{display:flex;flex-direction:row-reverse;justify-content:flex-end;margin-right:auto}.step{direction:ltr}';const M=class{constructor(l){t(this,l),this.change=e(this,"change"),this.action=e(this,"action"),this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.type="text",this.formatNumber=!0,this.step="any",this.completions=[],this.showLink=!1,this.locale=y.defaultLocale,this.isFocused=!1,this.wasInvalid=!1,this.showCompletions=!1,this.completionsList=[],this.changeWaiting=!1,this.initialize=()=>{const t=this.limelInputField.shadowRoot.querySelector(".mdc-text-field");t&&(this.mdcTextField=new k(t),this.value&&(this.mdcTextField.value=this.value),this.invalid&&(this.mdcTextField.valid=!1),this.mapCompletions(),window.addEventListener("resize",this.layout,{passive:!0}),this.limelInputField.addEventListener("focus",this.setFocus))},this.mapCompletions=()=>{this.completionsList=[...this.completions].map((t=>({text:t})))},this.setFocus=()=>{this.mdcTextField.focus()},this.getContainerClassList=()=>{const t={"mdc-text-field":!0,"mdc-text-field--outlined":!0,"mdc-text-field--invalid":this.isInvalid(),"mdc-text-field--disabled":this.disabled||this.readonly,"lime-text-field--readonly":this.readonly,"mdc-text-field--required":this.required,"lime-text-field--empty":this.isEmpty(),"lime-has-prefix":this.hasPrefix(),"lime-has-suffix":this.hasSuffix()};return"textarea"===this.type?t["mdc-text-field--textarea"]=!0:(t["mdc-text-field--with-leading-icon"]=!!this.leadingIcon,t["mdc-text-field--with-trailing-icon"]=!!this.getTrailingIcon()),t},this.isEmpty=()=>{var t;return!("number"===this.type&&(null===(t=this.inputElement)||void 0===t?void 0:t.validity.badInput)||this.getCurrentValue())},this.getCurrentValue=()=>this.changeWaiting&&this.inputElement?this.inputElement.value:this.value,this.renderInput=t=>{if("textarea"!==this.type)return i("input",Object.assign({},t,{type:"urlAsText"===this.type?"text":this.type,pattern:this.pattern,onWheel:this.handleWheel,onKeyDown:this.onKeyDown,placeholder:this.placeholder}))},this.renderTextarea=t=>{if("textarea"===this.type)return i("span",{class:"mdc-text-field__resizer"},i("textarea",Object.assign({},t,{placeholder:this.placeholder})))},this.layout=()=>{var t;null===(t=this.mdcTextField)||void 0===t||t.layout(),this.restyleCompletionsDropDown()},this.restyleCompletionsDropDown=w((()=>{const t=this.showCompletions;this.showCompletions=!1,requestAnimationFrame((()=>{this.showCompletions=t}))}),100),this.getAdditionalProps=()=>{const t={};return"number"===this.type&&(t.step=this.step),"number"===this.type&&Number.isInteger(this.min)&&(t.min=this.min),"number"===this.type&&Number.isInteger(this.max)&&(t.max=this.max),this.minlength&&(t.minlength=this.minlength),this.maxlength&&(t.maxlength=this.maxlength),t},this.onFocus=()=>{this.isFocused=!0,this.showCompletions=!0},this.onBlur=()=>{this.isFocused=!1,this.validate(),this.changeEmitter.flush()},this.hasHelperText=()=>{var t;return!!(null!==(t=this.helperText)&&void 0!==t?t:this.validationMessage)},this.hasHelperLine=()=>this.maxlength>0||this.hasHelperText(),this.renderHelperLine=()=>{var t;const e=(this.getCurrentValue()||"").length;if(this.hasHelperLine())return i("limel-helper-line",{helperTextId:this.helperTextId,helperText:null!==(t=this.helperText)&&void 0!==t?t:this.validationMessage,length:e,maxLength:this.maxlength,invalid:this.isInvalid()})},this.renderSuffix=()=>{if(this.hasSuffix()&&"textarea"!==this.type)return i("span",{class:{"mdc-text-field__affix":!0,"mdc-text-field__affix--suffix":!0}},this.suffix)},this.hasSuffix=()=>null!=this.suffix,this.renderPrefix=()=>{if(this.hasPrefix()&&"textarea"!==this.type)return i("span",{class:{"mdc-text-field__affix":!0,"mdc-text-field__affix--prefix":!0}},this.prefix)},this.hasPrefix=()=>null!=this.prefix,this.isInvalid=()=>!this.readonly&&(!!this.invalid||this.wasInvalid),this.validate=()=>{this.readonly||this.invalid?this.wasInvalid=!1:this.inputElement&&(this.wasInvalid=!this.inputElement.checkValidity())},this.setInputElement=t=>{t&&(this.inputElement=t)},this.renderLeadingIcon=()=>{if("textarea"!==this.type)return this.leadingIcon?i("i",{class:"material-icons mdc-text-field__icon mdc-text-field__icon--leading"},i("limel-icon",{name:this.leadingIcon})):void 0},this.renderTrailingLinkOrButton=()=>{if("textarea"===this.type)return;const t=this.getTrailingIcon();return!this.isInvalid()&&this.hasLink()?this.renderLinkIcon(this.getLink(),t):t?this.renderTrailingIcon(t):void 0},this.hasLink=()=>this.showLink&&["email","tel","url","urlAsText"].includes(this.type),this.getLink=()=>{const t={href:""};switch(this.type){case"email":t.href=`mailto:${this.value}`;break;case"tel":t.href=`tel:${this.value}`;break;default:t.href=g(this.value),t.target=v(this.value),t.rel=_(t.target)}return t},this.renderLinkIcon=(t,e)=>i("a",Object.assign({},t,{class:"material-icons mdc-text-field__icon lime-trailing-icon-for-link",tabindex:this.disabled||this.isEmpty()?"-1":"0",role:"button"}),i("limel-icon",{name:e})),this.renderTrailingIcon=t=>this.isInvalid()?i("i",{key:"invalid",class:"material-icons mdc-text-field__icon invalid-icon"},i("limel-icon",{name:t})):i("i",{key:"action",class:"material-icons mdc-text-field__icon mdc-text-field__icon--trailing",tabIndex:0,role:"button",onKeyDown:this.handleIconKeyPress,onClick:this.handleIconClick},i("limel-icon",{name:t})),this.getTrailingIcon=()=>this.isInvalid()?"high_importance":this.trailingIcon?this.trailingIcon:this.showLink&&"email"===this.type?"filled_message":this.showLink&&"tel"===this.type?"phone":!this.showLink||"url"!==this.type&&"urlAsText"!==this.type?void 0:"external_link",this.renderFormattedNumber=()=>{if("number"!==this.type)return;let t=this.value;return this.formatNumber&&this.value&&(t=new Intl.NumberFormat(this.locale).format(Number(this.value)),"NaN"===t)?void 0:i("span",{class:"lime-formatted-input lime-looks-like-input-value"},t)},this.onKeyDown=t=>{this.showCompletions=!0;const e=t.key===s&&!t.altKey&&!t.metaKey&&!t.shiftKey,i=t.key===m,l=t.key===h;if(t.key===s&&t.shiftKey&&(this.showCompletions=!1),!e&&!i&&!l)return;const n=document.querySelector(` #${this.portalId} limel-list`);n&&(t.preventDefault(),e||l?n.shadowRoot.querySelector(".mdc-deprecated-list-item:first-child").focus():i&&n.shadowRoot.querySelector(".mdc-deprecated-list-item:last-child").focus())},this.handleCompletionChange=t=>{t.stopPropagation(),t.detail&&(this.showCompletions=!1,this.changeEmitter(t.detail.text),this.changeEmitter.flush())},this.renderAutocompleteList=()=>{if("textarea"===this.type||0===this.completions.length)return;const t=getComputedStyle(this.limelInputField).getPropertyValue("--dropdown-z-index");return i("limel-portal",{visible:this.showCompletions,containerId:this.portalId,inheritParentWidth:!0,containerStyle:{"z-index":t}},i("limel-menu-surface",{open:this.showCompletions,allowClicksElement:this.limelInputField,style:{"--menu-surface-width":"100%","max-height":"inherit",display:"flex"},onDismiss:this.handleCloseMenu},this.renderListResult()))},this.renderListResult=()=>{const t=this.filterCompletions(this.getCurrentValue());return t&&0!==t.length?i("limel-list",{onChange:this.handleCompletionChange,onKeyDown:this.handleKeyDownInDropdown,type:"selectable",items:t}):null},this.handleKeyDownInDropdown=t=>{[s,f,u].includes(t.key)&&this.setFocus()},this.handleCloseMenu=()=>{this.showCompletions=!1},this.filterCompletions=t=>t?this.completionsList.filter((e=>e.text.toLowerCase().includes(t.toLowerCase()))):this.completionsList,this.handleInput=t=>{t.stopPropagation();let e=t.target.value;if("number"===this.type){if(!e&&t.data)return void t.stopPropagation();e&&(e=Number(e))}this.changeWaiting=!0,this.changeEmitter(e)},this.changeEmitter=w((t=>{this.change.emit(t),this.changeWaiting=!1}),300),this.handleChange=t=>{t.stopPropagation(),this.changeEmitter.flush()},this.handleIconClick=()=>{this.action.emit()},this.handleIconKeyPress=t=>{(t.key===x||t.key===u)&&this.action.emit()},this.handleWheel=()=>{},this.portalId=o(),this.helperTextId=o(),this.labelId=o()}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}disconnectedCallback(){this.mdcTextField&&this.mdcTextField.destroy(),this.restyleCompletionsDropDown.cancel(),window.removeEventListener("resize",this.layout),this.limelInputField.removeEventListener("focus",this.setFocus)}componentDidUpdate(){this.invalid&&(this.mdcTextField.valid=!1),this.mdcTextField.disabled=this.disabled||this.readonly}async getSelectionStart(){var t,e;try{return null!==(e=null===(t=this.inputElement)||void 0===t?void 0:t.selectionStart)&&void 0!==e?e:null}catch(t){return null}}async getSelectionEnd(){var t,e;try{return null!==(e=null===(t=this.inputElement)||void 0===t?void 0:t.selectionEnd)&&void 0!==e?e:null}catch(t){return null}}async getSelectionDirection(){var t,e;try{return null!==(e=null===(t=this.inputElement)||void 0===t?void 0:t.selectionDirection)&&void 0!==e?e:null}catch(t){return null}}render(){const t=this.getAdditionalProps();t["aria-labelledby"]=this.labelId,t.class="mdc-text-field__input",t.ref=this.setInputElement,t.onInput=this.handleInput,t.onChange=this.handleChange,t.onFocus=this.onFocus,t.onBlur=this.onBlur,t.required=this.required,t.readonly=this.readonly,t.disabled=this.disabled||this.readonly;let e="";return this.hasHelperText()&&(e+=this.helperTextId,t["aria-describedby"]=this.helperTextId),this.renderAutocompleteList()&&(e&&(e+=" "),e+=this.portalId),e&&(t["aria-controls"]=e),i(n,{key:"6427ea1655ab4fa9d07a2e5e4f8f1b4bad169065"},i("limel-notched-outline",{key:"5dbf37b876ed2673acdd439a875b6b82ef34ee22",labelId:this.labelId,label:this.label,required:this.required,invalid:this.invalid||this.isInvalid(),disabled:this.disabled,readonly:this.readonly,hasValue:!!this.value,hasLeadingIcon:!!this.leadingIcon},i("label",{key:"47ec8a216b5b5799769af87ce603e04f6a3abbaa",slot:"content",class:this.getContainerClassList()},this.renderLeadingIcon(),this.renderPrefix(),this.renderFormattedNumber(),this.renderInput(t),this.renderSuffix(),this.renderTextarea(t),this.renderTrailingLinkOrButton())),this.renderHelperLine(),this.renderAutocompleteList())}valueWatcher(t){this.mdcTextField&&(this.changeWaiting||"number"===this.type&&this.isFocused&&Number(t)===Number(this.mdcTextField.value)||(t!==this.mdcTextField.value&&(this.mdcTextField.value=t||""),this.wasInvalid&&this.validate()))}completionsWatcher(){this.mapCompletions()}get validationMessage(){var t;return this.isInvalid()&&!this.invalid&&(null===(t=this.inputElement)||void 0===t?void 0:t.validationMessage)||""}static get delegatesFocus(){return!0}get limelInputField(){return l(this)}static get watchers(){return{value:[{valueWatcher:0}],completions:[{completionsWatcher:0}]}}};
1
+ import{r as t,c as e,h as i,a as l,H as n}from"./p-DBTJNfo7.js";import{m as r,r as d}from"./p-BgTwPGeH.js";import{c as o}from"./p-JbKhhoXs.js";import{g as a,b as c}from"./p-CgNJbSP4.js";import{T as s,A as m,b as h,E as f,a as u,S as x,c as p,d as b}from"./p-rI0IeKpx.js";import{b as g,a as v,g as _}from"./p-5KsJICvh.js";import{g as y}from"./p-Dnt5w_Bp.js";import{d as w}from"./p-BviYUVSD.js";import{M as k}from"./p-DZkKQUDM.js";import{_ as I,a as T,M as E,m as C,d as A,c as O,b as z}from"./p-ChRGk668.js";import{f as S,z as L}from"./p-BqiDn_Sf.js";import{i as R}from"./p-DtS35Df5.js";import{g as D}from"./p-Dx8swykg.js";import{M as j}from"./p-BN1-aIOw.js";import{i as F}from"./p-B9Ofc5RB.js";import"./p-BJQylLSL.js";import"./p-D6dCQvwl.js";import"./p-BOEi1C7r.js";import"./p-oiMYqRQ0.js";import"./p-C9yTLqR8.js";import"./p-ZcW3uvZL.js";import"./p-Cs5T63LB.js";import"./p-f_1nwOC8.js";import"./p-efBXH4mj.js";const N=class{constructor(l){t(this,l),this.select=e(this,"select"),this.divider="›",this.renderSteps=()=>{const t=this.items.slice(0,-1);return this.areItemsLinks(this.items)?t.map(this.renderAsLink):t.map(this.renderAsButton)},this.renderAsButton=t=>{const e=o();return[i("button",{role:"listitem",id:e,class:"step",onClick:this.handleClick(t)},this.renderIcon(t),this.renderLabel(t)),this.renderTooltip(t,e)]},this.renderAsLink=t=>{const e=o();return[i("a",{role:"listitem",id:e,class:"step",href:t.link.href,title:t.link.title},this.renderIcon(t),this.renderLabel(t)),this.renderTooltip(t,e)]},this.renderLastStep=()=>{const t=this.items.slice(-1);return i("li",{class:"last step",tabindex:"-1","aria-current":this.areItemsLinks(this.items)?"page":"step"},this.renderIcon(t[0]),i("span",{class:"text"},t[0].text))},this.renderIcon=t=>{const e=a(t.icon),l=c(t.icon);if(e)return i("limel-icon",{style:{color:`${l}`},name:e})},this.renderLabel=t=>{if("icon-only"!==t.type)return i("span",{class:"text"},t.text)},this.renderTooltip=(t,e)=>{if("icon-only"===t.type)return i("limel-tooltip",{elementId:e,label:t.text})},this.areItemsLinks=t=>t.some((t=>"link"in t)),this.handleClick=t=>e=>{e.stopPropagation(),this.select.emit(t)}}render(){return i("ol",{key:"f50410ba0661038c303f8fbadb9147f858e70647",role:"navigation","aria-label":"Breadcrumb",style:{"--limel-breadcrumbs-divider":`'${this.divider}'`}},this.renderSteps(),this.renderLastStep())}componentWillLoad(){r(this.host)}disconnectedCallback(){d(this.host)}get host(){return l(this)}};N.style='@charset "UTF-8";:host(limel-breadcrumbs){--limel-breadcrumbs-item-height:1.5rem;--limel-breadcrumbs-gap:0.75rem;--limel-breadcrumbs-gap:0.75rem;--limel-breadcrumbs-item-text-color:var( --breadcrumbs-item-text-color, rgb(var(--contrast-1500)) );--limel-overflow-mask-horizontal:linear-gradient( to right, transparent 0%, black calc(0% + var(--limel-left-edge-fade-width, 1rem)), black calc(100% - var(--limel-right-edge-fade-width, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-horizontal);mask-image:var(--limel-overflow-mask-horizontal);padding-left:var(--limel-left-edge-fade-width, 1rem);padding-right:var(--limel-right-edge-fade-width, 1rem);--limel-left-edge-fade-width:0.5rem;--limel-right-edge-fade-width:0.5rem}ol,li,.step{all:unset}*{box-sizing:border-box}ol{padding:0.5rem;gap:var(--limel-breadcrumbs-gap)}.step{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;max-width:var(--breadcrumbs-item-max-width, 10rem);height:var(--limel-breadcrumbs-item-height);color:var(--limel-breadcrumbs-item-text-color);border-radius:100vw;font-size:var(--limel-theme-default-font-size);padding:0 0.25rem}.step:not(:has(.text)){padding:0 0.125rem}.step:not(.last):focus{outline:none}.step:not(.last):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.step:not(.last):after{content:var(--limel-breadcrumbs-divider);display:flex;align-items:center;justify-content:center;width:var(--limel-breadcrumbs-gap);position:absolute;top:0;right:calc(var(--limel-breadcrumbs-gap) * -1);bottom:0;left:auto;text-align:center}a.step{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--limel-breadcrumbs-item-text-color)}a.step: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.step:hover{color:rgb(var(--color-blue-default))}a.step:hover:before{opacity:0.3;transform:scale(1)}button.step:not(.last){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-breadcrumbs-item-text-color);background-color:transparent}button.step:not(.last):hover,button.step:not(.last):focus,button.step:not(.last):focus-visible{will-change:color, background-color, box-shadow, transform}button.step:not(.last):hover,button.step:not(.last):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.step:not(.last):hover{box-shadow:var(--button-shadow-hovered)}button.step:not(.last):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.step:not(.last):hover,button.step:not(.last):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limel-icon{flex-shrink:0;width:calc(var(--limel-breadcrumbs-item-height) - 0.25rem);height:calc(var(--limel-breadcrumbs-item-height) - 0.25rem)}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0.25rem}.last{opacity:0.7}:host(limel-breadcrumbs){box-sizing:border-box;display:flex;width:100%;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}:host(limel-breadcrumbs)::-webkit-scrollbar{display:none}:host(limel-breadcrumbs){direction:rtl}ol{display:flex;flex-direction:row-reverse;justify-content:flex-end;margin-right:auto}.step{direction:ltr}';const M=class{constructor(l){t(this,l),this.change=e(this,"change"),this.action=e(this,"action"),this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.type="text",this.formatNumber=!0,this.step="any",this.completions=[],this.showLink=!1,this.locale=y.defaultLocale,this.isFocused=!1,this.wasInvalid=!1,this.showCompletions=!1,this.completionsList=[],this.changeWaiting=!1,this.initialize=()=>{const t=this.limelInputField.shadowRoot.querySelector(".mdc-text-field");t&&(this.mdcTextField=new k(t),this.value&&(this.mdcTextField.value=this.value),this.invalid&&(this.mdcTextField.valid=!1),this.mapCompletions(),window.addEventListener("resize",this.layout,{passive:!0}),this.limelInputField.addEventListener("focus",this.setFocus))},this.mapCompletions=()=>{this.completionsList=[...this.completions].map((t=>({text:t})))},this.setFocus=()=>{this.mdcTextField.focus()},this.getContainerClassList=()=>{const t={"mdc-text-field":!0,"mdc-text-field--outlined":!0,"mdc-text-field--invalid":this.isInvalid(),"mdc-text-field--disabled":this.disabled||this.readonly,"lime-text-field--readonly":this.readonly,"mdc-text-field--required":this.required,"lime-text-field--empty":this.isEmpty(),"lime-has-prefix":this.hasPrefix(),"lime-has-suffix":this.hasSuffix()};return"textarea"===this.type?t["mdc-text-field--textarea"]=!0:(t["mdc-text-field--with-leading-icon"]=!!this.leadingIcon,t["mdc-text-field--with-trailing-icon"]=!!this.getTrailingIcon()),t},this.isEmpty=()=>{var t;return!("number"===this.type&&(null===(t=this.inputElement)||void 0===t?void 0:t.validity.badInput)||this.getCurrentValue())},this.getCurrentValue=()=>this.changeWaiting&&this.inputElement?this.inputElement.value:this.value,this.renderInput=t=>{if("textarea"!==this.type)return i("input",Object.assign({},t,{type:"urlAsText"===this.type?"text":this.type,pattern:this.pattern,onWheel:this.handleWheel,onKeyDown:this.onKeyDown,placeholder:this.placeholder}))},this.renderTextarea=t=>{if("textarea"===this.type)return i("span",{class:"mdc-text-field__resizer"},i("textarea",Object.assign({},t,{placeholder:this.placeholder})))},this.layout=()=>{var t;null===(t=this.mdcTextField)||void 0===t||t.layout(),this.restyleCompletionsDropDown()},this.restyleCompletionsDropDown=w((()=>{const t=this.showCompletions;this.showCompletions=!1,requestAnimationFrame((()=>{this.showCompletions=t}))}),100),this.getAdditionalProps=()=>{const t={};return"number"===this.type&&(t.step=this.step),"number"===this.type&&Number.isInteger(this.min)&&(t.min=this.min),"number"===this.type&&Number.isInteger(this.max)&&(t.max=this.max),this.minlength&&(t.minlength=this.minlength),this.maxlength&&(t.maxlength=this.maxlength),t},this.onFocus=()=>{this.isFocused=!0,this.showCompletions=!0},this.onBlur=()=>{this.isFocused=!1,this.validate(),this.changeEmitter.flush()},this.hasHelperText=()=>{var t;return!!(null!==(t=this.helperText)&&void 0!==t?t:this.validationMessage)},this.hasHelperLine=()=>this.maxlength>0||this.hasHelperText(),this.renderHelperLine=()=>{var t;const e=(this.getCurrentValue()||"").length;if(this.hasHelperLine())return i("limel-helper-line",{helperTextId:this.helperTextId,helperText:null!==(t=this.helperText)&&void 0!==t?t:this.validationMessage,length:e,maxLength:this.maxlength,invalid:this.isInvalid()})},this.renderSuffix=()=>{if(this.hasSuffix()&&"textarea"!==this.type)return i("span",{class:{"mdc-text-field__affix":!0,"mdc-text-field__affix--suffix":!0}},this.suffix)},this.hasSuffix=()=>null!=this.suffix,this.renderPrefix=()=>{if(this.hasPrefix()&&"textarea"!==this.type)return i("span",{class:{"mdc-text-field__affix":!0,"mdc-text-field__affix--prefix":!0}},this.prefix)},this.hasPrefix=()=>null!=this.prefix,this.isInvalid=()=>!this.readonly&&(!!this.invalid||this.wasInvalid),this.validate=()=>{this.readonly||this.invalid?this.wasInvalid=!1:this.inputElement&&(this.wasInvalid=!this.inputElement.checkValidity())},this.setInputElement=t=>{t&&(this.inputElement=t)},this.renderLeadingIcon=()=>{if("textarea"!==this.type)return this.leadingIcon?i("i",{class:"material-icons mdc-text-field__icon mdc-text-field__icon--leading"},i("limel-icon",{name:this.leadingIcon})):void 0},this.renderTrailingLinkOrButton=()=>{if("textarea"===this.type)return;const t=this.getTrailingIcon();return!this.isInvalid()&&this.hasLink()?this.renderLinkIcon(this.getLink(),t):t?this.renderTrailingIcon(t):void 0},this.hasLink=()=>this.showLink&&["email","tel","url","urlAsText"].includes(this.type),this.getLink=()=>{const t={href:""};switch(this.type){case"email":t.href=`mailto:${this.value}`;break;case"tel":t.href=`tel:${this.value}`;break;default:t.href=g(this.value),t.target=v(this.value),t.rel=_(t.target)}return t},this.renderLinkIcon=(t,e)=>i("a",Object.assign({},t,{class:"material-icons mdc-text-field__icon lime-trailing-icon-for-link",tabindex:this.disabled||this.isEmpty()?"-1":"0",role:"button"}),i("limel-icon",{name:e})),this.renderTrailingIcon=t=>this.isInvalid()?i("i",{key:"invalid",class:"material-icons mdc-text-field__icon invalid-icon"},i("limel-icon",{name:t})):i("i",{key:"action",class:"material-icons mdc-text-field__icon mdc-text-field__icon--trailing",tabIndex:0,role:"button",onKeyDown:this.handleIconKeyPress,onClick:this.handleIconClick},i("limel-icon",{name:t})),this.getTrailingIcon=()=>this.isInvalid()?"high_importance":this.trailingIcon?this.trailingIcon:this.showLink&&"email"===this.type?"filled_message":this.showLink&&"tel"===this.type?"phone":!this.showLink||"url"!==this.type&&"urlAsText"!==this.type?void 0:"external_link",this.renderFormattedNumber=()=>{if("number"!==this.type)return;let t=this.value;return this.formatNumber&&this.value&&(t=new Intl.NumberFormat(this.locale).format(Number(this.value)),"NaN"===t)?void 0:i("span",{class:"lime-formatted-input lime-looks-like-input-value"},t)},this.onKeyDown=t=>{this.showCompletions=!0;const e=t.key===s&&!t.altKey&&!t.metaKey&&!t.shiftKey,i=t.key===m,l=t.key===h;if(t.key===s&&t.shiftKey&&(this.showCompletions=!1),!e&&!i&&!l)return;const n=document.querySelector(` #${this.portalId} limel-list`);n&&(t.preventDefault(),e||l?n.shadowRoot.querySelector(".mdc-deprecated-list-item:first-child").focus():i&&n.shadowRoot.querySelector(".mdc-deprecated-list-item:last-child").focus())},this.handleCompletionChange=t=>{t.stopPropagation(),t.detail&&(this.showCompletions=!1,this.changeEmitter(t.detail.text),this.changeEmitter.flush())},this.renderAutocompleteList=()=>{if("textarea"===this.type||0===this.completions.length)return;const t=getComputedStyle(this.limelInputField).getPropertyValue("--dropdown-z-index");return i("limel-portal",{visible:this.showCompletions,containerId:this.portalId,inheritParentWidth:!0,containerStyle:{"z-index":t}},i("limel-menu-surface",{open:this.showCompletions,allowClicksElement:this.limelInputField,style:{"--menu-surface-width":"100%","max-height":"inherit",display:"flex"},onDismiss:this.handleCloseMenu},this.renderListResult()))},this.renderListResult=()=>{const t=this.filterCompletions(this.getCurrentValue());return t&&0!==t.length?i("limel-list",{onChange:this.handleCompletionChange,onKeyDown:this.handleKeyDownInDropdown,type:"selectable",items:t}):null},this.handleKeyDownInDropdown=t=>{[s,f,u].includes(t.key)&&this.setFocus()},this.handleCloseMenu=()=>{this.showCompletions=!1},this.filterCompletions=t=>t?this.completionsList.filter((e=>e.text.toLowerCase().includes(t.toLowerCase()))):this.completionsList,this.handleInput=t=>{t.stopPropagation();let e=t.target.value;if("number"===this.type){if(!e&&t.data)return void t.stopPropagation();e&&(e=Number(e))}this.changeWaiting=!0,this.changeEmitter(e)},this.changeEmitter=w((t=>{this.change.emit(t),this.changeWaiting=!1}),300),this.handleChange=t=>{t.stopPropagation(),this.changeEmitter.flush()},this.handleIconClick=()=>{this.action.emit()},this.handleIconKeyPress=t=>{(t.key===x||t.key===u)&&this.action.emit()},this.handleWheel=()=>{},this.portalId=o(),this.helperTextId=o(),this.labelId=o()}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}disconnectedCallback(){this.mdcTextField&&this.mdcTextField.destroy(),this.restyleCompletionsDropDown.cancel(),window.removeEventListener("resize",this.layout),this.limelInputField.removeEventListener("focus",this.setFocus)}componentDidUpdate(){this.invalid&&(this.mdcTextField.valid=!1),this.mdcTextField.disabled=this.disabled||this.readonly}async getSelectionStart(){var t,e;try{return null!==(e=null===(t=this.inputElement)||void 0===t?void 0:t.selectionStart)&&void 0!==e?e:null}catch(t){return null}}async getSelectionEnd(){var t,e;try{return null!==(e=null===(t=this.inputElement)||void 0===t?void 0:t.selectionEnd)&&void 0!==e?e:null}catch(t){return null}}async getSelectionDirection(){var t,e;try{return null!==(e=null===(t=this.inputElement)||void 0===t?void 0:t.selectionDirection)&&void 0!==e?e:null}catch(t){return null}}render(){const t=this.getAdditionalProps();t["aria-labelledby"]=this.labelId,t.class="mdc-text-field__input",t.ref=this.setInputElement,t.onInput=this.handleInput,t.onChange=this.handleChange,t.onFocus=this.onFocus,t.onBlur=this.onBlur,t.required=this.required,t.readonly=this.readonly,t.disabled=this.disabled||this.readonly;let e="";return this.hasHelperText()&&(e+=this.helperTextId,t["aria-describedby"]=this.helperTextId),this.renderAutocompleteList()&&(e&&(e+=" "),e+=this.portalId),e&&(t["aria-controls"]=e),i(n,{key:"6427ea1655ab4fa9d07a2e5e4f8f1b4bad169065"},i("limel-notched-outline",{key:"5dbf37b876ed2673acdd439a875b6b82ef34ee22",labelId:this.labelId,label:this.label,required:this.required,invalid:this.invalid||this.isInvalid(),disabled:this.disabled,readonly:this.readonly,hasValue:!!this.value,hasLeadingIcon:!!this.leadingIcon},i("label",{key:"47ec8a216b5b5799769af87ce603e04f6a3abbaa",slot:"content",class:this.getContainerClassList()},this.renderLeadingIcon(),this.renderPrefix(),this.renderFormattedNumber(),this.renderInput(t),this.renderSuffix(),this.renderTextarea(t),this.renderTrailingLinkOrButton())),this.renderHelperLine(),this.renderAutocompleteList())}valueWatcher(t){this.mdcTextField&&(this.changeWaiting||"number"===this.type&&this.isFocused&&Number(t)===Number(this.mdcTextField.value)||(t!==this.mdcTextField.value&&(this.mdcTextField.value=t||""),this.wasInvalid&&this.validate()))}completionsWatcher(){this.mapCompletions()}get validationMessage(){var t;return this.isInvalid()&&!this.invalid&&(null===(t=this.inputElement)||void 0===t?void 0:t.validationMessage)||""}static get delegatesFocus(){return!0}get limelInputField(){return l(this)}static get watchers(){return{value:[{valueWatcher:0}],completions:[{completionsWatcher:0}]}}};
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2018 Google Inc.
@@ -87,7 +87,7 @@ var B,Y;M.style='@charset "UTF-8";:host([type=url]) .mdc-text-field--with-traili
87
87
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88
88
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
89
89
  * THE SOFTWARE.
90
- */class bt{constructor(){this.defaultConfig={isOpen:!0,badgeIcons:!1},this.getAriaOrientation=t=>"listbox"===t||"radiogroup"===t?"vertical":null,this.getIndexForWhichToApplyTabIndex=t=>{let e;for(let i=0,l=t.length;i<l;i+=1)if("separator"in t[i]);else{const l=t[i];if(l.disabled)continue;if(l.selected){e=i;break}void 0===e&&(e=i)}return e},this.renderListItem=(t,e)=>{var l;if("separator"in t)return i("li",{class:"mdc-deprecated-list-divider",role:"separator",key:`sep-${e}`},this.renderTextForSeparator(t),i("div",{class:"limel-list-divider-line"}));const n={};let r;e===this.applyTabIndexToItemAtIndex&&(n.tabindex="0"),r="radio"===this.config.type||"checkbox"===this.config.type?this.config.type:"selectable"===this.config.type?"option":"listitem";const d=null!==(l=t.id)&&void 0!==l?l:`item-${e}`;return i("limel-list-item",Object.assign({key:d,class:{"mdc-deprecated-list-item":!0,"mdc-deprecated-list-item--disabled":!!t.disabled}},n,{"data-index":e,type:r,text:t.text,secondaryText:t.secondaryText,icon:t.icon,image:t.image,primaryComponent:t.primaryComponent,badgeIcon:this.config.badgeIcons,iconSize:this.config.iconSize,selected:t.selected,disabled:t.disabled,actions:t.actions}))},this.renderTextForSeparator=t=>{if("text"in t)return i("h2",{class:"limel-list-divider-title"},t.text)}}render(t,e={}){let l;switch(t=t||[],this.config=Object.assign(Object.assign({},this.defaultConfig),e),this.config.type){case"checkbox":l="group";break;case"radio":l="radiogroup";break;default:l="listbox"}return this.applyTabIndexToItemAtIndex=this.getIndexForWhichToApplyTabIndex(t),i("ul",{class:"mdc-deprecated-list",role:l,"aria-orientation":this.getAriaOrientation(l)},t.map(this.renderListItem))}}const{ACTION_EVENT:gt}=P,vt=class{constructor(i){t(this,i),this.change=e(this,"change"),this.select=e(this,"select"),this.interact=e(this,"interact"),this.iconSize="small",this.maxLinesSecondaryText=3,this.listRenderer=new bt,this.setup=()=>{this.setupList(),this.setupListeners()},this.setupList=()=>{this.mdcList&&(this.teardown(),this.mdcList=null);const t=this.element.shadowRoot.querySelector(".mdc-deprecated-list");t&&(this.mdcList=new pt(t),this.mdcList.hasTypeahead=!0)},this.setupListeners=()=>{this.mdcList&&(this.mdcList.unlisten(gt,this.handleAction),this.selectable=["selectable","radio","checkbox"].includes(this.type),this.multiple="checkbox"===this.type,this.selectable&&(this.mdcList.listen(gt,this.handleAction),this.mdcList.singleSelection=!this.multiple))},this.teardown=()=>{var t,e;null===(t=this.mdcList)||void 0===t||t.unlisten(gt,this.handleAction),null===(e=this.mdcList)||void 0===e||e.destroy()},this.handleAction=t=>{this.multiple?this.handleMultiSelect(t.detail.index):this.handleSingleSelect(t.detail.index)},this.handleSingleSelect=t=>{const e=this.items.filter(this.isListItem);if(e[t].disabled)return;const i=e.find((t=>!!t.selected));let l;i&&("radio"!==this.type&&(this.mdcList.selectedIndex=-1),l=Object.assign(Object.assign({},i),{selected:!1}),this.change.emit(l)),e[t]!==i&&(l=Object.assign(Object.assign({},e[t]),{selected:!0}),this.change.emit(l)),this.interact.emit(l)},this.handleMultiSelect=t=>{const e=this.items.filter(this.isListItem);if(e[t].disabled)return;const i=e.filter(((e,i)=>i===t?!e.selected:e.selected)).map((t=>Object.assign(Object.assign({},t),{selected:!0})));this.change.emit(i),this.interact.emit(Object.assign({},i[t]))},this.isListItem=t=>!("separator"in t)}connectedCallback(){this.setup()}disconnectedCallback(){this.teardown()}componentDidLoad(){this.setup(),this.triggerIconColorWarning()}render(){var t;this.config={badgeIcons:this.badgeIcons,type:this.type,iconSize:this.iconSize};let e=+(null===(t=this.maxLinesSecondaryText)||void 0===t?void 0:t.toFixed());this.maxLinesSecondaryText<1&&(e=1);const l=this.listRenderer.render(this.items,this.config);return i(n,{key:"cc025328924cab9298919a2873ec1744aeed3dab",style:{"--maxLinesSecondaryText":`${e}`}},l)}handleType(){this.setupListeners()}itemsChanged(){this.mdcList&&setTimeout((()=>{this.setup();const t=this.items.filter(this.isListItem);if(this.multiple)this.mdcList.selectedIndex=t.filter((t=>t.selected)).map((e=>t.indexOf(e)));else{const e=t.findIndex((t=>t.selected));-1===e?this.mdcList.initializeListType():this.mdcList.selectedIndex=e}}),0)}triggerIconColorWarning(){var t;(null===(t=this.items)||void 0===t?void 0:t.some((t=>"iconColor"in t)))&&console.warn("The `iconColor` prop is deprecated, has no visual effect anymore, and will soon be removed! Use the new `Icon` interface, and instead of `iconColor: 'color-name'` write `icon: { name: 'icon-name', color: 'color-name' }`.")}static get delegatesFocus(){return!0}get element(){return l(this)}static get watchers(){return{type:[{handleType:0}],items:[{itemsChanged:0}]}}};vt.style='@charset "UTF-8";:host(.has-striped-rows) .mdc-deprecated-list{border:1px solid rgb(var(--contrast-400))}:host(.has-striped-rows) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(even),:host(.has-striped-rows.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(even){background-color:var(--list-background-color-of-odd-interactive-items, rgb(var(--contrast-200)))}:host(.has-striped-rows) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(odd),:host(.has-striped-rows.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(odd){background-color:var(--list-background-color-of-even-interactive-items, rgb(var(--contrast-100)))}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]){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}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus-visible{will-change:color, background-color, box-shadow, transform}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover{box-shadow:var(--button-shadow-hovered)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(.has-grid-layout){--gap:var(--list-grid-gap, 0.5rem);padding:var(--gap);}:host(.has-grid-layout) .mdc-deprecated-list{display:grid;gap:var(--gap);grid-template-columns:repeat(auto-fit, minmax(min(100%, max(var(--list-grid-item-max-width, 10rem) - var(--gap), var(--list-grid-item-min-width, 7.5rem))), 1fr));max-width:var(--list-grid-max-width, 100%)}:host(.has-grid-layout) .mdc-deprecated-list limel-list-item{border-radius:var(--limel-list-border-radius) !important}:host(.has-grid-layout) .mdc-deprecated-list-divider{grid-column:1/-1}:host(.static-actions-list){z-index:1;background-color:var(--limel-theme-surface-background-color)}:host(.has-position-sticky){position:sticky;box-shadow:0 0 0.75rem 0.5rem var(--limel-theme-surface-background-color)}:host(.has-position-sticky.is-on-top){top:0}:host(.has-position-sticky.is-at-bottom){bottom:0}:host(.is-on-top){border-bottom:1px solid rgb(var(--contrast-400));margin-bottom:0.5rem;padding-bottom:0.25rem}:host(.is-at-bottom){border-top:1px solid rgb(var(--contrast-400));margin-top:0.5rem;padding-top:0.25rem}:host(limel-list){--limel-list-border-radius:0.5rem;display:block;isolation:isolate}:host([hidden]){display:none}ul{--mdc-theme-text-icon-on-background:var( --icon-color, rgb(var(--contrast-900)) );margin:var(--list-margin, 0.25rem);border-radius:var(--limel-list-border-radius);padding:0;list-style:none}.mdc-deprecated-list-divider{border-bottom-color:transparent;display:flex;align-items:center;gap:0.75rem;height:auto;padding:0 0.5rem}.limel-list-divider-line{background-color:rgb(var(--contrast-400));height:0.125rem;border-radius:1rem;min-width:1rem;flex-grow:1}.limel-list-divider-title{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:rgb(var(--contrast-900));font-size:var(--limel-theme-default-small-font-size)}';const _t={text:"",icon:{name:"home"},type:"icon-only"},yt=class{constructor(l){t(this,l),this.cancel=e(this,"cancel"),this.select=e(this,"select"),this.navigateMenu=e(this,"navigateMenu"),this.items=[],this.disabled=!1,this.openDirection="bottom-start",this.surfaceWidth="inherit-from-items",this.open=!1,this.badgeIcons=!1,this.gridLayout=!1,this.loading=!1,this.rootItem=_t,this.renderLoader=()=>{if(!this.loadingSubItems&&!this.loading)return;const t=this.getCssProperties();return i("div",{style:{width:t["--menu-surface-width"],display:"flex","align-items":"center","justify-content":"center",padding:"0.5rem 0"}},i("limel-spinner",{size:"mini",limeBranded:!1}))},this.renderBreadcrumb=()=>{const t=this.getBreadcrumbsItems();if(0!==t.length)return i("limel-breadcrumbs",{ref:this.setBreadcrumbsElement,style:{"border-bottom":"solid 1px rgb(var(--contrast-500))","flex-shrink":"0"},onSelect:this.handleBreadcrumbsSelect,onKeyDown:this.handleBreadcrumbsKeyDown,items:t})},this.handleBreadcrumbsSelect=t=>{if(!t.detail.menuItem)return this.currentSubMenu=null,this.clearSearch(),this.navigateMenu.emit(null),void this.setFocus();this.handleSelect(t.detail.menuItem)},this.renderSearchField=()=>{if(this.searcher)return i("limel-input-field",{tabindex:"0",ref:this.setSearchElement,placeholder:this.searchPlaceholder,type:"search",leadingIcon:"search",style:{padding:"0.25rem","box-sizing":"border-box"},value:this.searchValue,onChange:this.handleTextInput,onKeyDown:this.handleInputKeyDown})},this.renderEmptyMessage=()=>{var t;return this.loading||this.loadingSubItems||!this.emptyResultMessage||!Array.isArray(this.searchResults)||(null===(t=this.searchResults)||void 0===t?void 0:t.length)?null:i("p",{style:{padding:"0 1rem","text-align":"center"}},this.emptyResultMessage)},this.renderMenuList=()=>{let t=this.visibleItems;return(this.loadingSubItems||this.loading)&&(t=[]),i("limel-menu-list",{style:{"overflow-y":"auto","flex-grow":"1"},class:{"has-grid-layout has-interactive-items":this.gridLayout},items:t,badgeIcons:this.badgeIcons,onSelect:this.onSelect,ref:this.setListElement,onKeyDown:this.handleMenuKeyDown})},this.handleTextInput=async t=>{t.stopPropagation();const e=t.detail;if(this.searchValue=e,""===e)return this.searchResults=null,void(this.loadingSubItems=!1);this.loadingSubItems=!0;const i=await this.searcher(e);this.searchValue===e&&(this.searchResults=i,this.loadingSubItems=!1)},this.handleInputKeyDown=t=>{const e=t.key===s&&!t.altKey&&!t.metaKey&&!t.shiftKey,i=t.key===m,l=t.key===h;if(e||i||l)if(t.stopPropagation(),t.preventDefault(),e||l){if(this.focusBreadcrumbs())return;this.focusFirstListItem()}else i&&this.focusLastListItem()},this.handleListKeyDownCapture=t=>{const e=t.key===m,i=t.key===h;if(e||i)return e&&this.isFirstListItemFocused()?this.focusBreadcrumbs()?(t.stopPropagation(),void t.preventDefault()):void(this.searchInput&&(t.stopPropagation(),t.preventDefault(),this.searchInput.focus())):void(i&&this.isLastListItemFocused()&&this.searchInput&&(t.stopPropagation(),t.preventDefault(),this.searchInput.focus()))},this.handleMenuKeyDown=t=>{var e;const i=t.key===s&&!t.altKey&&!t.metaKey&&t.shiftKey,l=t.key===p,n=t.key===b;if(i||l||n){if(i)return t.stopPropagation(),t.preventDefault(),void(null===(e=this.searchInput)||void 0===e||e.focus());if(!this.gridLayout&&(l||n)){const e=this.getCurrentItem();t.stopPropagation(),t.preventDefault(),n?this.goForward(e):l&&this.goBack()}}},this.handleBreadcrumbsKeyDown=t=>{var e;const i=t.key===m,l=t.key===h;(i||l)&&(t.stopPropagation(),t.preventDefault(),i?null===(e=this.searchInput)||void 0===e||e.focus():l&&this.focusFirstListItem())},this.clearSearch=()=>{this.searchValue="",this.searchResults=null,this.loadingSubItems=!1},this.getCurrentItem=()=>{var t,e,i,l,n,r;let d=null!==(i=null===(e=null===(t=this.list)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement)&&void 0!==i?i:null;d&&"menuitem"!==d.getAttribute("role")&&(d=d.closest('[role="menuitem"]')),d||(d=null===(n=null===(l=this.list)||void 0===l?void 0:l.shadowRoot)||void 0===n?void 0:n.querySelector('[role="menuitem"][tabindex="0"]'));const o=Number.parseInt(null!==(r=null==d?void 0:d.dataset.index)&&void 0!==r?r:"0",10),a=this.visibleItems[o];return null!=a?a:this.visibleItems[0]},this.goForward=t=>{this.handleSelect(t,!1)},this.goBack=()=>{if(!this.currentSubMenu)return;const t=this.currentSubMenu.parentItem;if(!t)return this.currentSubMenu=null,this.clearSearch(),this.navigateMenu.emit(null),void this.setFocus();this.handleSelect(t)},this.setTriggerAttributes=t=>{const e={"aria-haspopup":!0,"aria-expanded":this.open,"aria-controls":this.portalId,disabled:this.disabled,role:"button"};for(const[i,l]of Object.entries(e))l?t.setAttribute(i,String(l)):t.removeAttribute(i)},this.onClose=()=>{this.cancel.emit(),this.open=!1,this.currentSubMenu=null,setTimeout(this.focusTrigger,0)},this.onTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.open=!this.open)},this.handleSelect=async(t,e=!0)=>{if(Array.isArray(null==t?void 0:t.items)&&t.items.length>0)return this.selectedMenuItem=t,this.clearSearch(),this.currentSubMenu=t,this.navigateMenu.emit(t),void this.setFocus();if(R(null==t?void 0:t.items)){const e=t.items;this.selectedMenuItem=t,this.loadingSubItems=!0;const i=await e(t);if(this.selectedMenuItem!==t)return;if(t.items=i,this.loadingSubItems=!1,null==i?void 0:i.length)return this.currentSubMenu=t,this.clearSearch(),this.navigateMenu.emit(t),void this.setFocus()}e&&(this.selectedMenuItem=t,this.loadingSubItems=!1,this.select.emit(t),this.open=!1,this.currentSubMenu=null,setTimeout(this.focusTrigger,0))},this.onSelect=t=>{t.stopPropagation(),this.handleSelect(t.detail)},this.setListElement=t=>{this.list&&this.list.removeEventListener("keydown",this.handleListKeyDownCapture,!0),this.list=t,this.list&&this.list.addEventListener("keydown",this.handleListKeyDownCapture,!0)},this.setFocus=()=>{setTimeout((()=>{if(this.open)if(this.searchInput&&this.searcher){const t=new IntersectionObserver((()=>{t.unobserve(this.searchInput),this.searchInput!==window.document.activeElement&&this.searchInput.focus()}));t.observe(this.searchInput)}else if(this.list){const t=new IntersectionObserver((()=>{t.unobserve(this.list),this.focusMenuItem()}));t.observe(this.list)}}),0)},this.focusTrigger=()=>{var t,e;const i=null===(e=null===(t=this.triggerElement)||void 0===t?void 0:t.assignedElements())||void 0===e?void 0:e[0];S(i)},this.setSearchElement=t=>{this.searchInput=t},this.setBreadcrumbsElement=t=>{this.breadcrumbs=t},this.focusBreadcrumbs=()=>{var t;if(!this.breadcrumbs)return!1;const e=null===(t=this.breadcrumbs.shadowRoot)||void 0===t?void 0:t.querySelector("button, a");return!!e&&(e.focus(),!0)},this.focusFirstListItem=()=>{const t=this.getListItems(),e=null==t?void 0:t[0];null==e||e.focus()},this.focusLastListItem=()=>{const t=this.getListItems(),e=null==t?void 0:t.at(-1);null==e||e.focus()},this.isFirstListItemFocused=()=>{var t;const e=this.getListItems();return!!e&&e[0]===(null===(t=this.list.shadowRoot)||void 0===t?void 0:t.activeElement)},this.isLastListItemFocused=()=>{var t;const e=this.getListItems();return!!e&&e.at(-1)===(null===(t=this.list.shadowRoot)||void 0===t?void 0:t.activeElement)},this.getListItems=()=>{var t;if(!this.list)return null;const e=null===(t=this.list.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".mdc-deprecated-list-item");return(null==e?void 0:e.length)?[...e]:null},this.focusMenuItem=()=>{var t;if(!this.list)return;const e=this.list.shadowRoot.activeElement;null==e||e.blur();const i=this.visibleItems.filter(this.isMenuItem),l=Math.max(i.findIndex((t=>t.selected)),0);null===(t=[...this.list.shadowRoot.querySelectorAll('[role="menuitem"]')][l])||void 0===t||t.focus()},this.renderNotificationBadge=()=>{if(this.items.some(this.hasNotificationBadge))return i("limel-badge",null)},this.hasNotificationBadge=t=>this.isMenuItem(t)&&void 0!==t.badge,this.setTriggerRef=t=>{this.triggerElement=t},this.portalId=o()}componentDidRender(){this.host.shadowRoot.querySelector("slot").assignedElements().forEach(this.setTriggerAttributes)}render(){const t=this.getCssProperties(),e=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index"),l=this.getMenuSurfaceWidth(t["--menu-surface-width"]);return i("div",{key:"7769d71e01b3e7835fdec458a56858c10eb0c71a",class:"mdc-menu-surface--anchor",onClick:this.onTriggerClick},i("slot",{key:"800c993b63e1ae0fd94d1c984ffbfaef96eec627",ref:this.setTriggerRef,name:"trigger"}),this.renderNotificationBadge(),i("limel-portal",{key:"cc4da9d70f09030f4c41567611b42dda8ad4403e",visible:this.open,containerId:this.portalId,openDirection:this.openDirection,position:"absolute",containerStyle:{"z-index":e}},i("limel-menu-surface",{key:"5bb2a262f66d2f9b7bcbe46009574daf5eddf589",open:this.open,onDismiss:this.onClose,style:Object.assign(Object.assign({},t),{"--menu-surface-width":l,"--limel-menu-surface-display":"flex","--limel-menu-surface-flex-direction":"column"}),class:{"has-grid-layout":this.gridLayout}},this.renderSearchField(),this.renderBreadcrumb(),this.renderLoader(),this.renderEmptyMessage(),this.renderMenuList())))}itemsWatcher(){this.clearSearch(),this.setFocus()}openWatcher(t){t?this.setFocus():this.clearSearch()}getBreadcrumbsItems(){const t=[];let e=this.currentSubMenu;for(;e;)t.push({text:e.text,icon:e.icon,menuItem:e}),e=e.parentItem;return(t.length>0||this.rootItem!==_t)&&t.push(this.rootItem),t.reverse()}getCssProperties(){const t=["--menu-surface-width","--list-grid-item-max-width","--list-grid-item-min-width","--list-grid-gap","--notification-badge-background-color","--notification-badge-text-color"],e=getComputedStyle(this.host),i=t.map((t=>e.getPropertyValue(t)));return L(t,i)}isMenuItem(t){return!("separator"in t)}getMenuSurfaceWidth(t){var e,i,l,n;if(t)return t;if("inherit-from-trigger"===this.surfaceWidth){const t=null===(e=this.triggerElement)||void 0===e?void 0:e.assignedElements();return(null==t?void 0:t.length)&&(null===(i=t[0])||void 0===i?void 0:i.clientWidth)?`${t[0].clientWidth}px`:""}return"inherit-from-menu"===this.surfaceWidth&&(null===(l=this.host)||void 0===l?void 0:l.clientWidth)?`${null===(n=this.host)||void 0===n?void 0:n.clientWidth}px`:""}get visibleItems(){var t;return Array.isArray(this.searchResults)&&this.searchValue?this.searchResults:Array.isArray(null===(t=this.currentSubMenu)||void 0===t?void 0:t.items)?this.currentSubMenu.items.map((t=>Object.assign(Object.assign({},t),{parentItem:this.currentSubMenu}))):this.items}get host(){return l(this)}static get watchers(){return{items:[{itemsWatcher:0}],open:[{openWatcher:0}]}}};yt.style=":host(limel-menu){isolation:isolate;position:relative;display:inline-block;--badge-background-color:var( --notification-badge-background-color, rgb(var(--color-red-default)) );--badge-text-color:var( --notification-badge-text-color, rgb(var(--color-white)) )}:host([hidden]){display:none}.menu__trigger{border-color:transparent;border-width:1px;border-style:solid;background:none;color:rgb(var(--contrast-800));height:2.25rem}.menu__trigger-enabled:hover{border-color:rgb(var(--contrast-800));color:rgb(var(--contrast-1100))}.mdc-menu-surface--anchor{position:relative}limel-badge{position:absolute;top:-0.25rem;right:-0.25rem}";
90
+ */class bt{constructor(){this.defaultConfig={isOpen:!0,badgeIcons:!1},this.getAriaOrientation=t=>"listbox"===t||"radiogroup"===t?"vertical":null,this.getIndexForWhichToApplyTabIndex=t=>{let e;for(let i=0,l=t.length;i<l;i+=1)if("separator"in t[i]);else{const l=t[i];if(l.disabled)continue;if(l.selected){e=i;break}void 0===e&&(e=i)}return e},this.renderListItem=(t,e)=>{var l;if("separator"in t)return i("li",{class:"mdc-deprecated-list-divider",role:"separator",key:`sep-${e}`},this.renderTextForSeparator(t),i("div",{class:"limel-list-divider-line"}));const n={};let r;e===this.applyTabIndexToItemAtIndex&&(n.tabindex="0"),r="radio"===this.config.type||"checkbox"===this.config.type?this.config.type:"selectable"===this.config.type?"option":"listitem";const d=null!==(l=t.id)&&void 0!==l?l:`item-${e}`;return i("limel-list-item",Object.assign({key:d,class:{"mdc-deprecated-list-item":!0,"mdc-deprecated-list-item--disabled":!!t.disabled}},n,{"data-index":e,type:r,text:t.text,secondaryText:t.secondaryText,icon:t.icon,image:t.image,primaryComponent:t.primaryComponent,badgeIcon:this.config.badgeIcons,iconSize:this.config.iconSize,selected:t.selected,disabled:t.disabled,actions:t.actions}))},this.renderTextForSeparator=t=>{if("text"in t)return i("h2",{class:"limel-list-divider-title"},t.text)}}render(t,e={}){let l;switch(t=t||[],this.config=Object.assign(Object.assign({},this.defaultConfig),e),this.config.type){case"checkbox":l="group";break;case"radio":l="radiogroup";break;default:l="listbox"}return this.applyTabIndexToItemAtIndex=this.getIndexForWhichToApplyTabIndex(t),i("ul",{class:"mdc-deprecated-list",role:l,"aria-orientation":this.getAriaOrientation(l)},t.map(this.renderListItem))}}const{ACTION_EVENT:gt}=P,vt=class{constructor(i){t(this,i),this.change=e(this,"change"),this.select=e(this,"select"),this.interact=e(this,"interact"),this.iconSize="small",this.maxLinesSecondaryText=3,this.listRenderer=new bt,this.setup=()=>{this.setupList(),this.setupListeners()},this.setupList=()=>{this.mdcList&&(this.teardown(),this.mdcList=null);const t=this.element.shadowRoot.querySelector(".mdc-deprecated-list");t&&(this.mdcList=new pt(t),this.mdcList.hasTypeahead=!0)},this.setupListeners=()=>{this.mdcList&&(this.mdcList.unlisten(gt,this.handleAction),this.selectable=["selectable","radio","checkbox"].includes(this.type),this.multiple="checkbox"===this.type,this.selectable&&(this.mdcList.listen(gt,this.handleAction),this.mdcList.singleSelection=!this.multiple))},this.teardown=()=>{var t,e;null===(t=this.mdcList)||void 0===t||t.unlisten(gt,this.handleAction),null===(e=this.mdcList)||void 0===e||e.destroy()},this.handleAction=t=>{this.multiple?this.handleMultiSelect(t.detail.index):this.handleSingleSelect(t.detail.index)},this.handleSingleSelect=t=>{const e=this.items.filter(this.isListItem);if(e[t].disabled)return;const i=e.find((t=>!!t.selected));let l;i&&("radio"!==this.type&&(this.mdcList.selectedIndex=-1),l=Object.assign(Object.assign({},i),{selected:!1}),this.change.emit(l)),e[t]!==i&&(l=Object.assign(Object.assign({},e[t]),{selected:!0}),this.change.emit(l)),this.interact.emit(l)},this.handleMultiSelect=t=>{const e=this.items.filter(this.isListItem);if(e[t].disabled)return;const i=e.filter(((e,i)=>i===t?!e.selected:e.selected)).map((t=>Object.assign(Object.assign({},t),{selected:!0})));this.change.emit(i),this.interact.emit(Object.assign({},i[t]))},this.isListItem=t=>!("separator"in t)}connectedCallback(){this.setup()}disconnectedCallback(){this.teardown()}componentDidLoad(){this.setup(),this.triggerIconColorWarning()}render(){var t;this.config={badgeIcons:this.badgeIcons,type:this.type,iconSize:this.iconSize};let e=+(null===(t=this.maxLinesSecondaryText)||void 0===t?void 0:t.toFixed());this.maxLinesSecondaryText<1&&(e=1);const l=this.listRenderer.render(this.items,this.config);return i(n,{key:"e08edeaabf6b51f940e305539aecec91517a51ca",style:{"--maxLinesSecondaryText":`${e}`}},l)}handleType(){this.setupListeners()}itemsChanged(){this.mdcList&&setTimeout((()=>{this.setup();const t=this.items.filter(this.isListItem);if(this.multiple)this.mdcList.selectedIndex=t.filter((t=>t.selected)).map((e=>t.indexOf(e)));else{const e=t.findIndex((t=>t.selected));-1===e?this.mdcList.initializeListType():this.mdcList.selectedIndex=e}}),0)}triggerIconColorWarning(){var t;(null===(t=this.items)||void 0===t?void 0:t.some((t=>"iconColor"in t)))&&console.warn("The `iconColor` prop is deprecated, has no visual effect anymore, and will soon be removed! Use the new `Icon` interface, and instead of `iconColor: 'color-name'` write `icon: { name: 'icon-name', color: 'color-name' }`.")}static get delegatesFocus(){return!0}get element(){return l(this)}static get watchers(){return{type:[{handleType:0}],items:[{itemsChanged:0}]}}};vt.style='@charset "UTF-8";:host(.has-striped-rows) .mdc-deprecated-list{border:1px solid rgb(var(--contrast-400))}:host(.has-striped-rows) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(even),:host(.has-striped-rows.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(even){background-color:var(--list-background-color-of-odd-interactive-items, rgb(var(--contrast-200)))}:host(.has-striped-rows) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(odd),:host(.has-striped-rows.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(odd){background-color:var(--list-background-color-of-even-interactive-items, rgb(var(--contrast-100)))}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]){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}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus-visible{will-change:color, background-color, box-shadow, transform}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover{box-shadow:var(--button-shadow-hovered)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(.has-grid-layout){--gap:var(--list-grid-gap, 0.5rem);padding:var(--gap);}:host(.has-grid-layout) .mdc-deprecated-list{display:grid;gap:var(--gap);grid-template-columns:repeat(auto-fit, minmax(min(100%, max(var(--list-grid-item-max-width, 10rem) - var(--gap), var(--list-grid-item-min-width, 7.5rem))), 1fr));max-width:var(--list-grid-max-width, 100%)}:host(.has-grid-layout) .mdc-deprecated-list limel-list-item{border-radius:var(--limel-list-border-radius) !important}:host(.has-grid-layout) .mdc-deprecated-list-divider{grid-column:1/-1}:host(.static-actions-list){z-index:1;background-color:var(--limel-theme-surface-background-color)}:host(.has-position-sticky){position:sticky;box-shadow:0 0 0.75rem 0.5rem var(--limel-theme-surface-background-color)}:host(.has-position-sticky.is-on-top){top:0}:host(.has-position-sticky.is-at-bottom){bottom:0}:host(.is-on-top){border-bottom:1px solid rgb(var(--contrast-400));margin-bottom:0.5rem;padding-bottom:0.25rem}:host(.is-at-bottom){border-top:1px solid rgb(var(--contrast-400));margin-top:0.5rem;padding-top:0.25rem}:host(limel-list){--limel-list-border-radius:0.5rem;display:block;isolation:isolate}:host([hidden]){display:none}ul{--mdc-theme-text-icon-on-background:var( --icon-color, rgb(var(--contrast-900)) );margin:var(--list-margin, 0.25rem);border-radius:var(--limel-list-border-radius);padding:0;list-style:none}.mdc-deprecated-list-divider{border-bottom-color:transparent;display:flex;align-items:center;gap:0.75rem;height:auto;padding:0 0.5rem}.limel-list-divider-line{background-color:rgb(var(--contrast-400));height:0.125rem;border-radius:1rem;min-width:1rem;flex-grow:1}.limel-list-divider-title{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:rgb(var(--contrast-900));font-size:var(--limel-theme-default-small-font-size)}';const _t={text:"",icon:{name:"home"},type:"icon-only"},yt=class{constructor(l){t(this,l),this.cancel=e(this,"cancel"),this.select=e(this,"select"),this.navigateMenu=e(this,"navigateMenu"),this.items=[],this.disabled=!1,this.openDirection="bottom-start",this.surfaceWidth="inherit-from-items",this.open=!1,this.badgeIcons=!1,this.gridLayout=!1,this.loading=!1,this.rootItem=_t,this.shouldRestoreFocusOnClose=!1,this.renderLoader=()=>{if(!this.loadingSubItems&&!this.loading)return;const t=this.getCssProperties();return i("div",{style:{width:t["--menu-surface-width"],display:"flex","align-items":"center","justify-content":"center",padding:"0.5rem 0"}},i("limel-spinner",{size:"mini",limeBranded:!1}))},this.renderBreadcrumb=()=>{const t=this.getBreadcrumbsItems();if(0!==t.length)return i("limel-breadcrumbs",{ref:this.setBreadcrumbsElement,style:{"border-bottom":"solid 1px rgb(var(--contrast-500))","flex-shrink":"0"},onSelect:this.handleBreadcrumbsSelect,onKeyDown:this.handleBreadcrumbsKeyDown,items:t})},this.handleBreadcrumbsSelect=t=>{if(!t.detail.menuItem)return this.currentSubMenu=null,this.clearSearch(),this.navigateMenu.emit(null),void this.setFocus();this.handleSelect(t.detail.menuItem)},this.renderSearchField=()=>{if(this.searcher)return i("limel-input-field",{tabindex:"0",ref:this.setSearchElement,placeholder:this.searchPlaceholder,type:"search",leadingIcon:"search",style:{padding:"0.25rem","box-sizing":"border-box"},value:this.searchValue,onChange:this.handleTextInput,onKeyDown:this.handleInputKeyDown})},this.renderEmptyMessage=()=>{var t;return this.loading||this.loadingSubItems||!this.emptyResultMessage||!Array.isArray(this.searchResults)||(null===(t=this.searchResults)||void 0===t?void 0:t.length)?null:i("p",{style:{padding:"0 1rem","text-align":"center"}},this.emptyResultMessage)},this.renderMenuList=()=>{let t=this.visibleItems;return(this.loadingSubItems||this.loading)&&(t=[]),i("limel-menu-list",{style:{"overflow-y":"auto","flex-grow":"1"},class:{"has-grid-layout has-interactive-items":this.gridLayout},items:t,badgeIcons:this.badgeIcons,onSelect:this.onSelect,ref:this.setListElement,onKeyDown:this.handleMenuKeyDown})},this.handleTextInput=async t=>{t.stopPropagation();const e=t.detail;if(this.searchValue=e,""===e)return this.searchResults=null,void(this.loadingSubItems=!1);this.loadingSubItems=!0;const i=await this.searcher(e);this.searchValue===e&&(this.searchResults=i,this.loadingSubItems=!1)},this.handleInputKeyDown=t=>{const e=t.key===s&&!t.altKey&&!t.metaKey&&!t.shiftKey,i=t.key===m,l=t.key===h;if(e||i||l)if(t.stopPropagation(),t.preventDefault(),e||l){if(this.focusBreadcrumbs())return;this.focusFirstListItem()}else i&&this.focusLastListItem()},this.handleListKeyDownCapture=t=>{const e=t.key===m,i=t.key===h;if(e||i)return e&&this.isFirstListItemFocused()?this.focusBreadcrumbs()?(t.stopPropagation(),void t.preventDefault()):void(this.searchInput&&(t.stopPropagation(),t.preventDefault(),this.searchInput.focus())):void(i&&this.isLastListItemFocused()&&this.searchInput&&(t.stopPropagation(),t.preventDefault(),this.searchInput.focus()))},this.handleMenuKeyDown=t=>{var e;const i=t.key===s&&!t.altKey&&!t.metaKey&&t.shiftKey,l=t.key===p,n=t.key===b;if(i||l||n){if(i)return t.stopPropagation(),t.preventDefault(),void(null===(e=this.searchInput)||void 0===e||e.focus());if(!this.gridLayout&&(l||n)){const e=this.getCurrentItem();t.stopPropagation(),t.preventDefault(),n?this.goForward(e):l&&this.goBack()}}},this.handleBreadcrumbsKeyDown=t=>{var e;const i=t.key===m,l=t.key===h;(i||l)&&(t.stopPropagation(),t.preventDefault(),i?null===(e=this.searchInput)||void 0===e||e.focus():l&&this.focusFirstListItem())},this.clearSearch=()=>{this.searchValue="",this.searchResults=null,this.loadingSubItems=!1},this.getCurrentItem=()=>{var t,e,i,l,n,r;let d=null!==(i=null===(e=null===(t=this.list)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement)&&void 0!==i?i:null;d&&"menuitem"!==d.getAttribute("role")&&(d=d.closest('[role="menuitem"]')),d||(d=null===(n=null===(l=this.list)||void 0===l?void 0:l.shadowRoot)||void 0===n?void 0:n.querySelector('[role="menuitem"][tabindex="0"]'));const o=Number.parseInt(null!==(r=null==d?void 0:d.dataset.index)&&void 0!==r?r:"0",10),a=this.visibleItems[o];return null!=a?a:this.visibleItems[0]},this.goForward=t=>{this.handleSelect(t,!1)},this.goBack=()=>{if(!this.currentSubMenu)return;const t=this.currentSubMenu.parentItem;if(!t)return this.currentSubMenu=null,this.clearSearch(),this.navigateMenu.emit(null),void this.setFocus();this.handleSelect(t)},this.setTriggerAttributes=t=>{const e={"aria-haspopup":!0,"aria-expanded":this.open,"aria-controls":this.portalId,disabled:this.disabled,role:"button"};for(const[i,l]of Object.entries(e))l?t.setAttribute(i,String(l)):t.removeAttribute(i)},this.handleEscapeCapture=t=>{t.key===f&&this.open&&(this.shouldRestoreFocusOnClose=!0)},this.onClose=()=>{const t=this.shouldRestoreFocusOnClose;this.shouldRestoreFocusOnClose=!1,this.cancel.emit(),this.open=!1,this.currentSubMenu=null,t&&setTimeout(this.focusTrigger,0)},this.onTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.open=!this.open)},this.handleSelect=async(t,e=!0)=>{if(Array.isArray(null==t?void 0:t.items)&&t.items.length>0)return this.selectedMenuItem=t,this.clearSearch(),this.currentSubMenu=t,this.navigateMenu.emit(t),void this.setFocus();if(R(null==t?void 0:t.items)){const e=t.items;this.selectedMenuItem=t,this.loadingSubItems=!0;const i=await e(t);if(this.selectedMenuItem!==t)return;if(t.items=i,this.loadingSubItems=!1,null==i?void 0:i.length)return this.currentSubMenu=t,this.clearSearch(),this.navigateMenu.emit(t),void this.setFocus()}e&&(this.selectedMenuItem=t,this.loadingSubItems=!1,this.select.emit(t),this.open=!1,this.currentSubMenu=null,setTimeout(this.focusTrigger,0))},this.onSelect=t=>{t.stopPropagation(),this.handleSelect(t.detail)},this.setListElement=t=>{this.list&&this.list.removeEventListener("keydown",this.handleListKeyDownCapture,!0),this.list=t,this.list&&this.list.addEventListener("keydown",this.handleListKeyDownCapture,!0)},this.setFocus=()=>{setTimeout((()=>{if(this.open)if(this.searchInput&&this.searcher){const t=new IntersectionObserver((()=>{t.unobserve(this.searchInput),this.searchInput!==window.document.activeElement&&this.searchInput.focus()}));t.observe(this.searchInput)}else if(this.list){const t=new IntersectionObserver((()=>{t.unobserve(this.list),this.focusMenuItem()}));t.observe(this.list)}}),0)},this.focusTrigger=()=>{var t,e;const i=null===(e=null===(t=this.triggerElement)||void 0===t?void 0:t.assignedElements())||void 0===e?void 0:e[0];S(i)},this.setSearchElement=t=>{this.searchInput=t},this.setBreadcrumbsElement=t=>{this.breadcrumbs=t},this.focusBreadcrumbs=()=>{var t;if(!this.breadcrumbs)return!1;const e=null===(t=this.breadcrumbs.shadowRoot)||void 0===t?void 0:t.querySelector("button, a");return!!e&&(e.focus(),!0)},this.focusFirstListItem=()=>{const t=this.getListItems(),e=null==t?void 0:t[0];null==e||e.focus()},this.focusLastListItem=()=>{const t=this.getListItems(),e=null==t?void 0:t.at(-1);null==e||e.focus()},this.isFirstListItemFocused=()=>{var t;const e=this.getListItems();return!!e&&e[0]===(null===(t=this.list.shadowRoot)||void 0===t?void 0:t.activeElement)},this.isLastListItemFocused=()=>{var t;const e=this.getListItems();return!!e&&e.at(-1)===(null===(t=this.list.shadowRoot)||void 0===t?void 0:t.activeElement)},this.getListItems=()=>{var t;if(!this.list)return null;const e=null===(t=this.list.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".mdc-deprecated-list-item");return(null==e?void 0:e.length)?[...e]:null},this.focusMenuItem=()=>{var t;if(!this.list)return;const e=this.list.shadowRoot.activeElement;null==e||e.blur();const i=this.visibleItems.filter(this.isMenuItem),l=Math.max(i.findIndex((t=>t.selected)),0);null===(t=[...this.list.shadowRoot.querySelectorAll('[role="menuitem"]')][l])||void 0===t||t.focus()},this.renderNotificationBadge=()=>{if(this.items.some(this.hasNotificationBadge))return i("limel-badge",null)},this.hasNotificationBadge=t=>this.isMenuItem(t)&&void 0!==t.badge,this.setTriggerRef=t=>{this.triggerElement=t},this.portalId=o()}componentDidRender(){this.host.shadowRoot.querySelector("slot").assignedElements().forEach(this.setTriggerAttributes)}render(){const t=this.getCssProperties(),e=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index"),l=this.getMenuSurfaceWidth(t["--menu-surface-width"]);return i("div",{key:"a54987a1be3e3fcc4ceae95c7cc334411a0c474f",class:"mdc-menu-surface--anchor",onClick:this.onTriggerClick},i("slot",{key:"1bacdb5d1387b8357d1c6f93db47369c8cf64a4f",ref:this.setTriggerRef,name:"trigger"}),this.renderNotificationBadge(),i("limel-portal",{key:"fbc7982b1dcab9fd5172a95e7a7f0328281f3a35",visible:this.open,containerId:this.portalId,openDirection:this.openDirection,position:"absolute",containerStyle:{"z-index":e}},i("limel-menu-surface",{key:"48b96e2e6fe815f4cc976553dfea7b26f36ea6d4",open:this.open,onDismiss:this.onClose,style:Object.assign(Object.assign({},t),{"--menu-surface-width":l,"--limel-menu-surface-display":"flex","--limel-menu-surface-flex-direction":"column"}),class:{"has-grid-layout":this.gridLayout}},this.renderSearchField(),this.renderBreadcrumb(),this.renderLoader(),this.renderEmptyMessage(),this.renderMenuList())))}itemsWatcher(){this.clearSearch(),this.setFocus()}openWatcher(t){t?(document.addEventListener("keydown",this.handleEscapeCapture,!0),this.setFocus()):(document.removeEventListener("keydown",this.handleEscapeCapture,!0),this.clearSearch())}getBreadcrumbsItems(){const t=[];let e=this.currentSubMenu;for(;e;)t.push({text:e.text,icon:e.icon,menuItem:e}),e=e.parentItem;return(t.length>0||this.rootItem!==_t)&&t.push(this.rootItem),t.reverse()}getCssProperties(){const t=["--menu-surface-width","--list-grid-item-max-width","--list-grid-item-min-width","--list-grid-gap","--notification-badge-background-color","--notification-badge-text-color"],e=getComputedStyle(this.host),i=t.map((t=>e.getPropertyValue(t)));return L(t,i)}isMenuItem(t){return!("separator"in t)}getMenuSurfaceWidth(t){var e,i,l,n;if(t)return t;if("inherit-from-trigger"===this.surfaceWidth){const t=null===(e=this.triggerElement)||void 0===e?void 0:e.assignedElements();return(null==t?void 0:t.length)&&(null===(i=t[0])||void 0===i?void 0:i.clientWidth)?`${t[0].clientWidth}px`:""}return"inherit-from-menu"===this.surfaceWidth&&(null===(l=this.host)||void 0===l?void 0:l.clientWidth)?`${null===(n=this.host)||void 0===n?void 0:n.clientWidth}px`:""}get visibleItems(){var t;return Array.isArray(this.searchResults)&&this.searchValue?this.searchResults:Array.isArray(null===(t=this.currentSubMenu)||void 0===t?void 0:t.items)?this.currentSubMenu.items.map((t=>Object.assign(Object.assign({},t),{parentItem:this.currentSubMenu}))):this.items}get host(){return l(this)}static get watchers(){return{items:[{itemsWatcher:0}],open:[{openWatcher:0}]}}};yt.style=":host(limel-menu){isolation:isolate;position:relative;display:inline-block;--badge-background-color:var( --notification-badge-background-color, rgb(var(--color-red-default)) );--badge-text-color:var( --notification-badge-text-color, rgb(var(--color-white)) )}:host([hidden]){display:none}.menu__trigger{border-color:transparent;border-width:1px;border-style:solid;background:none;color:rgb(var(--contrast-800));height:2.25rem}.menu__trigger-enabled:hover{border-color:rgb(var(--contrast-800));color:rgb(var(--contrast-1100))}.mdc-menu-surface--anchor{position:relative}limel-badge{position:absolute;top:-0.25rem;right:-0.25rem}";
91
91
  /**
92
92
  * @license
93
93
  * Copyright 2018 Google Inc.
@@ -200,4 +200,4 @@ var Rt=function(t){function e(i){var l=t.call(this,T(T({},e.defaultAdapter),i))|
200
200
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
201
201
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
202
202
  * THE SOFTWARE.
203
- */class jt{constructor(){this.defaultConfig={isOpen:!0,badgeIcons:!1},this.getIndexForWhichToApplyTabIndex=t=>{let e;for(let i=0,l=t.length;i<l;i+=1)if("separator"in t[i]);else{const l=t[i];if(l.disabled)continue;if(l.selected){e=i;break}void 0===e&&(e=i)}return e},this.renderMenuItem=(t,e)=>{var l;if("separator"in t)return i("li",{class:"mdc-deprecated-list-divider",role:"separator",key:`sep-${e}`},this.renderTextForSeparator(t),i("div",{class:"limel-list-divider-line"}));const n={};e===this.applyTabIndexToItemAtIndex&&(n.tabindex="0");const r=this.hasSubItems(t),d=null!==(l=t.id)&&void 0!==l?l:`item-${e}`;return i("limel-list-item",Object.assign({key:d,class:{"mdc-deprecated-list-item":!0,"mdc-deprecated-list-item--disabled":!!t.disabled},"data-index":e},n,{"aria-haspopup":r?"menu":void 0,"aria-expanded":r?"false":void 0,type:"menuitem",text:t.text,secondaryText:t.secondaryText,icon:t.icon,primaryComponent:r||void 0!==t.badge||"commandText"in t&&t.commandText?{name:"limel-menu-item-meta",props:{commandText:t.commandText,badge:t.badge,showChevron:r}}:void 0,badgeIcon:this.config.badgeIcons,selected:t.selected,disabled:t.disabled}))},this.renderTextForSeparator=t=>{if("text"in t)return i("h2",{class:"limel-list-divider-title"},t.text)},this.hasSubItems=t=>Array.isArray(t.items)&&t.items.length>0||R(t.items)}render(t,e={}){return t=t||[],this.config=Object.assign(Object.assign({},this.defaultConfig),e),this.applyTabIndexToItemAtIndex=this.getIndexForWhichToApplyTabIndex(t),i("ul",{class:"mdc-deprecated-list",role:"menu","aria-orientation":"vertical",style:{"--maxLinesSecondaryText":"2"}},t.map(this.renderMenuItem))}}const{SELECTED_EVENT:Ft}=St,Nt=class{constructor(i){t(this,i),this.select=e(this,"select"),this.interact=e(this,"interact"),this.iconSize="small",this.MenuListRenderer=new jt,this.setup=()=>{this.setupMenu(),this.setupListeners()},this.setupMenu=()=>{this.mdcMenu&&(this.teardown(),this.mdcMenu=null);const t=this.element.shadowRoot.querySelector(".mdc-menu");if(t){this.mdcMenu=new Dt(t),this.mdcMenu.hasTypeahead=!0,this.mdcMenu.wrapFocus=!0;for(const t of this.mdcMenu.items)new j(t)}},this.setupListeners=()=>{this.mdcMenu&&(this.mdcMenu.unlisten(Ft,this.handleMenuSelect),this.mdcMenu.listen(Ft,this.handleMenuSelect))},this.teardown=()=>{var t,e;null===(t=this.mdcMenu)||void 0===t||t.unlisten(Ft,this.handleMenuSelect),null===(e=this.mdcMenu)||void 0===e||e.destroy()},this.handleMenuSelect=t=>{this.handleSingleSelect(t.detail.index)},this.handleSingleSelect=t=>{const e=this.items.filter(this.isMenuItem);if(e[t].disabled)return;const i=e.find((t=>!!t.selected));let l;i&&(l=Object.assign(Object.assign({},i),{selected:!1}),this.select.emit(l)),e[t]!==i&&(l=Object.assign(Object.assign({},e[t]),{selected:!1}),this.select.emit(l)),this.interact.emit(l)},this.isMenuItem=t=>!("separator"in t)}connectedCallback(){this.setup()}disconnectedCallback(){this.teardown()}componentDidLoad(){this.setup(),this.triggerIconColorWarning()}render(){this.config={badgeIcons:this.badgeIcons,iconSize:this.iconSize};const t=this.MenuListRenderer.render(this.items,this.config);return i("div",{key:"a0d43ee28ff19b78b99ed0ec7fc0d1ff79f235e0",class:"mdc-menu mdc-menu-surface"},t)}itemsChanged(){setTimeout((()=>{this.setup()}),0)}triggerIconColorWarning(){var t;(null===(t=this.items)||void 0===t?void 0:t.some((t=>"iconColor"in t)))&&console.warn("The `iconColor` prop is deprecated, has no visual effect anymore, and will soon be removed! Use the new `Icon` interface, and instead of `iconColor: 'color-name'` write `icon: { name: 'icon-name', color: 'color-name' }`.")}static get delegatesFocus(){return!0}get element(){return l(this)}static get watchers(){return{items:[{itemsChanged:0}]}}};Nt.style='@charset "UTF-8";:host(.has-striped-rows) .mdc-deprecated-list{border:1px solid rgb(var(--contrast-400))}:host(.has-striped-rows) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(even),:host(.has-striped-rows.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(even){background-color:var(--list-background-color-of-odd-interactive-items, rgb(var(--contrast-200)))}:host(.has-striped-rows) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(odd),:host(.has-striped-rows.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(odd){background-color:var(--list-background-color-of-even-interactive-items, rgb(var(--contrast-100)))}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]){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}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus-visible{will-change:color, background-color, box-shadow, transform}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover{box-shadow:var(--button-shadow-hovered)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(.has-grid-layout){--gap:var(--list-grid-gap, 0.5rem);padding:var(--gap);}:host(.has-grid-layout) .mdc-deprecated-list{display:grid;gap:var(--gap);grid-template-columns:repeat(auto-fit, minmax(min(100%, max(var(--list-grid-item-max-width, 10rem) - var(--gap), var(--list-grid-item-min-width, 7.5rem))), 1fr));max-width:var(--list-grid-max-width, 100%)}:host(.has-grid-layout) .mdc-deprecated-list limel-list-item{border-radius:var(--limel-list-border-radius) !important}:host(.has-grid-layout) .mdc-deprecated-list-divider{grid-column:1/-1}:host(.static-actions-list){z-index:1;background-color:var(--limel-theme-surface-background-color)}:host(.has-position-sticky){position:sticky;box-shadow:0 0 0.75rem 0.5rem var(--limel-theme-surface-background-color)}:host(.has-position-sticky.is-on-top){top:0}:host(.has-position-sticky.is-at-bottom){bottom:0}:host(.is-on-top){border-bottom:1px solid rgb(var(--contrast-400));margin-bottom:0.5rem;padding-bottom:0.25rem}:host(.is-at-bottom){border-top:1px solid rgb(var(--contrast-400));margin-top:0.5rem;padding-top:0.25rem}:host(limel-list){--limel-list-border-radius:0.5rem;display:block;isolation:isolate}:host([hidden]){display:none}ul{--mdc-theme-text-icon-on-background:var( --icon-color, rgb(var(--contrast-900)) );margin:var(--list-margin, 0.25rem);border-radius:var(--limel-list-border-radius);padding:0;list-style:none}.mdc-deprecated-list-divider{border-bottom-color:transparent;display:flex;align-items:center;gap:0.75rem;height:auto;padding:0 0.5rem}.limel-list-divider-line{background-color:rgb(var(--contrast-400));height:0.125rem;border-radius:1rem;min-width:1rem;flex-grow:1}.limel-list-divider-title{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:rgb(var(--contrast-900));font-size:var(--limel-theme-default-small-font-size)}:host(limel-menu-list){display:block;--badge-background-color:var( --notification-badge-background-color, rgb(var(--color-red-default)) );--badge-text-color:var( --notification-badge-text-color, rgb(var(--color-white)) )}.mdc-menu{max-height:70vh}.mdc-deprecated-list{margin:0.25rem}';const Mt=class{constructor(i){t(this,i),this.dismiss=e(this,"dismiss"),this.open=!1,this.setup=()=>{const t=this.host.shadowRoot.querySelector(".mdc-menu-surface");t&&(this.menuSurface=new Ot(t),this.menuSurface.setAnchorCorner(kt.TOP_START),document.addEventListener("mousedown",this.handleDocumentClick,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyDown))},this.teardown=()=>{var t;null===(t=this.menuSurface)||void 0===t||t.destroy(),document.removeEventListener("mousedown",this.handleDocumentClick,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyDown)},this.handleDocumentClick=t=>{const e=t.composedPath?t.composedPath():[];if(this.open&&!F(t.target,this.host)){if(this.allowClicksElement&&e.includes(this.allowClicksElement))return;this.dismiss.emit(),this.preventClickEventPropagation()}},this.preventClickEventPropagation=()=>{document.addEventListener("click",this.stopEvent,{capture:!0,once:!0}),document.addEventListener("mouseup",this.stopEvent,{capture:!0,once:!0}),document.addEventListener("mouseup",(()=>{document.removeEventListener("click",this.stopEvent,{capture:!0})}),{once:!0})},this.stopEvent=t=>{t.stopPropagation(),t.preventDefault()},this.handleKeyDown=t=>{this.open&&(t.key===f||t.key===s)&&(t.stopPropagation(),this.dismiss.emit())}}connectedCallback(){this.setup()}disconnectedCallback(){this.teardown()}componentDidLoad(){this.setup()}render(){return i("div",{key:"0d834530b1abaa97c0443447ae573ff4eb000ea7",class:{"mdc-menu":!0,"mdc-menu-surface":!0,"mdc-menu-surface--open":this.open,"mdc-elevation-transition":!0,"mdc-elevation--z4":!0},tabindex:"-1"},i("slot",{key:"caea2ed90273cdacfd7e79ae2f2b5aff476dc7ed"}))}get host(){return l(this)}};Mt.style=":host(limel-menu-surface){display:block;max-height:inherit}.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform, opacity;z-index:8;transition:opacity 0.03s linear, transform 0.12s cubic-bezier(0, 0, 0.2, 1), height 250ms cubic-bezier(0, 0, 0.2, 1)}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity 0.075s linear}.mdc-menu-surface{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left;}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-menu .mdc-deprecated-list-item__meta{color:rgba(0, 0, 0, 0.87)}.mdc-menu .mdc-deprecated-list-item__graphic{color:rgba(0, 0, 0, 0.87)}.mdc-menu{min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}.mdc-menu .mdc-deprecated-list{color:rgba(0, 0, 0, 0.87)}.mdc-menu .mdc-deprecated-list,.mdc-menu .mdc-list{position:relative}.mdc-menu .mdc-deprecated-list .mdc-elevation-overlay,.mdc-menu .mdc-list .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-menu .mdc-deprecated-list-divider{margin:8px 0}.mdc-menu .mdc-deprecated-list-item{user-select:none}.mdc-menu .mdc-deprecated-list-item--disabled{cursor:auto}.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__text,.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__graphic{pointer-events:none}.mdc-menu__selection-group{padding:0;fill:currentColor}.mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:56px;padding-right:16px}[dir=rtl] .mdc-menu__selection-group .mdc-deprecated-list-item,.mdc-menu__selection-group .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:56px;}.mdc-menu__selection-group .mdc-menu__selection-group-icon{left:16px;right:initial}[dir=rtl] .mdc-menu__selection-group .mdc-menu__selection-group-icon,.mdc-menu__selection-group .mdc-menu__selection-group-icon[dir=rtl]{left:initial;right:16px;}.mdc-menu__selection-group .mdc-menu__selection-group-icon{display:none;position:absolute;top:50%;transform:translateY(-50%)}.mdc-menu-item--selected .mdc-menu__selection-group-icon{display:inline}.mdc-menu-surface{opacity:1;display:var(--limel-menu-surface-display, block);flex-direction:var(--limel-menu-surface-flex-direction, row);max-height:inherit;position:relative;--mdc-menu-max-width:calc( 100vw - 2rem );width:var(--menu-surface-width, auto);background-color:var(--lime-elevated-surface-background-color)}:host(limel-menu-surface.has-grid-layout) .mdc-menu-surface{width:var(--menu-surface-width, min(100vw - 2rem, 40rem));max-width:unset}";const Bt=class{constructor(e){t(this,e),this.size="mini",this.limeBranded=!1}render(){return i(n,{key:"2ea3c8e615b6f95452c1ce2f8d5eb9ee989b8612"},i("svg",{key:"d0ff66dbbf8f7fefa0c6a52cd51a7fca2abe0c4a",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},this.renderSpinner()))}renderSpinner(){return this.limeBranded?i("g",null,i("g",{"clip-path":"url(#mask)"},i("circle",{class:"outline thick",cx:"12",cy:"12",r:"12"}),i("g",{class:"spinner"},i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}))),i("clipPath",{id:"mask"},i("path",{d:"M2.166 11.248C2.166 5.04 7.058 0 13.083 0 19.108 0 24 5.04 24 11.248c0 3.229-1.307 6.548-4.533 9.306-3.908 3.343-9.15 3.8-17.254 3.249-2.405-.164-2.753-.588-1.51-1.533C4.61 19.3 2.165 17.025 2.165 11.248zm3.124 9.834c5.563.227 9.416-.246 12.397-2.76 2.432-2.05 3.482-4.56 3.51-7.074.05-4.613-3.636-8.36-8.114-8.36-4.478 0-8.114 3.746-8.114 8.36 0 2.793.607 4.737.726 6.345.092 1.252.03 2.388-.405 3.49z"}))):i("g",null,i("circle",{class:"outline",cx:"12",cy:"12",r:"10"}),i("g",{class:"spinner"},i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"})))}};Bt.style=":host(limel-spinner){display:block}@keyframes spin{50%{transform:rotate(180deg)}100%{transform:rotate(720deg)}}@keyframes fade-in-the-spinner{0%{transform:scale(0.7);opacity:0}100%{transform:scale(1);opacity:1}}@keyframes animate-colored-circles{5%{stroke-dashoffset:0}10%,100%{stroke-dashoffset:63}}:host([hidden]){display:none}:host{box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:1.5rem;width:1.5rem;transform:translate3d(0, 0, 0);animation:fade-in-the-spinner 0.5s ease forwards}:host([size=x-small]){height:2rem;width:2rem}:host([size=small]){height:2.125rem;width:2.125rem}:host([size=medium]){height:2.75rem;width:2.75rem}:host([size=large]){height:4rem;width:4rem}.spinner{animation:spin 1s linear infinite;transform-origin:center}.color{animation:animate-colored-circles 10s linear infinite;fill:none;stroke-dasharray:63;stroke-dashoffset:63;stroke-linecap:round;stroke-width:4}.color.thick{stroke-width:10}.color:nth-child(1){stroke:var(--spinner-color-1, rgb(var(--lime-brand-color-lime-green)))}.color:nth-child(2){stroke:var(--spinner-color-2, rgb(var(--lime-brand-color-ocean-teal)));animation-delay:1s}.color:nth-child(3){stroke:var(--spinner-color-3, rgb(var(--lime-brand-color-aqua)));animation-delay:2s}.color:nth-child(4){stroke:var(--spinner-color-4, rgb(var(--lime-brand-color-bubble-gum)));animation-delay:3s}.color:nth-child(5){stroke:var(--spinner-color-5, rgb(var(--lime-brand-color-sunny-orange)));animation-delay:4s}.color:nth-child(6){stroke:var(--spinner-color-6, rgb(var(--lime-brand-color-lime-green)));animation-delay:5s}.color:nth-child(7){stroke:var(--spinner-color-7, rgb(var(--lime-brand-color-ocean-teal)));animation-delay:6s}.color:nth-child(8){stroke:var(--spinner-color-8, rgb(var(--lime-brand-color-aqua)));animation-delay:7s}.color:nth-child(9){stroke:var(--spinner-color-9, rgb(var(--lime-brand-color-bubble-gum)));animation-delay:8s}.color:nth-child(10){stroke:var(--spinner-color-10, rgb(var(--contrast-700)));animation-delay:9s}.outline{stroke:rgba(var(--lime-brand-color-light-grey), 0.3);fill:none;stroke-linecap:round;stroke-width:4}.outline.thick{stroke-width:10}";export{N as limel_breadcrumbs,M as limel_input_field,vt as limel_list,yt as limel_menu,Nt as limel_menu_list,Mt as limel_menu_surface,Bt as limel_spinner}
203
+ */class jt{constructor(){this.defaultConfig={isOpen:!0,badgeIcons:!1},this.getIndexForWhichToApplyTabIndex=t=>{let e;for(let i=0,l=t.length;i<l;i+=1)if("separator"in t[i]);else{const l=t[i];if(l.disabled)continue;if(l.selected){e=i;break}void 0===e&&(e=i)}return e},this.renderMenuItem=(t,e)=>{var l;if("separator"in t)return i("li",{class:"mdc-deprecated-list-divider",role:"separator",key:`sep-${e}`},this.renderTextForSeparator(t),i("div",{class:"limel-list-divider-line"}));const n={};e===this.applyTabIndexToItemAtIndex&&(n.tabindex="0");const r=this.hasSubItems(t),d=null!==(l=t.id)&&void 0!==l?l:`item-${e}`;return i("limel-list-item",Object.assign({key:d,class:{"mdc-deprecated-list-item":!0,"mdc-deprecated-list-item--disabled":!!t.disabled},"data-index":e},n,{"aria-haspopup":r?"menu":void 0,"aria-expanded":r?"false":void 0,type:"menuitem",text:t.text,secondaryText:t.secondaryText,icon:t.icon,primaryComponent:r||void 0!==t.badge||"commandText"in t&&t.commandText?{name:"limel-menu-item-meta",props:{commandText:t.commandText,badge:t.badge,showChevron:r}}:void 0,badgeIcon:this.config.badgeIcons,selected:t.selected,disabled:t.disabled}))},this.renderTextForSeparator=t=>{if("text"in t)return i("h2",{class:"limel-list-divider-title"},t.text)},this.hasSubItems=t=>Array.isArray(t.items)&&t.items.length>0||R(t.items)}render(t,e={}){return t=t||[],this.config=Object.assign(Object.assign({},this.defaultConfig),e),this.applyTabIndexToItemAtIndex=this.getIndexForWhichToApplyTabIndex(t),i("ul",{class:"mdc-deprecated-list",role:"menu","aria-orientation":"vertical",style:{"--maxLinesSecondaryText":"2"}},t.map(this.renderMenuItem))}}const{SELECTED_EVENT:Ft}=St,Nt=class{constructor(i){t(this,i),this.select=e(this,"select"),this.interact=e(this,"interact"),this.iconSize="small",this.MenuListRenderer=new jt,this.setup=()=>{this.setupMenu(),this.setupListeners()},this.setupMenu=()=>{this.mdcMenu&&(this.teardown(),this.mdcMenu=null);const t=this.element.shadowRoot.querySelector(".mdc-menu");if(t){this.mdcMenu=new Dt(t),this.mdcMenu.hasTypeahead=!0,this.mdcMenu.wrapFocus=!0;for(const t of this.mdcMenu.items)new j(t)}},this.setupListeners=()=>{this.mdcMenu&&(this.mdcMenu.unlisten(Ft,this.handleMenuSelect),this.mdcMenu.listen(Ft,this.handleMenuSelect))},this.teardown=()=>{var t,e;null===(t=this.mdcMenu)||void 0===t||t.unlisten(Ft,this.handleMenuSelect),null===(e=this.mdcMenu)||void 0===e||e.destroy()},this.handleMenuSelect=t=>{this.handleSingleSelect(t.detail.index)},this.handleSingleSelect=t=>{const e=this.items.filter(this.isMenuItem);if(e[t].disabled)return;const i=e.find((t=>!!t.selected));let l;i&&(l=Object.assign(Object.assign({},i),{selected:!1}),this.select.emit(l)),e[t]!==i&&(l=Object.assign(Object.assign({},e[t]),{selected:!1}),this.select.emit(l)),this.interact.emit(l)},this.isMenuItem=t=>!("separator"in t)}connectedCallback(){this.setup()}disconnectedCallback(){this.teardown()}componentDidLoad(){this.setup(),this.triggerIconColorWarning()}render(){this.config={badgeIcons:this.badgeIcons,iconSize:this.iconSize};const t=this.MenuListRenderer.render(this.items,this.config);return i("div",{key:"a0d43ee28ff19b78b99ed0ec7fc0d1ff79f235e0",class:"mdc-menu mdc-menu-surface"},t)}itemsChanged(){setTimeout((()=>{this.setup()}),0)}triggerIconColorWarning(){var t;(null===(t=this.items)||void 0===t?void 0:t.some((t=>"iconColor"in t)))&&console.warn("The `iconColor` prop is deprecated, has no visual effect anymore, and will soon be removed! Use the new `Icon` interface, and instead of `iconColor: 'color-name'` write `icon: { name: 'icon-name', color: 'color-name' }`.")}static get delegatesFocus(){return!0}get element(){return l(this)}static get watchers(){return{items:[{itemsChanged:0}]}}};Nt.style='@charset "UTF-8";:host(.has-striped-rows) .mdc-deprecated-list{border:1px solid rgb(var(--contrast-400))}:host(.has-striped-rows) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(even),:host(.has-striped-rows.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(even){background-color:var(--list-background-color-of-odd-interactive-items, rgb(var(--contrast-200)))}:host(.has-striped-rows) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(odd),:host(.has-striped-rows.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):not(:hover):nth-child(odd){background-color:var(--list-background-color-of-even-interactive-items, rgb(var(--contrast-100)))}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]){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}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus-visible{will-change:color, background-color, box-shadow, transform}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover{box-shadow:var(--button-shadow-hovered)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):hover,:host(.has-interactive-items) limel-list-item:not([disabled]):not([disabled=true]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(.has-grid-layout){--gap:var(--list-grid-gap, 0.5rem);padding:var(--gap);}:host(.has-grid-layout) .mdc-deprecated-list{display:grid;gap:var(--gap);grid-template-columns:repeat(auto-fit, minmax(min(100%, max(var(--list-grid-item-max-width, 10rem) - var(--gap), var(--list-grid-item-min-width, 7.5rem))), 1fr));max-width:var(--list-grid-max-width, 100%)}:host(.has-grid-layout) .mdc-deprecated-list limel-list-item{border-radius:var(--limel-list-border-radius) !important}:host(.has-grid-layout) .mdc-deprecated-list-divider{grid-column:1/-1}:host(.static-actions-list){z-index:1;background-color:var(--limel-theme-surface-background-color)}:host(.has-position-sticky){position:sticky;box-shadow:0 0 0.75rem 0.5rem var(--limel-theme-surface-background-color)}:host(.has-position-sticky.is-on-top){top:0}:host(.has-position-sticky.is-at-bottom){bottom:0}:host(.is-on-top){border-bottom:1px solid rgb(var(--contrast-400));margin-bottom:0.5rem;padding-bottom:0.25rem}:host(.is-at-bottom){border-top:1px solid rgb(var(--contrast-400));margin-top:0.5rem;padding-top:0.25rem}:host(limel-list){--limel-list-border-radius:0.5rem;display:block;isolation:isolate}:host([hidden]){display:none}ul{--mdc-theme-text-icon-on-background:var( --icon-color, rgb(var(--contrast-900)) );margin:var(--list-margin, 0.25rem);border-radius:var(--limel-list-border-radius);padding:0;list-style:none}.mdc-deprecated-list-divider{border-bottom-color:transparent;display:flex;align-items:center;gap:0.75rem;height:auto;padding:0 0.5rem}.limel-list-divider-line{background-color:rgb(var(--contrast-400));height:0.125rem;border-radius:1rem;min-width:1rem;flex-grow:1}.limel-list-divider-title{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:rgb(var(--contrast-900));font-size:var(--limel-theme-default-small-font-size)}:host(limel-menu-list){display:block;--badge-background-color:var( --notification-badge-background-color, rgb(var(--color-red-default)) );--badge-text-color:var( --notification-badge-text-color, rgb(var(--color-white)) )}.mdc-menu{max-height:70vh}.mdc-deprecated-list{margin:0.25rem}';const Mt=class{constructor(i){t(this,i),this.dismiss=e(this,"dismiss"),this.open=!1,this.setup=()=>{const t=this.host.shadowRoot.querySelector(".mdc-menu-surface");t&&(this.menuSurface=new Ot(t),this.menuSurface.setAnchorCorner(kt.TOP_START),document.addEventListener("mousedown",this.handleDocumentClick,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyDown))},this.teardown=()=>{var t;null===(t=this.menuSurface)||void 0===t||t.destroy(),document.removeEventListener("mousedown",this.handleDocumentClick,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyDown)},this.handleDocumentClick=t=>{const e=t.composedPath?t.composedPath():[];if(this.open&&!F(t.target,this.host)){if(this.allowClicksElement&&e.includes(this.allowClicksElement))return;this.dismiss.emit(),this.preventClickEventPropagation()}},this.preventClickEventPropagation=()=>{document.addEventListener("click",this.stopEvent,{capture:!0,once:!0}),document.addEventListener("mouseup",this.stopEvent,{capture:!0,once:!0}),document.addEventListener("mouseup",(()=>{document.removeEventListener("click",this.stopEvent,{capture:!0})}),{once:!0})},this.stopEvent=t=>{t.stopPropagation(),t.preventDefault()},this.handleKeyDown=t=>{this.open&&(t.key===f||t.key===s)&&(t.stopPropagation(),this.dismiss.emit())}}connectedCallback(){this.setup()}disconnectedCallback(){this.teardown()}componentDidLoad(){this.setup()}render(){return i("div",{key:"0d834530b1abaa97c0443447ae573ff4eb000ea7",class:{"mdc-menu":!0,"mdc-menu-surface":!0,"mdc-menu-surface--open":this.open,"mdc-elevation-transition":!0,"mdc-elevation--z4":!0},tabindex:"-1"},i("slot",{key:"caea2ed90273cdacfd7e79ae2f2b5aff476dc7ed"}))}get host(){return l(this)}};Mt.style=":host(limel-menu-surface){display:block;max-height:inherit}.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform, opacity;z-index:8;transition:opacity 0.03s linear, transform 0.12s cubic-bezier(0, 0, 0.2, 1), height 250ms cubic-bezier(0, 0, 0.2, 1)}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity 0.075s linear}.mdc-menu-surface{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left;}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-menu .mdc-deprecated-list-item__meta{color:rgba(0, 0, 0, 0.87)}.mdc-menu .mdc-deprecated-list-item__graphic{color:rgba(0, 0, 0, 0.87)}.mdc-menu{min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}.mdc-menu .mdc-deprecated-list{color:rgba(0, 0, 0, 0.87)}.mdc-menu .mdc-deprecated-list,.mdc-menu .mdc-list{position:relative}.mdc-menu .mdc-deprecated-list .mdc-elevation-overlay,.mdc-menu .mdc-list .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-menu .mdc-deprecated-list-divider{margin:8px 0}.mdc-menu .mdc-deprecated-list-item{user-select:none}.mdc-menu .mdc-deprecated-list-item--disabled{cursor:auto}.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__text,.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__graphic{pointer-events:none}.mdc-menu__selection-group{padding:0;fill:currentColor}.mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:56px;padding-right:16px}[dir=rtl] .mdc-menu__selection-group .mdc-deprecated-list-item,.mdc-menu__selection-group .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:56px;}.mdc-menu__selection-group .mdc-menu__selection-group-icon{left:16px;right:initial}[dir=rtl] .mdc-menu__selection-group .mdc-menu__selection-group-icon,.mdc-menu__selection-group .mdc-menu__selection-group-icon[dir=rtl]{left:initial;right:16px;}.mdc-menu__selection-group .mdc-menu__selection-group-icon{display:none;position:absolute;top:50%;transform:translateY(-50%)}.mdc-menu-item--selected .mdc-menu__selection-group-icon{display:inline}.mdc-menu-surface{opacity:1;display:var(--limel-menu-surface-display, block);flex-direction:var(--limel-menu-surface-flex-direction, row);max-height:inherit;position:relative;--mdc-menu-max-width:calc( 100vw - 2rem );width:var(--menu-surface-width, auto);background-color:var(--lime-elevated-surface-background-color)}:host(limel-menu-surface.has-grid-layout) .mdc-menu-surface{width:var(--menu-surface-width, min(100vw - 2rem, 40rem));max-width:unset}";const Bt=class{constructor(e){t(this,e),this.size="mini",this.limeBranded=!1}render(){return i(n,{key:"15c39e3df6a446d4f809e23d2316e535bf77dc99"},i("svg",{key:"e88d11c66514783aa11bb01c4e902a15d0cb6dd4",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},this.renderSpinner()))}renderSpinner(){return this.limeBranded?i("g",null,i("g",{"clip-path":"url(#mask)"},i("circle",{class:"outline thick",cx:"12",cy:"12",r:"12"}),i("g",{class:"spinner"},i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}),i("circle",{class:"color thick",cx:"12",cy:"12",r:"12"}))),i("clipPath",{id:"mask"},i("path",{d:"M2.166 11.248C2.166 5.04 7.058 0 13.083 0 19.108 0 24 5.04 24 11.248c0 3.229-1.307 6.548-4.533 9.306-3.908 3.343-9.15 3.8-17.254 3.249-2.405-.164-2.753-.588-1.51-1.533C4.61 19.3 2.165 17.025 2.165 11.248zm3.124 9.834c5.563.227 9.416-.246 12.397-2.76 2.432-2.05 3.482-4.56 3.51-7.074.05-4.613-3.636-8.36-8.114-8.36-4.478 0-8.114 3.746-8.114 8.36 0 2.793.607 4.737.726 6.345.092 1.252.03 2.388-.405 3.49z"}))):i("g",null,i("circle",{class:"outline",cx:"12",cy:"12",r:"10"}),i("g",{class:"spinner"},i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"}),i("circle",{class:"color",cx:"12",cy:"12",r:"10"})))}};Bt.style=":host(limel-spinner){display:block}@keyframes spin{50%{transform:rotate(180deg)}100%{transform:rotate(720deg)}}@keyframes fade-in-the-spinner{0%{transform:scale(0.7);opacity:0}100%{transform:scale(1);opacity:1}}@keyframes animate-colored-circles{5%{stroke-dashoffset:0}10%,100%{stroke-dashoffset:63}}:host([hidden]){display:none}:host{box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:1.5rem;width:1.5rem;transform:translate3d(0, 0, 0);animation:fade-in-the-spinner 0.5s ease forwards}:host([size=x-small]){height:2rem;width:2rem}:host([size=small]){height:2.125rem;width:2.125rem}:host([size=medium]){height:2.75rem;width:2.75rem}:host([size=large]){height:4rem;width:4rem}.spinner{animation:spin 1s linear infinite;transform-origin:center}.color{animation:animate-colored-circles 10s linear infinite;fill:none;stroke-dasharray:63;stroke-dashoffset:63;stroke-linecap:round;stroke-width:4}.color.thick{stroke-width:10}.color:nth-child(1){stroke:var(--spinner-color-1, rgb(var(--lime-brand-color-lime-green)))}.color:nth-child(2){stroke:var(--spinner-color-2, rgb(var(--lime-brand-color-ocean-teal)));animation-delay:1s}.color:nth-child(3){stroke:var(--spinner-color-3, rgb(var(--lime-brand-color-aqua)));animation-delay:2s}.color:nth-child(4){stroke:var(--spinner-color-4, rgb(var(--lime-brand-color-bubble-gum)));animation-delay:3s}.color:nth-child(5){stroke:var(--spinner-color-5, rgb(var(--lime-brand-color-sunny-orange)));animation-delay:4s}.color:nth-child(6){stroke:var(--spinner-color-6, rgb(var(--lime-brand-color-lime-green)));animation-delay:5s}.color:nth-child(7){stroke:var(--spinner-color-7, rgb(var(--lime-brand-color-ocean-teal)));animation-delay:6s}.color:nth-child(8){stroke:var(--spinner-color-8, rgb(var(--lime-brand-color-aqua)));animation-delay:7s}.color:nth-child(9){stroke:var(--spinner-color-9, rgb(var(--lime-brand-color-bubble-gum)));animation-delay:8s}.color:nth-child(10){stroke:var(--spinner-color-10, rgb(var(--contrast-700)));animation-delay:9s}.outline{stroke:rgba(var(--lime-brand-color-light-grey), 0.3);fill:none;stroke-linecap:round;stroke-width:4}.outline.thick{stroke-width:10}";export{N as limel_breadcrumbs,M as limel_input_field,vt as limel_list,yt as limel_menu,Nt as limel_menu_list,Mt as limel_menu_surface,Bt as limel_spinner}
@@ -1 +1 @@
1
- import{r as t,c as e,h as o,H as r}from"./p-DBTJNfo7.js";import{c as i}from"./p-JbKhhoXs.js";const a=class{constructor(o){t(this,o),this.change=e(this,"change"),this.value=[],this.disabled=!1,this.radioGroupName=i(),this.setSelectedButton=()=>{var t;this.selectedButtonId=null===(t=this.value.find((t=>t.selected)))||void 0===t?void 0:t.id},this.renderButton=this.renderButton.bind(this),this.onChange=this.onChange.bind(this),this.renderContent=this.renderContent.bind(this)}componentWillLoad(){this.setSelectedButton()}render(){return o(r,{key:"c8aa4d58a21bd6ef454b65c4858107c539716013",role:"radiogroup"},this.value.map(this.renderButton))}renderButton(t){const e=`b${t.id}`,r={button:!0,"button--selected":this.isButtonChecked(t)};return o("div",{class:r},o("input",{type:"radio",name:this.radioGroupName,checked:this.isButtonChecked(t),disabled:this.disabled,id:e,onChange:this.onChange}),o("label",{htmlFor:e},this.renderContent(t),this.renderBadge(t)))}renderContent(t){return t.icon?this.renderIcon(t):this.renderLabel(t)}isButtonChecked(t){return t.id===this.selectedButtonId}renderLabel(t){return o("span",{class:"button__label"},t.title)}renderIcon(t){const e=`i${t.id}`;return[o("limel-icon",{id:e,class:"button__icon","aria-label":t.title,name:t.icon,size:"small",badge:!0}),o("limel-tooltip",{elementId:e,label:t.title})]}renderBadge(t){if(t.badge)return o("limel-badge",{label:t.badge})}onChange(t){t.stopPropagation(),this.selectedButtonId=t.target.id.slice(1);const e=this.value.find((t=>t.id===this.selectedButtonId));this.change.emit(e)}valueChanged(){this.setSelectedButton()}static get watchers(){return{value:[{valueChanged:0}]}}};a.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limel-button-group){display:flex;box-sizing:border-box;align-items:center;border-radius:3.75rem;background-color:var(--button-group-background-color, rgb(var(--contrast-400)));width:max-content;max-width:100%;flex-wrap:nowrap}:host([disabled]:not([disabled=false])){cursor:not-allowed;opacity:0.4}.button{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}.button:hover,.button:focus,.button:focus-visible{will-change:color, background-color, box-shadow, transform}.button:hover,.button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.button:hover{box-shadow:var(--button-shadow-hovered)}.button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}.button:hover,.button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.button:has(input[disabled]):hover{box-shadow:none;transform:none}.button{position:relative;display:inline-grid;grid-auto-flow:column;align-items:center;max-width:100%;min-width:2rem;height:2rem;padding:0 0.0625rem;margin:0.125rem;border-radius:1rem;font-size:var(--limel-theme-default-font-size);user-select:none}.button:not(:last-child):after{content:"";display:block;height:1rem;width:0.125rem;border-radius:0.25rem;background-color:var(--button-group-text-color, rgb(var(--contrast-1200)));opacity:0.1;position:absolute;right:-0.1875rem;top:0;bottom:0;margin:auto}.button label{cursor:pointer;transition:color 0.2s ease;display:flex;align-items:center;flex:1;height:100%;min-width:0}.button label:has(>limel-badge) .button__label{padding-right:0.25rem}.button input[type=radio]{position:absolute;width:0;opacity:0}.button input[type=radio]:focus-visible+label:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:3.75rem;box-shadow:var(--shadow-depth-8-focused)}.button:focus-within{outline:none;color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button:only-child .button__label{padding-left:0.75rem}.button:first-child .button__label{padding-left:0.75rem}.button.button--selected{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset);color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button.button--selected:active{box-shadow:var(--button-shadow-inset-pressed)}.button__label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--limel-theme-default-small-font-size);padding:0 0.75rem}.button__icon{border-radius:50%;vertical-align:middle}limel-badge{margin-right:0.25rem;pointer-events:none}.button:not(.button--selected){--badge-background-color:rgb(var(--contrast-200))}';export{a as limel_button_group}
1
+ import{r as t,c as e,h as o,H as r}from"./p-DBTJNfo7.js";import{c as i}from"./p-JbKhhoXs.js";const a=class{constructor(o){t(this,o),this.change=e(this,"change"),this.value=[],this.disabled=!1,this.radioGroupName=i(),this.setSelectedButton=()=>{var t;this.selectedButtonId=null===(t=this.value.find((t=>t.selected)))||void 0===t?void 0:t.id},this.renderButton=this.renderButton.bind(this),this.onChange=this.onChange.bind(this),this.renderContent=this.renderContent.bind(this)}componentWillLoad(){this.setSelectedButton()}render(){return o(r,{key:"2295d3bf146ae9d3aa44c4a4c3281ce1b72d8a63",role:"radiogroup"},this.value.map(this.renderButton))}renderButton(t){const e=`b${t.id}`,r={button:!0,"button--selected":this.isButtonChecked(t)};return o("div",{class:r},o("input",{type:"radio",name:this.radioGroupName,checked:this.isButtonChecked(t),disabled:this.disabled,id:e,onChange:this.onChange}),o("label",{htmlFor:e},this.renderContent(t),this.renderBadge(t)))}renderContent(t){return t.icon?this.renderIcon(t):this.renderLabel(t)}isButtonChecked(t){return t.id===this.selectedButtonId}renderLabel(t){return o("span",{class:"button__label"},t.title)}renderIcon(t){const e=`i${t.id}`;return[o("limel-icon",{id:e,class:"button__icon","aria-label":t.title,name:t.icon,size:"small",badge:!0}),o("limel-tooltip",{elementId:e,label:t.title})]}renderBadge(t){if(t.badge)return o("limel-badge",{label:t.badge})}onChange(t){t.stopPropagation(),this.selectedButtonId=t.target.id.slice(1);const e=this.value.find((t=>t.id===this.selectedButtonId));this.change.emit(e)}valueChanged(){this.setSelectedButton()}static get watchers(){return{value:[{valueChanged:0}]}}};a.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limel-button-group){display:flex;box-sizing:border-box;align-items:center;border-radius:3.75rem;background-color:var(--button-group-background-color, rgb(var(--contrast-400)));width:max-content;max-width:100%;flex-wrap:nowrap}:host([disabled]:not([disabled=false])){cursor:not-allowed;opacity:0.4}.button{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}.button:hover,.button:focus,.button:focus-visible{will-change:color, background-color, box-shadow, transform}.button:hover,.button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.button:hover{box-shadow:var(--button-shadow-hovered)}.button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}.button:hover,.button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.button:has(input[disabled]):hover{box-shadow:none;transform:none}.button{position:relative;display:inline-grid;grid-auto-flow:column;align-items:center;max-width:100%;min-width:2rem;height:2rem;padding:0 0.0625rem;margin:0.125rem;border-radius:1rem;font-size:var(--limel-theme-default-font-size);user-select:none}.button:not(:last-child):after{content:"";display:block;height:1rem;width:0.125rem;border-radius:0.25rem;background-color:var(--button-group-text-color, rgb(var(--contrast-1200)));opacity:0.1;position:absolute;right:-0.1875rem;top:0;bottom:0;margin:auto}.button label{cursor:pointer;transition:color 0.2s ease;display:flex;align-items:center;flex:1;height:100%;min-width:0}.button label:has(>limel-badge) .button__label{padding-right:0.25rem}.button input[type=radio]{position:absolute;width:0;opacity:0}.button input[type=radio]:focus-visible+label:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:3.75rem;box-shadow:var(--shadow-depth-8-focused)}.button:focus-within{outline:none;color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button:only-child .button__label{padding-left:0.75rem}.button:first-child .button__label{padding-left:0.75rem}.button.button--selected{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset);color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button.button--selected:active{box-shadow:var(--button-shadow-inset-pressed)}.button__label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--limel-theme-default-small-font-size);padding:0 0.75rem}.button__icon{border-radius:50%;vertical-align:middle}limel-badge{margin-right:0.25rem;pointer-events:none}.button:not(.button--selected){--badge-background-color:rgb(var(--contrast-200))}';export{a as limel_button_group}