@getflip/swirl-components 0.403.0 → 0.404.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/components.json +84 -6
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/swirl-app-layout_5.cjs.entry.js +4 -2
  4. package/dist/cjs/swirl-components.cjs.js +1 -1
  5. package/dist/cjs/swirl-icon-arrow-left_4.cjs.entry.js +1 -1
  6. package/dist/cjs/swirl-icon-error_3.cjs.entry.js +1 -1
  7. package/dist/cjs/swirl-search.cjs.entry.js +1 -1
  8. package/dist/cjs/swirl-shell-layout.cjs.entry.js +6 -6
  9. package/dist/cjs/swirl-shell-navigation-item.cjs.entry.js +2 -2
  10. package/dist/cjs/swirl-skeleton-box.cjs.entry.js +2 -2
  11. package/dist/cjs/swirl-skeleton-text.cjs.entry.js +1 -1
  12. package/dist/cjs/swirl-status-indicator.cjs.entry.js +1 -1
  13. package/dist/cjs/swirl-switch.cjs.entry.js +2 -2
  14. package/dist/cjs/swirl-tab-bar.cjs.entry.js +1 -1
  15. package/dist/cjs/swirl-tab.cjs.entry.js +1 -1
  16. package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
  17. package/dist/cjs/swirl-table.cjs.entry.js +1 -1
  18. package/dist/cjs/swirl-tag.cjs.entry.js +1 -1
  19. package/dist/cjs/swirl-text.cjs.entry.js +1 -1
  20. package/dist/cjs/swirl-toast-provider.cjs.entry.js +1 -1
  21. package/dist/cjs/swirl-toast.cjs.entry.js +1 -1
  22. package/dist/cjs/swirl-toggle-group.cjs.entry.js +1 -1
  23. package/dist/cjs/swirl-toolbar.cjs.entry.js +1 -1
  24. package/dist/cjs/swirl-tooltip.cjs.entry.js +2 -2
  25. package/dist/collection/collection-manifest.json +1 -1
  26. package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.css +0 -1
  27. package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.js +48 -1
  28. package/dist/collection/components/swirl-search/swirl-search.js +1 -1
  29. package/dist/collection/components/swirl-shell-layout/swirl-shell-layout.js +6 -6
  30. package/dist/collection/components/swirl-shell-navigation-item/swirl-shell-navigation-item.js +2 -2
  31. package/dist/collection/components/swirl-skeleton-box/swirl-skeleton-box.js +2 -2
  32. package/dist/collection/components/swirl-skeleton-text/swirl-skeleton-text.js +1 -1
  33. package/dist/collection/components/swirl-spinner/swirl-spinner.js +1 -1
  34. package/dist/collection/components/swirl-status-indicator/swirl-status-indicator.js +1 -1
  35. package/dist/collection/components/swirl-switch/swirl-switch.js +2 -2
  36. package/dist/collection/components/swirl-tab/swirl-tab.js +1 -1
  37. package/dist/collection/components/swirl-tab-bar/swirl-tab-bar.js +1 -1
  38. package/dist/collection/components/swirl-table/swirl-table.js +1 -1
  39. package/dist/collection/components/swirl-table-column/swirl-table-column.js +1 -1
  40. package/dist/collection/components/swirl-tag/swirl-tag.js +1 -1
  41. package/dist/collection/components/swirl-text/swirl-text.js +1 -1
  42. package/dist/collection/components/swirl-thumbnail/swirl-thumbnail.js +1 -1
  43. package/dist/collection/components/swirl-toast/swirl-toast.js +1 -1
  44. package/dist/collection/components/swirl-toast-provider/swirl-toast-provider.js +1 -1
  45. package/dist/collection/components/swirl-toggle-group/swirl-toggle-group.js +1 -1
  46. package/dist/collection/components/swirl-toolbar/swirl-toolbar.js +1 -1
  47. package/dist/collection/components/swirl-tooltip/swirl-tooltip.js +2 -2
  48. package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -1
  49. package/dist/components/file-manager.js +64 -58
  50. package/dist/components/swirl-resource-list-item2.js +20 -10
  51. package/dist/components/swirl-search.js +1 -1
  52. package/dist/components/swirl-shell-layout.js +6 -6
  53. package/dist/components/swirl-shell-navigation-item.js +2 -2
  54. package/dist/components/swirl-skeleton-box2.js +2 -2
  55. package/dist/components/swirl-skeleton-text.js +1 -1
  56. package/dist/components/swirl-spinner2.js +1 -1
  57. package/dist/components/swirl-status-indicator.js +1 -1
  58. package/dist/components/swirl-switch.js +2 -2
  59. package/dist/components/swirl-tab-bar2.js +1 -1
  60. package/dist/components/swirl-tab.js +1 -1
  61. package/dist/components/swirl-table-column.js +1 -1
  62. package/dist/components/swirl-table.js +1 -1
  63. package/dist/components/swirl-tag2.js +1 -1
  64. package/dist/components/swirl-text2.js +1 -1
  65. package/dist/components/swirl-thumbnail2.js +1 -1
  66. package/dist/components/swirl-toast-provider.js +1 -1
  67. package/dist/components/swirl-toast2.js +1 -1
  68. package/dist/components/swirl-toggle-group.js +1 -1
  69. package/dist/components/swirl-toolbar.js +1 -1
  70. package/dist/components/swirl-tooltip2.js +2 -2
  71. package/dist/esm/loader.js +1 -1
  72. package/dist/esm/swirl-app-layout_5.entry.js +4 -2
  73. package/dist/esm/swirl-components.js +1 -1
  74. package/dist/esm/swirl-icon-arrow-left_4.entry.js +1 -1
  75. package/dist/esm/swirl-icon-error_3.entry.js +1 -1
  76. package/dist/esm/swirl-search.entry.js +1 -1
  77. package/dist/esm/swirl-shell-layout.entry.js +6 -6
  78. package/dist/esm/swirl-shell-navigation-item.entry.js +2 -2
  79. package/dist/esm/swirl-skeleton-box.entry.js +2 -2
  80. package/dist/esm/swirl-skeleton-text.entry.js +1 -1
  81. package/dist/esm/swirl-status-indicator.entry.js +1 -1
  82. package/dist/esm/swirl-switch.entry.js +2 -2
  83. package/dist/esm/swirl-tab-bar.entry.js +1 -1
  84. package/dist/esm/swirl-tab.entry.js +1 -1
  85. package/dist/esm/swirl-table-column.entry.js +1 -1
  86. package/dist/esm/swirl-table.entry.js +1 -1
  87. package/dist/esm/swirl-tag.entry.js +1 -1
  88. package/dist/esm/swirl-text.entry.js +1 -1
  89. package/dist/esm/swirl-toast-provider.entry.js +1 -1
  90. package/dist/esm/swirl-toast.entry.js +1 -1
  91. package/dist/esm/swirl-toggle-group.entry.js +1 -1
  92. package/dist/esm/swirl-toolbar.entry.js +1 -1
  93. package/dist/esm/swirl-tooltip.entry.js +2 -2
  94. package/dist/swirl-components/{p-25a0bc6f.entry.js → p-0d86713d.entry.js} +1 -1
  95. package/dist/swirl-components/{p-93bb3365.entry.js → p-251853c7.entry.js} +2 -2
  96. package/dist/swirl-components/{p-b23edf69.entry.js → p-2dd48f2d.entry.js} +1 -1
  97. package/dist/swirl-components/{p-046c85df.entry.js → p-2fbbff16.entry.js} +1 -1
  98. package/dist/swirl-components/{p-b98cc8ee.entry.js → p-32205cb6.entry.js} +1 -1
  99. package/dist/swirl-components/{p-00b0bcdf.entry.js → p-4fe92179.entry.js} +1 -1
  100. package/dist/swirl-components/{p-362cf5cd.entry.js → p-525eccb7.entry.js} +1 -1
  101. package/dist/swirl-components/{p-66f57e69.entry.js → p-6058e144.entry.js} +1 -1
  102. package/dist/swirl-components/{p-900b7395.entry.js → p-61f63eb1.entry.js} +1 -1
  103. package/dist/swirl-components/p-6294b4b8.entry.js +1 -0
  104. package/dist/swirl-components/{p-68f1fc93.entry.js → p-8e15adb5.entry.js} +1 -1
  105. package/dist/swirl-components/{p-25937c0c.entry.js → p-9116eac5.entry.js} +1 -1
  106. package/dist/swirl-components/{p-38205c0f.entry.js → p-91d81ff7.entry.js} +1 -1
  107. package/dist/swirl-components/{p-e79a2b2f.entry.js → p-b56f08dd.entry.js} +1 -1
  108. package/dist/swirl-components/{p-55342fef.entry.js → p-bb3bf811.entry.js} +1 -1
  109. package/dist/swirl-components/{p-62a94658.entry.js → p-d8201d5b.entry.js} +1 -1
  110. package/dist/swirl-components/{p-a3709d0e.entry.js → p-d82c10a6.entry.js} +1 -1
  111. package/dist/swirl-components/{p-5067665a.entry.js → p-e24e9424.entry.js} +1 -1
  112. package/dist/swirl-components/{p-fef8e82f.entry.js → p-e8c9b581.entry.js} +1 -1
  113. package/dist/swirl-components/{p-f4cd2bc8.entry.js → p-eccc6946.entry.js} +1 -1
  114. package/dist/swirl-components/{p-db2de234.entry.js → p-f49848d1.entry.js} +1 -1
  115. package/dist/swirl-components/swirl-components.esm.js +1 -1
  116. package/dist/types/components/swirl-resource-list-item/swirl-resource-list-item.d.ts +3 -0
  117. package/dist/types/components.d.ts +16 -4
  118. package/package.json +1 -1
  119. package/vscode-data.json +22 -0
  120. package/dist/swirl-components/p-da93355a.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as e,h as s,H as i,d as o}from"./p-g4wOnHIT.js";import{g as a,c as r}from"./p-orsBiyT_.js";import{S as l}from"./p-CMrz6687.js";import{d as n,i as h,q as c}from"./p-wi_3Z3FQ.js";var d,b,w=a((b||(b=1,d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,o=void 0,a=void 0,r=[];return function(){var n=function(t){return"function"==typeof t?t():t}(e),h=(new Date).getTime(),c=!i||h-i>n;i=h;for(var d=arguments.length,b=Array(d),w=0;w<d;w++)b[w]=arguments[w];if(c&&s.leading)return s.accumulate?Promise.resolve(t.call(this,[b])).then((function(t){return t[0]})):Promise.resolve(t.call.apply(t,[this].concat(b)));if(o?clearTimeout(a):o=function(){var t={};return t.promise=new Promise((function(e,s){t.resolve=e,t.reject=s})),t}(),r.push(b),a=setTimeout(l.bind(this),n),s.accumulate){var u=r.length-1;return o.promise.then((function(t){return t[u]}))}return o.promise};function l(){var e=o;clearTimeout(a),Promise.resolve(s.accumulate?t.call(this,r):t.apply(this,r[r.length-1])).then(e.resolve,e.reject),r=[],o=null}}),d));const u={end:"Dropped. Final position in table: {position} of {rowCount}.",initial:"Press space to move the row.",moved:"Current position in table: {position} of {rowCount}.",start:"Row grabbed. Current position in table: {position} of {rowCount}. Press up and down arrow keys to change position, Space to drop."},p=class{constructor(s){t(this,s),this.dropRow=e(this,"dropRow",7),this.dragDropInstructions=u,this.emptyStateLabel="No results found.",this.liveRegionText="",this.triggerRerender=n((async()=>{await this.updateLayout(),this.updateEmptyState()}),0,!0),this.updateLayout=w((async()=>{this.resetCellStyles(),this.resetColumnStyles(),this.resetEmptyRowStyles(),this.resetRowGroupStyles(),this.layoutEmptyRow(),this.layoutRowGroups(),this.layOutCellsAndColumns(),this.updateScrolledState()}),16,{leading:!0}),this.onScroll=()=>{this.updateScrolledState()},this.onFocus=t=>{if(this.movingViaKeyboard){const t=this.el.querySelector(".table-row--moving");t&&this.focusDragHandleOfRow(t)}const e=!!t.target?.closest(this.dragDropHandle);""===this.liveRegionText&&e&&this.updateLiveRegionText("initial")},this.onBlur=t=>{const e=t.relatedTarget,s=!!e?.closest(this.dragDropHandle);this.el.contains(e)&&s||""!==this.liveRegionText&&this.updateLiveRegionText()},this.onKeyDown=t=>{if(!this.enableDragDrop)return;const e=t.target?.closest("swirl-table-row");t.target?.closest(this.dragDropHandle)&&("Space"===t.code?(t.preventDefault(),t.stopPropagation(),this.toggleKeyboardMove(e)):"ArrowUp"===t.code?(t.preventDefault(),t.stopPropagation(),this.moveRow(e,"up")):"ArrowDown"===t.code?(t.preventDefault(),t.stopPropagation(),this.moveRow(e,"down")):"Escape"===t.code&&(t.preventDefault(),t.stopPropagation(),this.cancelKeyboardMove()))}}async componentDidLoad(){this.setupIntersectionObserver(),this.setupMutationObservers(),queueMicrotask((()=>{this.setupDragDrop()}))}disconnectedCallback(){this.intersectionObserver?.disconnect(),this.columnMutationObserver?.disconnect(),this.rowMutationObserver?.disconnect(),this.sortable?.destroy()}handleEnableDragDropChange(){queueMicrotask((()=>{this.setupDragDrop()}))}setupIntersectionObserver(){this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange.bind(this),{threshold:0}),this.intersectionObserver.observe(this.container)}setupMutationObservers(){this.columnMutationObserver=new MutationObserver((t=>{t.some((t=>t.addedNodes.length||t.removedNodes.length))&&this.updateLayout()})),this.columnMutationObserver.observe(this.headerEl,{childList:!0,subtree:!0}),this.rowMutationObserver=new MutationObserver((t=>{t.some((t=>t.addedNodes.length||t.removedNodes.length))&&(this.updateEmptyState(),this.setupDragDrop())})),this.startRowMutationObserver()}startRowMutationObserver(){this.rowMutationObserver?.observe(this.bodyEl,{childList:!0,subtree:!0})}stopRowMutationObserver(){this.rowMutationObserver?.disconnect()}setupDragDrop(){if(this.sortable&&(this.sortable.destroy(),this.sortable=void 0),this.enableDragDrop){if(this.el.querySelector("swirl-table-row-group"))return void console.warn('[Swirl] Drag & drop is not yet supported for swirl-tables using the "swirl-table-row-group" component.');if(!this.dragDropHandle)return void console.warn('[Swirl] swirl-table required the "dragDropHandle" prop to be set when drag & drop is enabled.');const t=this.el.querySelector('[slot="rows"]');this.dragDropContainer="SWIRL-TABLE-ROW"!==t?.tagName?t??this.bodyEl:this.bodyEl,this.sortable=new l(this.dragDropContainer,{animation:100,direction:"vertical",handle:this.dragDropHandle,fallbackOnBody:!0,group:`swirl-table-${Math.random().toString().substring(2)}`,onStart:()=>{this.stopRowMutationObserver()},onEnd:t=>{t.stopPropagation();const{to:e,newIndex:s,oldIndex:i,item:o}=t;this.dropRow.emit({newIndex:s,oldIndex:i,item:o,itemId:o.id??o.querySelector(":scope > swirl-table-row").id,newNextSiblingItemId:s<e.children.length-1?e.children[s+1].id:void 0,newPrevSiblingItemId:s>0?e.children[s-1].id:void 0}),this.startRowMutationObserver()}})}}async onVisibilityChange(t){t.some((t=>t.isIntersecting))&&setTimeout((async()=>{await this.updateLayout()}),100)}async componentDidRender(){await this.updateLayout(),this.updateEmptyState()}async onWindowResize(){await this.updateLayout()}async rerender(){this.triggerRerender()}resetEmptyRowStyles(){const t=this.el.querySelector(".table__empty-row");Boolean(t)&&(t.style.width="")}resetRowGroupStyles(){Array.from(this.el.querySelectorAll("swirl-table-row-group")).forEach((t=>{const e=t.shadowRoot.querySelector(".table-row-group__header-row");Boolean(e)&&(t.shadowRoot.querySelector(".table-row-group__header-row").style.width="")}))}resetColumnStyles(){this.getColumns().forEach((t=>{t.classList.remove("table-column--has-shadow","table-column--is-sticky","table-column--is-sticky-right"),t.style.right="",t.style.left="",t.style.position="",t.style.zIndex=""}))}resetCellStyles(){this.getCells().forEach((t=>{t.classList.remove("table-cell--has-shadow","table-cell--is-sticky","table-cell--is-sticky-right"),t.style.flex="",t.style.left="",t.style.right="",t.style.position="",t.style.zIndex=""}))}updateScrolledState(){const t=h();if(void 0===this.container)return;const e=this.container.scrollWidth>this.container.clientWidth,s=this.container.scrollLeft>0,i=Math.ceil(this.container.clientWidth+this.container.scrollLeft)>=Math.floor(this.container.scrollWidth);e!==this.scrollable&&(e&&!t?this.container.classList.add("table__container--scrollable"):this.container.classList.remove("table__container--scrollable")),s!==this.scrolled&&(s&&!t?this.container.classList.add("table__container--scrolled"):this.container.classList.remove("table__container--scrolled")),i!==this.scrolledToEnd&&(i&&!t?this.container.classList.add("table__container--scrolled-to-end"):this.container.classList.remove("table__container--scrolled-to-end"))}getColumns(){return Array.from(this.el.querySelectorAll("swirl-table-column"))}getCells(){return Array.from(this.el.querySelectorAll("swirl-table-cell"))}layoutEmptyRow(){const t=this.el.querySelector(".table__empty-row");if(!Boolean(t))return;const e=`${this.el.querySelector(".table__container").scrollWidth}px`;t.style.width=e}layoutRowGroups(){const t=Array.from(this.el.querySelectorAll("swirl-table-row-group")),e=`${this.el.querySelector(".table__container")?.scrollWidth}px`;t.forEach((t=>{const s=t.shadowRoot.querySelector(".table-row-group__header-row");Boolean(s)&&(t.shadowRoot.querySelector(".table-row-group__header-row").style.width=e)}))}layOutCellsAndColumns(){const t=this.getColumns(),e=this.getCells();t.forEach(((s,i)=>{const o=this.getCellsForColumn(e,t,i),a=this.calculateColumnProperties(s,t,i);o.forEach((t=>this.applyCellStyles(t,s,a))),this.applyColumnStyles(s,a)}))}getCellsForColumn(t,e,s){return t.filter(((t,i)=>(s-i)%e.length==0))}calculateColumnProperties(t,e,s){return{leftOffsetForStickyColumn:t.sticky?this.getLeftOffsetForStickyColumn(e,s):0,columnWidth:`${t.getBoundingClientRect().width}px`,isLastColumnSticky:t.sticky&&e.length===s+1,hasShadowRight:t.sticky&&!this.hasStickyColumnsToRight(e,s)}}applyCellStyles(t,e,s){const{leftOffsetForStickyColumn:i,columnWidth:o,isLastColumnSticky:a,hasShadowRight:r}=s;t.style.flex=Boolean(o)?`0 0 ${o}`:"",h()||(e.sticky&&!a&&(t.classList.add("table-cell--is-sticky"),t.style.left=i+"px",r&&t.classList.add("table-cell--has-shadow-right")),a&&t.classList.add("table-cell--is-sticky-right","table-cell--has-shadow-left"))}applyColumnStyles(t,e){if(h())return;const{leftOffsetForStickyColumn:s,isLastColumnSticky:i,hasShadowRight:o}=e;t.sticky&&!i&&(t.classList.add("table-column--is-sticky"),t.style.left=s+"px",o&&t.classList.add("table-column--has-shadow-right")),i&&t.classList.add("table-column--is-sticky-right","table-column--has-shadow-left")}getLeftOffsetForStickyColumn(t,e){return t.slice(0,e).reduce(((t,e)=>{if(e.sticky)return t+e.getBoundingClientRect().width}),0)}hasStickyColumnsToRight(t,e){return t.slice(e+1,t.length-1).some((t=>t.sticky))}updateEmptyState(){const t=this.el.querySelector('[slot="rows"]');this.empty=!Boolean(t)||0===t.children.length}updateLiveRegionText(t,e={}){let s=t?this.dragDropInstructions[t]:"";for(const[t,i]of Object.entries(e??{}))s=s.replaceAll(`{${t}}`,String(i));s!==this.liveRegionText&&(this.liveRegionText=s)}toggleKeyboardMove(t){this.movingViaKeyboard?this.endKeyboardMove(t):this.startKeyboardMove(t)}startKeyboardMove(t){this.movingViaKeyboard=!0,this.positionBeforeKeyboardMove=Array.from(this.dragDropContainer.children).indexOf(t),t.classList.add("table-row--moving"),this.updateLiveRegionText("start",{position:Array.from(this.dragDropContainer.children).indexOf(t)+1,rowCount:this.dragDropContainer.children.length})}endKeyboardMove(t){this.movingViaKeyboard=!1,t.classList.remove("table-row--moving"),this.updateLiveRegionText("end",{position:Array.from(this.dragDropContainer.children).indexOf(t)+1,rowCount:this.dragDropContainer.children.length}),this.dropRow.emit({item:t,newIndex:Array.from(this.dragDropContainer.children).indexOf(t),oldIndex:this.positionBeforeKeyboardMove,itemId:t.id,newNextSiblingItemId:Array.from(this.dragDropContainer.children).indexOf(t)<this.dragDropContainer.children.length-1?this.dragDropContainer.children[Array.from(this.dragDropContainer.children).indexOf(t)+1].id:void 0,newPrevSiblingItemId:Array.from(this.dragDropContainer.children).indexOf(t)>0?this.dragDropContainer.children[Array.from(this.dragDropContainer.children).indexOf(t)-1].id:void 0}),this.positionBeforeKeyboardMove=void 0}cancelKeyboardMove(){if(!this.movingViaKeyboard)return;const t=this.el.querySelector(".table-row--moving");t&&(t.classList.remove("table-row--moving"),this.movingViaKeyboard=!1,void 0!==this.positionBeforeKeyboardMove&&this.dragDropContainer.insertBefore(t,this.dragDropContainer.children[this.positionBeforeKeyboardMove]))}moveRow(t,e){if(!this.movingViaKeyboard)return;let s;if("up"===e){const e=Array.from(this.dragDropContainer.children).indexOf(t);s=Math.max(0,e-1),this.dragDropContainer.insertBefore(t,this.dragDropContainer.children[s])}else{const e=Array.from(this.dragDropContainer.children).indexOf(t);s=Math.min(this.dragDropContainer.children.length-1,e+1),this.dragDropContainer.insertBefore(t,this.dragDropContainer.children[s+1])}this.updateLiveRegionText("moved",{position:s+1,rowCount:this.dragDropContainer.children.length}),this.focusDragHandleOfRow(t)}focusDragHandleOfRow(t){const e=c(t,this.dragDropHandle)?.[0];"BUTTON"===e.tagName?e.focus():e.querySelector("button")?.focus()}render(){const t=Boolean(this.el.querySelector('[slot="empty"]')),e=r("table",{"table--show-empty-state":this.empty&&!this.loading,"table--keyboard-move":this.movingViaKeyboard});return s(i,{key:"d6e97afc02cef1d41b7ccad1650e32401f11677c"},s("div",{key:"dceaad27e0de2689fcfd99034019290db6bb9268",class:e},this.enableDragDrop&&s("swirl-visually-hidden",{key:"37210fe0906c51f0959fc0981d7dc987c4789130"},s("span",{key:"bc57d02beffba02d11c35fabccd4bb98cef4fdab","aria-live":"assertive"},this.liveRegionText)),s("div",{key:"56fc0100044dd3b5be2391e9c310539f9bff754b",class:"table__container",onFocusin:this.onFocus,onFocusout:this.onBlur,onKeyDown:this.onKeyDown,onScroll:this.onScroll,ref:t=>this.container=t,tabIndex:-1},s("div",{key:"4705a68fa3b449b8eba6a6d1690367256e39b50d","aria-describedby":Boolean(this.caption)?"caption":void 0,"aria-label":this.label,role:"table",class:"table__table"},this.caption&&s("swirl-visually-hidden",{key:"db585347a547e1cb60a3331af74dd48dab33d353"},s("div",{key:"5dd792ea27b892f0c7516d01618810db27a3f4d9",id:"caption"},this.caption)),s("div",{key:"556330fc41ac660bea1f2e84f66ecb4fe6d81c2a",role:"rowgroup"},s("div",{key:"3d6f50ca0de0c734f4605ebfe476cd444c79df2f",class:"table__header",ref:t=>this.headerEl=t,role:"row"},s("slot",{key:"fd5fe14b2542b8f1e5c1f605c97c3e2341c7e3c8",name:"columns"}))),s("div",{key:"cf0f7f822bb98205307f0a6168c759d576794b25",class:"table__body",ref:t=>this.bodyEl=t},s("slot",{key:"e4af4d1789d91f7bbf451948e233c9a60e3b6e7d",name:"rows"}),s("div",{key:"6c874d5d8a0a0129f88e53efee609e449921907f",class:"table__empty-row",role:"row"},s("div",{key:"0abe2cd4dca811db2b29ca3bfd44796ef50343db","aria-colspan":this.getColumns().length,class:"table__empty-row-cell",role:"cell"},s("slot",{key:"2aa3ae37600618fb280d7fb53ecf716049d2938b",name:"empty"}),!t&&s("swirl-text",{key:"c87ad9ce612ffef6966087b4de170a0aec62601b",align:"center",size:"sm"},this.emptyStateLabel))))))))}get el(){return o(this)}static get watchers(){return{enableDragDrop:["handleEnableDragDropChange"]}}};p.style=".sc-swirl-table-h{position:relative;display:block}.sc-swirl-table-h *.sc-swirl-table{box-sizing:border-box}.table--keyboard-move.sc-swirl-table:focus-within{--swirl-table-moving-row-border:var(--s-border-width-default) solid\n var(--s-border-highlight)}.table--show-empty-state.sc-swirl-table .table__empty-row.sc-swirl-table{display:flex}.table__container.sc-swirl-table{position:relative;overflow:auto;width:100%}.table__container--scrolled.sc-swirl-table{--swirl-table-sticky-right-shadow:4px 0 16px -4px rgba(23, 23, 23, 0.04),\n 2px 0 4px -2px rgba(23, 23, 23, 0.04)}.table__container--scrollable.sc-swirl-table:not(.table__container--scrolled-to-end){--swirl-table-sticky-left-shadow:0px 4px 16px 0px rgba(23, 23, 23, 0.04),\n 0px 1px 4px 0px rgba(23, 23, 23, 0.04)}.table__table.sc-swirl-table{width:-webkit-max-content;width:-moz-max-content;width:max-content;min-width:max(20rem, 100%)}.table__header.sc-swirl-table-s>*,.table__header .sc-swirl-table-s>*{display:flex}.table__empty-row.sc-swirl-table{display:none}.table__empty-row-cell.sc-swirl-table{display:flex;overflow:auto;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);flex-basis:0;flex-grow:1;flex-shrink:1;align-items:center;background-color:var(--s-surface-default)}.table__empty-row-cell.sc-swirl-table>*.sc-swirl-table{flex-grow:1}";export{p as swirl_table}
