@getflip/swirl-components 0.208.2 → 0.208.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.json +1 -1
- package/dist/cjs/swirl-action-list_3.cjs.entry.js +1 -1
- package/dist/cjs/swirl-app-layout_6.cjs.entry.js +13 -12
- package/dist/cjs/swirl-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/swirl-banner.cjs.entry.js +1 -1
- package/dist/cjs/swirl-button.cjs.entry.js +1 -1
- package/dist/cjs/swirl-carousel.cjs.entry.js +1 -1
- package/dist/cjs/swirl-chip.cjs.entry.js +1 -1
- package/dist/cjs/swirl-console-layout.cjs.entry.js +1 -1
- package/dist/cjs/swirl-date-input.cjs.entry.js +1 -1
- package/dist/cjs/swirl-date-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/swirl-file-viewer_7.cjs.entry.js +1 -1
- package/dist/cjs/swirl-form-control.cjs.entry.js +1 -1
- package/dist/cjs/swirl-icon-check-small_3.cjs.entry.js +1 -1
- package/dist/cjs/swirl-icon-error_3.cjs.entry.js +1 -1
- package/dist/cjs/swirl-inline-status.cjs.entry.js +1 -1
- package/dist/cjs/swirl-lightbox.cjs.entry.js +1 -1
- package/dist/cjs/swirl-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/swirl-menu.cjs.entry.js +1 -1
- package/dist/cjs/swirl-option-list_2.cjs.entry.js +1 -1
- package/dist/cjs/swirl-pagination.cjs.entry.js +1 -1
- package/dist/cjs/swirl-pdf-reader.cjs.entry.js +1 -1
- package/dist/cjs/swirl-popover_2.cjs.entry.js +1 -1
- package/dist/cjs/swirl-resource-list-file-item.cjs.entry.js +1 -1
- package/dist/cjs/swirl-search.cjs.entry.js +1 -1
- package/dist/cjs/swirl-select.cjs.entry.js +1 -1
- package/dist/cjs/swirl-shell-layout.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table-row.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table.cjs.entry.js +1 -1
- package/dist/cjs/swirl-text-input.cjs.entry.js +1 -1
- package/dist/cjs/swirl-time-input.cjs.entry.js +1 -1
- package/dist/cjs/swirl-toast.cjs.entry.js +1 -1
- package/dist/cjs/swirl-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/{utils-fc5855ec.js → utils-c82e5573.js} +4 -0
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-app-layout/swirl-app-layout.css +129 -0
- package/dist/collection/components/swirl-app-layout/swirl-app-layout.js +12 -11
- package/dist/collection/components/swirl-shell-layout/swirl-shell-layout.css +21 -0
- package/dist/collection/utils.js +3 -0
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-app-layout2.js +13 -12
- package/dist/components/swirl-file-viewer-pdf2.js +1 -1
- package/dist/components/swirl-shell-layout.js +1 -1
- package/dist/components/utils.js +4 -1
- package/dist/esm/swirl-action-list_3.entry.js +1 -1
- package/dist/esm/swirl-app-layout_6.entry.js +13 -12
- package/dist/esm/swirl-autocomplete.entry.js +1 -1
- package/dist/esm/swirl-banner.entry.js +1 -1
- package/dist/esm/swirl-button.entry.js +1 -1
- package/dist/esm/swirl-carousel.entry.js +1 -1
- package/dist/esm/swirl-chip.entry.js +1 -1
- package/dist/esm/swirl-console-layout.entry.js +1 -1
- package/dist/esm/swirl-date-input.entry.js +1 -1
- package/dist/esm/swirl-date-picker_2.entry.js +1 -1
- package/dist/esm/swirl-file-viewer_7.entry.js +1 -1
- package/dist/esm/swirl-form-control.entry.js +1 -1
- package/dist/esm/swirl-icon-check-small_3.entry.js +1 -1
- package/dist/esm/swirl-icon-error_3.entry.js +1 -1
- package/dist/esm/swirl-inline-status.entry.js +1 -1
- package/dist/esm/swirl-lightbox.entry.js +1 -1
- package/dist/esm/swirl-menu-item.entry.js +1 -1
- package/dist/esm/swirl-menu.entry.js +1 -1
- package/dist/esm/swirl-option-list_2.entry.js +1 -1
- package/dist/esm/swirl-pagination.entry.js +1 -1
- package/dist/esm/swirl-pdf-reader.entry.js +1 -1
- package/dist/esm/swirl-popover_2.entry.js +1 -1
- package/dist/esm/swirl-resource-list-file-item.entry.js +1 -1
- package/dist/esm/swirl-search.entry.js +1 -1
- package/dist/esm/swirl-select.entry.js +1 -1
- package/dist/esm/swirl-shell-layout.entry.js +1 -1
- package/dist/esm/swirl-table-column.entry.js +1 -1
- package/dist/esm/swirl-table-row.entry.js +1 -1
- package/dist/esm/swirl-table.entry.js +1 -1
- package/dist/esm/swirl-text-input.entry.js +1 -1
- package/dist/esm/swirl-time-input.entry.js +1 -1
- package/dist/esm/swirl-toast.entry.js +1 -1
- package/dist/esm/swirl-toolbar.entry.js +1 -1
- package/dist/esm/{utils-aab10c80.js → utils-9b747dd7.js} +4 -1
- package/dist/swirl-components/{p-67ec1892.entry.js → p-002b7e52.entry.js} +1 -1
- package/dist/swirl-components/{p-ddbd3ba2.entry.js → p-0a75fb2c.entry.js} +1 -1
- package/dist/swirl-components/{p-f6d6e1b3.entry.js → p-12c1cc7d.entry.js} +1 -1
- package/dist/swirl-components/p-1d9f6e7b.entry.js +1 -0
- package/dist/swirl-components/{p-cafb3f89.entry.js → p-2016c6ab.entry.js} +1 -1
- package/dist/swirl-components/{p-923e0cab.entry.js → p-216668f0.entry.js} +1 -1
- package/dist/swirl-components/{p-b4b29c84.entry.js → p-35612ebd.entry.js} +1 -1
- package/dist/swirl-components/{p-957c6bfa.entry.js → p-4bccdf5c.entry.js} +1 -1
- package/dist/swirl-components/{p-8e6caf90.entry.js → p-4cab4855.entry.js} +1 -1
- package/dist/swirl-components/{p-fd807ae6.entry.js → p-4def436f.entry.js} +1 -1
- package/dist/swirl-components/{p-4cd0f4d9.entry.js → p-54defefa.entry.js} +1 -1
- package/dist/swirl-components/{p-02cc1990.entry.js → p-5625da01.entry.js} +1 -1
- package/dist/swirl-components/p-58abf3c6.js +1 -0
- package/dist/swirl-components/{p-38d2873f.entry.js → p-64af1828.entry.js} +1 -1
- package/dist/swirl-components/{p-5ebc8ac3.entry.js → p-6a2dfb36.entry.js} +1 -1
- package/dist/swirl-components/{p-63bb43c6.entry.js → p-6bb86ac6.entry.js} +1 -1
- package/dist/swirl-components/{p-3ca838d1.entry.js → p-6fff46e7.entry.js} +1 -1
- package/dist/swirl-components/{p-e60c1866.entry.js → p-847592fc.entry.js} +1 -1
- package/dist/swirl-components/{p-2cf55b68.entry.js → p-85103dcc.entry.js} +1 -1
- package/dist/swirl-components/{p-0bbd7d63.entry.js → p-882c7025.entry.js} +1 -1
- package/dist/swirl-components/{p-b50cde2f.entry.js → p-895ae6a9.entry.js} +1 -1
- package/dist/swirl-components/{p-f0f9e649.entry.js → p-a0775f91.entry.js} +1 -1
- package/dist/swirl-components/{p-8fd60b0e.entry.js → p-a60f0d9e.entry.js} +1 -1
- package/dist/swirl-components/{p-ac5aa422.entry.js → p-ad8c20b7.entry.js} +1 -1
- package/dist/swirl-components/{p-28087c13.entry.js → p-adf25c45.entry.js} +1 -1
- package/dist/swirl-components/p-b24e6ac7.entry.js +1 -0
- package/dist/swirl-components/{p-8b7fa285.entry.js → p-bcf38f06.entry.js} +1 -1
- package/dist/swirl-components/{p-9991892d.entry.js → p-c497d897.entry.js} +1 -1
- package/dist/swirl-components/{p-bcd510b8.entry.js → p-cadf6a32.entry.js} +1 -1
- package/dist/swirl-components/{p-a5b60e79.entry.js → p-d15c30a4.entry.js} +1 -1
- package/dist/swirl-components/{p-27aef8c4.entry.js → p-de6856c8.entry.js} +1 -1
- package/dist/swirl-components/{p-2e55fdaa.entry.js → p-f6d1648e.entry.js} +1 -1
- package/dist/swirl-components/{p-10019ad5.entry.js → p-f7532ba4.entry.js} +1 -1
- package/dist/swirl-components/{p-de2f3726.entry.js → p-f7e43e2f.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/swirl-components/p-2d79b467.entry.js +0 -1
- package/dist/swirl-components/p-4b826622.entry.js +0 -1
- package/dist/swirl-components/p-81ca5135.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,c as e,h as a,H as s}from"./p-e212b5b7.js";import{c as o}from"./p-a5dce9e6.js";import{c as t}from"./p-878dc806.js";const i="SWIRL_SHELL_NAVIGATION_COLLAPSE_STATE",r="SWIRL_SHELL_SIDEBAR_STATE",d=class{constructor(a){l(this,a),this.sidebarToggleClick=e(this,"sidebarToggleClick",7),this.skipLinkClick=e(this,"skipLinkClick",7),this.onNavigationToggleClick=()=>{this.navigationCollapsed=!this.navigationCollapsed},this.onNavigationClick=()=>{this.hideMobileNavigation()},this.brandedHeader=void 0,this.browserBackButtonLabel="Navigate back",this.browserForwardButtonLabel="Navigate forward",this.hideMobileNavigationButtonLabel="Close navigation",this.navigationLabel="Main",this.navigationToggleLabel="Toggle navigation",this.sidebarActive=void 0,this.sidebarToggleBadge=void 0,this.sidebarToggleBadgeAriaLabel=void 0,this.sidebarToggleIcon="notifications",this.sidebarToggleLabel="Toggle sidebar",this.skipLinkLabel="Skip to main content",this.mobileNavigationActive=void 0,this.navigationCollapsed=void 0}componentWillLoad(){const l="true"===localStorage.getItem(r);this.sidebarActive=void 0===this.sidebarActive?l:this.sidebarActive;const e="true"===localStorage.getItem(i);this.navigationCollapsed=e}componentDidLoad(){this.focusTrap=t(this.navElement,{allowOutsideClick:!0,tabbableOptions:{getShadowRoot:l=>l.shadowRoot}})}componentDidRender(){this.focusTrap?.updateContainerElements(this.navElement)}disconnectedCallback(){this.focusTrap?.deactivate()}onWindowKeyDown(l){"Escape"===l.key&&this.mobileNavigationActive&&this.hideMobileNavigation()}watchMobileNavigationState(){this.mobileNavigationActive?setTimeout((()=>{this.focusTrap.activate()}),200):this.focusTrap.deactivate()}watchNavigationCollapsed(){localStorage.setItem(i,String(this.navigationCollapsed))}watchSidebarActive(){localStorage.setItem(r,String(this.sidebarActive))}async showMobileNavigation(){this.mobileNavigationActive=!0}async hideMobileNavigation(){this.mobileNavigationActive=!1}render(){const l=!0!==this.sidebarToggleBadge&&"true"!==this.sidebarToggleBadge,e=o("shell-layout",{"shell-layout--branded-header":this.brandedHeader,"shell-layout--mobile-navigation-active":this.mobileNavigationActive,"shell-layout--navigation-collapsed":this.navigationCollapsed,"shell-layout--sidebar-active":this.sidebarActive});return a(s,{key:"464237ff27f267ca7d43c1a7d515b5df750ba149"},a("div",{key:"94d0ba7a2922df9e90fc36c840ed96544bfb2ca5",class:e},a("header",{key:"7ca4ceef9c5e03c052a234b44c35745bb82c3e0e",class:"shell-layout__header","data-tauri-drag-region":"true"},a("button",{key:"2b937db7d0b7d6351238a3560c4a8409f1a14e4c",class:"shell-layout__skip-link",onClick:this.skipLinkClick.emit,type:"button"},this.skipLinkLabel),a("div",{key:"9e9a3eee3459f8b41ace84a7f0f4c9e4f1b6f20f",class:"shell-layout__header-left"},a("button",{key:"d04a5e5411e7caf5741b03b5188db78006192c9e",class:"shell-layout__header-tool",onClick:this.onNavigationToggleClick,type:"button"},a("swirl-icon-dock-left",{key:"a7eb33ad7fda7d2bb136213439fad7b647bd873d",size:20}),a("swirl-visually-hidden",{key:"336514402f77dd81781b3b2d1ecda84864e561d3"},this.navigationToggleLabel)),a("a",{key:"c42c929fd46778b05ee297cf3189e87719d4a9d9",class:"shell-layout__header-tool",href:"javascript:history.back()"},a("swirl-icon-arrow-back",{key:"e89570f80be08d54e11a3b21ae886def0d0dbf5a",size:20}),a("swirl-visually-hidden",{key:"7289a96d73cdba0311b167bc796d093a31880ae4"},this.browserBackButtonLabel)),a("a",{key:"31a3bf3ca9e2f98ac9ae9f3778aae645ee2fb5df",class:"shell-layout__header-tool",href:"javascript:history.forward()"},a("swirl-icon-arrow-forward",{key:"10882694de8baf892423e288e8f511e73ecc175d",size:20}),a("swirl-visually-hidden",{key:"a08bce73329c768834c34c37b02b111c39f19253"},this.browserForwardButtonLabel)),a("slot",{key:"1792f7b543ad684c4af2da2171d946ff2d3d5d89",name:"left-header-tools"})),a("div",{key:"b07250aa82b117141f2484d512fbade5a8dc702e",class:"shell-layout__logo"},a("slot",{key:"34c9efaebee073f832bfcb8e7812db814df2cf74",name:"logo"})),a("div",{key:"54bfbe68d09e7cdf8027f02a625e906b2de8af1d",class:"shell-layout__header-right"},a("slot",{key:"dc0bd8a4aab7a79e49706b81ff694e6c2af81879",name:"right-header-tools"}),a("button",{key:"1c77d8e6d1345303e3ea6ff2f45ef6722862ded8",class:"shell-layout__header-tool shell-layout__sidebar-toggle",onClick:this.sidebarToggleClick.emit,type:"button"},a("swirl-icon",{key:"ab806d5820d51a38ef5fd6f92f87bd51ee027422",glyph:this.sidebarToggleIcon,size:20}),a("swirl-visually-hidden",{key:"a185fd254ce2493b3614b9a8bdc5bc14e6f0c4ca"},this.sidebarToggleLabel),this.sidebarToggleBadge&&a("swirl-badge",{key:"51929778525a0f6b1dc5fde3254eb93f31e6ba07","aria-label":this.sidebarToggleBadgeAriaLabel,label:l?String(this.sidebarToggleBadge):this.sidebarToggleBadgeAriaLabel,size:"xs",variant:l?"default":"dot"})),a("slot",{key:"9ffa0a976c0578f97f48d6a489ab0b0efb7e84a4",name:"avatar"}))),a("div",{key:"cd9655eb2d726369ab9c810200210c63a32265f4",class:"shell-layout__mobile-nav-backdrop",onClick:this.onNavigationClick}),a("nav",{key:"02662d0fd1c3a63e369e8b37e702f85c1875ccf9","aria-labelledby":"main-navigation-label",class:"shell-layout__nav",onClick:this.onNavigationClick,ref:l=>this.navElement=l},a("div",{key:"cb073312c3a3d0d45dee547cff81f902381c7296",class:"shell-layout__mobile-header"},a("slot",{key:"52088b3080930e99763c85093a094db5f6cf3b7c",name:"mobile-logo"}),a("div",{key:"197224a2ddd62d60e5a08b8516d5867c9bbc72a8",class:"shell-layout__mobile-header-tools"},a("slot",{key:"300875c929f28466927b8152f9214d01552252a4",name:"mobile-header-tools"}),a("button",{key:"1cde22038878a7d278cd28c8377147588d5a6e13",class:"shell-layout__header-tool",type:"button"},a("swirl-icon-double-arrow-left",{key:"66e9c165653f520511a8c5a9ee508d8b07084243",size:20}),a("swirl-visually-hidden",{key:"15574abbce4cb4aaea9029e2a501d1909d9b40e4"},this.hideMobileNavigationButtonLabel)))),a("div",{key:"accaa43b86c4424f55b3ce5aab04c7c1e1d2d362",class:"shell-layout__nav-body"},a("swirl-visually-hidden",{key:"a7b696ed5646ed85a46021387128664f88d443e0"},a("span",{key:"e18dc4dd5104edb6f5a4fc27b8cba94949b73c2d",id:"main-navigation-label"},this.navigationLabel)),a("slot",{key:"6ea26a3132c76edb7add3aec2108d856c058a495",name:"nav"}))),a("main",{key:"9e675e4700b257523d647f9b460d69c91bf32625",class:"shell-layout__main",id:"main-content"},a("slot",{key:"966936fb351ced9de4691ace12ed37054f3aabd8"})),a("aside",{key:"3f76cf8d267725fb9909e19f27808f9173389a23",class:"shell-layout__sidebar",inert:!this.sidebarActive||void 0},a("div",{key:"d316a4a82f621b3eaf218b1f75cef085be00849f",class:"shell-layout__sidebar-body"},a("div",{key:"a96f59a7edd1c2da969c6a30abfc5823c3da3128",class:"shell-layout__sidebar-app-bar"},a("slot",{key:"8f08883a3709fd8bd9619085844cc4ebf50e49b4",name:"sidebar-app-bar"})),a("div",{key:"f4fc1541b95c50a524a6a6e390529060ebb4d136",class:"shell-layout__sidebar-content"},a("slot",{key:"c4ea005657a58f2dbf178adb72bc82f1ac5c03b3",name:"sidebar"}))))))}static get watchers(){return{mobileNavigationActive:["watchMobileNavigationState"],navigationCollapsed:["watchNavigationCollapsed"],sidebarActive:["watchSidebarActive"]}}};d.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:14rem;--swirl-shell-sidebar-width:21rem;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.2s;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);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:hover{width:var(--swirl-shell-extended-nav-width);padding-right:var(--s-space-12)}}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout:not(:hover){scrollbar-width:none}.shell-layout--navigation-collapsed.sc-swirl-shell-layout .shell-layout__nav.sc-swirl-shell-layout:not(:hover)::-webkit-scrollbar{width:0;background:transparent;-webkit-appearance:none}}@media (min-width: 992px){.shell-layout--navigation-collapsed.sc-swirl-shell-layout{grid-template-columns:var(--swirl-shell-collapsed-nav-width) 1fr 0}}@media (min-width: 1440px){.shell-layout--sidebar-active.shell-layout--navigation-collapsed.sc-swirl-shell-layout{grid-template-columns:var(--swirl-shell-collapsed-nav-width) 1fr var(\n --swirl-shell-sidebar-width\n )}}@media (min-width: 1440px){.shell-layout--sidebar-active.sc-swirl-shell-layout .shell-layout__main.sc-swirl-shell-layout{width:100%}}.shell-layout--sidebar-active.sc-swirl-shell-layout .shell-layout__sidebar.sc-swirl-shell-layout{overflow:initial}@media (min-width: 992px){.shell-layout--sidebar-active.sc-swirl-shell-layout .shell-layout__sidebar-body.sc-swirl-shell-layout{border:0.0625rem solid var(--s-border-default);transform:translate3d(0, 0, 0)}}@media (min-width: 1440px){.shell-layout--sidebar-active.sc-swirl-shell-layout{grid-template-columns:var(--swirl-shell-extended-nav-width) 1fr var(\n --swirl-shell-sidebar-width\n )}}.sc-swirl-shell-layout:not(.shell-layout--sidebar-active) .shell-layout__sidebar.sc-swirl-shell-layout{animation:shell-layout-no-overflow-after-transition 0.2s;animation-fill-mode:forwards}.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__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;border-bottom:0.0625rem solid var(--s-border-default);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-4);right:var(--s-space-4);padding-right:var(--s-space-2);transform:translate3d(0.1875rem, 0, 0)}.shell-layout__sidebar-toggle.sc-swirl-shell-layout{display:none}@media (min-width: 992px){.shell-layout__sidebar-toggle.sc-swirl-shell-layout{display:block}}.shell-layout__nav.sc-swirl-shell-layout{position:fixed;z-index:9;top:0;bottom:0;left:0;overflow:auto;width:100%;max-width:18.75rem;color:var(--swirl-shell-text-color);background-color:var(--s-surface-overlay-default);transition:transform 0.2s, box-shadow 0.2s, width 0.2s;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:static;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.2s;inset:0}.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)}}.shell-layout__sidebar.sc-swirl-shell-layout{position:relative;display:none;min-height:0;grid-area:sidebar}@media (min-width: 992px){.shell-layout__sidebar.sc-swirl-shell-layout{display:block}}.shell-layout__sidebar-body.sc-swirl-shell-layout{z-index:1;display:flex;width:var(--swirl-shell-sidebar-width);height:100%;border-radius:var(--s-border-radius-sm);background-color:var(--s-background-default);flex-direction:column}@media (min-width: 992px){.shell-layout__sidebar-body.sc-swirl-shell-layout{position:absolute;top:0;right:0;bottom:0;transition:transform 0.2s;transform:translate3d(calc(100% + var(--s-space-24)), 0, 0);box-shadow:var(--s-shadow-level-3)}}@media (min-width: 1440px){.shell-layout__sidebar-body.sc-swirl-shell-layout{position:relative;transform:none;box-shadow:none;inset:auto}}@media (prefers-reduced-motion){.shell-layout__sidebar-body.sc-swirl-shell-layout{transition:none}}.shell-layout__sidebar-app-bar.sc-swirl-shell-layout{flex-grow:0;flex-shrink:0;border-bottom:var(--s-border-width-default) solid var(--s-border-default)}.shell-layout__sidebar-content.sc-swirl-shell-layout{overflow:auto;flex-grow:1}@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{d as swirl_shell_layout}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as a,H as r,g as i,F as o}from"./p-e212b5b7.js";import{r as s}from"./p-81ca5135.js";import{c as n}from"./p-a5dce9e6.js";const c=class{constructor(a){e(this,a),this.valueChange=t(this,"valueChange",3),this.onClick=e=>{e.stopPropagation(),e.preventDefault()},this.onSelectDate=e=>{this.valueChange.emit("string"==typeof e.detail?s(new Date(e.detail)):e.detail.map((e=>s(new Date(e)))))},this.disableDate=()=>!1,this.firstDayOfWeek=0,this.labels=void 0,this.locale="en-US",this.range=void 0,this.startDate=void 0,this.value=void 0}render(){const e=this.startDate instanceof Date?this.startDate.toISOString():void 0;return a(r,{key:"94cec8013ff33ee9e4263bb194abbdef02316e0e",onClick:this.onClick},a("wc-datepicker",{key:"46a366e80b716260a1231fb03a0c436e43bf804d",elementClassName:"date-picker",disableDate:this.disableDate,firstDayOfWeek:this.firstDayOfWeek,labels:this.labels,locale:this.locale,onSelectDate:this.onSelectDate,range:this.range,startDate:e,value:this.value}))}get el(){return i(this)}};c.style=":host{display:block}:host *{box-sizing:border-box}.date-picker{padding:var(--s-space-8) var(--s-space-16);background-color:var(--s-surface-overlay-default);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);letter-spacing:var(--s-letter-spacing-tighter)}@media (min-width: 768px){.date-picker{max-width:17.5rem}}.date-picker__header{display:flex;margin-bottom:var(--s-space-8);align-items:center}.date-picker__current-month{display:flex;padding:var(--s-space-8);flex-grow:1;align-items:center;order:1;gap:var(--s-space-4)}.date-picker__next-month-button,.date-picker__previous-month-button{position:relative;display:inline-flex;width:2.5rem;height:2.5rem;margin:0;padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-highlight);background-color:transparent;cursor:pointer}.date-picker__next-month-button:after,.date-picker__previous-month-button:after{position:absolute;background-color:currentColor;content:\"\";inset:0;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.date-picker__next-month-button:hover,.date-picker__previous-month-button:hover{background-color:var(--s-surface-overlay-hovered)}.date-picker__next-month-button:focus:not(:focus-visible),.date-picker__previous-month-button:focus:not(:focus-visible){outline:none}.date-picker__next-month-button:focus-visible,.date-picker__previous-month-button:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__next-month-button>svg,.date-picker__previous-month-button>svg{display:none}.date-picker__next-month-button{order:3}.date-picker__next-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__previous-month-button{order:2}.date-picker__previous-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__month-select,.date-picker__year-select{margin:0;padding:0;border:none;background-color:var(--s-surface-overlay-default);font:inherit;font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left;cursor:pointer}.date-picker__month-select:focus:not(:focus-visible),.date-picker__year-select:focus:not(:focus-visible){outline:none}.date-picker__month-select:focus-visible,.date-picker__year-select:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.date-picker__month-select,.date-picker__year-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.date-picker__month-select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.date-picker__year-select{max-width:4rem}.date-picker__calendar{display:block;width:100%}.date-picker__calendar tbody{display:block}.date-picker__calendar-header{display:block}.date-picker__weekday-row,.date-picker__calendar-row{display:flex}.date-picker__weekday-row{margin-bottom:var(--s-space-8)}.date-picker__weekday{display:inline-flex;min-width:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;color:var(--s-text-subdued);font-weight:var(--s-font-weight-regular);aspect-ratio:1}.date-picker__date{position:relative;z-index:1;display:inline-flex;min-width:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;font-weight:var(--s-font-weight-medium);cursor:pointer;aspect-ratio:1}.date-picker__date:before{position:absolute;z-index:-1;border-radius:50%;background-color:transparent;content:\"\";inset:0}.date-picker__date:hover:before{background-color:var(--s-surface-overlay-hovered)}.date-picker__date--current:before{background-color:var(--s-surface-overlay-hovered)}.date-picker__date--current:focus:not(:focus-visible){outline:none}.date-picker__date--current:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__date--overflowing{color:var(--s-text-subdued)}.date-picker__date--selected{color:var(--s-text-on-action-primary)}.date-picker__date--selected:before{background-color:var(--s-action-primary-default)}.date-picker__date--selected:hover{color:var(--s-text-on-action-primary)}.date-picker__date--selected:hover:before{background-color:var(--s-action-primary-hovered)}.date-picker__date--selected>strong{font-weight:var(--s-font-weight-medium)}.date-picker__date--in-range:not(.date-picker__date--selected):after{position:absolute;border-radius:0px;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0px}.date-picker__date--start:not(.date-picker__date--end){color:var(--s-text-on-action-primary)}.date-picker__date--start:not(.date-picker__date--end):before{background-color:var(--s-action-primary-default)}.date-picker__date--start:not(.date-picker__date--end):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0 0.0625rem 50%}.date-picker__date--end:not(.date-picker__date--start){color:var(--s-text-on-action-primary)}.date-picker__date--end:not(.date-picker__date--start):before{background-color:var(--s-action-primary-default)}.date-picker__date--end:not(.date-picker__date--start):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 50% 0.0625rem 0}.date-picker__date--today:before{box-shadow:inset 0 0 0 var(--s-border-width-default)\n var(--s-border-highlight)}.date-picker__date--today>em{font-style:normal}.date-picker__date--disabled{color:var(--s-text-disabled);cursor:default;pointer-events:none}.date-picker__date--disabled:before{background-color:transparent}.date-picker__date--disabled:hover{color:var(--s-text-disabled)}.date-picker__date--disabled:hover:before{background-color:transparent}";const d=class{constructor(t){e(this,t),this.color=void 0,this.size=24}render(){const e=20===this.size?24:this.size,t={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},r=n("swirl-icon",`swirl-icon--size-${this.size}`);return a("svg",{key:"235fdf2958fb3bc493c371fd7143c9cdfd839c56","aria-hidden":"true",class:r,fill:"none",height:this.size,part:"icon",style:t,viewBox:`0 0 ${e} ${e}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&a(o,{key:"0f7de90078792597bdafd8ea196bef851cb456c7"},a("path",{key:"7ba547a6f041200320584840360cb812ee8fadf6",d:"M6 10.9999C5.53333 10.9999 5.13889 10.8388 4.81667 10.5166C4.49444 10.1944 4.33333 9.79992 4.33333 9.33325C4.33333 8.86658 4.49444 8.47214 4.81667 8.14992C5.13889 7.8277 5.53333 7.66658 6 7.66658C6.46667 7.66658 6.86111 7.8277 7.18333 8.14992C7.50556 8.47214 7.66667 8.86658 7.66667 9.33325C7.66667 9.79992 7.50556 10.1944 7.18333 10.5166C6.86111 10.8388 6.46667 10.9999 6 10.9999ZM3.33333 14.6666C2.96667 14.6666 2.65267 14.5361 2.39133 14.2753C2.13044 14.0139 2 13.6999 2 13.3333V3.99992C2 3.63325 2.13044 3.31947 2.39133 3.05859C2.65267 2.79725 2.96667 2.66659 3.33333 2.66659H4V1.99992C4 1.81103 4.06378 1.65259 4.19133 1.52459C4.31933 1.39703 4.47778 1.33325 4.66667 1.33325C4.85556 1.33325 5.014 1.39703 5.142 1.52459C5.26956 1.65259 5.33333 1.81103 5.33333 1.99992V2.66659H10.6667V1.99992C10.6667 1.81103 10.7307 1.65259 10.8587 1.52459C10.9862 1.39703 11.1444 1.33325 11.3333 1.33325C11.5222 1.33325 11.6804 1.39703 11.808 1.52459C11.936 1.65259 12 1.81103 12 1.99992V2.66659H12.6667C13.0333 2.66659 13.3473 2.79725 13.6087 3.05859C13.8696 3.31947 14 3.63325 14 3.99992V13.3333C14 13.6999 13.8696 14.0139 13.6087 14.2753C13.3473 14.5361 13.0333 14.6666 12.6667 14.6666H3.33333ZM3.33333 13.3333H12.6667V6.66658H3.33333V13.3333ZM3.33333 5.33325H12.6667V3.99992H3.33333V5.33325Z",fill:"currentColor"})),(20===this.size||24===this.size)&&a(o,{key:"41335c9395f8fd48125f6355b4be90231096ec4d"},a("path",{key:"458f098473861342045a686c6e329861d4ce7606",d:"M9 16.5C8.3 16.5 7.70833 16.2583 7.225 15.775C6.74167 15.2917 6.5 14.7 6.5 14C6.5 13.3 6.74167 12.7083 7.225 12.225C7.70833 11.7417 8.3 11.5 9 11.5C9.7 11.5 10.2917 11.7417 10.775 12.225C11.2583 12.7083 11.5 13.3 11.5 14C11.5 14.7 11.2583 15.2917 10.775 15.775C10.2917 16.2583 9.7 16.5 9 16.5ZM5 22C4.45 22 3.979 21.8043 3.587 21.413C3.19567 21.021 3 20.55 3 20V6C3 5.45 3.19567 4.97933 3.587 4.588C3.979 4.196 4.45 4 5 4H6V3C6 2.71667 6.09567 2.479 6.287 2.287C6.479 2.09567 6.71667 2 7 2C7.28333 2 7.521 2.09567 7.713 2.287C7.90433 2.479 8 2.71667 8 3V4H16V3C16 2.71667 16.096 2.479 16.288 2.287C16.4793 2.09567 16.7167 2 17 2C17.2833 2 17.5207 2.09567 17.712 2.287C17.904 2.479 18 2.71667 18 3V4H19C19.55 4 20.021 4.196 20.413 4.588C20.8043 4.97933 21 5.45 21 6V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5ZM5 20H19V10H5V20ZM5 8H19V6H5V8Z",fill:"currentColor"})),28===this.size&&a(o,{key:"ae43184dce44daf93f3e9d9b942faf171cf1cfc9"},a("path",{key:"5551952e390a5bf47df90a2d8fe3f83df8267927",d:"M10.5 19.2499C9.68333 19.2499 8.99306 18.968 8.42917 18.4041C7.86528 17.8402 7.58333 17.1499 7.58333 16.3333C7.58333 15.5166 7.86528 14.8263 8.42917 14.2624C8.99306 13.6985 9.68333 13.4166 10.5 13.4166C11.3167 13.4166 12.0069 13.6985 12.5708 14.2624C13.1347 14.8263 13.4167 15.5166 13.4167 16.3333C13.4167 17.1499 13.1347 17.8402 12.5708 18.4041C12.0069 18.968 11.3167 19.2499 10.5 19.2499ZM5.83333 25.6666C5.19167 25.6666 4.64217 25.4383 4.18483 24.9818C3.72828 24.5244 3.5 23.9749 3.5 23.3333V6.99992C3.5 6.35825 3.72828 5.80914 4.18483 5.35259C4.64217 4.89525 5.19167 4.66659 5.83333 4.66659H7V3.49992C7 3.16936 7.11161 2.89209 7.33483 2.66809C7.55883 2.44486 7.83611 2.33325 8.16667 2.33325C8.49722 2.33325 8.7745 2.44486 8.9985 2.66809C9.22172 2.89209 9.33333 3.16936 9.33333 3.49992V4.66659H18.6667V3.49992C18.6667 3.16936 18.7787 2.89209 19.0027 2.66809C19.2259 2.44486 19.5028 2.33325 19.8333 2.33325C20.1639 2.33325 20.4408 2.44486 20.664 2.66809C20.888 2.89209 21 3.16936 21 3.49992V4.66659H22.1667C22.8083 4.66659 23.3578 4.89525 23.8152 5.35259C24.2717 5.80914 24.5 6.35825 24.5 6.99992V23.3333C24.5 23.9749 24.2717 24.5244 23.8152 24.9818C23.3578 25.4383 22.8083 25.6666 22.1667 25.6666H5.83333ZM5.83333 23.3333H22.1667V11.6666H5.83333V23.3333ZM5.83333 9.33325H22.1667V6.99992H5.83333V9.33325Z",fill:"currentColor"})))}};d.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";export{c as swirl_date_picker,d as swirl_icon_today}
|
|
1
|
+
import{r as e,c as t,h as a,H as r,g as i,F as o}from"./p-e212b5b7.js";import{r as s}from"./p-58abf3c6.js";import{c as n}from"./p-a5dce9e6.js";const c=class{constructor(a){e(this,a),this.valueChange=t(this,"valueChange",3),this.onClick=e=>{e.stopPropagation(),e.preventDefault()},this.onSelectDate=e=>{this.valueChange.emit("string"==typeof e.detail?s(new Date(e.detail)):e.detail.map((e=>s(new Date(e)))))},this.disableDate=()=>!1,this.firstDayOfWeek=0,this.labels=void 0,this.locale="en-US",this.range=void 0,this.startDate=void 0,this.value=void 0}render(){const e=this.startDate instanceof Date?this.startDate.toISOString():void 0;return a(r,{key:"94cec8013ff33ee9e4263bb194abbdef02316e0e",onClick:this.onClick},a("wc-datepicker",{key:"46a366e80b716260a1231fb03a0c436e43bf804d",elementClassName:"date-picker",disableDate:this.disableDate,firstDayOfWeek:this.firstDayOfWeek,labels:this.labels,locale:this.locale,onSelectDate:this.onSelectDate,range:this.range,startDate:e,value:this.value}))}get el(){return i(this)}};c.style=":host{display:block}:host *{box-sizing:border-box}.date-picker{padding:var(--s-space-8) var(--s-space-16);background-color:var(--s-surface-overlay-default);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);letter-spacing:var(--s-letter-spacing-tighter)}@media (min-width: 768px){.date-picker{max-width:17.5rem}}.date-picker__header{display:flex;margin-bottom:var(--s-space-8);align-items:center}.date-picker__current-month{display:flex;padding:var(--s-space-8);flex-grow:1;align-items:center;order:1;gap:var(--s-space-4)}.date-picker__next-month-button,.date-picker__previous-month-button{position:relative;display:inline-flex;width:2.5rem;height:2.5rem;margin:0;padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-highlight);background-color:transparent;cursor:pointer}.date-picker__next-month-button:after,.date-picker__previous-month-button:after{position:absolute;background-color:currentColor;content:\"\";inset:0;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.date-picker__next-month-button:hover,.date-picker__previous-month-button:hover{background-color:var(--s-surface-overlay-hovered)}.date-picker__next-month-button:focus:not(:focus-visible),.date-picker__previous-month-button:focus:not(:focus-visible){outline:none}.date-picker__next-month-button:focus-visible,.date-picker__previous-month-button:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__next-month-button>svg,.date-picker__previous-month-button>svg{display:none}.date-picker__next-month-button{order:3}.date-picker__next-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__previous-month-button{order:2}.date-picker__previous-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__month-select,.date-picker__year-select{margin:0;padding:0;border:none;background-color:var(--s-surface-overlay-default);font:inherit;font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left;cursor:pointer}.date-picker__month-select:focus:not(:focus-visible),.date-picker__year-select:focus:not(:focus-visible){outline:none}.date-picker__month-select:focus-visible,.date-picker__year-select:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.date-picker__month-select,.date-picker__year-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.date-picker__month-select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.date-picker__year-select{max-width:4rem}.date-picker__calendar{display:block;width:100%}.date-picker__calendar tbody{display:block}.date-picker__calendar-header{display:block}.date-picker__weekday-row,.date-picker__calendar-row{display:flex}.date-picker__weekday-row{margin-bottom:var(--s-space-8)}.date-picker__weekday{display:inline-flex;min-width:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;color:var(--s-text-subdued);font-weight:var(--s-font-weight-regular);aspect-ratio:1}.date-picker__date{position:relative;z-index:1;display:inline-flex;min-width:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;font-weight:var(--s-font-weight-medium);cursor:pointer;aspect-ratio:1}.date-picker__date:before{position:absolute;z-index:-1;border-radius:50%;background-color:transparent;content:\"\";inset:0}.date-picker__date:hover:before{background-color:var(--s-surface-overlay-hovered)}.date-picker__date--current:before{background-color:var(--s-surface-overlay-hovered)}.date-picker__date--current:focus:not(:focus-visible){outline:none}.date-picker__date--current:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__date--overflowing{color:var(--s-text-subdued)}.date-picker__date--selected{color:var(--s-text-on-action-primary)}.date-picker__date--selected:before{background-color:var(--s-action-primary-default)}.date-picker__date--selected:hover{color:var(--s-text-on-action-primary)}.date-picker__date--selected:hover:before{background-color:var(--s-action-primary-hovered)}.date-picker__date--selected>strong{font-weight:var(--s-font-weight-medium)}.date-picker__date--in-range:not(.date-picker__date--selected):after{position:absolute;border-radius:0px;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0px}.date-picker__date--start:not(.date-picker__date--end){color:var(--s-text-on-action-primary)}.date-picker__date--start:not(.date-picker__date--end):before{background-color:var(--s-action-primary-default)}.date-picker__date--start:not(.date-picker__date--end):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0 0.0625rem 50%}.date-picker__date--end:not(.date-picker__date--start){color:var(--s-text-on-action-primary)}.date-picker__date--end:not(.date-picker__date--start):before{background-color:var(--s-action-primary-default)}.date-picker__date--end:not(.date-picker__date--start):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 50% 0.0625rem 0}.date-picker__date--today:before{box-shadow:inset 0 0 0 var(--s-border-width-default)\n var(--s-border-highlight)}.date-picker__date--today>em{font-style:normal}.date-picker__date--disabled{color:var(--s-text-disabled);cursor:default;pointer-events:none}.date-picker__date--disabled:before{background-color:transparent}.date-picker__date--disabled:hover{color:var(--s-text-disabled)}.date-picker__date--disabled:hover:before{background-color:transparent}";const d=class{constructor(t){e(this,t),this.color=void 0,this.size=24}render(){const e=20===this.size?24:this.size,t={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},r=n("swirl-icon",`swirl-icon--size-${this.size}`);return a("svg",{key:"235fdf2958fb3bc493c371fd7143c9cdfd839c56","aria-hidden":"true",class:r,fill:"none",height:this.size,part:"icon",style:t,viewBox:`0 0 ${e} ${e}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&a(o,{key:"0f7de90078792597bdafd8ea196bef851cb456c7"},a("path",{key:"7ba547a6f041200320584840360cb812ee8fadf6",d:"M6 10.9999C5.53333 10.9999 5.13889 10.8388 4.81667 10.5166C4.49444 10.1944 4.33333 9.79992 4.33333 9.33325C4.33333 8.86658 4.49444 8.47214 4.81667 8.14992C5.13889 7.8277 5.53333 7.66658 6 7.66658C6.46667 7.66658 6.86111 7.8277 7.18333 8.14992C7.50556 8.47214 7.66667 8.86658 7.66667 9.33325C7.66667 9.79992 7.50556 10.1944 7.18333 10.5166C6.86111 10.8388 6.46667 10.9999 6 10.9999ZM3.33333 14.6666C2.96667 14.6666 2.65267 14.5361 2.39133 14.2753C2.13044 14.0139 2 13.6999 2 13.3333V3.99992C2 3.63325 2.13044 3.31947 2.39133 3.05859C2.65267 2.79725 2.96667 2.66659 3.33333 2.66659H4V1.99992C4 1.81103 4.06378 1.65259 4.19133 1.52459C4.31933 1.39703 4.47778 1.33325 4.66667 1.33325C4.85556 1.33325 5.014 1.39703 5.142 1.52459C5.26956 1.65259 5.33333 1.81103 5.33333 1.99992V2.66659H10.6667V1.99992C10.6667 1.81103 10.7307 1.65259 10.8587 1.52459C10.9862 1.39703 11.1444 1.33325 11.3333 1.33325C11.5222 1.33325 11.6804 1.39703 11.808 1.52459C11.936 1.65259 12 1.81103 12 1.99992V2.66659H12.6667C13.0333 2.66659 13.3473 2.79725 13.6087 3.05859C13.8696 3.31947 14 3.63325 14 3.99992V13.3333C14 13.6999 13.8696 14.0139 13.6087 14.2753C13.3473 14.5361 13.0333 14.6666 12.6667 14.6666H3.33333ZM3.33333 13.3333H12.6667V6.66658H3.33333V13.3333ZM3.33333 5.33325H12.6667V3.99992H3.33333V5.33325Z",fill:"currentColor"})),(20===this.size||24===this.size)&&a(o,{key:"41335c9395f8fd48125f6355b4be90231096ec4d"},a("path",{key:"458f098473861342045a686c6e329861d4ce7606",d:"M9 16.5C8.3 16.5 7.70833 16.2583 7.225 15.775C6.74167 15.2917 6.5 14.7 6.5 14C6.5 13.3 6.74167 12.7083 7.225 12.225C7.70833 11.7417 8.3 11.5 9 11.5C9.7 11.5 10.2917 11.7417 10.775 12.225C11.2583 12.7083 11.5 13.3 11.5 14C11.5 14.7 11.2583 15.2917 10.775 15.775C10.2917 16.2583 9.7 16.5 9 16.5ZM5 22C4.45 22 3.979 21.8043 3.587 21.413C3.19567 21.021 3 20.55 3 20V6C3 5.45 3.19567 4.97933 3.587 4.588C3.979 4.196 4.45 4 5 4H6V3C6 2.71667 6.09567 2.479 6.287 2.287C6.479 2.09567 6.71667 2 7 2C7.28333 2 7.521 2.09567 7.713 2.287C7.90433 2.479 8 2.71667 8 3V4H16V3C16 2.71667 16.096 2.479 16.288 2.287C16.4793 2.09567 16.7167 2 17 2C17.2833 2 17.5207 2.09567 17.712 2.287C17.904 2.479 18 2.71667 18 3V4H19C19.55 4 20.021 4.196 20.413 4.588C20.8043 4.97933 21 5.45 21 6V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5ZM5 20H19V10H5V20ZM5 8H19V6H5V8Z",fill:"currentColor"})),28===this.size&&a(o,{key:"ae43184dce44daf93f3e9d9b942faf171cf1cfc9"},a("path",{key:"5551952e390a5bf47df90a2d8fe3f83df8267927",d:"M10.5 19.2499C9.68333 19.2499 8.99306 18.968 8.42917 18.4041C7.86528 17.8402 7.58333 17.1499 7.58333 16.3333C7.58333 15.5166 7.86528 14.8263 8.42917 14.2624C8.99306 13.6985 9.68333 13.4166 10.5 13.4166C11.3167 13.4166 12.0069 13.6985 12.5708 14.2624C13.1347 14.8263 13.4167 15.5166 13.4167 16.3333C13.4167 17.1499 13.1347 17.8402 12.5708 18.4041C12.0069 18.968 11.3167 19.2499 10.5 19.2499ZM5.83333 25.6666C5.19167 25.6666 4.64217 25.4383 4.18483 24.9818C3.72828 24.5244 3.5 23.9749 3.5 23.3333V6.99992C3.5 6.35825 3.72828 5.80914 4.18483 5.35259C4.64217 4.89525 5.19167 4.66659 5.83333 4.66659H7V3.49992C7 3.16936 7.11161 2.89209 7.33483 2.66809C7.55883 2.44486 7.83611 2.33325 8.16667 2.33325C8.49722 2.33325 8.7745 2.44486 8.9985 2.66809C9.22172 2.89209 9.33333 3.16936 9.33333 3.49992V4.66659H18.6667V3.49992C18.6667 3.16936 18.7787 2.89209 19.0027 2.66809C19.2259 2.44486 19.5028 2.33325 19.8333 2.33325C20.1639 2.33325 20.4408 2.44486 20.664 2.66809C20.888 2.89209 21 3.16936 21 3.49992V4.66659H22.1667C22.8083 4.66659 23.3578 4.89525 23.8152 5.35259C24.2717 5.80914 24.5 6.35825 24.5 6.99992V23.3333C24.5 23.9749 24.2717 24.5244 23.8152 24.9818C23.3578 25.4383 22.8083 25.6666 22.1667 25.6666H5.83333ZM5.83333 23.3333H22.1667V11.6666H5.83333V23.3333ZM5.83333 9.33325H22.1667V6.99992H5.83333V9.33325Z",fill:"currentColor"})))}};d.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";export{c as swirl_date_picker,d as swirl_icon_today}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,H as a,g as s}from"./p-e212b5b7.js";import{d as r,i}from"./p-
|
|
1
|
+
import{r as e,h as t,H as a,g as s}from"./p-e212b5b7.js";import{d as r,i}from"./p-58abf3c6.js";var o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=void 0,r=void 0,i=void 0,o=[];return function(){var n=function(e){return"function"==typeof e?e():e}(t),d=(new Date).getTime(),c=!s||d-s>n;s=d;for(var b=arguments.length,h=Array(b),f=0;f<b;f++)h[f]=arguments[f];if(c&&a.leading)return a.accumulate?Promise.resolve(e.call(this,[h])).then((function(e){return e[0]})):Promise.resolve(e.call.apply(e,[this].concat(h)));if(r?clearTimeout(i):r=function(){var e={};return e.promise=new Promise((function(t,a){e.resolve=t,e.reject=a})),e}(),o.push(h),i=setTimeout(l.bind(this),n),a.accumulate){var _=o.length-1;return r.promise.then((function(e){return e[_]}))}return r.promise};function l(){var t=r;clearTimeout(i),Promise.resolve(a.accumulate?e.call(this,o):e.apply(this,o[o.length-1])).then(t.resolve,t.reject),o=[],r=null}};const l=class{constructor(t){e(this,t),this.triggerRerender=r((async()=>{await this.updateLayout(),this.updateScrolledState(),this.updateEmptyState()}),0,!0),this.updateLayout=o((async()=>{this.resetCellStyles(),this.resetColumnStyles(),this.resetEmptyRowStyles(),this.resetRowGroupStyles(),this.layoutEmptyRow(),this.layoutRowGroups(),this.layOutCells()}),16,{leading:!0}),this.onScroll=()=>{this.updateScrolledState()},this.onSlotChange=async()=>{await this.updateLayout(),this.updateScrolledState(),this.updateEmptyState()},this.caption=void 0,this.emptyStateLabel="No results found.",this.label=void 0,this.empty=void 0,this.scrollable=void 0,this.scrolled=void 0,this.scrolledToEnd=void 0}async componentDidRender(){await this.updateLayout(),this.updateScrolledState(),this.updateEmptyState()}async onWindowResize(){await this.updateLayout(),this.updateScrolledState()}async rerender(){this.triggerRerender()}resetEmptyRowStyles(){const e=this.el.shadowRoot.querySelector(".table__empty-row");Boolean(e)&&(e.style.width="")}resetRowGroupStyles(){Array.from(this.el.querySelectorAll("swirl-table-row-group")).forEach((e=>{const t=e.shadowRoot.querySelector(".table-row-group__header-row");Boolean(t)&&(e.shadowRoot.querySelector(".table-row-group__header-row").style.width="")}))}resetColumnStyles(){this.getColumns().forEach((e=>{e.classList.remove("table-column--has-shadow"),e.style.right="",e.style.left="",e.style.position="",e.style.zIndex=""}))}resetCellStyles(){this.getCells().forEach((e=>{e.classList.remove("table-cell--has-shadow"),e.style.flex="",e.style.left="",e.style.right="",e.style.position="",e.style.zIndex=""}))}updateScrolledState(){const e=i(),t=this.container.scrollWidth>this.container.clientWidth,a=this.container.scrollLeft>0,s=Math.ceil(this.container.clientWidth+this.container.scrollLeft)>=Math.floor(this.container.scrollWidth);t!==this.scrollable&&(t&&!e?this.container.classList.add("table__container--scrollable"):this.container.classList.remove("table__container--scrollable")),a!==this.scrolled&&(a&&!e?this.container.classList.add("table__container--scrolled"):this.container.classList.remove("table__container--scrolled")),s!==this.scrolledToEnd&&(s&&!e?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 e=this.el.shadowRoot.querySelector(".table__empty-row");if(!Boolean(e))return;const t=`${this.el.shadowRoot.querySelector(".table__container").scrollWidth}px`;e.style.width=t}layoutRowGroups(){const e=Array.from(this.el.querySelectorAll("swirl-table-row-group")),t=`${this.el.shadowRoot.querySelector(".table__container")?.scrollWidth}px`;e.forEach((e=>{const a=e.shadowRoot.querySelector(".table-row-group__header-row");Boolean(a)&&(e.shadowRoot.querySelector(".table-row-group__header-row").style.width=t)}))}layOutCells(){const e=this.getColumns(),t=this.getCells();e.forEach(((a,s)=>{const r=t.filter(((t,a)=>(s-a)%e.length==0)),i=a.width||`${a.getBoundingClientRect().width}px`;r.forEach((e=>{e.style.flex=Boolean(i)?`0 0 ${i}`:""}))}))}updateEmptyState(){const e=this.el.querySelector('[slot="rows"]');this.empty=!Boolean(e)||0===e.children.length}render(){return t(a,{key:"f825fc823fc51ed7a8eba7810b1ab59e689e8a41"},t("div",{key:"8df6c35df495dca1c04891ce76e59b2e7da3f605",class:"table"},t("div",{key:"46e2b44fad899173173f820b54da7262ada1a29b",class:"table__container",onScroll:this.onScroll,ref:e=>this.container=e},t("div",{key:"1a908da784452361ed825c7ad5a9f9da31224b34","aria-describedby":Boolean(this.caption)?"caption":void 0,"aria-label":this.label,role:"table",class:"table__table"},this.caption&&t("swirl-visually-hidden",{key:"b95ee5d18d4f6b73f8f001e9f019589affc3eb77"},t("div",{key:"37b716de43c55ec3aa04af2b0ca75d349945e4bc",id:"caption"},this.caption)),t("div",{key:"2a23da80be7745c426bf9a26b11564d07740015b",role:"rowgroup"},t("div",{key:"7d3705a77c0ab029dedeb075ada0b63b9b4d8aef",class:"table__header",role:"row"},t("slot",{key:"901a787de98344728dd3bf786672c681fa2ba8ca",name:"columns",onSlotchange:this.onSlotChange}))),t("div",{key:"3b0c5819ac28f42168197b8992474faf93400c3b",class:"table__body"},t("slot",{key:"dbd2bf589e0c3fbe2e065ff8a0610ab364d878fe",name:"rows",onSlotchange:this.onSlotChange}),this.empty&&t("div",{key:"1ec21fdc186874d5e8891554dcfc4acdad0d87c5",class:"table__empty-row",role:"row"},t("div",{key:"5abaddf4dbdca60521d7e8d63681d26090722bcd","aria-colspan":this.getColumns().length,class:"table__empty-row-cell",role:"cell"},t("swirl-text",{key:"b9d851b5274b3b7b07aeb8618243b0097112307e",align:"center",size:"sm"},this.emptyStateLabel))))))))}get el(){return s(this)}};l.style=":host{position:relative;display:block}:host *{box-sizing:border-box}.table__container{position:relative;overflow:auto;width:100%}.table__container--scrolled{--swirl-table-sticky-right-shadow:0.0625rem 0 0 0 var(--s-border-default),\n -0.0625rem 0 0 0 var(--s-border-default),\n 0 0.25rem 1rem rgba(25, 26, 28, 0.04),\n 0 0.0625rem 0.25rem rgba(25, 26, 28, 0.16)}.table__container--scrollable:not(.table__container--scrolled-to-end){--swirl-table-sticky-left-shadow:0.0625rem 0 0 0 var(--s-border-default),\n -0.0625rem 0 0 0 var(--s-border-default),\n 0 0.25rem 1rem rgba(25, 26, 28, 0.04),\n 0 0.0625rem 0.25rem rgba(25, 26, 28, 0.16)}.table__table{width:-webkit-max-content;width:-moz-max-content;width:max-content;min-width:max(20rem, 100%)}.table__header ::slotted(*){display:flex}.table__empty-row{display:flex}.table__empty-row-cell{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>*{flex-grow:1}";export{l as swirl_table}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as n,g as r}from"./p-e212b5b7.js";import{c as s,g as o,a,b as h}from"./p-869dedf2.js";import{c}from"./p-a5dce9e6.js";import{d as u,
|
|
1
|
+
import{r as t,c as e,h as i,H as n,g as r}from"./p-e212b5b7.js";import{c as s,g as o,a,b as h}from"./p-869dedf2.js";import{c}from"./p-a5dce9e6.js";import{d as u,f as l,i as f}from"./p-58abf3c6.js";var d,v={exports:{}};d=v,function(){function t(t,e,i){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){o(n.response,e,i)},n.onerror=function(){console.error("could not download file")},n.send()}function e(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function i(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(i){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var n="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof s&&s.global===s?s:void 0,r=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),o=n.saveAs||("object"!=typeof window||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!r?function(r,s,o){var a=n.URL||n.webkitURL,h=document.createElement("a");h.download=s=s||r.name||"download",h.rel="noopener","string"==typeof r?(h.href=r,h.origin===location.origin?i(h):e(h.href)?t(r,s,o):i(h,h.target="_blank")):(h.href=a.createObjectURL(r),setTimeout((function(){a.revokeObjectURL(h.href)}),4e4),setTimeout((function(){i(h)}),0))}:"msSaveOrOpenBlob"in navigator?function(n,r,s){if(r=r||n.name||"download","string"!=typeof n)navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(n,s),r);else if(e(n))t(n,r,s);else{var o=document.createElement("a");o.href=n,o.target="_blank",setTimeout((function(){i(o)}))}}:function(e,i,s,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,i,s);var a="application/octet-stream"===e.type,h=/constructor/i.test(n.HTMLElement)||n.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&h||r)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=c?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=t:location=t,o=null},u.readAsDataURL(e)}else{var l=n.URL||n.webkitURL,f=l.createObjectURL(e);o?o.location=f:location.href=f,o=null,setTimeout((function(){l.revokeObjectURL(f)}),4e4)}});n.saveAs=o.saveAs=o,d.exports=o}();const p=class{constructor(i){t(this,i),this.activate=e(this,"activate",7),this.visiblePagesChange=e(this,"visiblePagesChange",7),this.onActivate=t=>{this.activate.emit(t.detail)},this.onVisiblePagesChange=t=>{this.visiblePagesChange.emit(t.detail)},this.active=!0,this.autoplay=void 0,this.description=void 0,this.errorMessage="File could not be loaded.",this.file=void 0,this.fileName=void 0,this.pdfWorkerSrc=void 0,this.thumbnailUrl=void 0,this.type=void 0,this.typeUnsupportedMessage="File type is not supported.",this.viewMode="single",this.zoom=1}async download(){const t=this.fileName||this.file.split("/").pop(),e=await fetch(this.file);v.exports.saveAs(await e.blob(),t)}async print(){"application/pdf"===this.type&&this.viewer.print()}render(){const t=!Boolean(this.type)||!this.type.startsWith("image/")&&!this.type.startsWith("video/")&&!this.type.startsWith("audio/")&&"text/plain"!==this.type&&"text/csv"!==this.type&&"application/pdf"!==this.type;return i(n,{key:"f0234864f593cc4517b6b071e786f67f95cf707d"},i("div",{key:"6f46be1b191291be5295119c24cd14284ce455e5",class:"file-viewer"},this.type&&this.active&&i("div",{key:"0ba485f3964d5b9237f62e74947279227fe8f8d0",class:"file-viewer__file"},this.type.startsWith("image/")&&i("swirl-file-viewer-image",{key:"663bd5b5daa31fd5f0588b9ba185d9c87e9476cf",description:this.description,errorMessage:this.errorMessage,file:this.file,ref:t=>this.viewer=t}),"text/plain"===this.type&&i("swirl-file-viewer-text",{key:"67da8b8589c5871b48a9f274d5f7abe261125123",errorMessage:this.errorMessage,file:this.file,ref:t=>this.viewer=t}),"text/csv"===this.type&&i("swirl-file-viewer-csv",{key:"8abd139c41f7a5f65e7a062fcfb7454b3b4aac1f",errorMessage:this.errorMessage,file:this.file,ref:t=>this.viewer=t}),"application/pdf"===this.type&&i("swirl-file-viewer-pdf",{key:"3c46967a23f8e088e3943dbe2c4c265efe59495a",errorMessage:this.errorMessage,file:this.file,onActivate:this.onActivate,onVisiblePagesChange:this.onVisiblePagesChange,ref:t=>this.viewer=t,viewMode:this.viewMode,workerSrc:this.pdfWorkerSrc,zoom:this.zoom}),this.type.startsWith("video/")&&i("swirl-file-viewer-video",{key:"7aabb2b7f445b4d903535d2d33080e5dc6c64476",autoplay:this.autoplay,file:this.file,ref:t=>this.viewer=t,type:this.type}),this.type.startsWith("audio/")&&i("swirl-file-viewer-audio",{key:"6ca63dfcb472db56b1c59ab6648e7eff81de69b2",autoplay:this.autoplay,file:this.file,ref:t=>this.viewer=t,type:this.type}),t&&i("swirl-inline-error",{key:"bcfe4b79aa170f3fb8fd0a0e0fda4766ea59c381",message:this.typeUnsupportedMessage}))))}};p.style=":host{display:block;width:100%;height:100%;pointer-events:none}:host *{box-sizing:border-box}.file-viewer{display:flex;width:100%;height:100%;justify-content:center;align-items:center}.file-viewer__file{display:inline-flex;width:100%;height:100%;justify-content:center;align-items:center}";const b=class{constructor(i){t(this,i),this.activate=e(this,"activate",7),this.autoplay=void 0,this.file=void 0,this.type=void 0}componentDidLoad(){this.activate.emit(this.el)}render(){return i(n,{key:"1ec5708c2292f977fd43934b5d4d56c453fa5017",class:"file-viewer-audio"},i("audio",{key:"c014208ac7732ebb934ad151fa9daa4af6f11864",autoplay:this.autoplay,class:"file-viewer-audio__audio",controls:!0},i("source",{key:"31d79c0ddb99428fd7021ffcd7770b1ab8e278c7",src:this.file,type:this.type})))}get el(){return r(this)}};b.style=":host{display:inline-flex;width:100%;height:100%;pointer-events:auto}:host *{box-sizing:border-box}.file-viewer-audio__audio{width:100%;height:100%}";var w={exports:{}};
|
|
2
2
|
/* @license
|
|
3
3
|
Papa Parse
|
|
4
4
|
v5.3.2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as r,h as c,H as s,g as e}from"./p-e212b5b7.js";import{c as a}from"./p-a5dce9e6.js";import{g as o}from"./p-
|
|
1
|
+
import{r as i,c as r,h as c,H as s,g as e}from"./p-e212b5b7.js";import{c as a}from"./p-a5dce9e6.js";import{g as o}from"./p-58abf3c6.js";const t=class{constructor(c){i(this,c),this.remove=r(this,"remove",7),this.desktopMediaQuery=o(),this.desktopMediaQueryHandler=i=>{this.forceIconProps(i.matches)},this.borderRadius="pill",this.icon=void 0,this.iconColor="default",this.intent="default",this.interactive=!1,this.label=void 0,this.progress=void 0,this.pressed=void 0,this.progressBarLabel="Loading progress",this.removable=void 0,this.removeButtonLabel="Remove",this.size="m",this.variant="outline"}componentDidLoad(){this.forceIconProps(this.desktopMediaQuery.matches),this.desktopMediaQuery.onchange=this.desktopMediaQueryHandler}disconnectedCallback(){this.desktopMediaQuery.removeEventListener?.("change",this.desktopMediaQueryHandler)}forceIconProps(i){if(!Boolean(this.iconEl))return;const r=this.iconEl.children[0],c="s"===this.size?"16":i?"20":"24";r?.setAttribute("size",c)}render(){const i=this.interactive||void 0!==this.pressed?"button":"span",r=Boolean(this.el.querySelector('[slot="avatar"]')),e=!r&&Boolean(this.icon),o=a("chip",`chip--border-radius-${this.borderRadius}`,`chip--icon-color-${this.iconColor}`,`chip--intent-${this.intent}`,`chip--size-${this.size}`,`chip--variant-${this.variant}`,{"chip--pressed":this.pressed,"chip--has-progress":void 0!==this.progress,"chip--interactive":this.interactive||void 0!==this.pressed,"chip--removable":this.removable});return c(s,{key:"2c558ecbcce9b65da44616543ec1f764a01cb2cf"},c(i,{key:"4f146a7481412df5d1b398b85b455114afc40297",class:o,type:this.interactive?"button":void 0,"aria-pressed":void 0!==this.pressed?String(this.pressed):void 0},c("span",{key:"1718cc6dc4e726a8ed98fecf322cd0b6284f67a1",class:"chip__inner"},r&&c("span",{key:"9ae76d5e8b2349ad69c704b062ea6638c1f50191",class:"chip__avatar"},c("slot",{key:"87d4b9788a9efca593aa1e0cacb2e84eeae6fea3",name:"avatar"})),e&&c("span",{key:"e92922a857124377ca8892c3c242f6444954cb02",class:"chip__icon",innerHTML:this.icon,ref:i=>this.iconEl=i}),c("span",{key:"7b7d73e445ed9ea5c5641c23bcbff85aaafb0a02",class:"chip__label"},this.label)),void 0!==this.progress&&c("span",{key:"8a9fc592a21a81237a13b15185c382a016a70b5f",class:"chip__progress-indicator"},c("swirl-progress-indicator",{key:"fad6f0d26d8968a40bcb3c6d71c66c5f109e8012",label:this.progressBarLabel,value:this.progress}))),this.removable&&c("button",{key:"1cdc6a95b026f6332f72dbc46e2800f7acc21858","aria-label":this.removeButtonLabel,class:"chip__remove-button",onClick:this.remove.emit},c("swirl-icon-close",{key:"8bcf66065c3920ee3dbfca3db57dcccae00690fb",size:20})))}get el(){return e(this)}};t.style=".sc-swirl-chip-h{position:relative;display:inline-flex;max-width:100%}.sc-swirl-chip-h *.sc-swirl-chip{box-sizing:border-box}.chip.sc-swirl-chip{display:inline-flex;overflow:hidden;max-width:100%;height:2.5rem;padding:0;border:0.0625rem solid var(--s-border-default);border-radius:1.25rem;color:var(--s-text-subdued);background-color:var(--s-surface-overlay-default);font:inherit;font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-sm);flex-direction:column}.chip--size-s.sc-swirl-chip{height:2rem}.chip--size-s.chip--removable.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:calc(1.5rem + var(--s-space-12))}.chip--size-s.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:var(--s-space-12);padding-left:var(--s-space-12)}.chip--size-s.sc-swirl-chip+.chip__remove-button.sc-swirl-chip{top:var(--s-space-4);width:1.5rem;height:1.5rem}.chip--interactive.sc-swirl-chip{cursor:pointer}.chip--interactive.sc-swirl-chip:hover{background-color:var(--s-surface-overlay-hovered)}.chip--interactive.sc-swirl-chip:hover .sc-swirl-chip::part(avatar){background-color:var(--s-surface-raised-hovered)}.chip--interactive.sc-swirl-chip:hover+.chip__remove-button.sc-swirl-chip{background-color:var(--s-surface-raised-default)}.chip--interactive.sc-swirl-chip:hover+.chip__remove-button.sc-swirl-chip:hover{background-color:var(--s-surface-raised-hovered)}.chip--interactive.sc-swirl-chip:hover+.chip__remove-button.sc-swirl-chip:active{background-color:var(--s-surface-overlay-pressed)}.chip--interactive.sc-swirl-chip:active{background-color:var(--s-surface-overlay-pressed)}.chip--interactive.sc-swirl-chip:active .sc-swirl-chip::part(avatar){background-color:var(--s-surface-raised-pressed)}.chip--interactive.sc-swirl-chip:active+.chip__remove-button.sc-swirl-chip{background-color:var(--s-surface-overlay-pressed)}.chip--icon-color-highlight.sc-swirl-chip .chip__icon.sc-swirl-chip{color:var(--s-icon-highlight)}.chip--removable.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:calc(1.875rem + var(--s-space-12))}.chip--intent-critical.sc-swirl-chip{border-color:var(--s-border-critical);color:var(--s-text-critical)}.chip--intent-critical.sc-swirl-chip .chip__icon.sc-swirl-chip{color:var(--s-icon-critical)}.chip--border-radius-sm.sc-swirl-chip{border-radius:var(--s-border-radius-sm)}.chip--intent-success.sc-swirl-chip{border-color:var(--s-border-success);color:var(--s-text-success)}.chip--intent-success.sc-swirl-chip .chip__icon.sc-swirl-chip{color:var(--s-icon-success)}.chip--variant-outline.chip--pressed.sc-swirl-chip{color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.chip--variant-outline.chip--pressed.sc-swirl-chip:hover{background-color:var(--s-action-primary-hovered)}.chip--variant-outline.chip--pressed.sc-swirl-chip:hover+.chip__remove-button.sc-swirl-chip{background-color:var(--s-action-primary-hovered)}.chip--variant-outline.chip--pressed.sc-swirl-chip:active{background-color:var(--s-action-primary-pressed)}.chip--variant-outline.chip--pressed.sc-swirl-chip:active+.chip__remove-button.sc-swirl-chip{background-color:var(--s-action-primary-pressed)}.chip--variant-outline.chip--pressed.sc-swirl-chip+.chip__remove-button.sc-swirl-chip{color:var(--s-text-on-action-primary);background-color:var(--s-action-primary-default)}.chip--variant-outline.chip--pressed.sc-swirl-chip+.chip__remove-button.sc-swirl-chip:hover{background-color:var(--s-action-primary-hovered)}.chip--variant-outline.chip--pressed.sc-swirl-chip+.chip__remove-button.sc-swirl-chip:active{background-color:var(--s-action-primary-pressed)}.chip--variant-plain.sc-swirl-chip{height:auto;border:none;border-radius:0;background-color:transparent}.chip--variant-plain.chip--interactive.sc-swirl-chip:hover{background-color:transparent;text-decoration:underline;text-underline-offset:var(--s-space-4)}.chip--variant-plain.chip--interactive.sc-swirl-chip:hover .sc-swirl-chip::part(avatar){background-color:var(--s-surface-raised-hovered)}.chip--variant-plain.chip--interactive.sc-swirl-chip:active{background-color:transparent}.chip--variant-plain.chip--interactive.sc-swirl-chip:active .sc-swirl-chip::part(avatar){background-color:var(--s-surface-raised-pressed)}.chip--variant-plain.chip--removable.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:var(--s-space-12)}.chip--variant-plain.sc-swirl-chip+.chip__remove-button.sc-swirl-chip{position:relative;top:0;right:auto}.chip--variant-plain.sc-swirl-chip .chip__inner.sc-swirl-chip{padding-right:0;padding-left:0}.chip--has-progress.sc-swirl-chip+.chip__remove-button.sc-swirl-chip{top:0.1875rem}.chip__inner.sc-swirl-chip{display:inline-flex;max-width:100%;height:100%;padding-right:var(--s-space-16);padding-left:var(--s-space-16);align-items:center}.chip__avatar.sc-swirl-chip,.chip__icon.sc-swirl-chip{display:inline-flex;margin-right:var(--s-space-8);flex-shrink:0}.chip__avatar.sc-swirl-chip{overflow:hidden;width:1.75rem;height:1.75rem;margin-left:-0.625rem}.chip__icon.sc-swirl-chip{margin-left:-0.25rem;color:var(--s-icon-default)}.chip__label.sc-swirl-chip{overflow:hidden;flex-grow:1;white-space:nowrap;text-overflow:ellipsis}.chip__progress-indicator.sc-swirl-chip{width:100%}.chip__remove-button.sc-swirl-chip{position:absolute;top:0.3125rem;right:var(--s-space-4);display:inline-flex;width:1.875rem;height:1.875rem;padding:0;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-default);background-color:var(--s-surface-overlay-default);cursor:pointer}.chip__remove-button.sc-swirl-chip:hover{background-color:var(--s-surface-overlay-hovered)}.chip__remove-button.sc-swirl-chip:active{background-color:var(--s-surface-overlay-pressed)}";export{t as swirl_chip}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as i,h as t,H as e,g as a}from"./p-e212b5b7.js";import{d as o}from"./p-
|
|
1
|
+
import{r as s,c as i,h as t,H as e,g as a}from"./p-e212b5b7.js";import{d as o}from"./p-58abf3c6.js";const r=class{constructor(t){s(this,t),this.activeSlidesChange=i(this,"activeSlidesChange",7),this.activeSlides=[],this.updateActiveSlideReferences=o((()=>{const s=this.getActiveSlides();s.some(((s,i)=>this.activeSlides[i]!==s))&&(this.activeSlides=s,this.activeSlidesChange.emit(this.activeSlides))}),100),this.onPreviousSlideButtonClick=()=>{this.previousSlide()},this.onNextSlideButtonClick=()=>{this.nextSlide()},this.onSlotChange=()=>{this.activeSlides[0]?.scrollIntoView({block:"nearest",inline:"start"})},this.onScroll=()=>{this.updateActiveSlideReferences(),this.checkScrollPosition()},this.label=void 0,this.nextSlideButtonLabel="Next slide",this.previousSlideButtonLabel="Previous slide",this.loopAround=!1,this.isAtEnd=void 0,this.isAtStart=void 0,this.isScrollable=void 0}onWindowResize(){this.checkScrollStatus()}componentDidLoad(){queueMicrotask((()=>{this.checkScrollStatus(),this.checkScrollPosition()}))}async scrollToSlide(s){const i=this.getSlides().find((i=>i.id===s));Boolean(i)&&i.scrollIntoView({block:"nearest",inline:"start"})}previousSlide(){const s=this.getSlides(),i=this.getActiveSlides(),t=i[0].previousElementSibling||(this.loopAround?s[s.length-1]:i[0]);t?.scrollIntoView({block:"nearest",inline:"start"})}nextSlide(){const s=this.getSlides(),i=this.getActiveSlides(),t=!Boolean(i[i.length-1].nextElementSibling)&&this.loopAround?s[0]:i[0].nextElementSibling;t?.scrollIntoView({block:"nearest",inline:"start"})}getSlides(){return Array.from(this.el.querySelectorAll("swirl-carousel-slide"))}getActiveSlides(){return this.getSlides().filter((s=>this.checkInView(s)))}checkScrollStatus(){this.isScrollable=this.slidesContainer.scrollWidth>this.slidesContainer.offsetWidth}checkScrollPosition(){const s=this.getSlides(),i=this.getActiveSlides(),t=i[0]===s[0],e=i[i.length-1]===s[s.length-1];t!==this.isAtStart&&(this.isAtStart=t),e!==this.isAtEnd&&(this.isAtEnd=e)}checkInView(s){let i=this.slidesContainer.scrollLeft,t=s.offsetLeft;return t>=i&&t+s.clientWidth<=i+this.slidesContainer.clientWidth}render(){return t(e,{key:"aab30bbdf49103123c0cacf6707662830517a5dd","aria-label":this.label,"aria-roledescription":"carousel",role:"group"},t("div",{key:"51abe6639be84f6da7908edcb7c7204ae381c6c9",class:"carousel"},this.isScrollable&&!this.isAtStart&&t("swirl-button",{key:"843a9edbbe1f4d50e3c9a109046777b9dc98c3d0",class:"carousel__previous-slide-button",hideLabel:!0,icon:"<swirl-icon-arrow-back></swirl-icon-arrow-back>",label:this.previousSlideButtonLabel,onClick:this.onPreviousSlideButtonClick,pill:!0,variant:"floating"}),this.isScrollable&&!this.isAtEnd&&t("swirl-button",{key:"fce0df1eb6eee6fba16792a8a5e2330fdd254880",class:"carousel__next-slide-button",hideLabel:!0,icon:"<swirl-icon-arrow-forward></swirl-icon-arrow-forward>",label:this.nextSlideButtonLabel,onClick:this.onNextSlideButtonClick,pill:!0,variant:"floating"}),t("div",{key:"d2a750724ff71b3457b424ce798e908787d3c18c","aria-live":"polite",class:"carousel__slides",onScroll:this.onScroll,ref:s=>this.slidesContainer=s},t("slot",{key:"be830ac885a7dd1a74e44a60d4f6a5a2d41f6b62",onSlotchange:this.onSlotChange}))))}get el(){return a(this)}};r.style=":host{position:relative;display:block;overflow:hidden;width:100%;margin-top:calc(-1 * var(--s-space-24));margin-bottom:calc(-1 * var(--s-space-24))}:host(:hover) .carousel__previous-slide-button{pointer-events:auto;opacity:1}:host(:hover) .carousel__next-slide-button{pointer-events:auto;opacity:1}:host *{box-sizing:border-box}.carousel{position:relative;overflow:hidden;width:100%}.carousel__slides{position:relative;display:flex;overflow-x:auto;overflow-y:hidden;width:100%;padding:var(--s-space-24) var(--s-space-16) var(--s-space-24)\n var(--s-space-16);scroll-padding:var(--s-space-16);scrollbar-width:none;scroll-snap-type:x mandatory;scroll-behavior:smooth}.carousel__slides::-webkit-scrollbar{display:none}.carousel__slides ::slotted(*){margin-left:var(--s-space-16);flex-grow:0;flex-shrink:0;scroll-snap-align:start}@media (min-width: 768px){.carousel__slides ::slotted(*){margin-left:var(--s-space-24)}}@media (min-width: 768px){.carousel__slides{padding-right:var(--s-space-24);padding-left:var(--s-space-24);scroll-padding:var(--s-space-24)}}.carousel__previous-slide-button{position:absolute;z-index:1;top:calc(50% - var(--s-space-12));left:var(--s-space-4);visibility:hidden;transition:opacity 0.2s;transform:translateY(-50%) scale(0.72);pointer-events:none;opacity:0}@media (min-width: 768px){.carousel__previous-slide-button{visibility:visible}}.carousel__next-slide-button{position:absolute;z-index:1;top:calc(50% - var(--s-space-12));right:var(--s-space-4);visibility:hidden;transition:opacity 0.2s;transform:translateY(-50%) scale(0.72);pointer-events:none;opacity:0}@media (min-width: 768px){.carousel__next-slide-button{visibility:visible}}";export{r as swirl_carousel}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as s,H as t,g as a}from"./p-e212b5b7.js";import{c as i}from"./p-
|
|
1
|
+
import{r as e,h as s,H as t,g as a}from"./p-e212b5b7.js";import{c as i}from"./p-58abf3c6.js";const o=class{constructor(s){e(this,s),this.sort=void 0,this.sortable=void 0,this.maxWidth=void 0,this.minWidth="fit-content",this.sticky=void 0,this.width=void 0}componentDidRender(){const e=i(this.el,"swirl-table");e?.rerender()}render(){const e={flex:Boolean(this.width)?`0 0 ${this.width}`:"",maxWidth:this.maxWidth||"",minWidth:this.minWidth||""};return s(t,{key:"4ca9e792e2e889ff77f48f505422bb85a7ee5a70","aria-sort":this.sort,class:"table-column",role:"columnheader",style:e},s("span",{key:"11acfd8452a241a50ed67dd9ec2f094a15988d82"},s("slot",{key:"3987b4bb3d7665e69b90dee037342fcfaa3540d2"})),this.sortable&&s("span",{key:"68bd9dd35cc26ef8073294f303551b246b26d5e2",class:"table-column__sort-indicator"},"ascending"===this.sort&&s("swirl-icon-arrow-upward",{key:"3752451d54b8029363664ee08517741ccf2a572e","aria-hidden":"true",size:20}),"descending"===this.sort&&s("swirl-icon-arrow-downward",{key:"450042a595570364cb4f35b0f4455f30a3d7e3d0","aria-hidden":"true",size:20}),!Boolean(this.sort)&&" "))}get el(){return a(this)}};o.style=":host{display:flex;overflow:hidden;padding-top:var(--s-space-12);padding-right:var(--s-space-16);padding-bottom:var(--s-space-12);padding-left:var(--s-space-16);flex-basis:0;flex-grow:1;flex-shrink:1;align-items:center;border-bottom:var(--s-border-width-default) solid var(--s-border-default);color:var(--s-text-subdued);background-color:var(--s-surface-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;letter-spacing:var(--s-letter-spacing-tighter);text-overflow:ellipsis;transition:box-shadow 0.15s;gap:var(--s-space-8)}:host(.table-column--has-shadow-right){box-shadow:var(--swirl-table-sticky-right-shadow)}:host(.table-column--has-shadow-left){box-shadow:var(--swirl-table-sticky-left-shadow)}:host *{box-sizing:border-box}.table-column__sort-indicator{display:inline-flex;width:1.25rem;height:1.25rem;flex-grow:0;flex-shrink:0}";export{o as swirl_table_column}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as a}from"./p-e212b5b7.js";import{c as e}from"./p-a5dce9e6.js";import{g as o}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i,H as a}from"./p-e212b5b7.js";import{c as e}from"./p-a5dce9e6.js";import{g as o}from"./p-58abf3c6.js";const r=class{constructor(i){t(this,i),this.dismiss=s(this,"dismiss",7),this.desktopMediaQuery=o(),this.desktopMediaQueryHandler=t=>{this.forceIconProps(t.matches)},this.onDismiss=()=>{this.dismiss.emit(this.toastId)},this.accessibleDismissLabel="Dismiss",this.content=void 0,this.dismissLabel=void 0,this.duration=void 0,this.icon=void 0,this.intent="default",this.toastId=void 0}watchDuration(){this.startTimer()}componentDidLoad(){this.startTimer(),this.forceIconProps(this.desktopMediaQuery.matches),this.desktopMediaQuery.onchange=this.desktopMediaQueryHandler}disconnectedCallback(){this.desktopMediaQuery.removeEventListener?.("change",this.desktopMediaQueryHandler)}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.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:"921ff1d7869007a8bfef652310d255941d24c088"},i("div",{key:"b50440dbd7a8c917d0220bca3a42146a6ca99efd",class:t},this.icon&&i("span",{key:"6971954911e9077a5114db40f464c7078800a692",class:"toast__icon",innerHTML:this.icon,part:"toast__icon",ref:t=>this.iconEl=t}),i("span",{key:"05a9fc0cca75a4839ea2b5fa2316afda4e5702bf",class:"toast__content",innerHTML:this.content,part:"toast__content"},i("slot",{key:"60d16baf8f4a7c53994349ac42a80d4632d055d1"})),i("button",{key:"2ab3ae0c7b6e685d69f97e17f6f2a59ceeff493b","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:"025c972db050fca597c00b9920905b788993994d",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 t,c as e,h as i,H as s,g as o}from"./p-e212b5b7.js";import{c as n,o as a,f as h,a as r}from"./p-bc0de553.js";import{c as l}from"./p-a5dce9e6.js";import{q as c,c as m,p as d,i as u,b}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,H as s,g as o}from"./p-e212b5b7.js";import{c as n,o as a,f as h,a as r}from"./p-bc0de553.js";import{c as l}from"./p-a5dce9e6.js";import{q as c,c as m,p as d,i as u,b}from"./p-58abf3c6.js";const f=class{constructor(i){t(this,i),this.done=e(this,"done",7),this.valueChange=e(this,"valueChange",7),this.mobileMediaQuery=window.matchMedia("(min-width: 768px)"),this.mediaQueryHandler=()=>{this.updateMobileState()},this.resetMenu=()=>{this.items.forEach((t=>{t.tabIndex=-1})),this.level>0||setTimeout((()=>{this.activeLevel=0,c(this.el,"swirl-menu").forEach((t=>{t.active=!1,t.parentElement.expanded=!1}))}),this.mobile?200:60)},this.closeMenu=()=>{this.disableAutoUpdate&&this.disableAutoUpdate(),this.swirlPopover.close(),this.resetMenu()},this.reposition=async()=>{if(this.mobile||0===this.level)return void(this.position=void 0);const t=this.el.parentElement;Boolean(t)&&Boolean(this.menuContainer)&&(this.position=await n(t,this.menuContainer,{placement:"right-start",strategy:"fixed",middleware:[a({mainAxis:-10,crossAxis:0}),h()]}))},this.onKeyDown=t=>{if("ArrowDown"===t.code)t.preventDefault(),t.stopPropagation(),this.focusNextItem();else if("ArrowUp"===t.code)t.preventDefault(),t.stopPropagation(),this.focusPreviousItem();else if("ArrowLeft"===t.code)t.preventDefault(),t.stopPropagation(),this.rootMenu.goBack();else if("ArrowRight"===t.code){t.preventDefault();const e=m(this.items[this.getActiveItemIndex()],"swirl-menu-item");if(!Boolean(e))return;this.rootMenu.activateMenuItem(e)}},this.onClose=()=>{this.closeMenu()},this.onDone=()=>{this.closeMenu(),this.done.emit()},this.onGoBack=()=>{this.rootMenu.goBack()},this.active=!0,this.label=void 0,this.level=0,this.mobileBackButtonLabel="Back",this.mobileCloseMenuButtonLabel="Close menu",this.mobileDoneButtonLabel="Done",this.value=void 0,this.variant="action",this.activeLevel=0,this.mobile=void 0,this.position=void 0}componentWillLoad(){this.updateMobileState(),this.updateLevel(),this.observeSlotChanges()}componentDidLoad(){this.mobileMediaQuery.onchange=this.mediaQueryHandler,this.parentMenu=m(this.el.parentElement,"swirl-menu"),this.swirlPopover=m(this.el,"swirl-popover"),this.rootMenu=d(this.el,"swirl-menu").pop(),Boolean(this.parentMenu)&&queueMicrotask((()=>{this.active=!1})),this.swirlPopover.addEventListener("popoverClose",this.resetMenu),this.updateItems()}disconnectedCallback(){this.swirlPopover?.removeEventListener("popoverClose",this.resetMenu),this.mobileMediaQuery.removeEventListener?.("change",this.mediaQueryHandler),this.observer?.disconnect()}watchActive(){this.reposition(),this.disableAutoUpdate&&this.disableAutoUpdate(),this.disableAutoUpdate=r(this.el.parentElement,this.menuContainer,this.reposition)}async activateMenuItem(t){if(Boolean(this.parentMenu))return;const e=await t.getParentMenu(),i=c(this.el,"swirl-menu").filter((t=>t.level>=e.level&&t!==e));i.forEach((t=>{t.active=!1,t.parentElement.expanded=!1}));const s=await t.getSubMenu();Boolean(s)&&(t.expanded=!0,s.active=!0,this.activeLevel=s.level,setTimeout((()=>{s.focusFirstItem()}),this.mobile?200:60))}async close(){this.closeMenu()}async goBack(){if(Boolean(this.parentMenu)||0===this.activeLevel)return;const t=(c(this.el,"swirl-menu").find((t=>t.level===this.activeLevel&&t.active))||this.rootMenu).parentElement;t.expanded=!1,this.activeLevel=Math.max(this.activeLevel-1,0),c(this.el,"swirl-menu").filter((t=>t.level>this.activeLevel)).forEach((t=>{t.active=!1})),(c(this.el,"swirl-menu").find((t=>t.level===this.activeLevel&&t.active))||this.rootMenu).focusItemAtIndex(Array.from(t.parentElement.children).indexOf(t))}async focusFirstItem(){this.focusItem(this.items[0])}async focusItemAtIndex(t){this.focusItem(this.items[t])}async updateSelection(t){this.valueChange.emit(t.value)}observeSlotChanges(){this.observer=new MutationObserver((()=>{this.updateItems()})),this.observer.observe(this.el,{childList:!0})}updateMobileState(){const t=u();t!==this.mobile&&(this.mobile=t)}updateItems(){this.items=[...c(this.el,'[role="menuitem"]'),...c(this.el,'[role="menuitemradio"]')].filter((t=>m(t,"swirl-menu")===this.el))}updateLevel(){const t=d(this.el.parentNode,"swirl-menu");this.level=t.length}focusItem(t){[...c(this.rootMenu,'[role="menuitem"]'),...c(this.rootMenu,'[role="menuitemradio"]')].forEach((t=>{t.tabIndex=-1})),Boolean(t)&&(t.tabIndex=0,t.focus())}focusNextItem(){const t=this.getActiveItemIndex();this.focusItem(this.items[(t+1)%this.items.length])}focusPreviousItem(){const t=this.getActiveItemIndex();this.focusItem(this.items[0===t?this.items.length-1:t-1])}getActiveItemIndex(){const t=b();return this.items.findIndex((e=>e===t||e===t?.querySelector('[role="menuitem"]')||e===t?.querySelector('[role="menuitemradio"]')))}render(){const t=!Boolean(this.parentMenu),e=t&&this.mobile?void 0:this.label,o=t&&this.mobile?"menu-title":void 0,n=t?"menubar":"menu",a=l("menu",`menu--level-${this.level}`,{"menu--active":this.active,"menu--mobile":this.mobile,"menu--root":t});return i(s,{key:"4145b9c3841c68d878e37d65be5302154cd9bab4"},i("div",{key:"ef3a3ef267d9f208238a27c05fe1554b9af1fce1",class:a},this.mobile&&t&&i("div",{key:"2ad0c6cbd517a1a0a073f1acd3d511b02879ec87",class:"menu__mobile-header"},0===this.activeLevel&&i("swirl-button",{key:"a2caeb49f878066f56ffc5e4136eba0b5f5efe17",hideLabel:!0,icon:"<swirl-icon-close></swirl-icon-close>",label:this.mobileCloseMenuButtonLabel,onClick:this.onClose,variant:"plain"}),this.activeLevel>0&&i("swirl-button",{key:"00e24424c658e14d153948cbfb0b4249f3ac73e6",hideLabel:!0,icon:"<swirl-icon-chevron-left></swirl-icon-chevron-left>",label:this.mobileBackButtonLabel,onClick:this.onGoBack,variant:"plain"}),i("span",{key:"209c673b378986f0c7b0f4c010fa00374c1f4dd1",class:"menu__title",id:"menu-title"},i("swirl-heading",{key:"86a319ad8eb42ffca49eb89937a8678f144dcd57",align:"center",as:"span",level:4,text:this.label,truncate:!0})),i("swirl-button",{key:"08d1faa338e1271d50bae4cf1dcf632429498df9",class:"menu__done-button",intent:"primary",label:this.mobileDoneButtonLabel,onClick:this.onDone})),i("div",{key:"0e7f5155d3fdbdb3a9944d8c243c04cd45c1662b","aria-label":e,"aria-labelledby":o,"aria-orientation":"vertical",class:"menu__menu",onKeyDown:this.onKeyDown,ref:t=>this.menuContainer=t,role:n,style:!this.mobile&&this.level>0?{top:Boolean(this.position)?`${this.position?.y}px`:"",left:Boolean(this.position)?`${this.position?.x}px`:""}:this.mobile?{left:t?`calc(-100% * ${this.activeLevel})`:"100%"}:void 0},i("slot",{key:"8c89371bb23043eb8553e7473ba086bfdeee56bd"}))))}get el(){return o(this)}static get watchers(){return{active:["watchActive"]}}};f.style=":host{display:block}:host *{box-sizing:border-box}.menu{width:100%;--swirl-ghost-button-background-default:var(--s-surface-overlay-default);--swirl-ghost-button-background-hovered:var(--s-surface-overlay-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-overlay-pressed)}.menu--mobile.menu--root{position:relative}.menu--mobile.menu--root .menu__menu{top:3.5rem;transition:left 0.2s}.menu--mobile.menu--active .menu__menu{display:block}.menu--mobile .menu__menu{position:absolute;top:0;left:0;display:none;width:100%}:not(.menu--mobile).menu--root{position:relative}:not(.menu--mobile).menu--root .menu__menu{position:relative;padding-top:0;padding-bottom:0}:not(.menu--mobile):not(.menu--root) .menu__menu{z-index:1;max-width:22.5rem;border-radius:var(--s-border-radius-sm);box-shadow:var(--s-shadow-level-1)}:not(.menu--mobile).menu--active .menu__menu{display:block}:not(.menu--mobile) .menu__menu{position:fixed;display:none}.menu__mobile-header{display:flex;height:3.5rem;padding-right:var(--s-space-16);padding-left:var(--s-space-16);justify-content:space-between;align-items:center;border-bottom:var(--s-border-width-default) solid var(--s-border-default);gap:var(--s-space-8)}.menu__mobile-header>*{display:inline-flex;flex-shrink:0}.menu__title{min-width:0;flex-grow:1;flex-shrink:1}.menu__title swirl-heading{min-width:0}.menu__done-button{margin-right:calc(-1 * var(--s-space-8))}.menu__menu{padding-top:var(--s-space-8);padding-bottom:var(--s-space-8);background-color:var(--s-surface-overlay-default)}";export{f as swirl_menu}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(t,o){return t?t instanceof ShadowRoot?n(t.host,o):t instanceof HTMLElement&&t.matches(o)?t:n(t.parentNode,o):null}function t(n,t){let o=n;for(;null!==o;){if(o===t)return!0;o=o.parentNode,o instanceof ShadowRoot&&(o=o.host)}return!1}function o(n=document){const t=n.activeElement;if(Boolean(t))return Boolean(t.shadowRoot)?o(t.shadowRoot):t}const e=()=>document.documentElement.classList.contains("disable-desktop-style-tweaks")?window.matchMedia(null):window.matchMedia("(min-width: 992px) and (max-width: 1439px) and (hover: hover), (min-width: 1440px)");function i(n,t,o=!1){let e;return async function(){const i=this,r=arguments,a=o&&!Boolean(e);clearTimeout(e),e=setTimeout((function(){e=null,o||n.apply(i,r)}),t),a&&n.apply(i,r)}}function r(n,t){const o=t.scrollTop,e=o+t.clientHeight,i=t.getBoundingClientRect(),r=n.getBoundingClientRect().top-i.top+o,a=r+n.offsetHeight;return(a>e?e:a)-(r<o?o:r)}function a(){return!window.matchMedia("(min-width: 768px)").matches}function u(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function c(n,t,o=[]){return n?n instanceof ShadowRoot?c(n.host,t,o):n instanceof HTMLElement&&n.matches(t)?c(n.parentNode,t,[...o,n]):c(n.parentNode,t,o):o}function s(n,t){const o=function n(t,o){if(!Boolean(o))return[];const e=Array.from(o.querySelectorAll(t)),i=Boolean(window.HTMLSlotElement)&&o instanceof HTMLSlotElement?o.assignedElements():[],r=[...Array.from(o.children),...i],a=n(t,o.shadowRoot);return[...e,...r.map((o=>n(t,o))).flat(),...a]}(t,n).filter(((n,t,o)=>!o.some(((o,e)=>o.isSameNode(n)&&e>t))));return o}function f(n){const t=new Date(n);return t.setMinutes(t.getMinutes()+t.getTimezoneOffset()),t}export{t as a,o as b,n as c,i as d,u as e,r as f,e as g,a as i,c as p,s as q,f as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as t,H as s}from"./p-e212b5b7.js";import{c as n}from"./p-a5dce9e6.js";import{g as e}from"./p-
|
|
1
|
+
import{r as i,h as t,H as s}from"./p-e212b5b7.js";import{c as n}from"./p-a5dce9e6.js";import{g as e}from"./p-58abf3c6.js";const a=class{constructor(t){i(this,t),this.desktopMediaQuery=e(),this.desktopMediaQueryHandler=i=>{this.forceIconProps(i.matches)},this.icon=void 0,this.intent=void 0,this.message=void 0,this.size="m",this.iconSize=20}componentDidLoad(){this.forceIconProps(this.desktopMediaQuery.matches),this.desktopMediaQuery.onchange=this.desktopMediaQueryHandler}disconnectedCallback(){this.desktopMediaQuery.removeEventListener?.("change",this.desktopMediaQueryHandler)}forceIconProps(i){if(!Boolean(this.iconEl))return;const t=this.iconEl.children[0];if(!Boolean(t))return;let s="24";"s"===this.size?s="16":i&&(s="20"),t.setAttribute("size",s)}render(){const i=n("inline-status",`inline-status--intent-${this.intent}`,`inline-status--size-${this.size}`);return t(s,{key:"fe0723967885cc882cadbdc3d46530ca18ce3b05"},t("span",{key:"23e3cc77fa189a68120c877f5d53bc1b69ad07d0",class:i,part:"inline-status"},this.icon&&t("span",{key:"a0a68a0c617d9d5d6b58a9bcd26950016e237691",class:"inline-status__icon",innerHTML:this.icon,ref:i=>this.iconEl=i}),t("span",{key:"0125076a5ce37f690a169cb39bb61b4bc74c9aa7",class:"inline-status__message"},this.message)))}};a.style=":host{display:inline-flex}:host *{box-sizing:border-box}.inline-status{display:inline-flex;color:var(--s-text-default);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.inline-status{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.inline-status--size-s{font-size:var(--s-font-size-sm)}.inline-status--size-s .inline-status__icon{width:1rem;height:1rem;margin-top:0.125rem}.inline-status--size-s .inline-status__message{padding-top:0}.inline-status--intent-critical{color:var(--s-text-critical)}.inline-status--intent-critical .inline-status__icon{color:var(--s-icon-critical)}.inline-status--intent-info{color:var(--s-text-info)}.inline-status--intent-info .inline-status__icon{color:var(--s-icon-info)}.inline-status--intent-neutral{color:var(--s-text-subdued)}.inline-status--intent-neutral .inline-status__icon{color:var(--s-icon-default)}.inline-status--intent-success{color:var(--s-text-success)}.inline-status--intent-success .inline-status__icon{color:var(--s-icon-success)}.inline-status--intent-warning{color:var(--s-text-warning)}.inline-status--intent-warning .inline-status__icon{color:var(--s-icon-warning)}.inline-status__icon{display:inline-flex;width:1.5rem;height:1.5rem;margin-right:var(--s-space-4);color:var(--s-icon-default);align-self:flex-start}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.inline-status__icon{width:1.25rem;height:1.25rem}}.inline-status__message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding-top:0.0625rem}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.inline-status__message{padding-top:0}}";export{a as swirl_inline_status}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as o,g as r}from"./p-e212b5b7.js";import{c as s}from"./p-a5dce9e6.js";import{c as a}from"./p-
|
|
1
|
+
import{r as t,h as e,H as o,g as r}from"./p-e212b5b7.js";import{c as s}from"./p-a5dce9e6.js";import{c as a}from"./p-58abf3c6.js";const l=class{constructor(e){t(this,e),this.highlighted=void 0,this.index=void 0}componentDidLoad(){const t=a(this.el,"swirl-table");t?.rerender()}render(){const t=s("table-row",{"table-row--highlighted":this.highlighted});return e(o,{key:"ee24db5f4287600c4ea793feba384922eebda815","aria-rowindex":this.index,class:t,role:"row"},e("slot",{key:"e46df48d65e35240559a5cbc2afdfebad45dff19"}))}get el(){return r(this)}};l.style=":host{display:flex}:host(.table-row--highlighted){--swirl-ghost-button-background-default:transparent}:host(.table-row--highlighted) ::slotted(.table-cell){background-color:rgba(240, 242, 255, 1);}:host ::slotted(.table-cell){border-bottom:var(--s-border-width-default) solid var(--s-border-default)}:host *{box-sizing:border-box}";export{l as swirl_table_row}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as t,F as e,c as s,H as o,g as l}from"./p-e212b5b7.js";import{c as r}from"./p-a5dce9e6.js";import{g as a}from"./p-81ca5135.js";import{v as c}from"./p-14616bce.js";const n=class{constructor(t){i(this,t),this.color=void 0,this.size=24}render(){const i=20===this.size?24:this.size,s={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},o=r("swirl-icon",`swirl-icon--size-${this.size}`);return t("svg",{key:"5c2e7e3c4a842bf1892e834b07baffb4c517afd6","aria-hidden":"true",class:o,fill:"none",height:this.size,part:"icon",style:s,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&t(e,{key:"45584baca485ca064783a621f1b361da3710dd50"},t("path",{key:"58daed787c831d9ca16a767aa6ccfa65a7b2495e","fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4142 4.91924C12.8047 5.30976 12.8047 5.94293 12.4142 6.33345L7.08086 11.6667C6.69033 12.0572 6.05717 12.0572 5.66664 11.6667L3.70711 9.70707C3.31658 9.31655 3.31658 8.68338 3.70711 8.29286C4.09763 7.90233 4.7308 7.90233 5.12132 8.29286L6.37375 9.54539L11 4.91924C11.3905 4.52871 12.0237 4.52871 12.4142 4.91924Z",fill:"currentColor"})),(20===this.size||24===this.size)&&t(e,{key:"02cbbfa93b02d3643d086531c8d9b0f97867cc4d"},t("path",{key:"c5e2e0cd9706975d7b1f92b3fbf9ec98ab7d658d","fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.6213 7.37879C19.2071 7.96458 19.2071 8.91433 18.6213 9.50011L10.6213 17.5C10.0355 18.0858 9.08577 18.0858 8.49998 17.5L5.56068 14.5605C4.97489 13.9748 4.97489 13.025 5.56068 12.4392C6.14646 11.8534 7.09621 11.8534 7.682 12.4392L9.56064 14.318L16.5 7.37879C17.0858 6.79301 18.0355 6.79301 18.6213 7.37879Z",fill:"currentColor"})),28===this.size&&t(e,{key:"ae283cbaeaf21cf041546fc8d3c51fc05bd6da27"},t("path",{key:"15511a9b600287677c81b40b7f618551bd9ae007","fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.7248 8.60863C22.4083 9.29205 22.4083 10.4001 21.7248 11.0835L12.3915 20.4167C11.7081 21.1001 10.6001 21.1001 9.91663 20.4167L6.48744 16.9873C5.80403 16.3039 5.80403 15.1959 6.48744 14.5125C7.17086 13.8291 8.2789 13.8291 8.96232 14.5125L11.1541 16.7044L19.25 8.60863C19.9334 7.92521 21.0414 7.92521 21.7248 8.60863Z",fill:"currentColor"})))}};n.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const d=class{constructor(t){i(this,t),this.color=void 0,this.size=24}render(){const i=20===this.size?24:this.size,s={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},o=r("swirl-icon",`swirl-icon--size-${this.size}`);return t("svg",{key:"44ba4247291bb9b4f5986d6b402595ec53a9255d","aria-hidden":"true",class:o,fill:"none",height:this.size,part:"icon",style:s,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&t(e,{key:"4cc27699191450498538a92a1e95ab81c917fa8d"},t("rect",{key:"bdca07266c356dfe9664a685a9c48a3de1d37e53",x:"9",y:"3",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"12234de2991f23e689d2242d61b96cada028f77c",x:"9",y:"7",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"a35522dfa2ddab3230529f56e4b680d6fae898c6",x:"9",y:"11",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"85f03c370e41cfa80ca02aca56d1b8a7fa68bee7",x:"5",y:"3",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"dbdd5d019c6a99060aef885f3015158ef1bd3a01",x:"5",y:"7",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"754f0a46517777670eb90b0f43711d1c1daa2675",x:"5",y:"11",width:"2",height:"2",rx:"1",fill:"currentColor"})),(20===this.size||24===this.size)&&t(e,{key:"474407e1224f5d48362b2631904aeba8cbd18a47"},t("rect",{key:"0e5b82ca104e5d32e5ce058df8410d912fa66308",x:"13.5",y:"4.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"d779fc9a41db6edc27aa1bff2021b13a69375ac4",x:"13.5",y:"10.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"5fcfe232ce970aba73dd32179107105cdef552be",x:"13.5",y:"16.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"54de4a22b02028deb6794281b2258bfbe60aa9d4",x:"7.5",y:"4.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"0ced0c6f82f454ee702f5c6c252900a36f610fdf",x:"7.5",y:"10.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"ba9e3b574541e76380b6baee58835902924dd9a6",x:"7.5",y:"16.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"})),28===this.size&&t(e,{key:"372e7f297e6f3ce18c1bf70ebb5c0bcf3e5c678b"},t("rect",{key:"795ddefa6595dda7224c4453eb1b3ceb1221155f",x:"15.75",y:"5.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"82cef8ec89feebfcd89127936a5a39c9f1261046",x:"15.75",y:"12.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"4e1d8f18fdff5cd33c29a879c4f816533dfcdf11",x:"15.75",y:"19.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"5ea2c4ac169b9a6745876c45289a7d2432092522",x:"8.75",y:"5.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"cbbac1eed8367d8b5b7381cdae2d3457c30f9109",x:"8.75",y:"12.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"0ab715d761d0216390f41511b1a64ba30cd64033",x:"8.75",y:"19.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"})))}};d.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const h=class{constructor(t){i(this,t),this.toggleDrag=s(this,"toggleDrag",7),this.desktopMediaQuery=a(),this.elementId=c(),this.desktopMediaQueryHandler=i=>{this.forceIconProps(i.matches),this.updateIconSize(i.matches)},this.onDragHandleKeyDown=i=>{"Space"!==i.code&&"Enter"!==i.code||(i.preventDefault(),this.toggleDrag.emit(this.el))},this.onBlur=()=>{this.focused=!1},this.onFocus=()=>{this.focused=!0},this.allowDrag=void 0,this.context="single-select",this.description=void 0,this.disabled=void 0,this.dragging=void 0,this.dragHandleDescription="Press spacebar to toggle grab",this.dragHandleLabel="Move option",this.icon=void 0,this.label=void 0,this.selected=!1,this.swirlAriaRole="option",this.value=void 0,this.iconSize=24,this.focused=void 0}componentDidLoad(){this.forceIconProps(this.desktopMediaQuery.matches),this.updateIconSize(this.desktopMediaQuery.matches),this.desktopMediaQuery.onchange=this.desktopMediaQueryHandler}disconnectedCallback(){this.desktopMediaQuery.removeEventListener?.("change",this.desktopMediaQueryHandler)}forceIconProps(i){const t=this.iconEl?.children[0];t?.setAttribute("size",i?"20":"24")}updateIconSize(i){this.iconSize=i?20:24}render(){const i=this.disabled?"true":void 0,e=String(this.selected),s="multi-select"===this.context,l=Boolean(this.icon)&&"single-select"===this.context,a=this.selected&&"single-select"===this.context,c=r("option-list-item",`option-list-item--context-${this.context}`,{"option-list-item--disabled":this.disabled,"option-list-item--draggable":this.allowDrag,"option-list-item--dragging":this.dragging,"option-list-item--selected":this.selected});return t(o,{key:"aaf1f34d75371f8fb2bc8f460536d56113d9ec9e"},t("div",{key:"9b87dd870c824593d83c0e7a4dafc5ff245a33c8","aria-checked":"menuitemradio"===this.swirlAriaRole?e:void 0,"aria-describedby":Boolean(this.description)?`option-list-item-${this.elementId}-description`:void 0,"aria-disabled":i,"aria-labelledby":`option-list-item-${this.elementId}-label`,"aria-selected":"option"===this.swirlAriaRole?e:void 0,class:c,id:`option-list-item-${this.elementId}`,onBlur:this.onBlur,onFocus:this.onFocus,part:"option-list-item",role:this.swirlAriaRole},l&&t("span",{key:"0b98d0cce7f254b1df4c102fc091f631e4a4bd2c",class:"option-list-item__icon",innerHTML:this.icon,ref:i=>this.iconEl=i}),s&&t("span",{key:"5b9f564669a2ec241ee61686d617fd61404116a6",class:"option-list-item__checkbox"},t("span",{key:"3745476383ad3132280867dea93504200fc513ff",class:"option-list-item__checkbox-box"},this.selected&&t("swirl-icon-check-strong",{key:"ea340acab712d3a6674377b1b822ff5f1faba344",class:"option-list-item__checkbox-icon",size:16}))),t("span",{key:"a29b2bbd4feff398b4ac58823d2d3d94dc1acc27",class:"option-list-item__label-container"},t("span",{key:"7a0bf4905b58fd4823bed4df4374f10553136d55",class:"option-list-item__label",id:`option-list-item-${this.elementId}-label`,part:"option-list-item__label"},this.label),this.description&&t("span",{key:"7bd62f68a9c14a93613039e469be4fc866ab2c8c",class:"option-list-item__description",id:`option-list-item-${this.elementId}-description`},this.description)),a&&t("span",{key:"ba549b64f86896c538dc5149e240fb1098ea32d9",class:"option-list-item__selection-icon"},t("swirl-icon-check-small",{key:"17c7fa1955388c62ea03b018d19fa3577c1e74b3",size:this.iconSize}))),this.allowDrag&&t("button",{key:"ed9b3064dc1a10a192bea8579ceb4acba766c24e","aria-describedby":this.dragHandleDescription,"aria-label":`${this.dragHandleLabel} "${this.label}"`,class:"option-list-item__drag-handle",onKeyDown:this.onDragHandleKeyDown,tabIndex:this.focused?0:-1,type:"button"},t("swirl-icon-drag-handle",{key:"d96455eca6d538417b800fe6fd6917db0f7bc9d3",size:this.iconSize})))}get el(){return l(this)}};h.style=".sc-swirl-option-list-item-h{position:relative;display:inline-flex;width:100%}.sc-swirl-option-list-item-h *.sc-swirl-option-list-item{box-sizing:border-box}.option-list-item.sc-swirl-option-list-item{display:inline-flex;width:100%;min-width:15rem;min-height:3rem;padding:var(--s-space-12) var(--s-space-16);align-items:center;background-color:var(--s-surface-overlay-default);cursor:pointer;gap:var(--s-space-12)}.option-list-item.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-surface-overlay-hovered)}.option-list-item.sc-swirl-option-list-item:active:not(.option-list-item--disabled){background-color:var(--s-surface-overlay-pressed)}.option-list-item.sc-swirl-option-list-item:focus{outline:none}.option-list-item.sc-swirl-option-list-item:focus-visible{background-color:var(--s-surface-overlay-hovered)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item.sc-swirl-option-list-item{min-height:0;padding:var(--s-space-8) var(--s-space-12);gap:var(--s-space-8)}}.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label-container.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1.5rem)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label-container.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1rem)}}.option-list-item--dragging.sc-swirl-option-list-item{z-index:1;border-radius:var(--s-border-radius-s);background-color:var(--s-surface-overlay-pressed);box-shadow:0 0.0625rem 0.125rem rgba(25, 26, 28, 0.08),\n 0 0.25rem 2rem rgba(25, 26, 28, 0.16)}.option-list-item--dragging.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-surface-overlay-pressed)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item{color:var(--s-icon-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-highlight);color:var(--s-text-on-status);background-color:var(--s-icon-highlight)}.option-list-item--disabled.sc-swirl-option-list-item{cursor:default}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{background-color:var(--s-icon-disabled)}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-text-on-status)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__description.sc-swirl-option-list-item{color:var(--s-text-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__selection-icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-icon-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-disabled);background-color:var(--s-surface-overlay-default)}.option-list-item__label-container.sc-swirl-option-list-item{display:flex;flex-grow:1;flex-direction:column}.option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-default);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__label.sc-swirl-option-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.option-list-item__description.sc-swirl-option-list-item{color:var(--s-text-subdued);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__description.sc-swirl-option-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.option-list-item__icon.sc-swirl-option-list-item{display:inline-flex;width:1.5rem;height:1.5rem;flex-shrink:0;color:var(--s-icon-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__icon.sc-swirl-option-list-item{width:1.25rem;height:1.25rem}}.option-list-item__selection-icon.sc-swirl-option-list-item{display:inline-flex;flex-shrink:0;color:var(--s-icon-highlight)}.option-list-item__checkbox.sc-swirl-option-list-item{display:inline-flex;width:1.5rem;height:1.5rem;padding:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__checkbox.sc-swirl-option-list-item{width:1.375rem;height:1.375rem}}.option-list-item__checkbox-box.sc-swirl-option-list-item{display:inline-flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:var(--s-border-radius-s)}.option-list-item__checkbox-icon.sc-swirl-option-list-item{display:inline-flex}.option-list-item__drag-handle.sc-swirl-option-list-item{position:absolute;z-index:1;top:50%;right:var(--s-space-4);display:inline-flex;margin:0;padding:0;padding:var(--s-space-8);flex-shrink:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:grab;transform:translateY(-50%)}.option-list-item__drag-handle.sc-swirl-option-list-item:active{cursor:grabbing}.option-list-item__drag-handle.sc-swirl-option-list-item:focus:not(:focus-visible){outline:none}.option-list-item__drag-handle.sc-swirl-option-list-item:focus-visible{outline-color:var(--s-focus-default)}";export{n as swirl_icon_check_small,d as swirl_icon_drag_handle,h as swirl_option_list_item}
|
|
1
|
+
import{r as i,h as t,F as e,c as s,H as o,g as l}from"./p-e212b5b7.js";import{c as r}from"./p-a5dce9e6.js";import{g as a}from"./p-58abf3c6.js";import{v as c}from"./p-14616bce.js";const n=class{constructor(t){i(this,t),this.color=void 0,this.size=24}render(){const i=20===this.size?24:this.size,s={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},o=r("swirl-icon",`swirl-icon--size-${this.size}`);return t("svg",{key:"5c2e7e3c4a842bf1892e834b07baffb4c517afd6","aria-hidden":"true",class:o,fill:"none",height:this.size,part:"icon",style:s,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&t(e,{key:"45584baca485ca064783a621f1b361da3710dd50"},t("path",{key:"58daed787c831d9ca16a767aa6ccfa65a7b2495e","fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4142 4.91924C12.8047 5.30976 12.8047 5.94293 12.4142 6.33345L7.08086 11.6667C6.69033 12.0572 6.05717 12.0572 5.66664 11.6667L3.70711 9.70707C3.31658 9.31655 3.31658 8.68338 3.70711 8.29286C4.09763 7.90233 4.7308 7.90233 5.12132 8.29286L6.37375 9.54539L11 4.91924C11.3905 4.52871 12.0237 4.52871 12.4142 4.91924Z",fill:"currentColor"})),(20===this.size||24===this.size)&&t(e,{key:"02cbbfa93b02d3643d086531c8d9b0f97867cc4d"},t("path",{key:"c5e2e0cd9706975d7b1f92b3fbf9ec98ab7d658d","fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.6213 7.37879C19.2071 7.96458 19.2071 8.91433 18.6213 9.50011L10.6213 17.5C10.0355 18.0858 9.08577 18.0858 8.49998 17.5L5.56068 14.5605C4.97489 13.9748 4.97489 13.025 5.56068 12.4392C6.14646 11.8534 7.09621 11.8534 7.682 12.4392L9.56064 14.318L16.5 7.37879C17.0858 6.79301 18.0355 6.79301 18.6213 7.37879Z",fill:"currentColor"})),28===this.size&&t(e,{key:"ae283cbaeaf21cf041546fc8d3c51fc05bd6da27"},t("path",{key:"15511a9b600287677c81b40b7f618551bd9ae007","fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.7248 8.60863C22.4083 9.29205 22.4083 10.4001 21.7248 11.0835L12.3915 20.4167C11.7081 21.1001 10.6001 21.1001 9.91663 20.4167L6.48744 16.9873C5.80403 16.3039 5.80403 15.1959 6.48744 14.5125C7.17086 13.8291 8.2789 13.8291 8.96232 14.5125L11.1541 16.7044L19.25 8.60863C19.9334 7.92521 21.0414 7.92521 21.7248 8.60863Z",fill:"currentColor"})))}};n.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const d=class{constructor(t){i(this,t),this.color=void 0,this.size=24}render(){const i=20===this.size?24:this.size,s={color:Boolean(this.color)?`var(--s-icon-${this.color})`:void 0},o=r("swirl-icon",`swirl-icon--size-${this.size}`);return t("svg",{key:"44ba4247291bb9b4f5986d6b402595ec53a9255d","aria-hidden":"true",class:o,fill:"none",height:this.size,part:"icon",style:s,viewBox:`0 0 ${i} ${i}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&t(e,{key:"4cc27699191450498538a92a1e95ab81c917fa8d"},t("rect",{key:"bdca07266c356dfe9664a685a9c48a3de1d37e53",x:"9",y:"3",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"12234de2991f23e689d2242d61b96cada028f77c",x:"9",y:"7",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"a35522dfa2ddab3230529f56e4b680d6fae898c6",x:"9",y:"11",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"85f03c370e41cfa80ca02aca56d1b8a7fa68bee7",x:"5",y:"3",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"dbdd5d019c6a99060aef885f3015158ef1bd3a01",x:"5",y:"7",width:"2",height:"2",rx:"1",fill:"currentColor"}),t("rect",{key:"754f0a46517777670eb90b0f43711d1c1daa2675",x:"5",y:"11",width:"2",height:"2",rx:"1",fill:"currentColor"})),(20===this.size||24===this.size)&&t(e,{key:"474407e1224f5d48362b2631904aeba8cbd18a47"},t("rect",{key:"0e5b82ca104e5d32e5ce058df8410d912fa66308",x:"13.5",y:"4.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"d779fc9a41db6edc27aa1bff2021b13a69375ac4",x:"13.5",y:"10.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"5fcfe232ce970aba73dd32179107105cdef552be",x:"13.5",y:"16.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"54de4a22b02028deb6794281b2258bfbe60aa9d4",x:"7.5",y:"4.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"0ced0c6f82f454ee702f5c6c252900a36f610fdf",x:"7.5",y:"10.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),t("rect",{key:"ba9e3b574541e76380b6baee58835902924dd9a6",x:"7.5",y:"16.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"})),28===this.size&&t(e,{key:"372e7f297e6f3ce18c1bf70ebb5c0bcf3e5c678b"},t("rect",{key:"795ddefa6595dda7224c4453eb1b3ceb1221155f",x:"15.75",y:"5.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"82cef8ec89feebfcd89127936a5a39c9f1261046",x:"15.75",y:"12.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"4e1d8f18fdff5cd33c29a879c4f816533dfcdf11",x:"15.75",y:"19.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"5ea2c4ac169b9a6745876c45289a7d2432092522",x:"8.75",y:"5.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"cbbac1eed8367d8b5b7381cdae2d3457c30f9109",x:"8.75",y:"12.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"}),t("rect",{key:"0ab715d761d0216390f41511b1a64ba30cd64033",x:"8.75",y:"19.25",width:"3.5",height:"3.5",rx:"1.75",fill:"currentColor"})))}};d.style=":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}";const h=class{constructor(t){i(this,t),this.toggleDrag=s(this,"toggleDrag",7),this.desktopMediaQuery=a(),this.elementId=c(),this.desktopMediaQueryHandler=i=>{this.forceIconProps(i.matches),this.updateIconSize(i.matches)},this.onDragHandleKeyDown=i=>{"Space"!==i.code&&"Enter"!==i.code||(i.preventDefault(),this.toggleDrag.emit(this.el))},this.onBlur=()=>{this.focused=!1},this.onFocus=()=>{this.focused=!0},this.allowDrag=void 0,this.context="single-select",this.description=void 0,this.disabled=void 0,this.dragging=void 0,this.dragHandleDescription="Press spacebar to toggle grab",this.dragHandleLabel="Move option",this.icon=void 0,this.label=void 0,this.selected=!1,this.swirlAriaRole="option",this.value=void 0,this.iconSize=24,this.focused=void 0}componentDidLoad(){this.forceIconProps(this.desktopMediaQuery.matches),this.updateIconSize(this.desktopMediaQuery.matches),this.desktopMediaQuery.onchange=this.desktopMediaQueryHandler}disconnectedCallback(){this.desktopMediaQuery.removeEventListener?.("change",this.desktopMediaQueryHandler)}forceIconProps(i){const t=this.iconEl?.children[0];t?.setAttribute("size",i?"20":"24")}updateIconSize(i){this.iconSize=i?20:24}render(){const i=this.disabled?"true":void 0,e=String(this.selected),s="multi-select"===this.context,l=Boolean(this.icon)&&"single-select"===this.context,a=this.selected&&"single-select"===this.context,c=r("option-list-item",`option-list-item--context-${this.context}`,{"option-list-item--disabled":this.disabled,"option-list-item--draggable":this.allowDrag,"option-list-item--dragging":this.dragging,"option-list-item--selected":this.selected});return t(o,{key:"aaf1f34d75371f8fb2bc8f460536d56113d9ec9e"},t("div",{key:"9b87dd870c824593d83c0e7a4dafc5ff245a33c8","aria-checked":"menuitemradio"===this.swirlAriaRole?e:void 0,"aria-describedby":Boolean(this.description)?`option-list-item-${this.elementId}-description`:void 0,"aria-disabled":i,"aria-labelledby":`option-list-item-${this.elementId}-label`,"aria-selected":"option"===this.swirlAriaRole?e:void 0,class:c,id:`option-list-item-${this.elementId}`,onBlur:this.onBlur,onFocus:this.onFocus,part:"option-list-item",role:this.swirlAriaRole},l&&t("span",{key:"0b98d0cce7f254b1df4c102fc091f631e4a4bd2c",class:"option-list-item__icon",innerHTML:this.icon,ref:i=>this.iconEl=i}),s&&t("span",{key:"5b9f564669a2ec241ee61686d617fd61404116a6",class:"option-list-item__checkbox"},t("span",{key:"3745476383ad3132280867dea93504200fc513ff",class:"option-list-item__checkbox-box"},this.selected&&t("swirl-icon-check-strong",{key:"ea340acab712d3a6674377b1b822ff5f1faba344",class:"option-list-item__checkbox-icon",size:16}))),t("span",{key:"a29b2bbd4feff398b4ac58823d2d3d94dc1acc27",class:"option-list-item__label-container"},t("span",{key:"7a0bf4905b58fd4823bed4df4374f10553136d55",class:"option-list-item__label",id:`option-list-item-${this.elementId}-label`,part:"option-list-item__label"},this.label),this.description&&t("span",{key:"7bd62f68a9c14a93613039e469be4fc866ab2c8c",class:"option-list-item__description",id:`option-list-item-${this.elementId}-description`},this.description)),a&&t("span",{key:"ba549b64f86896c538dc5149e240fb1098ea32d9",class:"option-list-item__selection-icon"},t("swirl-icon-check-small",{key:"17c7fa1955388c62ea03b018d19fa3577c1e74b3",size:this.iconSize}))),this.allowDrag&&t("button",{key:"ed9b3064dc1a10a192bea8579ceb4acba766c24e","aria-describedby":this.dragHandleDescription,"aria-label":`${this.dragHandleLabel} "${this.label}"`,class:"option-list-item__drag-handle",onKeyDown:this.onDragHandleKeyDown,tabIndex:this.focused?0:-1,type:"button"},t("swirl-icon-drag-handle",{key:"d96455eca6d538417b800fe6fd6917db0f7bc9d3",size:this.iconSize})))}get el(){return l(this)}};h.style=".sc-swirl-option-list-item-h{position:relative;display:inline-flex;width:100%}.sc-swirl-option-list-item-h *.sc-swirl-option-list-item{box-sizing:border-box}.option-list-item.sc-swirl-option-list-item{display:inline-flex;width:100%;min-width:15rem;min-height:3rem;padding:var(--s-space-12) var(--s-space-16);align-items:center;background-color:var(--s-surface-overlay-default);cursor:pointer;gap:var(--s-space-12)}.option-list-item.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-surface-overlay-hovered)}.option-list-item.sc-swirl-option-list-item:active:not(.option-list-item--disabled){background-color:var(--s-surface-overlay-pressed)}.option-list-item.sc-swirl-option-list-item:focus{outline:none}.option-list-item.sc-swirl-option-list-item:focus-visible{background-color:var(--s-surface-overlay-hovered)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item.sc-swirl-option-list-item{min-height:0;padding:var(--s-space-8) var(--s-space-12);gap:var(--s-space-8)}}.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label-container.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1.5rem)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label-container.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1rem)}}.option-list-item--dragging.sc-swirl-option-list-item{z-index:1;border-radius:var(--s-border-radius-s);background-color:var(--s-surface-overlay-pressed);box-shadow:0 0.0625rem 0.125rem rgba(25, 26, 28, 0.08),\n 0 0.25rem 2rem rgba(25, 26, 28, 0.16)}.option-list-item--dragging.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-surface-overlay-pressed)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item{color:var(--s-icon-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-highlight);color:var(--s-text-on-status);background-color:var(--s-icon-highlight)}.option-list-item--disabled.sc-swirl-option-list-item{cursor:default}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{background-color:var(--s-icon-disabled)}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-text-on-status)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__description.sc-swirl-option-list-item{color:var(--s-text-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__selection-icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-icon-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-disabled);background-color:var(--s-surface-overlay-default)}.option-list-item__label-container.sc-swirl-option-list-item{display:flex;flex-grow:1;flex-direction:column}.option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-default);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__label.sc-swirl-option-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.option-list-item__description.sc-swirl-option-list-item{color:var(--s-text-subdued);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__description.sc-swirl-option-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.option-list-item__icon.sc-swirl-option-list-item{display:inline-flex;width:1.5rem;height:1.5rem;flex-shrink:0;color:var(--s-icon-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__icon.sc-swirl-option-list-item{width:1.25rem;height:1.25rem}}.option-list-item__selection-icon.sc-swirl-option-list-item{display:inline-flex;flex-shrink:0;color:var(--s-icon-highlight)}.option-list-item__checkbox.sc-swirl-option-list-item{display:inline-flex;width:1.5rem;height:1.5rem;padding:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__checkbox.sc-swirl-option-list-item{width:1.375rem;height:1.375rem}}.option-list-item__checkbox-box.sc-swirl-option-list-item{display:inline-flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:var(--s-border-radius-s)}.option-list-item__checkbox-icon.sc-swirl-option-list-item{display:inline-flex}.option-list-item__drag-handle.sc-swirl-option-list-item{position:absolute;z-index:1;top:50%;right:var(--s-space-4);display:inline-flex;margin:0;padding:0;padding:var(--s-space-8);flex-shrink:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:grab;transform:translateY(-50%)}.option-list-item__drag-handle.sc-swirl-option-list-item:active{cursor:grabbing}.option-list-item__drag-handle.sc-swirl-option-list-item:focus:not(:focus-visible){outline:none}.option-list-item__drag-handle.sc-swirl-option-list-item:focus-visible{outline-color:var(--s-focus-default)}";export{n as swirl_icon_check_small,d as swirl_icon_drag_handle,h as swirl_option_list_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as s,H as e,g as n}from"./p-e212b5b7.js";import{c as h}from"./p-a5dce9e6.js";import{p as a,i as o,f as r,m as d}from"./p-df2b5856.js";import{g as c}from"./p-
|
|
1
|
+
import{r as i,c as t,h as s,H as e,g as n}from"./p-e212b5b7.js";import{c as h}from"./p-a5dce9e6.js";import{p as a,i as o,f as r,m as d}from"./p-df2b5856.js";import{g as c}from"./p-58abf3c6.js";import"./p-869dedf2.js";const p="HH:mm:ss",l=class{constructor(s){i(this,s),this.inputBlur=t(this,"inputBlur",7),this.inputFocus=t(this,"inputFocus",7),this.valueChange=t(this,"valueChange",7),this.desktopMediaQuery=c(),this.desktopMediaQueryHandler=i=>{this.updateIconSize(i.matches)},this.onChange=i=>{const t=i.target.value;let s;""===t&&(this.value=void 0,this.valueChange.emit(void 0));const e=a(t,this.format,new Date),n=new RegExp(`^${this.format.replace(/[Hhms]/g,"\\d")}$`);Boolean(t.match(n))&&(s=o(e)?r(e,p):r(new Date,p),this.value=s,this.valueChange.emit(s))},this.onBlur=i=>{this.inputBlur.emit(i);const t=i.target,s=a(t.value,this.format,new Date);if(!o(s)&&Boolean(this.value)){const i=Boolean(this.value)?a(this.value,p,new Date):void 0;Boolean(i)&&o(i)||(this.value=""),t.value=r(i,this.format)}},this.onInput=i=>{this.onChange(i)},this.onClick=i=>{i.preventDefault()},this.onFocus=i=>{this.inputFocus.emit(i),this.handleAutoSelect(i)},this.autoFocus=void 0,this.autoSelect=void 0,this.disabled=void 0,this.format="HH:mm",this.inline=void 0,this.invalid=void 0,this.placeholder="hh:mm",this.required=void 0,this.swirlAriaDescribedby=void 0,this.value=void 0,this.iconSize=24}componentWillLoad(){const i=Array.from(document.querySelectorAll("swirl-time-input")).indexOf(this.el);this.id=`swirl-time-input-${i}`}componentDidLoad(){this.setupMask(),this.updateIconSize(this.desktopMediaQuery.matches),this.desktopMediaQuery.onchange=this.desktopMediaQueryHandler,this.autoFocus&&setTimeout((()=>{this.inputEl.focus()}))}disconnectedCallback(){this.mask?.destroy(),this.desktopMediaQuery.removeEventListener?.("change",this.desktopMediaQueryHandler)}watchFormat(){this.setupMask()}updateIconSize(i){this.iconSize=i?20:24}handleAutoSelect(i){this.autoSelect&&i.target.select()}setupMask(){this.mask?.destroy(),this.mask=d.exports.create(`#${this.id}`,{mask:this.format.replace(/[Hhms]/g,"#")})}render(){const i=!0===this.invalid||!1===this.invalid?String(this.invalid):void 0,t=Boolean(this.value)?a(this.value,p,new Date):void 0,n=o(t)?r(t,this.format):void 0,d=h("time-input",{"time-input--inline":this.inline});return s(e,{key:"12c63b96d660968f5b732222118a3693129132a3"},s("div",{key:"77251862c08ca2b91b0d609c0c397954e5e18462",class:d},s("input",{key:"3809a5ea86541c1636fea6b8e243e7a3fe3ba966","aria-describedby":this.swirlAriaDescribedby,"aria-disabled":this.disabled?"true":void 0,"aria-invalid":i,autoFocus:this.autoFocus,class:"time-input__input",disabled:this.disabled,id:this.id,inputmode:"numeric",onBlur:this.onBlur,onClick:this.onClick,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,ref:i=>this.inputEl=i,required:this.required,type:"text",value:n}),s("span",{key:"226e7bf8b7aefd292cf6d3c882b237cef2287873",class:"time-input__icon"},s("swirl-icon-time-outlined",{key:"ac72d113dfcbba44a3d11fb53c96369780331aa7",size:this.iconSize}))))}get el(){return n(this)}static get watchers(){return{format:["watchFormat"]}}};l.style=".sc-swirl-time-input-h{display:flex;width:100%}.sc-swirl-time-input-h *.sc-swirl-time-input{box-sizing:border-box}.time-input.sc-swirl-time-input{position:relative;display:flex;width:100%;align-items:center;color:var(--s-text-default);line-height:var(--s-line-height-sm)}.time-input--inline.sc-swirl-time-input .time-input__icon.sc-swirl-time-input{top:-0.0625rem}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.time-input--inline.sc-swirl-time-input .time-input__icon.sc-swirl-time-input{top:0}}.time-input__input.sc-swirl-time-input{display:inline-flex;width:calc(100% - 1.25rem - var(--s-space-8));margin:0;padding:0;border:none;color:var(--s-text-default);background-color:transparent;font:inherit;font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);caret-color:var(--s-border-highlight)}.time-input__input.sc-swirl-time-input:focus{outline:none}.time-input__input.sc-swirl-time-input:disabled{color:var(--s-text-disabled);background-color:transparent}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.time-input__input.sc-swirl-time-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.time-input__icon.sc-swirl-time-input{position:absolute;top:calc(-1 * var(--s-space-12));right:0;display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.time-input__icon.sc-swirl-time-input{top:-0.625rem}}";export{l as swirl_time_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as a}from"./p-e212b5b7.js";import{a as o,c as h,o as l}from"./p-bc0de553.js";import{c}from"./p-a5dce9e6.js";import{d as r}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as a}from"./p-e212b5b7.js";import{a as o,c as h,o as l}from"./p-bc0de553.js";import{c}from"./p-a5dce9e6.js";import{d as r}from"./p-58abf3c6.js";const n=class{constructor(s){t(this,s),this.valueChange=i(this,"valueChange",7),this.onChange=t=>{t.stopPropagation(),this.updateTerm(t)},this.updateTerm=r((async t=>{this.updateSuggestions(t.detail),this.open(),this.multiSelect||Boolean(t.detail)&&""!==t.detail||(this.value=void 0,this.valueChange.emit(this.value))}),250,!1),this.onSelect=async t=>{if(t.stopPropagation(),this.multiSelect){const i=t.detail,s=this.suggestions.filter((t=>!i.includes(t.id))).map((t=>t.id));this.value=[...this.value.filter((t=>!s.includes(t.id))),...this.suggestions.filter((t=>i.includes(t.id)&&!this.value.some((i=>i.id===t.id))))],this.valueChange.emit(this.value),this.inputEl.value="";const e=this.inputEl.querySelector("input");Boolean(e)&&(e.value="",queueMicrotask((()=>{e.focus(),this.close()})),this.updateSuggestions(e.value))}else if(Boolean(t.detail[0])){const i=t.detail[0],s=this.suggestions.find((t=>t.id===i));if(!Boolean(s))return;this.value=s,this.valueChange.emit(this.value),queueMicrotask((()=>{this.inputEl.querySelector("input")?.focus(),this.close()}))}},this.onRemoveValue=t=>{Array.isArray(this.value)&&(this.value=this.value.filter((i=>i.id!==t)),this.valueChange.emit(this.value))},this.onFocusOut=t=>{const i=t.relatedTarget;Boolean(i)&&!this.el.contains(i)&&this.close()},this.onFocus=()=>{this.updateSuggestions(),this.open()},this.onKeyDown=t=>{"Escape"===t.code&&(t.preventDefault(),t.stopPropagation(),this.inputEl.querySelector("input").focus(),this.close())},this.onInputKeyDown=t=>{"ArrowDown"===t.code&&(t.preventDefault(),this.listboxEl.querySelector('[role="listbox"]')?.querySelector('[tabIndex="0"]')?.focus())},this.autoSelect=void 0,this.clearable=!0,this.clearButtonLabel="Clear input",this.disabled=void 0,this.generateSuggestions=async()=>[],this.inline=void 0,this.invalid=void 0,this.maxLength=void 0,this.menuLabel="Suggestions",this.mode=void 0,this.multiSelect=void 0,this.placeholder=void 0,this.required=void 0,this.spellCheck=void 0,this.swirlAriaDescribedby=void 0,this.value=void 0,this.active=!1,this.loading=!1,this.position=void 0,this.suggestions=[]}componentWillLoad(){const t=document.querySelectorAll("swirl-datepicker").length;this.id=`autocomplete-${t}`,this.handleInitialValue()}onWindowClick(t){this.el.contains(t.target)||this.close()}watchMultiSelect(){this.handleInitialValue()}async close(){if(!this.active)return;this.disableAutoUpdate&&this.disableAutoUpdate();const t=this.inputEl.querySelector("input");Boolean(t)&&(t.value=this.multiSelect?"":this.value?.label||""),this.active=!1}async open(){this.active||(this.active=!0,requestAnimationFrame((async()=>{await this.reposition(),this.disableAutoUpdate&&this.disableAutoUpdate(),this.disableAutoUpdate=o(this.inputEl,this.listboxContainerEl,this.reposition.bind(this),{animationFrame:!0}),this.listboxContainerEl.scrollTop=0,this.updateSuggestions(this.inputEl.querySelector("input").value)})))}async reposition(){Boolean(this.listboxContainerEl)&&(this.position=await h(this.inputEl,this.listboxContainerEl,{middleware:[l({crossAxis:-16,mainAxis:16})],placement:"bottom-start",strategy:"fixed"}))}async updateSuggestions(t){this.loading=!0,this.suggestions=[],this.suggestions=await this.generateSuggestions(t),this.loading=!1}handleInitialValue(){this.multiSelect&&!Array.isArray(this.value)&&(this.value=[]),!this.multiSelect&&Array.isArray(this.value)&&(this.value=void 0)}render(){const t=`${this.id}-suggestions`,i=this.clearable&&!this.multiSelect,a=this.multiSelect?this.value.map((t=>t.id)):Boolean(this.value)?[this.value.id]:[],o=this.multiSelect?void 0:this.value?.label||"",h=c("autocomplete",{"autocomplete--inactive":!this.active});return s(e,{key:"e523e43c9a3f188b280212d75eb7cda439efa16a"},s("div",{key:"bc223dea7f5ee6dcfcb7ff1fec7548f3e70ba02f",class:h,onKeyDown:this.onKeyDown},this.multiSelect&&Array.isArray(this.value)&&this.value.length>0&&s("div",{key:"3cf9889c1c2398778346eb598232095472ac03ce",class:"autocomplete__multi-select-tags"},s("swirl-stack",{key:"710997aa77b59d1d997de03b32a91e699a7403a4",orientation:"horizontal",spacing:"8",wrap:!0},this.value.map((t=>s("swirl-tag",{key:t.id,label:t.label,onRemove:()=>this.onRemoveValue(t.id),removable:!this.disabled}))))),s("swirl-text-input",{key:"67c627131a343cd5eab355baa0ce3d6113672a72",autoSelect:this.autoSelect,class:"autocomplete__input",clearable:i,clearButtonLabel:this.clearButtonLabel,disabled:this.disabled,disableDynamicWidth:!0,id:this.id,inline:this.inline,invalid:this.invalid,onInputFocus:this.onFocus,onKeyDown:this.onInputKeyDown,onValueChange:this.onChange,maxLength:this.maxLength,mode:this.mode,placeholder:this.placeholder,ref:t=>this.inputEl=t,required:this.required,spellCheck:this.spellCheck,swirlAriaAutocomplete:"list",swirlAriaControls:t,swirlAriaDescribedby:this.swirlAriaDescribedby,swirlAriaExpanded:String(this.active),swirlRole:"combobox",value:o}),s("div",{key:"1fa4b4c6e1c2116779b3e019f138ceae18143397",class:"autocomplete__listbox-container",onFocusout:this.onFocusOut,ref:t=>this.listboxContainerEl=t,style:{top:Boolean(this.position)?`${this.position?.y}px`:"",left:Boolean(this.position)?`${this.position?.x}px`:"",width:`${this.inputEl?.getBoundingClientRect().width+32}px`}},this.loading&&s("div",{key:"25bf6f40fc87b6273e8a627aab03c9de2d1a3130",class:"autocomplete__spinner"},s("swirl-spinner",{key:"e4e2d6ad0fca0adeea6770d339fcc310fd522083"})),this.suggestions.length>0&&s("swirl-option-list",{key:"7c155395c8eca3d516610ee58c76b4da3465c7a8",allowDeselect:!0===this.multiSelect,label:this.menuLabel,multiSelect:this.multiSelect,onValueChange:this.onSelect,optionListId:t,ref:t=>this.listboxEl=t,value:a},this.suggestions.map((t=>s("swirl-option-list-item",{selected:Array.isArray(this.value)?this.value.some((i=>i.id===t.id)):this.value?.id===t.id,key:t.id,disabled:t.disabled,label:t.label,value:t.id})))))))}get el(){return a(this)}static get watchers(){return{multiSelect:["watchMultiSelect"]}}};n.style=".sc-swirl-autocomplete-h{display:block}.sc-swirl-autocomplete-h *.sc-swirl-autocomplete{box-sizing:border-box}.autocomplete--inactive.sc-swirl-autocomplete .autocomplete__listbox-container.sc-swirl-autocomplete{display:none}.autocomplete__listbox-container.sc-swirl-autocomplete{position:fixed;z-index:var(--s-z-40);overflow-x:hidden;overflow-y:auto;max-height:18rem;padding-top:var(--s-space-8);padding-bottom:var(--s-space-8);border-radius:var(--s-border-radius-sm);background-color:var(--s-surface-overlay-default);animation:autocomplete-enter 0.1s;box-shadow:var(--s-shadow-level-1)}.autocomplete__listbox-container.sc-swirl-autocomplete:empty{display:none}.autocomplete__spinner.sc-swirl-autocomplete{display:flex;padding:var(--s-space-16);justify-content:center;align-items:center}.autocomplete__multi-select-tags.sc-swirl-autocomplete{margin-top:var(--swirl-autocomplete-tags-margin-top);margin-bottom:var(--s-space-4)}@keyframes autocomplete-enter{from{opacity:0}to{opacity:1}}";export{n as swirl_autocomplete}
|