UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

6 lines • 24.9 kB
/*! * All material copyright ESRI, All Rights Reserved, unless otherwise specified. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details. * v1.5.0-next.4 */ import{r as t,c as i,h as e,a,H as n}from"./p-8789682d.js";import{t as s,d as c,b as o}from"./p-68f223ec.js";import{c as l,d as r,u as d}from"./p-0d8324b6.js";import{c as h}from"./p-c8e46b02.js";import{s as m,a as p,c as f}from"./p-deebcc06.js";import{d as u}from"./p-81620376.js";import{c as b,d as g}from"./p-743ed09c.js";import{u as y,c as v,s as w,d as x}from"./p-9dd9a26d.js";import"./p-d2aa9245.js";import"./p-9280476e.js";import"./p-7fb6664e.js";import"./p-4929e834.js";const k="open-container",C="calcite-list-item";function _(t){const i=t.target.assignedElements({flatten:!0});return[...i.filter((t=>t?.matches("calcite-list-item-group"))).map((t=>Array.from(t.querySelectorAll(C)))).reduce(((t,i)=>[...t,...i]),[]),...i.filter((t=>t?.matches(C)))]}function D(t){t.forEach((i=>{i.setPosition=t.indexOf(i)+1,i.setSize=t.length}))}function E(t,i=!1){return document.evaluate(i?"ancestor::calcite-list-item | ancestor::calcite-list-item-group":"ancestor::calcite-list-item",t,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength}const S="calcite-list-item",L=class{constructor(e){t(this,e),this.calciteListChange=i(this,"calciteListChange",6),this.calciteListFilter=i(this,"calciteListFilter",6),this.listItems=[],this.enabledListItems=[],this.mutationObserver=h("mutation",(()=>this.updateListItems())),this.handleDefaultSlotChange=t=>{D(_(t))},this.setActiveListItem=()=>{const{enabledListItems:t}=this;t.some((t=>t.active))||t[0]&&(t[0].active=!0)},this.updateSelectedItems=(t=!1)=>{this.selectedItems=this.enabledListItems.filter((t=>t.selected)),t&&this.calciteListChange.emit()},this.updateFilteredItems=(t=!1)=>{const{listItems:i,filteredData:e,filterText:a}=this,n=e.map((t=>t.value)),s=i?.filter((t=>i.every((i=>i===t||!t.contains(i))))),c=i.filter((t=>!a||n.includes(t.value)))||[],o=new WeakSet;s.forEach((t=>this.filterElements({el:t,filteredItems:c,visibleParents:o}))),this.filteredItems=c,t&&this.calciteListFilter.emit()},this.handleFilter=t=>{t.stopPropagation();const{filteredItems:i,value:e}=t.currentTarget;this.filteredData=i,this.filterText=e,this.updateListItems(!0)},this.getItemData=()=>this.listItems.map((t=>({label:t.label,description:t.description,metadata:t.metadata,value:t.value}))),this.updateListItems=u(((t=!1)=>{const{selectionAppearance:i,selectionMode:e}=this,a=this.queryListItems();a.forEach((t=>{t.selectionAppearance=i,t.selectionMode=e})),this.listItems=a,this.filterEnabled&&(this.dataForFilter=this.getItemData(),this.filterEl&&(this.filterEl.items=this.dataForFilter)),this.updateFilteredItems(t),this.enabledListItems=a.filter((t=>!t.disabled&&!t.closed)),this.setActiveListItem(),this.updateSelectedItems(t)}),0),this.queryListItems=()=>Array.from(this.el.querySelectorAll(S)),this.focusRow=t=>{const{enabledListItems:i}=this;t&&(i.forEach((i=>i.active=i===t)),t.setFocus())},this.isNavigable=t=>{const i=t.parentElement?.closest(S);return!i||i.open&&this.isNavigable(i)},this.handleListKeydown=t=>{if(t.defaultPrevented)return;const{key:i}=t,e=this.enabledListItems.filter((t=>this.isNavigable(t))),a=e.findIndex((t=>t.active));if("ArrowDown"===i){t.preventDefault();const i=a+1;e[i]&&this.focusRow(e[i])}else if("ArrowUp"===i){t.preventDefault();const i=a-1;e[i]&&this.focusRow(e[i])}else if("Home"===i){t.preventDefault();const i=e[0];i&&this.focusRow(i)}else if("End"===i){t.preventDefault();const i=e[e.length-1];i&&this.focusRow(i)}},this.disabled=!1,this.filterEnabled=!1,this.filteredItems=[],this.filteredData=[],this.filterPlaceholder=void 0,this.filterText=void 0,this.label=void 0,this.loading=!1,this.openable=!1,this.selectedItems=[],this.selectionMode="none",this.selectionAppearance="icon",this.dataForFilter=[]}handleFilterEnabledChange(){this.updateListItems()}handleSelectionAppearanceChange(){this.updateListItems()}handleCalciteInternalFocusPreviousItem(t){t.stopPropagation();const{enabledListItems:i}=this,e=i.findIndex((t=>t.active))-1;i[e]&&this.focusRow(i[e])}handleCalciteInternalListItemActive(t){const i=t.target,{listItems:e}=this;e.forEach((t=>{t.active=t===i}))}handleCalciteListItemSelect(){this.updateSelectedItems(!0)}handleCalciteInternalListItemSelect(t){const i=t.target,{listItems:e,selectionMode:a}=this;!i.selected||"single"!==a&&"single-persist"!==a||e.forEach((t=>t.selected=t===i)),this.updateSelectedItems()}handleCalciteListItemClose(){this.updateListItems(!0)}connectedCallback(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateListItems(),l(this)}disconnectedCallback(){this.mutationObserver?.disconnect(),r(this)}componentWillLoad(){m(this)}componentDidRender(){d(this)}componentDidLoad(){p(this);const{filterEl:t}=this,i=t?.filteredItems;i&&(this.filteredData=i),this.updateListItems()}async setFocus(){await f(this),this.enabledListItems.find((t=>t.active))?.setFocus()}render(){const{loading:t,label:i,disabled:a,dataForFilter:n,filterEnabled:c,filterPlaceholder:o,filterText:l}=this;return e("div",{class:"container"},t?e("calcite-scrim",{class:"scrim",loading:t}):null,e("table",{"aria-busy":s(t),"aria-label":i||"",class:"table",onKeyDown:this.handleListKeydown,role:"treegrid"},c?e("thead",null,e("tr",{class:{"sticky-pos":!0}},e("th",{colSpan:5},e("calcite-filter",{"aria-label":o,disabled:t||a,items:n,onCalciteFilterChange:this.handleFilter,placeholder:o,value:l,ref:t=>this.filterEl=t})))):null,e("tbody",{class:"table-container"},e("slot",{onSlotchange:this.handleDefaultSlotChange}))))}filterElements({el:t,filteredItems:i,visibleParents:e}){const a=!e.has(t)&&!i.includes(t);t.hidden=a;const n=t.parentElement.closest("calcite-list-item-group, calcite-list-item");n&&(a||e.add(n),this.filterElements({el:n,filteredItems:i,visibleParents:e}))}get el(){return a(this)}static get watchers(){return{filterEnabled:["handleFilterEnabledChange"],selectionMode:["handleSelectionAppearanceChange"],selectionAppearance:["handleSelectionAppearanceChange"]}}};L.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px, 0, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px, 0, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:var(--calcite-app-z-index-dropdown)}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{position:relative}.table-container{position:relative;z-index:var(--calcite-app-z-index);box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%;border-collapse:collapse}::slotted(calcite-list-item){margin-block-end:1px;--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}::slotted(calcite-list-item:last-child){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.sticky-pos{position:sticky;inset-block-start:0px;z-index:var(--calcite-app-z-index-sticky)}.sticky-pos th{padding:0px}calcite-filter{margin-block-end:1px}";const I=new Map,z=class{constructor(e){t(this,e),this.calciteListItemSelect=i(this,"calciteListItemSelect",6),this.calciteListItemClose=i(this,"calciteListItemClose",6),this.calciteInternalListItemSelect=i(this,"calciteInternalListItemSelect",6),this.calciteInternalListItemActive=i(this,"calciteInternalListItemActive",6),this.calciteInternalFocusPreviousItem=i(this,"calciteInternalFocusPreviousItem",6),this.closeClickHandler=()=>{this.closed=!0,this.calciteListItemClose.emit()},this.handleContentSlotChange=t=>{this.hasCustomContent=c(t)},this.handleActionsStartSlotChange=t=>{this.hasActionsStart=c(t)},this.handleActionsEndSlotChange=t=>{this.hasActionsEnd=c(t)},this.handleContentStartSlotChange=t=>{this.hasContentStart=c(t)},this.handleContentEndSlotChange=t=>{this.hasContentEnd=c(t)},this.handleDefaultSlotChange=t=>{const{parentListEl:i}=this,e=_(t);D(e);const a=!!e.length;a&&i&&!i.openable&&(i.openable=!0),this.openable=a,a||(this.open=!1)},this.toggleOpen=()=>{this.open=!this.open},this.itemClicked=t=>{t.defaultPrevented||(this.toggleSelected(),this.calciteInternalListItemActive.emit())},this.toggleSelected=()=>{const{selectionMode:t,selected:i}=this;this.disabled||("multiple"===t||"single"===t?this.selected=!i:"single-persist"===t&&(this.selected=!0),this.calciteListItemSelect.emit())},this.handleItemKeyDown=t=>{if(t.defaultPrevented)return;const{key:i}=t,e=t.composedPath(),{containerEl:a,contentEl:n,actionsStartEl:s,actionsEndEl:c,open:o,openable:l}=this,r=[s,n,c].filter(Boolean),d=r.findIndex((t=>e.includes(t)));if("Enter"===i)t.preventDefault(),this.toggleSelected();else if("ArrowRight"===i){t.preventDefault();const i=d+1;-1===d?!o&&l?(this.open=!0,this.focusCell(null)):r[0]&&this.focusCell(r[0]):r[d]&&r[i]&&this.focusCell(r[i])}else if("ArrowLeft"===i){t.preventDefault();const i=d-1;-1===d?(this.focusCell(null),o&&l?this.open=!1:this.calciteInternalFocusPreviousItem.emit()):0===d?(this.focusCell(null),a.focus()):r[d]&&r[i]&&this.focusCell(r[i])}},this.focusCellNull=()=>{this.focusCell(null)},this.focusCell=(t,i=!0)=>{const{contentEl:e,actionsStartEl:a,actionsEndEl:n,parentListEl:s}=this;i&&I.set(s,null),[a,e,n].filter(Boolean).forEach(((e,a)=>{const n="tabindex";e===t?(e.setAttribute(n,"0"),i&&I.set(s,a)):e.removeAttribute(n)})),t?.focus()},this.active=!1,this.closable=!1,this.closed=!1,this.description=void 0,this.disabled=!1,this.label=void 0,this.metadata=void 0,this.open=!1,this.setSize=null,this.setPosition=null,this.selected=!1,this.value=void 0,this.selectionMode=null,this.selectionAppearance=null,this.messageOverrides=void 0,this.messages=void 0,this.effectiveLocale="",this.defaultMessages=void 0,this.level=null,this.visualLevel=null,this.parentListEl=void 0,this.openable=!1,this.hasActionsStart=!1,this.hasActionsEnd=!1,this.hasCustomContent=!1,this.hasContentStart=!1,this.hasContentEnd=!1}activeHandler(t){t||this.focusCell(null,!1)}handleSelectedChange(){this.calciteInternalListItemSelect.emit()}onMessagesChange(){}effectiveLocaleChange(){y(this,this.effectiveLocale)}connectedCallback(){l(this),b(this),v(this);const{el:t}=this;this.parentListEl=t.closest("calcite-list"),this.level=E(t)+1,this.visualLevel=E(t,!0),this.setSelectionDefaults()}async componentWillLoad(){m(this),await w(this)}componentDidLoad(){p(this)}componentDidRender(){d(this,"managed")}disconnectedCallback(){r(this),g(this),x(this)}async setFocus(){await f(this);const{containerEl:t,contentEl:i,actionsStartEl:e,actionsEndEl:a,parentListEl:n}=this,s=I.get(n);if("number"!=typeof s)t?.focus();else{const n=[e,i,a].filter(Boolean);n[s]?this.focusCell(n[s]):t?.focus()}}renderSelected(){const{selected:t,selectionMode:i,selectionAppearance:a}=this;return"none"===i||"border"===a?null:e("td",{class:"selection-container",key:"selection-container",onClick:this.itemClicked},e("calcite-icon",{icon:t?"multiple"===i?"check-circle-f":"circle-f":"blank",scale:"s"}))}renderOpen(){const{el:t,open:i,openable:a,parentListEl:n}=this,s=o(t);return a?e("td",{class:k,key:"open-container",onClick:this.toggleOpen},e("calcite-icon",{icon:i?"caret-down":"rtl"===s?"caret-left":"caret-right",scale:"s"})):n?.openable?e("td",{class:k,key:"open-container",onClick:this.itemClicked},e("calcite-icon",{icon:"blank",scale:"s"})):null}renderActionsStart(){const{label:t,hasActionsStart:i}=this;return e("td",{"aria-label":t,class:"actions-start",hidden:!i,key:"actions-start-container",role:"gridcell",ref:t=>this.actionsStartEl=t},e("slot",{name:"actions-start",onSlotchange:this.handleActionsStartSlotChange}))}renderActionsEnd(){const{label:t,hasActionsEnd:i,closable:a,messages:n}=this;return e("td",{"aria-label":t,class:"actions-end",hidden:!(i||a),key:"actions-end-container",role:"gridcell",ref:t=>this.actionsEndEl=t},e("slot",{name:"actions-end",onSlotchange:this.handleActionsEndSlotChange}),a?e("calcite-action",{appearance:"transparent",icon:"x",key:"close-action",label:n.close,onClick:this.closeClickHandler,text:n.close}):null)}renderContentStart(){const{hasContentStart:t}=this;return e("div",{class:"content-start",hidden:!t},e("slot",{name:"content-start",onSlotchange:this.handleContentStartSlotChange}))}renderCustomContent(){const{hasCustomContent:t}=this;return e("div",{class:"custom-content",hidden:!t},e("slot",{name:"content",onSlotchange:this.handleContentSlotChange}))}renderContentEnd(){const{hasContentEnd:t}=this;return e("div",{class:"content-end",hidden:!t},e("slot",{name:"content-end",onSlotchange:this.handleContentEndSlotChange}))}renderContentProperties(){const{label:t,description:i,hasCustomContent:a}=this;return a||!t&&!i?null:e("div",{class:"content",key:"content"},t?e("div",{class:"label",key:"label"},t):null,i?e("div",{class:"description",key:"description"},i):null)}renderContentContainer(){const{description:t,label:i,selectionMode:a,hasCustomContent:n}=this,s=n||!!i||!!t,c=[this.renderContentStart(),this.renderCustomContent(),this.renderContentProperties(),this.renderContentEnd()];return e("td",{"aria-label":i,class:{"content-container":!0,"content-container--selectable":"none"!==a,"content-container--has-center-content":s},key:"content-container",onClick:this.itemClicked,role:"gridcell",ref:t=>this.contentEl=t},c)}render(){const{openable:t,open:i,level:a,setPosition:c,setSize:o,active:l,label:r,selected:d,selectionAppearance:h,selectionMode:m,closed:p}=this,f="none"!==m&&"border"===h,u=f&&d,b=f&&!d;return e(n,null,e("tr",{"aria-expanded":t?s(i):null,"aria-label":r,"aria-level":a,"aria-posinset":c,"aria-selected":s(d),"aria-setsize":o,class:{container:!0,"container--border-selected":u,"container--border-unselected":b},hidden:p,onFocus:this.focusCellNull,onKeyDown:this.handleItemKeyDown,role:"row",style:{"--calcite-list-item-spacing-indent-multiplier":`${this.visualLevel}`},tabIndex:l?0:-1,ref:t=>this.containerEl=t},this.renderSelected(),this.renderOpen(),this.renderActionsStart(),this.renderContentContainer(),this.renderActionsEnd()),e("div",{class:{"nested-container":!0,"nested-container--hidden":t&&!i}},e("slot",{onSlotchange:this.handleDefaultSlotChange})))}setSelectionDefaults(){const{parentListEl:t,selectionMode:i,selectionAppearance:e}=this;t&&(i||(this.selectionMode=t.selectionMode),e||(this.selectionAppearance=t.selectionAppearance))}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],selected:["handleSelectedChange"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};z.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px, 0, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px, 0, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:var(--calcite-app-z-index-dropdown)}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;--calcite-list-item-icon-color:var(--calcite-ui-brand);--calcite-list-item-spacing-indent:1rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{box-sizing:border-box;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-1);font-family:var(--calcite-sans-family);padding-inline-start:calc(var(--calcite-list-item-spacing-indent) * var(--calcite-list-item-spacing-indent-multiplier))}.container *{box-sizing:border-box}.container:hover{cursor:pointer;background-color:var(--calcite-ui-foreground-2)}.container--border-selected{border-inline-start:4px solid var(--calcite-ui-brand)}.container--border-unselected{border-inline-start:4px solid transparent}.nested-container{display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1)}.nested-container--hidden{display:none}.content-container{display:flex;flex:1 1 auto;align-items:stretch;padding:0px;font-family:var(--calcite-sans-family);font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}tr,td{outline-color:transparent}tr:focus,td:focus{z-index:var(--calcite-app-z-index-sticky);outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}.content,.custom-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;padding-inline:0.75rem;padding-block:0.5rem;font-size:var(--calcite-font-size--2);line-height:1.375}.label,.description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);word-wrap:break-word;word-break:break-word}.label:only-child,.description:only-child{margin:0px;padding-block:0.25rem}.label{color:var(--calcite-ui-text-1)}.description{margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:1 1 auto}.content-container--has-center-content .content-start,.content-container--has-center-content .content-end{flex:0 1 auto}.selection-container{display:flex;padding-inline:0.75rem;color:var(--calcite-list-item-icon-color)}.actions-start,.actions-end,.content-start,.content-end,.selection-container,.open-container{display:flex;align-items:center}.open-container,.selection-container{cursor:pointer}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:0.75rem;align-self:center}.actions-start ::slotted(calcite-action),.actions-end ::slotted(calcite-action){align-self:stretch;color:inherit}::slotted(calcite-list-item){border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}[hidden]{display:none}";const A=class{constructor(i){t(this,i),this.disabled=!1,this.heading=void 0,this.visualLevel=null}connectedCallback(){const{el:t}=this;this.visualLevel=E(t,!0),l(this)}componentDidRender(){d(this)}disconnectedCallback(){r(this)}render(){const{heading:t,visualLevel:i}=this;return e(n,null,e("tr",{class:"container",style:{"--calcite-list-item-spacing-indent-multiplier":`${i}`}},e("td",{class:"heading",colSpan:5},t)),e("slot",null))}get el(){return a(this)}};A.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px, 0, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px, 0, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:var(--calcite-app-z-index-dropdown)}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);--calcite-list-item-spacing-indent:1rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{margin:0px;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-2);padding:0.75rem;font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2)}.heading{padding-inline-start:calc(var(--calcite-list-item-spacing-indent) * var(--calcite-list-item-spacing-indent-multiplier))}::slotted(calcite-list-item){margin-block-end:1px;--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}::slotted(calcite-list-item:last-child){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}[hidden]{display:none}";export{L as calcite_list,z as calcite_list_item,A as calcite_list_item_group}