1
+ import{r as t,c as e,h as s,H as i,d as o}from"./p-g4wOnHIT.js";import{g as a,c as r}from"./p-orsBiyT_.js";import{S as l}from"./p-CMrz6687.js";import{d as n,i as h,q as c}from"./p-wi_3Z3FQ.js";var d,b,w=a((b||(b=1,d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,o=void 0,a=void 0,r=[];return function(){var n=function(t){return"function"==typeof t?t():t}(e),h=(new Date).getTime(),c=!i||h-i>n;i=h;for(var d=arguments.length,b=Array(d),w=0;w<d;w++)b[w]=arguments[w];if(c&&s.leading)return s.accumulate?Promise.resolve(t.call(this,[b])).then((function(t){return t[0]})):Promise.resolve(t.call.apply(t,[this].concat(b)));if(o?clearTimeout(a):o=function(){var t={};return t.promise=new Promise((function(e,s){t.resolve=e,t.reject=s})),t}(),r.push(b),a=setTimeout(l.bind(this),n),s.accumulate){var u=r.length-1;return o.promise.then((function(t){return t[u]}))}return o.promise};function l(){var e=o;clearTimeout(a),Promise.resolve(s.accumulate?t.call(this,r):t.apply(this,r[r.length-1])).then(e.resolve,e.reject),r=[],o=null}}),d));const u={end:"Dropped. Final position in table: {position} of {rowCount}.",initial:"Press space to move the row.",moved:"Current position in table: {position} of {rowCount}.",start:"Row grabbed. Current position in table: {position} of {rowCount}. Press up and down arrow keys to change position, Space to drop."},p=class{constructor(s){t(this,s),this.dropRow=e(this,"dropRow",7),this.dragDropInstructions=u,this.emptyStateLabel="No results found.",this.liveRegionText="",this.triggerRerender=n((async()=>{await this.updateLayout(),this.updateEmptyState()}),0,!0),this.updateLayout=w((async()=>{this.resetCellStyles(),this.resetColumnStyles(),this.resetEmptyRowStyles(),this.resetRowGroupStyles(),this.layoutEmptyRow(),this.layoutRowGroups(),this.layOutCellsAndColumns(),this.updateScrolledState()}),16,{leading:!0}),this.onScroll=()=>{this.updateScrolledState()},this.onFocus=t=>{if(this.movingViaKeyboard){const t=this.el.querySelector(".table-row--moving");t&&this.focusDragHandleOfRow(t)}const e=!!t.target?.closest(this.dragDropHandle);""===this.liveRegionText&&e&&this.updateLiveRegionText("initial")},this.onBlur=t=>{const e=t.relatedTarget,s=!!e?.closest(this.dragDropHandle);this.el.contains(e)&&s||""!==this.liveRegionText&&this.updateLiveRegionText()},this.onKeyDown=t=>{if(!this.enableDragDrop)return;const e=t.target?.closest("swirl-table-row");t.target?.closest(this.dragDropHandle)&&("Space"===t.code?(t.preventDefault(),t.stopPropagation(),this.toggleKeyboardMove(e)):"ArrowUp"===t.code?(t.preventDefault(),t.stopPropagation(),this.moveRow(e,"up")):"ArrowDown"===t.code?(t.preventDefault(),t.stopPropagation(),this.moveRow(e,"down")):"Escape"===t.code&&(t.preventDefault(),t.stopPropagation(),this.cancelKeyboardMove()))}}async componentDidLoad(){this.setupIntersectionObserver(),this.setupMutationObservers(),queueMicrotask((()=>{this.setupDragDrop()}))}disconnectedCallback(){this.intersectionObserver?.disconnect(),this.columnMutationObserver?.disconnect(),this.rowMutationObserver?.disconnect(),this.sortable?.destroy()}handleEnableDragDropChange(){queueMicrotask((()=>{this.setupDragDrop()}))}setupIntersectionObserver(){this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange.bind(this),{threshold:0}),this.intersectionObserver.observe(this.container)}setupMutationObservers(){this.columnMutationObserver=new MutationObserver((t=>{t.some((t=>t.addedNodes.length||t.removedNodes.length))&&this.updateLayout()})),this.columnMutationObserver.observe(this.headerEl,{childList:!0,subtree:!0}),this.rowMutationObserver=new MutationObserver((t=>{t.some((t=>t.addedNodes.length||t.removedNodes.length))&&(this.updateEmptyState(),this.setupDragDrop())})),this.startRowMutationObserver()}startRowMutationObserver(){this.rowMutationObserver?.observe(this.bodyEl,{childList:!0,subtree:!0})}stopRowMutationObserver(){this.rowMutationObserver?.disconnect()}setupDragDrop(){if(this.sortable&&(this.sortable.destroy(),this.sortable=void 0),this.enableDragDrop){if(this.el.querySelector("swirl-table-row-group"))return void console.warn('[Swirl] Drag & drop is not yet supported for swirl-tables using the "swirl-table-row-group" component.');if(!this.dragDropHandle)return void console.warn('[Swirl] swirl-table required the "dragDropHandle" prop to be set when drag & drop is enabled.');const t=this.el.querySelector('[slot="rows"]');this.dragDropContainer="SWIRL-TABLE-ROW"!==t?.tagName?t??this.bodyEl:this.bodyEl,this.sortable=new l(this.dragDropContainer,{animation:100,direction:"vertical",handle:this.dragDropHandle,fallbackOnBody:!0,group:`swirl-table-${Math.random().toString().substring(2)}`,onStart:()=>{this.stopRowMutationObserver()},onEnd:t=>{t.stopPropagation();const{to:e,newIndex:s,oldIndex:i,item:o}=t;this.dropRow.emit({newIndex:s,oldIndex:i,item:o,itemId:o.id??o.querySelector(":scope > swirl-table-row").id,newNextSiblingItemId:s<e.children.length-1?e.children[s+1].id:void 0,newPrevSiblingItemId:s>0?e.children[s-1].id:void 0}),this.startRowMutationObserver()}})}}async onVisibilityChange(t){t.some((t=>t.isIntersecting))&&setTimeout((async()=>{await this.updateLayout()}),100)}async componentDidRender(){await this.updateLayout(),this.updateEmptyState()}async onWindowResize(){await this.updateLayout()}async rerender(){this.triggerRerender()}resetEmptyRowStyles(){const t=this.el.querySelector(".table__empty-row");Boolean(t)&&(t.style.width="")}resetRowGroupStyles(){Array.from(this.el.querySelectorAll("swirl-table-row-group")).forEach((t=>{const e=t.shadowRoot.querySelector(".table-row-group__header-row");Boolean(e)&&(t.shadowRoot.querySelector(".table-row-group__header-row").style.width="")}))}resetColumnStyles(){this.getColumns().forEach((t=>{t.classList.remove("table-column--has-shadow","table-column--is-sticky","table-column--is-sticky-right"),t.style.right="",t.style.left="",t.style.position="",t.style.zIndex=""}))}resetCellStyles(){this.getCells().forEach((t=>{t.classList.remove("table-cell--has-shadow","table-cell--is-sticky","table-cell--is-sticky-right"),t.style.flex="",t.style.left="",t.style.right="",t.style.position="",t.style.zIndex=""}))}updateScrolledState(){const t=h();if(void 0===this.container)return;const e=this.container.scrollWidth>this.container.clientWidth,s=this.container.scrollLeft>0,i=Math.ceil(this.container.clientWidth+this.container.scrollLeft)>=Math.floor(this.container.scrollWidth);e!==this.scrollable&&(e&&!t?this.container.classList.add("table__container--scrollable"):this.container.classList.remove("table__container--scrollable")),s!==this.scrolled&&(s&&!t?this.container.classList.add("table__container--scrolled"):this.container.classList.remove("table__container--scrolled")),i!==this.scrolledToEnd&&(i&&!t?this.container.classList.add("table__container--scrolled-to-end"):this.container.classList.remove("table__container--scrolled-to-end"))}getColumns(){return Array.from(this.el.querySelectorAll("swirl-table-column"))}getCells(){return Array.from(this.el.querySelectorAll("swirl-table-cell"))}layoutEmptyRow(){const t=this.el.querySelector(".table__empty-row");if(!Boolean(t))return;const e=`${this.el.querySelector(".table__container").scrollWidth}px`;t.style.width=e}layoutRowGroups(){const t=Array.from(this.el.querySelectorAll("swirl-table-row-group")),e=`${this.el.querySelector(".table__container")?.scrollWidth}px`;t.forEach((t=>{const s=t.shadowRoot.querySelector(".table-row-group__header-row");Boolean(s)&&(t.shadowRoot.querySelector(".table-row-group__header-row").style.width=e)}))}layOutCellsAndColumns(){const t=this.getColumns(),e=this.getCells();t.forEach(((s,i)=>{const o=this.getCellsForColumn(e,t,i),a=this.calculateColumnProperties(s,t,i);o.forEach((t=>this.applyCellStyles(t,s,a))),this.applyColumnStyles(s,a)}))}getCellsForColumn(t,e,s){return t.filter(((t,i)=>(s-i)%e.length==0))}calculateColumnProperties(t,e,s){return{leftOffsetForStickyColumn:t.sticky?this.getLeftOffsetForStickyColumn(e,s):0,columnWidth:`${t.getBoundingClientRect().width}px`,isLastColumnSticky:t.sticky&&e.length===s+1,hasShadowRight:t.sticky&&!this.hasStickyColumnsToRight(e,s)}}applyCellStyles(t,e,s){const{leftOffsetForStickyColumn:i,columnWidth:o,isLastColumnSticky:a,hasShadowRight:r}=s;t.style.flex=Boolean(o)?`0 0 ${o}`:"",h()||(e.sticky&&!a&&(t.classList.add("table-cell--is-sticky"),t.style.left=i+"px",r&&t.classList.add("table-cell--has-shadow-right")),a&&t.classList.add("table-cell--is-sticky-right","table-cell--has-shadow-left"))}applyColumnStyles(t,e){if(h())return;const{leftOffsetForStickyColumn:s,isLastColumnSticky:i,hasShadowRight:o}=e;t.sticky&&!i&&(t.classList.add("table-column--is-sticky"),t.style.left=s+"px",o&&t.classList.add("table-column--has-shadow-right")),i&&t.classList.add("table-column--is-sticky-right","table-column--has-shadow-left")}getLeftOffsetForStickyColumn(t,e){return t.slice(0,e).reduce(((t,e)=>{if(e.sticky)return t+e.getBoundingClientRect().width}),0)}hasStickyColumnsToRight(t,e){return t.slice(e+1,t.length-1).some((t=>t.sticky))}updateEmptyState(){const t=this.el.querySelector('[slot="rows"]');this.empty=!Boolean(t)||0===t.children.length}updateLiveRegionText(t,e={}){let s=t?this.dragDropInstructions[t]:"";for(const[t,i]of Object.entries(e??{}))s=s.replaceAll(`{${t}}`,String(i));s!==this.liveRegionText&&(this.liveRegionText=s)}toggleKeyboardMove(t){this.movingViaKeyboard?this.endKeyboardMove(t):this.startKeyboardMove(t)}startKeyboardMove(t){this.movingViaKeyboard=!0,this.positionBeforeKeyboardMove=Array.from(this.dragDropContainer.children).indexOf(t),t.classList.add("table-row--moving"),this.updateLiveRegionText("start",{position:Array.from(this.dragDropContainer.children).indexOf(t)+1,rowCount:this.dragDropContainer.children.length})}endKeyboardMove(t){this.movingViaKeyboard=!1,t.classList.remove("table-row--moving"),this.updateLiveRegionText("end",{position:Array.from(this.dragDropContainer.children).indexOf(t)+1,rowCount:this.dragDropContainer.children.length}),this.dropRow.emit({item:t,newIndex:Array.from(this.dragDropContainer.children).indexOf(t),oldIndex:this.positionBeforeKeyboardMove,itemId:t.id,newNextSiblingItemId:Array.from(this.dragDropContainer.children).indexOf(t)<this.dragDropContainer.children.length-1?this.dragDropContainer.children[Array.from(this.dragDropContainer.children).indexOf(t)+1].id:void 0,newPrevSiblingItemId:Array.from(this.dragDropContainer.children).indexOf(t)>0?this.dragDropContainer.children[Array.from(this.dragDropContainer.children).indexOf(t)-1].id:void 0}),this.positionBeforeKeyboardMove=void 0}cancelKeyboardMove(){if(!this.movingViaKeyboard)return;const t=this.el.querySelector(".table-row--moving");t&&(t.classList.remove("table-row--moving"),this.movingViaKeyboard=!1,void 0!==this.positionBeforeKeyboardMove&&this.dragDropContainer.insertBefore(t,this.dragDropContainer.children[this.positionBeforeKeyboardMove]))}moveRow(t,e){if(!this.movingViaKeyboard)return;let s;if("up"===e){const e=Array.from(this.dragDropContainer.children).indexOf(t);s=Math.max(0,e-1),this.dragDropContainer.insertBefore(t,this.dragDropContainer.children[s])}else{const e=Array.from(this.dragDropContainer.children).indexOf(t);s=Math.min(this.dragDropContainer.children.length-1,e+1),this.dragDropContainer.insertBefore(t,this.dragDropContainer.children[s+1])}this.updateLiveRegionText("moved",{position:s+1,rowCount:this.dragDropContainer.children.length}),this.focusDragHandleOfRow(t)}focusDragHandleOfRow(t){const e=c(t,this.dragDropHandle)?.[0];"BUTTON"===e.tagName?e.focus():e.querySelector("button")?.focus()}render(){const t=Boolean(this.el.querySelector('[slot="empty"]')),e=r("table",{"table--show-empty-state":this.empty&&!this.loading,"table--keyboard-move":this.movingViaKeyboard});return s(i,{key:"58cb39e970718c947af8fb05e49327f69ce52406"},s("div",{key:"ccc4d4c35f16a0250bca6473848ec928a20d69f1",class:e},this.enableDragDrop&&s("swirl-visually-hidden",{key:"984ee69c68a1f7ede7c68d11e08ab87677c75d8c"},s("span",{key:"7a27389724c8c0d877c79af23589b637e44d5669","aria-live":"assertive"},this.liveRegionText)),s("div",{key:"d17f542eac55c6da592fc2ab12d838e30ef318e6",class:"table__container",onFocusin:this.onFocus,onFocusout:this.onBlur,onKeyDown:this.onKeyDown,onScroll:this.onScroll,ref:t=>this.container=t,tabIndex:-1},s("div",{key:"dd983c262ce853828b3040c9f97c510c769662e3","aria-describedby":Boolean(this.caption)?"caption":void 0,"aria-label":this.label,role:"table",class:"table__table"},this.caption&&s("swirl-visually-hidden",{key:"031594755193d7ca2e0f8624afd79ec38ac0dec7"},s("div",{key:"7b76523681ef767eb7a5805cc45da2259d6b9ce5",id:"caption"},this.caption)),s("div",{key:"ac6f9ffa3703cbadb12b7384e8f897c5af9d0bc1",role:"rowgroup"},s("div",{key:"5263be7e317340491ee5890a1a2e5d25fcba06d5",class:"table__header",ref:t=>this.headerEl=t,role:"row"},s("slot",{key:"3171ffdd4027b3f32d2d2b110f55209c8bdc5e7e",name:"columns"}))),s("div",{key:"32c054e3e9f63439efb8f9cf9633f5b628a789e0",class:"table__body",ref:t=>this.bodyEl=t},s("slot",{key:"2f5b748c60f91dbe4df98d0f18b367f8292100d0",name:"rows"}),s("div",{key:"b51e7e34b4d4e1c4044f9480a0a115393064d221",class:"table__empty-row",role:"row"},s("div",{key:"1cb8061bef8a30965ea023b31dd0fcfac0276f26","aria-colspan":this.getColumns().length,class:"table__empty-row-cell",role:"cell"},s("slot",{key:"e512da95e312bb19dca9b36e0092a0001810eda7",name:"empty"}),!t&&s("swirl-text",{key:"ab17ca80ff8a609d5eaa4addee7d3358791bc11d",align:"center",size:"sm"},this.emptyStateLabel))))))))}get el(){return o(this)}static get watchers(){return{enableDragDrop:["handleEnableDragDropChange"]}}};p.style=".sc-swirl-table-h{position:relative;display:block}.sc-swirl-table-h *.sc-swirl-table{box-sizing:border-box}.table--keyboard-move.sc-swirl-table:focus-within{--swirl-table-moving-row-border:var(--s-border-width-default) solid\n var(--s-border-highlight)}.table--show-empty-state.sc-swirl-table .table__empty-row.sc-swirl-table{display:flex}.table__container.sc-swirl-table{position:relative;overflow:auto;width:100%}.table__container--scrolled.sc-swirl-table{--swirl-table-sticky-right-shadow:4px 0 16px -4px rgba(23, 23, 23, 0.04),\n 2px 0 4px -2px rgba(23, 23, 23, 0.04)}.table__container--scrollable.sc-swirl-table:not(.table__container--scrolled-to-end){--swirl-table-sticky-left-shadow:0px 4px 16px 0px rgba(23, 23, 23, 0.04),\n 0px 1px 4px 0px rgba(23, 23, 23, 0.04)}.table__table.sc-swirl-table{width:-webkit-max-content;width:-moz-max-content;width:max-content;min-width:max(20rem, 100%)}.table__header.sc-swirl-table-s>*,.table__header .sc-swirl-table-s>*{display:flex}.table__empty-row.sc-swirl-table{display:none}.table__empty-row-cell.sc-swirl-table{display:flex;overflow:auto;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);flex-basis:0;flex-grow:1;flex-shrink:1;align-items:center;background-color:var(--s-surface-default)}.table__empty-row-cell.sc-swirl-table>*.sc-swirl-table{flex-grow:1}";export{p as swirl_table}
@@ -1 +1 @@
1
- import{r as t,h as s,H as i}from"./p-g4wOnHIT.js";const e=class{constructor(s){t(this,s),this.toasts=[],this.onDismiss=t=>{this.toasts=[...this.toasts].filter((s=>s.toastId!==t.detail))}}async clearAll(){this.toasts=[]}async dismiss(t){this.toasts=[...this.toasts].filter((s=>s.toastId!==t))}async toast(t){if(this.toasts.some((s=>s.toastId===t.toastId)))return;const s={...t,createdAt:new Date,duration:t.duration||this.globalDuration||void 0,toastId:t.toastId||String(Math.round(1e4*Math.random()))};return this.toasts=[...this.toasts,s],s}render(){return s(i,{key:"2e948fa77162113c396c00c7f9703483c400233c",role:"status"},s("swirl-stack",{key:"ca43ed3612eef77ea064d9ed4e00f880ff818e44",spacing:"12"},this.toasts.map((t=>{const i={...t,content:void 0};return s("swirl-toast",{key:t.toastId,onDismiss:this.onDismiss,...i},t.content)}))))}};export{e as swirl_toast_provider}
1
+ import{r as t,h as s,H as i}from"./p-g4wOnHIT.js";const a=class{constructor(s){t(this,s),this.toasts=[],this.onDismiss=t=>{this.toasts=[...this.toasts].filter((s=>s.toastId!==t.detail))}}async clearAll(){this.toasts=[]}async dismiss(t){this.toasts=[...this.toasts].filter((s=>s.toastId!==t))}async toast(t){if(this.toasts.some((s=>s.toastId===t.toastId)))return;const s={...t,createdAt:new Date,duration:t.duration||this.globalDuration||void 0,toastId:t.toastId||String(Math.round(1e4*Math.random()))};return this.toasts=[...this.toasts,s],s}render(){return s(i,{key:"ed46f2145bfb6a36b7d7e66206f92aa048b0b0ff",role:"status"},s("swirl-stack",{key:"d3302dba7a8f2cd47b77adacb1d6ee51d32b4b85",spacing:"12"},this.toasts.map((t=>{const i={...t,content:void 0};return s("swirl-toast",{key:t.toastId,onDismiss:this.onDismiss,...i},t.content)}))))}};export{a as swirl_toast_provider}
@@ -1 +1 @@
1
- import{r as e,h as i,F as r,H as s}from"./p-g4wOnHIT.js";import{c as n}from"./p-orsBiyT_.js";import{D as a}from"./p-BKpD2IO9.js";import"./p-wi_3Z3FQ.js";const t=class{constructor(i){e(this,i),this.size=24}render(){const e=20===this.size?24:this.size,s={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},a=n("swirl-icon",`swirl-icon--size-${this.size}`);return i("svg",{key:"d0adbeba7dc1ac09593622194223cc6adde154c8","aria-hidden":"true",class:a,fill:"none",height:this.size,part:"icon",style:s,viewBox:`0 0 ${e} ${e}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&i(r,{key:"d7fa069ac3658b6ba5ee4ad94ae35d021d863a27"},i("path",{key:"f159460a08cc0a00569cb3644e16a0be865873df",d:"M6.05 14C5.87222 14 5.70267 13.9667 5.54133 13.9C5.38044 13.8333 5.23889 13.7389 5.11667 13.6167L2.38333 10.8833C2.26111 10.7611 2.16667 10.6196 2.1 10.4587C2.03333 10.2973 2 10.1278 2 9.95V6.05C2 5.87222 2.03333 5.70267 2.1 5.54133C2.16667 5.38044 2.26111 5.23889 2.38333 5.11667L5.11667 2.38333C5.23889 2.26111 5.38044 2.16667 5.54133 2.1C5.70267 2.03333 5.87222 2 6.05 2H9.95C10.1278 2 10.2973 2.03333 10.4587 2.1C10.6196 2.16667 10.7611 2.26111 10.8833 2.38333L13.6167 5.11667C13.7389 5.23889 13.8333 5.38044 13.9 5.54133C13.9667 5.70267 14 5.87222 14 6.05V9.95C14 10.1278 13.9667 10.2973 13.9 10.4587C13.8333 10.6196 13.7389 10.7611 13.6167 10.8833L10.8833 13.6167C10.7611 13.7389 10.6196 13.8333 10.4587 13.9C10.2973 13.9667 10.1278 14 9.95 14H6.05ZM8 11.3333C8.18889 11.3333 8.34733 11.2693 8.47533 11.1413C8.60289 11.0138 8.66667 10.8556 8.66667 10.6667C8.66667 10.4778 8.60289 10.3193 8.47533 10.1913C8.34733 10.0638 8.18889 10 8 10C7.81111 10 7.65289 10.0638 7.52533 10.1913C7.39733 10.3193 7.33333 10.4778 7.33333 10.6667C7.33333 10.8556 7.39733 11.0138 7.52533 11.1413C7.65289 11.2693 7.81111 11.3333 8 11.3333ZM8 8.66667C8.18889 8.66667 8.34733 8.60267 8.47533 8.47467C8.60289 8.34711 8.66667 8.18889 8.66667 8V5.33333C8.66667 5.14444 8.60289 4.986 8.47533 4.858C8.34733 4.73044 8.18889 4.66667 8 4.66667C7.81111 4.66667 7.65289 4.73044 7.52533 4.858C7.39733 4.986 7.33333 5.14444 7.33333 5.33333V8C7.33333 8.18889 7.39733 8.34711 7.52533 8.47467C7.65289 8.60267 7.81111 8.66667 8 8.66667ZM6.06667 12.6667H9.93333L12.6667 9.93333V6.06667L9.93333 3.33333H6.06667L3.33333 6.06667V9.93333L6.06667 12.6667Z",fill:"currentColor"})),(20===this.size||24===this.size)&&i(r,{key:"fb536d52517491647cd4a0f36ed04e3ec1c8ad3c"},i("path",{key:"b2aafe7897360ca9d7b60400d905c65feaa8ea61",d:"M9.075 21C8.80833 21 8.554 20.95 8.312 20.85C8.07067 20.75 7.85833 20.6083 7.675 20.425L3.575 16.325C3.39167 16.1417 3.25 15.9293 3.15 15.688C3.05 15.446 3 15.1917 3 14.925V9.075C3 8.80833 3.05 8.554 3.15 8.312C3.25 8.07067 3.39167 7.85833 3.575 7.675L7.675 3.575C7.85833 3.39167 8.07067 3.25 8.312 3.15C8.554 3.05 8.80833 3 9.075 3H14.925C15.1917 3 15.446 3.05 15.688 3.15C15.9293 3.25 16.1417 3.39167 16.325 3.575L20.425 7.675C20.6083 7.85833 20.75 8.07067 20.85 8.312C20.95 8.554 21 8.80833 21 9.075V14.925C21 15.1917 20.95 15.446 20.85 15.688C20.75 15.9293 20.6083 16.1417 20.425 16.325L16.325 20.425C16.1417 20.6083 15.9293 20.75 15.688 20.85C15.446 20.95 15.1917 21 14.925 21H9.075ZM12 17C12.2833 17 12.521 16.904 12.713 16.712C12.9043 16.5207 13 16.2833 13 16C13 15.7167 12.9043 15.479 12.713 15.287C12.521 15.0957 12.2833 15 12 15C11.7167 15 11.4793 15.0957 11.288 15.287C11.096 15.479 11 15.7167 11 16C11 16.2833 11.096 16.5207 11.288 16.712C11.4793 16.904 11.7167 17 12 17ZM12 13C12.2833 13 12.521 12.904 12.713 12.712C12.9043 12.5207 13 12.2833 13 12V8C13 7.71667 12.9043 7.479 12.713 7.287C12.521 7.09567 12.2833 7 12 7C11.7167 7 11.4793 7.09567 11.288 7.287C11.096 7.479 11 7.71667 11 8V12C11 12.2833 11.096 12.5207 11.288 12.712C11.4793 12.904 11.7167 13 12 13ZM9.1 19H14.9L19 14.9V9.1L14.9 5H9.1L5 9.1V14.9L9.1 19Z",fill:"currentColor"})),28===this.size&&i(r,{key:"94a3a591194251226d36774f89991d9c4705c2a5"},i("path",{key:"9cd5443ab94d4cda3ae67812452f0758390468bc",d:"M10.5875 24.5C10.2764 24.5 9.97967 24.4417 9.69733 24.325C9.41578 24.2083 9.16806 24.0431 8.95417 23.8292L4.17083 19.0458C3.95694 18.8319 3.79167 18.5842 3.675 18.3027C3.55833 18.0203 3.5 17.7236 3.5 17.4125V10.5875C3.5 10.2764 3.55833 9.97967 3.675 9.69733C3.79167 9.41578 3.95694 9.16806 4.17083 8.95417L8.95417 4.17083C9.16806 3.95694 9.41578 3.79167 9.69733 3.675C9.97967 3.55833 10.2764 3.5 10.5875 3.5H17.4125C17.7236 3.5 18.0203 3.55833 18.3027 3.675C18.5842 3.79167 18.8319 3.95694 19.0458 4.17083L23.8292 8.95417C24.0431 9.16806 24.2083 9.41578 24.325 9.69733C24.4417 9.97967 24.5 10.2764 24.5 10.5875V17.4125C24.5 17.7236 24.4417 18.0203 24.325 18.3027C24.2083 18.5842 24.0431 18.8319 23.8292 19.0458L19.0458 23.8292C18.8319 24.0431 18.5842 24.2083 18.3027 24.325C18.0203 24.4417 17.7236 24.5 17.4125 24.5H10.5875ZM14 19.8333C14.3306 19.8333 14.6078 19.7213 14.8318 19.4973C15.0551 19.2741 15.1667 18.9972 15.1667 18.6667C15.1667 18.3361 15.0551 18.0588 14.8318 17.8348C14.6078 17.6116 14.3306 17.5 14 17.5C13.6694 17.5 13.3926 17.6116 13.1693 17.8348C12.9453 18.0588 12.8333 18.3361 12.8333 18.6667C12.8333 18.9972 12.9453 19.2741 13.1693 19.4973C13.3926 19.7213 13.6694 19.8333 14 19.8333ZM14 15.1667C14.3306 15.1667 14.6078 15.0547 14.8318 14.8307C15.0551 14.6074 15.1667 14.3306 15.1667 14V9.33333C15.1667 9.00278 15.0551 8.7255 14.8318 8.5015C14.6078 8.27828 14.3306 8.16667 14 8.16667C13.6694 8.16667 13.3926 8.27828 13.1693 8.5015C12.9453 8.7255 12.8333 9.00278 12.8333 9.33333V14C12.8333 14.3306 12.9453 14.6074 13.1693 14.8307C13.3926 15.0547 13.6694 15.1667 14 15.1667ZM10.6167 22.1667H17.3833L22.1667 17.3833V10.6167L17.3833 5.83333H10.6167L5.83333 10.6167V17.3833L10.6167 22.1667Z",fill:"currentColor"})))}};t.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const o=class{constructor(i){e(this,i),this.size="m",this.mediaQueryUnsubscribe=()=>{}}componentDidLoad(){this.mediaQueryUnsubscribe=a.subscribe((e=>{this.forceIconProps(e)}))}disconnectedCallback(){this.mediaQueryUnsubscribe()}forceIconProps(e){if(!Boolean(this.iconEl))return;const i=this.iconEl.children[0];let r="24";"s"===this.size?r="16":e&&(r="20"),i?.setAttribute("size",r)}render(){const e=n("inline-error",`inline-error--size-${this.size}`);return i(s,{key:"1a26d04e450f9d9203768de9b17c77aa11e9c4d4"},i("span",{key:"06a651a9326c6b8a96f512b325cfff79e6103b09",class:e,part:"inline-error"},i("span",{key:"66773012fb6015b7502253c0c44320b78c4fdd4a",class:"inline-error__icon",ref:e=>this.iconEl=e},i("swirl-icon-error",{key:"7f1d200e1db3fb43cef244fa65a016dc86cb7059"})),i("span",{key:"205d8d625e3cfac9a3fedadca9744cdfc2038e74",class:"inline-error__message"},this.message)))}};o.style=":host{display:inline-flex}:host *{box-sizing:border-box}.inline-error{display:inline-flex;color:var(--s-text-critical);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.inline-error{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.inline-error--size-s{font-size:var(--s-font-size-sm)}.inline-error--size-s .inline-error__icon{width:1rem;height:1rem;margin-top:0.125rem}.inline-error--size-s .inline-error__message{padding-top:0}.inline-error__icon{display:inline-flex;width:1.5rem;height:1.5rem;color:var(--s-icon-critical);align-self:flex-start}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.inline-error__icon{width:1.25rem;height:1.25rem}}.inline-error__message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin-left:var(--s-space-4);padding-top:0.0625rem;white-space:pre-line}";const c=class{constructor(i){e(this,i),this.size="m"}render(){const e=n("spinner",`spinner--size-${this.size}`);return i(s,{key:"211c2c245c55dddf576fb82e4e90d0371d41f2da"},i("span",{key:"ac73ddf409f60b61cb5fb915c6af162400f09091",class:e,role:Boolean(this.label)?"status":void 0},i("svg",{key:"4567a56f98143aabe43f03d702077e0de3fb0a39","aria-hidden":"true",class:"spinner__indicator",focusable:"false",viewBox:"0 0 50 50"},i("circle",{key:"f0a71d94e05eac141e9e42f9cf67b7feee313b69",class:"spinner__background",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"4"}),i("circle",{key:"94ab44a72ca4b2160605e373a9530138a2b97896",class:"spinner__circle",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"4"})),this.label&&i("swirl-visually-hidden",{key:"d47917ca16502f3e9f0052e2efcb81de07e60364"},i("span",{key:"756ce67c30da2ec76b79055215e7be22ae55a6b0",class:"spinner__label"},this.label))))}};c.style=":host{display:inline-flex}:host *{box-sizing:border-box}.spinner{position:relative;display:inline-flex;overflow:hidden;width:2.25rem;height:2.25rem}.spinner--size-xs,.spinner--size-20{width:1.25rem;height:1.25rem}.spinner--size-xs .spinner__circle,.spinner--size-20 .spinner__circle{stroke-width:0.1875rem}.spinner--size-s,.spinner--size-24{width:1.5rem;height:1.5rem}.spinner--size-s .spinner__circle,.spinner--size-24 .spinner__circle{stroke-width:0.1875rem}.spinner__indicator{position:absolute;inset:0;width:100%;height:100%;transform-origin:center center;animation:spinner-rotate 2s linear infinite}.spinner__background{stroke:var(--s-border-default);stroke-linecap:round}.spinner__circle{animation:spinner-dash 1.5s ease-in-out infinite;stroke:var(--s-interactive-primary-default);stroke-dasharray:1, 200;stroke-dashoffset:0;stroke-linecap:round}@keyframes spinner-rotate{100%{transform:rotate(360deg)}}@keyframes spinner-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}";export{t as swirl_icon_error,o as swirl_inline_error,c as swirl_spinner}
1
+ import{r as e,h as i,F as r,H as s}from"./p-g4wOnHIT.js";import{c as n}from"./p-orsBiyT_.js";import{D as a}from"./p-BKpD2IO9.js";import"./p-wi_3Z3FQ.js";const t=class{constructor(i){e(this,i),this.size=24}render(){const e=20===this.size?24:this.size,s={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},a=n("swirl-icon",`swirl-icon--size-${this.size}`);return i("svg",{key:"d0adbeba7dc1ac09593622194223cc6adde154c8","aria-hidden":"true",class:a,fill:"none",height:this.size,part:"icon",style:s,viewBox:`0 0 ${e} ${e}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&i(r,{key:"d7fa069ac3658b6ba5ee4ad94ae35d021d863a27"},i("path",{key:"f159460a08cc0a00569cb3644e16a0be865873df",d:"M6.05 14C5.87222 14 5.70267 13.9667 5.54133 13.9C5.38044 13.8333 5.23889 13.7389 5.11667 13.6167L2.38333 10.8833C2.26111 10.7611 2.16667 10.6196 2.1 10.4587C2.03333 10.2973 2 10.1278 2 9.95V6.05C2 5.87222 2.03333 5.70267 2.1 5.54133C2.16667 5.38044 2.26111 5.23889 2.38333 5.11667L5.11667 2.38333C5.23889 2.26111 5.38044 2.16667 5.54133 2.1C5.70267 2.03333 5.87222 2 6.05 2H9.95C10.1278 2 10.2973 2.03333 10.4587 2.1C10.6196 2.16667 10.7611 2.26111 10.8833 2.38333L13.6167 5.11667C13.7389 5.23889 13.8333 5.38044 13.9 5.54133C13.9667 5.70267 14 5.87222 14 6.05V9.95C14 10.1278 13.9667 10.2973 13.9 10.4587C13.8333 10.6196 13.7389 10.7611 13.6167 10.8833L10.8833 13.6167C10.7611 13.7389 10.6196 13.8333 10.4587 13.9C10.2973 13.9667 10.1278 14 9.95 14H6.05ZM8 11.3333C8.18889 11.3333 8.34733 11.2693 8.47533 11.1413C8.60289 11.0138 8.66667 10.8556 8.66667 10.6667C8.66667 10.4778 8.60289 10.3193 8.47533 10.1913C8.34733 10.0638 8.18889 10 8 10C7.81111 10 7.65289 10.0638 7.52533 10.1913C7.39733 10.3193 7.33333 10.4778 7.33333 10.6667C7.33333 10.8556 7.39733 11.0138 7.52533 11.1413C7.65289 11.2693 7.81111 11.3333 8 11.3333ZM8 8.66667C8.18889 8.66667 8.34733 8.60267 8.47533 8.47467C8.60289 8.34711 8.66667 8.18889 8.66667 8V5.33333C8.66667 5.14444 8.60289 4.986 8.47533 4.858C8.34733 4.73044 8.18889 4.66667 8 4.66667C7.81111 4.66667 7.65289 4.73044 7.52533 4.858C7.39733 4.986 7.33333 5.14444 7.33333 5.33333V8C7.33333 8.18889 7.39733 8.34711 7.52533 8.47467C7.65289 8.60267 7.81111 8.66667 8 8.66667ZM6.06667 12.6667H9.93333L12.6667 9.93333V6.06667L9.93333 3.33333H6.06667L3.33333 6.06667V9.93333L6.06667 12.6667Z",fill:"currentColor"})),(20===this.size||24===this.size)&&i(r,{key:"fb536d52517491647cd4a0f36ed04e3ec1c8ad3c"},i("path",{key:"b2aafe7897360ca9d7b60400d905c65feaa8ea61",d:"M9.075 21C8.80833 21 8.554 20.95 8.312 20.85C8.07067 20.75 7.85833 20.6083 7.675 20.425L3.575 16.325C3.39167 16.1417 3.25 15.9293 3.15 15.688C3.05 15.446 3 15.1917 3 14.925V9.075C3 8.80833 3.05 8.554 3.15 8.312C3.25 8.07067 3.39167 7.85833 3.575 7.675L7.675 3.575C7.85833 3.39167 8.07067 3.25 8.312 3.15C8.554 3.05 8.80833 3 9.075 3H14.925C15.1917 3 15.446 3.05 15.688 3.15C15.9293 3.25 16.1417 3.39167 16.325 3.575L20.425 7.675C20.6083 7.85833 20.75 8.07067 20.85 8.312C20.95 8.554 21 8.80833 21 9.075V14.925C21 15.1917 20.95 15.446 20.85 15.688C20.75 15.9293 20.6083 16.1417 20.425 16.325L16.325 20.425C16.1417 20.6083 15.9293 20.75 15.688 20.85C15.446 20.95 15.1917 21 14.925 21H9.075ZM12 17C12.2833 17 12.521 16.904 12.713 16.712C12.9043 16.5207 13 16.2833 13 16C13 15.7167 12.9043 15.479 12.713 15.287C12.521 15.0957 12.2833 15 12 15C11.7167 15 11.4793 15.0957 11.288 15.287C11.096 15.479 11 15.7167 11 16C11 16.2833 11.096 16.5207 11.288 16.712C11.4793 16.904 11.7167 17 12 17ZM12 13C12.2833 13 12.521 12.904 12.713 12.712C12.9043 12.5207 13 12.2833 13 12V8C13 7.71667 12.9043 7.479 12.713 7.287C12.521 7.09567 12.2833 7 12 7C11.7167 7 11.4793 7.09567 11.288 7.287C11.096 7.479 11 7.71667 11 8V12C11 12.2833 11.096 12.5207 11.288 12.712C11.4793 12.904 11.7167 13 12 13ZM9.1 19H14.9L19 14.9V9.1L14.9 5H9.1L5 9.1V14.9L9.1 19Z",fill:"currentColor"})),28===this.size&&i(r,{key:"94a3a591194251226d36774f89991d9c4705c2a5"},i("path",{key:"9cd5443ab94d4cda3ae67812452f0758390468bc",d:"M10.5875 24.5C10.2764 24.5 9.97967 24.4417 9.69733 24.325C9.41578 24.2083 9.16806 24.0431 8.95417 23.8292L4.17083 19.0458C3.95694 18.8319 3.79167 18.5842 3.675 18.3027C3.55833 18.0203 3.5 17.7236 3.5 17.4125V10.5875C3.5 10.2764 3.55833 9.97967 3.675 9.69733C3.79167 9.41578 3.95694 9.16806 4.17083 8.95417L8.95417 4.17083C9.16806 3.95694 9.41578 3.79167 9.69733 3.675C9.97967 3.55833 10.2764 3.5 10.5875 3.5H17.4125C17.7236 3.5 18.0203 3.55833 18.3027 3.675C18.5842 3.79167 18.8319 3.95694 19.0458 4.17083L23.8292 8.95417C24.0431 9.16806 24.2083 9.41578 24.325 9.69733C24.4417 9.97967 24.5 10.2764 24.5 10.5875V17.4125C24.5 17.7236 24.4417 18.0203 24.325 18.3027C24.2083 18.5842 24.0431 18.8319 23.8292 19.0458L19.0458 23.8292C18.8319 24.0431 18.5842 24.2083 18.3027 24.325C18.0203 24.4417 17.7236 24.5 17.4125 24.5H10.5875ZM14 19.8333C14.3306 19.8333 14.6078 19.7213 14.8318 19.4973C15.0551 19.2741 15.1667 18.9972 15.1667 18.6667C15.1667 18.3361 15.0551 18.0588 14.8318 17.8348C14.6078 17.6116 14.3306 17.5 14 17.5C13.6694 17.5 13.3926 17.6116 13.1693 17.8348C12.9453 18.0588 12.8333 18.3361 12.8333 18.6667C12.8333 18.9972 12.9453 19.2741 13.1693 19.4973C13.3926 19.7213 13.6694 19.8333 14 19.8333ZM14 15.1667C14.3306 15.1667 14.6078 15.0547 14.8318 14.8307C15.0551 14.6074 15.1667 14.3306 15.1667 14V9.33333C15.1667 9.00278 15.0551 8.7255 14.8318 8.5015C14.6078 8.27828 14.3306 8.16667 14 8.16667C13.6694 8.16667 13.3926 8.27828 13.1693 8.5015C12.9453 8.7255 12.8333 9.00278 12.8333 9.33333V14C12.8333 14.3306 12.9453 14.6074 13.1693 14.8307C13.3926 15.0547 13.6694 15.1667 14 15.1667ZM10.6167 22.1667H17.3833L22.1667 17.3833V10.6167L17.3833 5.83333H10.6167L5.83333 10.6167V17.3833L10.6167 22.1667Z",fill:"currentColor"})))}};t.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const o=class{constructor(i){e(this,i),this.size="m",this.mediaQueryUnsubscribe=()=>{}}componentDidLoad(){this.mediaQueryUnsubscribe=a.subscribe((e=>{this.forceIconProps(e)}))}disconnectedCallback(){this.mediaQueryUnsubscribe()}forceIconProps(e){if(!Boolean(this.iconEl))return;const i=this.iconEl.children[0];let r="24";"s"===this.size?r="16":e&&(r="20"),i?.setAttribute("size",r)}render(){const e=n("inline-error",`inline-error--size-${this.size}`);return i(s,{key:"1a26d04e450f9d9203768de9b17c77aa11e9c4d4"},i("span",{key:"06a651a9326c6b8a96f512b325cfff79e6103b09",class:e,part:"inline-error"},i("span",{key:"66773012fb6015b7502253c0c44320b78c4fdd4a",class:"inline-error__icon",ref:e=>this.iconEl=e},i("swirl-icon-error",{key:"7f1d200e1db3fb43cef244fa65a016dc86cb7059"})),i("span",{key:"205d8d625e3cfac9a3fedadca9744cdfc2038e74",class:"inline-error__message"},this.message)))}};o.style=":host{display:inline-flex}:host *{box-sizing:border-box}.inline-error{display:inline-flex;color:var(--s-text-critical);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.inline-error{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.inline-error--size-s{font-size:var(--s-font-size-sm)}.inline-error--size-s .inline-error__icon{width:1rem;height:1rem;margin-top:0.125rem}.inline-error--size-s .inline-error__message{padding-top:0}.inline-error__icon{display:inline-flex;width:1.5rem;height:1.5rem;color:var(--s-icon-critical);align-self:flex-start}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.inline-error__icon{width:1.25rem;height:1.25rem}}.inline-error__message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin-left:var(--s-space-4);padding-top:0.0625rem;white-space:pre-line}";const c=class{constructor(i){e(this,i),this.size="m"}render(){const e=n("spinner",`spinner--size-${this.size}`);return i(s,{key:"2f761771a7f8ce7e6a101e112e0ca13b28d3a395"},i("span",{key:"6fab35299e5384a5ea83dab47f4e6cbfc5ed8334",class:e,role:Boolean(this.label)?"status":void 0},i("svg",{key:"8d7450bf5fedf307a9372a28aeb61ce5d164daf6","aria-hidden":"true",class:"spinner__indicator",focusable:"false",viewBox:"0 0 50 50"},i("circle",{key:"80b2296b1b60e70d5b771406101d9d5e95cfdd7a",class:"spinner__background",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"4"}),i("circle",{key:"ec3742637ae8514bbada169901575892ffd5e50f",class:"spinner__circle",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"4"})),this.label&&i("swirl-visually-hidden",{key:"acc70969490493433e58b543b8e4db8e75e795bf"},i("span",{key:"a8fd095d46463f8c08fb52ac9d70ec8f670973f9",class:"spinner__label"},this.label))))}};c.style=":host{display:inline-flex}:host *{box-sizing:border-box}.spinner{position:relative;display:inline-flex;overflow:hidden;width:2.25rem;height:2.25rem}.spinner--size-xs,.spinner--size-20{width:1.25rem;height:1.25rem}.spinner--size-xs .spinner__circle,.spinner--size-20 .spinner__circle{stroke-width:0.1875rem}.spinner--size-s,.spinner--size-24{width:1.5rem;height:1.5rem}.spinner--size-s .spinner__circle,.spinner--size-24 .spinner__circle{stroke-width:0.1875rem}.spinner__indicator{position:absolute;inset:0;width:100%;height:100%;transform-origin:center center;animation:spinner-rotate 2s linear infinite}.spinner__background{stroke:var(--s-border-default);stroke-linecap:round}.spinner__circle{animation:spinner-dash 1.5s ease-in-out infinite;stroke:var(--s-interactive-primary-default);stroke-dasharray:1, 200;stroke-dashoffset:0;stroke-linecap:round}@keyframes spinner-rotate{100%{transform:rotate(360deg)}}@keyframes spinner-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}";export{t as swirl_icon_error,o as swirl_inline_error,c as swirl_spinner}
@@ -1 +1 @@
1
- import{r as t,h as s,H as i}from"./p-g4wOnHIT.js";import{c as a}from"./p-orsBiyT_.js";const o=class{constructor(s){t(this,s)}render(){const t=a("status-indicator",`status-indicator--intent-${this.intent}`);return s(i,{key:"6f12aba79d45fda09d51ff87b5c2ed75bcf6bd92"},s("div",{key:"9b6871b52ccb46dbee1de179d613acda8ed7f785",class:t},s("span",{key:"a8f389aabfca9e54fa8ddb4fa227433d6c6009db",class:"status-indicator__dot"}),s("span",{key:"16ce45812c9d173aec95eb7362f62d325d6e7168",class:"status-indicator__label"},this.label)))}};o.style=':host{display:block}:host *{box-sizing:border-box}.status-indicator{display:flex;align-items:center;gap:var(--s-space-4)}.status-indicator--intent-critical .status-indicator__dot:before{background-color:var(--s-icon-critical)}.status-indicator--intent-info .status-indicator__dot:before{background-color:var(--s-icon-info)}.status-indicator--intent-success .status-indicator__dot:before{background-color:var(--s-icon-success)}.status-indicator--intent-warning .status-indicator__dot:before{background-color:var(--s-icon-warning)}.status-indicator__dot{display:inline-flex;width:1.25rem;height:1.25rem;flex-shrink:0;justify-content:center;align-items:center}.status-indicator__dot:before{display:inline-flex;width:0.5rem;height:0.5rem;border-radius:50%;content:""}.status-indicator__label{overflow:hidden;min-width:0;font-size:var(--s-font-size-sm);white-space:nowrap;text-overflow:ellipsis}';export{o as swirl_status_indicator}
1
+ import{r as t,h as s,H as i}from"./p-g4wOnHIT.js";import{c as a}from"./p-orsBiyT_.js";const o=class{constructor(s){t(this,s)}render(){const t=a("status-indicator",`status-indicator--intent-${this.intent}`);return s(i,{key:"62f371ab1f733071a33215f1b2d618f352932906"},s("div",{key:"de36fa200de899dfa926b58506ebfe498095d65b",class:t},s("span",{key:"70097360cd5d8f107768409986891c0e4759c768",class:"status-indicator__dot"}),s("span",{key:"bb9a68874c9ea67161d73291315974c449688723",class:"status-indicator__label"},this.label)))}};o.style=':host{display:block}:host *{box-sizing:border-box}.status-indicator{display:flex;align-items:center;gap:var(--s-space-4)}.status-indicator--intent-critical .status-indicator__dot:before{background-color:var(--s-icon-critical)}.status-indicator--intent-info .status-indicator__dot:before{background-color:var(--s-icon-info)}.status-indicator--intent-success .status-indicator__dot:before{background-color:var(--s-icon-success)}.status-indicator--intent-warning .status-indicator__dot:before{background-color:var(--s-icon-warning)}.status-indicator__dot{display:inline-flex;width:1.25rem;height:1.25rem;flex-shrink:0;justify-content:center;align-items:center}.status-indicator__dot:before{display:inline-flex;width:0.5rem;height:0.5rem;border-radius:50%;content:""}.status-indicator__label{overflow:hidden;min-width:0;font-size:var(--s-font-size-sm);white-space:nowrap;text-overflow:ellipsis}';export{o as swirl_status_indicator}
@@ -0,0 +1 @@
1
+ import{r as s,h as a,H as t}from"./p-g4wOnHIT.js";import{c}from"./p-orsBiyT_.js";const i=class{constructor(a){s(this,a),this.padding="8"}render(){const s=c("tab",{"tab--active":this.active});return a(t,{key:"4dcaa666ac2c76ef69a3db108fec8d9261f0c2c9","aria-labelledby":`tab-${this.tabId}`,id:this.tabId,role:"tabpanel",tabIndex:this.active?0:-1,class:s,style:{padding:`var(--s-space-${this.padding})`}},a("slot",{key:"d4be897cca0b201d4b72b400f6a7433ccf86921c"}))}};i.style=":host{display:none;width:100%}:host(.tab--active){display:block}:host *{box-sizing:border-box}";export{i as swirl_tab}
@@ -1 +1 @@
1
- import{r as s,c as i,h as t,H as e,d as c}from"./p-g4wOnHIT.js";import{c as h}from"./p-orsBiyT_.js";const r=class{constructor(t){s(this,t),this.valueChange=i(this,"valueChange",7),this.checked=!1,this.disabled=!1,this.labelPosition="end",this.onChange=()=>{this.checked=!this.checked,this.valueChange.emit(this.checked)}}async toggle(){this.inputEl.dispatchEvent(new Event("change"))}render(){const s=this.checked,i=s?"true":"false",c=h("switch",`switch--label-position-${this.labelPosition}`,{"switch--off":!this.checked,"switch--on":s,"switch--disabled":this.disabled,"switch--hide-content":this.hideLabel&&(!this.description||this.hideDescription)});return t(e,{key:"b568afb5a74f2485a192fe2859454df59d00c80c"},t("label",{key:"5e8b7dfb40e4d3928e5c025e150304844da5cd5b",class:c,htmlFor:this.inputId},t("span",{key:"9c1c674be9a9165bcc4719870fc47cb83b4d0d43",class:"switch__control"},t("swirl-visually-hidden",{key:"de28385d875f2cdeb2fdbac6b7de99167720097b"},t("input",{key:"e4a134228c82fb527a3ef32484c71e381f2bf2e4","aria-checked":i,"aria-label":!this.hideLabel&&this.swirlAriaLabel?this.swirlAriaLabel:void 0,checked:s,class:"switch__input",disabled:this.disabled,id:this.inputId,name:this.inputName,onChange:this.onChange,ref:s=>this.inputEl=s,role:"switch",type:"checkbox",value:this.value})),t("span",{key:"afadd831fce8dbd26a1fc62cce54c749a97d6f66","aria-hidden":"true",class:"switch__thumb"})),t("swirl-stack",{key:"bdadf2bfe6a17418e2990de80c67077ee33d4366",class:"switch__content"},this.label&&!this.hideLabel&&t("span",{key:"c34de32004d9f3650f77e623a4784e06f2d2b239",class:"switch__label"},this.label),this.hideLabel&&t("swirl-visually-hidden",{key:"62ed80c15fe349fe5bd2b6f78a46b6fd0b2a067e"},this.swirlAriaLabel||this.label),this.description&&!this.hideDescription&&t("span",{key:"946f53434f3b24f676b5830d8b0248fd01a15ac1",class:"switch__description"},this.description),this.description&&this.hideDescription&&t("swirl-visually-hidden",{key:"2d8824fa6057a9b414c9fa593a32524b899063ac"},this.description))))}get el(){return c(this)}};r.style=".sc-swirl-switch-h{display:inline-flex;max-width:100%}.sc-swirl-switch-h *.sc-swirl-switch{box-sizing:border-box}.switch.sc-swirl-switch{display:inline-flex;width:100%;align-items:center;touch-action:none}.switch.sc-swirl-switch:focus-within .switch__control.sc-swirl-switch{box-shadow:0 0 0 0.0625rem var(--s-background-default),\n 0 0 0 0.1875rem var(--s-focus-default)}.switch--label-position-start.sc-swirl-switch{flex-direction:row-reverse}.switch--label-position-start.sc-swirl-switch .switch__content.sc-swirl-switch{margin-right:var(--s-space-12);margin-left:0}.switch--on.sc-swirl-switch .switch__thumb.sc-swirl-switch{left:calc(100% - 1.25rem - var(--s-space-2))}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.switch--on.sc-swirl-switch .switch__thumb.sc-swirl-switch{left:calc(100% - 0.875rem - var(--s-space-2))}}.switch--on.sc-swirl-switch .switch__control.sc-swirl-switch{background-color:var(--s-interactive-primary-default)}.switch--disabled.sc-swirl-switch .switch__control.sc-swirl-switch{background-color:var(--s-interactive-primary-disabled);cursor:default}.switch--disabled.sc-swirl-switch .switch__thumb.sc-swirl-switch{background-color:var(--s-interactive-neutral-default)}.switch--disabled.sc-swirl-switch .switch__label.sc-swirl-switch{color:var(--s-text-disabled)}.switch--hide-content.sc-swirl-switch .switch__content.sc-swirl-switch{margin-left:0}.switch__control.sc-swirl-switch{position:relative;width:2.75rem;height:1.5rem;flex-shrink:0;border-radius:calc(1.5rem / 2);background-color:var(--s-interactive-primary-disabled);cursor:pointer;transition:background-color 0.2s}@media (prefers-reduced-motion){.switch__control.sc-swirl-switch{transition:none}}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.switch__control.sc-swirl-switch{width:1.875rem;height:1.125rem;border-radius:calc(1.125rem / 2)}}.switch__thumb.sc-swirl-switch{position:absolute;top:var(--s-space-2);left:var(--s-space-2);width:1.25rem;height:1.25rem;border-radius:50%;background-color:var(--s-surface-default);transition:left 0.2s;pointer-events:none}@media (prefers-reduced-motion){.switch__thumb.sc-swirl-switch{transition:none}}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.switch__thumb.sc-swirl-switch{width:0.875rem;height:0.875rem}}.switch__content.sc-swirl-switch{position:relative;z-index:1;margin-left:var(--s-space-12)}.switch__label.sc-swirl-switch{overflow:hidden;font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);white-space:nowrap;text-overflow:ellipsis}.switch__description.sc-swirl-switch{color:var(--s-text-subdued);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-normal);line-height:var(--s-line-height-sm)}";export{r as swirl_switch}
1
+ import{r as s,c as i,h as t,H as e,d as c}from"./p-g4wOnHIT.js";import{c as h}from"./p-orsBiyT_.js";const r=class{constructor(t){s(this,t),this.valueChange=i(this,"valueChange",7),this.checked=!1,this.disabled=!1,this.labelPosition="end",this.onChange=()=>{this.checked=!this.checked,this.valueChange.emit(this.checked)}}async toggle(){this.inputEl.dispatchEvent(new Event("change"))}render(){const s=this.checked,i=s?"true":"false",c=h("switch",`switch--label-position-${this.labelPosition}`,{"switch--off":!this.checked,"switch--on":s,"switch--disabled":this.disabled,"switch--hide-content":this.hideLabel&&(!this.description||this.hideDescription)});return t(e,{key:"50b3357b11531b7b54760da2a757c5d20c2456a7"},t("label",{key:"2fb84e079c1e250042827d4b727ede8fb1d8dfbf",class:c,htmlFor:this.inputId},t("span",{key:"272a48201fab35cdf5e9e5e2048369a864403b34",class:"switch__control"},t("swirl-visually-hidden",{key:"66e44c3a9b42cd634cf87e399b37436c9c250fa6"},t("input",{key:"ae147b742a03936b5cb7e3337a9ad8ace135b6f7","aria-checked":i,"aria-label":!this.hideLabel&&this.swirlAriaLabel?this.swirlAriaLabel:void 0,checked:s,class:"switch__input",disabled:this.disabled,id:this.inputId,name:this.inputName,onChange:this.onChange,ref:s=>this.inputEl=s,role:"switch",type:"checkbox",value:this.value})),t("span",{key:"0e8bc773fa78d82f17e84b43d59d804246879619","aria-hidden":"true",class:"switch__thumb"})),t("swirl-stack",{key:"d9bec995417f915c3219ed3ff4d4eaa10d23f4b9",class:"switch__content"},this.label&&!this.hideLabel&&t("span",{key:"bcb1123bdf250a15454fbed0cc0fcd3b484887bd",class:"switch__label"},this.label),this.hideLabel&&t("swirl-visually-hidden",{key:"d8e3e5bc029e05b8f73500ab70d3fb73b1420b6a"},this.swirlAriaLabel||this.label),this.description&&!this.hideDescription&&t("span",{key:"a46ecfe95969643500e26224f8b021985f461fa9",class:"switch__description"},this.description),this.description&&this.hideDescription&&t("swirl-visually-hidden",{key:"71c99b5f29ab55c5c9a48e4ae1e009e326a39729"},this.description))))}get el(){return c(this)}};r.style=".sc-swirl-switch-h{display:inline-flex;max-width:100%}.sc-swirl-switch-h *.sc-swirl-switch{box-sizing:border-box}.switch.sc-swirl-switch{display:inline-flex;width:100%;align-items:center;touch-action:none}.switch.sc-swirl-switch:focus-within .switch__control.sc-swirl-switch{box-shadow:0 0 0 0.0625rem var(--s-background-default),\n 0 0 0 0.1875rem var(--s-focus-default)}.switch--label-position-start.sc-swirl-switch{flex-direction:row-reverse}.switch--label-position-start.sc-swirl-switch .switch__content.sc-swirl-switch{margin-right:var(--s-space-12);margin-left:0}.switch--on.sc-swirl-switch .switch__thumb.sc-swirl-switch{left:calc(100% - 1.25rem - var(--s-space-2))}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.switch--on.sc-swirl-switch .switch__thumb.sc-swirl-switch{left:calc(100% - 0.875rem - var(--s-space-2))}}.switch--on.sc-swirl-switch .switch__control.sc-swirl-switch{background-color:var(--s-interactive-primary-default)}.switch--disabled.sc-swirl-switch .switch__control.sc-swirl-switch{background-color:var(--s-interactive-primary-disabled);cursor:default}.switch--disabled.sc-swirl-switch .switch__thumb.sc-swirl-switch{background-color:var(--s-interactive-neutral-default)}.switch--disabled.sc-swirl-switch .switch__label.sc-swirl-switch{color:var(--s-text-disabled)}.switch--hide-content.sc-swirl-switch .switch__content.sc-swirl-switch{margin-left:0}.switch__control.sc-swirl-switch{position:relative;width:2.75rem;height:1.5rem;flex-shrink:0;border-radius:calc(1.5rem / 2);background-color:var(--s-interactive-primary-disabled);cursor:pointer;transition:background-color 0.2s}@media (prefers-reduced-motion){.switch__control.sc-swirl-switch{transition:none}}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.switch__control.sc-swirl-switch{width:1.875rem;height:1.125rem;border-radius:calc(1.125rem / 2)}}.switch__thumb.sc-swirl-switch{position:absolute;top:var(--s-space-2);left:var(--s-space-2);width:1.25rem;height:1.25rem;border-radius:50%;background-color:var(--s-surface-default);transition:left 0.2s;pointer-events:none}@media (prefers-reduced-motion){.switch__thumb.sc-swirl-switch{transition:none}}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.switch__thumb.sc-swirl-switch{width:0.875rem;height:0.875rem}}.switch__content.sc-swirl-switch{position:relative;z-index:1;margin-left:var(--s-space-12)}.switch__label.sc-swirl-switch{overflow:hidden;font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);white-space:nowrap;text-overflow:ellipsis}.switch__description.sc-swirl-switch{color:var(--s-text-subdued);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-normal);line-height:var(--s-line-height-sm)}";export{r as swirl_switch}
@@ -1 +1 @@
1
- import{r as t,h as o,H as s,d as e}from"./p-g4wOnHIT.js";import{k as i}from"./p-wi_3Z3FQ.js";const r=class{constructor(o){t(this,o),this.orientation="horizontal",this.onKeyDown=t=>{"ArrowDown"===t.code||"ArrowRight"===t.code?(t.preventDefault(),this.focusNextItem()):"ArrowUp"!==t.code&&"ArrowLeft"!==t.code||(t.preventDefault(),this.focusPreviousItem())}}componentDidLoad(){const t=this.getItems();this.deactivateTabIndexes(t);const o=t[0]?.querySelector("button");Boolean(o)&&(o.tabIndex=0)}getItems(){return Array.from(this.el.querySelectorAll("swirl-button, swirl-chip"))}focusNextItem(){const t=this.getItems(),o=this.getActiveItemIndex(t);this.focusItem(t[(o+1)%t.length])}focusPreviousItem(){const t=this.getItems(),o=this.getActiveItemIndex(t);this.focusItem(t[0===o?t.length-1:o-1])}getActiveItemIndex(t){const o=i();return t.findIndex((t=>t===o?.closest("swirl-button, swirl-chip")))}focusItem(t){const o=this.getItems();if(this.deactivateTabIndexes(o),!Boolean(t))return;const s=t.querySelector("button");Boolean(s)&&(s.tabIndex=0,s.focus())}deactivateTabIndexes(t){t.forEach((t=>{const o=t.querySelector("button");Boolean(o)&&(o.tabIndex=-1)}))}render(){return o(s,{key:"6839d6b80aec0dd93bcdbf05d6ee1eb3cad5ae94"},o("swirl-stack",{key:"9f40313da2656080f7ebe0d04958afa922f0c6e6",align:"center","aria-label":this.label,"aria-orientation":this.orientation,role:"toolbar",onKeyDown:this.onKeyDown,orientation:this.orientation,spacing:"8",wrap:!0},o("slot",{key:"1b4462914f0e66be04c26d711e060cf1cdbf7c10"})))}get el(){return e(this)}};r.style=":host{display:block}:host *{box-sizing:border-box}";export{r as swirl_toolbar}
1
+ import{r as t,h as o,H as s,d as i}from"./p-g4wOnHIT.js";import{k as e}from"./p-wi_3Z3FQ.js";const r=class{constructor(o){t(this,o),this.orientation="horizontal",this.onKeyDown=t=>{"ArrowDown"===t.code||"ArrowRight"===t.code?(t.preventDefault(),this.focusNextItem()):"ArrowUp"!==t.code&&"ArrowLeft"!==t.code||(t.preventDefault(),this.focusPreviousItem())}}componentDidLoad(){const t=this.getItems();this.deactivateTabIndexes(t);const o=t[0]?.querySelector("button");Boolean(o)&&(o.tabIndex=0)}getItems(){return Array.from(this.el.querySelectorAll("swirl-button, swirl-chip"))}focusNextItem(){const t=this.getItems(),o=this.getActiveItemIndex(t);this.focusItem(t[(o+1)%t.length])}focusPreviousItem(){const t=this.getItems(),o=this.getActiveItemIndex(t);this.focusItem(t[0===o?t.length-1:o-1])}getActiveItemIndex(t){const o=e();return t.findIndex((t=>t===o?.closest("swirl-button, swirl-chip")))}focusItem(t){const o=this.getItems();if(this.deactivateTabIndexes(o),!Boolean(t))return;const s=t.querySelector("button");Boolean(s)&&(s.tabIndex=0,s.focus())}deactivateTabIndexes(t){t.forEach((t=>{const o=t.querySelector("button");Boolean(o)&&(o.tabIndex=-1)}))}render(){return o(s,{key:"68b45bf033f288bfcc91816113e4a9dc1ef3969f"},o("swirl-stack",{key:"5e47332dbd0f692c105a8271b381b474e87e6a79",align:"center","aria-label":this.label,"aria-orientation":this.orientation,role:"toolbar",onKeyDown:this.onKeyDown,orientation:this.orientation,spacing:"8",wrap:!0},o("slot",{key:"fcd391ebc21c6b829394c28b2968c5007f3be389"})))}get el(){return i(this)}};r.style=":host{display:block}:host *{box-sizing:border-box}";export{r as swirl_toolbar}
@@ -1 +1 @@
1
- import{r as t,c as a,h as r,H as o,d as e}from"./p-g4wOnHIT.js";import{c as n}from"./p-orsBiyT_.js";const s=class{constructor(r){t(this,r),this.removeTag=a(this,"remove",7),this.iconPosition="start",this.intent="default",this.size="m",this.removalButtonLabel="Remove",this.variant="default",this.onRemove=t=>{this.removeTag?.emit(t)}}componentDidLoad(){this.forceIconProps()}componentWillLoad(){this.forceVariant()}componentDidRender(){this.forceIconProps()}forceIconProps(){const t=this.iconEl?.children[0];t?.setAttribute("size","16")}forceVariant(){Boolean(this.bordered)&&(console.warn('[Swirl] The "bordered" prop of swirl-tag is deprecated and will be removed with the next major release. Please use the "variant" prop as "outline" to achieve the same result.'),this.variant="outline")}render(){const t=n("tag",`tag--icon-position-${this.iconPosition}`,`tag--intent-${this.intent}`,`tag--size-${this.size}`,`tag--variant-${this.variant}`,{"tag--hide-label":this.hideLabel});return r(o,{key:"1333123b648e954bf91e00e1c91b420b2a26e9f4"},r("span",{key:"475ea72614b02e8b0284c8702cb4e0d7c82cee16",class:t,part:"tag"},this.icon&&r("span",{key:"33e5ce8e5f8b3380f984ab4dea418ceaa3c83b4c",class:"tag__icon",innerHTML:this.icon,ref:t=>this.iconEl=t}),this.hideLabel?r("swirl-visually-hidden",null,this.label):r("span",{class:"tag__label"},this.label),this.removable&&r("button",{key:"c8c0928c9c85186b2f0516308f91252eea48c3ac","aria-label":this.removalButtonLabel,class:"tag__removal-button",onClick:this.onRemove,tabIndex:"true"===this.el.ariaHidden?-1:void 0,type:"button"},r("swirl-icon-close",{key:"7d504c7ee2f91fdbb5929138339297d54b2f2f7d",size:16}))))}get el(){return e(this)}};s.style=":host{display:inline-flex;max-width:100%}:host *{box-sizing:border-box}.tag{display:inline-flex;max-width:100%;align-items:center;border-radius:var(--s-border-radius-s);color:var(--s-text-default);background-color:var(--swirl-tag-background-default);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-sm);white-space:nowrap;border-style:solid;border-width:var(--s-border-width-default);border-color:transparent}.tag--size-s{padding:var(--s-space-0) var(--s-space-4)}.tag--size-m{padding:var(--s-space-2) var(--s-space-8)}.tag--icon-position-end .tag__icon{margin-right:calc(-1 * var(--s-space-4));margin-left:var(--s-space-4);order:2}.tag--hide-label{padding-right:0;padding-left:0}.tag--hide-label.tag--size-s .tag__icon{margin-right:0;margin-left:0}.tag--hide-label .tag__icon{margin-right:var(--s-space-2);margin-left:var(--s-space-2)}.tag--variant-outline{border-color:var(--s-border-strong)}.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default)}.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-info{color:var(--s-text-info);background-color:var(--s-surface-info-subdued)}.tag--intent-info .tag__removal-button{color:var(--s-icon-info)}.tag--intent-info.tag--variant-outline{border-color:var(--s-border-info)}.tag--intent-info.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-surface-info-default)}.tag--intent-info.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-critical{color:var(--s-text-critical);background-color:var(--s-surface-critical-subdued)}.tag--intent-critical .tag__removal-button{color:var(--s-icon-critical)}.tag--intent-critical.tag--variant-outline{border-color:var(--s-border-critical)}.tag--intent-critical.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-surface-critical-default)}.tag--intent-critical.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-warning{color:var(--s-text-warning);background-color:var(--s-surface-warning-subdued)}.tag--intent-warning .tag__removal-button{color:var(--s-icon-warning)}.tag--intent-warning.tag--variant-outline{border-color:var(--s-border-warning)}.tag--intent-warning.tag--variant-strong{color:var(--s-text-dark);background-color:var(--s-surface-warning-default)}.tag--intent-warning.tag--variant-strong .tag__removal-button{color:var(--s-icon-dark)}.tag--intent-success{color:var(--s-text-success);background-color:var(--s-surface-success-subdued)}.tag--intent-success .tag__removal-button{color:var(--s-icon-success)}.tag--intent-success.tag--variant-outline{border-color:var(--s-border-success)}.tag--intent-success.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-surface-success-default)}.tag--intent-success.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-special{color:var(--s-decorative-grape-text);background-color:var(--s-decorative-grape-surface-subdued)}.tag--intent-special .tag__removal-button{color:var(--s-decorative-grape-text)}.tag--intent-special.tag--variant-outline{border-color:var(--s-decorative-grape-text)}.tag--intent-special.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-decorative-grape-surface)}.tag--intent-special.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-translucent{color:var(--s-text-on-image);background-color:var(--s-surface-on-image-default)}.tag--intent-translucent .tag__removal-button{color:var(--s-icon-on-image)}.tag--intent-translucent.tag--variant-outline{border-color:var(--s-text-on-image)}.tag__icon{display:inline-flex;margin-right:var(--s-space-4);margin-left:calc(-1 * var(--s-space-4));flex-shrink:0;order:0}.tag__label{overflow:hidden;min-width:0;white-space:nowrap;text-overflow:ellipsis;order:1}.tag__removal-button{display:inline-flex;margin-right:calc(-1 * var(--s-space-4));margin-left:var(--s-space-4);padding:0;border:none;color:var(--s-icon-strong);background-color:transparent;cursor:pointer;flex-shrink:0;order:3}.tag__removal-button:focus:not(:focus-visible){outline:none}.tag__removal-button:focus-visible{outline-color:var(--s-focus-default)}";export{s as swirl_tag}
1
+ import{r as t,c as a,h as r,H as o,d as e}from"./p-g4wOnHIT.js";import{c as n}from"./p-orsBiyT_.js";const s=class{constructor(r){t(this,r),this.removeTag=a(this,"remove",7),this.iconPosition="start",this.intent="default",this.size="m",this.removalButtonLabel="Remove",this.variant="default",this.onRemove=t=>{this.removeTag?.emit(t)}}componentDidLoad(){this.forceIconProps()}componentWillLoad(){this.forceVariant()}componentDidRender(){this.forceIconProps()}forceIconProps(){const t=this.iconEl?.children[0];t?.setAttribute("size","16")}forceVariant(){Boolean(this.bordered)&&(console.warn('[Swirl] The "bordered" prop of swirl-tag is deprecated and will be removed with the next major release. Please use the "variant" prop as "outline" to achieve the same result.'),this.variant="outline")}render(){const t=n("tag",`tag--icon-position-${this.iconPosition}`,`tag--intent-${this.intent}`,`tag--size-${this.size}`,`tag--variant-${this.variant}`,{"tag--hide-label":this.hideLabel});return r(o,{key:"a3ade00e730b9c5a0bf70ce18555894162efcdb9"},r("span",{key:"9adecf537f7923514ec8eca45badc8560a1448b8",class:t,part:"tag"},this.icon&&r("span",{key:"0adc214659f1680182981e70724fcbc1782f01d0",class:"tag__icon",innerHTML:this.icon,ref:t=>this.iconEl=t}),this.hideLabel?r("swirl-visually-hidden",null,this.label):r("span",{class:"tag__label"},this.label),this.removable&&r("button",{key:"e1981afdf9819c222ca92f08fdf57cdd7e4f3f26","aria-label":this.removalButtonLabel,class:"tag__removal-button",onClick:this.onRemove,tabIndex:"true"===this.el.ariaHidden?-1:void 0,type:"button"},r("swirl-icon-close",{key:"6b06d0db7dcd182742f5399cd20d2d7532b9ff0c",size:16}))))}get el(){return e(this)}};s.style=":host{display:inline-flex;max-width:100%}:host *{box-sizing:border-box}.tag{display:inline-flex;max-width:100%;align-items:center;border-radius:var(--s-border-radius-s);color:var(--s-text-default);background-color:var(--swirl-tag-background-default);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-sm);white-space:nowrap;border-style:solid;border-width:var(--s-border-width-default);border-color:transparent}.tag--size-s{padding:var(--s-space-0) var(--s-space-4)}.tag--size-m{padding:var(--s-space-2) var(--s-space-8)}.tag--icon-position-end .tag__icon{margin-right:calc(-1 * var(--s-space-4));margin-left:var(--s-space-4);order:2}.tag--hide-label{padding-right:0;padding-left:0}.tag--hide-label.tag--size-s .tag__icon{margin-right:0;margin-left:0}.tag--hide-label .tag__icon{margin-right:var(--s-space-2);margin-left:var(--s-space-2)}.tag--variant-outline{border-color:var(--s-border-strong)}.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default)}.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-info{color:var(--s-text-info);background-color:var(--s-surface-info-subdued)}.tag--intent-info .tag__removal-button{color:var(--s-icon-info)}.tag--intent-info.tag--variant-outline{border-color:var(--s-border-info)}.tag--intent-info.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-surface-info-default)}.tag--intent-info.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-critical{color:var(--s-text-critical);background-color:var(--s-surface-critical-subdued)}.tag--intent-critical .tag__removal-button{color:var(--s-icon-critical)}.tag--intent-critical.tag--variant-outline{border-color:var(--s-border-critical)}.tag--intent-critical.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-surface-critical-default)}.tag--intent-critical.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-warning{color:var(--s-text-warning);background-color:var(--s-surface-warning-subdued)}.tag--intent-warning .tag__removal-button{color:var(--s-icon-warning)}.tag--intent-warning.tag--variant-outline{border-color:var(--s-border-warning)}.tag--intent-warning.tag--variant-strong{color:var(--s-text-dark);background-color:var(--s-surface-warning-default)}.tag--intent-warning.tag--variant-strong .tag__removal-button{color:var(--s-icon-dark)}.tag--intent-success{color:var(--s-text-success);background-color:var(--s-surface-success-subdued)}.tag--intent-success .tag__removal-button{color:var(--s-icon-success)}.tag--intent-success.tag--variant-outline{border-color:var(--s-border-success)}.tag--intent-success.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-surface-success-default)}.tag--intent-success.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-special{color:var(--s-decorative-grape-text);background-color:var(--s-decorative-grape-surface-subdued)}.tag--intent-special .tag__removal-button{color:var(--s-decorative-grape-text)}.tag--intent-special.tag--variant-outline{border-color:var(--s-decorative-grape-text)}.tag--intent-special.tag--variant-strong{color:var(--s-text-on-status);background-color:var(--s-decorative-grape-surface)}.tag--intent-special.tag--variant-strong .tag__removal-button{color:var(--s-icon-on-status)}.tag--intent-translucent{color:var(--s-text-on-image);background-color:var(--s-surface-on-image-default)}.tag--intent-translucent .tag__removal-button{color:var(--s-icon-on-image)}.tag--intent-translucent.tag--variant-outline{border-color:var(--s-text-on-image)}.tag__icon{display:inline-flex;margin-right:var(--s-space-4);margin-left:calc(-1 * var(--s-space-4));flex-shrink:0;order:0}.tag__label{overflow:hidden;min-width:0;white-space:nowrap;text-overflow:ellipsis;order:1}.tag__removal-button{display:inline-flex;margin-right:calc(-1 * var(--s-space-4));margin-left:var(--s-space-4);padding:0;border:none;color:var(--s-icon-strong);background-color:transparent;cursor:pointer;flex-shrink:0;order:3}.tag__removal-button:focus:not(:focus-visible){outline:none}.tag__removal-button:focus-visible{outline-color:var(--s-focus-default)}";export{s as swirl_tag}
@@ -1 +1 @@
1
- import{r as i,h as e,F as t,c as a,H as s}from"./p-g4wOnHIT.js";import{c as r}from"./p-orsBiyT_.js";const o=class{constructor(e){i(this,e),this.size=24}render(){const i=20===this.size?24:this.size,a={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},s=r("swirl-icon",`swirl-icon--size-${this.size}`);return e("svg",{key:"773776af2623412c786af2aea15e24efb8e7049a","aria-hidden":"true",class:s,fill:"none",height:this.size,part:"icon",style:a,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&e(t,{key:"9ae79ab57a443fbe45466b17be23167e4a17682d"},e("path",{key:"b4e5dd667081e5958ba6c81c5458b370ef39b64d",d:"M7.15 12.8666L2.81667 8.53327C2.73889 8.45549 2.68333 8.37216 2.65 8.28327C2.61667 8.19438 2.6 8.09993 2.6 7.99993C2.6 7.89993 2.61667 7.80549 2.65 7.7166C2.68333 7.62771 2.73889 7.54438 2.81667 7.4666L7.15 3.13327C7.29444 2.99993 7.46955 2.93038 7.67533 2.9246C7.88066 2.91927 8.06111 2.98882 8.21666 3.13327C8.37222 3.27771 8.45289 3.45549 8.45867 3.6666C8.464 3.87771 8.38889 4.05549 8.23333 4.19993L5.2 7.23327H12.3167C12.5278 7.23327 12.7084 7.30838 12.8587 7.4586C13.0084 7.60838 13.0833 7.78882 13.0833 7.99993C13.0833 8.21105 13.0084 8.39149 12.8587 8.54127C12.7084 8.69149 12.5278 8.7666 12.3167 8.7666H5.2L8.23333 11.7999C8.37778 11.9333 8.45289 12.1084 8.45867 12.3253C8.464 12.5417 8.38889 12.7222 8.23333 12.8666C8.08889 13.011 7.91111 13.0833 7.7 13.0833C7.48889 13.0833 7.30555 13.011 7.15 12.8666V12.8666Z",fill:"currentColor"})),(20===this.size||24===this.size)&&e(t,{key:"bbc97558aee7922fdcdfe3dfd8a5c67df404b333"},e("path",{key:"99ccad21eb1ae1dd8817c14324f1eb28e8dff0f7",d:"M10.725 19.2999L4.225 12.7999C4.10833 12.6832 4.025 12.5582 3.975 12.4249C3.925 12.2916 3.9 12.1499 3.9 11.9999C3.9 11.8499 3.925 11.7082 3.975 11.5749C4.025 11.4416 4.10833 11.3166 4.225 11.1999L10.725 4.6999C10.9417 4.4999 11.2043 4.39557 11.513 4.3869C11.821 4.3789 12.0917 4.48323 12.325 4.6999C12.5583 4.91657 12.6793 5.18324 12.688 5.4999C12.696 5.81657 12.5833 6.08324 12.35 6.2999L7.8 10.8499H18.475C18.7917 10.8499 19.0627 10.9626 19.288 11.1879C19.5127 11.4126 19.625 11.6832 19.625 11.9999C19.625 12.3166 19.5127 12.5872 19.288 12.8119C19.0627 13.0372 18.7917 13.1499 18.475 13.1499H7.8L12.35 17.6999C12.5667 17.8999 12.6793 18.1626 12.688 18.4879C12.696 18.8126 12.5833 19.0832 12.35 19.2999C12.1333 19.5166 11.8667 19.6249 11.55 19.6249C11.2333 19.6249 10.9583 19.5166 10.725 19.2999V19.2999Z",fill:"currentColor"})),28===this.size&&e(t,{key:"594a7770c1a41eb775883b564c0f9f2996f977b1"},e("path",{key:"a49d544ee1fb9732ed2450a77808625b2ecfeea5",d:"M12.5125 22.5167L4.92917 14.9333C4.79306 14.7972 4.69584 14.6514 4.6375 14.4958C4.57917 14.3403 4.55 14.175 4.55 14C4.55 13.825 4.57917 13.6597 4.6375 13.5042C4.69584 13.3486 4.79306 13.2028 4.92917 13.0667L12.5125 5.48334C12.7653 5.25001 13.0717 5.12829 13.4318 5.11817C13.7912 5.10884 14.1069 5.23056 14.3792 5.48334C14.6514 5.73612 14.7926 6.04723 14.8027 6.41667C14.812 6.78612 14.6806 7.09723 14.4083 7.35001L9.1 12.6583H21.5542C21.9236 12.6583 22.2398 12.7898 22.5027 13.0527C22.7648 13.3148 22.8958 13.6306 22.8958 14C22.8958 14.3695 22.7648 14.6852 22.5027 14.9473C22.2398 15.2102 21.9236 15.3417 21.5542 15.3417H9.1L14.4083 20.65C14.6611 20.8833 14.7926 21.1898 14.8027 21.5693C14.812 21.9481 14.6806 22.2639 14.4083 22.5167C14.1556 22.7695 13.8444 22.8958 13.475 22.8958C13.1056 22.8958 12.7847 22.7695 12.5125 22.5167V22.5167Z",fill:"currentColor"})))}};o.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const l=class{constructor(e){i(this,e),this.size=24}render(){const i=20===this.size?24:this.size,a={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},s=r("swirl-icon",`swirl-icon--size-${this.size}`);return e("svg",{key:"d0a2fba70e4291e6e604ff36699b88c399cae429","aria-hidden":"true",class:s,fill:"none",height:this.size,part:"icon",style:a,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&e(t,{key:"2c8ec7cab66dd5053ff107aa1ec2cc84e8757f45"},e("path",{key:"94fff245f914c76b4f50eda010866dca899eef25",d:"M7.46667 12.8667C7.32222 12.7222 7.24733 12.5445 7.242 12.3333C7.23622 12.1222 7.30555 11.9445 7.45 11.8L10.4833 8.76668H3.36667C3.15555 8.76668 2.97511 8.69157 2.82533 8.54135C2.67511 8.39157 2.6 8.21113 2.6 8.00002C2.6 7.7889 2.67511 7.60846 2.82533 7.45868C2.97511 7.30846 3.15555 7.23335 3.36667 7.23335H10.4833L7.45 4.20002C7.30555 4.05557 7.23622 3.87779 7.242 3.66668C7.24733 3.45557 7.32222 3.27779 7.46667 3.13335C7.61111 3.00002 7.78889 2.93335 8 2.93335C8.21111 2.93335 8.38889 3.00002 8.53333 3.13335L12.8667 7.46668C12.9444 7.53335 13 7.61379 13.0333 7.70802C13.0667 7.80268 13.0833 7.90002 13.0833 8.00002C13.0833 8.10002 13.0667 8.19446 13.0333 8.28335C13 8.37224 12.9444 8.45557 12.8667 8.53335L8.53333 12.8667C8.38889 13.0111 8.21111 13.0807 8 13.0753C7.78889 13.0696 7.61111 13 7.46667 12.8667V12.8667Z",fill:"currentColor"})),(20===this.size||24===this.size)&&e(t,{key:"b30cbe01cebfef7c961fad26bb29e4cf7bf56f0e"},e("path",{key:"d86917bfa8511433b5327b4e58875f435ab22a54",d:"M11.2 19.2999C10.9833 19.0832 10.871 18.8166 10.863 18.4999C10.8543 18.1832 10.9583 17.9166 11.175 17.6999L15.725 13.1499H5.05C4.73333 13.1499 4.46267 13.0372 4.238 12.8119C4.01267 12.5872 3.9 12.3166 3.9 11.9999C3.9 11.6832 4.01267 11.4126 4.238 11.1879C4.46267 10.9626 4.73333 10.8499 5.05 10.8499H15.725L11.175 6.2999C10.9583 6.08324 10.8543 5.81657 10.863 5.4999C10.871 5.18324 10.9833 4.91657 11.2 4.6999C11.4167 4.4999 11.6833 4.3999 12 4.3999C12.3167 4.3999 12.5833 4.4999 12.8 4.6999L19.3 11.1999C19.4167 11.2999 19.5 11.4206 19.55 11.5619C19.6 11.7039 19.625 11.8499 19.625 11.9999C19.625 12.1499 19.6 12.2916 19.55 12.4249C19.5 12.5582 19.4167 12.6832 19.3 12.7999L12.8 19.2999C12.5833 19.5166 12.3167 19.6209 12 19.6129C11.6833 19.6042 11.4167 19.4999 11.2 19.2999V19.2999Z",fill:"currentColor"})),28===this.size&&e(t,{key:"e0a01bcd99e8ee8afc70153d6fcf329af0b65481"},e("path",{key:"2cc3b72ec18b4501ce59774dc9329322d33c9de3",d:"M13.0667 22.5166C12.8139 22.2639 12.6828 21.9527 12.6735 21.5833C12.6634 21.2139 12.7847 20.9027 13.0375 20.65L18.3458 15.3416H5.89167C5.52223 15.3416 5.20645 15.2102 4.94434 14.9473C4.68145 14.6852 4.55 14.3694 4.55 14C4.55 13.6305 4.68145 13.3147 4.94434 13.0526C5.20645 12.7897 5.52223 12.6583 5.89167 12.6583H18.3458L13.0375 7.34997C12.7847 7.09719 12.6634 6.78608 12.6735 6.41663C12.6828 6.04719 12.8139 5.73608 13.0667 5.4833C13.3194 5.24997 13.6306 5.1333 14 5.1333C14.3694 5.1333 14.6806 5.24997 14.9333 5.4833L22.5167 13.0666C22.6528 13.1833 22.75 13.3241 22.8083 13.489C22.8667 13.6546 22.8958 13.825 22.8958 14C22.8958 14.175 22.8667 14.3402 22.8083 14.4958C22.75 14.6514 22.6528 14.7972 22.5167 14.9333L14.9333 22.5166C14.6806 22.7694 14.3694 22.8911 14 22.8818C13.6306 22.8717 13.3194 22.75 13.0667 22.5166V22.5166Z",fill:"currentColor"})))}};l.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const h=class{constructor(e){i(this,e),this.size=24}render(){const i=20===this.size?24:this.size,a={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},s=r("swirl-icon",`swirl-icon--size-${this.size}`);return e("svg",{key:"4691e8aca051a04be34610276def9a62ce11d56e","aria-hidden":"true",class:s,fill:"none",height:this.size,part:"icon",style:a,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&e(t,{key:"50f27710ca8d3522fefbc19337656145d5996461"},e("path",{key:"b5a05fe9d505347c55f49af75d233191d8e9345e",d:"M8.00001 13.5167C7.62223 13.5167 7.29445 13.3807 7.01667 13.1087C6.73889 12.8362 6.60001 12.5056 6.60001 12.1167C6.60001 11.7389 6.73889 11.4138 7.01667 11.1413C7.29445 10.8693 7.62223 10.7333 8.00001 10.7333C8.3889 10.7333 8.71956 10.8693 8.99201 11.1413C9.26401 11.4138 9.40001 11.7389 9.40001 12.1167C9.40001 12.5056 9.26401 12.8362 8.99201 13.1087C8.71956 13.3807 8.3889 13.5167 8.00001 13.5167ZM8.00001 9.4C7.62223 9.4 7.29445 9.26112 7.01667 8.98334C6.73889 8.70556 6.60001 8.37778 6.60001 8C6.60001 7.61112 6.73889 7.28045 7.01667 7.008C7.29445 6.736 7.62223 6.6 8.00001 6.6C8.3889 6.6 8.71956 6.736 8.99201 7.008C9.26401 7.28045 9.40001 7.61112 9.40001 8C9.40001 8.37778 9.26401 8.70556 8.99201 8.98334C8.71956 9.26112 8.3889 9.4 8.00001 9.4V9.4ZM8.00001 5.26667C7.62223 5.26667 7.29445 5.13045 7.01667 4.858C6.73889 4.586 6.60001 4.26112 6.60001 3.88334C6.60001 3.49445 6.73889 3.16378 7.01667 2.89134C7.29445 2.61934 7.62223 2.48334 8.00001 2.48334C8.3889 2.48334 8.71956 2.61934 8.99201 2.89134C9.26401 3.16378 9.40001 3.49445 9.40001 3.88334C9.40001 4.26112 9.26401 4.586 8.99201 4.858C8.71956 5.13045 8.3889 5.26667 8.00001 5.26667V5.26667Z",fill:"currentColor"})),(20===this.size||24===this.size)&&e(t,{key:"8562c4670bdccce301b480b75af563fe6f9ad0e1"},e("path",{key:"195394e306531ce3cdf4f755ca7437925a1f8ddc",d:"M12 20.275C11.4333 20.275 10.9417 20.071 10.525 19.663C10.1083 19.2543 9.89999 18.7583 9.89999 18.175C9.89999 17.6083 10.1083 17.1206 10.525 16.712C10.9417 16.304 11.4333 16.1 12 16.1C12.5833 16.1 13.0793 16.304 13.488 16.712C13.896 17.1206 14.1 17.6083 14.1 18.175C14.1 18.7583 13.896 19.2543 13.488 19.663C13.0793 20.071 12.5833 20.275 12 20.275ZM12 14.1C11.4333 14.1 10.9417 13.8916 10.525 13.475C10.1083 13.0583 9.89999 12.5666 9.89999 12C9.89999 11.4166 10.1083 10.9206 10.525 10.512C10.9417 10.104 11.4333 9.89998 12 9.89998C12.5833 9.89998 13.0793 10.104 13.488 10.512C13.896 10.9206 14.1 11.4166 14.1 12C14.1 12.5666 13.896 13.0583 13.488 13.475C13.0793 13.8916 12.5833 14.1 12 14.1ZM12 7.89998C11.4333 7.89998 10.9417 7.69564 10.525 7.28698C10.1083 6.87898 9.89999 6.39164 9.89999 5.82498C9.89999 5.24164 10.1083 4.74564 10.525 4.33698C10.9417 3.92898 11.4333 3.72498 12 3.72498C12.5833 3.72498 13.0793 3.92898 13.488 4.33698C13.896 4.74564 14.1 5.24164 14.1 5.82498C14.1 6.39164 13.896 6.87898 13.488 7.28698C13.0793 7.69564 12.5833 7.89998 12 7.89998Z",fill:"currentColor"})),28===this.size&&e(t,{key:"c25178aff445b9fed850c5162f442c506a8bd456"},e("path",{key:"252a47e9f8fa687e0c3b802fa9353721f3acea76",d:"M14 23.6542C13.3389 23.6542 12.7653 23.4162 12.2792 22.9402C11.793 22.4634 11.55 21.8847 11.55 21.2042C11.55 20.543 11.793 19.9741 12.2792 19.4973C12.7653 19.0213 13.3389 18.7833 14 18.7833C14.6805 18.7833 15.2592 19.0213 15.736 19.4973C16.212 19.9741 16.45 20.543 16.45 21.2042C16.45 21.8847 16.212 22.4634 15.736 22.9402C15.2592 23.4162 14.6805 23.6542 14 23.6542ZM14 16.45C13.3389 16.45 12.7653 16.2069 12.2792 15.7208C11.793 15.2347 11.55 14.6611 11.55 14C11.55 13.3194 11.793 12.7408 12.2792 12.264C12.7653 11.788 13.3389 11.55 14 11.55C14.6805 11.55 15.2592 11.788 15.736 12.264C16.212 12.7408 16.45 13.3194 16.45 14C16.45 14.6611 16.212 15.2347 15.736 15.7208C15.2592 16.2069 14.6805 16.45 14 16.45V16.45ZM14 9.21666C13.3389 9.21666 12.7653 8.97827 12.2792 8.50149C11.793 8.02549 11.55 7.45694 11.55 6.79583C11.55 6.11527 11.793 5.5366 12.2792 5.05983C12.7653 4.58383 13.3389 4.34583 14 4.34583C14.6805 4.34583 15.2592 4.58383 15.736 5.05983C16.212 5.5366 16.45 6.11527 16.45 6.79583C16.45 7.45694 16.212 8.02549 15.736 8.50149C15.2592 8.97827 14.6805 9.21666 14 9.21666V9.21666Z",fill:"currentColor"})))}};h.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const n=class{constructor(e){i(this,e),this.edit=a(this,"edit",7),this.remove=a(this,"remove",7),this.thumbnailClick=a(this,"thumbnailClick",7),this.editButtonIcon="<swirl-icon-crop></swirl-icon-crop>",this.editButtonLabel="Edit",this.format="landscape",this.progressLabel="Loading progress",this.removeButtonLabel="Remove",this.size="m"}render(){const i=("xl"===this.size||"2xl"===this.size)&&"square"===this.format,t=this.showRemoveButton&&i,a=this.showEditButton&&i&&!("xl"===this.size&&t),o=a||t,l=Boolean(this.timestamp)&&i,h=this.interactive?"button":"span",n=r("thumbnail",`thumbnail--format-${this.format}`,`thumbnail--size-${this.size}`,{"thumbnail--interactive":this.interactive,"thumbnail--has-progress":void 0!==this.progress});return e(s,{key:"b163c406924eb786fdf7df91bf95e698684cacb2"},e("span",{key:"51be2f399ab16a35a38dbe88a526d34f9a93d930",class:n,role:"group"},e(h,{key:"cc315b5cab5bf4f582e5a8de1362505c9fda7e11",class:"thumbnail__image-wrapper",onClick:this.thumbnailClick.emit,type:this.interactive?"button":void 0},e("img",{key:"954d3f7a428e48d74d032c70caeadcde9e919877",alt:this.alt,class:"thumbnail__image",loading:"lazy",src:this.src})),void 0!==this.progress&&e("span",{key:"3de6fa2511300dd7e85eb03de9e040286be7eb8a",class:"thumbnail__progress-indicator"},e("swirl-progress-indicator",{key:"2f360551e24ef67337b267dc05c9637c9f3f6ae4",label:this.progressLabel,value:this.progress})),o&&e("swirl-button-group",{key:"da5dc58dc2efed85f5fda9c8242bd0d7dd12d920",class:"thumbnail__buttons",segmented:a&&t},a&&e("span",{key:"6376028fe00406fdb759b4f6ee7c940489e9cf39"},e("swirl-button",{key:"c2d515dd83f22099d9a508dbef1851f0b59ac3c4",hideLabel:!0,icon:this.editButtonIcon,label:this.editButtonLabel,onClick:this.edit.emit,pill:"xl"===this.size,variant:"on-image"})),t&&e("span",{key:"4a0085069c63f86b2975ad8181bc4022bf8231a1"},e("swirl-button",{key:"b3a9820e11e04d848de1ab3709d3eac797578039",hideLabel:!0,icon:"<swirl-icon-delete></swirl-icon-delete>",label:this.removeButtonLabel,onClick:this.remove.emit,pill:"xl"===this.size,variant:"on-image"}))),l&&e("span",{key:"ec1a5801b9d9b3395582e088d8efeb274f57eb3a",class:"thumbnail__timestamp"},this.timestamp)))}};n.style=':host{display:inline-flex}:host *{box-sizing:border-box}.thumbnail{position:relative;display:inline-flex;overflow:hidden;padding:0.0625rem;border-radius:var(--s-border-radius-s)}.thumbnail--size-s{--swirl-thumbnail-size:2.5rem}.thumbnail--size-m{--swirl-thumbnail-size:3rem}.thumbnail--size-l{--swirl-thumbnail-size:4rem}.thumbnail--size-xl{--swirl-thumbnail-size:5rem;border-radius:var(--s-border-radius-sm)}.thumbnail--size-xl .thumbnail__buttons{transform:scale(0.75)}.thumbnail--size-2xl{--swirl-thumbnail-size:7.5rem;border-radius:var(--s-border-radius-sm)}.thumbnail--format-landscape{width:var(--swirl-thumbnail-size);aspect-ratio:4 / 3}.thumbnail--format-portrait{height:var(--swirl-thumbnail-size);aspect-ratio:3 / 4}.thumbnail--format-square{width:var(--swirl-thumbnail-size);height:var(--swirl-thumbnail-size)}.thumbnail--has-progress .thumbnail__timestamp{bottom:var(--s-space-8)}.thumbnail--interactive .thumbnail__image-wrapper{position:relative;padding:0;border:none;background-color:transparent;cursor:pointer}.thumbnail--interactive .thumbnail__image-wrapper:hover:after{position:absolute;background-color:rgba(0, 0, 0, 0.15);content:"";inset:0}.thumbnail--interactive .thumbnail__image-wrapper:active:after{position:absolute;background-color:rgba(0, 0, 0, 0.3);content:"";inset:0}.thumbnail__image-wrapper{overflow:hidden;width:100%;height:100%;border-radius:var(--s-border-radius-s);box-shadow:inset 0 0 0 0.03125rem rgba(0, 0, 0, 0.1)}.thumbnail__image{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__progress-indicator{position:absolute;z-index:1;right:0;bottom:0;left:0}.thumbnail__buttons{position:absolute;opacity:0;z-index:1;top:var(--s-space-4);right:var(--s-space-4)}.thumbnail:hover .thumbnail__buttons{opacity:1}.thumbnail__timestamp{position:absolute;z-index:1;bottom:var(--s-space-4);left:var(--s-space-4);display:block;overflow:hidden;max-width:calc(100% - 2 * var(--s-space-4));height:1.5rem;padding-right:var(--s-space-8);padding-left:var(--s-space-8);align-items:center;border-radius:var(--s-border-radius-s);color:var(--s-text-on-image);background-color:rgba(0, 0, 0, 0.6);font-size:var(--s-font-size-sm);line-height:1.5rem;white-space:nowrap;text-overflow:ellipsis}';export{o as swirl_icon_arrow_left,l as swirl_icon_arrow_right,h as swirl_icon_more_vertikal,n as swirl_thumbnail}
1
+ import{r as i,h as e,F as t,c as a,H as s}from"./p-g4wOnHIT.js";import{c as r}from"./p-orsBiyT_.js";const o=class{constructor(e){i(this,e),this.size=24}render(){const i=20===this.size?24:this.size,a={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},s=r("swirl-icon",`swirl-icon--size-${this.size}`);return e("svg",{key:"773776af2623412c786af2aea15e24efb8e7049a","aria-hidden":"true",class:s,fill:"none",height:this.size,part:"icon",style:a,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&e(t,{key:"9ae79ab57a443fbe45466b17be23167e4a17682d"},e("path",{key:"b4e5dd667081e5958ba6c81c5458b370ef39b64d",d:"M7.15 12.8666L2.81667 8.53327C2.73889 8.45549 2.68333 8.37216 2.65 8.28327C2.61667 8.19438 2.6 8.09993 2.6 7.99993C2.6 7.89993 2.61667 7.80549 2.65 7.7166C2.68333 7.62771 2.73889 7.54438 2.81667 7.4666L7.15 3.13327C7.29444 2.99993 7.46955 2.93038 7.67533 2.9246C7.88066 2.91927 8.06111 2.98882 8.21666 3.13327C8.37222 3.27771 8.45289 3.45549 8.45867 3.6666C8.464 3.87771 8.38889 4.05549 8.23333 4.19993L5.2 7.23327H12.3167C12.5278 7.23327 12.7084 7.30838 12.8587 7.4586C13.0084 7.60838 13.0833 7.78882 13.0833 7.99993C13.0833 8.21105 13.0084 8.39149 12.8587 8.54127C12.7084 8.69149 12.5278 8.7666 12.3167 8.7666H5.2L8.23333 11.7999C8.37778 11.9333 8.45289 12.1084 8.45867 12.3253C8.464 12.5417 8.38889 12.7222 8.23333 12.8666C8.08889 13.011 7.91111 13.0833 7.7 13.0833C7.48889 13.0833 7.30555 13.011 7.15 12.8666V12.8666Z",fill:"currentColor"})),(20===this.size||24===this.size)&&e(t,{key:"bbc97558aee7922fdcdfe3dfd8a5c67df404b333"},e("path",{key:"99ccad21eb1ae1dd8817c14324f1eb28e8dff0f7",d:"M10.725 19.2999L4.225 12.7999C4.10833 12.6832 4.025 12.5582 3.975 12.4249C3.925 12.2916 3.9 12.1499 3.9 11.9999C3.9 11.8499 3.925 11.7082 3.975 11.5749C4.025 11.4416 4.10833 11.3166 4.225 11.1999L10.725 4.6999C10.9417 4.4999 11.2043 4.39557 11.513 4.3869C11.821 4.3789 12.0917 4.48323 12.325 4.6999C12.5583 4.91657 12.6793 5.18324 12.688 5.4999C12.696 5.81657 12.5833 6.08324 12.35 6.2999L7.8 10.8499H18.475C18.7917 10.8499 19.0627 10.9626 19.288 11.1879C19.5127 11.4126 19.625 11.6832 19.625 11.9999C19.625 12.3166 19.5127 12.5872 19.288 12.8119C19.0627 13.0372 18.7917 13.1499 18.475 13.1499H7.8L12.35 17.6999C12.5667 17.8999 12.6793 18.1626 12.688 18.4879C12.696 18.8126 12.5833 19.0832 12.35 19.2999C12.1333 19.5166 11.8667 19.6249 11.55 19.6249C11.2333 19.6249 10.9583 19.5166 10.725 19.2999V19.2999Z",fill:"currentColor"})),28===this.size&&e(t,{key:"594a7770c1a41eb775883b564c0f9f2996f977b1"},e("path",{key:"a49d544ee1fb9732ed2450a77808625b2ecfeea5",d:"M12.5125 22.5167L4.92917 14.9333C4.79306 14.7972 4.69584 14.6514 4.6375 14.4958C4.57917 14.3403 4.55 14.175 4.55 14C4.55 13.825 4.57917 13.6597 4.6375 13.5042C4.69584 13.3486 4.79306 13.2028 4.92917 13.0667L12.5125 5.48334C12.7653 5.25001 13.0717 5.12829 13.4318 5.11817C13.7912 5.10884 14.1069 5.23056 14.3792 5.48334C14.6514 5.73612 14.7926 6.04723 14.8027 6.41667C14.812 6.78612 14.6806 7.09723 14.4083 7.35001L9.1 12.6583H21.5542C21.9236 12.6583 22.2398 12.7898 22.5027 13.0527C22.7648 13.3148 22.8958 13.6306 22.8958 14C22.8958 14.3695 22.7648 14.6852 22.5027 14.9473C22.2398 15.2102 21.9236 15.3417 21.5542 15.3417H9.1L14.4083 20.65C14.6611 20.8833 14.7926 21.1898 14.8027 21.5693C14.812 21.9481 14.6806 22.2639 14.4083 22.5167C14.1556 22.7695 13.8444 22.8958 13.475 22.8958C13.1056 22.8958 12.7847 22.7695 12.5125 22.5167V22.5167Z",fill:"currentColor"})))}};o.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const l=class{constructor(e){i(this,e),this.size=24}render(){const i=20===this.size?24:this.size,a={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},s=r("swirl-icon",`swirl-icon--size-${this.size}`);return e("svg",{key:"d0a2fba70e4291e6e604ff36699b88c399cae429","aria-hidden":"true",class:s,fill:"none",height:this.size,part:"icon",style:a,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&e(t,{key:"2c8ec7cab66dd5053ff107aa1ec2cc84e8757f45"},e("path",{key:"94fff245f914c76b4f50eda010866dca899eef25",d:"M7.46667 12.8667C7.32222 12.7222 7.24733 12.5445 7.242 12.3333C7.23622 12.1222 7.30555 11.9445 7.45 11.8L10.4833 8.76668H3.36667C3.15555 8.76668 2.97511 8.69157 2.82533 8.54135C2.67511 8.39157 2.6 8.21113 2.6 8.00002C2.6 7.7889 2.67511 7.60846 2.82533 7.45868C2.97511 7.30846 3.15555 7.23335 3.36667 7.23335H10.4833L7.45 4.20002C7.30555 4.05557 7.23622 3.87779 7.242 3.66668C7.24733 3.45557 7.32222 3.27779 7.46667 3.13335C7.61111 3.00002 7.78889 2.93335 8 2.93335C8.21111 2.93335 8.38889 3.00002 8.53333 3.13335L12.8667 7.46668C12.9444 7.53335 13 7.61379 13.0333 7.70802C13.0667 7.80268 13.0833 7.90002 13.0833 8.00002C13.0833 8.10002 13.0667 8.19446 13.0333 8.28335C13 8.37224 12.9444 8.45557 12.8667 8.53335L8.53333 12.8667C8.38889 13.0111 8.21111 13.0807 8 13.0753C7.78889 13.0696 7.61111 13 7.46667 12.8667V12.8667Z",fill:"currentColor"})),(20===this.size||24===this.size)&&e(t,{key:"b30cbe01cebfef7c961fad26bb29e4cf7bf56f0e"},e("path",{key:"d86917bfa8511433b5327b4e58875f435ab22a54",d:"M11.2 19.2999C10.9833 19.0832 10.871 18.8166 10.863 18.4999C10.8543 18.1832 10.9583 17.9166 11.175 17.6999L15.725 13.1499H5.05C4.73333 13.1499 4.46267 13.0372 4.238 12.8119C4.01267 12.5872 3.9 12.3166 3.9 11.9999C3.9 11.6832 4.01267 11.4126 4.238 11.1879C4.46267 10.9626 4.73333 10.8499 5.05 10.8499H15.725L11.175 6.2999C10.9583 6.08324 10.8543 5.81657 10.863 5.4999C10.871 5.18324 10.9833 4.91657 11.2 4.6999C11.4167 4.4999 11.6833 4.3999 12 4.3999C12.3167 4.3999 12.5833 4.4999 12.8 4.6999L19.3 11.1999C19.4167 11.2999 19.5 11.4206 19.55 11.5619C19.6 11.7039 19.625 11.8499 19.625 11.9999C19.625 12.1499 19.6 12.2916 19.55 12.4249C19.5 12.5582 19.4167 12.6832 19.3 12.7999L12.8 19.2999C12.5833 19.5166 12.3167 19.6209 12 19.6129C11.6833 19.6042 11.4167 19.4999 11.2 19.2999V19.2999Z",fill:"currentColor"})),28===this.size&&e(t,{key:"e0a01bcd99e8ee8afc70153d6fcf329af0b65481"},e("path",{key:"2cc3b72ec18b4501ce59774dc9329322d33c9de3",d:"M13.0667 22.5166C12.8139 22.2639 12.6828 21.9527 12.6735 21.5833C12.6634 21.2139 12.7847 20.9027 13.0375 20.65L18.3458 15.3416H5.89167C5.52223 15.3416 5.20645 15.2102 4.94434 14.9473C4.68145 14.6852 4.55 14.3694 4.55 14C4.55 13.6305 4.68145 13.3147 4.94434 13.0526C5.20645 12.7897 5.52223 12.6583 5.89167 12.6583H18.3458L13.0375 7.34997C12.7847 7.09719 12.6634 6.78608 12.6735 6.41663C12.6828 6.04719 12.8139 5.73608 13.0667 5.4833C13.3194 5.24997 13.6306 5.1333 14 5.1333C14.3694 5.1333 14.6806 5.24997 14.9333 5.4833L22.5167 13.0666C22.6528 13.1833 22.75 13.3241 22.8083 13.489C22.8667 13.6546 22.8958 13.825 22.8958 14C22.8958 14.175 22.8667 14.3402 22.8083 14.4958C22.75 14.6514 22.6528 14.7972 22.5167 14.9333L14.9333 22.5166C14.6806 22.7694 14.3694 22.8911 14 22.8818C13.6306 22.8717 13.3194 22.75 13.0667 22.5166V22.5166Z",fill:"currentColor"})))}};l.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const h=class{constructor(e){i(this,e),this.size=24}render(){const i=20===this.size?24:this.size,a={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},s=r("swirl-icon",`swirl-icon--size-${this.size}`);return e("svg",{key:"4691e8aca051a04be34610276def9a62ce11d56e","aria-hidden":"true",class:s,fill:"none",height:this.size,part:"icon",style:a,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&e(t,{key:"50f27710ca8d3522fefbc19337656145d5996461"},e("path",{key:"b5a05fe9d505347c55f49af75d233191d8e9345e",d:"M8.00001 13.5167C7.62223 13.5167 7.29445 13.3807 7.01667 13.1087C6.73889 12.8362 6.60001 12.5056 6.60001 12.1167C6.60001 11.7389 6.73889 11.4138 7.01667 11.1413C7.29445 10.8693 7.62223 10.7333 8.00001 10.7333C8.3889 10.7333 8.71956 10.8693 8.99201 11.1413C9.26401 11.4138 9.40001 11.7389 9.40001 12.1167C9.40001 12.5056 9.26401 12.8362 8.99201 13.1087C8.71956 13.3807 8.3889 13.5167 8.00001 13.5167ZM8.00001 9.4C7.62223 9.4 7.29445 9.26112 7.01667 8.98334C6.73889 8.70556 6.60001 8.37778 6.60001 8C6.60001 7.61112 6.73889 7.28045 7.01667 7.008C7.29445 6.736 7.62223 6.6 8.00001 6.6C8.3889 6.6 8.71956 6.736 8.99201 7.008C9.26401 7.28045 9.40001 7.61112 9.40001 8C9.40001 8.37778 9.26401 8.70556 8.99201 8.98334C8.71956 9.26112 8.3889 9.4 8.00001 9.4V9.4ZM8.00001 5.26667C7.62223 5.26667 7.29445 5.13045 7.01667 4.858C6.73889 4.586 6.60001 4.26112 6.60001 3.88334C6.60001 3.49445 6.73889 3.16378 7.01667 2.89134C7.29445 2.61934 7.62223 2.48334 8.00001 2.48334C8.3889 2.48334 8.71956 2.61934 8.99201 2.89134C9.26401 3.16378 9.40001 3.49445 9.40001 3.88334C9.40001 4.26112 9.26401 4.586 8.99201 4.858C8.71956 5.13045 8.3889 5.26667 8.00001 5.26667V5.26667Z",fill:"currentColor"})),(20===this.size||24===this.size)&&e(t,{key:"8562c4670bdccce301b480b75af563fe6f9ad0e1"},e("path",{key:"195394e306531ce3cdf4f755ca7437925a1f8ddc",d:"M12 20.275C11.4333 20.275 10.9417 20.071 10.525 19.663C10.1083 19.2543 9.89999 18.7583 9.89999 18.175C9.89999 17.6083 10.1083 17.1206 10.525 16.712C10.9417 16.304 11.4333 16.1 12 16.1C12.5833 16.1 13.0793 16.304 13.488 16.712C13.896 17.1206 14.1 17.6083 14.1 18.175C14.1 18.7583 13.896 19.2543 13.488 19.663C13.0793 20.071 12.5833 20.275 12 20.275ZM12 14.1C11.4333 14.1 10.9417 13.8916 10.525 13.475C10.1083 13.0583 9.89999 12.5666 9.89999 12C9.89999 11.4166 10.1083 10.9206 10.525 10.512C10.9417 10.104 11.4333 9.89998 12 9.89998C12.5833 9.89998 13.0793 10.104 13.488 10.512C13.896 10.9206 14.1 11.4166 14.1 12C14.1 12.5666 13.896 13.0583 13.488 13.475C13.0793 13.8916 12.5833 14.1 12 14.1ZM12 7.89998C11.4333 7.89998 10.9417 7.69564 10.525 7.28698C10.1083 6.87898 9.89999 6.39164 9.89999 5.82498C9.89999 5.24164 10.1083 4.74564 10.525 4.33698C10.9417 3.92898 11.4333 3.72498 12 3.72498C12.5833 3.72498 13.0793 3.92898 13.488 4.33698C13.896 4.74564 14.1 5.24164 14.1 5.82498C14.1 6.39164 13.896 6.87898 13.488 7.28698C13.0793 7.69564 12.5833 7.89998 12 7.89998Z",fill:"currentColor"})),28===this.size&&e(t,{key:"c25178aff445b9fed850c5162f442c506a8bd456"},e("path",{key:"252a47e9f8fa687e0c3b802fa9353721f3acea76",d:"M14 23.6542C13.3389 23.6542 12.7653 23.4162 12.2792 22.9402C11.793 22.4634 11.55 21.8847 11.55 21.2042C11.55 20.543 11.793 19.9741 12.2792 19.4973C12.7653 19.0213 13.3389 18.7833 14 18.7833C14.6805 18.7833 15.2592 19.0213 15.736 19.4973C16.212 19.9741 16.45 20.543 16.45 21.2042C16.45 21.8847 16.212 22.4634 15.736 22.9402C15.2592 23.4162 14.6805 23.6542 14 23.6542ZM14 16.45C13.3389 16.45 12.7653 16.2069 12.2792 15.7208C11.793 15.2347 11.55 14.6611 11.55 14C11.55 13.3194 11.793 12.7408 12.2792 12.264C12.7653 11.788 13.3389 11.55 14 11.55C14.6805 11.55 15.2592 11.788 15.736 12.264C16.212 12.7408 16.45 13.3194 16.45 14C16.45 14.6611 16.212 15.2347 15.736 15.7208C15.2592 16.2069 14.6805 16.45 14 16.45V16.45ZM14 9.21666C13.3389 9.21666 12.7653 8.97827 12.2792 8.50149C11.793 8.02549 11.55 7.45694 11.55 6.79583C11.55 6.11527 11.793 5.5366 12.2792 5.05983C12.7653 4.58383 13.3389 4.34583 14 4.34583C14.6805 4.34583 15.2592 4.58383 15.736 5.05983C16.212 5.5366 16.45 6.11527 16.45 6.79583C16.45 7.45694 16.212 8.02549 15.736 8.50149C15.2592 8.97827 14.6805 9.21666 14 9.21666V9.21666Z",fill:"currentColor"})))}};h.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const n=class{constructor(e){i(this,e),this.edit=a(this,"edit",7),this.remove=a(this,"remove",7),this.thumbnailClick=a(this,"thumbnailClick",7),this.editButtonIcon="<swirl-icon-crop></swirl-icon-crop>",this.editButtonLabel="Edit",this.format="landscape",this.progressLabel="Loading progress",this.removeButtonLabel="Remove",this.size="m"}render(){const i=("xl"===this.size||"2xl"===this.size)&&"square"===this.format,t=this.showRemoveButton&&i,a=this.showEditButton&&i&&!("xl"===this.size&&t),o=a||t,l=Boolean(this.timestamp)&&i,h=this.interactive?"button":"span",n=r("thumbnail",`thumbnail--format-${this.format}`,`thumbnail--size-${this.size}`,{"thumbnail--interactive":this.interactive,"thumbnail--has-progress":void 0!==this.progress});return e(s,{key:"3545b248fde36b1d127a0630cec3cecd45084d81"},e("span",{key:"a658cb627ad7f6e66e4d96d28431eb86e46a04d7",class:n,role:"group"},e(h,{key:"006319ae923bb315143d18ae485f21d6b82dcb82",class:"thumbnail__image-wrapper",onClick:this.thumbnailClick.emit,type:this.interactive?"button":void 0},e("img",{key:"b10d7bb5ac401faedaebb13ff63efed486f6577c",alt:this.alt,class:"thumbnail__image",loading:"lazy",src:this.src})),void 0!==this.progress&&e("span",{key:"0136b7032f9b20f1ab7239ec571b1f634705b183",class:"thumbnail__progress-indicator"},e("swirl-progress-indicator",{key:"a50e4f6e2e0eb6f1f41c2f846fa1883a904d1671",label:this.progressLabel,value:this.progress})),o&&e("swirl-button-group",{key:"2477bb687307e2167dc4005e46fd56ee393497e3",class:"thumbnail__buttons",segmented:a&&t},a&&e("span",{key:"ebb5fb96bebb157f06a742515d9e98eeea1e6571"},e("swirl-button",{key:"c335bd576fb8664fd4d45ab3ae9b0f97ce99a130",hideLabel:!0,icon:this.editButtonIcon,label:this.editButtonLabel,onClick:this.edit.emit,pill:"xl"===this.size,variant:"on-image"})),t&&e("span",{key:"3df296ec9f310309d17e53b4868d3f844ef9fcf1"},e("swirl-button",{key:"b34c70f969d794844d14a5031f96497dd58e88d8",hideLabel:!0,icon:"<swirl-icon-delete></swirl-icon-delete>",label:this.removeButtonLabel,onClick:this.remove.emit,pill:"xl"===this.size,variant:"on-image"}))),l&&e("span",{key:"c65d48def8ed423dc9b48a32612684a86defcd99",class:"thumbnail__timestamp"},this.timestamp)))}};n.style=':host{display:inline-flex}:host *{box-sizing:border-box}.thumbnail{position:relative;display:inline-flex;overflow:hidden;padding:0.0625rem;border-radius:var(--s-border-radius-s)}.thumbnail--size-s{--swirl-thumbnail-size:2.5rem}.thumbnail--size-m{--swirl-thumbnail-size:3rem}.thumbnail--size-l{--swirl-thumbnail-size:4rem}.thumbnail--size-xl{--swirl-thumbnail-size:5rem;border-radius:var(--s-border-radius-sm)}.thumbnail--size-xl .thumbnail__buttons{transform:scale(0.75)}.thumbnail--size-2xl{--swirl-thumbnail-size:7.5rem;border-radius:var(--s-border-radius-sm)}.thumbnail--format-landscape{width:var(--swirl-thumbnail-size);aspect-ratio:4 / 3}.thumbnail--format-portrait{height:var(--swirl-thumbnail-size);aspect-ratio:3 / 4}.thumbnail--format-square{width:var(--swirl-thumbnail-size);height:var(--swirl-thumbnail-size)}.thumbnail--has-progress .thumbnail__timestamp{bottom:var(--s-space-8)}.thumbnail--interactive .thumbnail__image-wrapper{position:relative;padding:0;border:none;background-color:transparent;cursor:pointer}.thumbnail--interactive .thumbnail__image-wrapper:hover:after{position:absolute;background-color:rgba(0, 0, 0, 0.15);content:"";inset:0}.thumbnail--interactive .thumbnail__image-wrapper:active:after{position:absolute;background-color:rgba(0, 0, 0, 0.3);content:"";inset:0}.thumbnail__image-wrapper{overflow:hidden;width:100%;height:100%;border-radius:var(--s-border-radius-s);box-shadow:inset 0 0 0 0.03125rem rgba(0, 0, 0, 0.1)}.thumbnail__image{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__progress-indicator{position:absolute;z-index:1;right:0;bottom:0;left:0}.thumbnail__buttons{position:absolute;opacity:0;z-index:1;top:var(--s-space-4);right:var(--s-space-4)}.thumbnail:hover .thumbnail__buttons{opacity:1}.thumbnail__timestamp{position:absolute;z-index:1;bottom:var(--s-space-4);left:var(--s-space-4);display:block;overflow:hidden;max-width:calc(100% - 2 * var(--s-space-4));height:1.5rem;padding-right:var(--s-space-8);padding-left:var(--s-space-8);align-items:center;border-radius:var(--s-border-radius-s);color:var(--s-text-on-image);background-color:rgba(0, 0, 0, 0.6);font-size:var(--s-font-size-sm);line-height:1.5rem;white-space:nowrap;text-overflow:ellipsis}';export{o as swirl_icon_arrow_left,l as swirl_icon_arrow_right,h as swirl_icon_more_vertikal,n as swirl_thumbnail}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,H as a}from"./p-g4wOnHIT.js";import{c as e}from"./p-orsBiyT_.js";import{D as o}from"./p-BKpD2IO9.js";import"./p-wi_3Z3FQ.js";const r=class{constructor(i){t(this,i),this.dismiss=s(this,"dismiss",7),this.accessibleDismissLabel="Dismiss",this.intent="default",this.mediaQueryUnsubscribe=()=>{},this.onDismiss=()=>{this.dismiss.emit(this.toastId)}}watchDuration(){this.startTimer()}componentDidLoad(){this.startTimer(),this.mediaQueryUnsubscribe=o.subscribe((t=>{this.forceIconProps(t)}))}disconnectedCallback(){this.mediaQueryUnsubscribe()}forceIconProps(t){const s=this.iconEl?.children[0],i=this.dismissIconEl;s?.setAttribute("size",t?"20":"24"),i?.setAttribute("size",t?"20":"24")}startTimer(){this.clearTimer(),void 0!==this.duration&&this.duration!==1/0&&(this.timeout=setTimeout((()=>{this.dismiss.emit(this.toastId)}),this.duration))}clearTimer(){Boolean(this.timeout)&&(clearTimeout(this.timeout),this.timeout=void 0)}render(){const t=e("toast",`toast--intent-${this.intent}`);return i(a,{key:"f778aa4a83f4893f6624012188ee9ebfe4a87148"},i("div",{key:"dec52e1f31ca5ad7562182a0b20591f80674cf64",class:t},this.icon&&i("span",{key:"44ed9836656e5b18f5a29087c4b9d415099cda1a",class:"toast__icon",innerHTML:this.icon,part:"toast__icon",ref:t=>this.iconEl=t}),i("span",{key:"8bb09803cd503a78578fb1c4c3abce515610512f",class:"toast__content",innerHTML:this.content,part:"toast__content"},i("slot",{key:"ba1d1bf7473be575e81b09328a192a392344d5a1"})),i("button",{key:"c4d88190073f45eb39821de9e6e885023b502d37","aria-label":this.dismissLabel||this.accessibleDismissLabel,class:"toast__dismiss-button",onClick:this.onDismiss,type:"button"},this.dismissLabel,!Boolean(this.dismissLabel)&&i("swirl-icon-close",{key:"22024931b84d915424afbef059ed7a06b5b3a19e",ref:t=>this.dismissIconEl=t}))))}static get watchers(){return{duration:["watchDuration"]}}};r.style=":host{display:flex}:host *{box-sizing:border-box}.toast{display:flex;width:100%;max-width:28rem;padding:var(--s-space-16);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);box-shadow:var(--s-shadow-level-2)}.toast--intent-critical{background-color:var(--s-surface-critical-default)}.toast--intent-success{background-color:var(--s-surface-success-default)}.toast__icon{display:inline-flex;width:1.5rem;height:1.5rem;margin-top:calc(-1 * var(--s-space-2));margin-right:0.625rem;flex-shrink:0}.toast__icon ::part(icon){color:var(--s-icon-on-status)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__icon{width:1.25rem;height:1.25rem;margin-top:0}}.toast__content{flex-grow:1;line-height:var(--s-line-height-base);text-align:left;align-self:flex-start}.toast__content ::part(link){color:var(--text-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__content{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.toast__dismiss-button{display:inline-flex;min-width:1.5rem;height:1.5rem;margin-top:calc(-1 * var(--s-space-2));margin-left:var(--s-space-16);padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;color:var(--s-text-on-status);background-color:transparent;font:inherit;font-weight:var(--s-font-weight-semibold);cursor:pointer}.toast__dismiss-button ::part(icon){color:var(--s-icon-on-status)}";export{r as swirl_toast}
1
+ import{r as t,c as s,h as i,H as a}from"./p-g4wOnHIT.js";import{c as e}from"./p-orsBiyT_.js";import{D as o}from"./p-BKpD2IO9.js";import"./p-wi_3Z3FQ.js";const r=class{constructor(i){t(this,i),this.dismiss=s(this,"dismiss",7),this.accessibleDismissLabel="Dismiss",this.intent="default",this.mediaQueryUnsubscribe=()=>{},this.onDismiss=()=>{this.dismiss.emit(this.toastId)}}watchDuration(){this.startTimer()}componentDidLoad(){this.startTimer(),this.mediaQueryUnsubscribe=o.subscribe((t=>{this.forceIconProps(t)}))}disconnectedCallback(){this.mediaQueryUnsubscribe()}forceIconProps(t){const s=this.iconEl?.children[0],i=this.dismissIconEl;s?.setAttribute("size",t?"20":"24"),i?.setAttribute("size",t?"20":"24")}startTimer(){this.clearTimer(),void 0!==this.duration&&this.duration!==1/0&&(this.timeout=setTimeout((()=>{this.dismiss.emit(this.toastId)}),this.duration))}clearTimer(){Boolean(this.timeout)&&(clearTimeout(this.timeout),this.timeout=void 0)}render(){const t=e("toast",`toast--intent-${this.intent}`);return i(a,{key:"7fea68476343a3a1036bcf9f7594a6e1a79cff8d"},i("div",{key:"fbffb818800e9a1a09d152b304247d2d4f142011",class:t},this.icon&&i("span",{key:"3dd08af863ab3e470b04382280e48898b1855df5",class:"toast__icon",innerHTML:this.icon,part:"toast__icon",ref:t=>this.iconEl=t}),i("span",{key:"cb7f747663e9abac62571814a39d4295e33cba5c",class:"toast__content",innerHTML:this.content,part:"toast__content"},i("slot",{key:"fe656f4eb9dc33af885d7b41f8a1b846bc1e5649"})),i("button",{key:"974e2f354db147b74fd5e88e4fb17a8b611f1fa9","aria-label":this.dismissLabel||this.accessibleDismissLabel,class:"toast__dismiss-button",onClick:this.onDismiss,type:"button"},this.dismissLabel,!Boolean(this.dismissLabel)&&i("swirl-icon-close",{key:"26d3e2c61a864953c15e1ca071a00cb33bdc412b",ref:t=>this.dismissIconEl=t}))))}static get watchers(){return{duration:["watchDuration"]}}};r.style=":host{display:flex}:host *{box-sizing:border-box}.toast{display:flex;width:100%;max-width:28rem;padding:var(--s-space-16);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);box-shadow:var(--s-shadow-level-2)}.toast--intent-critical{background-color:var(--s-surface-critical-default)}.toast--intent-success{background-color:var(--s-surface-success-default)}.toast__icon{display:inline-flex;width:1.5rem;height:1.5rem;margin-top:calc(-1 * var(--s-space-2));margin-right:0.625rem;flex-shrink:0}.toast__icon ::part(icon){color:var(--s-icon-on-status)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__icon{width:1.25rem;height:1.25rem;margin-top:0}}.toast__content{flex-grow:1;line-height:var(--s-line-height-base);text-align:left;align-self:flex-start}.toast__content ::part(link){color:var(--text-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__content{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.toast__dismiss-button{display:inline-flex;min-width:1.5rem;height:1.5rem;margin-top:calc(-1 * var(--s-space-2));margin-left:var(--s-space-16);padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;color:var(--s-text-on-status);background-color:transparent;font:inherit;font-weight:var(--s-font-weight-semibold);cursor:pointer}.toast__dismiss-button ::part(icon){color:var(--s-icon-on-status)}";export{r as swirl_toast}
@@ -1 +1 @@
1
- import{r as n,h as i,H as e,d as a}from"./p-g4wOnHIT.js";import{c as t}from"./p-orsBiyT_.js";const l=class{constructor(i){n(this,i),this.hideLabel=!1,this.inlineLabelColor="default",this.markAsNewLabel="New",this.useCustomIconSize=!1,this.variant="default"}componentWillLoad(){this.forceIconProps()}componentDidRender(){this.forceIconProps()}forceIconProps(){if(this.useCustomIconSize)return;const n=this.el.querySelector("[slot='icon']"),i=this.hideLabel&&"app-icon"===this.variant||"default"===this.variant;n&&(n.tagName.startsWith("SWIRL-ICON")||n.tagName.startsWith("SWIRL-EMOJI")||n.tagName.startsWith("SWIRL-SYMBOL"))&&n.setAttribute("size",i?"20":"32")}render(){const n=Boolean(this.el.querySelector("swirl-app-icon")),a=t("shell-navigation-item",`shell-navigation-item--${this.variant}`,{"shell-navigation-item--active":this.active,"shell-navigation-item--boxed":this.boxed,"shell-navigation-item--filled":this.filled,"shell-navigation-item--inline-label":this.inlineLabel,"shell-navigation-item--gradient":this.withGradient,"shell-navigation-item--hide-label":this.hideLabel,"shell-navigation-item--has-app-icon":n}),l=t("shell-navigation-item__label",{"shell-navigation-item__label--light":"light"===this.inlineLabelColor,"shell-navigation-item__label--dark":"dark"===this.inlineLabelColor,"shell-navigation-item__label--inline":this.inlineLabel}),s=null!=this.badgeLabel,o=!s&&this.markAsNew&&!this.hideLabel&&"default"===this.variant,r=!s&&this.markAsNew&&this.hideLabel&&"default"===this.variant,h=Boolean(this.href);return i(e,{key:"5f8337a6e328f4b70794c5df34bea4ce004cdbfc"},i("swirl-tooltip",{key:"de803be5c5e466daed55cf67c6127f897425e10d",active:this.hideLabel,content:this.description?`${this.label} ${this.description}`:this.label,delay:100,position:"right",positioning:"fixed"},i(h?"a":"button",{key:"56b42a124385745a2048c1fac11abd75c5f5ea47",class:a,href:this.href,target:this.target,type:h?void 0:"button",title:this.hideLabel?void 0:this.label},i("span",{key:"fe342b65d7beef54084c3fecd2f448bf2cf8e5c8",class:"shell-navigation-item__icon"},i("slot",{key:"9c1b2a2476fc0235e3241ed57b458a97809ad50a",name:"icon"})),this.hideLabel?i("swirl-visually-hidden",null,i("span",{class:l},this.label)):"default"!==this.variant?i("span",{class:l},this.label):i("div",{class:"shell-navigation-item__text-wrapper"},i("span",{class:l},this.label),this.description&&i("span",{class:"shell-navigation-item__description"},this.description)),s&&i("span",{key:"89bb559959dae885912f6af1311c22755cd14af2",class:"shell-navigation-item__badge-wrapper"},i("swirl-badge",{key:"b9015202651b5c205849113fcc0e8ce783d18412","aria-label":this.badgeLabel,class:t("shell-navigation-item__badge",{"shell-navigation-item__badge--dot":""===this.badgeLabel}),label:this.badgeLabel,size:"xs",variant:""===this.badgeLabel?"dot":"default"})),o&&i("swirl-tag",{key:"9e05640b202bd785e50ae6741804b64c3e1e276a",class:"shell-navigation-item__is-new-tag",intent:"info",label:this.markAsNewLabel.toLocaleUpperCase(),size:"s",variant:"strong"}),r&&i("swirl-badge",{key:"30aa107e83bc07394bd7de154109097d0ccf51c4",class:"shell-navigation-item__is-new-badge",intent:"info",label:this.markAsNewLabel.toLocaleUpperCase(),size:"xs",variant:"dot"}))))}get el(){return a(this)}};l.style='/**\n* seems the container query does not work as expected\n*/\n\n:host {\n display: inline-flex;\n width: 100%;\n}\n\n:host * {\n box-sizing: border-box;\n }\n\n.shell-navigation-item {\n --swirl-app-icon-size: 2rem;\n --swirl-shell-navigation-item-gradient: linear-gradient(\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.8)\n );\n\n position: relative;\n display: flex;\n width: 100%;\n height: 3rem;\n padding: var(--s-space-8);\n flex-shrink: 0;\n justify-content: flex-start;\n align-items: center;\n border: none;\n border-radius: var(--s-border-radius-sm);\n color: var(--s-text-default);\n background-color: var(--s-surface-overlay-default);\n font: inherit;\n font-size: var(--s-font-size-sm);\n font-weight: var(--s-font-weight-medium);\n line-height: var(--s-line-height-sm);\n text-decoration: none;\n cursor: pointer;\n container-type: size;\n gap: var(--s-space-12);\n}\n\n.shell-navigation-item:hover {\n background-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item:hover .shell-navigation-item__badge,\n .shell-navigation-item:hover .shell-navigation-item__is-new-badge {\n --swirl-badge-border-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item:active {\n background-color: var(--s-surface-sunken-pressed);\n }\n\n.shell-navigation-item:active .shell-navigation-item__badge,\n .shell-navigation-item:active .shell-navigation-item__is-new-badge {\n --swirl-badge-border-color: var(--s-surface-sunken-pressed);\n }\n\n.shell-navigation-item:focus {\n outline: none;\n }\n\n.shell-navigation-item:focus-visible {\n z-index: 1;\n box-shadow: 0 0 0 0.125rem var(--s-focus-default);\n }\n\n.shell-navigation-item.shell-navigation-item--boxed {\n --swirl-app-icon-size: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--boxed .shell-navigation-item__icon {\n overflow: hidden;\n border-radius: var(--s-border-radius-sm);\n background-color: var(--s-background-default);\n box-shadow: 0 0 0 var(--s-border-width-default) var(--s-border-default);\n }\n\n.shell-navigation-item.shell-navigation-item--default.shell-navigation-item--filled .shell-navigation-item__icon {\n border-radius: var(--s-border-radius-sm);\n width: 2rem;\n min-width: 2rem;\n height: 2rem;\n min-height: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--filled {\n padding: var(--s-space-8);\n }\n\n.shell-navigation-item.shell-navigation-item--filled:not(.shell-navigation-item--has-app-icon) .shell-navigation-item__icon {\n color: var(--s-icon-on-action-primary);\n background-color: var(--s-action-primary-default);\n }\n\n.shell-navigation-item.shell-navigation-item--filled ::slotted(swirl-app-icon) {\n position: inherit;\n width: 100%;\n height: 100%;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled {\n --swirl-app-icon-size: 100%;\n\n height: auto;\n padding: 0;\n align-items: start;\n border-radius: var(--s-border-radius-base);\n flex-direction: column;\n container-type: inline-size;\n gap: var(--s-space-8);\n }\n\n.shell-navigation-item.shell-navigation-item--tiled:hover {\n background-color: transparent;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled:hover .shell-navigation-item__label {\n text-decoration: underline;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled ::slotted(*) {\n position: absolute;\n top: var(--s-space-12);\n left: var(--s-space-12);\n }\n\n.shell-navigation-item.shell-navigation-item--tiled ::slotted(swirl-app-icon) {\n position: inherit;\n width: 100%;\n height: 100%;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__icon {\n overflow: hidden;\n width: 100%;\n min-width: 100%;\n height: auto;\n min-height: auto;\n border-radius: var(--s-border-radius-base);\n background-color: var(--s-surface-sunken-hovered);\n aspect-ratio: 1;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled.shell-navigation-item--gradient .shell-navigation-item__icon::after {\n position: absolute;\n display: inline-block;\n width: 100%;\n border-radius: var(--s-border-radius-base);\n background-image: var(--swirl-shell-navigation-item-gradient);\n content: "";\n aspect-ratio: 1;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label {\n color: var(--s-text-default);\n font-weight: var(--s-font-weight-semibold);\n text-align: start;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label--inline {\n position: absolute;\n bottom: var(--s-space-12);\n left: var(--s-space-12);\n margin-right: var(--s-space-12);\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label--inline.shell-navigation-item__label--light {\n color: rgba(242, 242, 242, 1);\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label--inline.shell-navigation-item__label--dark {\n color: rgb(25, 25, 25);\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon {\n --swirl-app-icon-size: 100%;\n font-size: var(--s-font-size-xs);\n padding: var(--s-space-8) var(--s-space-4);\n align-items: center;\n height: auto;\n border-radius: var(--s-border-radius-sm);\n flex-direction: column;\n container-type: inline-size;\n gap: var(--s-space-8);\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon.shell-navigation-item--hide-label {\n align-items: start;\n padding: var(--s-space-8);\n --swirl-app-icon-size: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon.shell-navigation-item--hide-label .shell-navigation-item__icon {\n border-radius: var(--s-border-radius-sm);\n max-width: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon.shell-navigation-item--hide-label .shell-navigation-item__badge-wrapper {\n max-width: 2rem;\n max-height: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__icon {\n overflow: hidden;\n width: 100%;\n max-width: 3.5rem;\n height: auto;\n border-radius: var(--s-border-radius-base);\n\n color: var(--s-icon-on-action-primary);\n aspect-ratio: 1;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__badge-wrapper {\n max-width: 3.5rem;\n max-height: 3.5rem;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__label {\n line-height: var(--s-line-height-xs);\n text-align: center;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__badge-wrapper, .shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__badge-wrapper {\n position: absolute;\n width: 100%;\n height: 100%;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__label, .shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label {\n display: -webkit-box;\n overflow: hidden;\n white-space: normal;\n text-overflow: unset;\n overflow-wrap: anywhere;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__badge, .shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__badge {\n position: absolute;\n top: -0.375rem;\n right: -0.375rem;\n padding: var(--s-space-2);\n }\n\n.shell-navigation-item.shell-navigation-item--active {\n background-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item.shell-navigation-item--active .shell-navigation-item__icon {\n color: var(--s-icon-highlight);\n }\n\n.shell-navigation-item.shell-navigation-item--active .shell-navigation-item__label {\n color: var(--s-text-highlight);\n }\n\n.shell-navigation-item.shell-navigation-item--active .shell-navigation-item__badge {\n --swirl-badge-border-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item.shell-navigation-item--active:hover {\n background-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item.shell-navigation-item--active:hover .shell-navigation-item__badge {\n --swirl-badge-border-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item.shell-navigation-item--active:active {\n background-color: var(--s-surface-sunken-pressed);\n }\n\n.shell-navigation-item.shell-navigation-item--active:active .shell-navigation-item__badge {\n --swirl-badge-border-color: var(--s-surface-sunken-pressed);\n }\n\n@media (min-width: 992px) {\n\n.shell-navigation-item {\n background-color: var(--s-surface-sunken-default)\n}\n }\n\n.shell-navigation-item__icon {\n display: inline-flex;\n width: 2rem;\n min-width: 2rem;\n height: 2rem;\n min-height: 2rem;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n border-radius: var(--s-border-radius-base);\n}\n\n.shell-navigation-item__text-wrapper {\n overflow: hidden;\n min-width: 0;\n flex-grow: 1;\n text-align: start;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.shell-navigation-item__description {\n margin-left: var(--s-space-8);\n font-weight: var(--s-font-weight-normal);\n color: var(--s-text-subdued);\n}\n\n.shell-navigation-item__badge {\n flex-shrink: 0;\n --swirl-badge-border-color: var(--swirl-shell-background);\n}\n\n.shell-navigation-item__is-new-tag {\n flex-shrink: 0;\n}\n\n.shell-navigation-item__is-new-badge {\n position: absolute;\n top: 0.625rem;\n right: 0.625rem;\n flex-shrink: 0;\n --swirl-badge-border-color: var(--swirl-shell-background);\n}\n\n@container (max-width: 4rem) {\n .shell-navigation-item__badge {\n position: absolute;\n top: var(--s-space-4);\n right: var(--s-space-4);\n padding: var(--s-space-2);\n }\n\n .shell-navigation-item--gradient .shell-navigation-item__icon {\n --swirl-shell-navigation-item-gradient: none;\n }\n\n .shell-navigation-item__badge--dot {\n top: var(--s-space-8);\n right: var(--s-space-8);\n }\n}\n\n@container (min-width: 10rem) {\n .shell-navigation-item__badge--dot {\n padding-right: var(--s-space-4);\n }\n}\n';export{l as swirl_shell_navigation_item}
1
+ import{r as n,h as i,H as e,d as a}from"./p-g4wOnHIT.js";import{c as t}from"./p-orsBiyT_.js";const l=class{constructor(i){n(this,i),this.hideLabel=!1,this.inlineLabelColor="default",this.markAsNewLabel="New",this.useCustomIconSize=!1,this.variant="default"}componentWillLoad(){this.forceIconProps()}componentDidRender(){this.forceIconProps()}forceIconProps(){if(this.useCustomIconSize)return;const n=this.el.querySelector("[slot='icon']"),i=this.hideLabel&&"app-icon"===this.variant||"default"===this.variant;n&&(n.tagName.startsWith("SWIRL-ICON")||n.tagName.startsWith("SWIRL-EMOJI")||n.tagName.startsWith("SWIRL-SYMBOL"))&&n.setAttribute("size",i?"20":"32")}render(){const n=Boolean(this.el.querySelector("swirl-app-icon")),a=t("shell-navigation-item",`shell-navigation-item--${this.variant}`,{"shell-navigation-item--active":this.active,"shell-navigation-item--boxed":this.boxed,"shell-navigation-item--filled":this.filled,"shell-navigation-item--inline-label":this.inlineLabel,"shell-navigation-item--gradient":this.withGradient,"shell-navigation-item--hide-label":this.hideLabel,"shell-navigation-item--has-app-icon":n}),l=t("shell-navigation-item__label",{"shell-navigation-item__label--light":"light"===this.inlineLabelColor,"shell-navigation-item__label--dark":"dark"===this.inlineLabelColor,"shell-navigation-item__label--inline":this.inlineLabel}),s=null!=this.badgeLabel,o=!s&&this.markAsNew&&!this.hideLabel&&"default"===this.variant,r=!s&&this.markAsNew&&this.hideLabel&&"default"===this.variant,h=Boolean(this.href);return i(e,{key:"449f8152f3e43b5286253b3cad88b97e7e7511fa"},i("swirl-tooltip",{key:"c38fd294886949488ebb68e44243dedf4b9353cb",active:this.hideLabel,content:this.description?`${this.label} ${this.description}`:this.label,delay:100,position:"right",positioning:"fixed"},i(h?"a":"button",{key:"b109c272afaa8d81406c77f9a383eb0265ba0abe",class:a,href:this.href,target:this.target,type:h?void 0:"button",title:this.hideLabel?void 0:this.label},i("span",{key:"e798c1c7fd44a3f60969649f377dc569ef790d14",class:"shell-navigation-item__icon"},i("slot",{key:"74253d57363c4ab083e1df01bcc8ff3a39dc875b",name:"icon"})),this.hideLabel?i("swirl-visually-hidden",null,i("span",{class:l},this.label)):"default"!==this.variant?i("span",{class:l},this.label):i("div",{class:"shell-navigation-item__text-wrapper"},i("span",{class:l},this.label),this.description&&i("span",{class:"shell-navigation-item__description"},this.description)),s&&i("span",{key:"314a39b2198bc28f55ee94a14eec540ac465924a",class:"shell-navigation-item__badge-wrapper"},i("swirl-badge",{key:"67e82dd1cf4e5097fb8572aefba5c6c43808a0f7","aria-label":this.badgeLabel,class:t("shell-navigation-item__badge",{"shell-navigation-item__badge--dot":""===this.badgeLabel}),label:this.badgeLabel,size:"xs",variant:""===this.badgeLabel?"dot":"default"})),o&&i("swirl-tag",{key:"e4c5c0f2efa1237f658c3a0378046e5c16188228",class:"shell-navigation-item__is-new-tag",intent:"info",label:this.markAsNewLabel.toLocaleUpperCase(),size:"s",variant:"strong"}),r&&i("swirl-badge",{key:"21aac8cdecddb54b7c654d119c5a07eeadf5d216",class:"shell-navigation-item__is-new-badge",intent:"info",label:this.markAsNewLabel.toLocaleUpperCase(),size:"xs",variant:"dot"}))))}get el(){return a(this)}};l.style='/**\n* seems the container query does not work as expected\n*/\n\n:host {\n display: inline-flex;\n width: 100%;\n}\n\n:host * {\n box-sizing: border-box;\n }\n\n.shell-navigation-item {\n --swirl-app-icon-size: 2rem;\n --swirl-shell-navigation-item-gradient: linear-gradient(\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.8)\n );\n\n position: relative;\n display: flex;\n width: 100%;\n height: 3rem;\n padding: var(--s-space-8);\n flex-shrink: 0;\n justify-content: flex-start;\n align-items: center;\n border: none;\n border-radius: var(--s-border-radius-sm);\n color: var(--s-text-default);\n background-color: var(--s-surface-overlay-default);\n font: inherit;\n font-size: var(--s-font-size-sm);\n font-weight: var(--s-font-weight-medium);\n line-height: var(--s-line-height-sm);\n text-decoration: none;\n cursor: pointer;\n container-type: size;\n gap: var(--s-space-12);\n}\n\n.shell-navigation-item:hover {\n background-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item:hover .shell-navigation-item__badge,\n .shell-navigation-item:hover .shell-navigation-item__is-new-badge {\n --swirl-badge-border-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item:active {\n background-color: var(--s-surface-sunken-pressed);\n }\n\n.shell-navigation-item:active .shell-navigation-item__badge,\n .shell-navigation-item:active .shell-navigation-item__is-new-badge {\n --swirl-badge-border-color: var(--s-surface-sunken-pressed);\n }\n\n.shell-navigation-item:focus {\n outline: none;\n }\n\n.shell-navigation-item:focus-visible {\n z-index: 1;\n box-shadow: 0 0 0 0.125rem var(--s-focus-default);\n }\n\n.shell-navigation-item.shell-navigation-item--boxed {\n --swirl-app-icon-size: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--boxed .shell-navigation-item__icon {\n overflow: hidden;\n border-radius: var(--s-border-radius-sm);\n background-color: var(--s-background-default);\n box-shadow: 0 0 0 var(--s-border-width-default) var(--s-border-default);\n }\n\n.shell-navigation-item.shell-navigation-item--default.shell-navigation-item--filled .shell-navigation-item__icon {\n border-radius: var(--s-border-radius-sm);\n width: 2rem;\n min-width: 2rem;\n height: 2rem;\n min-height: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--filled {\n padding: var(--s-space-8);\n }\n\n.shell-navigation-item.shell-navigation-item--filled:not(.shell-navigation-item--has-app-icon) .shell-navigation-item__icon {\n color: var(--s-icon-on-action-primary);\n background-color: var(--s-action-primary-default);\n }\n\n.shell-navigation-item.shell-navigation-item--filled ::slotted(swirl-app-icon) {\n position: inherit;\n width: 100%;\n height: 100%;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled {\n --swirl-app-icon-size: 100%;\n\n height: auto;\n padding: 0;\n align-items: start;\n border-radius: var(--s-border-radius-base);\n flex-direction: column;\n container-type: inline-size;\n gap: var(--s-space-8);\n }\n\n.shell-navigation-item.shell-navigation-item--tiled:hover {\n background-color: transparent;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled:hover .shell-navigation-item__label {\n text-decoration: underline;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled ::slotted(*) {\n position: absolute;\n top: var(--s-space-12);\n left: var(--s-space-12);\n }\n\n.shell-navigation-item.shell-navigation-item--tiled ::slotted(swirl-app-icon) {\n position: inherit;\n width: 100%;\n height: 100%;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__icon {\n overflow: hidden;\n width: 100%;\n min-width: 100%;\n height: auto;\n min-height: auto;\n border-radius: var(--s-border-radius-base);\n background-color: var(--s-surface-sunken-hovered);\n aspect-ratio: 1;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled.shell-navigation-item--gradient .shell-navigation-item__icon::after {\n position: absolute;\n display: inline-block;\n width: 100%;\n border-radius: var(--s-border-radius-base);\n background-image: var(--swirl-shell-navigation-item-gradient);\n content: "";\n aspect-ratio: 1;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label {\n color: var(--s-text-default);\n font-weight: var(--s-font-weight-semibold);\n text-align: start;\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label--inline {\n position: absolute;\n bottom: var(--s-space-12);\n left: var(--s-space-12);\n margin-right: var(--s-space-12);\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label--inline.shell-navigation-item__label--light {\n color: rgba(242, 242, 242, 1);\n }\n\n.shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label--inline.shell-navigation-item__label--dark {\n color: rgb(25, 25, 25);\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon {\n --swirl-app-icon-size: 100%;\n font-size: var(--s-font-size-xs);\n padding: var(--s-space-8) var(--s-space-4);\n align-items: center;\n height: auto;\n border-radius: var(--s-border-radius-sm);\n flex-direction: column;\n container-type: inline-size;\n gap: var(--s-space-8);\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon.shell-navigation-item--hide-label {\n align-items: start;\n padding: var(--s-space-8);\n --swirl-app-icon-size: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon.shell-navigation-item--hide-label .shell-navigation-item__icon {\n border-radius: var(--s-border-radius-sm);\n max-width: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon.shell-navigation-item--hide-label .shell-navigation-item__badge-wrapper {\n max-width: 2rem;\n max-height: 2rem;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__icon {\n overflow: hidden;\n width: 100%;\n max-width: 3.5rem;\n height: auto;\n border-radius: var(--s-border-radius-base);\n\n color: var(--s-icon-on-action-primary);\n aspect-ratio: 1;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__badge-wrapper {\n max-width: 3.5rem;\n max-height: 3.5rem;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__label {\n line-height: var(--s-line-height-xs);\n text-align: center;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__badge-wrapper, .shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__badge-wrapper {\n position: absolute;\n width: 100%;\n height: 100%;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__label, .shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__label {\n display: -webkit-box;\n overflow: hidden;\n white-space: normal;\n text-overflow: unset;\n overflow-wrap: anywhere;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n\n.shell-navigation-item.shell-navigation-item--app-icon .shell-navigation-item__badge, .shell-navigation-item.shell-navigation-item--tiled .shell-navigation-item__badge {\n position: absolute;\n top: -0.375rem;\n right: -0.375rem;\n padding: var(--s-space-2);\n }\n\n.shell-navigation-item.shell-navigation-item--active {\n background-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item.shell-navigation-item--active .shell-navigation-item__icon {\n color: var(--s-icon-highlight);\n }\n\n.shell-navigation-item.shell-navigation-item--active .shell-navigation-item__label {\n color: var(--s-text-highlight);\n }\n\n.shell-navigation-item.shell-navigation-item--active .shell-navigation-item__badge {\n --swirl-badge-border-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item.shell-navigation-item--active:hover {\n background-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item.shell-navigation-item--active:hover .shell-navigation-item__badge {\n --swirl-badge-border-color: var(--s-surface-sunken-hovered);\n }\n\n.shell-navigation-item.shell-navigation-item--active:active {\n background-color: var(--s-surface-sunken-pressed);\n }\n\n.shell-navigation-item.shell-navigation-item--active:active .shell-navigation-item__badge {\n --swirl-badge-border-color: var(--s-surface-sunken-pressed);\n }\n\n@media (min-width: 992px) {\n\n.shell-navigation-item {\n background-color: var(--s-surface-sunken-default)\n}\n }\n\n.shell-navigation-item__icon {\n display: inline-flex;\n width: 2rem;\n min-width: 2rem;\n height: 2rem;\n min-height: 2rem;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n border-radius: var(--s-border-radius-base);\n}\n\n.shell-navigation-item__text-wrapper {\n overflow: hidden;\n min-width: 0;\n flex-grow: 1;\n text-align: start;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.shell-navigation-item__description {\n margin-left: var(--s-space-8);\n font-weight: var(--s-font-weight-normal);\n color: var(--s-text-subdued);\n}\n\n.shell-navigation-item__badge {\n flex-shrink: 0;\n --swirl-badge-border-color: var(--swirl-shell-background);\n}\n\n.shell-navigation-item__is-new-tag {\n flex-shrink: 0;\n}\n\n.shell-navigation-item__is-new-badge {\n position: absolute;\n top: 0.625rem;\n right: 0.625rem;\n flex-shrink: 0;\n --swirl-badge-border-color: var(--swirl-shell-background);\n}\n\n@container (max-width: 4rem) {\n .shell-navigation-item__badge {\n position: absolute;\n top: var(--s-space-4);\n right: var(--s-space-4);\n padding: var(--s-space-2);\n }\n\n .shell-navigation-item--gradient .shell-navigation-item__icon {\n --swirl-shell-navigation-item-gradient: none;\n }\n\n .shell-navigation-item__badge--dot {\n top: var(--s-space-8);\n right: var(--s-space-8);\n }\n}\n\n@container (min-width: 10rem) {\n .shell-navigation-item__badge--dot {\n padding-right: var(--s-space-4);\n }\n}\n';export{l as swirl_shell_navigation_item}
@@ -1 +1 @@
1
- import{r as l,c as e,h as a,H as s,d as o}from"./p-g4wOnHIT.js";import{c as t}from"./p-orsBiyT_.js";import{c as i}from"./p-DIdMBZfn.js";import{m as r}from"./p-wi_3Z3FQ.js";const d="SWIRL_SHELL_SECONDARY_NAVIGATION_COLLAPSE_STATE",n="SWIRL_SHELL_SECONDARY_NAVIGATION_VIEW_STATE",h="SWIRL_SHELL_NAVIGATION_COLLAPSE_STATE",c=class{constructor(a){l(this,a),this.skipLinkClick=e(this,"skipLinkClick",7),this.browserBackButtonLabel="Navigate back",this.browserForwardButtonLabel="Navigate forward",this.collapseNavigationButtonLabel="Collapse navigation",this.enableSecondaryNavGridLayout=!0,this.secondaryNavGridLayoutVariant="tiled",this.expandNavigationButtonLabel="Expand navigation",this.gridNavLayoutToggleLabel="Grid",this.hideMobileNavigationButtonLabel="Close navigation",this.listNavLayoutToggleLabel="List",this.navigationLabel="Main",this.secondaryNavCollapseLabel="Show less",this.secondaryNavExpandLabel="Show more",this.skipLinkLabel="Skip to main content",this.isDesktopViewport=!0,this.secondaryNavView="list",this.collectNavItems=()=>{this.mainNavItems=Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='nav'], [slot='nav'] swirl-shell-navigation-item")),this.secondaryNavItems=Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='secondary-nav'], [slot='secondary-nav'] swirl-shell-navigation-item")),this.toggleNavItemLabels(),this.setSecondaryNavItemsTiled()},this.toggleSecondaryNavView=l=>{l.stopPropagation(),this.secondaryNavView="grid"===this.secondaryNavView?"list":"grid",this.setSecondaryNavItemsTiled(),localStorage.setItem(n,String(this.secondaryNavView))},this.toggleSecondaryNavCollapse=l=>{l.stopPropagation(),this.secondaryNavCollapsed=!this.secondaryNavCollapsed,localStorage.setItem(d,String(this.secondaryNavCollapsed))},this.onNavigationToggleClick=()=>{this.navigationCollapsed=!this.navigationCollapsed},this.onNavigationClick=()=>{this.hideMobileNavigation()}}componentWillLoad(){this.isDesktopViewport=r(),this.collectNavItems();const l="true"===localStorage.getItem(h);this.navigationCollapsed=l,this.restoreSecondaryNavState()}componentDidLoad(){this.focusTrap=i(this.navElement,{allowOutsideClick:!0,tabbableOptions:{getShadowRoot:l=>l.shadowRoot}}),this.collectNavItems(),this.navMutationObserver=new MutationObserver((()=>{this.collectNavItems()})),this.navMutationObserver.observe(this.navElement,{childList:!0,subtree:!0})}componentDidRender(){this.focusTrap?.updateContainerElements(this.navElement)}disconnectedCallback(){this.focusTrap?.deactivate(),this.navMutationObserver?.disconnect()}onWindowKeyDown(l){"Escape"===l.key&&this.mobileNavigationActive&&this.hideMobileNavigation()}watchEnableSecondaryNavGridLayout(){this.restoreSecondaryNavState()}watchMobileNavigationState(){this.mobileNavigationActive?setTimeout((()=>{this.focusTrap.activate()}),200):this.focusTrap.deactivate()}watchNavigationCollapsed(){localStorage.setItem(h,String(this.navigationCollapsed)),this.toggleNavItemLabels(),this.setSecondaryNavItemsTiled()}onWindowResize(){this.isDesktopViewport!==r()&&(this.isDesktopViewport=r(),this.collectNavItems())}async showMobileNavigation(){this.mobileNavigationActive=!0,this.collectNavItems()}async hideMobileNavigation(){this.mobileNavigationActive=!1,this.toggleNavItemLabels()}toggleNavItemLabels(){[...this.secondaryNavItems,...this.mainNavItems].forEach((l=>{l.hideLabel=this.navigationCollapsed&&this.isDesktopViewport}))}setSecondaryNavItemsTiled(){this.secondaryNavItems.forEach((l=>{l.variant=this.enableSecondaryNavGridLayout&&("grid"===this.secondaryNavView||this.navigationCollapsed&&this.isDesktopViewport)?this.secondaryNavGridLayoutVariant:"default"}))}restoreSecondaryNavState(){if(this.enableSecondaryNavGridLayout){const l="true"===localStorage.getItem(d);this.secondaryNavCollapsed=l;const e=localStorage.getItem(n);this.secondaryNavView=e}}render(){const l=this.navigationCollapsed&&this.isDesktopViewport,e=Boolean(this.el.querySelector("[slot='secondary-nav']")),o=t("shell-layout",{"shell-layout--branded-header":this.brandedHeader,"shell-layout--secondary-nav-collapsed":this.secondaryNavCollapsed,"shell-layout--has-secondary-nav":e,"shell-layout--mobile-navigation-active":this.mobileNavigationActive,"shell-layout--navigation-collapsed":l});return a(s,{key:"ac0578479f30601b4688d075825dd8ced90b1db9"},a("div",{key:"ab0d178f91b637ee206dba90513e272342ee0a1d",class:o},a("header",{key:"dafaff26074b663a0deb51852b770527e0658db1",class:"shell-layout__header","data-tauri-drag-region":"true"},a("button",{key:"8a0279d36c6d7ceee1106e78ab86b9aadbd0a1d2",class:"shell-layout__skip-link",onClick:this.skipLinkClick.emit,type:"button"},this.skipLinkLabel),a("div",{key:"006dd289f6d498e8c71b2e4e7710e4f4b5b4041f",class:"shell-layout__header-left"},a("swirl-tooltip",{key:"26f1372a20ea2f9478a178eb3ae879d410bf579c",content:this.navigationCollapsed?this.expandNavigationButtonLabel:this.collapseNavigationButtonLabel,delay:100,position:"right"},a("button",{key:"2fec7ce6950380825e56032cff633bd062b60fad",class:"shell-layout__header-tool",onClick:this.onNavigationToggleClick,type:"button"},a(this.navigationCollapsed?"swirl-icon-dock-left-expand":"swirl-icon-dock-left-collapse",{size:20}),a("swirl-visually-hidden",{key:"32918f06901b10833bd0714d9df4ad11f85e674f"},this.navigationCollapsed?this.expandNavigationButtonLabel:this.collapseNavigationButtonLabel))),a("a",{key:"82634878be0c0cc9223fb3b94cbc25bf63adf005",class:"shell-layout__header-tool",href:"javascript:history.back()"},a("swirl-icon-arrow-back",{key:"76e10e8a85d9c133a6c418e16e2aae46d6d735d9",size:20}),a("swirl-visually-hidden",{key:"9456a122d1264fa793548957eaace4d2b159fff2"},this.browserBackButtonLabel)),a("a",{key:"80f911686ced6bd0335899a39868795e03c3908c",class:"shell-layout__header-tool",href:"javascript:history.forward()"},a("swirl-icon-arrow-forward",{key:"a11e0d5f22e9015185047d4bd3bd1d6d1bcb0b46",size:20}),a("swirl-visually-hidden",{key:"be0558e4d6138576139296953f329f095fcec031"},this.browserForwardButtonLabel)),a("slot",{key:"452127f3d2a0d91c58c2b9396be90dff9e8b2522",name:"left-header-tools"})),a("div",{key:"7b837e13bca9e7efe2af2673e569d5347bfe809d",class:"shell-layout__logo"},a("slot",{key:"8782475ecf38ec1cbff3c4c62546b2f31ce4c429",name:"logo"})),a("div",{key:"7078a0d447369173495eae8aea9b2bcaed4d380a",class:"shell-layout__header-right"},a("slot",{key:"4de25df2ffceda31c0ea36373dd816e3ec6956d5",name:"right-header-tools"}),a("slot",{key:"82c2cc3b4e5791d6ddabaa59c8a1e3c88b6032b9",name:"avatar"}))),a("div",{key:"99c7a6e5062767eeae9bca0a76b9dbb93673182f",class:"shell-layout__mobile-nav-backdrop",onClick:this.onNavigationClick}),a("nav",{key:"4b26bd504364711d75421041e1fd7a4416cb83ed","aria-labelledby":"main-navigation-label",class:"shell-layout__nav",onClick:this.onNavigationClick,ref:l=>this.navElement=l},a("div",{key:"104f827b6569c1a7831716e2e65499f6aab17243",class:"shell-layout__mobile-header"},a("slot",{key:"f4100ec98a0bc08032000ea3d6cbd9c000c898e8",name:"mobile-logo"}),a("div",{key:"63acb9e4b06d42dd0902f38f22e06467a5e17d5c",class:"shell-layout__mobile-header-tools"},a("slot",{key:"700de4947f2db176bd6ae6fb5bce2379a9eb5741",name:"mobile-header-tools"}),a("button",{key:"7934d57b6874b25e366bb8b5abe3a83cb377f175",class:"shell-layout__header-tool",type:"button"},a("swirl-icon-double-arrow-left",{key:"8428aabadd299408985a155a2a910d4c15c4e300",size:20}),a("swirl-visually-hidden",{key:"433ec6a7dc91436839ab566bb0c95345cbc8a276"},this.hideMobileNavigationButtonLabel)))),a("div",{key:"d55acd62b1eb74c0d247c039cea246ee993c9d07",class:"shell-layout__nav-body"},a("swirl-visually-hidden",{key:"0130fcc3e3bca07c9a3ed1a16bdb0a1638a1cb60"},a("span",{key:"e6e41496731456b66eedd8150c44393d4f88c6ad",id:"main-navigation-label"},this.navigationLabel)),a("slot",{key:"eb753f9fe3c8c36a00824e86f148ddf1a0881525",name:"nav",onSlotchange:this.collectNavItems}),a("div",{key:"9b6f92d616f09c385bce52e198f9a247156adcb6",class:"shell-layout__secondary-nav"},a("swirl-separator",{key:"7cb6852515a15b58f83510e18373668153a72c46",color:"strong",spacing:"16"}),this.enableSecondaryNavGridLayout&&a("swirl-box",{key:"c7106cedee7f295b67d857b4d3189b7224af9e27",paddingBlockEnd:"16"},a("swirl-stack",{key:"9f99eaeb8db2bea6ad41eabcee49cee8ff4833ec",justify:l?"center":"space-between",orientation:"horizontal"},a("swirl-button",{key:"f37a504b3489f29c671ac7cb3e1282238533ba89",hideLabel:l,icon:this.secondaryNavCollapsed?"<swirl-icon-expand-more></swirl-icon-expand-more>":"<swirl-icon-expand-less></swirl-icon-expand-less>",label:this.secondaryNavCollapsed?this.secondaryNavExpandLabel:this.secondaryNavCollapseLabel,onClick:this.toggleSecondaryNavCollapse,variant:"plain"}),!l&&!this.secondaryNavCollapsed&&a("swirl-button",{key:"3cbbbf36a145b829d569741cb111c17d091ec59b",icon:"grid"===this.secondaryNavView?"<swirl-icon-menu></swirl-icon-menu>":"<swirl-icon-hamburger-menu></swirl-icon-hamburger-menu>",iconPosition:"end",label:"grid"===this.secondaryNavView?this.gridNavLayoutToggleLabel:this.listNavLayoutToggleLabel,onClick:this.toggleSecondaryNavView,variant:"plain"}))),a("div",{key:"2faa5b97f118fd0256f7495bcfb4e9112e624413",class:{[`shell-layout__secondary-nav-items--${this.secondaryNavGridLayoutVariant}`]:!0,"shell-layout__secondary-nav-items":!0,"shell-layout__secondary-nav-items--grid-view":this.enableSecondaryNavGridLayout&&"grid"===this.secondaryNavView}},a("slot",{key:"065e4ad317213553492f510d3188273713ea1268",name:"secondary-nav",onSlotchange:this.collectNavItems}))))),a("main",{key:"5426b223b821da51b47cd24a046578b51d5b649b",class:"shell-layout__main",id:"main-content"},a("slot",{key:"a035652618a59e03f9f59904f06574c34dc9b473"}))))}get el(){return o(this)}static get watchers(){return{enableSecondaryNavGridLayout:["watchEnableSecondaryNavGridLayout"],mobileNavigationActive:["watchMobileNavigationState"],navigationCollapsed:["watchNavigationCollapsed"]}}};c.style='.sc-swirl-shell-layout-h{--swirl-shell-background:var(--s-surface-sunken-default);--swirl-shell-text-color:var(--s-text-default);--swirl-shell-header-height:3.25rem;--swirl-shell-collapsed-nav-width:4rem;--swirl-shell-extended-nav-width:18rem;display:flex;width:100%;height:100%}.sc-swirl-shell-layout-h *.sc-swirl-shell-layout{box-sizing:border-box}.shell-layout.sc-swirl-shell-layout{display:grid;overflow:hidden;width:100%;min-height:100%;background-color:var(--swirl-shell-background);transition:grid-template-columns 0.1s;grid-template-columns:0 1fr 0;grid-template-rows:1fr;grid-template-areas:"nav main"}@media (prefers-reduced-motion){.shell-layout.sc-swirl-shell-layout{transition:none}}@media (min-width: 992px){.shell-layout.sc-swirl-shell-layout{padding-right:var(--s-space-8);padding-bottom:var(--s-space-8);-moz-column-gap:var(--s-space-8);column-gap:var(--s-space-8);grid-template-columns:var(--swirl-shell-extended-nav-width) 1fr 0;grid-template-rows:var(--swirl-shell-header-height) 1fr;grid-template-areas:"header header header"\n "nav main sidebar"}}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout{border-bottom:none;color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout{color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-action-primary-hovered)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-action-primary-pressed)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout swirl-badge.sc-swirl-shell-layout{--swirl-badge-border-color:var(--s-action-primary-default)}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{scrollbar-width:none}.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout::-webkit-scrollbar{width:0;background:transparent;-webkit-appearance:none}}.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul>*,.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul>*{max-width:100%;max-height:3rem;flex-basis:100%}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout{grid-template-columns:var(--swirl-shell-collapsed-nav-width) 1fr 0}}.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{transform:translate3d(0, 0, 0);box-shadow:var(--s-shadow-level-3)}@media (min-width: 992px){.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{transform:none;box-shadow:none}}.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{display:block}@media (min-width: 992px){.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{display:none}}.shell-layout--has-secondary-nav.sc-swirl-shell-layout .shell-layout__secondary-nav.sc-swirl-shell-layout{display:block}.shell-layout--secondary-nav-collapsed.sc-swirl-shell-layout .shell-layout__secondary-nav-items.sc-swirl-shell-layout{display:none}.shell-layout__header.sc-swirl-shell-layout{position:relative;display:none;width:calc(100% + var(--s-space-8));padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);justify-content:space-between;align-items:center;color:var(--swirl-shell-text-color);grid-area:header}@media (min-width: 992px){.shell-layout__header.sc-swirl-shell-layout{display:flex}}.shell-layout__skip-link.sc-swirl-shell-layout{position:absolute;z-index:9;top:0;left:0;padding:var(--s-space-4);border:none;color:var(--swirl-shell-text-color);background-color:var(--swirl-shell-background);font:inherit;cursor:pointer}.shell-layout__skip-link.sc-swirl-shell-layout:not(:focus):not(:active){position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}.shell-layout__header-left.sc-swirl-shell-layout{display:flex;padding-left:var(--s-space-2);flex-basis:8rem;flex-shrink:0;align-items:center;gap:var(--s-space-8)}.shell-layout__header-right.sc-swirl-shell-layout{--swirl-ghost-button-background-default:var(--s-surface-sunken-default);--swirl-ghost-button-background-hovered:var(--s-surface-sunken-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-sunken-pressed);display:flex;flex-basis:8rem;flex-shrink:0;justify-content:flex-end;align-items:center;gap:var(--s-space-8)}.shell-layout__logo.sc-swirl-shell-layout{display:flex;flex-grow:1;justify-content:center;align-items:center}.shell-layout__logo.sc-swirl-shell-layout-s>a{display:flex}.shell-layout__logo.sc-swirl-shell-layout-s>a img,.shell-layout__logo.sc-swirl-shell-layout-s>img{max-height:1.75rem}.shell-layout__header-tool.sc-swirl-shell-layout{position:relative;width:2.25rem;height:2.25rem;padding:var(--s-space-8);flex-shrink:0;border:none;border-radius:var(--s-border-radius-sm);color:var(--swirl-shell-text-color);background-color:var(--s-surface-sunken-default);font:inherit;cursor:pointer}.shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-surface-sunken-hovered)}.shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-surface-sunken-pressed)}.shell-layout__header-tool.sc-swirl-shell-layout:focus{outline:none}.shell-layout__header-tool.sc-swirl-shell-layout:focus-visible{box-shadow:0 0 0 0.125rem var(--s-focus-default)}.shell-layout__header-tool.sc-swirl-shell-layout swirl-badge.sc-swirl-shell-layout{--swirl-badge-border-color:var(--s-surface-sunken-default);position:absolute;top:var(--s-space-2);right:var(--s-space-2);padding-right:var(--s-space-2);transform:translate3d(0.1875rem, 0, 0)}.shell-layout__nav.sc-swirl-shell-layout{position:fixed;z-index:9;top:0;bottom:0;left:0;overflow-x:hidden;overflow-y:auto;width:100%;max-width:18.75rem;color:var(--swirl-shell-text-color);background-color:var(--s-surface-overlay-default);transition:transform 0.1s, box-shadow 0.1s, width 0.1s;transform:translate3d(-100%, 0, 0);grid-area:nav}@media (prefers-reduced-motion){.shell-layout__nav.sc-swirl-shell-layout{transition:none}}@media (min-width: 992px){.shell-layout__nav.sc-swirl-shell-layout{position:relative;max-width:none;padding-top:0;padding-right:var(--s-space-4);padding-bottom:var(--s-space-8);padding-left:var(--s-space-12);background-color:var(--swirl-shell-background);transform:none;box-shadow:none;inset:auto}}.shell-layout__mobile-header.sc-swirl-shell-layout{display:flex;min-height:3.5rem;margin-bottom:var(--s-space-8);padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);justify-content:space-between;align-items:center;border-bottom:0.0625rem solid var(--s-border-default)}.shell-layout__mobile-header.sc-swirl-shell-layout-s>img{max-height:1.75rem}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout{background-color:var(--s-surface-overlay-default)}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-surface-overlay-hovered)}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-surface-overlay-pressed)}@media (min-width: 992px){.shell-layout__mobile-header.sc-swirl-shell-layout{display:none}}.shell-layout__mobile-header-tools.sc-swirl-shell-layout{display:flex;justify-content:flex-end;align-items:center;gap:var(--s-space-8)}.shell-layout__nav-body.sc-swirl-shell-layout{padding:var(--s-space-8)}.shell-layout__nav-body.sc-swirl-shell-layout-s ul{margin:0;padding:0;list-style:none}.shell-layout__nav-body.sc-swirl-shell-layout-s li{display:flex}@media (min-width: 992px){.shell-layout__nav-body.sc-swirl-shell-layout{padding:0}}.shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{position:fixed;z-index:8;display:none;background-color:rgba(0, 0, 0, 0.25);animation:shell-layout-backdrop-fade-in 0.1s;inset:0}.shell-layout__secondary-nav.sc-swirl-shell-layout{display:none}.shell-layout__secondary-nav-items.sc-swirl-shell-layout-s>ul,.shell-layout__secondary-nav-items .sc-swirl-shell-layout-s>ul{display:flex;flex-direction:column;gap:var(--s-space-2)}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul{flex-wrap:wrap;flex-direction:row;gap:var(--s-space-16)}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul>*,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul>*{min-width:0;max-height:none}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.shell-layout__secondary-nav-items--app-icon.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.shell-layout__secondary-nav-items--app-icon .sc-swirl-shell-layout-s>ul{row-gap:var(--s-space-16);-moz-column-gap:0;column-gap:0}.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--tiled.sc-swirl-shell-layout-s>ul,.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--tiled .sc-swirl-shell-layout-s>ul{gap:var(--s-space-16)}.shell-layout__secondary-nav-items--tiled.sc-swirl-shell-layout-s>ul>*,.shell-layout__secondary-nav-items--tiled .sc-swirl-shell-layout-s>ul>*{flex-basis:calc(50% - var(--s-space-8))}.shell-layout__secondary-nav-items--app-icon.sc-swirl-shell-layout-s>ul>*,.shell-layout__secondary-nav-items--app-icon .sc-swirl-shell-layout-s>ul>*{flex-basis:calc(100% / 3)}.shell-layout__main.sc-swirl-shell-layout{overflow:hidden;background-color:var(--s-background-default);grid-area:main}@media (min-width: 992px){.shell-layout__main.sc-swirl-shell-layout{width:calc(100% + var(--s-space-8));border:0.0625rem solid var(--s-border-default);border-radius:var(--s-border-radius-sm)}}@keyframes shell-layout-backdrop-fade-in{from{opacity:0}to{opacity:1}}@keyframes shell-layout-no-overflow-after-transition{0%{overflow:initial}99%{overflow:initial}100%{overflow:hidden}}';export{c as swirl_shell_layout}
1
+ import{r as l,c as e,h as a,H as s,d as o}from"./p-g4wOnHIT.js";import{c as t}from"./p-orsBiyT_.js";import{c as i}from"./p-DIdMBZfn.js";import{m as r}from"./p-wi_3Z3FQ.js";const n="SWIRL_SHELL_SECONDARY_NAVIGATION_COLLAPSE_STATE",d="SWIRL_SHELL_SECONDARY_NAVIGATION_VIEW_STATE",h="SWIRL_SHELL_NAVIGATION_COLLAPSE_STATE",c=class{constructor(a){l(this,a),this.skipLinkClick=e(this,"skipLinkClick",7),this.browserBackButtonLabel="Navigate back",this.browserForwardButtonLabel="Navigate forward",this.collapseNavigationButtonLabel="Collapse navigation",this.enableSecondaryNavGridLayout=!0,this.secondaryNavGridLayoutVariant="tiled",this.expandNavigationButtonLabel="Expand navigation",this.gridNavLayoutToggleLabel="Grid",this.hideMobileNavigationButtonLabel="Close navigation",this.listNavLayoutToggleLabel="List",this.navigationLabel="Main",this.secondaryNavCollapseLabel="Show less",this.secondaryNavExpandLabel="Show more",this.skipLinkLabel="Skip to main content",this.isDesktopViewport=!0,this.secondaryNavView="list",this.collectNavItems=()=>{this.mainNavItems=Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='nav'], [slot='nav'] swirl-shell-navigation-item")),this.secondaryNavItems=Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='secondary-nav'], [slot='secondary-nav'] swirl-shell-navigation-item")),this.toggleNavItemLabels(),this.setSecondaryNavItemsTiled()},this.toggleSecondaryNavView=l=>{l.stopPropagation(),this.secondaryNavView="grid"===this.secondaryNavView?"list":"grid",this.setSecondaryNavItemsTiled(),localStorage.setItem(d,String(this.secondaryNavView))},this.toggleSecondaryNavCollapse=l=>{l.stopPropagation(),this.secondaryNavCollapsed=!this.secondaryNavCollapsed,localStorage.setItem(n,String(this.secondaryNavCollapsed))},this.onNavigationToggleClick=()=>{this.navigationCollapsed=!this.navigationCollapsed},this.onNavigationClick=()=>{this.hideMobileNavigation()}}componentWillLoad(){this.isDesktopViewport=r(),this.collectNavItems();const l="true"===localStorage.getItem(h);this.navigationCollapsed=l,this.restoreSecondaryNavState()}componentDidLoad(){this.focusTrap=i(this.navElement,{allowOutsideClick:!0,tabbableOptions:{getShadowRoot:l=>l.shadowRoot}}),this.collectNavItems(),this.navMutationObserver=new MutationObserver((()=>{this.collectNavItems()})),this.navMutationObserver.observe(this.navElement,{childList:!0,subtree:!0})}componentDidRender(){this.focusTrap?.updateContainerElements(this.navElement)}disconnectedCallback(){this.focusTrap?.deactivate(),this.navMutationObserver?.disconnect()}onWindowKeyDown(l){"Escape"===l.key&&this.mobileNavigationActive&&this.hideMobileNavigation()}watchEnableSecondaryNavGridLayout(){this.restoreSecondaryNavState()}watchMobileNavigationState(){this.mobileNavigationActive?setTimeout((()=>{this.focusTrap.activate()}),200):this.focusTrap.deactivate()}watchNavigationCollapsed(){localStorage.setItem(h,String(this.navigationCollapsed)),this.toggleNavItemLabels(),this.setSecondaryNavItemsTiled()}onWindowResize(){this.isDesktopViewport!==r()&&(this.isDesktopViewport=r(),this.collectNavItems())}async showMobileNavigation(){this.mobileNavigationActive=!0,this.collectNavItems()}async hideMobileNavigation(){this.mobileNavigationActive=!1,this.toggleNavItemLabels()}toggleNavItemLabels(){[...this.secondaryNavItems,...this.mainNavItems].forEach((l=>{l.hideLabel=this.navigationCollapsed&&this.isDesktopViewport}))}setSecondaryNavItemsTiled(){this.secondaryNavItems.forEach((l=>{l.variant=this.enableSecondaryNavGridLayout&&("grid"===this.secondaryNavView||this.navigationCollapsed&&this.isDesktopViewport)?this.secondaryNavGridLayoutVariant:"default"}))}restoreSecondaryNavState(){if(this.enableSecondaryNavGridLayout){const l="true"===localStorage.getItem(n);this.secondaryNavCollapsed=l;const e=localStorage.getItem(d);this.secondaryNavView=e}}render(){const l=this.navigationCollapsed&&this.isDesktopViewport,e=Boolean(this.el.querySelector("[slot='secondary-nav']")),o=t("shell-layout",{"shell-layout--branded-header":this.brandedHeader,"shell-layout--secondary-nav-collapsed":this.secondaryNavCollapsed,"shell-layout--has-secondary-nav":e,"shell-layout--mobile-navigation-active":this.mobileNavigationActive,"shell-layout--navigation-collapsed":l});return a(s,{key:"ba71850ab25187477de0fd280333491e17aa507e"},a("div",{key:"1783f51de5c40b6b58a8c351c12259dcf360eb8b",class:o},a("header",{key:"60e343ccfcab61ac22310c7cb49a27cf545d5bd2",class:"shell-layout__header","data-tauri-drag-region":"true"},a("button",{key:"add3019d8df87297e691ceadd0e9a608207a4c02",class:"shell-layout__skip-link",onClick:this.skipLinkClick.emit,type:"button"},this.skipLinkLabel),a("div",{key:"8aeeebda57bcf6b99806896d3e77a29c577ef64b",class:"shell-layout__header-left"},a("swirl-tooltip",{key:"8c76fce6027707fc32c50d2628a82954fc9b948c",content:this.navigationCollapsed?this.expandNavigationButtonLabel:this.collapseNavigationButtonLabel,delay:100,position:"right"},a("button",{key:"ac3db57bb52dd17e08e429e6a322c854367bcc63",class:"shell-layout__header-tool",onClick:this.onNavigationToggleClick,type:"button"},a(this.navigationCollapsed?"swirl-icon-dock-left-expand":"swirl-icon-dock-left-collapse",{size:20}),a("swirl-visually-hidden",{key:"74a9b9f0f625c3cf1ecd4d54d6da9e7820e4fe79"},this.navigationCollapsed?this.expandNavigationButtonLabel:this.collapseNavigationButtonLabel))),a("a",{key:"3e79631fa44f47145c3d04904fd82d8c1123a5de",class:"shell-layout__header-tool",href:"javascript:history.back()"},a("swirl-icon-arrow-back",{key:"2344d7fb3dd96d2324cc722201994441d9681554",size:20}),a("swirl-visually-hidden",{key:"57f42760e017b7564aef0a09c2cce29623bbb238"},this.browserBackButtonLabel)),a("a",{key:"8d82f609f9d21ba4aabdc6f6984ef865ca13482f",class:"shell-layout__header-tool",href:"javascript:history.forward()"},a("swirl-icon-arrow-forward",{key:"877244452295b3bc41f51393bc56660287e5f394",size:20}),a("swirl-visually-hidden",{key:"55053998bd6f93f168b13de4d91b8771f380db21"},this.browserForwardButtonLabel)),a("slot",{key:"b51a7edc15aa6fb8b86474d0f7a94f0da4b9dc66",name:"left-header-tools"})),a("div",{key:"e3be12dfb40ad48280f5ce919cbbb03126a9b136",class:"shell-layout__logo"},a("slot",{key:"d6292d958c06e33b25f5b848ef1f305560b346a6",name:"logo"})),a("div",{key:"432770ab91b3fb0d6512632ca7272cc02220f93f",class:"shell-layout__header-right"},a("slot",{key:"ffe6e81aacc341b6617ead1191b5172779f0e6bb",name:"right-header-tools"}),a("slot",{key:"45aa7fa1d83cbc7cd25a3479247d62ba14d39839",name:"avatar"}))),a("div",{key:"c11e952da53499494f794e1439519862580c28cf",class:"shell-layout__mobile-nav-backdrop",onClick:this.onNavigationClick}),a("nav",{key:"e718116e58c0c9b9875d16f7b340f7b10284c407","aria-labelledby":"main-navigation-label",class:"shell-layout__nav",onClick:this.onNavigationClick,ref:l=>this.navElement=l},a("div",{key:"9461acc9b41bebd9ab0d5a8cf2535babb18e3ec0",class:"shell-layout__mobile-header"},a("slot",{key:"bd90c25a4f27085037853fd96df9c04167d31413",name:"mobile-logo"}),a("div",{key:"affad63e0ae66b9810479ff1472101bc71b1b745",class:"shell-layout__mobile-header-tools"},a("slot",{key:"4cac99bc568ff6d345c3d8c8921cadd38e054294",name:"mobile-header-tools"}),a("button",{key:"b6e53b7a8e5b0be7c4bc81626fced0a0b22ac807",class:"shell-layout__header-tool",type:"button"},a("swirl-icon-double-arrow-left",{key:"52fe0309bc2ff3c988c406dcbd34ea505e602ef3",size:20}),a("swirl-visually-hidden",{key:"7425e4993d3c11609673d5444f197b4cce23b0b0"},this.hideMobileNavigationButtonLabel)))),a("div",{key:"76e3108a837e780f5ba7c115d9ab9c654cee2583",class:"shell-layout__nav-body"},a("swirl-visually-hidden",{key:"93a613134cf84890462f030007f8712f67e896ce"},a("span",{key:"8abd0fe2b0b7dab953ff12fb4d6b23129ffee71e",id:"main-navigation-label"},this.navigationLabel)),a("slot",{key:"493535666ed3af1401c90142654362abb4783a05",name:"nav",onSlotchange:this.collectNavItems}),a("div",{key:"70799718bc984b00f421f3dcbee1e46d131fd439",class:"shell-layout__secondary-nav"},a("swirl-separator",{key:"0a956f25ae179002f308aa8a0e1278b18fbbd26e",color:"strong",spacing:"16"}),this.enableSecondaryNavGridLayout&&a("swirl-box",{key:"ed807b244604feb205503ca6951240c556f2ff99",paddingBlockEnd:"16"},a("swirl-stack",{key:"90d40a649043b463531d6614e0ba4dfd6d675006",justify:l?"center":"space-between",orientation:"horizontal"},a("swirl-button",{key:"dfdbd0a375bf32cf06fde7eee4cf9a64640d78ca",hideLabel:l,icon:this.secondaryNavCollapsed?"<swirl-icon-expand-more></swirl-icon-expand-more>":"<swirl-icon-expand-less></swirl-icon-expand-less>",label:this.secondaryNavCollapsed?this.secondaryNavExpandLabel:this.secondaryNavCollapseLabel,onClick:this.toggleSecondaryNavCollapse,variant:"plain"}),!l&&!this.secondaryNavCollapsed&&a("swirl-button",{key:"55467b2ec7f96372bedaba657b068bf2b044bd4d",icon:"grid"===this.secondaryNavView?"<swirl-icon-menu></swirl-icon-menu>":"<swirl-icon-hamburger-menu></swirl-icon-hamburger-menu>",iconPosition:"end",label:"grid"===this.secondaryNavView?this.gridNavLayoutToggleLabel:this.listNavLayoutToggleLabel,onClick:this.toggleSecondaryNavView,variant:"plain"}))),a("div",{key:"38f99681433035f63b2fcc9185d7e6b1888f4bb4",class:{[`shell-layout__secondary-nav-items--${this.secondaryNavGridLayoutVariant}`]:!0,"shell-layout__secondary-nav-items":!0,"shell-layout__secondary-nav-items--grid-view":this.enableSecondaryNavGridLayout&&"grid"===this.secondaryNavView}},a("slot",{key:"8d49eb0021897e49b9271c5ead87cc67befe0fdc",name:"secondary-nav",onSlotchange:this.collectNavItems}))))),a("main",{key:"5e3c5fcff583838c418f4a6989b7e10b63831a4f",class:"shell-layout__main",id:"main-content"},a("slot",{key:"688823dcc10d0b29c9a08e014ad8769b8ac22f61"}))))}get el(){return o(this)}static get watchers(){return{enableSecondaryNavGridLayout:["watchEnableSecondaryNavGridLayout"],mobileNavigationActive:["watchMobileNavigationState"],navigationCollapsed:["watchNavigationCollapsed"]}}};c.style='.sc-swirl-shell-layout-h{--swirl-shell-background:var(--s-surface-sunken-default);--swirl-shell-text-color:var(--s-text-default);--swirl-shell-header-height:3.25rem;--swirl-shell-collapsed-nav-width:4rem;--swirl-shell-extended-nav-width:18rem;display:flex;width:100%;height:100%}.sc-swirl-shell-layout-h *.sc-swirl-shell-layout{box-sizing:border-box}.shell-layout.sc-swirl-shell-layout{display:grid;overflow:hidden;width:100%;min-height:100%;background-color:var(--swirl-shell-background);transition:grid-template-columns 0.1s;grid-template-columns:0 1fr 0;grid-template-rows:1fr;grid-template-areas:"nav main"}@media (prefers-reduced-motion){.shell-layout.sc-swirl-shell-layout{transition:none}}@media (min-width: 992px){.shell-layout.sc-swirl-shell-layout{padding-right:var(--s-space-8);padding-bottom:var(--s-space-8);-moz-column-gap:var(--s-space-8);column-gap:var(--s-space-8);grid-template-columns:var(--swirl-shell-extended-nav-width) 1fr 0;grid-template-rows:var(--swirl-shell-header-height) 1fr;grid-template-areas:"header header header"\n "nav main sidebar"}}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout{border-bottom:none;color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout{color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-action-primary-hovered)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-action-primary-pressed)}.shell-layout--branded-header.sc-swirl-shell-layout .shell-layout__header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout swirl-badge.sc-swirl-shell-layout{--swirl-badge-border-color:var(--s-action-primary-default)}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{scrollbar-width:none}.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout::-webkit-scrollbar{width:0;background:transparent;-webkit-appearance:none}}.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul>*,.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul>*{max-width:100%;max-height:3rem;flex-basis:100%}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout{grid-template-columns:var(--swirl-shell-collapsed-nav-width) 1fr 0}}.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{transform:translate3d(0, 0, 0);box-shadow:var(--s-shadow-level-3)}@media (min-width: 992px){.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout{transform:none;box-shadow:none}}.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{display:block}@media (min-width: 992px){.shell-layout--mobile-navigation-active.sc-swirl-shell-layout .shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{display:none}}.shell-layout--has-secondary-nav.sc-swirl-shell-layout .shell-layout__secondary-nav.sc-swirl-shell-layout{display:block}.shell-layout--secondary-nav-collapsed.sc-swirl-shell-layout .shell-layout__secondary-nav-items.sc-swirl-shell-layout{display:none}.shell-layout__header.sc-swirl-shell-layout{position:relative;display:none;width:calc(100% + var(--s-space-8));padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);justify-content:space-between;align-items:center;color:var(--swirl-shell-text-color);grid-area:header}@media (min-width: 992px){.shell-layout__header.sc-swirl-shell-layout{display:flex}}.shell-layout__skip-link.sc-swirl-shell-layout{position:absolute;z-index:9;top:0;left:0;padding:var(--s-space-4);border:none;color:var(--swirl-shell-text-color);background-color:var(--swirl-shell-background);font:inherit;cursor:pointer}.shell-layout__skip-link.sc-swirl-shell-layout:not(:focus):not(:active){position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}.shell-layout__header-left.sc-swirl-shell-layout{display:flex;padding-left:var(--s-space-2);flex-basis:8rem;flex-shrink:0;align-items:center;gap:var(--s-space-8)}.shell-layout__header-right.sc-swirl-shell-layout{--swirl-ghost-button-background-default:var(--s-surface-sunken-default);--swirl-ghost-button-background-hovered:var(--s-surface-sunken-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-sunken-pressed);display:flex;flex-basis:8rem;flex-shrink:0;justify-content:flex-end;align-items:center;gap:var(--s-space-8)}.shell-layout__logo.sc-swirl-shell-layout{display:flex;flex-grow:1;justify-content:center;align-items:center}.shell-layout__logo.sc-swirl-shell-layout-s>a{display:flex}.shell-layout__logo.sc-swirl-shell-layout-s>a img,.shell-layout__logo.sc-swirl-shell-layout-s>img{max-height:1.75rem}.shell-layout__header-tool.sc-swirl-shell-layout{position:relative;width:2.25rem;height:2.25rem;padding:var(--s-space-8);flex-shrink:0;border:none;border-radius:var(--s-border-radius-sm);color:var(--swirl-shell-text-color);background-color:var(--s-surface-sunken-default);font:inherit;cursor:pointer}.shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-surface-sunken-hovered)}.shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-surface-sunken-pressed)}.shell-layout__header-tool.sc-swirl-shell-layout:focus{outline:none}.shell-layout__header-tool.sc-swirl-shell-layout:focus-visible{box-shadow:0 0 0 0.125rem var(--s-focus-default)}.shell-layout__header-tool.sc-swirl-shell-layout swirl-badge.sc-swirl-shell-layout{--swirl-badge-border-color:var(--s-surface-sunken-default);position:absolute;top:var(--s-space-2);right:var(--s-space-2);padding-right:var(--s-space-2);transform:translate3d(0.1875rem, 0, 0)}.shell-layout__nav.sc-swirl-shell-layout{position:fixed;z-index:9;top:0;bottom:0;left:0;overflow-x:hidden;overflow-y:auto;width:100%;max-width:18.75rem;color:var(--swirl-shell-text-color);background-color:var(--s-surface-overlay-default);transition:transform 0.1s, box-shadow 0.1s, width 0.1s;transform:translate3d(-100%, 0, 0);grid-area:nav}@media (prefers-reduced-motion){.shell-layout__nav.sc-swirl-shell-layout{transition:none}}@media (min-width: 992px){.shell-layout__nav.sc-swirl-shell-layout{position:relative;max-width:none;padding-top:0;padding-right:var(--s-space-4);padding-bottom:var(--s-space-8);padding-left:var(--s-space-12);background-color:var(--swirl-shell-background);transform:none;box-shadow:none;inset:auto}}.shell-layout__mobile-header.sc-swirl-shell-layout{display:flex;min-height:3.5rem;margin-bottom:var(--s-space-8);padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);justify-content:space-between;align-items:center;border-bottom:0.0625rem solid var(--s-border-default)}.shell-layout__mobile-header.sc-swirl-shell-layout-s>img{max-height:1.75rem}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout{background-color:var(--s-surface-overlay-default)}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:hover{background-color:var(--s-surface-overlay-hovered)}.shell-layout__mobile-header.sc-swirl-shell-layout .shell-layout__header-tool.sc-swirl-shell-layout:active{background-color:var(--s-surface-overlay-pressed)}@media (min-width: 992px){.shell-layout__mobile-header.sc-swirl-shell-layout{display:none}}.shell-layout__mobile-header-tools.sc-swirl-shell-layout{display:flex;justify-content:flex-end;align-items:center;gap:var(--s-space-8)}.shell-layout__nav-body.sc-swirl-shell-layout{padding:var(--s-space-8)}.shell-layout__nav-body.sc-swirl-shell-layout-s ul{margin:0;padding:0;list-style:none}.shell-layout__nav-body.sc-swirl-shell-layout-s li{display:flex}@media (min-width: 992px){.shell-layout__nav-body.sc-swirl-shell-layout{padding:0}}.shell-layout__mobile-nav-backdrop.sc-swirl-shell-layout{position:fixed;z-index:8;display:none;background-color:rgba(0, 0, 0, 0.25);animation:shell-layout-backdrop-fade-in 0.1s;inset:0}.shell-layout__secondary-nav.sc-swirl-shell-layout{display:none}.shell-layout__secondary-nav-items.sc-swirl-shell-layout-s>ul,.shell-layout__secondary-nav-items .sc-swirl-shell-layout-s>ul{display:flex;flex-direction:column;gap:var(--s-space-2)}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul{flex-wrap:wrap;flex-direction:row;gap:var(--s-space-16)}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.sc-swirl-shell-layout-s>ul>*,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view .sc-swirl-shell-layout-s>ul>*{min-width:0;max-height:none}.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.shell-layout__secondary-nav-items--app-icon.sc-swirl-shell-layout-s>ul,.shell-layout:not(.shell-layout--navigation-collapsed) .shell-layout__secondary-nav-items--grid-view.shell-layout__secondary-nav-items--app-icon .sc-swirl-shell-layout-s>ul{row-gap:var(--s-space-16);-moz-column-gap:0;column-gap:0}.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--tiled.sc-swirl-shell-layout-s>ul,.shell-layout--navigation-collapsed .shell-layout__secondary-nav-items--tiled .sc-swirl-shell-layout-s>ul{gap:var(--s-space-16)}.shell-layout__secondary-nav-items--tiled.sc-swirl-shell-layout-s>ul>*,.shell-layout__secondary-nav-items--tiled .sc-swirl-shell-layout-s>ul>*{flex-basis:calc(50% - var(--s-space-8))}.shell-layout__secondary-nav-items--app-icon.sc-swirl-shell-layout-s>ul>*,.shell-layout__secondary-nav-items--app-icon .sc-swirl-shell-layout-s>ul>*{flex-basis:calc(100% / 3)}.shell-layout__main.sc-swirl-shell-layout{overflow:hidden;background-color:var(--s-background-default);grid-area:main}@media (min-width: 992px){.shell-layout__main.sc-swirl-shell-layout{width:calc(100% + var(--s-space-8));border:0.0625rem solid var(--s-border-default);border-radius:var(--s-border-radius-sm)}}@keyframes shell-layout-backdrop-fade-in{from{opacity:0}to{opacity:1}}@keyframes shell-layout-no-overflow-after-transition{0%{overflow:initial}99%{overflow:initial}100%{overflow:hidden}}';export{c as swirl_shell_layout}
@@ -1 +1 @@
1
- import{r as a,c as t,h as r,H as b,d as i}from"./p-g4wOnHIT.js";import{c as s}from"./p-orsBiyT_.js";import{n as e}from"./p-wi_3Z3FQ.js";const l=class{constructor(r){a(this,r),this.activateNextTab=t(this,"activateNextTab",7),this.activatePreviousTab=t(this,"activatePreviousTab",7),this.activateTab=t(this,"activateTab",7),this.justify="start",this.tabs=[],this.variant="default",this.onKeyDown=a=>{"ArrowLeft"===a.code?(a.preventDefault(),this.focusAdjacentTab(!0),this.activatePreviousTab.emit()):"ArrowRight"===a.code&&(a.preventDefault(),this.focusAdjacentTab(!1),this.activateNextTab.emit())}}onTabFocus(a){a.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}focusAdjacentTab(a){const t=this.getTabs(),r=t.findIndex((a=>"true"===a.ariaSelected));t[e(a?r-1:r+1,t.length)].focus()}getTabs(){return Array.from(this.el.querySelectorAll('[role="tab"]'))}render(){const a=s("tab-bar",`tab-bar--justify-${this.justify}`,{"tab-bar--variant-pill":"pill"===this.variant,"tab-bar--variant-default":"default"===this.variant}),t={paddingInlineEnd:Boolean(this.paddingInlineEnd)?`var(--s-space-${this.paddingInlineEnd})`:void 0,paddingInlineStart:Boolean(this.paddingInlineStart)?`var(--s-space-${this.paddingInlineStart})`:void 0,paddingBlockEnd:Boolean(this.paddingBlockEnd)?`var(--s-space-${this.paddingBlockEnd})`:void 0,paddingBlockStart:Boolean(this.paddingBlockStart)?`var(--s-space-${this.paddingBlockStart})`:void 0};return r(b,{key:"c9eb4387117f55dc8e15ececb03abc782bd60c47"},r("div",{key:"198f1ae4656ed77baab425a2a73d39657deb5c0a","aria-label":this.label,class:a,onKeyDown:this.onKeyDown,role:this.disableTabSemantics?void 0:"tablist",style:t},this.tabs.map((a=>{const t=s("tab-bar__tab",{"tab-bar__tab--active":a.active,"tab-bar__tab--variant-pill":"pill"===this.variant,"tab-bar__tab--variant-default":"default"===this.variant}),b=s("tab-bar__tab-label",{"tab-bar__tab-label--variant-pill":"pill"===this.variant});return r("button",{"aria-controls":this.disableTabSemantics?void 0:a.id,"aria-selected":this.disableTabSemantics?void 0:a.active?"true":"false",class:t,id:`tab-${a.id}`,key:a.id,onClick:()=>this.activateTab.emit(a.id),onFocus:this.onTabFocus,role:this.disableTabSemantics?void 0:"tab",tabIndex:this.disableTabSemantics?void 0:a.active?0:-1,type:"button"},a.icon&&r("span",{class:"tab-bar__tab-icon",innerHTML:a.icon}),r("span",{class:b},a.label,a.suffix&&r("span",{class:"tab-bar__tab-suffix"},a.suffix)))}))))}get el(){return i(this)}};l.style='.sc-swirl-tab-bar-h{display:flex;height:var(--swirl-tab-bar-height)}.sc-swirl-tab-bar-h *.sc-swirl-tab-bar{box-sizing:border-box}.tab-bar.sc-swirl-tab-bar{position:relative;display:flex;overflow-x:auto;width:100%;justify-content:flex-start;scrollbar-width:none}.tab-bar.tab-bar--variant-default.sc-swirl-tab-bar{border-bottom:var(--swirl-tab-bar-border-width) solid\n var(--s-border-default)}.tab-bar.tab-bar--variant-pill.sc-swirl-tab-bar{gap:var(--s-space-8)}.tab-bar--justify-evenly.sc-swirl-tab-bar>*.sc-swirl-tab-bar{flex:1}.tab-bar__tab.sc-swirl-tab-bar{position:relative;display:flex;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;margin:0;justify-content:center;align-items:center;border:none;font:inherit;font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-lg);cursor:pointer}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar{padding:var(--s-space-4) var(--s-space-8);color:var(--s-interactive-neutral-default);background-color:transparent}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):hover{color:var(--s-interactive-neutral-hovered)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):hover:after{position:absolute;bottom:0;left:50%;width:calc(100% - var(--s-space-8));height:0.1875rem;border-radius:0.125rem;background-color:var(--s-border-default);content:"";transform:translateX(-50%);pointer-events:none}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):hover .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-interactive-neutral-hovered)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):active{color:var(--s-interactive-neutral-pressed)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):active .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-interactive-neutral-pressed)}.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active.sc-swirl-tab-bar{color:var(--s-text-highlight)}.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active.sc-swirl-tab-bar:after{position:absolute;bottom:0;left:50%;width:calc(100% - var(--s-space-8));height:0.1875rem;border-radius:0.125rem;background-color:var(--s-border-highlight);content:"";transform:translateX(-50%);pointer-events:none}.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active.sc-swirl-tab-bar .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-text-highlight)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:focus{outline:none}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:focus-visible .tab-bar__tab-label.sc-swirl-tab-bar{border-radius:var(--s-border-radius-s);box-shadow:inset 0 0 0 0.125rem var(--s-focus-default)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar{padding:var(--s-space-8) var(--s-space-16);border-radius:var(--s-border-radius-full-round);color:var(--s-text-default);background:var(--s-action-neutral-default);gap:var(--s-space-8)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar:hover{background:var(--s-action-neutral-hovered)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar:active{background:var(--s-action-neutral-pressed)}.tab-bar__tab.tab-bar__tab--variant-pill.tab-bar__tab--active.sc-swirl-tab-bar{color:var(--s-text-on-action-primary);background:var(--s-action-primary-default)}.tab-bar__tab.tab-bar__tab--variant-pill.tab-bar__tab--active.sc-swirl-tab-bar .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-text-on-action-primary)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-text-subdued)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.tab-bar__tab.sc-swirl-tab-bar{padding:calc(var(--s-space-4) + var(--s-space-2)) var(--s-space-8);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.tab-bar__tab-icon.sc-swirl-tab-bar{display:inline-flex}.tab-bar__tab-label.sc-swirl-tab-bar{display:inline-flex;padding:var(--s-space-8) var(--s-space-8);text-align:center;white-space:nowrap;gap:var(--s-space-4)}.tab-bar__tab-label.tab-bar__tab-label--variant-pill.sc-swirl-tab-bar{padding:0}.tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-interactive-neutral-default);font-weight:var(--s-font-weight-normal)}';export{l as swirl_tab_bar}
1
+ import{r as a,c as t,h as r,H as b,d as i}from"./p-g4wOnHIT.js";import{c as s}from"./p-orsBiyT_.js";import{n as e}from"./p-wi_3Z3FQ.js";const l=class{constructor(r){a(this,r),this.activateNextTab=t(this,"activateNextTab",7),this.activatePreviousTab=t(this,"activatePreviousTab",7),this.activateTab=t(this,"activateTab",7),this.justify="start",this.tabs=[],this.variant="default",this.onKeyDown=a=>{"ArrowLeft"===a.code?(a.preventDefault(),this.focusAdjacentTab(!0),this.activatePreviousTab.emit()):"ArrowRight"===a.code&&(a.preventDefault(),this.focusAdjacentTab(!1),this.activateNextTab.emit())}}onTabFocus(a){a.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}focusAdjacentTab(a){const t=this.getTabs(),r=t.findIndex((a=>"true"===a.ariaSelected));t[e(a?r-1:r+1,t.length)].focus()}getTabs(){return Array.from(this.el.querySelectorAll('[role="tab"]'))}render(){const a=s("tab-bar",`tab-bar--justify-${this.justify}`,{"tab-bar--variant-pill":"pill"===this.variant,"tab-bar--variant-default":"default"===this.variant}),t={paddingInlineEnd:Boolean(this.paddingInlineEnd)?`var(--s-space-${this.paddingInlineEnd})`:void 0,paddingInlineStart:Boolean(this.paddingInlineStart)?`var(--s-space-${this.paddingInlineStart})`:void 0,paddingBlockEnd:Boolean(this.paddingBlockEnd)?`var(--s-space-${this.paddingBlockEnd})`:void 0,paddingBlockStart:Boolean(this.paddingBlockStart)?`var(--s-space-${this.paddingBlockStart})`:void 0};return r(b,{key:"281aeb39ec1dad585e2d528867b95eae025954d4"},r("div",{key:"0563370c98c70a77e0fb2b763fa1314e71f629e9","aria-label":this.label,class:a,onKeyDown:this.onKeyDown,role:this.disableTabSemantics?void 0:"tablist",style:t},this.tabs.map((a=>{const t=s("tab-bar__tab",{"tab-bar__tab--active":a.active,"tab-bar__tab--variant-pill":"pill"===this.variant,"tab-bar__tab--variant-default":"default"===this.variant}),b=s("tab-bar__tab-label",{"tab-bar__tab-label--variant-pill":"pill"===this.variant});return r("button",{"aria-controls":this.disableTabSemantics?void 0:a.id,"aria-selected":this.disableTabSemantics?void 0:a.active?"true":"false",class:t,id:`tab-${a.id}`,key:a.id,onClick:()=>this.activateTab.emit(a.id),onFocus:this.onTabFocus,role:this.disableTabSemantics?void 0:"tab",tabIndex:this.disableTabSemantics?void 0:a.active?0:-1,type:"button"},a.icon&&r("span",{class:"tab-bar__tab-icon",innerHTML:a.icon}),r("span",{class:b},a.label,a.suffix&&r("span",{class:"tab-bar__tab-suffix"},a.suffix)))}))))}get el(){return i(this)}};l.style='.sc-swirl-tab-bar-h{display:flex;height:var(--swirl-tab-bar-height)}.sc-swirl-tab-bar-h *.sc-swirl-tab-bar{box-sizing:border-box}.tab-bar.sc-swirl-tab-bar{position:relative;display:flex;overflow-x:auto;width:100%;justify-content:flex-start;scrollbar-width:none}.tab-bar.tab-bar--variant-default.sc-swirl-tab-bar{border-bottom:var(--swirl-tab-bar-border-width) solid\n var(--s-border-default)}.tab-bar.tab-bar--variant-pill.sc-swirl-tab-bar{gap:var(--s-space-8)}.tab-bar--justify-evenly.sc-swirl-tab-bar>*.sc-swirl-tab-bar{flex:1}.tab-bar__tab.sc-swirl-tab-bar{position:relative;display:flex;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;margin:0;justify-content:center;align-items:center;border:none;font:inherit;font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-lg);cursor:pointer}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar{padding:var(--s-space-4) var(--s-space-8);color:var(--s-interactive-neutral-default);background-color:transparent}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):hover{color:var(--s-interactive-neutral-hovered)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):hover:after{position:absolute;bottom:0;left:50%;width:calc(100% - var(--s-space-8));height:0.1875rem;border-radius:0.125rem;background-color:var(--s-border-default);content:"";transform:translateX(-50%);pointer-events:none}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):hover .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-interactive-neutral-hovered)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):active{color:var(--s-interactive-neutral-pressed)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:not(.tab-bar__tab--active):active .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-interactive-neutral-pressed)}.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active.sc-swirl-tab-bar{color:var(--s-text-highlight)}.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active.sc-swirl-tab-bar:after{position:absolute;bottom:0;left:50%;width:calc(100% - var(--s-space-8));height:0.1875rem;border-radius:0.125rem;background-color:var(--s-border-highlight);content:"";transform:translateX(-50%);pointer-events:none}.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active.sc-swirl-tab-bar .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-text-highlight)}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:focus{outline:none}.tab-bar__tab.tab-bar__tab--variant-default.sc-swirl-tab-bar:focus-visible .tab-bar__tab-label.sc-swirl-tab-bar{border-radius:var(--s-border-radius-s);box-shadow:inset 0 0 0 0.125rem var(--s-focus-default)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar{padding:var(--s-space-8) var(--s-space-16);border-radius:var(--s-border-radius-full-round);color:var(--s-text-default);background:var(--s-action-neutral-default);gap:var(--s-space-8)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar:hover{background:var(--s-action-neutral-hovered)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar:active{background:var(--s-action-neutral-pressed)}.tab-bar__tab.tab-bar__tab--variant-pill.tab-bar__tab--active.sc-swirl-tab-bar{color:var(--s-text-on-action-primary);background:var(--s-action-primary-default)}.tab-bar__tab.tab-bar__tab--variant-pill.tab-bar__tab--active.sc-swirl-tab-bar .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-text-on-action-primary)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.tab-bar__tab.tab-bar__tab--variant-pill.sc-swirl-tab-bar .tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-text-subdued)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.tab-bar__tab.sc-swirl-tab-bar{padding:calc(var(--s-space-4) + var(--s-space-2)) var(--s-space-8);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.tab-bar__tab-icon.sc-swirl-tab-bar{display:inline-flex}.tab-bar__tab-label.sc-swirl-tab-bar{display:inline-flex;padding:var(--s-space-8) var(--s-space-8);text-align:center;white-space:nowrap;gap:var(--s-space-4)}.tab-bar__tab-label.tab-bar__tab-label--variant-pill.sc-swirl-tab-bar{padding:0}.tab-bar__tab-suffix.sc-swirl-tab-bar{color:var(--s-interactive-neutral-default);font-weight:var(--s-font-weight-normal)}';export{l as swirl_tab_bar}