@limetech/lime-elements 39.29.2 → 39.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-breadcrumbs_8.cjs.entry.js +9 -3
- package/dist/cjs/limel-form.cjs.entry.js +71 -11
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/form/adapters/widget-adapter.js +3 -1
- package/dist/collection/components/form/fields/array-field.js +7 -1
- package/dist/collection/components/form/fields/schema-field.js +3 -1
- package/dist/collection/components/form/form.js +30 -1
- package/dist/collection/components/form/form.test-schemas.js +41 -0
- package/dist/collection/components/form/templates/array-context.js +11 -0
- package/dist/collection/components/form/templates/array-field-collapsible-item.js +4 -2
- package/dist/collection/components/form/templates/array-field-item.js +4 -1
- package/dist/collection/components/form/templates/common.js +22 -0
- package/dist/collection/components/form/templates/object-field.js +5 -1
- package/dist/collection/components/form/validation-display.js +7 -6
- package/dist/collection/components/input-field/input-field.js +7 -1
- package/dist/collection/components/list/list.css +8 -1
- package/dist/collection/components/menu-list/menu-list.css +8 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-breadcrumbs_8.entry.js +9 -3
- package/dist/esm/limel-form.entry.js +71 -11
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-263bfd74.entry.js → p-d8b3e0ad.entry.js} +2 -2
- package/dist/lime-elements/{p-dcffc27b.entry.js → p-e5e8a734.entry.js} +3 -3
- package/dist/types/components/form/form.d.ts +8 -0
- package/dist/types/components/form/form.test-schemas.d.ts +3 -0
- package/dist/types/components/form/templates/array-context.d.ts +12 -0
- package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +14 -1
- package/dist/types/components/form/templates/common.d.ts +13 -0
- package/dist/types/components/form/templates/object-field.d.ts +1 -0
- package/dist/types/components/form/validation-display.d.ts +3 -5
- package/dist/types/components.d.ts +15 -0
- package/package.json +7 -1
|
@@ -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 o}from"./p-BgTwPGeH.js";import{c as d}from"./p-JbKhhoXs.js";import{g as a,b as s}from"./p-CgNJbSP4.js";import{T as c,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 A,d as C,c as O,b as z}from"./p-ChRGk668.js";import{f as S,z as R}from"./p-D0F7gOYG.js";import{h as L,t as D,n as j}from"./p-BxrRWYts.js";import{i as F}from"./p-BcJ-TDVt.js";import{M}from"./p-BN1-aIOw.js";import{i as N}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-ByzvFNMm.js";import"./p-9W8bTt2G.js";import"./p-DbBZn7JO.js";import"./p-CZ30nDJE.js";const B=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=d();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=d();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=s(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:"8d25beefb4884a5ca5f20685d93f26926811ddc3",role:"navigation","aria-label":"Breadcrumb",style:{"--limel-breadcrumbs-divider":`'${this.divider}'`}},this.renderSteps(),this.renderLastStep())}componentWillLoad(){r(this.host)}disconnectedCallback(){o(this.host)}get host(){return l(this)}};B.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 Y=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===c&&!t.altKey&&!t.metaKey&&!t.shiftKey,i=t.key===m,l=t.key===h;if(t.key===c&&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=>{[c,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=d(),this.helperTextId=d(),this.labelId=d()}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:"34d09f71861157cae3b4caa923c0c6c717f746a0"},i("limel-notched-outline",{key:"6184e68299c829dab64010a244801df550278f1c",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:"6edebc70941a0a6d3867beb4398a2dd9ccbace03",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 o}from"./p-BgTwPGeH.js";import{c as d}from"./p-JbKhhoXs.js";import{g as a,b as s}from"./p-CgNJbSP4.js";import{T as c,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 A,d as C,c as O,b as z}from"./p-ChRGk668.js";import{f as S,z as R}from"./p-D0F7gOYG.js";import{h as L,t as D,n as j}from"./p-BxrRWYts.js";import{i as F}from"./p-BcJ-TDVt.js";import{M}from"./p-BN1-aIOw.js";import{i as N}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-ByzvFNMm.js";import"./p-9W8bTt2G.js";import"./p-DbBZn7JO.js";import"./p-CZ30nDJE.js";const B=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=d();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=d();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=s(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:"8d25beefb4884a5ca5f20685d93f26926811ddc3",role:"navigation","aria-label":"Breadcrumb",style:{"--limel-breadcrumbs-divider":`'${this.divider}'`}},this.renderSteps(),this.renderLastStep())}componentWillLoad(){r(this.host)}disconnectedCallback(){o(this.host)}get host(){return l(this)}};B.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 Y=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===c&&!t.altKey&&!t.metaKey&&!t.shiftKey,i=t.key===m,l=t.key===h;if(t.key===c&&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=>{[c,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=d(),this.helperTextId=d(),this.labelId=d()}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.wasInvalid||(this.mdcTextField.valid=!0),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:"883ac6e2bbca1b5491ed08d432101fb03984992a"},i("limel-notched-outline",{key:"c0ff8073d2cc6a0960513d7e038643373fe30af3",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:"c28e3ca982d3c11c521db80212f86d287e2b586b",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 X,U;Y.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 vt{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 o=null!==(l=t.id)&&void 0!==l?l:`item-${e}`;return i("limel-list-item",Object.assign({key:o,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:_t}=W,yt=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 vt,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 gt(t),this.mdcList.hasTypeahead=!0)},this.setupListeners=()=>{this.mdcList&&(this.mdcList.unlisten(_t,this.handleAction),this.selectable=["selectable","radio","checkbox"].includes(this.type),this.multiple="checkbox"===this.type,this.selectable&&(this.mdcList.listen(_t,this.handleAction),this.mdcList.singleSelection=!this.multiple))},this.teardown=()=>{var t,e;null===(t=this.mdcList)||void 0===t||t.unlisten(_t,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:"e757da44c3f4481f3410cf40ab2361f76ebd0a32",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}]}}};yt.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 wt={text:"",icon:{name:"home"},type:"icon-only"},kt=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=wt,this.keepOpenOnSelect=!1,this.shouldRestoreFocusOnClose=!1,this.normalizedHotkeyCache=new Map,this.cachedSubMenuSource=null,this.cachedSubMenuItems=null,this.handleDocumentKeyDown=t=>{if(t.key===f&&this.open&&(this.shouldRestoreFocusOnClose=!0),!this.open||t.defaultPrevented||t.repeat)return;if(this.isFromTextInput(t)&&!this.hasModifier(t))return;const e=L(t);if(!e)return;if(this.isReservedMenuHotkey(e))return;const i=this.findMenuItemByHotkey(e);i&&(t.stopPropagation(),t.preventDefault(),this.handleSelect(i))},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=>{if(t.defaultPrevented)return;const e=t.key===c&&!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===c&&!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.refreshSearch=async()=>{const t=this.searchValue;this.loadingSubItems=!0;const e=await this.searcher(t);this.searchValue===t&&(this.searchResults=e,this.loadingSubItems=!1,this.setFocus())},this.clearSearch=()=>{this.searchValue="",this.searchResults=null,this.loadingSubItems=!1},this.getCurrentItem=()=>{var t,e,i,l,n,r;let o=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;o&&"menuitem"!==o.getAttribute("role")&&(o=o.closest('[role="menuitem"]')),o||(o=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 d=Number.parseInt(null!==(r=null==o?void 0:o.dataset.index)&&void 0!==r?r:"0",10),a=this.visibleItems[d];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=()=>{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(F(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.keepOpenOnSelect?F(this.searcher)&&this.searchValue&&this.refreshSearch():(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=d()}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:"2addbcfc2cbca1caa57fdb4a427b451f60454ede",class:"mdc-menu-surface--anchor",onClick:this.onTriggerClick},i("slot",{key:"333676daa0bc2b081ff01d291d5d3a638005f914",ref:this.setTriggerRef,name:"trigger"}),this.renderNotificationBadge(),i("limel-portal",{key:"0edcb78babb961011c386df3d014e08863588846",visible:this.open,containerId:this.portalId,openDirection:this.openDirection,position:"absolute",containerStyle:{"z-index":e}},i("limel-menu-surface",{key:"cba2146082e1576d472814235bae368ff5b546a3",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.normalizedHotkeyCache.clear(),this.setFocus()}connectedCallback(){this.open&&document.addEventListener("keydown",this.handleDocumentKeyDown,!0)}disconnectedCallback(){document.removeEventListener("keydown",this.handleDocumentKeyDown,!0)}openWatcher(t){t?(document.addEventListener("keydown",this.handleDocumentKeyDown,!0),this.setFocus()):(document.removeEventListener("keydown",this.handleDocumentKeyDown,!0),this.clearSearch())}isFromTextInput(t){const e="function"==typeof t.composedPath?t.composedPath():[];for(const t of e){if(!(t instanceof HTMLElement))continue;if(t.isContentEditable)return!0;const e=t.tagName;if("INPUT"===e||"TEXTAREA"===e||"SELECT"===e)return!0}return!1}hasModifier(t){var e;return!(null===(e=t.getModifierState)||void 0===e?void 0:e.call(t,"AltGraph"))&&(t.ctrlKey||t.metaKey)}isReservedMenuHotkey(t){const e=D(t),i=e.at(-1);return!!i&&!(e.length>1||"arrowup"!==i&&"arrowdown"!==i&&"arrowleft"!==i&&"arrowright"!==i&&"tab"!==i&&"enter"!==i&&"space"!==i&&"escape"!==i)}findMenuItemByHotkey(t){for(const e of this.visibleItems){if(!this.isMenuItem(e)||e.disabled)continue;const i=e.hotkey;if(!i)continue;const l=this.getNormalizedHotkey(i);if(l&&l===t)return e}return null}getNormalizedHotkey(t){var e;const i=t.trim();if(this.normalizedHotkeyCache.has(i))return null!==(e=this.normalizedHotkeyCache.get(i))&&void 0!==e?e:null;const l=j(i);return this.normalizedHotkeyCache.set(i,l),l}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!==wt)&&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 R(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.cachedSubMenuSource!==this.currentSubMenu&&(this.cachedSubMenuSource=this.currentSubMenu,this.cachedSubMenuItems=this.currentSubMenu.items.map((t=>Object.assign(Object.assign({},t),{parentItem:this.currentSubMenu})))),this.cachedSubMenuItems):this.items}get host(){return l(this)}static get watchers(){return{items:[{itemsWatcher:0}],open:[{openWatcher:0}]}}};kt.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 vt{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 o=null!==(l=t.id)&&void 0!==l?l:`item-${e}`;return i("limel-list-item",Object.assign({key:o,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:_t}=W,yt=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 vt,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 gt(t),this.mdcList.hasTypeahead=!0)},this.setupListeners=()=>{this.mdcList&&(this.mdcList.unlisten(_t,this.handleAction),this.selectable=["selectable","radio","checkbox"].includes(this.type),this.multiple="checkbox"===this.type,this.selectable&&(this.mdcList.listen(_t,this.handleAction),this.mdcList.singleSelection=!this.multiple))},this.teardown=()=>{var t,e;null===(t=this.mdcList)||void 0===t||t.unlisten(_t,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:"e757da44c3f4481f3410cf40ab2361f76ebd0a32",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}]}}};yt.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.25rem;margin-bottom:0.5rem}.mdc-deprecated-list-divider:not(:first-child){margin-top:0.75rem}:host(.has-striped-rows) .mdc-deprecated-list-divider{margin-top: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 wt={text:"",icon:{name:"home"},type:"icon-only"},kt=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=wt,this.keepOpenOnSelect=!1,this.shouldRestoreFocusOnClose=!1,this.normalizedHotkeyCache=new Map,this.cachedSubMenuSource=null,this.cachedSubMenuItems=null,this.handleDocumentKeyDown=t=>{if(t.key===f&&this.open&&(this.shouldRestoreFocusOnClose=!0),!this.open||t.defaultPrevented||t.repeat)return;if(this.isFromTextInput(t)&&!this.hasModifier(t))return;const e=L(t);if(!e)return;if(this.isReservedMenuHotkey(e))return;const i=this.findMenuItemByHotkey(e);i&&(t.stopPropagation(),t.preventDefault(),this.handleSelect(i))},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=>{if(t.defaultPrevented)return;const e=t.key===c&&!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===c&&!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.refreshSearch=async()=>{const t=this.searchValue;this.loadingSubItems=!0;const e=await this.searcher(t);this.searchValue===t&&(this.searchResults=e,this.loadingSubItems=!1,this.setFocus())},this.clearSearch=()=>{this.searchValue="",this.searchResults=null,this.loadingSubItems=!1},this.getCurrentItem=()=>{var t,e,i,l,n,r;let o=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;o&&"menuitem"!==o.getAttribute("role")&&(o=o.closest('[role="menuitem"]')),o||(o=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 d=Number.parseInt(null!==(r=null==o?void 0:o.dataset.index)&&void 0!==r?r:"0",10),a=this.visibleItems[d];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=()=>{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(F(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.keepOpenOnSelect?F(this.searcher)&&this.searchValue&&this.refreshSearch():(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=d()}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:"2addbcfc2cbca1caa57fdb4a427b451f60454ede",class:"mdc-menu-surface--anchor",onClick:this.onTriggerClick},i("slot",{key:"333676daa0bc2b081ff01d291d5d3a638005f914",ref:this.setTriggerRef,name:"trigger"}),this.renderNotificationBadge(),i("limel-portal",{key:"0edcb78babb961011c386df3d014e08863588846",visible:this.open,containerId:this.portalId,openDirection:this.openDirection,position:"absolute",containerStyle:{"z-index":e}},i("limel-menu-surface",{key:"cba2146082e1576d472814235bae368ff5b546a3",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.normalizedHotkeyCache.clear(),this.setFocus()}connectedCallback(){this.open&&document.addEventListener("keydown",this.handleDocumentKeyDown,!0)}disconnectedCallback(){document.removeEventListener("keydown",this.handleDocumentKeyDown,!0)}openWatcher(t){t?(document.addEventListener("keydown",this.handleDocumentKeyDown,!0),this.setFocus()):(document.removeEventListener("keydown",this.handleDocumentKeyDown,!0),this.clearSearch())}isFromTextInput(t){const e="function"==typeof t.composedPath?t.composedPath():[];for(const t of e){if(!(t instanceof HTMLElement))continue;if(t.isContentEditable)return!0;const e=t.tagName;if("INPUT"===e||"TEXTAREA"===e||"SELECT"===e)return!0}return!1}hasModifier(t){var e;return!(null===(e=t.getModifierState)||void 0===e?void 0:e.call(t,"AltGraph"))&&(t.ctrlKey||t.metaKey)}isReservedMenuHotkey(t){const e=D(t),i=e.at(-1);return!!i&&!(e.length>1||"arrowup"!==i&&"arrowdown"!==i&&"arrowleft"!==i&&"arrowright"!==i&&"tab"!==i&&"enter"!==i&&"space"!==i&&"escape"!==i)}findMenuItemByHotkey(t){for(const e of this.visibleItems){if(!this.isMenuItem(e)||e.disabled)continue;const i=e.hotkey;if(!i)continue;const l=this.getNormalizedHotkey(i);if(l&&l===t)return e}return null}getNormalizedHotkey(t){var e;const i=t.trim();if(this.normalizedHotkeyCache.has(i))return null!==(e=this.normalizedHotkeyCache.get(i))&&void 0!==e?e:null;const l=j(i);return this.normalizedHotkeyCache.set(i,l),l}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!==wt)&&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 R(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.cachedSubMenuSource!==this.currentSubMenu&&(this.cachedSubMenuSource=this.currentSubMenu,this.cachedSubMenuItems=this.currentSubMenu.items.map((t=>Object.assign(Object.assign({},t),{parentItem:this.currentSubMenu})))),this.cachedSubMenuItems):this.items}get host(){return l(this)}static get watchers(){return{items:[{itemsWatcher:0}],open:[{openWatcher:0}]}}};kt.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.
|
|
@@ -245,4 +245,4 @@ var Ft=function(t){function e(i){var l=t.call(this,T(T({},e.defaultAdapter),i))|
|
|
|
245
245
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
246
246
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
247
247
|
* THE SOFTWARE.
|
|
248
|
-
*/class Nt{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),o=null!==(l=t.id)&&void 0!==l?l:`item-${e}`;return i("limel-list-item",Object.assign({key:o,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||t.hotkey||t.commandText?{name:"limel-menu-item-meta",props:{commandText:t.commandText,hotkey:t.hotkey,disabled:!!t.disabled,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||F(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:Bt}=Dt,Yt=class{constructor(i){t(this,i),this.select=e(this,"select"),this.interact=e(this,"interact"),this.iconSize="small",this.MenuListRenderer=new Nt,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 Mt(t),this.mdcMenu.hasTypeahead=!0,this.mdcMenu.wrapFocus=!0;for(const t of this.mdcMenu.items)new M(t)}},this.setupListeners=()=>{this.mdcMenu&&(this.mdcMenu.unlisten(Bt,this.handleMenuSelect),this.mdcMenu.listen(Bt,this.handleMenuSelect))},this.teardown=()=>{var t,e;null===(t=this.mdcMenu)||void 0===t||t.unlisten(Bt,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:"1c044c711555d155c5559f8b787a3bbad09b7526",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}]}}};Yt.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 Xt=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 Rt(t),this.menuSurface.setAnchorCorner(Tt.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&&!N(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===c)&&(t.stopPropagation(),this.dismiss.emit())}}connectedCallback(){this.setup()}disconnectedCallback(){this.teardown()}componentDidLoad(){this.setup()}render(){return i("div",{key:"254247a3cd25908f96e55028df567663dd4d736a",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:"eb7d1042a28585242d212cf40a34018240cb0502"}))}get host(){return l(this)}};Xt.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 Ut=class{constructor(e){t(this,e),this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.hasValue=!1,this.hasLeadingIcon=!1,this.hasFloatingLabel=!1}render(){return i("div",{key:"5dd66f7356821043d750963f18ef8f39889e65cc",class:"limel-notched-outline"},i("slot",{key:"1b2072f7acd112137188b570229470677458ace7",name:"content"}),i("span",{key:"3d1d04a75ff0459b53294a2b2bbb4f15192409cd",class:"limel-notched-outline--outlines","aria-hidden":"true"},i("span",{key:"9677d3b3bc1f37e954c3ab2907e98db8b9122466",class:"limel-notched-outline--leading-outline"}),this.renderLabel(),i("span",{key:"62a494be847b2181cdd00f20e50cffbbc121bfd2",class:"limel-notched-outline--trailing-outline"}),this.renderEmptyReadonlyValue()))}renderLabel(){if(this.label)return i("span",{class:"limel-notched-outline--notch"},i("label",{htmlFor:this.labelId},this.label))}renderEmptyReadonlyValue(){if(this.readonly&&!this.hasValue)return i("span",{class:"limel-notched-outline--empty-readonly-value","aria-hidden":"true"},"–")}};Ut.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}limel-notched-outline{--limel-notched-outline-border-color:rgba(var(--contrast-700), 0.65);--limel-notched-outline-background-color:rgba(var(--contrast-200), 0.5);display:block;width:100%;height:fit-content}.limel-notched-outline{position:relative;width:100%;height:100%}.limel-notched-outline [slot=content]{background-color:var(--limel-notched-outline-background-color);border-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--outlines{pointer-events:none;position:absolute;inset:0;z-index:var(--limel-notched-outline-z-index, 0);display:flex}.limel-notched-outline--leading-outline,.limel-notched-outline--notch,.limel-notched-outline--trailing-outline{transition:border-color 0.2s ease;border-width:1px;border-style:solid;border-color:var(--limel-notched-outline-border-color)}.limel-notched-outline--leading-outline{flex-shrink:0;width:0.75rem;border-right-width:0;border-top-left-radius:var(--limel-notched-outline-border-radius, 0.25rem);border-bottom-left-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--notch{flex-shrink:0;position:relative;z-index:2;border-top-color:var(--limel-notched-outline-notch-border-top-color, var(--limel-notched-outline-border-color));border-right-width:0;border-left-width:0;max-width:calc(100% - 1.5rem)}.limel-notched-outline--notch label{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:relative;transition:color 0.2s ease, font-size 0.2s ease, transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);transform:translate3d(var(--limel-notched-outline-label-transform-x, 0), var(--limel-notched-outline-label-transform-y, 0.62rem), 0);display:block;padding:0 0.25rem;color:var(--limel-notched-outline-label-color, rgba(var(--contrast-1200), 1));font-size:var(--limel-notched-outline-label-font-size, var(--limel-theme-default-font-size));letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);line-height:normal}.limel-notched-outline--notch label:after{position:absolute;right:0;padding:0 0.25rem}.limel-notched-outline--trailing-outline{flex-grow:1;border-left-width:0;border-top-right-radius:var(--limel-notched-outline-border-radius, 0.25rem);border-bottom-right-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--empty-readonly-value .lime-looks-like-input-value{line-height:1.75rem;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:rgba(var(--contrast-1400), 1);font-size:var(--limel-theme-default-font-size);font-weight:400;font-family:inherit;letter-spacing:0.009375em}.mdc-text-field--disabled .limel-notched-outline--empty-readonly-value .lime-looks-like-input-value{cursor:not-allowed;opacity:0.4}.limel-notched-outline--empty-readonly-value{position:absolute;top:0.62rem;left:1rem}limel-notched-outline:not([disabled]:not([disabled=false])):hover{--limel-notched-outline-border-color:rgba(var(--contrast-700), 1);--limel-notched-outline-background-color:rgba(var(--contrast-200), 1)}limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-visible),limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-within){--limel-notched-outline-border-color:var(--lime-primary-color, var(--limel-theme-primary-color));--limel-notched-outline-background-color:rgba(var(--contrast-100), 0.8)}limel-notched-outline[disabled]:not([disabled=false]){--limel-notched-outline-label-color:rgba(var(--contrast-1200), 0.5)}limel-notched-outline[required]:not([required=false]) .limel-notched-outline--notch label{padding-right:0.75rem}limel-notched-outline[required]:not([required=false]) .limel-notched-outline--notch label:after{content:"*";scale:1.3}limel-notched-outline[invalid]:not([invalid=false]):not([disabled]:not([disabled=false])){--limel-notched-outline-border-color:var( --limel-theme-error-text-color )}limel-notched-outline[invalid]:not([invalid=false]):not([disabled]:not([disabled=false])):hover{--limel-notched-outline-border-color:var( --limel-theme-error-color )}limel-notched-outline[invalid]:not([invalid=false]) .limel-notched-outline--notch label:after{color:var(--limel-theme-error-text-color)}limel-notched-outline[readonly]:not([readonly=false]){--limel-notched-outline-border-color:transparent !important;--limel-notched-outline-background-color:transparent !important}limel-notched-outline[readonly]:not([readonly=false]) .limel-notched-outline--notch label{transition-duration:0s}limel-notched-outline[has-leading-icon]:not([has-leading-icon=false]):not([has-floating-label]):not([has-value]){--limel-notched-outline-label-transform-x:1.25rem}limel-notched-outline[has-leading-icon] .limel-notched-outline--empty-readonly-value{left:2.25rem}limel-notched-outline:not([disabled]:not([disabled=false])):hover label,limel-notched-outline:not([disabled]:not([disabled=false])):focus label,limel-notched-outline:not([disabled]:not([disabled=false])):focus-within label{will-change:color, transform, font-size}limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-visible),limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-within){--limel-notched-outline-label-font-size:0.65rem;--limel-notched-outline-label-transform-x:0;--limel-notched-outline-label-transform-y:calc(-50% - 0.09375rem);--limel-notched-outline-notch-border-top-color:transparent}limel-notched-outline[has-floating-label],limel-notched-outline[has-value]:not([has-value=false]),limel-notched-outline[readonly]:not([has-value]:not([has-value=true])){--limel-notched-outline-label-font-size:0.65rem;--limel-notched-outline-label-transform-x:0;--limel-notched-outline-label-transform-y:calc(-50% - 0.09375rem);--limel-notched-outline-notch-border-top-color:transparent}';const Ht=class{constructor(e){t(this,e),this.size="mini",this.limeBranded=!1}render(){return i(n,{key:"bb72728921dd48ab02cad031e3b35641c92b4dce"},i("svg",{key:"fccd59e394e3e4a0101d2e7f903b1b4f9dffc630",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"})))}};Ht.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{B as limel_breadcrumbs,Y as limel_input_field,yt as limel_list,kt as limel_menu,Yt as limel_menu_list,Xt as limel_menu_surface,Ut as limel_notched_outline,Ht as limel_spinner}
|
|
248
|
+
*/class Nt{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),o=null!==(l=t.id)&&void 0!==l?l:`item-${e}`;return i("limel-list-item",Object.assign({key:o,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||t.hotkey||t.commandText?{name:"limel-menu-item-meta",props:{commandText:t.commandText,hotkey:t.hotkey,disabled:!!t.disabled,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||F(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:Bt}=Dt,Yt=class{constructor(i){t(this,i),this.select=e(this,"select"),this.interact=e(this,"interact"),this.iconSize="small",this.MenuListRenderer=new Nt,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 Mt(t),this.mdcMenu.hasTypeahead=!0,this.mdcMenu.wrapFocus=!0;for(const t of this.mdcMenu.items)new M(t)}},this.setupListeners=()=>{this.mdcMenu&&(this.mdcMenu.unlisten(Bt,this.handleMenuSelect),this.mdcMenu.listen(Bt,this.handleMenuSelect))},this.teardown=()=>{var t,e;null===(t=this.mdcMenu)||void 0===t||t.unlisten(Bt,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:"1c044c711555d155c5559f8b787a3bbad09b7526",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}]}}};Yt.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.25rem;margin-bottom:0.5rem}.mdc-deprecated-list-divider:not(:first-child){margin-top:0.75rem}:host(.has-striped-rows) .mdc-deprecated-list-divider{margin-top: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 Xt=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 Rt(t),this.menuSurface.setAnchorCorner(Tt.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&&!N(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===c)&&(t.stopPropagation(),this.dismiss.emit())}}connectedCallback(){this.setup()}disconnectedCallback(){this.teardown()}componentDidLoad(){this.setup()}render(){return i("div",{key:"254247a3cd25908f96e55028df567663dd4d736a",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:"eb7d1042a28585242d212cf40a34018240cb0502"}))}get host(){return l(this)}};Xt.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 Ut=class{constructor(e){t(this,e),this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.hasValue=!1,this.hasLeadingIcon=!1,this.hasFloatingLabel=!1}render(){return i("div",{key:"5dd66f7356821043d750963f18ef8f39889e65cc",class:"limel-notched-outline"},i("slot",{key:"1b2072f7acd112137188b570229470677458ace7",name:"content"}),i("span",{key:"3d1d04a75ff0459b53294a2b2bbb4f15192409cd",class:"limel-notched-outline--outlines","aria-hidden":"true"},i("span",{key:"9677d3b3bc1f37e954c3ab2907e98db8b9122466",class:"limel-notched-outline--leading-outline"}),this.renderLabel(),i("span",{key:"62a494be847b2181cdd00f20e50cffbbc121bfd2",class:"limel-notched-outline--trailing-outline"}),this.renderEmptyReadonlyValue()))}renderLabel(){if(this.label)return i("span",{class:"limel-notched-outline--notch"},i("label",{htmlFor:this.labelId},this.label))}renderEmptyReadonlyValue(){if(this.readonly&&!this.hasValue)return i("span",{class:"limel-notched-outline--empty-readonly-value","aria-hidden":"true"},"–")}};Ut.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}limel-notched-outline{--limel-notched-outline-border-color:rgba(var(--contrast-700), 0.65);--limel-notched-outline-background-color:rgba(var(--contrast-200), 0.5);display:block;width:100%;height:fit-content}.limel-notched-outline{position:relative;width:100%;height:100%}.limel-notched-outline [slot=content]{background-color:var(--limel-notched-outline-background-color);border-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--outlines{pointer-events:none;position:absolute;inset:0;z-index:var(--limel-notched-outline-z-index, 0);display:flex}.limel-notched-outline--leading-outline,.limel-notched-outline--notch,.limel-notched-outline--trailing-outline{transition:border-color 0.2s ease;border-width:1px;border-style:solid;border-color:var(--limel-notched-outline-border-color)}.limel-notched-outline--leading-outline{flex-shrink:0;width:0.75rem;border-right-width:0;border-top-left-radius:var(--limel-notched-outline-border-radius, 0.25rem);border-bottom-left-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--notch{flex-shrink:0;position:relative;z-index:2;border-top-color:var(--limel-notched-outline-notch-border-top-color, var(--limel-notched-outline-border-color));border-right-width:0;border-left-width:0;max-width:calc(100% - 1.5rem)}.limel-notched-outline--notch label{all:unset;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:relative;transition:color 0.2s ease, font-size 0.2s ease, transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);transform:translate3d(var(--limel-notched-outline-label-transform-x, 0), var(--limel-notched-outline-label-transform-y, 0.62rem), 0);display:block;padding:0 0.25rem;color:var(--limel-notched-outline-label-color, rgba(var(--contrast-1200), 1));font-size:var(--limel-notched-outline-label-font-size, var(--limel-theme-default-font-size));letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);line-height:normal}.limel-notched-outline--notch label:after{position:absolute;right:0;padding:0 0.25rem}.limel-notched-outline--trailing-outline{flex-grow:1;border-left-width:0;border-top-right-radius:var(--limel-notched-outline-border-radius, 0.25rem);border-bottom-right-radius:var(--limel-notched-outline-border-radius, 0.25rem)}.limel-notched-outline--empty-readonly-value .lime-looks-like-input-value{line-height:1.75rem;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:rgba(var(--contrast-1400), 1);font-size:var(--limel-theme-default-font-size);font-weight:400;font-family:inherit;letter-spacing:0.009375em}.mdc-text-field--disabled .limel-notched-outline--empty-readonly-value .lime-looks-like-input-value{cursor:not-allowed;opacity:0.4}.limel-notched-outline--empty-readonly-value{position:absolute;top:0.62rem;left:1rem}limel-notched-outline:not([disabled]:not([disabled=false])):hover{--limel-notched-outline-border-color:rgba(var(--contrast-700), 1);--limel-notched-outline-background-color:rgba(var(--contrast-200), 1)}limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-visible),limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-within){--limel-notched-outline-border-color:var(--lime-primary-color, var(--limel-theme-primary-color));--limel-notched-outline-background-color:rgba(var(--contrast-100), 0.8)}limel-notched-outline[disabled]:not([disabled=false]){--limel-notched-outline-label-color:rgba(var(--contrast-1200), 0.5)}limel-notched-outline[required]:not([required=false]) .limel-notched-outline--notch label{padding-right:0.75rem}limel-notched-outline[required]:not([required=false]) .limel-notched-outline--notch label:after{content:"*";scale:1.3}limel-notched-outline[invalid]:not([invalid=false]):not([disabled]:not([disabled=false])){--limel-notched-outline-border-color:var( --limel-theme-error-text-color )}limel-notched-outline[invalid]:not([invalid=false]):not([disabled]:not([disabled=false])):hover{--limel-notched-outline-border-color:var( --limel-theme-error-color )}limel-notched-outline[invalid]:not([invalid=false]) .limel-notched-outline--notch label:after{color:var(--limel-theme-error-text-color)}limel-notched-outline[readonly]:not([readonly=false]){--limel-notched-outline-border-color:transparent !important;--limel-notched-outline-background-color:transparent !important}limel-notched-outline[readonly]:not([readonly=false]) .limel-notched-outline--notch label{transition-duration:0s}limel-notched-outline[has-leading-icon]:not([has-leading-icon=false]):not([has-floating-label]):not([has-value]){--limel-notched-outline-label-transform-x:1.25rem}limel-notched-outline[has-leading-icon] .limel-notched-outline--empty-readonly-value{left:2.25rem}limel-notched-outline:not([disabled]:not([disabled=false])):hover label,limel-notched-outline:not([disabled]:not([disabled=false])):focus label,limel-notched-outline:not([disabled]:not([disabled=false])):focus-within label{will-change:color, transform, font-size}limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-visible),limel-notched-outline:not([disabled]:not([disabled=false])):has([slot=content]:focus-within){--limel-notched-outline-label-font-size:0.65rem;--limel-notched-outline-label-transform-x:0;--limel-notched-outline-label-transform-y:calc(-50% - 0.09375rem);--limel-notched-outline-notch-border-top-color:transparent}limel-notched-outline[has-floating-label],limel-notched-outline[has-value]:not([has-value=false]),limel-notched-outline[readonly]:not([has-value]:not([has-value=true])){--limel-notched-outline-label-font-size:0.65rem;--limel-notched-outline-label-transform-x:0;--limel-notched-outline-label-transform-y:calc(-50% - 0.09375rem);--limel-notched-outline-notch-border-top-color:transparent}';const Ht=class{constructor(e){t(this,e),this.size="mini",this.limeBranded=!1}render(){return i(n,{key:"bb72728921dd48ab02cad031e3b35641c92b4dce"},i("svg",{key:"fccd59e394e3e4a0101d2e7f903b1b4f9dffc630",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"})))}};Ht.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{B as limel_breadcrumbs,Y as limel_input_field,yt as limel_list,kt as limel_menu,Yt as limel_menu_list,Xt as limel_menu_surface,Ut as limel_notched_outline,Ht as limel_spinner}
|
|
@@ -9,6 +9,7 @@ import { FormError, FormSchema, ValidationError, ValidationStatus } from './form
|
|
|
9
9
|
* @exampleComponent limel-example-props-factory-form
|
|
10
10
|
* @exampleComponent limel-example-form-layout
|
|
11
11
|
* @exampleComponent limel-example-form-span-fields
|
|
12
|
+
* @exampleComponent limel-example-form-invalid-section
|
|
12
13
|
* @exampleComponent limel-example-custom-error-message
|
|
13
14
|
* @exampleComponent limel-example-server-errors
|
|
14
15
|
* @exampleComponent limel-example-form-array-item-controls
|
|
@@ -49,6 +50,13 @@ export declare class Form {
|
|
|
49
50
|
* errors generated server side.
|
|
50
51
|
*/
|
|
51
52
|
errors: ValidationError;
|
|
53
|
+
/**
|
|
54
|
+
* Set to `true` to render every field with a validation error as
|
|
55
|
+
* invalid, even untouched ones, and to reflect that on each
|
|
56
|
+
* containing collapsible section's header. Defaults to `false`,
|
|
57
|
+
* which keeps untouched required-empty fields silent.
|
|
58
|
+
*/
|
|
59
|
+
revealErrors: boolean;
|
|
52
60
|
/**
|
|
53
61
|
* Emitted when a change is made within the form
|
|
54
62
|
*/
|
|
@@ -4,15 +4,18 @@ export declare const numberSchema: FormSchema;
|
|
|
4
4
|
export declare const booleanSchema: FormSchema;
|
|
5
5
|
export declare const enumSchema: FormSchema;
|
|
6
6
|
export declare const requiredFieldSchema: FormSchema;
|
|
7
|
+
export declare const twoRequiredFieldsSchema: FormSchema;
|
|
7
8
|
export declare const emailFormatSchema: FormSchema;
|
|
8
9
|
export declare const arraySchema: FormSchema;
|
|
9
10
|
export declare const nestedObjectSchema: FormSchema;
|
|
10
11
|
export declare const arrayOfObjectsSchema: FormSchema;
|
|
12
|
+
export declare const arrayOfObjectsSchemaWithRequired: FormSchema;
|
|
11
13
|
export declare const dynamicSchema: FormSchema;
|
|
12
14
|
export declare const dynamicSchemaUpdated: FormSchema;
|
|
13
15
|
export declare const helpSchema: FormSchema;
|
|
14
16
|
export declare const gridLayoutSchema: FormSchema;
|
|
15
17
|
export declare const collapsibleSchema: FormSchema;
|
|
18
|
+
export declare const collapsibleSchemaWithRequired: FormSchema;
|
|
16
19
|
export declare const dateSchema: FormSchema;
|
|
17
20
|
export declare const integerSchema: FormSchema;
|
|
18
21
|
export declare const serverErrorsSchema: FormSchema;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { ErrorSchema } from '@rjsf/utils';
|
|
1
2
|
import { FormSchema } from '../form.types';
|
|
2
3
|
export interface ArrayFieldOptions {
|
|
3
4
|
arraySchema: FormSchema;
|
|
4
5
|
formData: any[];
|
|
5
6
|
}
|
|
6
7
|
export declare const ArrayFieldContext: import("react").Context<ArrayFieldOptions>;
|
|
8
|
+
/**
|
|
9
|
+
* The array's validation errors as an RJSF `errorSchema`, keyed by item
|
|
10
|
+
* index (e.g. `{ 1: { phone: { __errors: [...] } } }`).
|
|
11
|
+
*
|
|
12
|
+
* RJSF passes `errorSchema` to the array *field* (`FieldProps`) but, for
|
|
13
|
+
* non-fixed arrays, does not forward it to `ArrayFieldItemTemplate` — so
|
|
14
|
+
* the custom `ArrayField` shares it here for each item to read its own
|
|
15
|
+
* slice (`errorSchema[index]`). This lets a collapsed item flag itself as
|
|
16
|
+
* invalid without rendering (and DOM-walking) its hidden children.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ArrayItemErrorsContext: import("react").Context<ErrorSchema>;
|
|
7
19
|
//# sourceMappingURL=array-context.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { ArrayFieldItemButtonsTemplateProps } from '@rjsf/utils';
|
|
2
|
+
import { ArrayFieldItemButtonsTemplateProps, ErrorSchema } from '@rjsf/utils';
|
|
3
3
|
import { JSONSchema7 } from 'json-schema';
|
|
4
4
|
export interface CollapsibleItemProps {
|
|
5
5
|
buttonsProps: ArrayFieldItemButtonsTemplateProps;
|
|
@@ -27,6 +27,18 @@ export interface CollapsibleItemProps {
|
|
|
27
27
|
* Whether this particular item can be reordered.
|
|
28
28
|
*/
|
|
29
29
|
allowItemReorder: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Validation errors for this item, as an RJSF `errorSchema` subtree.
|
|
32
|
+
* Used to flag the item's header when it contains invalid fields,
|
|
33
|
+
* even while the item is collapsed and its fields are not rendered.
|
|
34
|
+
*/
|
|
35
|
+
errorSchema?: ErrorSchema;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the form has been asked to reveal all validation errors
|
|
38
|
+
* (typically on a save attempt). The header only reflects nested
|
|
39
|
+
* errors when this is `true`, keeping a freshly loaded form silent.
|
|
40
|
+
*/
|
|
41
|
+
revealErrors?: boolean;
|
|
30
42
|
}
|
|
31
43
|
export declare class CollapsibleItemTemplate extends React.Component<PropsWithChildren<CollapsibleItemProps>> {
|
|
32
44
|
props: PropsWithChildren<CollapsibleItemProps>;
|
|
@@ -45,6 +57,7 @@ export declare class CollapsibleItemTemplate extends React.Component<PropsWithCh
|
|
|
45
57
|
'is-open': boolean;
|
|
46
58
|
'data-reorder-id': string;
|
|
47
59
|
'data-reorderable': string;
|
|
60
|
+
invalid: boolean;
|
|
48
61
|
}, string | React.JSXElementConstructor<any>>;
|
|
49
62
|
private setActions;
|
|
50
63
|
private handleAction;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { JSONSchema7 } from 'json-schema';
|
|
3
|
+
import { ErrorSchema } from '@rjsf/utils';
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
6
|
* @param title
|
|
@@ -27,4 +28,16 @@ export declare function renderDescription(description: string): React.ReactEleme
|
|
|
27
28
|
* @returns describing title of the data
|
|
28
29
|
*/
|
|
29
30
|
export declare function findTitle(data: any, fieldSchema: JSONSchema7, formSchema: JSONSchema7): any;
|
|
31
|
+
/**
|
|
32
|
+
* Recursively check whether an RJSF `errorSchema` subtree contains any
|
|
33
|
+
* field with validation errors.
|
|
34
|
+
*
|
|
35
|
+
* Used to reflect the validity of nested fields onto a containing
|
|
36
|
+
* collapsible section's header, so a collapsed section with invalid
|
|
37
|
+
* contents is still flagged in the UI.
|
|
38
|
+
*
|
|
39
|
+
* @param errorSchema - the RJSF error schema subtree to inspect
|
|
40
|
+
* @returns `true` when any nested field has one or more errors
|
|
41
|
+
*/
|
|
42
|
+
export declare function hasNestedErrors(errorSchema?: ErrorSchema): boolean;
|
|
30
43
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -10,16 +10,13 @@ export declare function hasValue(value: unknown): boolean;
|
|
|
10
10
|
/**
|
|
11
11
|
* Determine whether a field should be displayed as invalid.
|
|
12
12
|
*
|
|
13
|
-
* A field with errors is shown as invalid only when the user has
|
|
14
|
-
* interacted with it, it already contains a value, or it is optional.
|
|
15
|
-
* This avoids showing errors on untouched required fields before the
|
|
16
|
-
* user has had a chance to fill them in.
|
|
17
|
-
*
|
|
18
13
|
* @param field - the current field state
|
|
19
14
|
* @param field.hasErrors - whether the field currently has validation errors
|
|
20
15
|
* @param field.modified - whether the user has interacted with the field
|
|
21
16
|
* @param field.hasValue - whether the field holds a non-empty value
|
|
22
17
|
* @param field.required - whether the field is required
|
|
18
|
+
* @param field.revealErrors - whether the form has been asked to reveal
|
|
19
|
+
* all errors at once (typically on a save attempt)
|
|
23
20
|
* @returns `true` when the field should render in an invalid state
|
|
24
21
|
*/
|
|
25
22
|
export declare function isFieldInvalid(field: {
|
|
@@ -27,6 +24,7 @@ export declare function isFieldInvalid(field: {
|
|
|
27
24
|
modified: boolean;
|
|
28
25
|
hasValue: boolean;
|
|
29
26
|
required: boolean;
|
|
27
|
+
revealErrors?: boolean;
|
|
30
28
|
}): boolean;
|
|
31
29
|
/**
|
|
32
30
|
* Check whether a field should be marked as required.
|
|
@@ -1843,6 +1843,7 @@ export namespace Components {
|
|
|
1843
1843
|
* @exampleComponent limel-example-props-factory-form
|
|
1844
1844
|
* @exampleComponent limel-example-form-layout
|
|
1845
1845
|
* @exampleComponent limel-example-form-span-fields
|
|
1846
|
+
* @exampleComponent limel-example-form-invalid-section
|
|
1846
1847
|
* @exampleComponent limel-example-custom-error-message
|
|
1847
1848
|
* @exampleComponent limel-example-server-errors
|
|
1848
1849
|
* @exampleComponent limel-example-form-array-item-controls
|
|
@@ -1865,6 +1866,11 @@ export namespace Components {
|
|
|
1865
1866
|
* Factory for creating properties for custom form components When using custom components in the form some properties might have to be set dynamically. If this factory is set, it will be called with the current schema for the field for each custom component in the form. The factory must return an object where each key is the name of the property that should be set, along with its value.
|
|
1866
1867
|
*/
|
|
1867
1868
|
"propsFactory"?: (schema: FormSchema) => Record<string, any>;
|
|
1869
|
+
/**
|
|
1870
|
+
* Set to `true` to render every field with a validation error as invalid, even untouched ones, and to reflect that on each containing collapsible section's header. Defaults to `false`, which keeps untouched required-empty fields silent.
|
|
1871
|
+
* @default false
|
|
1872
|
+
*/
|
|
1873
|
+
"revealErrors": boolean;
|
|
1868
1874
|
/**
|
|
1869
1875
|
* The schema used to render the form
|
|
1870
1876
|
* @default {}
|
|
@@ -5235,6 +5241,7 @@ declare global {
|
|
|
5235
5241
|
* @exampleComponent limel-example-props-factory-form
|
|
5236
5242
|
* @exampleComponent limel-example-form-layout
|
|
5237
5243
|
* @exampleComponent limel-example-form-span-fields
|
|
5244
|
+
* @exampleComponent limel-example-form-invalid-section
|
|
5238
5245
|
* @exampleComponent limel-example-custom-error-message
|
|
5239
5246
|
* @exampleComponent limel-example-server-errors
|
|
5240
5247
|
* @exampleComponent limel-example-form-array-item-controls
|
|
@@ -8426,6 +8433,7 @@ declare namespace LocalJSX {
|
|
|
8426
8433
|
* @exampleComponent limel-example-props-factory-form
|
|
8427
8434
|
* @exampleComponent limel-example-form-layout
|
|
8428
8435
|
* @exampleComponent limel-example-form-span-fields
|
|
8436
|
+
* @exampleComponent limel-example-form-invalid-section
|
|
8429
8437
|
* @exampleComponent limel-example-custom-error-message
|
|
8430
8438
|
* @exampleComponent limel-example-server-errors
|
|
8431
8439
|
* @exampleComponent limel-example-form-array-item-controls
|
|
@@ -8456,6 +8464,11 @@ declare namespace LocalJSX {
|
|
|
8456
8464
|
* Factory for creating properties for custom form components When using custom components in the form some properties might have to be set dynamically. If this factory is set, it will be called with the current schema for the field for each custom component in the form. The factory must return an object where each key is the name of the property that should be set, along with its value.
|
|
8457
8465
|
*/
|
|
8458
8466
|
"propsFactory"?: (schema: FormSchema) => Record<string, any>;
|
|
8467
|
+
/**
|
|
8468
|
+
* Set to `true` to render every field with a validation error as invalid, even untouched ones, and to reflect that on each containing collapsible section's header. Defaults to `false`, which keeps untouched required-empty fields silent.
|
|
8469
|
+
* @default false
|
|
8470
|
+
*/
|
|
8471
|
+
"revealErrors"?: boolean;
|
|
8459
8472
|
/**
|
|
8460
8473
|
* The schema used to render the form
|
|
8461
8474
|
* @default {}
|
|
@@ -11019,6 +11032,7 @@ declare namespace LocalJSX {
|
|
|
11019
11032
|
}
|
|
11020
11033
|
interface LimelFormAttributes {
|
|
11021
11034
|
"disabled": boolean;
|
|
11035
|
+
"revealErrors": boolean;
|
|
11022
11036
|
}
|
|
11023
11037
|
interface LimelHeaderAttributes {
|
|
11024
11038
|
"icon": IconName | Icon;
|
|
@@ -12051,6 +12065,7 @@ declare module "@stencil/core" {
|
|
|
12051
12065
|
* @exampleComponent limel-example-props-factory-form
|
|
12052
12066
|
* @exampleComponent limel-example-form-layout
|
|
12053
12067
|
* @exampleComponent limel-example-form-span-fields
|
|
12068
|
+
* @exampleComponent limel-example-form-invalid-section
|
|
12054
12069
|
* @exampleComponent limel-example-custom-error-message
|
|
12055
12070
|
* @exampleComponent limel-example-server-errors
|
|
12056
12071
|
* @exampleComponent limel-example-form-array-item-controls
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-elements",
|
|
3
|
-
"version": "39.
|
|
3
|
+
"version": "39.30.0",
|
|
4
4
|
"description": "Lime Elements",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
"test": "npx playwright install chromium && stencil-test",
|
|
34
34
|
"test:spec": "stencil-test --project spec",
|
|
35
35
|
"test:e2e": "npx playwright install chromium && stencil-test --project e2e",
|
|
36
|
+
"test:examples": "npx playwright install chromium && playwright test --config playwright.example-tests.config.ts",
|
|
37
|
+
"test:examples:runtime": "npx playwright install chromium && playwright test --config playwright.example-tests.config.ts runtime",
|
|
38
|
+
"test:examples:accessibility": "npx playwright install chromium && playwright test --config playwright.example-tests.config.ts accessibility",
|
|
36
39
|
"test:watch": "npx playwright install chromium && stencil-test --watch",
|
|
37
40
|
"test:watch:spec": "stencil-test --watch --project spec",
|
|
38
41
|
"test:watch:e2e": "npx playwright install chromium && stencil-test --watch --project e2e",
|
|
@@ -42,6 +45,7 @@
|
|
|
42
45
|
"@commitlint/config-conventional": "^19.8.1",
|
|
43
46
|
"@limetech/eslint-config": "^4.0.0",
|
|
44
47
|
"@microsoft/api-extractor": "^7.52.11",
|
|
48
|
+
"@playwright/test": "1.58.2",
|
|
45
49
|
"@popperjs/core": "^2.11.8",
|
|
46
50
|
"@rjsf/core": "^6.5.2",
|
|
47
51
|
"@rjsf/utils": "^6.5.2",
|
|
@@ -57,6 +61,7 @@
|
|
|
57
61
|
"@types/react-dom": "^19.1.7",
|
|
58
62
|
"@types/tabulator-tables": "^6.2.4",
|
|
59
63
|
"@vitest/browser-playwright": "^4.0.18",
|
|
64
|
+
"axe-core": "4.12.0",
|
|
60
65
|
"codemirror": "^5.65.9",
|
|
61
66
|
"cross-env": "^7.0.3",
|
|
62
67
|
"dayjs": "^1.11.13",
|
|
@@ -93,6 +98,7 @@
|
|
|
93
98
|
"replace-in-file": "^7.2.0",
|
|
94
99
|
"shelljs": "0.10.0",
|
|
95
100
|
"shx": "^0.4.0",
|
|
101
|
+
"sirv": "^3.0.2",
|
|
96
102
|
"sortablejs": "^1.15.6",
|
|
97
103
|
"style-to-object": "^1.0.9",
|
|
98
104
|
"tabulator-tables": "^6.3.1",
|