@scania/tegel 1.8.0 → 1.8.1
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-body-cell.cjs.entry.js +15 -4
- package/dist/cjs/tds-dropdown.cjs.entry.js +39 -25
- package/dist/cjs/tds-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-dropdown.cjs.entry.js +10 -4
- package/dist/cjs/tds-header-launcher.cjs.entry.js +4 -8
- package/dist/cjs/tds-popover-core.cjs.entry.js +15 -5
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +39 -25
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +10 -4
- package/dist/collection/components/header/header-launcher/header-launcher.js +4 -8
- package/dist/collection/components/popover-core/popover-core.js +22 -6
- package/dist/collection/components/table/table-body-cell/table-body-cell.css +0 -4
- package/dist/collection/components/table/table-body-cell/table-body-cell.js +14 -3
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/components/popover-core.js +16 -6
- package/dist/components/tds-body-cell.js +15 -4
- package/dist/components/tds-dropdown.js +39 -25
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown.js +10 -4
- package/dist/components/tds-header-launcher.js +4 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-body-cell.entry.js +15 -4
- package/dist/esm/tds-dropdown.entry.js +39 -25
- package/dist/esm/tds-header-cell.entry.js +1 -1
- package/dist/esm/tds-header-dropdown.entry.js +10 -4
- package/dist/esm/tds-header-launcher.entry.js +4 -8
- package/dist/esm/tds-popover-core.entry.js +15 -5
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/p-05704939.entry.js +1 -0
- package/dist/tegel/p-1fcf69c3.entry.js +1 -0
- package/dist/tegel/p-a06e00e1.entry.js +1 -0
- package/dist/tegel/p-d362d26c.entry.js +1 -0
- package/dist/tegel/{p-052901a5.entry.js → p-dd082e5f.entry.js} +1 -1
- package/dist/tegel/p-e12e62cf.entry.js +1 -0
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +2 -0
- package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +1 -0
- package/dist/types/components/popover-core/popover-core.d.ts +4 -2
- package/package.json +1 -1
- package/dist/tegel/p-450eabc1.entry.js +0 -1
- package/dist/tegel/p-50b0f2ff.entry.js +0 -1
- package/dist/tegel/p-540a83e5.entry.js +0 -1
- package/dist/tegel/p-669f7646.entry.js +0 -1
- package/dist/tegel/p-ebbe0131.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,H as o,g as s}from"./p-699829fc.js";import{g as a}from"./p-11648030.js";const i=class{constructor(e){t(this,e),this.uuid=a(),this.handleSlottedItemClick=t=>{const e=t.target.tagName.toLowerCase();["a","button"].includes(e)&&(this.open=!1)},this.label=void 0,this.noDropdownIcon=!1,this.selected=!1,this.open=!1,this.buttonEl=void 0}onAnyClick(t){!t.composedPath().includes(this.host)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}render(){return e(o,{key:"d72add7a12c105e83c0300dc4c6727775dfe10e5"},e("div",{key:"b323560bd8b13b6643eafca2ad9deb9bea53689e",class:{"state-open":this.open}},e("tds-header-item",{key:"48af537f7b05f31fcbcb0c0aae311d2ccd69819d",class:"button",active:this.open,selected:this.selected},e("button",{key:"324b1965706b0a3413c9e8ddcc37345c387519cc",ref:t=>{this.buttonEl=t},"aria-expanded":`${this.open}`,"aria-controls":`launcher-${this.uuid}`,"aria-current":this.selected?"location":"false",onClick:()=>{this.toggleDropdown()}},e("slot",{key:"56a3064075c135677f59e58c4be831c66230a7c2",name:"icon"}),this.label,e("slot",{key:"729e1901342405daf3655dac940310e64e6683f0",name:"label"}),!this.noDropdownIcon&&e("tds-icon",{class:"dropdown-icon",name:"chevron_down",size:"16px"}))),this.buttonEl&&e("tds-popover-canvas",{id:`tds-dropdown-${this.uuid}`,class:"menu",referenceEl:this.buttonEl,placement:"bottom-start",show:this.open,offsetDistance:0,modifiers:[{name:"flip",options:{fallbackPlacements:[]}}]},this.open?e("span",{onClick:t=>this.handleSlottedItemClick(t),onKeyDown:t=>"Enter"===t.key&&this.handleSlottedItemClick(t)},e("slot",null)):null)))}get host(){return s(this)}};i.style=":host{height:var(--tds-header-height);position:relative}:host .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-top-right-radius:0;border-top-left-radius:0}:host .menu::-webkit-scrollbar{width:4px;background-color:inherit}:host .menu::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .menu ::-webkit-scrollbar-button{height:0;width:0}:host .state-open .dropdown-icon{transform:rotatetds-z-index(180deg)}:host .state-open .button{position:relative;z-index:901}";export{i as tds_header_dropdown}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,H as e,g as i}from"./p-699829fc.js";const d=["verticalDividers","compactDesign","noMinWidth"],o=class{constructor(s){t(this,s),this.cellValue=void 0,this.cellKey=void 0,this.disablePadding=!1,this.textAlign=void 0,this.textAlignState=void 0,this.activeSorting=!1,this.verticalDividers=!1,this.compactDesign=!1,this.noMinWidth=!1,this.whiteBackground=!1,this.tableId=""}internalTdsPropChangeListener(t){this.tableId===t.detail.tableId&&t.detail.changed.filter((t=>d.includes(t))).forEach((s=>{if(void 0===this[s])throw new Error(`Table prop is not supported: ${s}`);this[s]=t.detail[s]}))}internalTdsHoverListener(t){const{tableId:s,key:e}=t.detail;s===this.tableId&&(this.activeSorting=this.cellKey===e)}internalTdsTextAlignListener(t){const[s,e,i]=t.detail;this.tableId===s&&this.cellKey===e&&(this.textAlignState=this.textAlign?this.textAlign:["left","start","center","right","end"].includes(i)?i:"left")}connectedCallback(){this.tableEl=this.host.closest("tds-table"),this.tableId=this.tableEl.tableId}componentWillLoad(){d.forEach((t=>{this[t]=this.tableEl[t]})),this.textAlign&&(this.textAlignState=this.textAlign)}render(){let t="var(--tds-spacing-element-16)";return this.disablePadding?t="0":this.compactDesign&&(t="var(--tds-spacing-element-8) var(--tds-spacing-element-16)"),s(e,{key:"56fe770734dd720139eb614489283e2ec81cc596",class:{"tds-table__body-cell":!0,"tds-table__body-cell--hover":this.activeSorting,"tds-table__compact":this.compactDesign,"tds-table--divider":this.verticalDividers,"tds-table--no-min-width":this.noMinWidth},style:{textAlign:this.textAlignState,padding:t}},this.cellValue,s("slot",{key:"490a5caabb4a2ae94769875edb0743b474716e42"}))}get host(){return i(this)}};o.style=":host(.tds-table__body-cell){box-sizing:border-box;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:table-cell;box-sizing:border-box;color:var(--tds-table-color);padding:var(--tds-spacing-element-16);min-width:192px;vertical-align:top;background-color:transparent;transition:background-color 200ms ease}:host(.tds-table__body-cell) *{box-sizing:border-box}:host(.tds-table__body-cell--hover){background-color:var(--tds-table-body-cell-background-hover)}:host(.tds-table__compact){padding:var(--tds-spacing-element-8) var(--tds-spacing-element-16)}:host(.tds-table--divider){border-right:1px solid var(--tds-table-divider)}:host(.tds-table--divider:last-of-type){border-right:none}:host(.tds-table--no-min-width){min-width:unset}";export{o as tds_body_cell}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as a,g as l}from"./p-699829fc.js";const o=["multiselect","expandableRows","compactDesign","noMinWidth","verticalDividers"],d=class{constructor(a){t(this,a),this.tdsSort=e(this,"tdsSort",7),this.internalSortButtonClicked=e(this,"internalSortButtonClicked",6),this.internalTdsTextAlign=e(this,"internalTdsTextAlign",6),this.internalTdsHover=e(this,"internalTdsHover",6),this.sortButtonClick=()=>{this.sortingDirection="asc"!==this.sortingDirection?"asc":"desc",this.sortedByMyKey=!0,this.tdsSort.emit({tableId:this.tableId,columnKey:this.cellKey,sortingDirection:this.sortingDirection}),this.internalSortButtonClicked.emit({tableId:this.tableId,key:this.cellKey})},this.headerCellContent=()=>this.sortable?s("button",{class:"tds-table__header-button",onClick:()=>this.sortButtonClick(),style:{justifyContent:this.textAlignState}},s("span",{class:"tds-table__header-button-text"},this.cellValue,s("slot",null)),null===this.sortingDirection&&s("svg",{class:"tds-table__header-button-icon",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 15"},s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.45 13.67V4.62a.5.5 0 0 1 1 0v9.05h-1Z"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.07 10.28a.5.5 0 0 1 .7.08l2.1 2.66a.1.1 0 0 0 .15 0l2.09-2.66a.5.5 0 1 1 .78.62l-2.08 2.66a1.1 1.1 0 0 1-1.73 0l-2.1-2.66a.5.5 0 0 1 .1-.7ZM3.55.4v9.04a.5.5 0 1 1-1 0V.39h1Z"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.93 3.78a.5.5 0 0 1-.7-.08l-2.1-2.66a.1.1 0 0 0-.15 0L.89 3.7a.5.5 0 0 1-.78-.62L2.19.42a1.1 1.1 0 0 1 1.73 0l2.1 2.66a.5.5 0 0 1-.1.7Z"})),this.sortingDirection&&s("svg",{class:"tds-table__header-button-icon "+("desc"===this.sortingDirection?"tds-table__header-button-icon--rotate":""),fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 2.974a1 1 0 0 0-2 0v24.3l-9.312-9.312a1 1 0 0 0-1.414 1.414l9.887 9.888a2.6 2.6 0 0 0 3.677 0l9.888-9.888a1 1 0 0 0-1.414-1.414L17 27.274v-24.3Z"}))):s("p",{class:"tds-table__header-text",style:{textAlign:this.textAlignState}},this.cellValue,s("slot",null)),this.onHeadCellHover=t=>{this.internalTdsHover.emit({tableId:this.tableId,key:t})},this.cellKey=void 0,this.cellValue=void 0,this.customWidth=void 0,this.sortable=!1,this.textAlign="left",this.textAlignState=void 0,this.sortingDirection="asc",this.sortedByMyKey=!1,this.verticalDividers=!1,this.compactDesign=!1,this.noMinWidth=!1,this.multiselect=!1,this.enableToolbarDesign=!1,this.tableId="",this.expandableRows=!1}internalTdsPropChangeListener(t){this.tableId===t.detail.tableId&&t.detail.changed.filter((t=>o.includes(t))).forEach((e=>{if(void 0===this[e])throw new Error(`Table prop is not supported: ${e}`);this[e]=t.detail[e]}))}updateOptionsContent(t){const{tableId:e,key:s}=t.detail;this.tableId===e&&this.cellKey!==s&&(this.sortedByMyKey=!1,setTimeout((()=>{this.sortingDirection=null}),200))}connectedCallback(){this.tableEl=this.host.closest("tds-table"),this.tableId=this.tableEl.tableId}componentWillLoad(){o.forEach((t=>{this[t]=this.tableEl[t]}))}componentWillRender(){this.textAlignState=["left","start","right","end","center"].includes(this.textAlign)?this.textAlign:"left",this.internalTdsTextAlign.emit([this.tableId,this.cellKey,this.textAlignState]),this.enableToolbarDesign=this.host.closest("tds-table").getElementsByTagName("tds-table-toolbar").length>=1}render(){return s(a,{key:"8cda19cdff411db98aecbf8a915853eda026853d",class:{"tds-table__header-cell":!0,"tds-table__header-cell--sortable":this.sortable,"tds-table__header-cell--is-sorted":this.sortedByMyKey,"tds-table__header-cell--custom-width":""!==this.customWidth,"tds-table--compact":this.compactDesign,"tds-table--divider":this.verticalDividers,"tds-table--no-min-width":this.noMinWidth,"tds-table--extra-column":this.multiselect||this.expandableRows,"tds-table--toolbar-available":this.enableToolbarDesign},style:{width:this.customWidth},onMouseOver:()=>this.onHeadCellHover(this.cellKey),onMouseLeave:()=>this.onHeadCellHover("")},this.headerCellContent())}get host(){return l(this)}};d.style=":host(.tds-table__header-cell){box-sizing:border-box;font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);display:table-cell;text-align:left;color:var(--tds-table-color);background-color:var(--tds-table-header-background);border-bottom:1px solid var(--tds-table-header-background-hover);padding:0;height:48px;min-width:192px;box-sizing:border-box;vertical-align:middle;overflow:hidden;transition:background-color 200ms ease}:host(.tds-table__header-cell) *{box-sizing:border-box}:host(.tds-table__header-cell) .tds-table__header-text{padding:
|
|
1
|
+
import{r as t,c as e,h as s,H as a,g as l}from"./p-699829fc.js";const o=["multiselect","expandableRows","compactDesign","noMinWidth","verticalDividers"],d=class{constructor(a){t(this,a),this.tdsSort=e(this,"tdsSort",7),this.internalSortButtonClicked=e(this,"internalSortButtonClicked",6),this.internalTdsTextAlign=e(this,"internalTdsTextAlign",6),this.internalTdsHover=e(this,"internalTdsHover",6),this.sortButtonClick=()=>{this.sortingDirection="asc"!==this.sortingDirection?"asc":"desc",this.sortedByMyKey=!0,this.tdsSort.emit({tableId:this.tableId,columnKey:this.cellKey,sortingDirection:this.sortingDirection}),this.internalSortButtonClicked.emit({tableId:this.tableId,key:this.cellKey})},this.headerCellContent=()=>this.sortable?s("button",{class:"tds-table__header-button",onClick:()=>this.sortButtonClick(),style:{justifyContent:this.textAlignState}},s("span",{class:"tds-table__header-button-text"},this.cellValue,s("slot",null)),null===this.sortingDirection&&s("svg",{class:"tds-table__header-button-icon",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 15"},s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.45 13.67V4.62a.5.5 0 0 1 1 0v9.05h-1Z"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.07 10.28a.5.5 0 0 1 .7.08l2.1 2.66a.1.1 0 0 0 .15 0l2.09-2.66a.5.5 0 1 1 .78.62l-2.08 2.66a1.1 1.1 0 0 1-1.73 0l-2.1-2.66a.5.5 0 0 1 .1-.7ZM3.55.4v9.04a.5.5 0 1 1-1 0V.39h1Z"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.93 3.78a.5.5 0 0 1-.7-.08l-2.1-2.66a.1.1 0 0 0-.15 0L.89 3.7a.5.5 0 0 1-.78-.62L2.19.42a1.1 1.1 0 0 1 1.73 0l2.1 2.66a.5.5 0 0 1-.1.7Z"})),this.sortingDirection&&s("svg",{class:"tds-table__header-button-icon "+("desc"===this.sortingDirection?"tds-table__header-button-icon--rotate":""),fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 2.974a1 1 0 0 0-2 0v24.3l-9.312-9.312a1 1 0 0 0-1.414 1.414l9.887 9.888a2.6 2.6 0 0 0 3.677 0l9.888-9.888a1 1 0 0 0-1.414-1.414L17 27.274v-24.3Z"}))):s("p",{class:"tds-table__header-text",style:{textAlign:this.textAlignState}},this.cellValue,s("slot",null)),this.onHeadCellHover=t=>{this.internalTdsHover.emit({tableId:this.tableId,key:t})},this.cellKey=void 0,this.cellValue=void 0,this.customWidth=void 0,this.sortable=!1,this.textAlign="left",this.textAlignState=void 0,this.sortingDirection="asc",this.sortedByMyKey=!1,this.verticalDividers=!1,this.compactDesign=!1,this.noMinWidth=!1,this.multiselect=!1,this.enableToolbarDesign=!1,this.tableId="",this.expandableRows=!1}internalTdsPropChangeListener(t){this.tableId===t.detail.tableId&&t.detail.changed.filter((t=>o.includes(t))).forEach((e=>{if(void 0===this[e])throw new Error(`Table prop is not supported: ${e}`);this[e]=t.detail[e]}))}updateOptionsContent(t){const{tableId:e,key:s}=t.detail;this.tableId===e&&this.cellKey!==s&&(this.sortedByMyKey=!1,setTimeout((()=>{this.sortingDirection=null}),200))}connectedCallback(){this.tableEl=this.host.closest("tds-table"),this.tableId=this.tableEl.tableId}componentWillLoad(){o.forEach((t=>{this[t]=this.tableEl[t]}))}componentWillRender(){this.textAlignState=["left","start","right","end","center"].includes(this.textAlign)?this.textAlign:"left",this.internalTdsTextAlign.emit([this.tableId,this.cellKey,this.textAlignState]),this.enableToolbarDesign=this.host.closest("tds-table").getElementsByTagName("tds-table-toolbar").length>=1}render(){return s(a,{key:"8cda19cdff411db98aecbf8a915853eda026853d",class:{"tds-table__header-cell":!0,"tds-table__header-cell--sortable":this.sortable,"tds-table__header-cell--is-sorted":this.sortedByMyKey,"tds-table__header-cell--custom-width":""!==this.customWidth,"tds-table--compact":this.compactDesign,"tds-table--divider":this.verticalDividers,"tds-table--no-min-width":this.noMinWidth,"tds-table--extra-column":this.multiselect||this.expandableRows,"tds-table--toolbar-available":this.enableToolbarDesign},style:{width:this.customWidth},onMouseOver:()=>this.onHeadCellHover(this.cellKey),onMouseLeave:()=>this.onHeadCellHover("")},this.headerCellContent())}get host(){return l(this)}};d.style=":host(.tds-table__header-cell){box-sizing:border-box;font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);display:table-cell;text-align:left;color:var(--tds-table-color);background-color:var(--tds-table-header-background);border-bottom:1px solid var(--tds-table-header-background-hover);padding:0;height:48px;min-width:192px;box-sizing:border-box;vertical-align:middle;overflow:hidden;transition:background-color 200ms ease}:host(.tds-table__header-cell) *{box-sizing:border-box}:host(.tds-table__header-cell) .tds-table__header-text{padding:8px 16px;margin:0}:host(.tds-table__header-cell--sortable) .tds-table__header-button{display:flex;align-items:center;gap:8px;justify-content:start;flex-direction:row;width:100%;height:100%;padding:0 16px;background-color:transparent;border:none;cursor:pointer;transition:background-color 200ms ease}:host(.tds-table__header-cell--sortable) .tds-table__header-button:focus{outline:2px solid var(--tds-table-header-btn-focus);outline-offset:-2px}:host(.tds-table__header-cell--sortable) .tds-table__header-button:focus .tds-table__header-button-icon{opacity:1}:host(.tds-table__header-cell--sortable) .tds-table__header-button .tds-table__header-button-text{font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);text-align:left;color:var(--tds-table-header-btn-color)}:host(.tds-table__header-cell--sortable) .tds-table__header-button .tds-table__header-button-icon{flex:0 0 16px;height:16px;width:16px;opacity:0;transform-origin:center;transition:opacity 200ms ease-in, transform 200ms ease;fill:var(--tds-table-color)}:host(.tds-table__header-cell--sortable) .tds-table__header-button:hover .tds-table__header-button-icon{opacity:1}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button{background-color:var(--tds-table-header-btn-background)}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button:hover{background-color:var(--tds-table-header-btn-background-hover)}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button .tds-table__header-button-icon{opacity:1}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button .tds-table__header-button-icon--rotate{transform:rotate(180deg)}:host(.tds-table--compact){height:33px}:host(.tds-table--divider){border-right:1px solid var(--tds-table-divider)}:host(.tds-table--divider:last-of-type){border-right:none}:host(.tds-table--no-min-width){min-width:unset}:host(.tds-table__header-cell:first-of-type){border-top-left-radius:4px}:host(.tds-table__header-cell:last-of-type){border-top-right-radius:4px}:host(.tds-table--extra-column:first-of-type){border-top-left-radius:0}:host(.tds-table--toolbar-available){border-radius:0}:host(.tds-table--extra-column.tds-table--toolbar-available){border-radius:0}:host(.tds-table__header-cell.tds-table--toolbar-available:first-of-type){border-top-left-radius:0}:host(.tds-table__header-cell.tds-table--toolbar-available:last-of-type){border-top-right-radius:0}";export{d as tds_header_cell}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as s,H as e,g as i}from"./p-699829fc.js";const l=class{constructor(s){t(this,s),this.tdsChange=o(this,"tdsChange",6),this.tdsFocus=o(this,"tdsFocus",6),this.tdsBlur=o(this,"tdsBlur",6),this.tdsInput=o(this,"tdsInput",6),this.setDefaultOption=()=>{if(0!==this.host.children.length){if(this.defaultValue){const t=Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName));let o=!1;t.forEach((t=>(this.multiselect?this.defaultValue.split(",").forEach((s=>{s===t.value&&(t.setSelected(!0),this.value=this.value?[...this.value,t.value]:[t.value],o=!0)})):this.defaultValue===t.value?(t.setSelected(!0),this.value=[t.value],o=!0):t.setSelected(!1),this.setValueAttribute(),t))),o||console.warn(`TDS DROPDOWN: No matching option found for defaultValue "${this.defaultValue}"`)}}else console.warn("TDS DROPDOWN: Data missing. Disregard if loading data asynchronously.")},this.getChildren=()=>{const t=Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName));if(0!==t.length)return t;console.warn("TDS DROPDOWN: Data missing. Disregard if loading data asynchronously.")},this.getOpenDirection=()=>{var t,o,s,e,i;if("auto"===this.openDirection||!this.openDirection){const l=null!==(o=null===(t=this.dropdownList)||void 0===t?void 0:t.offsetHeight)&&void 0!==o?o:0;return(null!==(i=null===(e=(s=this.host).getBoundingClientRect)||void 0===e?void 0:e.call(s).top)&&void 0!==i?i:0)+l+57>window.innerHeight?"up":"down"}return this.openDirection},this.handleToggleOpen=()=>{this.disabled||(this.open=!this.open,this.open&&this.focusInputElement())},this.focusInputElement=()=>{this.inputElement&&this.inputElement.focus()},this.getSelectedChildren=()=>{var t;return null===(t=this.value)||void 0===t?void 0:t.map((t=>this.getChildren().find((o=>o.value===t)))).filter(Boolean)},this.getSelectedChildrenLabels=()=>{var t;return null===(t=this.getSelectedChildren())||void 0===t?void 0:t.map((t=>t.textContent.trim()))},this.getValue=()=>{const t=this.getSelectedChildrenLabels();return t?this.filter?null==t?void 0:t.join(", "):null==t?void 0:t.toString():""},this.setValueAttribute=()=>{var t,o,s;""===(null===(t=this.value)||void 0===t?void 0:t.toString())&&(this.value=null),this.host.setAttribute("value",null!==(s=null===(o=this.value)||void 0===o?void 0:o.map((t=>t)).toString())&&void 0!==s?s:null)},this.handleFilter=t=>{this.tdsInput.emit(t);const o=t.target.value.toLowerCase(),s=this.getChildren();""===o?(s.forEach((t=>(t.removeAttribute("hidden"),t))),this.filterResult=null):this.filterResult=s.filter((t=>(this.normalizeString(t.textContent).toLowerCase().includes(this.normalizeString(o).toLowerCase())?t.removeAttribute("hidden"):t.setAttribute("hidden",""),!t.hasAttribute("hidden")))).length},this.handleFilterReset=()=>{this.reset(),this.inputElement.value="",this.handleFilter({target:{value:this.inputElement.value}}),this.inputElement.focus()},this.handleFocus=t=>{this.tdsFocus.emit(t)},this.handleBlur=t=>{this.tdsBlur.emit(t)},this.handleChange=()=>{var t,o;this.tdsChange.emit({name:this.name,value:null!==(o=null===(t=this.value)||void 0===t?void 0:t.map((t=>t)).toString())&&void 0!==o?o:null})},this.name=void 0,this.disabled=!1,this.helper=void 0,this.label=void 0,this.labelPosition=void 0,this.modeVariant=null,this.openDirection="auto",this.placeholder=void 0,this.size="lg",this.error=!1,this.multiselect=!1,this.filter=!1,this.normalizeText=!0,this.noResultText="No result",this.defaultValue=void 0,this.open=!1,this.value=void 0,this.filterResult=void 0,this.filterFocus=void 0}async reset(){this.internalReset(),this.handleChange()}async setValue(t,o){let s;s="string"==typeof t?[t]:t,!this.multiselect&&s.length>1&&(console.warn("Tried to select multiple items, but multiselect is not enabled."),s=[s[0]]),this.internalReset();for(let t=0;t<s.length;t++)this.getChildren().some((o=>o.value===s[t]))||s.splice(t,1);this.value=s,this.setValueAttribute(),this.selectChildrenAsSelectedBasedOnSelectionProp(),this.handleChange();const e=this.getSelectedChildren().map((t=>({value:t.value,label:t.textContent.trim()})));return this.filter&&(this.inputElement.value=this.getValue()),e}async appendValue(t){this.setValue(this.multiselect&&this.value?[...this.value,t]:t)}async removeValue(t){var o,s;let e;return this.multiselect?null===(o=this.getChildren())||void 0===o||o.forEach((o=>{var s;return o.value===t&&(this.value=null===(s=this.value)||void 0===s?void 0:s.filter((t=>t!==o.value)),e=o.textContent.trim(),o.setSelected(!1)),o})):this.reset(),this.handleChange(),this.setValueAttribute(),null===(s=this.value)||void 0===s?void 0:s.map((t=>({value:t,label:e})))}async close(){this.open=!1}onAnyClick(t){this.open&&!t.composedPath().includes(this.host)&&(this.open=!1)}async onKeyDown(t){const{activeElement:o}=document;if(!o)return;const s=this.getChildren();if("ArrowDown"===t.key){const t=o.nextElementSibling?s.findIndex((t=>t===o.nextElementSibling)):0;s[((t,o)=>{if(void 0===t[o])return 0;for(let s=o;s<t.length;s++)if(!t[s].disabled)return s})(s,t)].focus()}else"ArrowUp"===t.key?s[((t,o)=>{if(void 0===t[o])return t.length-1;for(let s=o;s>=0;s--)if(!t[s].disabled)return s})(s,o.nextElementSibling?this.getChildren().findIndex((t=>t===o.previousElementSibling)):0)].focus():"Escape"===t.key&&(this.open=!1)}handleOpenState(){this.filter&&this.multiselect&&(this.open||(this.inputElement.value=this.getValue()))}componentWillLoad(){this.setDefaultOption()}handleSlotChange(){this.setDefaultOption()}normalizeString(t){return this.normalizeText?t.normalize("NFD").replace(/\p{Diacritic}/gu,""):t}internalReset(){this.getChildren().forEach((t=>(t.setSelected(!1),t))),this.value=null,this.setValueAttribute()}selectChildrenAsSelectedBasedOnSelectionProp(){this.getChildren().forEach((t=>{this.value.forEach((o=>{t.value!==o?this.multiselect||t.setSelected(!1):t.setSelected(!0)}))}))}render(){var t,o,i,l;return((t,o,s,e)=>{let i=t.querySelector("input");t.querySelector("input")||(i=t.ownerDocument.createElement("input"),i.type="hidden",t.appendChild(i)),i.disabled=e,i.name=o,i.value=s||""})(this.host,this.name,null===(t=this.value)||void 0===t?void 0:t.map((t=>t)).toString(),this.disabled),s(e,{key:"451edf7c5eaa096500d8d989bd9cddc60a5fd5d8",role:"select",class:this.modeVariant?`tds-mode-variant-${this.modeVariant}`:""},this.label&&"outside"===this.labelPosition&&s("div",{class:"label-outside "+(this.disabled?"disabled":"")},this.label),s("div",{key:"c7e3d77ba79b6e135aa960bc8e56c2d41ae3ec2e",class:`dropdown-select ${this.size} ${this.disabled?"disabled":""}`},this.filter?s("div",{class:{filter:!0,focus:this.filterFocus,disabled:this.disabled,error:this.error}},s("div",{class:"value-wrapper"},this.label&&"inside"===this.labelPosition&&this.placeholder&&s("div",{class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{class:`\n label-inside-as-placeholder\n ${this.size}\n ${(null===(o=this.value)||void 0===o?void 0:o.length)?"selected":""}\n `},this.label),s("input",{ref:t=>this.inputElement=t,class:"inside"===this.labelPosition?"placeholder":"",type:"text",placeholder:this.placeholder,value:this.getValue(),disabled:this.disabled,onInput:t=>this.handleFilter(t),onBlur:t=>{this.filterFocus=!1,this.handleBlur(t)},onFocus:t=>{this.open=!0,this.filterFocus=!0,this.handleFocus(t)},onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)}})),s("tds-icon",{tabIndex:0,role:"button","aria-label":"Clear filter",svgTitle:"Clear filter",onClick:this.handleFilterReset,onKeyDown:t=>{"Enter"===t.key&&this.handleFilterReset()},class:"clear-icon "+(this.open&&""!==this.inputElement.value?"":"hide"),name:"cross",size:"16px"}),s("tds-icon",{tabIndex:0,role:"button","aria-label":"Open/Close dropdown",svgTitle:"Open/Close dropdown",onClick:this.handleToggleOpen,onKeyDown:t=>{"Enter"===t.key&&this.handleToggleOpen()},class:"menu-icon "+(this.open?"open":"closed"),name:"chevron_down",size:"16px"})):s("button",{onClick:()=>this.handleToggleOpen(),onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)},class:`\n ${this.value?"value":"placeholder"}\n ${this.open?"open":"closed"}\n ${this.error?"error":""}\n `,disabled:this.disabled},s("div",{class:`value-wrapper ${this.size}`},this.label&&"inside"===this.labelPosition&&this.placeholder&&s("div",{class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{class:`\n label-inside-as-placeholder\n ${this.size}\n ${(null===(i=this.value)||void 0===i?void 0:i.length)?"selected":""}\n `},this.label),s("div",{class:`placeholder ${this.size}`},(null===(l=this.value)||void 0===l?void 0:l.length)?this.getValue():this.placeholder),s("tds-icon",{"aria-label":"Open/Close dropdown",svgTitle:"Open/Close dropdown",class:"menu-icon "+(this.open?"open":"closed"),name:"chevron_down",size:"16px"})))),s("div",{key:"cd63a354addfbcbfb2bb355b1e053b93dd9d3864",ref:t=>this.dropdownList=t,class:`dropdown-list\n ${this.size}\n ${this.open?"open":"closed"}\n ${this.getOpenDirection()}\n ${this.label&&"outside"===this.labelPosition?"label-outside":""}`},s("slot",{key:"9a4feeed475bde225d19e01f17e4eadc292c6f41",onSlotchange:()=>this.handleSlotChange()}),0===this.filterResult&&""!==this.noResultText&&s("div",{class:`no-result ${this.size}`},this.noResultText)),this.helper&&s("div",{class:`helper ${this.error?"error":""} ${this.disabled?"disabled":""}`},this.error&&s("tds-icon",{name:"error",size:"16px"}),this.helper))}get host(){return i(this)}static get watchers(){return{open:["handleOpenState"]}}};l.style='@charset "UTF-8";:host button{all:unset;height:100%;width:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);border-radius:4px 4px 0 0}:host button:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host button .value-wrapper{padding:0 16px;display:flex;align-items:center;justify-content:space-between}:host button.placeholder{color:var(--tds-dropdown-placeholder-color);line-height:1.3}:host button.value{color:var(--tds-dropdown-value-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3}:host button:focus{border-bottom-color:var(--tds-dropdown-border-bottom-open)}:host button:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-border-bottom-open)}:host button.error{border-bottom:1px solid var(--tds-negative)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:0px}:host .filter{display:flex;align-items:center;justify-content:space-between;height:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);padding-left:16px;border-radius:4px 4px 0 0}:host .filter:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host .filter.disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host .filter .value-wrapper{display:flex;width:100%;height:100%}:host .filter .label-inside-as-placeholder{position:absolute;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3;color:var(--tds-dropdown-placeholder-color)}:host .filter .label-inside-as-placeholder.lg{top:20px}:host .filter .label-inside-as-placeholder.md{top:16px}:host .filter .label-inside-as-placeholder.sm{display:none}:host .filter .label-inside-as-placeholder.selected{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .filter .label-inside-as-placeholder.selected.lg{top:12px}:host .filter .label-inside-as-placeholder.selected.md{top:8px}:host .filter .label-inside-as-placeholder.selected.sm{display:none}:host .filter .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .filter.focus{border-bottom-color:transparent}:host .filter.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-dropdown-border-bottom-open)}:host .filter.error{border-bottom:1px solid var(--tds-negative)}:host .filter.error.focus{border-bottom-color:transparent}:host .filter.error.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host .filter input{flex:1;all:unset;width:100%}:host .filter input::placeholder{color:var(--tds-dropdown-placeholder-color)}:host .filter input:disabled::placeholder{color:var(--tds-dropdown-disabled-color)}:host .filter tds-icon{cursor:pointer}:host .filter .menu-icon{margin-right:16px}:host .filter .clear-icon{margin:0 8px;color:var(--tds-dropdown-clear-icon-color);padding-right:8px;border-right:1px solid var(--tds-dropdown-clear-icon-color)}:host .filter .clear-icon:hover{color:var(--tds-dropdown-clear-icon-hover-color)}:host .filter .clear-icon.hide{display:none;visibility:hidden}:host{display:block;position:relative;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}:host .label-outside{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-dropdown-label-color);margin-bottom:8px}:host .label-outside.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select{position:relative}:host .dropdown-select.disabled .label-inside,:host .dropdown-select.disabled .placeholder,:host .dropdown-select.disabled .label-inside-as-placeholder,:host .dropdown-select.disabled .value-wrapper{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select .label-inside{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);color:var(--tds-dropdown-label-inside-color)}:host .dropdown-select .label-inside.lg{top:12px;left:16px}:host .dropdown-select .label-inside.md{top:8px;left:16px}:host .dropdown-select .label-inside.sm{display:none}:host .dropdown-select .label-inside+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select .placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .dropdown-select .label-inside-as-placeholder{color:var(--tds-dropdown-placeholder-color)}:host .dropdown-select .label-inside-as-placeholder.selected{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .dropdown-select .label-inside-as-placeholder.selected.lg{top:12px}:host .dropdown-select .label-inside-as-placeholder.selected.md{top:8px}:host .dropdown-select .label-inside-as-placeholder.selected.sm{display:none}:host .dropdown-select .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select.lg{height:55px}:host .dropdown-select.md{height:47px}:host .dropdown-select.sm{height:39px}:host .helper{margin-top:4px;color:var(--tds-dropdown-helper-color);font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;align-items:center;gap:8px}:host .helper.error{color:var(--tds-negative)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{z-index:100;position:absolute;margin-top:1px;width:100%;transform-origin:top;transition:transform 0.2s ease-in-out;box-shadow:rgba(0, 0, 0, 0.1) 0 2px 3px 0;border-radius:0 0 4px 4px;overflow-y:auto}:host .dropdown-list::-webkit-scrollbar{width:4px;background-color:inherit}:host .dropdown-list::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .dropdown-list ::-webkit-scrollbar-button{height:0;width:0}:host .dropdown-list.lg{max-height:312px}:host .dropdown-list.md{max-height:312px}:host .dropdown-list.sm{max-height:260px}:host .dropdown-list.up{bottom:100%;margin-top:0;margin-bottom:1px;transform-origin:bottom;display:flex;flex-direction:column-reverse;box-shadow:rgba(0, 0, 0, 0.1) 0 -1px 3px 0;border-radius:4px 4px 0 0}:host .dropdown-list.up.label-outside{bottom:calc(100% - 24px)}:host .dropdown-list.closed{transform:scaleY(0);visibility:hidden}:host .dropdown-list.open{transform:scaleY(1)}:host .dropdown-list .no-result{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:flex;align-items:center;padding:0 16px;background-color:var(--tds-dropdown-bg)}:host .dropdown-list .no-result.lg{height:56px}:host .dropdown-list .no-result.md{height:48px}:host .dropdown-list .no-result.sm{height:40px}:host .menu-icon{color:var(--tds-dropdown-menu-icon-color)}:host tds-icon{transition:transform 0.2s ease-in-out}:host tds-icon.open{transform:rotateZ(180deg)}';export{l as tds_dropdown}
|
package/dist/tegel/tegel.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-699829fc.js";export{s as setNonce}from"./p-699829fc.js";import{g as d}from"./p-e1255160.js";(()=>{const t=import.meta.url,d={};return""!==t&&(d.resourcesUrl=new URL(".",t).href),e(d)})().then((async e=>(await d(),t(JSON.parse('[["p-450eabc1",[[1,"tds-header-launcher",{"open":[32],"buttonEl":[32],"hasListTypeMenu":[32]},[[8,"click","onAnyClick"]]]]],["p-50b0f2ff",[[1,"tds-header-dropdown",{"label":[1],"noDropdownIcon":[4,"no-dropdown-icon"],"selected":[4],"open":[32],"buttonEl":[32]},[[4,"click","onAnyClick"]]]]],["p-864e5bb0",[[1,"tds-header-hamburger"]]],["p-2f692ff0",[[17,"tds-dropdown-option",{"value":[1],"disabled":[4],"selected":[32],"multiselect":[32],"size":[32],"setSelected":[64]}]]],["p-acc70f3c",[[1,"tds-header-brand-symbol"]]],["p-ddabb9e9",[[1,"tds-side-menu-dropdown",{"defaultOpen":[4,"default-open"],"buttonLabel":[1,"button-label"],"selected":[4],"open":[32],"hoverState":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"],[1,"pointerenter","onEventPointerEnter"],[0,"focusin","onEventFocus"],[1,"pointerleave","onEventPointerLeave"],[0,"focusout","onEventBlur"]]]]],["p-5db63168",[[1,"tds-side-menu-user",{"heading":[1],"subheading":[1],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"]}]]],["p-0c444c09",[[1,"tds-accordion-item",{"header":[1],"expandIconPosition":[1,"expand-icon-position"],"disabled":[4],"expanded":[4],"paddingReset":[4,"padding-reset"],"toggleAccordionItem":[64]}]]],["p-af6d2907",[[1,"tds-banner",{"icon":[1],"header":[1],"subheader":[1],"variant":[1],"bannerId":[1,"banner-id"],"hidden":[516],"hideBanner":[64],"showBanner":[64]}]]],["p-e2443a41",[[1,"tds-card",{"modeVariant":[1,"mode-variant"],"imagePlacement":[1,"image-placement"],"header":[1],"subheader":[1],"bodyImg":[1,"body-img"],"bodyImgAlt":[1,"body-img-alt"],"bodyDivider":[4,"body-divider"],"clickable":[4],"cardId":[1,"card-id"]}]]],["p-3b546070",[[2,"tds-datetime",{"type":[513],"value":[1537],"min":[1],"max":[1],"defaultValue":[1,"default-value"],"disabled":[4],"size":[1],"noMinWidth":[4,"no-min-width"],"modeVariant":[1,"mode-variant"],"name":[1],"state":[1],"autofocus":[4],"label":[1],"helper":[1],"focusInput":[32],"setValue":[64]},[[0,"focus","handleFocusIn"],[0,"focusout","handleFocusOut"]]]]],["p-ebbe0131",[[1,"tds-dropdown",{"name":[1],"disabled":[4],"helper":[1],"label":[1],"labelPosition":[1,"label-position"],"modeVariant":[1,"mode-variant"],"openDirection":[1,"open-direction"],"placeholder":[1],"size":[1],"error":[4],"multiselect":[4],"filter":[4],"normalizeText":[4,"normalize-text"],"noResultText":[1,"no-result-text"],"defaultValue":[1,"default-value"],"open":[32],"value":[32],"filterResult":[32],"filterFocus":[32],"reset":[64],"setValue":[64],"appendValue":[64],"removeValue":[64],"close":[64]},[[9,"mousedown","onAnyClick"],[0,"keydown","onKeyDown"]],{"open":["handleOpenState"]}]]],["p-16f0471f",[[1,"tds-folder-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"buttonWidth":[32],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-412d8fd1",[[1,"tds-footer-group",{"titleText":[1,"title-text"],"open":[32]}]]],["p-e8957bd2",[[4,"tds-header-launcher-list"]]],["p-a31282be",[[1,"tds-header-launcher-list-item"]]],["p-bc7459fb",[[1,"tds-inline-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"showLeftScroll":[32],"showRightScroll":[32],"buttonWidth":[32],"selectTab":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-8a46d308",[[1,"tds-message",{"header":[1],"modeVariant":[1,"mode-variant"],"variant":[1],"noIcon":[4,"no-icon"],"minimal":[4]}]]],["p-7a8d7b95",[[1,"tds-modal",{"header":[1],"prevent":[4],"size":[1],"actionsPosition":[1,"actions-position"],"selector":[1],"referenceEl":[16],"show":[4],"isShown":[32],"showModal":[64],"closeModal":[64],"initializeModal":[64],"cleanupModal":[64]}]]],["p-5d756b0b",[[1,"tds-navigation-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-5880c2f3",[[6,"tds-popover-menu",{"selector":[1],"referenceEl":[16],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"fluidWidth":[4,"fluid-width"]}]]],["p-b6f8c65f",[[1,"tds-side-menu-close-button"]]],["p-f93bb760",[[1,"tds-side-menu-collapse-button",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-10610955",[[0,"tds-slider",{"label":[1],"value":[1025],"min":[1],"max":[1],"ticks":[1],"showTickNumbers":[4,"show-tick-numbers"],"tooltip":[4],"disabled":[4],"readOnly":[4,"read-only"],"controls":[4],"input":[4],"step":[1],"name":[1],"thumbSize":[1,"thumb-size"],"snap":[4],"sliderId":[1,"slider-id"],"reset":[64]},[[0,"keydown","handleKeydown"],[9,"mouseup","handleRelease"],[9,"touchend","handleRelease"],[9,"mousemove","handleMove"],[9,"touchmove","handleMove"]],{"value":["handleValueUpdate"]}]]],["p-56bae450",[[1,"tds-step",{"index":[1],"state":[1],"hideLabels":[32],"size":[32],"orientation":[32],"labelPosition":[32]},[[16,"internalTdsPropsChange","handlePropsChange"]]]]],["p-c77d9eaf",[[1,"tds-table-body-row",{"selected":[516],"disabled":[516],"multiselect":[32],"mainCheckBoxStatus":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-d41ef4f8",[[1,"tds-table-footer",{"pagination":[516],"paginationValue":[1538,"pagination-value"],"pages":[514],"cols":[2],"columnsNumber":[32],"compactDesign":[32],"lastCorrectValue":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-d2e0442d",[[1,"tds-table-header",{"allSelected":[1540,"all-selected"],"selected":[1540],"disabled":[1540],"indeterminate":[4],"multiselect":[32],"expandableRows":[32],"mainCheckboxSelected":[32],"mainExpendSelected":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"enableToolbarDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"internalTdsRowExpanded","internalTdsRowExpandedListener"]]]]],["p-453c8af8",[[1,"tds-table-toolbar",{"tableTitle":[513,"table-title"],"filter":[516],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-74a93487",[[6,"tds-text-field",{"type":[513],"labelPosition":[1,"label-position"],"label":[1],"min":[8],"max":[8],"helper":[1],"placeholder":[1],"value":[513],"disabled":[4],"readOnly":[4,"read-only"],"size":[1],"modeVariant":[1,"mode-variant"],"noMinWidth":[4,"no-min-width"],"name":[1],"state":[1],"maxLength":[2,"max-length"],"autofocus":[4],"focusInput":[32]}]]],["p-8c6aad07",[[2,"tds-textarea",{"label":[1],"name":[1],"helper":[1],"cols":[2],"rows":[2],"labelPosition":[1,"label-position"],"placeholder":[1],"value":[1],"disabled":[4],"readOnly":[4,"read-only"],"state":[1],"maxLength":[2,"max-length"],"modeVariant":[1,"mode-variant"],"autofocus":[4],"noMinWidth":[4,"no-min-width"],"focusInput":[32]}]]],["p-d9fec37c",[[1,"tds-toast",{"toastId":[1,"toast-id"],"header":[1],"subheader":[1],"variant":[1],"hidden":[516],"closable":[4],"toastRole":[1,"toast-role"],"hideToast":[64],"showToast":[64]}]]],["p-6c23bc53",[[6,"tds-tooltip",{"text":[1],"selector":[1],"referenceEl":[16],"mouseOverTooltip":[4,"mouse-over-tooltip"],"show":[1028],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"]}]]],["p-1ba2c5df",[[1,"tds-accordion",{"modeVariant":[1,"mode-variant"]}]]],["p-e3e19bd6",[[1,"tds-badge",{"value":[1],"hidden":[516],"size":[1],"shape":[32],"text":[32]},null,{"value":["watchProps"],"size":["watchProps"]}]]],["p-3f983f99",[[1,"tds-block",{"modeVariant":[1,"mode-variant"]}]]],["p-540a83e5",[[1,"tds-body-cell",{"cellValue":[520,"cell-value"],"cellKey":[520,"cell-key"],"disablePadding":[516,"disable-padding"],"textAlign":[513,"text-align"],"textAlignState":[32],"activeSorting":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"tableId":[32]},[[16,"internalTdsPropChange","internalTdsPropChangeListener"],[16,"internalTdsHover","internalTdsHoverListener"],[16,"internalTdsTextAlign","internalTdsTextAlignListener"]]]]],["p-8ebc7052",[[1,"tds-breadcrumb",{"current":[4]}]]],["p-4a04433c",[[1,"tds-breadcrumbs"]]],["p-5b7d9ca4",[[6,"tds-button",{"text":[1],"type":[1],"variant":[1],"size":[1],"disabled":[4],"fullbleed":[4],"modeVariant":[1,"mode-variant"],"onlyIcon":[32]}]]],["p-0215d53c",[[6,"tds-chip",{"type":[1],"size":[1],"chipId":[1,"chip-id"],"checked":[1540],"name":[1],"value":[1]}]]],["p-ed8f1e2a",[[1,"tds-folder-tab",{"disabled":[4],"selected":[32],"tabWidth":[32],"setTabWidth":[64],"setSelected":[64]}]]],["p-c08c8bd8",[[1,"tds-footer",{"modeVariant":[1,"mode-variant"]}]]],["p-e10b2f73",[[1,"tds-footer-item"]]],["p-7076c719",[[4,"tds-header"]]],["p-052901a5",[[1,"tds-header-cell",{"cellKey":[513,"cell-key"],"cellValue":[513,"cell-value"],"customWidth":[513,"custom-width"],"sortable":[4],"textAlign":[513,"text-align"],"textAlignState":[32],"sortingDirection":[32],"sortedByMyKey":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"multiselect":[32],"enableToolbarDesign":[32],"tableId":[32],"expandableRows":[32]},[[16,"internalTdsPropChange","internalTdsPropChangeListener"],[16,"internalSortButtonClicked","updateOptionsContent"]]]]],["p-2c388774",[[1,"tds-header-dropdown-list-user",{"imgUrl":[1,"img-url"],"imgAlt":[1,"img-alt"],"header":[1],"subheader":[1]}]]],["p-1f39c53a",[[4,"tds-header-launcher-grid",{"headingElement":[32]}]]],["p-76a00407",[[1,"tds-header-launcher-grid-item"]]],["p-02417061",[[4,"tds-header-launcher-grid-title"]]],["p-ed56507b",[[4,"tds-header-launcher-list-title"]]],["p-652eb0ff",[[1,"tds-header-title"]]],["p-2f5db352",[[1,"tds-inline-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-747811d6",[[1,"tds-link",{"disabled":[4],"underline":[4]}]]],["p-7e0116af",[[1,"tds-navigation-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-b03790b1",[[1,"tds-popover-menu-item",{"disabled":[4]}]]],["p-cc16393b",[[6,"tds-radio-button",{"name":[1],"value":[1],"radioId":[1,"radio-id"],"checked":[516],"required":[4],"disabled":[4]}]]],["p-2ffae2d1",[[1,"tds-side-menu",{"open":[4],"persistent":[4],"collapsed":[1028],"isUpperSlotEmpty":[32],"isCollapsed":[32],"initialCollapsedState":[32]},[[16,"internalTdsCollapse","collapsedSideMenuEventHandler"]],{"collapsed":["onCollapsedChange"]}]]],["p-d26257ca",[[1,"tds-side-menu-dropdown-list",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"]]]]],["p-5a273781",[[1,"tds-side-menu-dropdown-list-item",{"selected":[4],"dropdownHasIcon":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-a0812bb2",[[1,"tds-side-menu-overlay"]]],["p-f226f11e",[[0,"tds-spinner",{"size":[1],"variant":[1]}]]],["p-fb2968f2",[[1,"tds-stepper",{"orientation":[1],"labelPosition":[1,"label-position"],"size":[1],"hideLabels":[4,"hide-labels"],"stepperId":[1,"stepper-id"]},null,{"orientation":["handleDirectionChange"],"labelPosition":["handleLabelPositionChange"],"size":["handleSizeChange"],"hideLabels":["handleHideLabelsChange"]}]]],["p-7172fd77",[[1,"tds-table",{"verticalDividers":[516,"vertical-dividers"],"compactDesign":[516,"compact-design"],"noMinWidth":[516,"no-min-width"],"multiselect":[516],"expandableRows":[516,"expandable-rows"],"responsive":[516],"modeVariant":[513,"mode-variant"],"tableId":[1,"table-id"],"getSelectedRows":[64]},null,{"multiselect":["multiselectChanged"],"expandableRows":["enableExpandableRowsChanged"],"compactDesign":["compactDesignChanged"],"verticalDividers":["verticalDividersChanged"],"noMinWidth":["noMinWidthChanged"],"modeVariant":["modeVariantChanged"]}]]],["p-1e2ef3d6",[[4,"tds-table-body",{"multiselect":[32],"enablePaginationTableBody":[32],"expandableRows":[32],"multiselectArray":[32],"multiselectArrayJSON":[32],"mainCheckboxStatus":[32],"columnsNumber":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"internalTdsRowChange","bodyCheckboxListener"]]]]],["p-2598dc8a",[[1,"tds-table-body-row-expandable",{"colSpan":[2,"col-span"],"isExpanded":[32],"tableId":[32],"columnsNumber":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"modeVariant":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-e6a51915",[[6,"tds-toggle",{"checked":[516],"required":[4],"size":[1],"name":[1],"headline":[1],"disabled":[4],"toggleId":[1,"toggle-id"],"toggle":[64]}]]],["p-8bb8d06a",[[1,"tds-header-launcher-button",{"active":[4]}]]],["p-52b9333c",[[1,"tds-divider",{"orientation":[1]}]]],["p-7a3fbb5b",[[1,"tds-header-dropdown-list",{"size":[513],"headingElement":[32]}]]],["p-a1151348",[[1,"tds-header-dropdown-list-item",{"selected":[4],"size":[513]}]]],["p-e38b51a2",[[6,"tds-popover-canvas",{"selector":[1],"referenceEl":[16],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"modifiers":[16]}]]],["p-87bfc032",[[1,"tds-side-menu-user-image",{"src":[1],"alt":[1]}],[1,"tds-side-menu-user-label",{"heading":[1],"subheading":[1]}]]],["p-3dd15e1e",[[1,"tds-side-menu-item",{"selected":[4],"active":[4],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-8a90d1ae",[[6,"tds-checkbox",{"name":[1],"checkboxId":[1,"checkbox-id"],"disabled":[4],"required":[4],"checked":[1540],"indeterminate":[1028],"value":[1],"toggleCheckbox":[64]},null,{"indeterminate":["handleIndeterminateState"]}]]],["p-669f7646",[[6,"tds-popover-core",{"selector":[1],"referenceEl":[16],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"modifiers":[16],"trigger":[1],"autoHide":[4,"auto-hide"],"renderedShowValue":[32],"popperInstance":[32],"target":[32],"isShown":[32]},[[8,"click","onAnyClick"]],{"show":["onShowChange"],"referenceEl":["onReferenceElChanged"],"trigger":["onTriggerChanged"]}]]],["p-033fbea5",[[1,"tds-header-item",{"active":[4],"selected":[4]}],[1,"tds-core-header-item"]]],["p-b263f884",[[1,"tds-icon",{"name":[513],"size":[513],"svgTitle":[1,"svg-title"],"svgDescription":[1,"svg-description"],"icons_object":[32],"arrayOfIcons":[32]}]]]]'),e))));
|
|
1
|
+
import{p as e,b as t}from"./p-699829fc.js";export{s as setNonce}from"./p-699829fc.js";import{g as d}from"./p-e1255160.js";(()=>{const t=import.meta.url,d={};return""!==t&&(d.resourcesUrl=new URL(".",t).href),e(d)})().then((async e=>(await d(),t(JSON.parse('[["p-05704939",[[1,"tds-header-launcher",{"open":[32],"buttonEl":[32],"hasListTypeMenu":[32]},[[8,"click","onAnyClick"]]]]],["p-a06e00e1",[[1,"tds-header-dropdown",{"label":[1],"noDropdownIcon":[4,"no-dropdown-icon"],"selected":[4],"open":[32],"buttonEl":[32]},[[4,"click","onAnyClick"]]]]],["p-864e5bb0",[[1,"tds-header-hamburger"]]],["p-2f692ff0",[[17,"tds-dropdown-option",{"value":[1],"disabled":[4],"selected":[32],"multiselect":[32],"size":[32],"setSelected":[64]}]]],["p-acc70f3c",[[1,"tds-header-brand-symbol"]]],["p-ddabb9e9",[[1,"tds-side-menu-dropdown",{"defaultOpen":[4,"default-open"],"buttonLabel":[1,"button-label"],"selected":[4],"open":[32],"hoverState":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"],[1,"pointerenter","onEventPointerEnter"],[0,"focusin","onEventFocus"],[1,"pointerleave","onEventPointerLeave"],[0,"focusout","onEventBlur"]]]]],["p-5db63168",[[1,"tds-side-menu-user",{"heading":[1],"subheading":[1],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"]}]]],["p-0c444c09",[[1,"tds-accordion-item",{"header":[1],"expandIconPosition":[1,"expand-icon-position"],"disabled":[4],"expanded":[4],"paddingReset":[4,"padding-reset"],"toggleAccordionItem":[64]}]]],["p-af6d2907",[[1,"tds-banner",{"icon":[1],"header":[1],"subheader":[1],"variant":[1],"bannerId":[1,"banner-id"],"hidden":[516],"hideBanner":[64],"showBanner":[64]}]]],["p-e2443a41",[[1,"tds-card",{"modeVariant":[1,"mode-variant"],"imagePlacement":[1,"image-placement"],"header":[1],"subheader":[1],"bodyImg":[1,"body-img"],"bodyImgAlt":[1,"body-img-alt"],"bodyDivider":[4,"body-divider"],"clickable":[4],"cardId":[1,"card-id"]}]]],["p-3b546070",[[2,"tds-datetime",{"type":[513],"value":[1537],"min":[1],"max":[1],"defaultValue":[1,"default-value"],"disabled":[4],"size":[1],"noMinWidth":[4,"no-min-width"],"modeVariant":[1,"mode-variant"],"name":[1],"state":[1],"autofocus":[4],"label":[1],"helper":[1],"focusInput":[32],"setValue":[64]},[[0,"focus","handleFocusIn"],[0,"focusout","handleFocusOut"]]]]],["p-e12e62cf",[[1,"tds-dropdown",{"name":[1],"disabled":[4],"helper":[1],"label":[1],"labelPosition":[1,"label-position"],"modeVariant":[1,"mode-variant"],"openDirection":[1,"open-direction"],"placeholder":[1],"size":[1],"error":[4],"multiselect":[4],"filter":[4],"normalizeText":[4,"normalize-text"],"noResultText":[1,"no-result-text"],"defaultValue":[1,"default-value"],"open":[32],"value":[32],"filterResult":[32],"filterFocus":[32],"reset":[64],"setValue":[64],"appendValue":[64],"removeValue":[64],"close":[64]},[[9,"mousedown","onAnyClick"],[0,"keydown","onKeyDown"]],{"open":["handleOpenState"]}]]],["p-16f0471f",[[1,"tds-folder-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"buttonWidth":[32],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-412d8fd1",[[1,"tds-footer-group",{"titleText":[1,"title-text"],"open":[32]}]]],["p-e8957bd2",[[4,"tds-header-launcher-list"]]],["p-a31282be",[[1,"tds-header-launcher-list-item"]]],["p-bc7459fb",[[1,"tds-inline-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"showLeftScroll":[32],"showRightScroll":[32],"buttonWidth":[32],"selectTab":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-8a46d308",[[1,"tds-message",{"header":[1],"modeVariant":[1,"mode-variant"],"variant":[1],"noIcon":[4,"no-icon"],"minimal":[4]}]]],["p-7a8d7b95",[[1,"tds-modal",{"header":[1],"prevent":[4],"size":[1],"actionsPosition":[1,"actions-position"],"selector":[1],"referenceEl":[16],"show":[4],"isShown":[32],"showModal":[64],"closeModal":[64],"initializeModal":[64],"cleanupModal":[64]}]]],["p-5d756b0b",[[1,"tds-navigation-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-5880c2f3",[[6,"tds-popover-menu",{"selector":[1],"referenceEl":[16],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"fluidWidth":[4,"fluid-width"]}]]],["p-b6f8c65f",[[1,"tds-side-menu-close-button"]]],["p-f93bb760",[[1,"tds-side-menu-collapse-button",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-10610955",[[0,"tds-slider",{"label":[1],"value":[1025],"min":[1],"max":[1],"ticks":[1],"showTickNumbers":[4,"show-tick-numbers"],"tooltip":[4],"disabled":[4],"readOnly":[4,"read-only"],"controls":[4],"input":[4],"step":[1],"name":[1],"thumbSize":[1,"thumb-size"],"snap":[4],"sliderId":[1,"slider-id"],"reset":[64]},[[0,"keydown","handleKeydown"],[9,"mouseup","handleRelease"],[9,"touchend","handleRelease"],[9,"mousemove","handleMove"],[9,"touchmove","handleMove"]],{"value":["handleValueUpdate"]}]]],["p-56bae450",[[1,"tds-step",{"index":[1],"state":[1],"hideLabels":[32],"size":[32],"orientation":[32],"labelPosition":[32]},[[16,"internalTdsPropsChange","handlePropsChange"]]]]],["p-c77d9eaf",[[1,"tds-table-body-row",{"selected":[516],"disabled":[516],"multiselect":[32],"mainCheckBoxStatus":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-d41ef4f8",[[1,"tds-table-footer",{"pagination":[516],"paginationValue":[1538,"pagination-value"],"pages":[514],"cols":[2],"columnsNumber":[32],"compactDesign":[32],"lastCorrectValue":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-d2e0442d",[[1,"tds-table-header",{"allSelected":[1540,"all-selected"],"selected":[1540],"disabled":[1540],"indeterminate":[4],"multiselect":[32],"expandableRows":[32],"mainCheckboxSelected":[32],"mainExpendSelected":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"enableToolbarDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"internalTdsRowExpanded","internalTdsRowExpandedListener"]]]]],["p-453c8af8",[[1,"tds-table-toolbar",{"tableTitle":[513,"table-title"],"filter":[516],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-74a93487",[[6,"tds-text-field",{"type":[513],"labelPosition":[1,"label-position"],"label":[1],"min":[8],"max":[8],"helper":[1],"placeholder":[1],"value":[513],"disabled":[4],"readOnly":[4,"read-only"],"size":[1],"modeVariant":[1,"mode-variant"],"noMinWidth":[4,"no-min-width"],"name":[1],"state":[1],"maxLength":[2,"max-length"],"autofocus":[4],"focusInput":[32]}]]],["p-8c6aad07",[[2,"tds-textarea",{"label":[1],"name":[1],"helper":[1],"cols":[2],"rows":[2],"labelPosition":[1,"label-position"],"placeholder":[1],"value":[1],"disabled":[4],"readOnly":[4,"read-only"],"state":[1],"maxLength":[2,"max-length"],"modeVariant":[1,"mode-variant"],"autofocus":[4],"noMinWidth":[4,"no-min-width"],"focusInput":[32]}]]],["p-d9fec37c",[[1,"tds-toast",{"toastId":[1,"toast-id"],"header":[1],"subheader":[1],"variant":[1],"hidden":[516],"closable":[4],"toastRole":[1,"toast-role"],"hideToast":[64],"showToast":[64]}]]],["p-6c23bc53",[[6,"tds-tooltip",{"text":[1],"selector":[1],"referenceEl":[16],"mouseOverTooltip":[4,"mouse-over-tooltip"],"show":[1028],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"]}]]],["p-1ba2c5df",[[1,"tds-accordion",{"modeVariant":[1,"mode-variant"]}]]],["p-e3e19bd6",[[1,"tds-badge",{"value":[1],"hidden":[516],"size":[1],"shape":[32],"text":[32]},null,{"value":["watchProps"],"size":["watchProps"]}]]],["p-3f983f99",[[1,"tds-block",{"modeVariant":[1,"mode-variant"]}]]],["p-d362d26c",[[1,"tds-body-cell",{"cellValue":[520,"cell-value"],"cellKey":[520,"cell-key"],"disablePadding":[516,"disable-padding"],"textAlign":[513,"text-align"],"textAlignState":[32],"activeSorting":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"tableId":[32]},[[16,"internalTdsPropChange","internalTdsPropChangeListener"],[16,"internalTdsHover","internalTdsHoverListener"],[16,"internalTdsTextAlign","internalTdsTextAlignListener"]]]]],["p-8ebc7052",[[1,"tds-breadcrumb",{"current":[4]}]]],["p-4a04433c",[[1,"tds-breadcrumbs"]]],["p-5b7d9ca4",[[6,"tds-button",{"text":[1],"type":[1],"variant":[1],"size":[1],"disabled":[4],"fullbleed":[4],"modeVariant":[1,"mode-variant"],"onlyIcon":[32]}]]],["p-0215d53c",[[6,"tds-chip",{"type":[1],"size":[1],"chipId":[1,"chip-id"],"checked":[1540],"name":[1],"value":[1]}]]],["p-ed8f1e2a",[[1,"tds-folder-tab",{"disabled":[4],"selected":[32],"tabWidth":[32],"setTabWidth":[64],"setSelected":[64]}]]],["p-c08c8bd8",[[1,"tds-footer",{"modeVariant":[1,"mode-variant"]}]]],["p-e10b2f73",[[1,"tds-footer-item"]]],["p-7076c719",[[4,"tds-header"]]],["p-dd082e5f",[[1,"tds-header-cell",{"cellKey":[513,"cell-key"],"cellValue":[513,"cell-value"],"customWidth":[513,"custom-width"],"sortable":[4],"textAlign":[513,"text-align"],"textAlignState":[32],"sortingDirection":[32],"sortedByMyKey":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"multiselect":[32],"enableToolbarDesign":[32],"tableId":[32],"expandableRows":[32]},[[16,"internalTdsPropChange","internalTdsPropChangeListener"],[16,"internalSortButtonClicked","updateOptionsContent"]]]]],["p-2c388774",[[1,"tds-header-dropdown-list-user",{"imgUrl":[1,"img-url"],"imgAlt":[1,"img-alt"],"header":[1],"subheader":[1]}]]],["p-1f39c53a",[[4,"tds-header-launcher-grid",{"headingElement":[32]}]]],["p-76a00407",[[1,"tds-header-launcher-grid-item"]]],["p-02417061",[[4,"tds-header-launcher-grid-title"]]],["p-ed56507b",[[4,"tds-header-launcher-list-title"]]],["p-652eb0ff",[[1,"tds-header-title"]]],["p-2f5db352",[[1,"tds-inline-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-747811d6",[[1,"tds-link",{"disabled":[4],"underline":[4]}]]],["p-7e0116af",[[1,"tds-navigation-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-b03790b1",[[1,"tds-popover-menu-item",{"disabled":[4]}]]],["p-cc16393b",[[6,"tds-radio-button",{"name":[1],"value":[1],"radioId":[1,"radio-id"],"checked":[516],"required":[4],"disabled":[4]}]]],["p-2ffae2d1",[[1,"tds-side-menu",{"open":[4],"persistent":[4],"collapsed":[1028],"isUpperSlotEmpty":[32],"isCollapsed":[32],"initialCollapsedState":[32]},[[16,"internalTdsCollapse","collapsedSideMenuEventHandler"]],{"collapsed":["onCollapsedChange"]}]]],["p-d26257ca",[[1,"tds-side-menu-dropdown-list",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"]]]]],["p-5a273781",[[1,"tds-side-menu-dropdown-list-item",{"selected":[4],"dropdownHasIcon":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-a0812bb2",[[1,"tds-side-menu-overlay"]]],["p-f226f11e",[[0,"tds-spinner",{"size":[1],"variant":[1]}]]],["p-fb2968f2",[[1,"tds-stepper",{"orientation":[1],"labelPosition":[1,"label-position"],"size":[1],"hideLabels":[4,"hide-labels"],"stepperId":[1,"stepper-id"]},null,{"orientation":["handleDirectionChange"],"labelPosition":["handleLabelPositionChange"],"size":["handleSizeChange"],"hideLabels":["handleHideLabelsChange"]}]]],["p-7172fd77",[[1,"tds-table",{"verticalDividers":[516,"vertical-dividers"],"compactDesign":[516,"compact-design"],"noMinWidth":[516,"no-min-width"],"multiselect":[516],"expandableRows":[516,"expandable-rows"],"responsive":[516],"modeVariant":[513,"mode-variant"],"tableId":[1,"table-id"],"getSelectedRows":[64]},null,{"multiselect":["multiselectChanged"],"expandableRows":["enableExpandableRowsChanged"],"compactDesign":["compactDesignChanged"],"verticalDividers":["verticalDividersChanged"],"noMinWidth":["noMinWidthChanged"],"modeVariant":["modeVariantChanged"]}]]],["p-1e2ef3d6",[[4,"tds-table-body",{"multiselect":[32],"enablePaginationTableBody":[32],"expandableRows":[32],"multiselectArray":[32],"multiselectArrayJSON":[32],"mainCheckboxStatus":[32],"columnsNumber":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"internalTdsRowChange","bodyCheckboxListener"]]]]],["p-2598dc8a",[[1,"tds-table-body-row-expandable",{"colSpan":[2,"col-span"],"isExpanded":[32],"tableId":[32],"columnsNumber":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"modeVariant":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-e6a51915",[[6,"tds-toggle",{"checked":[516],"required":[4],"size":[1],"name":[1],"headline":[1],"disabled":[4],"toggleId":[1,"toggle-id"],"toggle":[64]}]]],["p-8bb8d06a",[[1,"tds-header-launcher-button",{"active":[4]}]]],["p-52b9333c",[[1,"tds-divider",{"orientation":[1]}]]],["p-7a3fbb5b",[[1,"tds-header-dropdown-list",{"size":[513],"headingElement":[32]}]]],["p-a1151348",[[1,"tds-header-dropdown-list-item",{"selected":[4],"size":[513]}]]],["p-e38b51a2",[[6,"tds-popover-canvas",{"selector":[1],"referenceEl":[16],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"modifiers":[16]}]]],["p-87bfc032",[[1,"tds-side-menu-user-image",{"src":[1],"alt":[1]}],[1,"tds-side-menu-user-label",{"heading":[1],"subheading":[1]}]]],["p-3dd15e1e",[[1,"tds-side-menu-item",{"selected":[4],"active":[4],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-8a90d1ae",[[6,"tds-checkbox",{"name":[1],"checkboxId":[1,"checkbox-id"],"disabled":[4],"required":[4],"checked":[1540],"indeterminate":[1028],"value":[1],"toggleCheckbox":[64]},null,{"indeterminate":["handleIndeterminateState"]}]]],["p-1fcf69c3",[[6,"tds-popover-core",{"selector":[1],"referenceEl":[16],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"modifiers":[16],"trigger":[1],"autoHide":[4,"auto-hide"],"renderedShowValue":[32],"popperInstance":[32],"target":[32],"isShown":[32]},[[8,"click","onAnyClick"],[8,"internalTdsShow","onTdsShow"]],{"show":["onShowChange"],"referenceEl":["onReferenceElChanged"],"trigger":["onTriggerChanged"]}]]],["p-033fbea5",[[1,"tds-header-item",{"active":[4],"selected":[4]}],[1,"tds-core-header-item"]]],["p-b263f884",[[1,"tds-icon",{"name":[513],"size":[513],"svgTitle":[1,"svg-title"],"svgDescription":[1,"svg-description"],"icons_object":[32],"arrayOfIcons":[32]}]]]]'),e))));
|
|
@@ -87,6 +87,8 @@ export declare class TdsDropdown {
|
|
|
87
87
|
onKeyDown(event: KeyboardEvent): Promise<void>;
|
|
88
88
|
handleOpenState(): void;
|
|
89
89
|
componentWillLoad(): void;
|
|
90
|
+
/** Method to handle slot changes */
|
|
91
|
+
private handleSlotChange;
|
|
90
92
|
/** Method to check if we should normalize text */
|
|
91
93
|
private normalizeString;
|
|
92
94
|
/** Method that resets the dropdown without emitting an event. */
|
|
@@ -25,11 +25,13 @@ export declare class TdsPopoverCore {
|
|
|
25
25
|
popperInstance: Instance | null;
|
|
26
26
|
target?: HTMLElement | null;
|
|
27
27
|
isShown: boolean;
|
|
28
|
+
private uuid;
|
|
28
29
|
/** @internal Show event. */
|
|
29
|
-
|
|
30
|
+
internalTdsShow: EventEmitter<{}>;
|
|
30
31
|
/** @internal Close event. */
|
|
31
|
-
|
|
32
|
+
internalTdsClose: EventEmitter<{}>;
|
|
32
33
|
onAnyClick(event: MouseEvent): void;
|
|
34
|
+
onTdsShow(event: Event): void;
|
|
33
35
|
componentWillLoad(): void;
|
|
34
36
|
onShowChange(newValue: boolean): void;
|
|
35
37
|
onReferenceElChanged(newValue: HTMLElement, oldValue: HTMLElement): void;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as s,g as r}from"./p-699829fc.js";import{g as a}from"./p-11648030.js";import{i}from"./p-0bd4c19c.js";import"./p-3fe9cbbf.js";const o=class{constructor(e){t(this,e),this.uuid=a(),this.open=!1,this.buttonEl=void 0,this.hasListTypeMenu=!1}onAnyClick(t){!t.composedPath().includes(this.host)&&(this.open=!1)}componentDidLoad(){this.host.shadowRoot.querySelector("slot:not([name])").assignedElements().some((t=>"tds-header-launcher-list"===t.tagName.toLowerCase()))&&(this.hasListTypeMenu=!0)}toggleLauncher(){this.open=!this.open}render(){this.ariaAttributes=Object.assign(Object.assign({},this.ariaAttributes),i(this.host,["role"]));const t=Object.assign(Object.assign({},this.ariaAttributes),{"aria-expanded":`${this.open}`,"aria-controls":`launcher-${this.uuid}`,class:"button",active:this.open,onClick:()=>{this.toggleLauncher()},ref:t=>{this.buttonEl=t}});return e(s,{key:"3429e2f83f0eb01bd6e655b6fe1d8a77784b4f34"},e("div",{key:"6c8522b99c3f7de3fd3f665366362c1035b9d9a2",class:{wrapper:!0,"state-open":this.open,"state-list-type-menu":this.hasListTypeMenu}},e("tds-header-launcher-button",Object.assign({key:"926507bc5d95971a1172de1a1cefd89d47959546"},t)),this.buttonEl&&e("tds-popover-canvas",{id:`tds-launcher-${this.uuid}`,class:"menu",referenceEl:this.buttonEl,placement:"bottom-start",show:this.open,offsetDistance:0,modifiers:[{name:"flip",options:{fallbackPlacements:[]}}]},this.open?e("slot",null):null)))}get host(){return r(this)}};o.style=":host .wrapper{height:var(--tds-header-height);position:relative}:host .wrapper .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-radius:0}:host .wrapper .menu::-webkit-scrollbar{width:4px;background-color:inherit}:host .wrapper .menu::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .wrapper .menu ::-webkit-scrollbar-button{height:0;width:0}@media all and (max-width: 384px){:host .wrapper .menu{width:100vw}}:host .wrapper.state-list-type-menu .menu{height:calc(100vh - var(--tds-header-height))}:host .wrapper.state-open .button{position:relative;z-index:901}";export{o as tds_header_launcher}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as o,g as s}from"./p-699829fc.js";import{g as a}from"./p-11648030.js";const i=class{constructor(e){t(this,e),this.uuid=a(),this.label=void 0,this.noDropdownIcon=!1,this.selected=!1,this.open=!1,this.buttonEl=void 0}onAnyClick(t){!t.composedPath().includes(this.host)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}render(){return e(o,{key:"cabebe721a79127441bddd0aa8ad1d9ff2ac9453"},e("div",{key:"f97c7f95f5c9a6382c3d3d48854b3cc9b2f51a8c",class:{"state-open":this.open}},e("tds-header-item",{key:"070b482e30884f2cf096472966d19232e97def8b",class:"button",active:this.open,selected:this.selected},e("button",{key:"c29ad0c7309b3680b909cd911ad947bd0d60cd3c",ref:t=>{this.buttonEl=t},"aria-expanded":`${this.open}`,"aria-controls":`launcher-${this.uuid}`,"aria-current":this.selected?"location":"false",onClick:()=>{this.toggleDropdown()}},e("slot",{key:"a955b0d40c1c3619e158b727ae70e266fe93a69c",name:"icon"}),this.label,e("slot",{key:"27195b2da32bbdf9f970c3b69355e3cc7efda11d",name:"label"}),!this.noDropdownIcon&&e("tds-icon",{class:"dropdown-icon",name:"chevron_down",size:"16px"}))),this.buttonEl&&e("tds-popover-canvas",{id:`tds-dropdown-${this.uuid}`,class:"menu",referenceEl:this.buttonEl,placement:"bottom-start",show:this.open,offsetDistance:0,modifiers:[{name:"flip",options:{fallbackPlacements:[]}}]},this.open?e("slot",null):null)))}get host(){return s(this)}};i.style=":host{height:var(--tds-header-height);position:relative}:host .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-top-right-radius:0;border-top-left-radius:0}:host .menu::-webkit-scrollbar{width:4px;background-color:inherit}:host .menu::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .menu ::-webkit-scrollbar-button{height:0;width:0}:host .state-open .dropdown-icon{transform:rotatetds-z-index(180deg)}:host .state-open .button{position:relative;z-index:901}";export{i as tds_header_dropdown}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s,H as i,g as e}from"./p-699829fc.js";const d=["verticalDividers","compactDesign","noMinWidth"],o=class{constructor(s){t(this,s),this.cellValue=void 0,this.cellKey=void 0,this.disablePadding=!1,this.textAlign=void 0,this.textAlignState=void 0,this.activeSorting=!1,this.verticalDividers=!1,this.compactDesign=!1,this.noMinWidth=!1,this.whiteBackground=!1,this.tableId=""}internalTdsPropChangeListener(t){this.tableId===t.detail.tableId&&t.detail.changed.filter((t=>d.includes(t))).forEach((s=>{if(void 0===this[s])throw new Error(`Table prop is not supported: ${s}`);this[s]=t.detail[s]}))}internalTdsHoverListener(t){const{tableId:s,key:i}=t.detail;s===this.tableId&&(this.activeSorting=this.cellKey===i)}internalTdsTextAlignListener(t){const[s,i,e]=t.detail;this.tableId===s&&this.cellKey===i&&(this.textAlignState=this.textAlign?this.textAlign:["left","start","center","right","end"].includes(e)?e:"left")}connectedCallback(){this.tableEl=this.host.closest("tds-table"),this.tableId=this.tableEl.tableId}componentWillLoad(){d.forEach((t=>{this[t]=this.tableEl[t]})),this.textAlign&&(this.textAlignState=this.textAlign)}render(){return s(i,{key:"76284c19457074e04686323e0ae010a0a0511066",class:{"tds-table__body-cell":!0,"tds-table__body-cell--hover":this.activeSorting,"tds-table__compact":this.compactDesign,"tds-table--divider":this.verticalDividers,"tds-table--no-min-width":this.noMinWidth,"tds-table__body-cell--no-padding":this.disablePadding},style:{textAlign:this.textAlignState}},this.cellValue,s("slot",{key:"41cfdbf142362f1dd298ed9f4c622775d543b64b"}))}get host(){return e(this)}};o.style=":host(.tds-table__body-cell){box-sizing:border-box;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:table-cell;box-sizing:border-box;color:var(--tds-table-color);padding:var(--tds-spacing-element-16);min-width:192px;vertical-align:top;background-color:transparent;transition:background-color 200ms ease}:host(.tds-table__body-cell) *{box-sizing:border-box}:host(.tds-table__body-cell--no-padding){padding:0}:host(.tds-table__body-cell--hover){background-color:var(--tds-table-body-cell-background-hover)}:host(.tds-table__compact){padding:var(--tds-spacing-element-8) var(--tds-spacing-element-16)}:host(.tds-table--divider){border-right:1px solid var(--tds-table-divider)}:host(.tds-table--divider:last-of-type){border-right:none}:host(.tds-table--no-min-width){min-width:unset}";export{o as tds_body_cell}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as n,H as i,g as r}from"./p-699829fc.js";var o="top",u="bottom",a="right",f="left",s="auto",c=[o,u,a,f],l="start",h="end",d="clippingParents",p="viewport",v="popper",b="reference",m=c.reduce((function(t,e){return t.concat([e+"-"+l,e+"-"+h])}),[]),y=[].concat(c,[s]).reduce((function(t,e){return t.concat([e,e+"-"+l,e+"-"+h])}),[]),g=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function x(t){return t?(t.nodeName||"").toLowerCase():null}function w(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function O(t){return t instanceof w(t).Element||t instanceof Element}function j(t){return t instanceof w(t).HTMLElement||t instanceof HTMLElement}function k(t){return"undefined"!=typeof ShadowRoot&&(t instanceof w(t).ShadowRoot||t instanceof ShadowRoot)}function E(t){return t.split("-")[0]}var C=Math.max,M=Math.min,A=Math.round;function R(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function S(){return!/^((?!chrome|android).)*safari/i.test(R())}function T(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&j(t)&&(r=t.offsetWidth>0&&A(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&A(i.height)/t.offsetHeight||1);var u=(O(t)?w(t):window).visualViewport,a=!S()&&n,f=(i.left+(a&&u?u.offsetLeft:0))/r,s=(i.top+(a&&u?u.offsetTop:0))/o,c=i.width/r,l=i.height/o;return{width:c,height:l,top:s,right:f+c,bottom:s+l,left:f,x:f,y:s}}function q(t){var e=T(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function B(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&k(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function L(t){return w(t).getComputedStyle(t)}function P(t){return["table","td","th"].indexOf(x(t))>=0}function W(t){return((O(t)?t.ownerDocument:t.document)||window.document).documentElement}function H(t){return"html"===x(t)?t:t.assignedSlot||t.parentNode||(k(t)?t.host:null)||W(t)}function z(t){return j(t)&&"fixed"!==L(t).position?t.offsetParent:null}function I(t){for(var e=w(t),n=z(t);n&&P(n)&&"static"===L(n).position;)n=z(n);return n&&("html"===x(n)||"body"===x(n)&&"static"===L(n).position)?e:n||function(t){var e=/firefox/i.test(R());if(/Trident/i.test(R())&&j(t)&&"fixed"===L(t).position)return null;var n=H(t);for(k(n)&&(n=n.host);j(n)&&["html","body"].indexOf(x(n))<0;){var i=L(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function D(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function _(t,e,n){return C(t,M(e,n))}function U(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function F(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function V(t){return t.split("-")[1]}var G={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(t){var e,n=t.popper,i=t.popperRect,r=t.placement,s=t.variation,c=t.offsets,l=t.position,d=t.gpuAcceleration,p=t.adaptive,v=t.roundOffsets,b=t.isFixed,m=c.x,y=void 0===m?0:m,g=c.y,x=void 0===g?0:g,O="function"==typeof v?v({x:y,y:x}):{x:y,y:x};y=O.x,x=O.y;var j=c.hasOwnProperty("x"),k=c.hasOwnProperty("y"),E=f,C=o,M=window;if(p){var R=I(n),S="clientHeight",T="clientWidth";R===w(n)&&"static"!==L(R=W(n)).position&&"absolute"===l&&(S="scrollHeight",T="scrollWidth"),(r===o||(r===f||r===a)&&s===h)&&(C=u,x-=(b&&R===M&&M.visualViewport?M.visualViewport.height:R[S])-i.height,x*=d?1:-1),r!==f&&(r!==o&&r!==u||s!==h)||(E=a,y-=(b&&R===M&&M.visualViewport?M.visualViewport.width:R[T])-i.width,y*=d?1:-1)}var q,B=Object.assign({position:l},p&&G),P=!0===v?function(t,e){var n=t.y,i=e.devicePixelRatio||1;return{x:A(t.x*i)/i||0,y:A(n*i)/i||0}}({x:y,y:x},w(n)):{x:y,y:x};return y=P.x,x=P.y,Object.assign({},B,d?((q={})[C]=k?"0":"",q[E]=j?"0":"",q.transform=(M.devicePixelRatio||1)<=1?"translate("+y+"px, "+x+"px)":"translate3d("+y+"px, "+x+"px, 0)",q):((e={})[C]=k?x+"px":"",e[E]=j?y+"px":"",e.transform="",e))}var K={passive:!0},N={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return N[t]}))}var X={start:"end",end:"start"};function Y(t){return t.replace(/start|end/g,(function(t){return X[t]}))}function Z(t){var e=w(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $(t){return T(W(t)).left+Z(t).scrollLeft}function tt(t){var e=L(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function et(t){return["html","body","#document"].indexOf(x(t))>=0?t.ownerDocument.body:j(t)&&tt(t)?t:et(H(t))}function nt(t,e){var n;void 0===e&&(e=[]);var i=et(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=w(i),u=r?[o].concat(o.visualViewport||[],tt(i)?i:[]):i,a=e.concat(u);return r?a:a.concat(nt(H(u)))}function it(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e,n){return e===p?it(function(t,e){var n=w(t),i=W(t),r=n.visualViewport,o=i.clientWidth,u=i.clientHeight,a=0,f=0;if(r){o=r.width,u=r.height;var s=S();(s||!s&&"fixed"===e)&&(a=r.offsetLeft,f=r.offsetTop)}return{width:o,height:u,x:a+$(t),y:f}}(t,n)):O(e)?function(t,e){var n=T(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):it(function(t){var e,n=W(t),i=Z(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=C(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),u=C(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+$(t),f=-i.scrollTop;return"rtl"===L(r||n).direction&&(a+=C(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:u,x:a,y:f}}(W(t)))}function ot(t){var e,n=t.reference,i=t.element,r=t.placement,s=r?E(r):null,c=r?V(r):null,d=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2;switch(s){case o:e={x:d,y:n.y-i.height};break;case u:e={x:d,y:n.y+n.height};break;case a:e={x:n.x+n.width,y:p};break;case f:e={x:n.x-i.width,y:p};break;default:e={x:n.x,y:n.y}}var v=s?D(s):null;if(null!=v){var b="y"===v?"height":"width";switch(c){case l:e[v]=e[v]-(n[b]/2-i[b]/2);break;case h:e[v]=e[v]+(n[b]/2-i[b]/2)}}return e}function ut(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,r=e.strategy,f=void 0===r?t.strategy:r,s=e.boundary,l=void 0===s?d:s,h=e.rootBoundary,m=void 0===h?p:h,y=e.elementContext,g=void 0===y?v:y,w=e.altBoundary,k=void 0!==w&&w,E=e.padding,A=void 0===E?0:E,R=U("number"!=typeof A?A:F(A,c)),S=t.rects.popper,q=t.elements[k?g===v?b:v:g],P=function(t,e,n,i){var r="clippingParents"===e?function(t){var e=nt(H(t)),n=["absolute","fixed"].indexOf(L(t).position)>=0&&j(t)?I(t):t;return O(n)?e.filter((function(t){return O(t)&&B(t,n)&&"body"!==x(t)})):[]}(t):[].concat(e),o=[].concat(r,[n]),u=o.reduce((function(e,n){var r=rt(t,n,i);return e.top=C(r.top,e.top),e.right=M(r.right,e.right),e.bottom=M(r.bottom,e.bottom),e.left=C(r.left,e.left),e}),rt(t,o[0],i));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}(O(q)?q:q.contextElement||W(t.elements.popper),l,m,f),z=T(t.elements.reference),D=ot({reference:z,element:S,strategy:"absolute",placement:i}),_=it(Object.assign({},S,D)),V=g===v?_:z,G={top:P.top-V.top+R.top,bottom:V.bottom-P.bottom+R.bottom,left:P.left-V.left+R.left,right:V.right-P.right+R.right},J=t.modifiersData.offset;if(g===v&&J){var K=J[i];Object.keys(G).forEach((function(t){var e=[a,u].indexOf(t)>=0?1:-1,n=[o,u].indexOf(t)>=0?"y":"x";G[t]+=K[n]*e}))}return G}function at(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,o=e.flipVariations,u=e.allowedAutoPlacements,a=void 0===u?y:u,f=V(e.placement),s=f?o?m:m.filter((function(t){return V(t)===f})):c,l=s.filter((function(t){return a.indexOf(t)>=0}));0===l.length&&(l=s);var h=l.reduce((function(e,o){return e[o]=ut(t,{placement:o,boundary:n,rootBoundary:i,padding:r})[E(o)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}const ft={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,c=void 0===r||r,h=n.altAxis,d=void 0===h||h,p=n.fallbackPlacements,v=n.padding,b=n.boundary,m=n.rootBoundary,y=n.altBoundary,g=n.flipVariations,x=void 0===g||g,w=n.allowedAutoPlacements,O=e.options.placement,j=E(O),k=p||(j!==O&&x?function(t){if(E(t)===s)return[];var e=Q(t);return[Y(t),e,Y(e)]}(O):[Q(O)]),C=[O].concat(k).reduce((function(t,n){return t.concat(E(n)===s?at(e,{placement:n,boundary:b,rootBoundary:m,padding:v,flipVariations:x,allowedAutoPlacements:w}):n)}),[]),M=e.rects.reference,A=e.rects.popper,R=new Map,S=!0,T=C[0],q=0;q<C.length;q++){var B=C[q],L=E(B),P=V(B)===l,W=[o,u].indexOf(L)>=0,H=W?"width":"height",z=ut(e,{placement:B,boundary:b,rootBoundary:m,altBoundary:y,padding:v}),I=W?P?a:f:P?u:o;M[H]>A[H]&&(I=Q(I));var D=Q(I),_=[];if(c&&_.push(z[L]<=0),d&&_.push(z[I]<=0,z[D]<=0),_.every((function(t){return t}))){T=B,S=!1;break}R.set(B,_)}if(S)for(var U=function(t){var e=C.find((function(e){var n=R.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},F=x?3:1;F>0&&"break"!==U(F);F--);e.placement!==T&&(e.modifiersData[i]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function st(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function ct(t){return[o,a,u,f].some((function(e){return t[e]>=0}))}function lt(t,e,n){void 0===n&&(n=!1);var i,r,o=j(e),u=j(e)&&function(t){var e=t.getBoundingClientRect(),n=A(e.width)/t.offsetWidth||1,i=A(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=W(e),f=T(t,u,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==x(e)||tt(a))&&(s=(i=e)!==w(i)&&j(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:Z(i)),j(e)?((c=T(e,!0)).x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=$(a))),{x:f.left+s.scrollLeft-c.x,y:f.top+s.scrollTop-c.y,width:f.width,height:f.height}}function ht(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||r(t)})),i}var dt={placement:"bottom",modifiers:[],strategy:"absolute"};function pt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function vt(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?dt:i;return function(t,e,i){void 0===i&&(i=r);var o,u,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},dt,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},f=[],s=!1,c={state:a,setOptions:function(i){var o="function"==typeof i?i(a.options):i;l(),a.options=Object.assign({},r,a.options,o),a.scrollParents={reference:O(t)?nt(t):t.contextElement?nt(t.contextElement):[],popper:nt(e)};var u,s,h=function(t){var e=ht(t);return g.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((u=[].concat(n,a.options.modifiers),s=u.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(s).map((function(t){return s[t]}))));return a.orderedModifiers=h.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:a,name:t.name,instance:c,options:void 0===e?{}:e});f.push(i||function(){})}})),c.update()},forceUpdate:function(){if(!s){var t=a.elements,e=t.reference,n=t.popper;if(pt(e,n)){a.rects={reference:lt(e,I(n),"fixed"===a.options.strategy),popper:q(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,u=r.options;"function"==typeof o&&(a=o({state:a,options:void 0===u?{}:u,name:r.name,instance:c})||a)}else a.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){c.forceUpdate(),t(a)}))},function(){return u||(u=new Promise((function(t){Promise.resolve().then((function(){u=void 0,t(o())}))}))),u}),destroy:function(){l(),s=!0}};if(!pt(t,e))return c;function l(){f.forEach((function(t){return t()})),f=[]}return c.setOptions(i).then((function(t){!s&&i.onFirstUpdate&&i.onFirstUpdate(t)})),c}}var bt=vt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,u=i.resize,a=void 0===u||u,f=w(e.elements.popper),s=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&s.forEach((function(t){t.addEventListener("scroll",n.update,K)})),a&&f.addEventListener("resize",n.update,K),function(){o&&s.forEach((function(t){t.removeEventListener("scroll",n.update,K)})),a&&f.removeEventListener("resize",n.update,K)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=ot({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,u=void 0===o||o,a=n.roundOffsets,f=void 0===a||a,s={placement:E(e.placement),variation:V(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,J(Object.assign({},s,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:u,roundOffsets:f})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,J(Object.assign({},s,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];j(r)&&x(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});j(i)&&x(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,u=y.reduce((function(t,n){return t[n]=function(t,e,n){var i=E(t),r=[f,o].indexOf(i)>=0?-1:1,u="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=u[0],c=u[1];return s=s||0,c=(c||0)*r,[f,a].indexOf(i)>=0?{x:c,y:s}:{x:s,y:c}}(n,e.rects,r),t}),{}),s=u[e.placement],c=s.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=s.x,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=u}},ft,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,s=void 0===r||r,c=n.altAxis,h=void 0!==c&&c,d=n.tether,p=void 0===d||d,v=n.tetherOffset,b=void 0===v?0:v,m=ut(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),y=E(e.placement),g=V(e.placement),x=!g,w=D(y),O="x"===w?"y":"x",j=e.modifiersData.popperOffsets,k=e.rects.reference,A=e.rects.popper,R="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,S="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,B={x:0,y:0};if(j){if(s){var L,P="y"===w?o:f,W="y"===w?u:a,H="y"===w?"height":"width",z=j[w],U=z+m[P],F=z-m[W],G=p?-A[H]/2:0,J=g===l?k[H]:A[H],K=g===l?-A[H]:-k[H],N=e.elements.arrow,Q=p&&N?q(N):{width:0,height:0},X=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[P],Z=X[W],$=_(0,k[H],Q[H]),tt=x?k[H]/2-G-$-Y-S.mainAxis:J-$-Y-S.mainAxis,et=x?-k[H]/2+G+$+Z+S.mainAxis:K+$+Z+S.mainAxis,nt=e.elements.arrow&&I(e.elements.arrow),it=null!=(L=null==T?void 0:T[w])?L:0,rt=z+et-it,ot=_(p?M(U,z+tt-it-(nt?"y"===w?nt.clientTop||0:nt.clientLeft||0:0)):U,z,p?C(F,rt):F);j[w]=ot,B[w]=ot-z}if(h){var at,ft=j[O],st="y"===O?"height":"width",ct=ft+m["x"===w?o:f],lt=ft-m["x"===w?u:a],ht=-1!==[o,f].indexOf(y),dt=null!=(at=null==T?void 0:T[O])?at:0,pt=ht?ct:ft-k[st]-A[st]-dt+S.altAxis,vt=ht?ft+k[st]+A[st]-dt-S.altAxis:lt,bt=p&&ht?function(t,e,n){var i=_(t,e,n);return i>n?n:i}(pt,ft,vt):_(p?pt:ct,ft,p?vt:lt);j[O]=bt,B[O]=bt-ft}e.modifiersData[i]=B}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,r=t.options,s=n.elements.arrow,l=n.modifiersData.popperOffsets,h=E(n.placement),d=D(h),p=[f,a].indexOf(h)>=0?"height":"width";if(s&&l){var v=function(t,e){return U("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:F(t,c))}(r.padding,n),b=q(s),m="y"===d?o:f,y="y"===d?u:a,g=n.rects.reference[p]+n.rects.reference[d]-l[d]-n.rects.popper[p],x=l[d]-n.rects.reference[d],w=I(s),O=w?"y"===d?w.clientHeight||0:w.clientWidth||0:0,j=O/2-b[p]/2+(g/2-x/2),k=_(v[m],j,O-b[p]-v[y]);n.modifiersData[i]=((e={})[d]=k,e.centerOffset=k-j,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&B(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,u=ut(e,{elementContext:"reference"}),a=ut(e,{altBoundary:!0}),f=st(u,i),s=st(a,r,o),c=ct(f),l=ct(s);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:s,isReferenceHidden:c,hasPopperEscaped:l},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":l})}}]});const mt=class{constructor(n){t(this,n),this.tdsShow=e(this,"internalTdsShow",0),this.tdsClose=e(this,"internalTdsClose",0),this.setIsShown=function(t){this.isShown="function"==typeof t?t(this.isShown):t,this.isShown?this.tdsShow.emit():this.tdsClose.emit()}.bind(this),this.onClickTarget=function(t){t.stopPropagation(),this.setIsShown((t=>!t))}.bind(this),this.handleShow=function(t){t.stopPropagation(),this.setIsShown(!0)}.bind(this),this.handleHide=function(t){t.stopPropagation(),this.setIsShown(!1)}.bind(this),this.selector="",this.referenceEl=void 0,this.show=null,this.placement="auto",this.offsetSkidding=0,this.offsetDistance=8,this.modifiers=[],this.trigger="click",this.autoHide=!0,this.renderedShowValue=!1,this.popperInstance=void 0,this.target=void 0,this.isShown=!1}onAnyClick(t){"click"===this.trigger&&this.isShown&&null===this.show&&!t.composedPath().includes(this.host)&&this.setIsShown(!1)}componentWillLoad(){this.setIsShown(this.show)}onShowChange(t){this.setIsShown(t)}onReferenceElChanged(t,e){t!==e&&this.initialize({referenceEl:t,trigger:this.trigger})}onTriggerChanged(t){this.initialize({referenceEl:this.referenceEl,trigger:t})}initialize({referenceEl:t,trigger:e}){this.cleanUp(),this.target=void 0!==t?t:this.selector?document.querySelector(this.selector):null,this.popperInstance=this.target?bt(this.target,this.host,{strategy:"fixed",placement:this.placement,modifiers:[{name:"offset",options:{offset:[this.offsetSkidding,this.offsetDistance]}},...this.modifiers]}):null,this.popperInstance||console.error("Could not initialize: reference element not found."),"click"===e&&null===this.show&&this.target.addEventListener("click",this.onClickTarget),"hover"!==e&&"hover-popover"!==e||(this.target.addEventListener("focusin",this.handleShow),this.target.addEventListener("focusout",this.handleHide),this.target.addEventListener("mouseenter",this.handleShow),this.target.addEventListener("mouseleave",this.handleHide),"hover-popover"===e&&(this.host.addEventListener("mouseenter",this.handleShow),this.host.addEventListener("mouseleave",this.handleHide)))}cleanUp(){var t,e,n,i,r,o,u,a;null===(t=this.target)||void 0===t||t.removeEventListener("click",this.onClickTarget),null===(e=this.target)||void 0===e||e.removeEventListener("focusin",this.handleShow),null===(n=this.target)||void 0===n||n.removeEventListener("focusout",this.handleHide),null===(i=this.target)||void 0===i||i.removeEventListener("mouseenter",this.handleShow),null===(r=this.target)||void 0===r||r.removeEventListener("mouseleave",this.handleHide),null===(o=this.host)||void 0===o||o.removeEventListener("mouseenter",this.handleShow),null===(u=this.host)||void 0===u||u.removeEventListener("mouseleave",this.handleHide),null===(a=this.popperInstance)||void 0===a||a.destroy()}componentDidLoad(){this.initialize({referenceEl:this.referenceEl,trigger:this.trigger})}componentDidRender(){this.isShown&&!this.renderedShowValue&&this.popperInstance.update(),this.renderedShowValue=this.isShown}disconnectedCallback(){this.cleanUp()}render(){let t={};return this.autoHide&&(t={display:this.isShown?"block":"none"}),n(i,{key:"37933e24ca1b3ef534043364efe070074b934588",style:t},n("slot",{key:"fe4498e8b3cc2e3bd12f1080edea75b1d502e832"}))}get host(){return r(this)}static get watchers(){return{show:["onShowChange"],referenceEl:["onReferenceElChanged"],trigger:["onTriggerChanged"]}}};export{mt as tds_popover_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,h as s,H as e,g as i}from"./p-699829fc.js";const l=class{constructor(s){t(this,s),this.tdsChange=o(this,"tdsChange",6),this.tdsFocus=o(this,"tdsFocus",6),this.tdsBlur=o(this,"tdsBlur",6),this.tdsInput=o(this,"tdsInput",6),this.setDefaultOption=()=>{Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName)).forEach((t=>(this.multiselect?this.defaultValue.split(",").forEach((o=>{o===t.value&&(t.setSelected(!0),this.value=this.value?[...this.value,t.value]:[t.value])})):this.defaultValue===t.value?(t.setSelected(!0),this.value=[t.value]):t.setSelected(!1),this.setValueAttribute(),t)))},this.getChildren=()=>{const t=Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName));if(0!==t.length)return t;console.warn("TDS DROPDOWN: Data missing. Disregard if loading data asynchronously.")},this.getOpenDirection=()=>{var t,o,s,e,i;if("auto"===this.openDirection||!this.openDirection){const l=null!==(o=null===(t=this.dropdownList)||void 0===t?void 0:t.offsetHeight)&&void 0!==o?o:0;return(null!==(i=null===(e=(s=this.host).getBoundingClientRect)||void 0===e?void 0:e.call(s).top)&&void 0!==i?i:0)+l+57>window.innerHeight?"up":"down"}return this.openDirection},this.handleToggleOpen=()=>{this.disabled||(this.open=!this.open,this.open&&this.focusInputElement())},this.focusInputElement=()=>{this.inputElement&&this.inputElement.focus()},this.getSelectedChildren=()=>{var t;return null===(t=this.value)||void 0===t?void 0:t.map((t=>this.getChildren().find((o=>o.value===t)))).filter(Boolean)},this.getSelectedChildrenLabels=()=>{var t;return null===(t=this.getSelectedChildren())||void 0===t?void 0:t.map((t=>t.textContent.trim()))},this.getValue=()=>{const t=this.getSelectedChildrenLabels();return t?this.filter?null==t?void 0:t.join(", "):null==t?void 0:t.toString():""},this.setValueAttribute=()=>{var t,o,s;""===(null===(t=this.value)||void 0===t?void 0:t.toString())&&(this.value=null),this.host.setAttribute("value",null!==(s=null===(o=this.value)||void 0===o?void 0:o.map((t=>t)).toString())&&void 0!==s?s:null)},this.handleFilter=t=>{this.tdsInput.emit(t);const o=t.target.value.toLowerCase(),s=this.getChildren();""===o?(s.forEach((t=>(t.removeAttribute("hidden"),t))),this.filterResult=null):this.filterResult=s.filter((t=>(this.normalizeString(t.textContent).toLowerCase().includes(this.normalizeString(o).toLowerCase())?t.removeAttribute("hidden"):t.setAttribute("hidden",""),!t.hasAttribute("hidden")))).length},this.handleFilterReset=()=>{this.reset(),this.inputElement.value="",this.handleFilter({target:{value:this.inputElement.value}}),this.inputElement.focus()},this.handleFocus=t=>{this.tdsFocus.emit(t)},this.handleBlur=t=>{this.tdsBlur.emit(t)},this.handleChange=()=>{var t,o;this.tdsChange.emit({name:this.name,value:null!==(o=null===(t=this.value)||void 0===t?void 0:t.map((t=>t)).toString())&&void 0!==o?o:null})},this.name=void 0,this.disabled=!1,this.helper=void 0,this.label=void 0,this.labelPosition=void 0,this.modeVariant=null,this.openDirection="auto",this.placeholder=void 0,this.size="lg",this.error=!1,this.multiselect=!1,this.filter=!1,this.normalizeText=!0,this.noResultText="No result",this.defaultValue=void 0,this.open=!1,this.value=void 0,this.filterResult=void 0,this.filterFocus=void 0}async reset(){this.internalReset(),this.handleChange()}async setValue(t,o){let s;s="string"==typeof t?[t]:t,!this.multiselect&&s.length>1&&(console.warn("Tried to select multiple items, but multiselect is not enabled."),s=[s[0]]),this.internalReset();for(let t=0;t<s.length;t++)this.getChildren().some((o=>o.value===s[t]))||s.splice(t,1);this.value=s,this.setValueAttribute(),this.selectChildrenAsSelectedBasedOnSelectionProp(),this.handleChange();const e=this.getSelectedChildren().map((t=>({value:t.value,label:t.textContent.trim()})));return this.filter&&(this.inputElement.value=this.getValue()),e}async appendValue(t){this.setValue(this.multiselect&&this.value?[...this.value,t]:t)}async removeValue(t){var o,s;let e;return this.multiselect?null===(o=this.getChildren())||void 0===o||o.forEach((o=>{var s;return o.value===t&&(this.value=null===(s=this.value)||void 0===s?void 0:s.filter((t=>t!==o.value)),e=o.textContent.trim(),o.setSelected(!1)),o})):this.reset(),this.handleChange(),this.setValueAttribute(),null===(s=this.value)||void 0===s?void 0:s.map((t=>({value:t,label:e})))}async close(){this.open=!1}onAnyClick(t){this.open&&!t.composedPath().includes(this.host)&&(this.open=!1)}async onKeyDown(t){const{activeElement:o}=document;if(!o)return;const s=this.getChildren();if("ArrowDown"===t.key){const t=o.nextElementSibling?s.findIndex((t=>t===o.nextElementSibling)):0;s[((t,o)=>{if(void 0===t[o])return 0;for(let s=o;s<t.length;s++)if(!t[s].disabled)return s})(s,t)].focus()}else"ArrowUp"===t.key?s[((t,o)=>{if(void 0===t[o])return t.length-1;for(let s=o;s>=0;s--)if(!t[s].disabled)return s})(s,o.nextElementSibling?this.getChildren().findIndex((t=>t===o.previousElementSibling)):0)].focus():"Escape"===t.key&&(this.open=!1)}handleOpenState(){this.filter&&this.multiselect&&(this.open||(this.inputElement.value=this.getValue()))}componentWillLoad(){this.defaultValue&&this.setDefaultOption()}normalizeString(t){return this.normalizeText?t.normalize("NFD").replace(/\p{Diacritic}/gu,""):t}internalReset(){this.getChildren().forEach((t=>(t.setSelected(!1),t))),this.value=null,this.setValueAttribute()}selectChildrenAsSelectedBasedOnSelectionProp(){this.getChildren().forEach((t=>{this.value.forEach((o=>{t.value!==o?this.multiselect||t.setSelected(!1):t.setSelected(!0)}))}))}render(){var t,o,i,l;return((t,o,s,e)=>{let i=t.querySelector("input");t.querySelector("input")||(i=t.ownerDocument.createElement("input"),i.type="hidden",t.appendChild(i)),i.disabled=e,i.name=o,i.value=s||""})(this.host,this.name,null===(t=this.value)||void 0===t?void 0:t.map((t=>t)).toString(),this.disabled),s(e,{key:"062a04c9b529a7e30ca863ba53f757f288f4da10",role:"select",class:this.modeVariant?`tds-mode-variant-${this.modeVariant}`:""},this.label&&"outside"===this.labelPosition&&s("div",{class:"label-outside "+(this.disabled?"disabled":"")},this.label),s("div",{key:"8f5b894804a3be375ba5091b7da004937dbcfe31",class:`dropdown-select ${this.size} ${this.disabled?"disabled":""}`},this.filter?s("div",{class:{filter:!0,focus:this.filterFocus,disabled:this.disabled,error:this.error}},s("div",{class:"value-wrapper"},this.label&&"inside"===this.labelPosition&&this.placeholder&&s("div",{class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{class:`\n label-inside-as-placeholder\n ${this.size}\n ${(null===(o=this.value)||void 0===o?void 0:o.length)?"selected":""}\n `},this.label),s("input",{ref:t=>this.inputElement=t,class:"inside"===this.labelPosition?"placeholder":"",type:"text",placeholder:this.placeholder,value:this.getValue(),disabled:this.disabled,onInput:t=>this.handleFilter(t),onBlur:t=>{this.filterFocus=!1,this.handleBlur(t)},onFocus:t=>{this.open=!0,this.filterFocus=!0,this.handleFocus(t)},onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)}})),s("tds-icon",{tabIndex:0,role:"button","aria-label":"Clear filter",svgTitle:"Clear filter",onClick:this.handleFilterReset,onKeyDown:t=>{"Enter"===t.key&&this.handleFilterReset()},class:"clear-icon "+(this.open&&""!==this.inputElement.value?"":"hide"),name:"cross",size:"16px"}),s("tds-icon",{tabIndex:0,role:"button","aria-label":"Open/Close dropdown",svgTitle:"Open/Close dropdown",onClick:this.handleToggleOpen,onKeyDown:t=>{"Enter"===t.key&&this.handleToggleOpen()},class:"menu-icon "+(this.open?"open":"closed"),name:"chevron_down",size:"16px"})):s("button",{onClick:()=>this.handleToggleOpen(),onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)},class:`\n ${this.value?"value":"placeholder"}\n ${this.open?"open":"closed"}\n ${this.error?"error":""}\n `,disabled:this.disabled},s("div",{class:`value-wrapper ${this.size}`},this.label&&"inside"===this.labelPosition&&this.placeholder&&s("div",{class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{class:`\n label-inside-as-placeholder\n ${this.size}\n ${(null===(i=this.value)||void 0===i?void 0:i.length)?"selected":""}\n `},this.label),s("div",{class:`placeholder ${this.size}`},(null===(l=this.value)||void 0===l?void 0:l.length)?this.getValue():this.placeholder),s("tds-icon",{"aria-label":"Open/Close dropdown",svgTitle:"Open/Close dropdown",class:"menu-icon "+(this.open?"open":"closed"),name:"chevron_down",size:"16px"})))),s("div",{key:"a507589572614ae3ac4c99fb777394b0bc03729c",ref:t=>this.dropdownList=t,class:`dropdown-list\n ${this.size}\n ${this.open?"open":"closed"}\n ${this.getOpenDirection()}\n ${this.label&&"outside"===this.labelPosition?"label-outside":""}`},s("slot",{key:"b184e4c940125d51c9531bceadc8544cbd579c1c"}),0===this.filterResult&&""!==this.noResultText&&s("div",{class:`no-result ${this.size}`},this.noResultText)),this.helper&&s("div",{class:`helper ${this.error?"error":""} ${this.disabled?"disabled":""}`},this.error&&s("tds-icon",{name:"error",size:"16px"}),this.helper))}get host(){return i(this)}static get watchers(){return{open:["handleOpenState"]}}};l.style='@charset "UTF-8";:host button{all:unset;height:100%;width:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);border-radius:4px 4px 0 0}:host button:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host button .value-wrapper{padding:0 16px;display:flex;align-items:center;justify-content:space-between}:host button.placeholder{color:var(--tds-dropdown-placeholder-color);line-height:1.3}:host button.value{color:var(--tds-dropdown-value-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3}:host button:focus{border-bottom-color:var(--tds-dropdown-border-bottom-open)}:host button:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-border-bottom-open)}:host button.error{border-bottom:1px solid var(--tds-negative)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:0px}:host .filter{display:flex;align-items:center;justify-content:space-between;height:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);padding-left:16px;border-radius:4px 4px 0 0}:host .filter:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host .filter.disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host .filter .value-wrapper{display:flex;width:100%;height:100%}:host .filter .label-inside-as-placeholder{position:absolute;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3;color:var(--tds-dropdown-placeholder-color)}:host .filter .label-inside-as-placeholder.lg{top:20px}:host .filter .label-inside-as-placeholder.md{top:16px}:host .filter .label-inside-as-placeholder.sm{display:none}:host .filter .label-inside-as-placeholder.selected{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .filter .label-inside-as-placeholder.selected.lg{top:12px}:host .filter .label-inside-as-placeholder.selected.md{top:8px}:host .filter .label-inside-as-placeholder.selected.sm{display:none}:host .filter .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .filter.focus{border-bottom-color:transparent}:host .filter.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-dropdown-border-bottom-open)}:host .filter.error{border-bottom:1px solid var(--tds-negative)}:host .filter.error.focus{border-bottom-color:transparent}:host .filter.error.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host .filter input{flex:1;all:unset;width:100%}:host .filter input::placeholder{color:var(--tds-dropdown-placeholder-color)}:host .filter input:disabled::placeholder{color:var(--tds-dropdown-disabled-color)}:host .filter tds-icon{cursor:pointer}:host .filter .menu-icon{margin-right:16px}:host .filter .clear-icon{margin:0 8px;color:var(--tds-dropdown-clear-icon-color);padding-right:8px;border-right:1px solid var(--tds-dropdown-clear-icon-color)}:host .filter .clear-icon:hover{color:var(--tds-dropdown-clear-icon-hover-color)}:host .filter .clear-icon.hide{display:none;visibility:hidden}:host{display:block;position:relative;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}:host .label-outside{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-dropdown-label-color);margin-bottom:8px}:host .label-outside.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select{position:relative}:host .dropdown-select.disabled .label-inside,:host .dropdown-select.disabled .placeholder,:host .dropdown-select.disabled .label-inside-as-placeholder,:host .dropdown-select.disabled .value-wrapper{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select .label-inside{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);color:var(--tds-dropdown-label-inside-color)}:host .dropdown-select .label-inside.lg{top:12px;left:16px}:host .dropdown-select .label-inside.md{top:8px;left:16px}:host .dropdown-select .label-inside.sm{display:none}:host .dropdown-select .label-inside+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select .placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .dropdown-select .label-inside-as-placeholder{color:var(--tds-dropdown-placeholder-color)}:host .dropdown-select .label-inside-as-placeholder.selected{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .dropdown-select .label-inside-as-placeholder.selected.lg{top:12px}:host .dropdown-select .label-inside-as-placeholder.selected.md{top:8px}:host .dropdown-select .label-inside-as-placeholder.selected.sm{display:none}:host .dropdown-select .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select.lg{height:55px}:host .dropdown-select.md{height:47px}:host .dropdown-select.sm{height:39px}:host .helper{margin-top:4px;color:var(--tds-dropdown-helper-color);font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;align-items:center;gap:8px}:host .helper.error{color:var(--tds-negative)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{z-index:100;position:absolute;margin-top:1px;width:100%;transform-origin:top;transition:transform 0.2s ease-in-out;box-shadow:rgba(0, 0, 0, 0.1) 0 2px 3px 0;border-radius:0 0 4px 4px;overflow-y:auto}:host .dropdown-list::-webkit-scrollbar{width:4px;background-color:inherit}:host .dropdown-list::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .dropdown-list ::-webkit-scrollbar-button{height:0;width:0}:host .dropdown-list.lg{max-height:312px}:host .dropdown-list.md{max-height:312px}:host .dropdown-list.sm{max-height:260px}:host .dropdown-list.up{bottom:100%;margin-top:0;margin-bottom:1px;transform-origin:bottom;display:flex;flex-direction:column-reverse;box-shadow:rgba(0, 0, 0, 0.1) 0 -1px 3px 0;border-radius:4px 4px 0 0}:host .dropdown-list.up.label-outside{bottom:calc(100% - 24px)}:host .dropdown-list.closed{transform:scaleY(0);visibility:hidden}:host .dropdown-list.open{transform:scaleY(1)}:host .dropdown-list .no-result{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:flex;align-items:center;padding:0 16px;background-color:var(--tds-dropdown-bg)}:host .dropdown-list .no-result.lg{height:56px}:host .dropdown-list .no-result.md{height:48px}:host .dropdown-list .no-result.sm{height:40px}:host .menu-icon{color:var(--tds-dropdown-menu-icon-color)}:host tds-icon{transition:transform 0.2s ease-in-out}:host tds-icon.open{transform:rotateZ(180deg)}';export{l as tds_dropdown}
|