@esri/calcite-components 6.0.0-next.57 → 6.0.0-next.58
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/THIRD-PARTY-NOTICES.md +25 -25
- package/dist/cdn/{UAWAKMEG.js → 262BHZPX.js} +1 -1
- package/dist/cdn/{QRXSGVJ3.js → 2KSSNEHL.js} +1 -1
- package/dist/cdn/{JXXBBIQE.js → 2UH3OMBW.js} +1 -1
- package/dist/cdn/{6OFRJTUT.js → 2UQKII64.js} +1 -1
- package/dist/cdn/{H5EGUTQH.js → 2URIWMCR.js} +1 -1
- package/dist/cdn/{Y53EJPH7.js → 2YQPHIXA.js} +1 -1
- package/dist/cdn/{GVFKJAQB.js → 3G2SC2S3.js} +1 -1
- package/dist/cdn/{S4JGRGUG.js → 3KA5AK3Z.js} +1 -1
- package/dist/cdn/{AWZZDDF5.js → 4HAMZSNT.js} +1 -1
- package/dist/cdn/{2P4DFN2O.js → 4JHTF5DV.js} +1 -1
- package/dist/cdn/{255DGVF3.js → 4YPHFKUF.js} +1 -1
- package/dist/cdn/{NADBQLBM.js → 5EPJVJRZ.js} +1 -1
- package/dist/cdn/5KIYA3IZ.js +2 -0
- package/dist/cdn/{QUYQCGNL.js → 64ZLUEWK.js} +1 -1
- package/dist/cdn/{DCJVJGUW.js → 67TTPSK7.js} +1 -1
- package/dist/cdn/{JV6ZOC4Q.js → 6JK57F7Z.js} +1 -1
- package/dist/cdn/{MFI6726F.js → 6LHB5RGN.js} +1 -1
- package/dist/cdn/6NFZFTHW.js +2 -0
- package/dist/cdn/{BH3JLG7G.js → 72LA67LQ.js} +1 -1
- package/dist/cdn/{TLB24UHT.js → 7FBHH5E4.js} +1 -1
- package/dist/cdn/{UPVI4NRM.js → 7N3CA5JL.js} +1 -1
- package/dist/cdn/{PAS5DKDX.js → 7VCCZFWX.js} +1 -1
- package/dist/cdn/{CPHTL2F6.js → A4EWYVRJ.js} +1 -1
- package/dist/cdn/{RJSOXSZD.js → A4YJHKLW.js} +1 -1
- package/dist/cdn/{I6RJ2VIN.js → A5UKONLR.js} +1 -1
- package/dist/cdn/{7CQ6OL7X.js → AA7MKCMW.js} +1 -1
- package/dist/cdn/{EFCPZGE6.js → ADXIUYJP.js} +1 -1
- package/dist/cdn/{6V6OLYYL.js → AIYI4KLT.js} +1 -1
- package/dist/cdn/{NFMCPHWW.js → AJX6FSDA.js} +1 -1
- package/dist/cdn/{YKUXYNDA.js → AP5EMLZT.js} +1 -1
- package/dist/cdn/{2PK5LMCW.js → APDB2R5F.js} +1 -1
- package/dist/cdn/{QT77Q2K3.js → B5O7D4DU.js} +1 -1
- package/dist/cdn/{XBAPCBIF.js → B6HBT6MV.js} +1 -1
- package/dist/cdn/{Q2Q2QGKM.js → BBG67UBB.js} +1 -1
- package/dist/cdn/{D4GBRS4G.js → BJT42FVC.js} +1 -1
- package/dist/cdn/{YH6Q5VY4.js → BQ7YJ3PF.js} +1 -1
- package/dist/cdn/{PFRK3XFW.js → BUWKJ72Y.js} +1 -1
- package/dist/cdn/{3723XZUX.js → BXX3MHWH.js} +1 -1
- package/dist/cdn/{Q4VFSQF5.js → CCLG3D7E.js} +1 -1
- package/dist/cdn/{VNYD2OUD.js → CPOKYX36.js} +1 -1
- package/dist/cdn/{6CWE6MNV.js → DIMR4ISD.js} +1 -1
- package/dist/cdn/{X2Z5LB3O.js → DM3R3RDU.js} +1 -1
- package/dist/cdn/{XGYS74KU.js → DO4KVY7Y.js} +1 -1
- package/dist/cdn/DQB3JHBX.js +2 -0
- package/dist/cdn/{MADPO7KC.js → DQHDLIOQ.js} +1 -1
- package/dist/cdn/{536UDPUJ.js → DWBAUY2O.js} +1 -1
- package/dist/cdn/{JNYTB4OF.js → E67S3W5F.js} +1 -1
- package/dist/cdn/E6AGZFV5.js +2 -0
- package/dist/cdn/{I4V7SKAA.js → EBOARSV6.js} +1 -1
- package/dist/cdn/{ODXUFMJH.js → EFV73TUW.js} +1 -1
- package/dist/cdn/{PDSLJRDS.js → EZFMLSIV.js} +1 -1
- package/dist/cdn/{47KWRQ4W.js → F2XZNM7I.js} +1 -1
- package/dist/cdn/{AK5R6KXR.js → F5KY6RC2.js} +1 -1
- package/dist/cdn/{CFPNPSEH.js → F5WL6J5S.js} +1 -1
- package/dist/cdn/{KP6ZOTOC.js → FNCNJH35.js} +1 -1
- package/dist/cdn/{WUOCYAV4.js → FNZXA44J.js} +1 -1
- package/dist/cdn/{IVIEPOEY.js → GBLGTHFD.js} +1 -1
- package/dist/cdn/{FT3LFO47.js → GI6KFZMW.js} +1 -1
- package/dist/cdn/{DIXFECD7.js → H6EOTDA3.js} +1 -1
- package/dist/cdn/{7URWMNOS.js → H7YF2IMU.js} +1 -1
- package/dist/cdn/{ACVA6KXM.js → HCBKDKAE.js} +1 -1
- package/dist/cdn/{DXHS5GYG.js → IE2QNZEU.js} +1 -1
- package/dist/cdn/{CNATAZKN.js → IIPTVCUW.js} +1 -1
- package/dist/cdn/{AKXSJUEZ.js → IVAVBCGO.js} +1 -1
- package/dist/cdn/{ECV3BCU2.js → JCGGZNRY.js} +1 -1
- package/dist/cdn/{RR5ATBN4.js → JGNRWRFC.js} +1 -1
- package/dist/cdn/{IFYYF2UJ.js → JLWOFZ3U.js} +1 -1
- package/dist/cdn/{JXYWBESB.js → JMK4MVYV.js} +1 -1
- package/dist/cdn/{SVIV7MP3.js → JTB7EZBF.js} +1 -1
- package/dist/cdn/{VUOWO7CG.js → K4U6BMUF.js} +1 -1
- package/dist/cdn/{XOAMM76F.js → KTDRSKJ6.js} +1 -1
- package/dist/cdn/{6ZUSE3GG.js → KW7LDRSU.js} +1 -1
- package/dist/cdn/{3F326EUW.js → LDRFCBQX.js} +1 -1
- package/dist/cdn/{JRFBOXZF.js → LFBR5CPK.js} +1 -1
- package/dist/cdn/LJMRBALT.js +2 -0
- package/dist/cdn/{53N3A2GQ.js → LKN4LUNT.js} +1 -1
- package/dist/cdn/{R4TNZDBK.js → LRZX3WFC.js} +1 -1
- package/dist/cdn/{LZEWTLMU.js → LX5MRNZ6.js} +1 -1
- package/dist/cdn/MC5XM5AE.js +2 -0
- package/dist/cdn/{XY7N5NOI.js → MHGHUSWD.js} +1 -1
- package/dist/cdn/{FNBZIEVI.js → MLSWUVXY.js} +1 -1
- package/dist/cdn/{EEOKRDQW.js → MPGHVV7O.js} +1 -1
- package/dist/cdn/{WYVF25H2.js → MVXVRV3L.js} +1 -1
- package/dist/cdn/{SS34LSD2.js → N3BEKA6Y.js} +1 -1
- package/dist/cdn/{U7YUFZ25.js → N7S7RVBB.js} +1 -1
- package/dist/cdn/{UDVQVBC6.js → N7WEIKWP.js} +1 -1
- package/dist/cdn/{427FF3YB.js → NQJXCAZC.js} +1 -1
- package/dist/cdn/{5ZE3EOFT.js → OQFWYTZR.js} +1 -1
- package/dist/cdn/{MK5VDQGI.js → ORZC3SG4.js} +1 -1
- package/dist/cdn/{IYAWTCCQ.js → P772V265.js} +1 -1
- package/dist/cdn/{CUXRRYYR.js → PKF4PCC3.js} +1 -1
- package/dist/cdn/{BGVOI22E.js → PRVIXJ7V.js} +1 -1
- package/dist/cdn/{EHA27KQT.js → Q7PRU56L.js} +1 -1
- package/dist/cdn/{T4E5UUS2.js → QDM2OPV6.js} +1 -1
- package/dist/cdn/{KOACFUL2.js → QPV4XZH2.js} +1 -1
- package/dist/cdn/{F4VQ6GFT.js → QW3GDUOM.js} +1 -1
- package/dist/cdn/{COJORJUY.js → QY2AFC2Q.js} +1 -1
- package/dist/cdn/{2C6O7GZD.js → R3JESRUS.js} +1 -1
- package/dist/cdn/{7I4J3QL3.js → R3OB5AED.js} +1 -1
- package/dist/cdn/{FZCH4GEB.js → ROAXTH4J.js} +1 -1
- package/dist/cdn/{DPAMT5RL.js → RQ6KOELW.js} +1 -1
- package/dist/cdn/{5F3N7QMR.js → RSNJIGRT.js} +1 -1
- package/dist/cdn/{WXN2SASK.js → RYDDFBP3.js} +1 -1
- package/dist/cdn/{RP3EAINH.js → SBQGT5X3.js} +1 -1
- package/dist/cdn/{ACOYPEYA.js → SGRUHNSM.js} +1 -1
- package/dist/cdn/{GVTCSUCB.js → SVWITGRF.js} +1 -1
- package/dist/cdn/{6YRETAZF.js → T2JUGBD5.js} +1 -1
- package/dist/cdn/T6MIIDHZ.js +2 -0
- package/dist/cdn/{UWHSTM2T.js → TG4HJT6M.js} +1 -1
- package/dist/cdn/{QGFOIT4W.js → TOFY2INI.js} +1 -1
- package/dist/cdn/{JBB74BJD.js → U7NXNZOA.js} +1 -1
- package/dist/cdn/{4PILPCKW.js → UHWJB7QE.js} +1 -1
- package/dist/cdn/{PWKBCDNZ.js → ULL6GPKV.js} +1 -1
- package/dist/cdn/{544WHEAC.js → UOYYONEV.js} +1 -1
- package/dist/cdn/{YI4EAC34.js → UQA4IJMM.js} +1 -1
- package/dist/cdn/{3K7RNV7S.js → VBKJL7VE.js} +1 -1
- package/dist/cdn/{Y6VF2ATT.js → VGDMUJGD.js} +1 -1
- package/dist/cdn/{NAGETJPT.js → VGI5FR3H.js} +1 -1
- package/dist/cdn/{AFAULQJZ.js → VTE67UUL.js} +1 -1
- package/dist/cdn/{SP5REG7X.js → VULUCOIA.js} +1 -1
- package/dist/cdn/{Z2UTWWWB.js → W27GBIB7.js} +1 -1
- package/dist/cdn/{6FRRQNIA.js → WDJZ44LL.js} +1 -1
- package/dist/cdn/{4TFX5NKO.js → WQK6BEDO.js} +1 -1
- package/dist/cdn/{HTGSUTHB.js → X5AAH2CE.js} +1 -1
- package/dist/cdn/{I5IUYLTE.js → XP5LP6D2.js} +1 -1
- package/dist/cdn/{YTK4BNMW.js → Y3B6YAGD.js} +1 -1
- package/dist/cdn/{3QXLTJ4A.js → Y3ZFMXH6.js} +1 -1
- package/dist/cdn/{JX5QRWOH.js → YE5HVMTC.js} +1 -1
- package/dist/cdn/{KMPESISY.js → YGWIVXHL.js} +1 -1
- package/dist/cdn/{JO6B72H7.js → YQPYWC2S.js} +1 -1
- package/dist/cdn/{BJ7WZK6B.js → YRBFOBYN.js} +1 -1
- package/dist/cdn/{JI3CVRLG.js → YRVGR3HM.js} +1 -1
- package/dist/cdn/{TYC5HTPV.js → YVEJTF76.js} +1 -1
- package/dist/cdn/Z6XAMJUJ.js +2 -0
- package/dist/cdn/{S75YSIFL.js → ZBVXUCQY.js} +1 -1
- package/dist/cdn/ZN5NDQPK.js +2 -0
- package/dist/cdn/{UDA2GABL.js → ZPQKTCJJ.js} +1 -1
- package/dist/cdn/{XQZORI5T.js → ZROAP4OW.js} +1 -1
- package/dist/cdn/{K3YWTTEY.js → ZV5ABNHG.js} +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-accordion-item/customElement.d.ts +3 -30
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item-group/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +3 -3
- package/dist/cdn/2S4LRLKY.js +0 -2
- package/dist/cdn/44XMAA3C.js +0 -2
- package/dist/cdn/C5E6QSIS.js +0 -2
- package/dist/cdn/DWPNKYZB.js +0 -2
- package/dist/cdn/MPKF6LGA.js +0 -2
- package/dist/cdn/MQTYR6LO.js +0 -2
- package/dist/cdn/ODQTJZLA.js +0 -2
- package/dist/cdn/U3YL3XUS.js +0 -2
- package/dist/cdn/XK4UDEEY.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as I}from"./BBZC3BBE.js";import{a as T}from"./CASNTUXN.js";import{b as w}from"./Q5V3JJ3K.js";import{c as D}from"./KITAKEBT.js";import{a as A,d as E}from"./4K4EWOB2.js";import{a as d,b as p,c as x,d as $}from"./7JCCKSQC.js";import{c as b}from"./N3SMZYHC.js";import"./TL56TNQ7.js";import{a as y}from"./BH3JLG7G.js";import"./VMHJHFFS.js";import"./JX5QRWOH.js";import"./IVIEPOEY.js";import{C as l}from"./W77STZAT.js";import{E as g,F as u,G as O,H as v,T as P,g as S,h,l as f,p as c}from"./EEOKRDQW.js";var L=S`:host([scale=s]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{font-size:var(--calcite-font-size-relative-lg);box-sizing:border-box;display:flex;flex-direction:column}::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);padding-block-end:var(--calcite-internal-action-menu-padding)}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);display:flex;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;max-block-size:45vh;gap:var(--calcite-internal-action-menu-gap);padding:var(--calcite-internal-action-menu-padding)}:host([hidden]){display:none}[hidden]{display:none}`,H=["ArrowUp","ArrowDown","End","Home"],_=["ArrowLeft","ArrowRight"],k=["ArrowUp","ArrowDown"],N=[..._,...k],R=["left","right","leading","trailing"],F=["top","bottom"],M=class extends O{constructor(){super(),this.guid=T(),this._actions=[],this.navigableActions=[],this.defaultSlotRef=g(),this.triggerSlotRef=g(),this.menuButtonClick=()=>{this.toggleOpen()},this.menuButtonId=p.button(this.guid),this.handleDocumentMouseDown=t=>{this.open&&!t.composedPath().includes(this.el)&&(this.focusMenuButtonOnClose=!1)},this.handleDocumentFocusIn=t=>{let e=t.composedPath();this.menuHasFocus=this.navigableActions.some(n=>e.includes(n))},this.menuButtonKeyDown=t=>{let{defaultPrevented:e,key:n}=t,{navigableActions:i}=this;if(e||!i.length||this.isValidKey(n,N)&&t.composedPath().some(r=>r instanceof Element&&D(r)))return;let o=this.placementOrientation,a=o==="horizontal"?_:o==="vertical"||!o?k:void 0;!a||!this.isValidKey(n,a)||(t.preventDefault(),this.toggleOpen(!0),this.activeMenuItemIndex=n==="ArrowDown"||n==="ArrowRight"?0:i.length-1,this.updateActions(i),this.setFocus())},this.menuKeyDown=t=>{let{key:e}=t,{navigableActions:n}=this;if(n.length){if(e==="Tab"){this.focusMenuButtonOnClose=!1,this.restoreMenuButtonTabIndexOnClose=!1,this.open=!1,this.menuButtonTabIndexFrame=requestAnimationFrame(()=>{this.menuButtonTabIndexFrame=void 0,this.open||this.restoreMenuButtonTabIndex(),this.restoreMenuButtonTabIndexOnClose=!0});return}if(e==="Escape"){this.focusMenuButtonOnClose=!0,this.restoreMenuButtonTabIndexOnClose=!0,this.toggleOpen(!1),t.preventDefault();return}this.handleActionNavigation(t,e,n)}},this.menuId=p.menu(this.guid),this._open=!1,this.updateAction=(t,e)=>{let{guid:n,activeMenuItemIndex:i,open:o}=this,a=p.action(n,e);t.tabIndex=o&&e===i?0:-1,t.aria={...t.aria,checked:void 0,label:t.label||t.text,role:"menuitem"},t.ariaChecked=null,t.id||(t.id=a)},this.focusSetter=y()(this).setFocus,this.focusMenuButtonOnClose=!0,this.menuHasFocus=!1,this.restoreMenuButtonTabIndexOnClose=!0,this.mouseDownHandler=t=>{t.composedPath().some(e=>e instanceof Element&&b(e))&&(this.focusMenuButtonOnClose=!1,this.activeMenuItemIndex=this.navigableActions.findIndex(e=>e===t.target))},this.handleActionFocus=t=>{let e=this.navigableActions.findIndex(n=>t.composedPath().includes(n));e!==-1&&(this.activeMenuItemIndex=e)},this.activeMenuItemIndex=-1,this.appearance="solid",this.expanded=!1,this.overlayPositioning="absolute",this.placement="auto",this.topLayerDisabled=!1,this.scale="m",this.calciteActionMenuCollapse=c({cancelable:!1}),this.calciteActionMenuExpand=c({cancelable:!1}),this.calciteActionMenuOpen=c({cancelable:!1}),this.calciteInternalActionMenuActionsChange=c({cancelable:!1}),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange)}static{this.properties={activeMenuItemIndex:[16,{},{state:!0}],menuButtonEl:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],label:1,open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],actions:[32,{},{attribute:!1,readOnly:!0}]}}static{this.styles=L}get placementOrientation(){let e=(this.flipPlacements?.length?this.flipPlacements:[this.placement]).find(n=>this.hasPlacementPrefix(n,R.concat(F)));if(e){if(this.hasPlacementPrefix(e,R))return"horizontal";if(this.hasPlacementPrefix(e,F))return"vertical"}}get open(){return this._open}set open(t){let e=this._open;t!==e&&(this._open=t,this.openHandler(t))}get actions(){return this._actions}async setFocus(t){return this.open?(await this.updateComplete,this.open?this.navigableActions[this.activeMenuItemIndex]?.setFocus({preventScroll:!0,...t}):void 0):this.focusSetter(()=>this.menuButtonEl||this.el,t)}connectedCallback(){super.connectedCallback(),this.connectMenuButtonEl(),this.listen("mousedown",this.mouseDownHandler),this.listenOn(document,"focusin",this.handleDocumentFocusIn),this.listenOn(document,"mousedown",this.handleDocumentMouseDown)}willUpdate(t){t.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&this.expandedHandler(),t.has("activeMenuItemIndex")&&(this.hasUpdated||this.activeMenuItemIndex!==-1)&&this.updateActions(this.navigableActions),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionMenuExpand.emit():this.calciteActionMenuCollapse.emit())}disconnectedCallback(){super.disconnectedCallback(),this.menuButtonTabIndexFrame!=null&&(cancelAnimationFrame(this.menuButtonTabIndexFrame),this.menuButtonTabIndexFrame=void 0),this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}focusMenuButton(t){return this.focusSetter(()=>this.menuButtonEl,t)}openHandler(t){this.menuButtonEl&&(this.menuButtonEl.active=t,this.syncMenuButtonAria()),this.popoverEl&&(this.popoverEl.open=t),this.activeMenuItemIndex=this.open?0:-1,this.updateActions(this.navigableActions),t?this.disableMenuButtonTabStop():this.restoreMenuButtonTabIndexOnClose&&this.restoreMenuButtonTabIndex(),this.calciteActionMenuOpen.emit(),this.setTooltipReferenceElement()}connectMenuButtonEl(){let{menuButtonId:t,open:e,label:n}=this,i=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==i&&(this.disconnectMenuButtonEl(),this.menuButtonEl=i,this.popoverEl&&i&&(this.popoverEl.referenceElement=i,this.popoverEl.referenceEl=i,this.open&&this.popoverEl.reposition(!0)),this.setTooltipReferenceElement(),i&&(i.active=e,this.syncMenuButtonAria(),e&&this.disableMenuButtonTabStop(),i.id||(i.id=t),i.label||(i.label=n),i.text||(i.text=n),i.addEventListener("click",this.menuButtonClick),i.addEventListener("keydown",this.menuButtonKeyDown)))}disconnectMenuButtonEl(){let{menuButtonEl:t}=this;t&&(this.restoreMenuButtonTabIndex(),t.removeEventListener("click",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown),this.menuButtonEl=void 0)}disableMenuButtonTabStop(){let{menuButtonEl:t}=this;t&&(this.menuButtonTabIndex===void 0&&(this.menuButtonTabIndex=t.getAttribute("tabindex")),t.tabIndex=-1)}restoreMenuButtonTabIndex(){let{menuButtonEl:t,menuButtonTabIndex:e}=this;!t||e===void 0||(e===null?t.removeAttribute("tabindex"):t.setAttribute("tabindex",e),this.menuButtonTabIndex=void 0)}syncActions(){let t=this.navigableActions[this.activeMenuItemIndex],e=this.activeMenuItemIndex,n=this.menuHasFocus,i=this.triggerSlotRef.value,o=i?l(i,"calcite-action").filter(s=>!s.classList.contains(d.defaultTrigger)):[],a=new Set(o),r=this.defaultSlotRef.value?l(this.defaultSlotRef.value).flatMap(s=>b(s)?s:s instanceof HTMLSlotElement?l(s,"calcite-action"):E(s)?s.actions:[]):[],m=[],B=new Set;[...o,...r].forEach(s=>{B.has(s)||(B.add(s),m.push(s))}),this._actions=m,this.navigableActions=m.filter(s=>!a.has(s)&&!s.disabled&&!s.hidden);let C=this.navigableActions.indexOf(t);!this.open||!this.navigableActions.length?this.activeMenuItemIndex=-1:C!==-1?this.activeMenuItemIndex=C:e<0?this.activeMenuItemIndex=0:this.activeMenuItemIndex=Math.min(e,this.navigableActions.length-1),this.updateActions(this.navigableActions),n&&(this.navigableActions.length?this.setFocus():(this.open=!1,this.focusMenuButton()))}setMenuButtonEl(){this.slottedMenuButtonEl=this.triggerSlotRef.value?l(this.triggerSlotRef.value,"calcite-action")[0]:void 0,this.connectMenuButtonEl()}syncMenuButtonAria(){let{menuButtonEl:t,open:e}=this;t&&(t.aria={...t.aria,expanded:e,hasPopup:"menu"})}syncActionsAndEmitChange(){this.syncActions(),this.calciteInternalActionMenuActionsChange.emit()}handleTriggerSlotChange(){this.setMenuButtonEl(),this.syncActionsAndEmitChange()}setDefaultMenuButtonEl(t){this.defaultMenuButtonEl=t,this.connectMenuButtonEl()}setPopoverEl(t){t&&(this.popoverEl=t,this.menuButtonEl&&(t.referenceElement=this.menuButtonEl,t.referenceEl=this.menuButtonEl),t.open=this.open)}handleCalciteActionClick(t){let e=this.navigableActions.find(a=>t.composedPath().includes(a));if(!e)return;this.activeMenuItemIndex=this.navigableActions.indexOf(e),this.focusMenuButtonOnClose=!1;let n=e.closest("calcite-action-group"),i=e.slot===A.menuActions&&n?.selectionMode==="none"&&!!n.closest("calcite-action-bar"),o=!!n&&n.selectionMode!=="none"&&n.actions.includes(e)&&e.slot!==A.menuActions;!i&&!o&&(e.active=!e.active),this.open=!1,this.menuHasFocus&&this.setFocus()}updateTooltip(t){let e=t.target.assignedElements({flatten:!0}).filter(w);this.tooltipEl=e[0],this.setTooltipReferenceElement()}setTooltipReferenceElement(){let{tooltipEl:t,expanded:e,menuButtonEl:n,open:i}=this;t&&(t.referenceElement=!e&&!i?n:void 0)}updateActions(t){t?.forEach(this.updateAction)}async handleDefaultSlotChange(){await this.componentOnReady(),this.syncActionsAndEmitChange()}handleActionGroupActionsChange(t){let e=t.target;(this.defaultSlotRef.value?l(this.defaultSlotRef.value).filter(i=>E(i)):[]).includes(e)&&this.syncActionsAndEmitChange()}isValidKey(t,e){return!!e.find(n=>n===t)}hasPlacementPrefix(t,e){return e.some(n=>t===n||t.startsWith(`${n}-`))}handleActionNavigation(t,e,n){if(!this.open||!this.isValidKey(e,H))return;t.preventDefault(),e==="Home"&&(this.activeMenuItemIndex=0),e==="End"&&(this.activeMenuItemIndex=n.length-1);let i=this.activeMenuItemIndex;e==="ArrowUp"&&(this.activeMenuItemIndex=I(Math.max(i-1,-1),n.length)),e==="ArrowDown"&&(this.activeMenuItemIndex=I(i+1,n.length)),this.updateActions(n),this.setFocus()}toggleOpen(t=!this.open){this.open=t}handlePopoverOpen(t){t.stopPropagation(),this.open=!0,this.setFocus()}handlePopoverClose(t){let{focusMenuButtonOnClose:e,menuHasFocus:n}=this;this.focusMenuButtonOnClose=!0,t.stopPropagation(),this.open=!1,e&&n&&this.focusMenuButton()}renderMenuButton(){let{appearance:t,label:e,scale:n,expanded:i,open:o}=this;return h`<slot name=${x.trigger} @slotchange=${this.handleTriggerSlotChange} ${u(this.triggerSlotRef)}><calcite-action .appearance=${t} .aria=${{expanded:o,hasPopup:"menu"}} class=${v(d.defaultTrigger)} .icon=${$.menu} .scale=${n} .text=${e} .textEnabled=${i} ${u(this.setDefaultMenuButtonEl)}></calcite-action></slot>`}renderMenuItems(){let{menuId:t,menuButtonEl:e,label:n,placement:i,overlayPositioning:o,flipPlacements:a}=this;return h`<calcite-popover auto-close .flipPlacements=${a} focus-trap-disabled .label=${n} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${o} .placement=${i} pointer-disabled .referenceElement=${e} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} trigger-disabled ${u(this.setPopoverEl)}><div aria-labelledby=${e?.id??f} .ariaOrientation=${this.placementOrientation==="vertical"?"vertical":void 0} class=${v(d.menu)} id=${t??f} @click=${this.handleCalciteActionClick} @focusin=${this.handleActionFocus} @keydown=${this.menuKeyDown} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange} ${u(this.defaultSlotRef)}></slot></div></calcite-popover>`}render(){return h`${this.renderMenuButton()}${this.renderMenuItems()}<slot name=${x.tooltip} @slotchange=${this.updateTooltip}></slot>`}};P("calcite-action-menu",M);export{M as ActionMenu};
|
|
2
|
+
import{a as I}from"./BBZC3BBE.js";import{a as T}from"./CASNTUXN.js";import{b as w}from"./Q5V3JJ3K.js";import{c as D}from"./KITAKEBT.js";import{a as A,d as E}from"./4K4EWOB2.js";import{a as d,b as p,c as x,d as $}from"./7JCCKSQC.js";import{c as b}from"./N3SMZYHC.js";import"./TL56TNQ7.js";import{a as y}from"./72LA67LQ.js";import"./VMHJHFFS.js";import"./YE5HVMTC.js";import"./GBLGTHFD.js";import{C as l}from"./W77STZAT.js";import{E as g,F as u,G as O,H as v,T as P,g as S,h,l as f,p as c}from"./MPGHVV7O.js";var L=S`:host([scale=s]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-menu-gap: var( --calcite-action-menu-items-space, var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus)) );--calcite-internal-action-menu-padding: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{font-size:var(--calcite-font-size-relative-lg);box-sizing:border-box;display:flex;flex-direction:column}::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);padding-block-end:var(--calcite-internal-action-menu-padding)}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);display:flex;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;max-block-size:45vh;gap:var(--calcite-internal-action-menu-gap);padding:var(--calcite-internal-action-menu-padding)}:host([hidden]){display:none}[hidden]{display:none}`,H=["ArrowUp","ArrowDown","End","Home"],_=["ArrowLeft","ArrowRight"],k=["ArrowUp","ArrowDown"],N=[..._,...k],R=["left","right","leading","trailing"],F=["top","bottom"],M=class extends O{constructor(){super(),this.guid=T(),this._actions=[],this.navigableActions=[],this.defaultSlotRef=g(),this.triggerSlotRef=g(),this.menuButtonClick=()=>{this.toggleOpen()},this.menuButtonId=p.button(this.guid),this.handleDocumentMouseDown=t=>{this.open&&!t.composedPath().includes(this.el)&&(this.focusMenuButtonOnClose=!1)},this.handleDocumentFocusIn=t=>{let e=t.composedPath();this.menuHasFocus=this.navigableActions.some(n=>e.includes(n))},this.menuButtonKeyDown=t=>{let{defaultPrevented:e,key:n}=t,{navigableActions:i}=this;if(e||!i.length||this.isValidKey(n,N)&&t.composedPath().some(r=>r instanceof Element&&D(r)))return;let o=this.placementOrientation,a=o==="horizontal"?_:o==="vertical"||!o?k:void 0;!a||!this.isValidKey(n,a)||(t.preventDefault(),this.toggleOpen(!0),this.activeMenuItemIndex=n==="ArrowDown"||n==="ArrowRight"?0:i.length-1,this.updateActions(i),this.setFocus())},this.menuKeyDown=t=>{let{key:e}=t,{navigableActions:n}=this;if(n.length){if(e==="Tab"){this.focusMenuButtonOnClose=!1,this.restoreMenuButtonTabIndexOnClose=!1,this.open=!1,this.menuButtonTabIndexFrame=requestAnimationFrame(()=>{this.menuButtonTabIndexFrame=void 0,this.open||this.restoreMenuButtonTabIndex(),this.restoreMenuButtonTabIndexOnClose=!0});return}if(e==="Escape"){this.focusMenuButtonOnClose=!0,this.restoreMenuButtonTabIndexOnClose=!0,this.toggleOpen(!1),t.preventDefault();return}this.handleActionNavigation(t,e,n)}},this.menuId=p.menu(this.guid),this._open=!1,this.updateAction=(t,e)=>{let{guid:n,activeMenuItemIndex:i,open:o}=this,a=p.action(n,e);t.tabIndex=o&&e===i?0:-1,t.aria={...t.aria,checked:void 0,label:t.label||t.text,role:"menuitem"},t.ariaChecked=null,t.id||(t.id=a)},this.focusSetter=y()(this).setFocus,this.focusMenuButtonOnClose=!0,this.menuHasFocus=!1,this.restoreMenuButtonTabIndexOnClose=!0,this.mouseDownHandler=t=>{t.composedPath().some(e=>e instanceof Element&&b(e))&&(this.focusMenuButtonOnClose=!1,this.activeMenuItemIndex=this.navigableActions.findIndex(e=>e===t.target))},this.handleActionFocus=t=>{let e=this.navigableActions.findIndex(n=>t.composedPath().includes(n));e!==-1&&(this.activeMenuItemIndex=e)},this.activeMenuItemIndex=-1,this.appearance="solid",this.expanded=!1,this.overlayPositioning="absolute",this.placement="auto",this.topLayerDisabled=!1,this.scale="m",this.calciteActionMenuCollapse=c({cancelable:!1}),this.calciteActionMenuExpand=c({cancelable:!1}),this.calciteActionMenuOpen=c({cancelable:!1}),this.calciteInternalActionMenuActionsChange=c({cancelable:!1}),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange)}static{this.properties={activeMenuItemIndex:[16,{},{state:!0}],menuButtonEl:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],label:1,open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],actions:[32,{},{attribute:!1,readOnly:!0}]}}static{this.styles=L}get placementOrientation(){let e=(this.flipPlacements?.length?this.flipPlacements:[this.placement]).find(n=>this.hasPlacementPrefix(n,R.concat(F)));if(e){if(this.hasPlacementPrefix(e,R))return"horizontal";if(this.hasPlacementPrefix(e,F))return"vertical"}}get open(){return this._open}set open(t){let e=this._open;t!==e&&(this._open=t,this.openHandler(t))}get actions(){return this._actions}async setFocus(t){return this.open?(await this.updateComplete,this.open?this.navigableActions[this.activeMenuItemIndex]?.setFocus({preventScroll:!0,...t}):void 0):this.focusSetter(()=>this.menuButtonEl||this.el,t)}connectedCallback(){super.connectedCallback(),this.connectMenuButtonEl(),this.listen("mousedown",this.mouseDownHandler),this.listenOn(document,"focusin",this.handleDocumentFocusIn),this.listenOn(document,"mousedown",this.handleDocumentMouseDown)}willUpdate(t){t.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&this.expandedHandler(),t.has("activeMenuItemIndex")&&(this.hasUpdated||this.activeMenuItemIndex!==-1)&&this.updateActions(this.navigableActions),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionMenuExpand.emit():this.calciteActionMenuCollapse.emit())}disconnectedCallback(){super.disconnectedCallback(),this.menuButtonTabIndexFrame!=null&&(cancelAnimationFrame(this.menuButtonTabIndexFrame),this.menuButtonTabIndexFrame=void 0),this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}focusMenuButton(t){return this.focusSetter(()=>this.menuButtonEl,t)}openHandler(t){this.menuButtonEl&&(this.menuButtonEl.active=t,this.syncMenuButtonAria()),this.popoverEl&&(this.popoverEl.open=t),this.activeMenuItemIndex=this.open?0:-1,this.updateActions(this.navigableActions),t?this.disableMenuButtonTabStop():this.restoreMenuButtonTabIndexOnClose&&this.restoreMenuButtonTabIndex(),this.calciteActionMenuOpen.emit(),this.setTooltipReferenceElement()}connectMenuButtonEl(){let{menuButtonId:t,open:e,label:n}=this,i=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==i&&(this.disconnectMenuButtonEl(),this.menuButtonEl=i,this.popoverEl&&i&&(this.popoverEl.referenceElement=i,this.popoverEl.referenceEl=i,this.open&&this.popoverEl.reposition(!0)),this.setTooltipReferenceElement(),i&&(i.active=e,this.syncMenuButtonAria(),e&&this.disableMenuButtonTabStop(),i.id||(i.id=t),i.label||(i.label=n),i.text||(i.text=n),i.addEventListener("click",this.menuButtonClick),i.addEventListener("keydown",this.menuButtonKeyDown)))}disconnectMenuButtonEl(){let{menuButtonEl:t}=this;t&&(this.restoreMenuButtonTabIndex(),t.removeEventListener("click",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown),this.menuButtonEl=void 0)}disableMenuButtonTabStop(){let{menuButtonEl:t}=this;t&&(this.menuButtonTabIndex===void 0&&(this.menuButtonTabIndex=t.getAttribute("tabindex")),t.tabIndex=-1)}restoreMenuButtonTabIndex(){let{menuButtonEl:t,menuButtonTabIndex:e}=this;!t||e===void 0||(e===null?t.removeAttribute("tabindex"):t.setAttribute("tabindex",e),this.menuButtonTabIndex=void 0)}syncActions(){let t=this.navigableActions[this.activeMenuItemIndex],e=this.activeMenuItemIndex,n=this.menuHasFocus,i=this.triggerSlotRef.value,o=i?l(i,"calcite-action").filter(s=>!s.classList.contains(d.defaultTrigger)):[],a=new Set(o),r=this.defaultSlotRef.value?l(this.defaultSlotRef.value).flatMap(s=>b(s)?s:s instanceof HTMLSlotElement?l(s,"calcite-action"):E(s)?s.actions:[]):[],m=[],B=new Set;[...o,...r].forEach(s=>{B.has(s)||(B.add(s),m.push(s))}),this._actions=m,this.navigableActions=m.filter(s=>!a.has(s)&&!s.disabled&&!s.hidden);let C=this.navigableActions.indexOf(t);!this.open||!this.navigableActions.length?this.activeMenuItemIndex=-1:C!==-1?this.activeMenuItemIndex=C:e<0?this.activeMenuItemIndex=0:this.activeMenuItemIndex=Math.min(e,this.navigableActions.length-1),this.updateActions(this.navigableActions),n&&(this.navigableActions.length?this.setFocus():(this.open=!1,this.focusMenuButton()))}setMenuButtonEl(){this.slottedMenuButtonEl=this.triggerSlotRef.value?l(this.triggerSlotRef.value,"calcite-action")[0]:void 0,this.connectMenuButtonEl()}syncMenuButtonAria(){let{menuButtonEl:t,open:e}=this;t&&(t.aria={...t.aria,expanded:e,hasPopup:"menu"})}syncActionsAndEmitChange(){this.syncActions(),this.calciteInternalActionMenuActionsChange.emit()}handleTriggerSlotChange(){this.setMenuButtonEl(),this.syncActionsAndEmitChange()}setDefaultMenuButtonEl(t){this.defaultMenuButtonEl=t,this.connectMenuButtonEl()}setPopoverEl(t){t&&(this.popoverEl=t,this.menuButtonEl&&(t.referenceElement=this.menuButtonEl,t.referenceEl=this.menuButtonEl),t.open=this.open)}handleCalciteActionClick(t){let e=this.navigableActions.find(a=>t.composedPath().includes(a));if(!e)return;this.activeMenuItemIndex=this.navigableActions.indexOf(e),this.focusMenuButtonOnClose=!1;let n=e.closest("calcite-action-group"),i=e.slot===A.menuActions&&n?.selectionMode==="none"&&!!n.closest("calcite-action-bar"),o=!!n&&n.selectionMode!=="none"&&n.actions.includes(e)&&e.slot!==A.menuActions;!i&&!o&&(e.active=!e.active),this.open=!1,this.menuHasFocus&&this.setFocus()}updateTooltip(t){let e=t.target.assignedElements({flatten:!0}).filter(w);this.tooltipEl=e[0],this.setTooltipReferenceElement()}setTooltipReferenceElement(){let{tooltipEl:t,expanded:e,menuButtonEl:n,open:i}=this;t&&(t.referenceElement=!e&&!i?n:void 0)}updateActions(t){t?.forEach(this.updateAction)}async handleDefaultSlotChange(){await this.componentOnReady(),this.syncActionsAndEmitChange()}handleActionGroupActionsChange(t){let e=t.target;(this.defaultSlotRef.value?l(this.defaultSlotRef.value).filter(i=>E(i)):[]).includes(e)&&this.syncActionsAndEmitChange()}isValidKey(t,e){return!!e.find(n=>n===t)}hasPlacementPrefix(t,e){return e.some(n=>t===n||t.startsWith(`${n}-`))}handleActionNavigation(t,e,n){if(!this.open||!this.isValidKey(e,H))return;t.preventDefault(),e==="Home"&&(this.activeMenuItemIndex=0),e==="End"&&(this.activeMenuItemIndex=n.length-1);let i=this.activeMenuItemIndex;e==="ArrowUp"&&(this.activeMenuItemIndex=I(Math.max(i-1,-1),n.length)),e==="ArrowDown"&&(this.activeMenuItemIndex=I(i+1,n.length)),this.updateActions(n),this.setFocus()}toggleOpen(t=!this.open){this.open=t}handlePopoverOpen(t){t.stopPropagation(),this.open=!0,this.setFocus()}handlePopoverClose(t){let{focusMenuButtonOnClose:e,menuHasFocus:n}=this;this.focusMenuButtonOnClose=!0,t.stopPropagation(),this.open=!1,e&&n&&this.focusMenuButton()}renderMenuButton(){let{appearance:t,label:e,scale:n,expanded:i,open:o}=this;return h`<slot name=${x.trigger} @slotchange=${this.handleTriggerSlotChange} ${u(this.triggerSlotRef)}><calcite-action .appearance=${t} .aria=${{expanded:o,hasPopup:"menu"}} class=${v(d.defaultTrigger)} .icon=${$.menu} .scale=${n} .text=${e} .textEnabled=${i} ${u(this.setDefaultMenuButtonEl)}></calcite-action></slot>`}renderMenuItems(){let{menuId:t,menuButtonEl:e,label:n,placement:i,overlayPositioning:o,flipPlacements:a}=this;return h`<calcite-popover auto-close .flipPlacements=${a} focus-trap-disabled .label=${n} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${o} .placement=${i} pointer-disabled .referenceElement=${e} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} trigger-disabled ${u(this.setPopoverEl)}><div aria-labelledby=${e?.id??f} .ariaOrientation=${this.placementOrientation==="vertical"?"vertical":void 0} class=${v(d.menu)} id=${t??f} @click=${this.handleCalciteActionClick} @focusin=${this.handleActionFocus} @keydown=${this.menuKeyDown} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange} ${u(this.defaultSlotRef)}></slot></div></calcite-popover>`}render(){return h`${this.renderMenuButton()}${this.renderMenuItems()}<slot name=${x.tooltip} @slotchange=${this.updateTooltip}></slot>`}};P("calcite-action-menu",M);export{M as ActionMenu};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as F}from"./RP3EAINH.js";import{a as T}from"./3723XZUX.js";import{b as y}from"./WTNYMVTD.js";import{a as L}from"./GVTCSUCB.js";import{a as E}from"./FDHY2TZA.js";import{a as I}from"./CASNTUXN.js";import{a as i,b as S}from"./N3SMZYHC.js";import{a as m}from"./53N3A2GQ.js";import{a as R}from"./MFI6726F.js";import"./TL56TNQ7.js";import{a as B}from"./BH3JLG7G.js";import{a as C}from"./VMHJHFFS.js";import"./JX5QRWOH.js";import"./IVIEPOEY.js";import"./W77STZAT.js";import{E as p,F as l,G as z,H as a,J as r,M as x,T as w,g as k,h as t}from"./EEOKRDQW.js";var O=k`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-relative-base)}:host *{box-sizing:border-box}:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-action-min-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size-relative-base);--calcite-internal-action-min-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-relative-md);--calcite-internal-action-min-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{display:flex;background-color:var(--calcite-color-transparent);cursor:pointer;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-corner-radius-xs))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}.button{outline-color:var(--calcite-color-transparent);position:relative;margin:var(--calcite-space-none);display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;box-sizing:border-box;background-color:var(--calcite-action-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height, var(--calcite-internal-action-min-height));max-block-size:var(--calcite-internal-action-height, none);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-action-text-color-press, var(--calcite-color-text-1))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:var(--calcite-space-none);display:flex;align-items:center;justify-content:center}.text-container{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition-property:inline-size;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;margin:var(--calcite-space-none);inline-size:var(--calcite-space-none);opacity:0;transition-timing-function:var(--calcite-animation-easing-function)}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:var(--calcite-opacity-full)}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)));color:var(--calcite-action-text-color-press, var(--calcite-color-text-1))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}:host([loading]) calcite-loader[inline]{margin-inline-end:var(--calcite-space-none);--calcite-loader-progress-color-inline: var(--calcite-action-loader-color)}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-color-transparent-press))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;transition-timing-function:var(--calcite-animation-easing-function);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-color-transparent-press))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:var(--calcite-space-sm);inline-size:var(--calcite-space-sm);border-radius:var(--calcite-corner-radius-pill);inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{inline-size:var(--calcite-space-lg);margin-inline:var(--calcite-space-2xs);position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:var(--calcite-space-sm);inline-size:var(--calcite-space-sm);border-radius:var(--calcite-corner-radius-pill);inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:var(--calcite-space-sm);inline-size:var(--calcite-space-sm);border-radius:var(--calcite-corner-radius-pill);inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon:after{block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:var(--calcite-space-sm);inline-size:var(--calcite-space-sm);border-radius:var(--calcite-corner-radius-pill);inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-without-icon:after{block-size:.375rem;inline-size:.375rem}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}`,$=class extends z{constructor(){super(),this.guid=I(),this.buttonRef=p(),this.buttonId=S.button(this.guid),this.mutationObserver=E("mutation",()=>this.requestUpdate()),this.messages=R({blocking:!0}),this.focusSetter=B()(this).setFocus,this.indicatorRef=p(),this.interactiveContainer=L(this),this.labelElRef=p(),this.active=!1,this.appearance="transparent",this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.overflowDisabled=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button",T()(this)}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overflowDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=[O,F]}async setFocus(e){return this.focusSetter(()=>this.buttonRef.value,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getAccessibleLabel(){let e=this.label||this.text||"";return this.indicator?this.messages.indicatorLabel.replace("{label}",e):e}getLabelledByElements(){let e=[...this.labelElRef.value?[this.labelElRef.value]:[],...this.aria?.labelledByElements??[]];return e.length?e:void 0}renderTextContainer(){let{text:e,textEnabled:c}=this,o={[i.textContainer]:!0,[i.textContainerVisible]:c};return e?m("text-container",t`<div aria-hidden=true class=${a(o)}>${e}</div>`):null}renderIndicatorText(){let{indicator:e,messages:c,buttonId:o}=this;return t`<div aria-labelledby=${o??r} aria-live=polite class=${a(x.screenReaderText)} role=region ${l(this.indicatorRef)}>${e?c.indicator:null}</div>`}renderIconContainer(){let{loading:e,icon:c,scale:o,el:f,iconFlipRtl:s,indicator:d}=this,u=o==="l"?"l":"m",h=e?t`<calcite-loader inline .label=${this.messages.loading} .scale=${u}></calcite-loader>`:null,b=c?t`<calcite-icon class=${a({[i.indicatorWithIcon]:d})} .flipRtl=${s} .icon=${c} .scale=${C(this.scale)}></calcite-icon>`:null,n=h||b,g=n||f.children?.length,v=t`<div class=${a({[i.slotContainer]:!0,[i.slotContainerHidden]:e})}><slot></slot></div>`;return g?m("icon-container",t`<div aria-hidden=true class=${a(i.iconContainer)}>${n}${v}</div>`):null}renderLabel(){let e=this.getAccessibleLabel();return e?t`<span class=${a(x.screenReaderText)} ${l(this.labelElRef)}>${e}</span>`:null}renderButton(){let{disabled:e,icon:c,loading:o,textEnabled:f,indicator:s,indicatorRef:d,buttonId:u}=this,h=this.getLabelledByElements(),b={[i.button]:!0,[i.buttonTextVisible]:f},n=t`${this.renderIconContainer()}${this.renderTextContainer()}${!c&&s&&m("indicator-no-icon",t`<div class=${a(i.indicatorWithoutIcon)}></div>`)||""}${this.renderLabel()}`,g=s&&d.value?[d.value]:[],v=[...this.aria?.controlsElements??[],...g];return this.dragHandle?t`<span .ariaBusy=${y(o,void 0)} .ariaControlsElements=${v} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${this.aria?.label} .ariaLabelledByElements=${h} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(b)} id=${u??r} role=button tabindex=${(e?void 0:0)??r} ${l(this.buttonRef)}>${n}</span>`:t`<button .ariaBusy=${y(o,void 0)} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${v} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${this.aria?.label} .ariaLabelledByElements=${h} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(b)} .disabled=${e} id=${u??r} .role=${this.aria?.role} type=${this.type??r} ${l(this.buttonRef)}>${n}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:t`${this.renderButton()}${this.renderIndicatorText()}`})}};w("calcite-action",$);export{$ as Action};
|
|
2
|
+
import{a as F}from"./SBQGT5X3.js";import{a as T}from"./BXX3MHWH.js";import{b as y}from"./WTNYMVTD.js";import{a as L}from"./SVWITGRF.js";import{a as E}from"./FDHY2TZA.js";import{a as I}from"./CASNTUXN.js";import{a as i,b as S}from"./N3SMZYHC.js";import{a as m}from"./LKN4LUNT.js";import{a as R}from"./6LHB5RGN.js";import"./TL56TNQ7.js";import{a as B}from"./72LA67LQ.js";import{a as C}from"./VMHJHFFS.js";import"./YE5HVMTC.js";import"./GBLGTHFD.js";import"./W77STZAT.js";import{E as p,F as l,G as z,H as a,J as r,M as x,T as w,g as k,h as t}from"./MPGHVV7O.js";var O=k`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-relative-base)}:host *{box-sizing:border-box}:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-action-min-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size-relative-base);--calcite-internal-action-min-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-relative-md);--calcite-internal-action-min-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{display:flex;background-color:var(--calcite-color-transparent);cursor:pointer;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-corner-radius-xs))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}.button{outline-color:var(--calcite-color-transparent);position:relative;margin:var(--calcite-space-none);display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;box-sizing:border-box;background-color:var(--calcite-action-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height, var(--calcite-internal-action-min-height));max-block-size:var(--calcite-internal-action-height, none);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-action-text-color-press, var(--calcite-color-text-1))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:var(--calcite-space-none);display:flex;align-items:center;justify-content:center}.text-container{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition-property:inline-size;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;margin:var(--calcite-space-none);inline-size:var(--calcite-space-none);opacity:0;transition-timing-function:var(--calcite-animation-easing-function)}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:var(--calcite-opacity-full)}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)));color:var(--calcite-action-text-color-press, var(--calcite-color-text-1))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}:host([loading]) calcite-loader[inline]{margin-inline-end:var(--calcite-space-none);--calcite-loader-progress-color-inline: var(--calcite-action-loader-color)}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-color-transparent-press))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;transition-timing-function:var(--calcite-animation-easing-function);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-color-transparent-press))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:var(--calcite-space-sm);inline-size:var(--calcite-space-sm);border-radius:var(--calcite-corner-radius-pill);inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{inline-size:var(--calcite-space-lg);margin-inline:var(--calcite-space-2xs);position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:var(--calcite-space-sm);inline-size:var(--calcite-space-sm);border-radius:var(--calcite-corner-radius-pill);inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:var(--calcite-space-sm);inline-size:var(--calcite-space-sm);border-radius:var(--calcite-corner-radius-pill);inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon:after{block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:var(--calcite-space-sm);inline-size:var(--calcite-space-sm);border-radius:var(--calcite-corner-radius-pill);inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-without-icon:after{block-size:.375rem;inline-size:.375rem}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}`,$=class extends z{constructor(){super(),this.guid=I(),this.buttonRef=p(),this.buttonId=S.button(this.guid),this.mutationObserver=E("mutation",()=>this.requestUpdate()),this.messages=R({blocking:!0}),this.focusSetter=B()(this).setFocus,this.indicatorRef=p(),this.interactiveContainer=L(this),this.labelElRef=p(),this.active=!1,this.appearance="transparent",this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.overflowDisabled=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button",T()(this)}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overflowDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=[O,F]}async setFocus(e){return this.focusSetter(()=>this.buttonRef.value,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getAccessibleLabel(){let e=this.label||this.text||"";return this.indicator?this.messages.indicatorLabel.replace("{label}",e):e}getLabelledByElements(){let e=[...this.labelElRef.value?[this.labelElRef.value]:[],...this.aria?.labelledByElements??[]];return e.length?e:void 0}renderTextContainer(){let{text:e,textEnabled:c}=this,o={[i.textContainer]:!0,[i.textContainerVisible]:c};return e?m("text-container",t`<div aria-hidden=true class=${a(o)}>${e}</div>`):null}renderIndicatorText(){let{indicator:e,messages:c,buttonId:o}=this;return t`<div aria-labelledby=${o??r} aria-live=polite class=${a(x.screenReaderText)} role=region ${l(this.indicatorRef)}>${e?c.indicator:null}</div>`}renderIconContainer(){let{loading:e,icon:c,scale:o,el:f,iconFlipRtl:s,indicator:d}=this,u=o==="l"?"l":"m",h=e?t`<calcite-loader inline .label=${this.messages.loading} .scale=${u}></calcite-loader>`:null,b=c?t`<calcite-icon class=${a({[i.indicatorWithIcon]:d})} .flipRtl=${s} .icon=${c} .scale=${C(this.scale)}></calcite-icon>`:null,n=h||b,g=n||f.children?.length,v=t`<div class=${a({[i.slotContainer]:!0,[i.slotContainerHidden]:e})}><slot></slot></div>`;return g?m("icon-container",t`<div aria-hidden=true class=${a(i.iconContainer)}>${n}${v}</div>`):null}renderLabel(){let e=this.getAccessibleLabel();return e?t`<span class=${a(x.screenReaderText)} ${l(this.labelElRef)}>${e}</span>`:null}renderButton(){let{disabled:e,icon:c,loading:o,textEnabled:f,indicator:s,indicatorRef:d,buttonId:u}=this,h=this.getLabelledByElements(),b={[i.button]:!0,[i.buttonTextVisible]:f},n=t`${this.renderIconContainer()}${this.renderTextContainer()}${!c&&s&&m("indicator-no-icon",t`<div class=${a(i.indicatorWithoutIcon)}></div>`)||""}${this.renderLabel()}`,g=s&&d.value?[d.value]:[],v=[...this.aria?.controlsElements??[],...g];return this.dragHandle?t`<span .ariaBusy=${y(o,void 0)} .ariaControlsElements=${v} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${this.aria?.label} .ariaLabelledByElements=${h} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(b)} id=${u??r} role=button tabindex=${(e?void 0:0)??r} ${l(this.buttonRef)}>${n}</span>`:t`<button .ariaBusy=${y(o,void 0)} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${v} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${this.aria?.label} .ariaLabelledByElements=${h} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(b)} .disabled=${e} id=${u??r} .role=${this.aria?.role} type=${this.type??r} ${l(this.buttonRef)}>${n}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:t`${this.renderButton()}${this.renderIndicatorText()}`})}};w("calcite-action",$);export{$ as Action};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{g as e}from"./
|
|
2
|
+
import{g as e}from"./MPGHVV7O.js";var i=e`.screen-reader-text{position:absolute;inline-size:var(--calcite-border-width-sm);block-size:var(--calcite-border-width-sm);padding:0;margin:calc(-1 * var(--calcite-border-width-sm));overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}`;export{i as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{g as e}from"./
|
|
2
|
+
import{g as e}from"./MPGHVV7O.js";var c=e`.header{color:var(--calcite-color-text-2);fill:var(--calcite-color-text-2);margin:var(--calcite-space-none);display:flex;align-content:space-between;align-items:center}.heading{margin:var(--calcite-space-none);padding:var(--calcite-space-none);font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:var(--calcite-space-sm)}`;export{c as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as o}from"./
|
|
2
|
+
import{b as o}from"./YE5HVMTC.js";import{H as r,h as i}from"./MPGHVV7O.js";var l={container:"interaction-container"},d=({children:e,disabled:t})=>i`<div class=${r(l.container)} .inert=${t}>${e}</div>`,k=o((e,t)=>(t.onUpdated(()=>f(e)),d));function u(){let{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function a(e){e.target.disabled&&e.preventDefault()}var c=["mousedown","mouseup","click"];function s(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}var n={capture:!0};function f(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),v(e);return}m(e),e.el.removeAttribute("aria-disabled")}function v(e){e.el.click=u,b(e.el)}function b(e){e.addEventListener("pointerdown",a,n),c.forEach(t=>e.addEventListener(t,s,n))}function m(e){delete e.el.click,E(e.el)}function E(e){e.removeEventListener("pointerdown",a,n),c.forEach(t=>e.removeEventListener(t,s,n))}export{k as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as Dt}from"./YYOLNZRT.js";import{N as Lt,Q as Tt}from"./EEOKRDQW.js";var yt=["top","right","bottom","left"],Ft=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t,e,n){return B(t,U(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function H(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function dt(t){return At(H(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=dt(t),s=ut(i),r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function $t(t){let e=it(t);return[ot(t),e,ot(e)]}function ot(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Mt=["left","right"],Nt=["right","left"],Re=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Mt:e?Mt:Nt;case"left":case"right":return e?Re:Pe;default:return[]}}function kt(t,e,n,o){let i=F(t),s=Ce(_(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ot)))),s}function it(t){let e=_(t);return Oe[e]+t.slice(e.length)}function Se(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Rt(t){return typeof t!="number"?Se(t):{top:t,right:t,bottom:t,left:t}}function q(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,s=H(e),r=dt(e),c=ut(r),a=_(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(a){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}let g=F(e);return g&&(f[r]+=m*(g==="end"?1:-1)*(n&&l?-1:1)),f}async function Ht(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),g=Rt(f),w=c[m?u==="floating"?"reference":"floating":u],h=q(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),x=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(y))&&await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1},O=q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:a}):x);return{top:(h.top-O.top+g.top)/b.y,bottom:(O.bottom-h.bottom+g.bottom)/b.y,left:(h.left-O.left+g.left)/b.x,right:(O.right-h.right+g.right)/b.x}}var Ee=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Ht},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(l,o,a),m=o,f=0,g={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:b,data:O,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:l,platform:c,elements:{reference:t,floating:e}});d=y??d,u=b??u,g[h]={...g[h],...O},A&&f<Ee&&(f++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},zt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:a}=e,{element:l,padding:d=0}=I(t,e)||{};if(l==null)return{};let u=Rt(d),m={x:n,y:o},f=dt(i),g=ut(f),p=await r.getDimensions(l),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[f]-m[f]-s.floating[g],O=m[f]-s.reference[f],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l)),R=A?A[y]:0;(!R||!await(r.isElement==null?void 0:r.isElement(A)))&&(R=c.floating[y]||s.floating[g]);let S=b/2-O/2,P=R/2-p[g]/2-1,v=U(u[h],P),L=U(u[x],P),X=R-p[g]-L,E=R/2-p[g]/2+S,T=bt(v,E,X),Y=!a.arrow&&F(i)!=null&&E!==T&&s.reference[g]/2-(E<v?v:L)-p[g]/2<0,W=Y?E<v?E-v:E-X:0;return{[f]:m[f]+W,data:{[f]:T,centerOffset:E-T-W,...Y&&{alignmentOffset:W}},reset:Y}}});function Le(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?F(i)===t||(e?ot(i)!==i:!1):!0)}var Ut=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:s,middlewareData:r,placement:c,platform:a,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=vt,autoAlignment:f=!0,...g}=I(t,e),p=u!==void 0||m===vt?Le(u||null,f,m):m,w=((n=r.autoPlacement)==null?void 0:n.index)||0,h=p[w];if(h==null)return{};if(c!==h)return{reset:{placement:p[0]}};let x=await a.detectOverflow(e,g),y=Ot(h,s,await(a.isRTL==null?void 0:a.isRTL(l.floating))),b=[x[_(h)],x[y[0]],x[y[1]]],O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:h,overflows:b}],A=p[w+1];if(A)return{data:{index:w+1,overflows:O},reset:{placement:A}};let R=O.map(v=>{let L=F(v.placement);return[v.placement,L&&d?v.overflows.slice(0,2).reduce((X,E)=>X+E,0):v.overflows[0],v.overflows]}).sort((v,L)=>v[1]-L[1]),P=((i=R.filter(v=>v[2].slice(0,F(v[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return P!==c?{data:{index:w+1,overflows:O},reset:{placement:P}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let h=_(i),x=H(c),y=_(c)===c,b=await(a.isRTL==null?void 0:a.isRTL(l.floating)),O=m||(y||!p?[it(c)]:$t(c)),A=g!=="none";!m&&A&&O.push(...kt(c,p,g,b));let R=[c,...O],S=await a.detectOverflow(e,w),P=[],v=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&P.push(S[h]),u){let T=Ot(i,r,b);P.push(S[T[0]],S[T[1]])}if(v=[...v,{placement:i,overflows:P}],!P.every(T=>T<=0)){var L,X;let T=(((L=s.flip)==null?void 0:L.index)||0)+1,Y=R[T];if(Y&&(!(u==="alignment"?x!==H(Y):!1)||v.every(D=>H(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:T,overflows:v},reset:{placement:Y}};let W=(X=v.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:X.placement;if(!W)switch(f){case"bestFit":{var E;let K=(E=v.filter(D=>{if(A){let z=H(D.placement);return z===x||z==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(z=>z>0).reduce((z,Ae)=>z+Ae,0)]).sort((D,z)=>D[1]-z[1])[0])==null?void 0:E[0];K&&(W=K);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function _t(t){return yt.some(e=>t[e]>=0)}var jt=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:o}=e,{strategy:i="referenceHidden",...s}=I(t,e);switch(i){case"referenceHidden":{let r=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Bt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_t(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Bt(r,n.floating);return{data:{escapedOffsets:c,escaped:_t(c)}}}default:return{}}}}};var Te=new Set(["left","top"]);async function De(t,e){let{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=_(n),c=F(n),a=H(n)==="y",l=Te.has(r)?-1:1,d=s&&a?-1:1,u=I(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),a?{x:f*d,y:m*l}:{x:m*l,y:f*d}}var Xt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:s,placement:r,middlewareData:c}=e,a=await De(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,l),m=H(i),f=At(m),g=d[f],p=d[m],w=(x,y)=>bt(y+u[x==="y"?"top":"left"],y,y-u[x==="y"?"bottom":"right"]);r&&(g=w(f,g)),c&&(p=w(m,p));let h=a.fn({...e,[f]:g,[m]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[f]:r,[m]:c}}}}}};function mt(){return typeof window<"u"}function J(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof C(t).Node:!1}function M(t){return mt()?t instanceof Element||t instanceof C(t).Element:!1}function V(t){return mt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function Kt(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=N(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Gt(t){return/^(table|td|th)$/.test(J(t))}function lt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Fe=/transform|translate|scale|rotate|perspective|filter/,Me=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",Pt;function tt(t){let e=M(t)?N(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!gt()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Me.test(e.contain||"")}function Jt(t){let e=j(t);for(;V(e)&&!et(e);){if(tt(e))return e;if(lt(e))return null;e=j(e)}return null}function gt(){return Pt==null&&(Pt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pt}function et(t){return/^(html|body|#document)$/.test(J(t))}function N(t){return C(t).getComputedStyle(t)}function at(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function j(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||k(t);return Kt(e)?e.host:e}function Qt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Qt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=C(i);if(s){let c=ht(r);return e.concat(r,r.visualViewport||[],ct(i)?i:[],c&&n?Z(c):[])}else return e.concat(i,Z(i,[],n))}function ht(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=N(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=V(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=st(n)!==s||st(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function St(t){return M(t)?t:t.contextElement}function nt(t){let e=St(t);if(!V(e))return $(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ee(e),r=(s?st(n.width):n.width)/o,c=(s?st(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ne=$(0);function ne(t){let e=C(t);return!gt()||!e.visualViewport?Ne:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $e(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===C(t)}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),s=St(t),r=$(1);e&&(o?M(o)&&(r=nt(o)):r=nt(t));let c=$e(s,n,o)?ne(s):$(0),a=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s&&o){let m=C(s),f=M(o)?C(o):o,g=m,p=ht(g);for(;p&&f!==g;){let w=nt(p),h=p.getBoundingClientRect(),x=N(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,b=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,d*=w.x,u*=w.y,a+=y,l+=b,g=C(p),p=ht(g)}}return q({width:d,height:u,x:a,y:l})}function pt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(k(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-pt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,s=i==="fixed",r=k(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=$(1),d=$(0),u=V(o);if((u||!s)&&((J(o)!=="body"||ct(r))&&(a=at(o)),u)){let f=Q(o);l=nt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=r&&!u&&!s?oe(r,a):$(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-a.scrollTop*l.y+d.y+m.y}}function We(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Be(t){let e=at(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-e.scrollLeft+pt(t),r=-e.scrollTop;return N(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}var _e=25;function He(t,e,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",i=C(t),s=k(t),r=i.visualViewport,c=s.clientWidth,a=s.clientHeight,l=0,d=0;if(r){let m=!gt()||e==="fixed";o?m||(l=-r.offsetLeft,d=-r.offsetTop):(c=r.width,a=r.height,m&&(l=r.offsetLeft,d=r.offsetTop))}if(pt(s)<=0){let m=s.ownerDocument,f=m.body,g=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-p),h=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;h<=_e&&(c-=h)}return{width:c,height:a,x:l,y:d}}function Ve(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=nt(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,l=o*s.y;return{width:r,height:c,x:a,y:l}}function Zt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=He(t,n,e);else if(e==="document")o=Be(k(t));else if(M(e))o=Ve(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ze(t,e){let n=e.get(t);if(n)return n;let o=Z(t,[],!1).filter(c=>M(c)&&J(c)!=="body"),i=null,s=N(t).position==="fixed",r=s?j(t):t;for(;M(r)&&!et(r);){let c=N(r),a=tt(r),l=i?i.position:s?"fixed":"";!a&&(l==="fixed"||l==="absolute"&&c.position==="static")?o=o.filter(u=>u!==r):i=c,r=j(r)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=Zt(e,r[0],i),a=c.top,l=c.right,d=c.bottom,u=c.left;for(let m=1;m<r.length;m++){let f=Zt(e,r[m],i);a=B(f.top,a),l=U(f.right,l),d=U(f.bottom,d),u=B(f.left,u)}return{width:l-u,height:d-a,x:u,y:a}}function Ie(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function je(t,e,n){let o=V(e),i=k(e),s=n==="fixed",r=Q(t,!0,s,e),c={scrollLeft:0,scrollTop:0},a=$(0);if((o||!s)&&((J(e)!=="body"||ct(i))&&(c=at(e)),o)){let m=Q(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}!o&&i&&(a.x=pt(i));let l=i&&!o&&!s?oe(i,c):$(0),d=r.left+c.scrollLeft-a.x-l.x,u=r.top+c.scrollTop-a.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function Ct(t){return N(t).position==="static"}function te(t,e){if(!V(t)||N(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=C(t);if(lt(t))return n;if(!V(t)){let i=j(t);for(;i&&!et(i);){if(M(i)&&!Ct(i))return i;i=j(i)}return n}let o=te(t,e);for(;o&&Gt(o)&&Ct(o);)o=te(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||ie,n=this.getDimensions,o=await n(t.floating);return{reference:je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ye(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:ie,getElementRects:Xe,getClientRects:We,getDimensions:Ie,getScale:nt,isElement:M,isRTL:Ye};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ke(t,e,n){let o=null,i,s=k(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let m=t.getBoundingClientRect(),{left:f,top:g,width:p,height:w}=m;if(d||e(),!p||!w)return;let h=rt(g),x=rt(s.clientWidth-(f+p)),y=rt(s.clientHeight-(g+w)),b=rt(f),A={rootMargin:-h+"px "+-x+"px "+-y+"px "+-b+"px",threshold:B(0,U(1,u))||1},R=!0;function S(P){let v=P[0].intersectionRatio;if(!se(m,t.getBoundingClientRect()))return c();if(v!==u){if(!R)return c();v?c(!1,v):i=setTimeout(()=>{c(!1,1e-7)},1e3)}R=!1}try{o=new IntersectionObserver(S,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,A)}o.observe(t)}let a=C(t),l=()=>c(n);return a.addEventListener("resize",l),c(!0),()=>{a.removeEventListener("resize",l),r()}}function re(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),d=i||s?[...l?Z(l):[],...e?Z(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n),s&&h.addEventListener("resize",n)});let u=l&&c?Ke(l,n,s):null,m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===l&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),l&&!a&&f.observe(l),e&&f.observe(e));let g,p=a?Q(t):null;a&&w();function w(){let h=Q(t);p&&!se(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,a&&cancelAnimationFrame(g)}}var ce=Xt,le=Ut,ae=Yt,fe=It;var ue=jt,de=zt;var me=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Vt(t,e,{...i,platform:s})};function ge(t){return qe(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function qe(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||tt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:s,offsetDistance:r,offsetSkidding:c,overlayPositioning:a="absolute",placement:l,referenceEl:d,type:u})=>{if(!d||!s)return;let m=n==="rtl",{x:f,y:g,placement:p,strategy:w,middlewareData:h}=await me(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:pe(l,m),middleware:Je({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>pe(O,m)),offsetDistance:r,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:O,y:A}=h.arrow,R=p.split("-")[0],S=O!=null?"left":"top",P=tn[R],v={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...v,[S]:`${S=="left"?O:A}px`,[R]:"100%",transform:P})}let y=h.hide?.referenceHidden?"hidden":null,b=y?"none":null;s.setAttribute(Ge,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${he(f)}px,${he(g)}px)`,visibility:y})}),Ge="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],On="bottom-start",Rn="bottom-end",Pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:s,type:r}){let c="layoutViewport",a=t==="auto"||t==="auto-start"||t==="auto-end",l=[ae({rootBoundary:c})];if(l.push(ce({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(le({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null,rootBoundary:c})),!e&&(!a||r==="menu")){let u=r==="menu"?n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]:n;l.push(fe(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(de({element:s})),l.push(ue({rootBoundary:c})),l}function Qe(t){return ve.includes(t)}function Cn(t,e){let n=t.filter(Qe);return n.length!==t.length&&Tt.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Sn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return be(t);await(n?Ze(t):ye)(t,e)}function Ze(t){let e=xt.get(t);return e||(e=Dt(ye,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=re;ft.set(t,{state:"pending"});let i,s=o(e,n,()=>{let r=t.reposition();i||(i=r)});return ft.set(t,{state:"active",cleanUp:s}),i}function en(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function En(t){let{floatingEl:e,referenceEl:n}=t;if(en(t),nn(t),!(!e||!n||!t.open))return be(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var we=4,Ln=Math.ceil(Math.hypot(we,we));export{On as a,Rn as b,Pn as c,Cn as d,Sn as e,en as f,En as g,nn as h,Ln as i};
|
|
2
|
+
import{a as Dt}from"./YYOLNZRT.js";import{N as Lt,Q as Tt}from"./MPGHVV7O.js";var yt=["top","right","bottom","left"],Ft=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t,e,n){return B(t,U(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function H(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function dt(t){return At(H(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=dt(t),s=ut(i),r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function $t(t){let e=it(t);return[ot(t),e,ot(e)]}function ot(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Mt=["left","right"],Nt=["right","left"],Re=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Mt:e?Mt:Nt;case"left":case"right":return e?Re:Pe;default:return[]}}function kt(t,e,n,o){let i=F(t),s=Ce(_(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ot)))),s}function it(t){let e=_(t);return Oe[e]+t.slice(e.length)}function Se(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Rt(t){return typeof t!="number"?Se(t):{top:t,right:t,bottom:t,left:t}}function q(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,s=H(e),r=dt(e),c=ut(r),a=_(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(a){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}let g=F(e);return g&&(f[r]+=m*(g==="end"?1:-1)*(n&&l?-1:1)),f}async function Ht(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),g=Rt(f),w=c[m?u==="floating"?"reference":"floating":u],h=q(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),x=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(y))&&await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1},O=q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:a}):x);return{top:(h.top-O.top+g.top)/b.y,bottom:(O.bottom-h.bottom+g.bottom)/b.y,left:(h.left-O.left+g.left)/b.x,right:(O.right-h.right+g.right)/b.x}}var Ee=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Ht},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(l,o,a),m=o,f=0,g={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:b,data:O,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:l,platform:c,elements:{reference:t,floating:e}});d=y??d,u=b??u,g[h]={...g[h],...O},A&&f<Ee&&(f++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},zt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:a}=e,{element:l,padding:d=0}=I(t,e)||{};if(l==null)return{};let u=Rt(d),m={x:n,y:o},f=dt(i),g=ut(f),p=await r.getDimensions(l),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[f]-m[f]-s.floating[g],O=m[f]-s.reference[f],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l)),R=A?A[y]:0;(!R||!await(r.isElement==null?void 0:r.isElement(A)))&&(R=c.floating[y]||s.floating[g]);let S=b/2-O/2,P=R/2-p[g]/2-1,v=U(u[h],P),L=U(u[x],P),X=R-p[g]-L,E=R/2-p[g]/2+S,T=bt(v,E,X),Y=!a.arrow&&F(i)!=null&&E!==T&&s.reference[g]/2-(E<v?v:L)-p[g]/2<0,W=Y?E<v?E-v:E-X:0;return{[f]:m[f]+W,data:{[f]:T,centerOffset:E-T-W,...Y&&{alignmentOffset:W}},reset:Y}}});function Le(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?F(i)===t||(e?ot(i)!==i:!1):!0)}var Ut=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:s,middlewareData:r,placement:c,platform:a,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=vt,autoAlignment:f=!0,...g}=I(t,e),p=u!==void 0||m===vt?Le(u||null,f,m):m,w=((n=r.autoPlacement)==null?void 0:n.index)||0,h=p[w];if(h==null)return{};if(c!==h)return{reset:{placement:p[0]}};let x=await a.detectOverflow(e,g),y=Ot(h,s,await(a.isRTL==null?void 0:a.isRTL(l.floating))),b=[x[_(h)],x[y[0]],x[y[1]]],O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:h,overflows:b}],A=p[w+1];if(A)return{data:{index:w+1,overflows:O},reset:{placement:A}};let R=O.map(v=>{let L=F(v.placement);return[v.placement,L&&d?v.overflows.slice(0,2).reduce((X,E)=>X+E,0):v.overflows[0],v.overflows]}).sort((v,L)=>v[1]-L[1]),P=((i=R.filter(v=>v[2].slice(0,F(v[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return P!==c?{data:{index:w+1,overflows:O},reset:{placement:P}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let h=_(i),x=H(c),y=_(c)===c,b=await(a.isRTL==null?void 0:a.isRTL(l.floating)),O=m||(y||!p?[it(c)]:$t(c)),A=g!=="none";!m&&A&&O.push(...kt(c,p,g,b));let R=[c,...O],S=await a.detectOverflow(e,w),P=[],v=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&P.push(S[h]),u){let T=Ot(i,r,b);P.push(S[T[0]],S[T[1]])}if(v=[...v,{placement:i,overflows:P}],!P.every(T=>T<=0)){var L,X;let T=(((L=s.flip)==null?void 0:L.index)||0)+1,Y=R[T];if(Y&&(!(u==="alignment"?x!==H(Y):!1)||v.every(D=>H(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:T,overflows:v},reset:{placement:Y}};let W=(X=v.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:X.placement;if(!W)switch(f){case"bestFit":{var E;let K=(E=v.filter(D=>{if(A){let z=H(D.placement);return z===x||z==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(z=>z>0).reduce((z,Ae)=>z+Ae,0)]).sort((D,z)=>D[1]-z[1])[0])==null?void 0:E[0];K&&(W=K);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function _t(t){return yt.some(e=>t[e]>=0)}var jt=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:o}=e,{strategy:i="referenceHidden",...s}=I(t,e);switch(i){case"referenceHidden":{let r=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Bt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_t(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Bt(r,n.floating);return{data:{escapedOffsets:c,escaped:_t(c)}}}default:return{}}}}};var Te=new Set(["left","top"]);async function De(t,e){let{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=_(n),c=F(n),a=H(n)==="y",l=Te.has(r)?-1:1,d=s&&a?-1:1,u=I(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),a?{x:f*d,y:m*l}:{x:m*l,y:f*d}}var Xt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:s,placement:r,middlewareData:c}=e,a=await De(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,l),m=H(i),f=At(m),g=d[f],p=d[m],w=(x,y)=>bt(y+u[x==="y"?"top":"left"],y,y-u[x==="y"?"bottom":"right"]);r&&(g=w(f,g)),c&&(p=w(m,p));let h=a.fn({...e,[f]:g,[m]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[f]:r,[m]:c}}}}}};function mt(){return typeof window<"u"}function J(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof C(t).Node:!1}function M(t){return mt()?t instanceof Element||t instanceof C(t).Element:!1}function V(t){return mt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function Kt(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=N(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Gt(t){return/^(table|td|th)$/.test(J(t))}function lt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Fe=/transform|translate|scale|rotate|perspective|filter/,Me=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",Pt;function tt(t){let e=M(t)?N(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!gt()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Me.test(e.contain||"")}function Jt(t){let e=j(t);for(;V(e)&&!et(e);){if(tt(e))return e;if(lt(e))return null;e=j(e)}return null}function gt(){return Pt==null&&(Pt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pt}function et(t){return/^(html|body|#document)$/.test(J(t))}function N(t){return C(t).getComputedStyle(t)}function at(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function j(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||k(t);return Kt(e)?e.host:e}function Qt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Qt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=C(i);if(s){let c=ht(r);return e.concat(r,r.visualViewport||[],ct(i)?i:[],c&&n?Z(c):[])}else return e.concat(i,Z(i,[],n))}function ht(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=N(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=V(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=st(n)!==s||st(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function St(t){return M(t)?t:t.contextElement}function nt(t){let e=St(t);if(!V(e))return $(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ee(e),r=(s?st(n.width):n.width)/o,c=(s?st(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ne=$(0);function ne(t){let e=C(t);return!gt()||!e.visualViewport?Ne:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $e(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===C(t)}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),s=St(t),r=$(1);e&&(o?M(o)&&(r=nt(o)):r=nt(t));let c=$e(s,n,o)?ne(s):$(0),a=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s&&o){let m=C(s),f=M(o)?C(o):o,g=m,p=ht(g);for(;p&&f!==g;){let w=nt(p),h=p.getBoundingClientRect(),x=N(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,b=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,d*=w.x,u*=w.y,a+=y,l+=b,g=C(p),p=ht(g)}}return q({width:d,height:u,x:a,y:l})}function pt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(k(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-pt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,s=i==="fixed",r=k(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=$(1),d=$(0),u=V(o);if((u||!s)&&((J(o)!=="body"||ct(r))&&(a=at(o)),u)){let f=Q(o);l=nt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=r&&!u&&!s?oe(r,a):$(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-a.scrollTop*l.y+d.y+m.y}}function We(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Be(t){let e=at(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-e.scrollLeft+pt(t),r=-e.scrollTop;return N(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}var _e=25;function He(t,e,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",i=C(t),s=k(t),r=i.visualViewport,c=s.clientWidth,a=s.clientHeight,l=0,d=0;if(r){let m=!gt()||e==="fixed";o?m||(l=-r.offsetLeft,d=-r.offsetTop):(c=r.width,a=r.height,m&&(l=r.offsetLeft,d=r.offsetTop))}if(pt(s)<=0){let m=s.ownerDocument,f=m.body,g=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-p),h=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;h<=_e&&(c-=h)}return{width:c,height:a,x:l,y:d}}function Ve(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=nt(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,l=o*s.y;return{width:r,height:c,x:a,y:l}}function Zt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=He(t,n,e);else if(e==="document")o=Be(k(t));else if(M(e))o=Ve(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ze(t,e){let n=e.get(t);if(n)return n;let o=Z(t,[],!1).filter(c=>M(c)&&J(c)!=="body"),i=null,s=N(t).position==="fixed",r=s?j(t):t;for(;M(r)&&!et(r);){let c=N(r),a=tt(r),l=i?i.position:s?"fixed":"";!a&&(l==="fixed"||l==="absolute"&&c.position==="static")?o=o.filter(u=>u!==r):i=c,r=j(r)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=Zt(e,r[0],i),a=c.top,l=c.right,d=c.bottom,u=c.left;for(let m=1;m<r.length;m++){let f=Zt(e,r[m],i);a=B(f.top,a),l=U(f.right,l),d=U(f.bottom,d),u=B(f.left,u)}return{width:l-u,height:d-a,x:u,y:a}}function Ie(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function je(t,e,n){let o=V(e),i=k(e),s=n==="fixed",r=Q(t,!0,s,e),c={scrollLeft:0,scrollTop:0},a=$(0);if((o||!s)&&((J(e)!=="body"||ct(i))&&(c=at(e)),o)){let m=Q(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}!o&&i&&(a.x=pt(i));let l=i&&!o&&!s?oe(i,c):$(0),d=r.left+c.scrollLeft-a.x-l.x,u=r.top+c.scrollTop-a.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function Ct(t){return N(t).position==="static"}function te(t,e){if(!V(t)||N(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=C(t);if(lt(t))return n;if(!V(t)){let i=j(t);for(;i&&!et(i);){if(M(i)&&!Ct(i))return i;i=j(i)}return n}let o=te(t,e);for(;o&&Gt(o)&&Ct(o);)o=te(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||ie,n=this.getDimensions,o=await n(t.floating);return{reference:je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ye(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:ie,getElementRects:Xe,getClientRects:We,getDimensions:Ie,getScale:nt,isElement:M,isRTL:Ye};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ke(t,e,n){let o=null,i,s=k(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let m=t.getBoundingClientRect(),{left:f,top:g,width:p,height:w}=m;if(d||e(),!p||!w)return;let h=rt(g),x=rt(s.clientWidth-(f+p)),y=rt(s.clientHeight-(g+w)),b=rt(f),A={rootMargin:-h+"px "+-x+"px "+-y+"px "+-b+"px",threshold:B(0,U(1,u))||1},R=!0;function S(P){let v=P[0].intersectionRatio;if(!se(m,t.getBoundingClientRect()))return c();if(v!==u){if(!R)return c();v?c(!1,v):i=setTimeout(()=>{c(!1,1e-7)},1e3)}R=!1}try{o=new IntersectionObserver(S,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,A)}o.observe(t)}let a=C(t),l=()=>c(n);return a.addEventListener("resize",l),c(!0),()=>{a.removeEventListener("resize",l),r()}}function re(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),d=i||s?[...l?Z(l):[],...e?Z(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n),s&&h.addEventListener("resize",n)});let u=l&&c?Ke(l,n,s):null,m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===l&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),l&&!a&&f.observe(l),e&&f.observe(e));let g,p=a?Q(t):null;a&&w();function w(){let h=Q(t);p&&!se(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,a&&cancelAnimationFrame(g)}}var ce=Xt,le=Ut,ae=Yt,fe=It;var ue=jt,de=zt;var me=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Vt(t,e,{...i,platform:s})};function ge(t){return qe(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function qe(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||tt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:s,offsetDistance:r,offsetSkidding:c,overlayPositioning:a="absolute",placement:l,referenceEl:d,type:u})=>{if(!d||!s)return;let m=n==="rtl",{x:f,y:g,placement:p,strategy:w,middlewareData:h}=await me(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:pe(l,m),middleware:Je({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>pe(O,m)),offsetDistance:r,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:O,y:A}=h.arrow,R=p.split("-")[0],S=O!=null?"left":"top",P=tn[R],v={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...v,[S]:`${S=="left"?O:A}px`,[R]:"100%",transform:P})}let y=h.hide?.referenceHidden?"hidden":null,b=y?"none":null;s.setAttribute(Ge,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${he(f)}px,${he(g)}px)`,visibility:y})}),Ge="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],On="bottom-start",Rn="bottom-end",Pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:s,type:r}){let c="layoutViewport",a=t==="auto"||t==="auto-start"||t==="auto-end",l=[ae({rootBoundary:c})];if(l.push(ce({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(le({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null,rootBoundary:c})),!e&&(!a||r==="menu")){let u=r==="menu"?n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]:n;l.push(fe(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(de({element:s})),l.push(ue({rootBoundary:c})),l}function Qe(t){return ve.includes(t)}function Cn(t,e){let n=t.filter(Qe);return n.length!==t.length&&Tt.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Sn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return be(t);await(n?Ze(t):ye)(t,e)}function Ze(t){let e=xt.get(t);return e||(e=Dt(ye,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=re;ft.set(t,{state:"pending"});let i,s=o(e,n,()=>{let r=t.reposition();i||(i=r)});return ft.set(t,{state:"active",cleanUp:s}),i}function en(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function En(t){let{floatingEl:e,referenceEl:n}=t;if(en(t),nn(t),!(!e||!n||!t.open))return be(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var we=4,Ln=Math.ceil(Math.hypot(we,we));export{On as a,Rn as b,Pn as c,Cn as d,Sn as e,en as f,En as g,nn as h,Ln as i};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as T}from"./ZROAP4OW.js";import"./DO4KVY7Y.js";import{a as g}from"./LKN4LUNT.js";import{a as I}from"./6LHB5RGN.js";import{a as w}from"./72LA67LQ.js";import{a as d}from"./VMHJHFFS.js";import{e as A}from"./YE5HVMTC.js";import"./GBLGTHFD.js";import{A as s,m as u}from"./W77STZAT.js";import{E as $,F as C,G as E,H as n,M as k,T as y,g as b,h as a,l as S,p as l}from"./MPGHVV7O.js";var h={actionsStart:"actions-start",actionsEnd:"actions-end",contentEnd:"content-end",contentStart:"content-start"},t={actionsEnd:"actions-end",actionsStart:"actions-start",content:"content",description:"description",expandIcon:"expand-icon",hasActions:"has-actions",header:"header",headerContainer:"header-container",headerContent:"header-content",headerText:"header-text",headerAppearance:r=>`header--${r}`,heading:"heading",icon:"icon",iconEnd:"icon--end",iconStart:"icon--start",iconPosition:r=>`icon-position--${r}`,iconType:r=>`icon-type--${r}`,item:"item",slotContentEnd:"slot-content-end",slotContentStart:"slot-content-start"},p={section:"section",sectionToggle:"section-toggle"},m={chevronDown:"chevron-down",caretDown:"caret-down",plus:"plus",minus:"minus"},H=b`.icon-position--end,.icon-position--start{--calcite-internal-accordion-item-icon-rotation: -90deg ;--calcite-internal-accordion-item-active-icon-rotation: 0deg;--calcite-internal-accordion-item-icon-rotation-rtl: 90deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: 0deg}:host([scale=s]){--calcite-internal-accordion-item-action-slot-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs));--calcite-internal-accordion-item-description-font-size: var(--calcite-font-size-relative-xs)}:host([scale=m]){--calcite-internal-accordion-item-action-slot-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs));--calcite-internal-accordion-item-description-font-size: var(--calcite-font-size-relative-sm)}:host([scale=l]){--calcite-internal-accordion-item-action-slot-spacing: var(--calcite-theme-space-xs, var(--calcite-spacing-xs));--calcite-internal-accordion-item-description-font-size: var(--calcite-font-size-relative-base)}:host{position:relative;display:flex;flex-direction:column;text-decoration-line:none;color:var(--calcite-accordion-text-color, var(--calcite-color-text-3));background-color:var(--calcite-accordion-background-color);border-width:0}:host .header{background-color:var(--calcite-accordion-item-header-background-color)}:host .header:hover{background-color:var(--calcite-internal-accordion-item-header-background-color-hover)}:host .header:active{background-color:var(--calcite-internal-accordion-item-header-background-color-press)}.header--solid{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)) )}.header--transparent{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-color-transparent-hover) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-color-transparent-press) )}.icon-position--start{--calcite-internal-accordion-item-flex-direction: row-reverse;--calcite-internal-accordion-item-icon-spacing-start: 0;--calcite-internal-accordion-item-icon-spacing-end: var(--calcite-internal-accordion-icon-margin)}.icon-position--end{--calcite-internal-accordion-item-flex-direction: row;--calcite-internal-accordion-item-icon-spacing-start: var(--calcite-internal-accordion-icon-margin);--calcite-internal-accordion-item-icon-spacing-end: 0}.icon-position--end:not(.icon-type--plus-minus){--calcite-internal-accordion-item-icon-rotation: 0deg;--calcite-internal-accordion-item-active-icon-rotation: 180deg;--calcite-internal-accordion-item-icon-rotation-rtl: 0deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: -180deg }.content,.header{border-block-end-width:var(--calcite-border-width-sm);border-block-end-style:solid;border-color:var(--calcite-accordion-border-color, var(--calcite-color-border-2))}.header-content{padding:var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, var(--calcite-space-sm) .75rem));background:none;border:none;appearance:none;-webkit-appearance:none;box-shadow:none;outline:none;font-family:inherit}.content{padding:var(--calcite-accordion-item-content-space, var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, var(--calcite-space-sm) .75rem)))}.header{display:flex;align-items:stretch}.header-content,.header-container,.header .actions-start,.header .actions-end{overflow-wrap:break-word;word-break:break-word;display:flex;align-items:center;transition-timing-function:var(--calcite-animation-easing-function)}.header .has-actions{gap:var(--calcite-internal-accordion-item-action-slot-spacing);padding-block:var(--calcite-internal-accordion-item-action-slot-spacing)}.header .actions-start.has-actions{padding-inline:var(--calcite-internal-accordion-item-action-slot-spacing) 0}.header .actions-end.has-actions{padding-inline:0 var(--calcite-internal-accordion-item-action-slot-spacing)}.header-content{outline-color:var(--calcite-color-transparent);flex-grow:1;cursor:pointer;flex-direction:var(--calcite-internal-accordion-item-flex-direction);color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color, inherit))}.header-content:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.header-content:focus,.header-content:hover,.header-content:active{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover))}.header-content:focus .heading,.header-content:hover .heading,.header-content:active .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-press))}.header-container{inline-size:100%}.slot-content-end{margin-inline-start:var(--calcite-internal-accordion-icon-margin)}.slot-content-start{margin-inline-end:var(--calcite-internal-accordion-icon-margin)}.header-text{margin-block:var(--calcite-space-none);flex-grow:1;flex-direction:column;padding-block:var(--calcite-space-none);text-align:initial;margin-inline-end:auto}.heading,.description{display:flex;inline-size:100%;line-height:var(--calcite-font-line-height-relative-snug)}.heading{font-weight:var(--calcite-font-weight-medium);margin:var(--calcite-space-none);padding:var(--calcite-space-none)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]) .heading{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-relative-md)}.icon{transition-timing-function:var(--calcite-animation-easing-function);display:flex;align-items:center;margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-end)}.icon--start{color:var(--calcite-accordion-item-start-icon-color, var(--calcite-ui-icon-color, currentColor));margin-inline-end:var(--calcite-internal-accordion-icon-margin)}.icon--end{color:var(--calcite-accordion-item-end-icon-color, var(--calcite-ui-icon-color, currentColor));margin-inline-end:var(--calcite-internal-accordion-icon-margin);margin-inline-start:var(--calcite-internal-accordion-icon-margin)}.expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color, var(--calcite-color-text-3)));margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-end);transform:rotate(var(--calcite-internal-accordion-item-icon-rotation))}.calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-icon-rotation-rtl))}.description{font-size:var(--calcite-internal-accordion-item-description-font-size)}.content{display:none;text-align:initial}:host(:not([expanded])) .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover, var(--calcite-color-text-1)));font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal))}:host([expanded]){color:var(--calcite-accordion-text-color-press, var(--calcite-accordion-text-color, var(--calcite-color-text-1)))}:host([expanded]) .header{border-block-end-color:transparent}:host([expanded]) .expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-color-text-2))));transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation))}:host([expanded]) .calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation-rtl))}:host([expanded]) .description{color:var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-color-text-2)))}:host([expanded]) .content{display:block}@media(forced-colors:active){:host([expanded]) .header{border-block-end:none}:host([expanded]) .heading{font-weight:bolder}.header-content:hover .heading,.header-content:focus .heading{text-decoration:underline}}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends E{constructor(){super(),this.direction=A(),this.headerRef=$(),this.focusSetter=w()(this).setFocus,this.messages=I(),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.expanded=!1,this.calciteAccordionItemCollapse=l({cancelable:!1}),this.calciteAccordionItemExpand=l({cancelable:!1}),this.calciteInternalAccordionItemClose=l({cancelable:!1}),this.calciteInternalAccordionItemSelect=l({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],description:1,expanded:[7,{},{reflect:!0,type:Boolean}],heading:1,iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],appearance:1,headingLevel:[11,{},{type:Number,reflect:!0}],iconPosition:1,iconStart:[3,{},{reflect:!0}],iconType:1,scale:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}]}}static{this.styles=H}async setFocus(e){return this.focusSetter(()=>this.headerRef.value,e)}load(){this.listenOn(document,"calciteInternalAccordionChange",this.updateActiveItemOnChange),this.listenOn(document,"calciteInternalAccordionItemsSync",this.accordionItemSyncHandler)}willUpdate(e){e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteAccordionItemExpand.emit():this.calciteAccordionItemCollapse.emit())}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.emitRequestedItem(),e.preventDefault();break}}updateActiveItemOnChange(e){let[c]=e.composedPath(),o=u(this.el,"calcite-accordion");c===o&&(this.determineActiveItem(o.selectionMode,e.detail.requestedAccordionItem),e.stopPropagation())}accordionItemSyncHandler(e){let[c]=e.composedPath(),o=this.el;if(o.parentElement===c)return;let i=u(o,"calcite-accordion");c===i&&(this.appearance=i.appearance,this.iconPosition=i.iconPosition,this.iconType=i.iconType,this.scale=i.scale,e.stopPropagation())}handleActionsStartSlotChange(e){this.hasActionsStart=s(e)}handleActionsEndSlotChange(e){this.hasActionsEnd=s(e)}handleContentEndSlotChange(e){this.hasContentEnd=s(e)}handleContentStartSlotChange(e){this.hasContentStart=s(e)}itemHeaderClickHandler(){this.emitRequestedItem()}determineActiveItem(e,c){switch(e){case"multiple":this.el===c&&(this.expanded=!this.expanded);break;case"single":this.expanded=this.el===c?!this.expanded:!1;break;case"single-persist":this.expanded=this.el===c;break}}emitRequestedItem(){this.calciteInternalAccordionItemSelect.emit({requestedAccordionItem:this.el})}renderActionsStart(){let{hasActionsStart:e}=this;return a`<div class=${n({[t.actionsStart]:!0,[t.hasActions]:e})} .hidden=${!e}><slot name=${h.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`}renderActionsEnd(){let{hasActionsEnd:e}=this;return a`<div class=${n({[t.actionsEnd]:!0,[t.hasActions]:e})} .hidden=${!e}><slot name=${h.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`}renderContentEnd(){return a`<div class=${n(t.slotContentEnd)} .hidden=${!this.hasContentEnd}><slot name=${h.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}renderContentStart(){return a`<div class=${n(t.slotContentStart)} .hidden=${!this.hasContentStart}><slot name=${h.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}render(){let{iconFlipRtl:e,heading:c,headingLevel:o,messages:v,expanded:i}=this,z=i?v.collapse:v.expand,P=this.iconStart?g("icon-start",a`<calcite-icon class=${n({[t.icon]:!0,[t.iconStart]:!0})} .flipRtl=${e==="both"||e==="start"} .icon=${this.iconStart} .scale=${d(this.scale)}></calcite-icon>`):null,D=this.iconEnd?g("icon-end",a`<calcite-icon class=${n({[t.iconEnd]:!0,[t.icon]:!0})} .flipRtl=${e==="both"||e==="end"} .icon=${this.iconEnd} .scale=${d(this.scale)}></calcite-icon>`):null,{description:x}=this;return a`<div class=${n({[t.iconPosition(this.iconPosition)]:!0,[t.iconType(this.iconType)]:!0})}><div class=${n({[t.header]:!0,[k.rtl]:this.direction==="rtl",[t.headerAppearance(this.appearance)]:!0})}>${this.renderActionsStart()}<button aria-controls=${p.section} .ariaExpanded=${i} class=${n(t.headerContent)} id=${p.sectionToggle} @click=${this.itemHeaderClickHandler} type=button ${C(this.headerRef)}><div class=${n(t.headerContainer)}>${this.renderContentStart()}${P}<div class=${n(t.headerText)}>${T({class:t.heading,level:o,children:c})}${x?a`<span class=${n(t.description)}>${x}</span>`:null}</div>${D}${this.renderContentEnd()}</div><calcite-icon class=${n(t.expandIcon)} .icon=${this.iconType==="chevron"?m.chevronDown:this.iconType==="caret"?m.caretDown:i?m.minus:m.plus} .scale=${d(this.scale)} title=${z??S}></calcite-icon></button>${this.renderActionsEnd()}</div><section aria-labelledby=${p.sectionToggle} class=${n(t.content)} id=${p.section}><slot></slot></section></div>`}};y("calcite-accordion-item",f);export{f as AccordionItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as C}from"./WTNYMVTD.js";import{a as z}from"./FDHY2TZA.js";import{e as I}from"./
|
|
2
|
+
import{b as C}from"./WTNYMVTD.js";import{a as z}from"./FDHY2TZA.js";import{e as I}from"./YE5HVMTC.js";import"./GBLGTHFD.js";import{G as b,H as v,Q as g,T as x,U as y,g as u,h as m,i as h,l}from"./MPGHVV7O.js";var $={flipRtl:"flip-rtl",svg:"svg"},D={},p={},w={s:16,m:24,l:32};function N({icon:s,scale:t}){let i=w[t],e=U(s),n=e.charAt(e.length-1)==="F";return`${n?e.substring(0,e.length-1):e}${i}${n?"F":""}`}async function O(s){let t=N(s),i=k(t);if(i)return i;p[t]||(p[t]=fetch(y(`./assets/icon/${t}.json`)).then(n=>n.json()).catch(()=>(g.error(`${s.icon} (${s.scale}) icon failed to load`),"")));let e=await p[t];return D[t]=e,e}function A(s){return k(N(s))}function k(s){return D[s]}function U(s){let t=!isNaN(Number(s.charAt(0))),i=/[a-z]/i,e=s.split("-").map((n,o)=>n.replace(i,(a,r)=>o===0&&r===0?a:a.toUpperCase())).join("");return t?`i${e}`:e}var B=u`:host{color:var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor));display:inline-flex}:host([scale=s]){inline-size:16px;block-size:16px;min-inline-size:16px;min-block-size:16px}:host([scale=m]){inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}:host([scale=l]){inline-size:32px;block-size:32px;min-inline-size:32px;min-block-size:32px}.flip-rtl{transform:scaleX(-1)}.svg{display:block}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends b{constructor(){super(...arguments),this.direction=I(),this.visible=!1,this.flipRtl=!1,this.preload=!1,this.scale="m"}static{this.properties={pathData:[16,{},{state:!0}],visible:[16,{},{state:!0}],flipRtl:[7,{},{reflect:!0,type:Boolean}],icon:[3,{},{reflect:!0}],preload:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],textLabel:1}}static{this.styles=B}connectedCallback(){if(super.connectedCallback(),this.preload){this.visible=!0,this.loadIconPathData();return}this.visible||this.waitUntilVisible(()=>{this.visible=!0,this.loadIconPathData()})}willUpdate(t){(t.has("icon")&&(this.hasUpdated||this.icon!==void 0)||t.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.loadIconPathData()}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0}async loadIconPathData(){let{icon:t,scale:i,visible:e}=this;if(!t||!e)return;let n={icon:t,scale:i},o=A(n)||await O(n);t===this.icon&&(this.pathData=o)}waitUntilVisible(t){if(this.intersectionObserver=z("intersection",i=>{i.forEach(e=>{e.isIntersecting&&(this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,t())})},{rootMargin:"50px"}),!this.intersectionObserver){t();return}this.intersectionObserver.observe(this.el)}render(){let{flipRtl:t,pathData:i,scale:e,textLabel:n}=this,o=this.direction,a=w[e],r=!!n,f=Array.isArray(i)?i:[i??""];return this.el.ariaHidden=C(!r),this.el.ariaLabel=r?n:null,this.el.role=r?"img":null,m`<svg aria-hidden=true class=${v({[$.flipRtl]:o==="rtl"&&t,[$.svg]:!0})} fill=currentColor height=100% viewBox=${`0 0 ${a} ${a}`} width=100% xmlns=http://www.w3.org/2000/svg>${f.map(c=>typeof c=="string"?h`<path d=${c??l} />`:h`<path d=${c.d??l} opacity=${("opacity"in c?c.opacity:1)??l} />`)}</svg>`}};x("calcite-icon",d);export{d as Icon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as k}from"./
|
|
2
|
+
import{a as k}from"./UOYYONEV.js";import{c as x}from"./GI6KFZMW.js";import{a as f}from"./XN5GTOTE.js";import{a as z}from"./VBKJL7VE.js";import{a as u}from"./SVWITGRF.js";import{a as p}from"./JN6YLTUP.js";import{a as m}from"./6LHB5RGN.js";import{a as b}from"./72LA67LQ.js";import"./VMHJHFFS.js";import{e as v}from"./YE5HVMTC.js";import"./GBLGTHFD.js";import"./W77STZAT.js";import{E as o,F as n,G as h,H as a,J as c,M as d,T as g,g as s,h as l,i as r,p as t}from"./MPGHVV7O.js";var y={toggle:"toggle",check:"check-svg"},w=s`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]) .check-svg,:host([scale=s]) .toggle{inline-size:var(--calcite-checkbox-size, var(--calcite-size-3xs));block-size:var(--calcite-checkbox-size, var(--calcite-size-3xs))}:host([scale=m]) .check-svg,:host([scale=m]) .toggle{inline-size:var(--calcite-checkbox-size, var(--calcite-size-2xs));block-size:var(--calcite-checkbox-size, var(--calcite-size-2xs))}:host([scale=l]) .check-svg,:host([scale=l]) .toggle{inline-size:var(--calcite-checkbox-size, var(--calcite-size-xs));block-size:var(--calcite-checkbox-size, var(--calcite-size-xs))}:host{position:relative;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));pointer-events:none;box-sizing:border-box;display:block;overflow:hidden;fill:currentColor;stroke:currentColor;stroke-width:var(--calcite-border-width-sm);box-shadow:inset 0 0 0 1px var(--calcite-checkbox-border-color, var(--calcite-color-border-input));color:var(--calcite-checkbox-icon-color, var(--calcite-theme-color-surface-1, var(--calcite-color-background)))}:host([status=invalid]:not([checked])) .check-svg{box-shadow:inset 0 0 0 1px var(--calcite-color-status-danger)}:host([status=invalid]:not([checked])) .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-color-status-danger)}:host([status=invalid]:not([checked])) .toggle:active .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-color-brand-press)}:host([status=invalid]:not([checked])) .toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(var(--calcite-theme-space-base, var(--calcite-spacing-base)) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-color-brand);box-shadow:inset 0 0 0 1px var(--calcite-color-brand)}:host([checked]) .toggle:hover .check-svg,:host([indeterminate]) .toggle:hover .check-svg{background-color:var(--calcite-checkbox-border-color-hover, var(--calcite-color-brand-hover))}:host([checked]) .toggle:active .check-svg,:host([indeterminate]) .toggle:active .check-svg{background-color:var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press));box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press))}:host([hovered]) .toggle .check-svg,:host .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-hover, var(--calcite-color-brand-hover))}.toggle:active .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press))}.toggle{outline-color:transparent;position:relative}.toggle:active,.toggle:focus,.toggle:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.toggle:after,.toggle:before{inset-block-start:50%;inset-inline-start:50%;min-block-size:var(--calcite-size-sm);min-inline-size:var(--calcite-size-sm);position:absolute}.toggle:not(.calcite--rtl):after{content:"";transform:translate(-50%) translateY(-50%)}.toggle.calcite--rtl:before{content:"";transform:translate(50%) translateY(-50%)}@media(forced-colors:active){.check-svg{border:1px solid currentColor}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-theme-space-base, var(--calcite-spacing-base))}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-relative-md)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,i=class extends h{constructor(){super(),this.checkedPath="M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z",this.direction=v(),this.formSupport=x({inputType:"checkbox"})(this),this.indeterminatePath="M13 8v1H3V8z",this.onLabelClick=()=>{this.toggle()},this.toggleRef=o(),this.messages=m(),this.focusSetter=b()(this).setFocus,this.interactiveContainer=u(this),this.checked=!1,this.disabled=!1,this.hovered=!1,this.indeterminate=!1,this.required=!1,this.scale="m",this.status="idle",this.calciteCheckboxChange=t({cancelable:!1}),this.calciteInternalCheckboxBlur=t({cancelable:!1}),this.calciteInternalCheckboxFocus=t({cancelable:!1}),z(this),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=w}async setFocus(e){return this.focusSetter(()=>this.toggleRef.value,e)}getPath(){return this.indeterminate?this.indeterminatePath:this.checked?this.checkedPath:""}toggle(){this.disabled||(this.checked=!this.checked,this.setFocus(),this.indeterminate=!1,this.calciteCheckboxChange.emit())}keyDownHandler(e){p(e.key)&&(this.toggle(),e.preventDefault())}clickHandler(){this.toggle()}onToggleBlur(){this.calciteInternalCheckboxBlur.emit(!1)}onToggleFocus(){this.calciteInternalCheckboxFocus.emit(!0)}render(){let e=this.direction==="rtl";return this.interactiveContainer({disabled:this.disabled,children:l`<div .ariaChecked=${this.checked} .ariaLabel=${f(this)} .ariaRequired=${this.required} class=${a({[y.toggle]:!0,[d.rtl]:e})} @blur=${this.onToggleBlur} @focus=${this.onToggleFocus} role=checkbox tabindex=${(this.disabled?void 0:0)??c} ${n(this.toggleRef)}><svg aria-hidden=true class=${a(y.check)} viewBox="0 0 16 16">${r`<path d=${this.getPath()??c} />`}</svg><slot></slot></div>${this.labelText&&k({bottomSpacingDisabled:!0,labelText:this.labelText,required:this.required,spacingInlineStart:!0,tooltipText:this.messages.required})||""}`})}};g("calcite-checkbox",i);export{i as Checkbox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{A,B as D,C as y,k as P,v as k,w,x as V,y as m,z as h}from"./
|
|
2
|
+
import{A,B as D,C as y,k as P,v as k,w,x as V,y as m,z as h}from"./MPGHVV7O.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{g as e}from"./
|
|
2
|
+
import{g as e}from"./MPGHVV7O.js";var t=e`:host(.calcite-sortable--chosen),:host(.calcite-sortable--drag),:host(.calcite-sortable--fallback),:host(.calcite-sortable--ghost){position:relative;overflow:hidden}:host(.calcite-sortable--ghost):before{content:"";box-sizing:border-box;border-width:var(--calcite-border-width-sm);border-style:dashed;border-color:var(--calcite-color-brand);background-color:var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2));position:absolute;inset-block:var(--calcite-space-none);inset-inline-start:var(--calcite-space-none);inset-inline-end:var(--calcite-space-none);z-index:var(--calcite-z-index)}:host(.calcite-sortable--drag){box-shadow:var(--calcite-shadow-md)}`;export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{d as a}from"./MDXRSPDG.js";import{a as y}from"./
|
|
2
|
+
import{d as a}from"./MDXRSPDG.js";import{a as y}from"./6LHB5RGN.js";import"./TL56TNQ7.js";import{a as g}from"./72LA67LQ.js";import"./VMHJHFFS.js";import{c as f}from"./YE5HVMTC.js";import"./GBLGTHFD.js";import{B as d,F as n,q as p}from"./W77STZAT.js";import{G as m,T as c,g as u,h}from"./MPGHVV7O.js";var I=u`:host{display:flex;line-height:var(--calcite-font-line-height-fixed-lg)}ul{display:inline-flex;align-items:center;block-size:100%;margin:var(--calcite-space-none);padding:var(--calcite-space-none)}:host([layout=vertical]) ul{display:flex;flex-direction:column;inline-size:100%}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends m{constructor(){super(),this.attributeWatch=f(["role"],this.handleGlobalAttributesChanged),this.menuItems=[],this.messages=y(),this.focusSetter=g()(this).setFocus,this.layout="horizontal",this.scale="m",this.listen("keydown",this.calciteInternalNavMenuItemKeyEvent)}static{this.properties={label:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=I}async setFocus(t){return this.focusSetter(()=>this.menuItems[0],t)}willUpdate(t){(t.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||t.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.setMenuItemProperties(this.menuItems)}handleGlobalAttributesChanged(){this.requestUpdate(),this.setMenuItemProperties(this.menuItems)}calciteInternalNavMenuItemKeyEvent(t){if(t.defaultPrevented)return;let e=this.getMenuItemFromEvent(t);if(!e)return;let i=this.getSubmenuItems(e),r=i.length>0,l=t.key,s=!1;l==="ArrowDown"?e.layout==="vertical"?(n(this.menuItems,e,"next",!1,!1),s=!0):e.open&&r&&(i[0].setFocus(),s=!0):l==="ArrowUp"?e.layout==="vertical"?(n(this.menuItems,e,"previous",!1,!1),s=!0):e.open&&r&&(i[i.length-1].setFocus(),s=!0):l==="ArrowRight"?this.layout==="horizontal"?(n(this.menuItems,e,"next",!1,!1),s=!0):e.open&&r&&(i[0].setFocus(),s=!0):l==="ArrowLeft"?this.layout==="horizontal"?(n(this.menuItems,e,"previous",!1,!1),s=!0):a(e.parentElement)&&(this.focusParentElement(e),s=!0):l==="Escape"&&a(e.parentElement)&&(this.focusParentElement(e),s=!0),s&&t.preventDefault()}getMenuItemFromEvent(t){let e=t.composedPath().find(a);return e&&this.menuItems.includes(e)?e:void 0}getSubmenuItems(t){return Array.from(t.children).filter(a).filter(e=>e.matches('[slot="submenu-item"]'))}handleMenuSlotChange(t){this.menuItems=d(t),this.setMenuItemProperties(this.menuItems)}focusParentElement(t){let e=t.parentElement;e&&(p(e),e.open=!1)}setMenuItemProperties(t){t.forEach(e=>{e.layout=this.layout,e.scale=this.scale,this.getEffectiveRole()==="menubar"&&(e.isTopLevelItem=!0,e.topLevelMenuLayout=this.layout)})}getEffectiveRole(){return this.el.role||"menubar"}render(){return h`<ul .ariaLabel=${this.label} .role=${this.getEffectiveRole()}><slot @slotchange=${this.handleMenuSlotChange}></slot></ul>`}};c("calcite-menu",o);export{o as Menu};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{H as e,h as t,l as i}from"./
|
|
2
|
+
import{H as e,h as t,l as i}from"./MPGHVV7O.js";var n={alignmentCenter:"internal-label-alignment--center",alignmentEnd:"internal-label-alignment--end",container:"internal-label--container",requiredIndicator:"internal-label-required--indicator",spacingBottom:"internal-label-spacing--bottom",spacingInlineEnd:"internal-label-spacing-inline--end",spacingInlineStart:"internal-label-spacing-inline--start",text:"internal-label--text"},b=({alignmentCenter:a,bottomSpacingDisabled:l,labelText:r,onClick:s,required:c,spacingInlineEnd:o,spacingInlineStart:d,tooltipText:g})=>t`<div class=${e({[n.alignmentCenter]:a,[n.alignmentEnd]:!a,[n.container]:!0,[n.spacingBottom]:!l,[n.spacingInlineEnd]:o,[n.spacingInlineStart]:d})} @click=${s}><div class=${e(n.text)}>${r}${c&&t`<span aria-hidden=true class=${e(n.requiredIndicator)} title=${g??i}>*</span>`||""}</div><slot name=label-content></slot></div>`;export{b as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{c as I}from"./4ZFQLQBB.js";import{a as F}from"./RP3EAINH.js";import{a as P}from"./FDHY2TZA.js";import{k as m}from"./BGVOI22E.js";import"./JN6YLTUP.js";import{a as H}from"./MFI6726F.js";import"./TL56TNQ7.js";import{b as f}from"./VMHJHFFS.js";import"./JX5QRWOH.js";import"./IVIEPOEY.js";import{E as b,F as h,G as T,H as c,M as A,T as O,g as z,h as r,l as x,m as k,p as u}from"./EEOKRDQW.js";function _(){return navigator.userAgentData}function j(){if(!1)return"";let g=_();return g?.brands?g.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",tableContainerOverflow:"table-container--overflow",tableFixed:"table--fixed",selectionActions:"selection-actions",dismissButton:"dismiss-button",selectionChipActive:"selection-chip--active",selectionCountChip:"selection-chip",selectionOutOfViewChip:"selection-chip--out-of-view"},w={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},E={hideEmpty:"hide-empty",clear:"x"},q=z`@charset "UTF-8";:host{display:flex;--calcite-internal-table-border-collapse: collapse}:host([scale=s]){--calcite-internal-table-cell-padding: .25rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size-relative-xs)}:host([scale=m]){--calcite-internal-table-cell-padding: .5rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-relative-base);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size-relative-sm)}:host(:is([scale=s],[scale=m])){--calcite-internal-table-selection-action-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=l]){--calcite-internal-table-selection-action-spacing: var(--calcite-theme-space-xs, var(--calcite-spacing-xs));--calcite-internal-table-cell-padding: 1rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-relative-md);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size-relative-base)}:host([sticky-header]){--calcite-internal-table-border-collapse: separate;--calcite-internal-table-header-border-block-end-width: 0;--calcite-internal-table-sticky-header-border-shadow: inset 0 calc(-1 * var(--calcite-border-width-sm)) 0 0 var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}:host([sticky-header]) .table-container{position:relative}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{white-space:nowrap;line-height:var(--calcite-font-line-height-relative-tight);border:var(--calcite-border-width-sm) solid var(--calcite-table-border-color, var(--calcite-color-border-2));border-radius:var(--calcite-table-corner-radius, var(--calcite-theme-corner-radius-none, var(--calcite-corner-radius-sharp)));box-shadow:var(--calcite-table-shadow, var(--calcite-shadow-none));overflow:auto}.table-container--overflow{overscroll-behavior-y:none}table{border-collapse:var(--calcite-internal-table-border-collapse);border-spacing:0;inline-size:var(--calcite-container-size-content-fluid)}@-moz-document url-prefix(){table{border-collapse:separate;border-spacing:0}}.table--fixed{table-layout:fixed}.bordered ::slotted(calcite-table-row){--calcite-table-row-border-color: var(--calcite-table-border-color, var(--calcite-color-border-2))}.striped ::slotted(calcite-table-row:nth-child(2n+1)){--calcite-table-row-background-color: var( --calcite-table-row-background-color-striped, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)) )}.selection-actions{display:flex;flex-direction:row;gap:var(--calcite-internal-table-selection-action-spacing);margin-inline-start:auto}.selection-area{display:flex;flex-direction:row;align-items:center;padding-block:var(--calcite-internal-table-cell-padding)}.selection-area calcite-chip:last-of-type{margin-inline-end:var(--calcite-space-sm)}.selection-area calcite-chip:last-of-type:not(:first-of-type){margin-inline-start:var(--calcite-space-sm)}.selection-area calcite-button{margin-inline-end:var(--calcite-space-lg)}.selection-chip{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color)}.selection-chip.selection-chip--active{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color-selected);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color-selected);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color-selected)}.selection-chip--out-of-view{--calcite-chip-background-color: var(--calcite-table-selection-out-of-view-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-out-of-view-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-out-of-view-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-out-of-view-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-out-of-view-chip-text-color);--calcite-chip-icon-color: var(--calcite-table-selection-out-of-view-chip-icon-color)}.pagination-area{display:flex;flex-direction:row;inline-size:100%;justify-content:center;padding-block:var(--calcite-internal-table-cell-padding)}calcite-pagination{flex:1;justify-content:center;--calcite-pagination-color: var(--calcite-table-pagination-color);--calcite-pagination-color-hover: var(--calcite-table-pagination-color-hover);--calcite-pagination-color-border-hover: var(--calcite-table-pagination-color-border-hover);--calcite-pagination-color-border-active: var(--calcite-table-pagination-color-border-active);--calcite-pagination-background-color: var(--calcite-table-pagination-background-color);--calcite-pagination-icon-color-background-hover: var(--calcite-table-pagination-icon-color-background-hover)}.dismiss-button{margin-inline-end:var(--calcite-space-lg);--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color);--calcite-button-corner-radius: var(--calcite-table-selection-dismiss-button-corner-radius);--calcite-button-shadow: var(--calcite-table-selection-dismiss-button-shadow);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color)}.dismiss-button:hover{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-hover);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-hover);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-hover)}.dismiss-button:active{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-active);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-active);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-active)}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends T{constructor(){super(),this.allRows=[],this.bodyRows=[],this.footRows=[],this.headRows=[],this.paginationRef=b(),this.tableContainerRef=b(),this.tableEl=null,this.tableBodySlotRef=b(),this.tableFootSlotRef=b(),this.tableHeadSlotRef=b(),this.tableContainerOverflowAnimationFrame=null,this.tableContainerResizeObserver=P("resize",()=>this.scheduleTableContainerOverflowUpdate()),this.messages=H({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.readCellContentsToAT=!1,this.selectedCount=0,this.tableContainerHasOverflow=!1,this._selectedItems=[],this.bordered=!1,this.currentPage=0,this.groupSeparator=!1,this.interactionMode="interactive",this.layout="auto",this.numbered=!1,this.pageSize=0,this.scale="m",this.selectionDisplay="top",this.selectionMode="none",this.striped=!1,this.stickyHeader=!1,this.calciteInternalTableRowFocusChange=u({cancelable:!1}),this.calciteTablePageChange=u({cancelable:!1}),this.calciteTableSelect=u({cancelable:!1}),this.listen("calciteTableRowSelect",this.calciteTableRowSelectListener),this.listen("calciteInternalTableRowSelect",this.calciteInternalTableRowSelectListener),this.listen("calciteInternalTableRowFocusRequest",this.calciteInternalTableRowFocusEvent)}static{this.properties={colCount:[16,{},{state:!0}],pageStartRow:[16,{},{state:!0}],readCellContentsToAT:[16,{},{state:!0}],selectedCount:[16,{},{state:!0}],tableContainerHasOverflow:[16,{},{state:!0}],_selectedItems:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],caption:1,currentPage:[11,{},{reflect:!0,type:Number}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],interactionMode:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],pageSize:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],selectedItems:[32,{},{attribute:!1,readOnly:!0}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],striped:[7,{},{reflect:!0,type:Boolean}],stickyHeader:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[q,F]}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(j()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}disconnectedCallback(){super.disconnectedCallback(),this.tableContainerOverflowAnimationFrame!==null&&(cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=null),this.tableContainerResizeObserver?.disconnect()}updated(e){e.has("messages")&&this.allRows.forEach(t=>{t.messages=this.messages})}willUpdate(e){(e.has("groupSeparator")&&(this.hasUpdated||this.groupSeparator!==!1)||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("numberingSystem")||e.has("pageSize")&&(this.hasUpdated||this.pageSize!==0)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("currentPage")&&(this.hasUpdated||this.currentPage>1)&&this.pageSize>0)&&this.updateRows(),e.has("stickyHeader")&&(this.hasUpdated||this.stickyHeader!==!1)&&(this.allRows?.forEach(t=>{t.stickyHeaderEnabled=this.stickyHeader}),this.stickyHeader?this.applyHeaderRowPositionStyles():this.resetStickyHeaderState())}handleSlotChange(){this.updateRows()}clearStickyHeaderRowStyles(){this.headRows?.forEach(e=>{e.style.removeProperty("--calcite-internal-table-header-offset"),e.style.removeProperty("--calcite-internal-table-header-z-index"),e.style.removeProperty("--calcite-internal-table-header-row-position")})}resetStickyHeaderState(){this.clearStickyHeaderRowStyles()}calciteTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(e.target)}calciteInternalTableRowSelectListener(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(!1),e.stopPropagation())}calciteInternalTableRowFocusEvent(e){let t=e.detail.cellPosition,a=e.detail.rowPosition,o=e.detail.destination,n=e.detail.lastCell,i=this.bodyRows?.filter(p=>!f(p)),s=this.allRows?.filter(p=>!f(p)),y=this.headRows[this.headRows.length-1]?.positionAll,S=i[0]?.positionAll,C=i[i.length-1]?.positionAll,$=this.footRows[0]?.positionAll,M=s[s.length-1]?.positionAll,U=o==="next"&&a===y,B=o==="previous"&&a===$,L=o==="previous"&&a===S,N=o==="next"&&a===C,d;switch(o){case"first":d=0;break;case"last":d=M;break;case"next":d=U?S:N?$:a+1;break;case"previous":d=B?C:L?y:a-1;break}let v=this.allRows.find(p=>p.positionAll===d)?.cellCount,D=v&&t>v?v:t;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:D,rowPosition:d,destination:o,lastCell:n})}getSlottedRows(e){return e?e.assignedElements({flatten:!0}).filter(I):[]}observeTableContainer(){this.tableContainerResizeObserver?.disconnect();let e=this.tableContainerRef.value,t=this.tableEl;e&&this.tableContainerResizeObserver?.observe(e),t&&this.tableContainerResizeObserver?.observe(t)}scheduleTableContainerOverflowUpdate(){this.tableContainerOverflowAnimationFrame!==null&&cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=requestAnimationFrame(()=>{this.tableContainerOverflowAnimationFrame=null,this.updateTableContainerOverflow()})}applyHeaderRowPositionStyles(){this.clearStickyHeaderRowStyles();let e=this.headRows?.[0];e&&(e.style.setProperty("--calcite-internal-table-header-offset","0"),e.style.setProperty("--calcite-internal-table-header-z-index","2"),e.style.setProperty("--calcite-internal-table-header-row-position",this.stickyHeader?"sticky":"static"))}updateTableContainerOverflow(){let e=this.tableContainerRef.value;this.tableContainerHasOverflow=!!e&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value),t=this.getSlottedRows(this.tableBodySlotRef.value),a=this.getSlottedRows(this.tableFootSlotRef.value),o=[...e,...t,...a];e.forEach(i=>{let s=e.indexOf(i);i.rowType="head",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),t.forEach(i=>{let s=t.indexOf(i);i.rowType="body",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),a.forEach(i=>{let s=a.indexOf(i);i.rowType="foot",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),o.forEach(i=>{i.interactionMode=this.interactionMode,i.messages=this.messages,i.selectionMode=this.selectionMode,i.bodyRowCount=t?.length,i.positionAll=o?.indexOf(i),i.numbered=this.numbered,i.scale=this.scale,i.readCellContentsToAT=this.readCellContentsToAT,i.lastVisibleRow=o?.indexOf(i)===o.length-1});let n=e[0]?.cellCount||0;this.colCount=n,this.headRows=e,this.bodyRows=t,this.footRows=a,this.allRows=o,this.applyHeaderRowPositionStyles(),this.observeTableContainer(),this.scheduleTableContainerOverflowUpdate(),this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,t=this.bodyRows?.length||0,a=this.pageSize>0?Math.ceil(t/this.pageSize):1;if(a>0){let o=Math.min(Math.max(e,1),a);this.currentPage=o,this.pageStartRow=(o-1)*this.pageSize+1}this.paginateRows()}handlePaginationChange(){let e=this.paginationRef.value?.startItem;this.pageStartRow=e||1,this.currentPage=Math.ceil(this.pageStartRow/this.pageSize),this.calciteTablePageChange.emit(),this.updateRows()}paginateRows(){this.bodyRows?.forEach(e=>{let t=e.positionSection+1,a=t>=this.pageStartRow&&t<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!a&&!this.footRows.includes(e),e.lastVisibleRow=t===this.pageStartRow+this.pageSize-1||t===this.bodyRows.length})}async updateSelectedItems(e){let t=this.bodyRows?.filter(a=>a.selected);this._selectedItems=t,this.selectedCount=t?.length,this.allRows?.forEach(a=>{a.selectedRowCount=this.selectedCount,a.selectedRowCountLocalized=this.localizeNumber(this.selectedCount)}),e&&this.calciteTableSelect.emit()}handleDeselectAllRows(){this.bodyRows?.forEach(e=>{e.selected=!1}),this.updateSelectedItems(!0)}setSelectedItems(e){this.bodyRows?.forEach(t=>{e?.rowType==="head"?t.selected=this.selectedCount!==this.bodyRows?.length:t.selected=this.selectionMode==="multiple"||e===t?t.selected:!1}),this.updateSelectedItems(!0)}localizeNumber(e){return m.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},m.localize(e.toString())}renderSelectionArea(){let e=this._selectedItems?.filter(i=>f(i))?.length,t=this.localizeNumber(e?.toString()),o=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,n=`${t} ${this.messages.hiddenSelected}`;return r`<div class=${c(l.selectionArea)}><calcite-chip class=${c({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${o} .scale=${this.scale} .value=${o}>${o}</calcite-chip>${e>0&&r`<calcite-chip class=${c(l.selectionOutOfViewChip)} .icon=${E.hideEmpty} .label=${n} .scale=${this.scale} title=${n??x} .value=${n}>${t}</calcite-chip>`||""}${this.selectedCount>0&&r`<calcite-button class=${c(l.dismissButton)} .iconStart=${E.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${o} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${c(l.selectionActions)}><slot name=${w.selectionActions}></slot></div></div>`}renderPaginationArea(){return r`<div class=${c(l.paginationArea)}><calcite-pagination .groupSeparator=${this.groupSeparator} .numberingSystem=${this.numberingSystem} @calcitePaginationChange=${this.handlePaginationChange} .pageSize=${this.pageSize} .scale=${this.scale} .startItem=${this.pageStartRow} .totalItems=${this.bodyRows?.length} ${h(this.paginationRef)}></calcite-pagination></div>`}renderTHead(){return r`<thead><slot name=${w.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return r`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return r`<tfoot><slot name=${w.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return r`<div class=${c(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${c({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0,[l.tableContainerOverflow]:this.tableContainerHasOverflow})} ${h(this.tableContainerRef)}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":void 0} .ariaRowCount=${this.allRows?.length} class=${c({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&(this.tableEl=e,k(r`<caption class=${c(A.screenReaderText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e))})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};O("calcite-table",R);export{R as Table};
|
|
2
|
+
import{c as I}from"./4ZFQLQBB.js";import{a as F}from"./SBQGT5X3.js";import{a as P}from"./FDHY2TZA.js";import{k as m}from"./PRVIXJ7V.js";import"./JN6YLTUP.js";import{a as H}from"./6LHB5RGN.js";import"./TL56TNQ7.js";import{b as f}from"./VMHJHFFS.js";import"./YE5HVMTC.js";import"./GBLGTHFD.js";import{E as b,F as h,G as T,H as c,M as A,T as O,g as z,h as r,l as x,m as k,p as u}from"./MPGHVV7O.js";function _(){return navigator.userAgentData}function j(){if(!1)return"";let g=_();return g?.brands?g.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}var l={bordered:"bordered",striped:"striped",selectionArea:"selection-area",paginationArea:"pagination-area",container:"container",tableContainer:"table-container",tableContainerOverflow:"table-container--overflow",tableFixed:"table--fixed",selectionActions:"selection-actions",dismissButton:"dismiss-button",selectionChipActive:"selection-chip--active",selectionCountChip:"selection-chip",selectionOutOfViewChip:"selection-chip--out-of-view"},w={selectionActions:"selection-actions",tableHeader:"table-header",tableFooter:"table-footer"},E={hideEmpty:"hide-empty",clear:"x"},q=z`@charset "UTF-8";:host{display:flex;--calcite-internal-table-border-collapse: collapse}:host([scale=s]){--calcite-internal-table-cell-padding: .25rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size-relative-xs)}:host([scale=m]){--calcite-internal-table-cell-padding: .5rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-relative-base);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size-relative-sm)}:host(:is([scale=s],[scale=m])){--calcite-internal-table-selection-action-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=l]){--calcite-internal-table-selection-action-spacing: var(--calcite-theme-space-xs, var(--calcite-spacing-xs));--calcite-internal-table-cell-padding: 1rem;--calcite-internal-table-cell-font-size: var(--calcite-font-size-relative-md);--calcite-internal-table-cell-font-size-secondary: var(--calcite-font-size-relative-base)}:host([sticky-header]){--calcite-internal-table-border-collapse: separate;--calcite-internal-table-header-border-block-end-width: 0;--calcite-internal-table-sticky-header-border-shadow: inset 0 calc(-1 * var(--calcite-border-width-sm)) 0 0 var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}:host([sticky-header]) .table-container{position:relative}.container{display:flex;flex-direction:column;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-container-size-content-fluid)}.table-container{white-space:nowrap;line-height:var(--calcite-font-line-height-relative-tight);border:var(--calcite-border-width-sm) solid var(--calcite-table-border-color, var(--calcite-color-border-2));border-radius:var(--calcite-table-corner-radius, var(--calcite-theme-corner-radius-none, var(--calcite-corner-radius-sharp)));box-shadow:var(--calcite-table-shadow, var(--calcite-shadow-none));overflow:auto}.table-container--overflow{overscroll-behavior-y:none}table{border-collapse:var(--calcite-internal-table-border-collapse);border-spacing:0;inline-size:var(--calcite-container-size-content-fluid)}@-moz-document url-prefix(){table{border-collapse:separate;border-spacing:0}}.table--fixed{table-layout:fixed}.bordered ::slotted(calcite-table-row){--calcite-table-row-border-color: var(--calcite-table-border-color, var(--calcite-color-border-2))}.striped ::slotted(calcite-table-row:nth-child(2n+1)){--calcite-table-row-background-color: var( --calcite-table-row-background-color-striped, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)) )}.selection-actions{display:flex;flex-direction:row;gap:var(--calcite-internal-table-selection-action-spacing);margin-inline-start:auto}.selection-area{display:flex;flex-direction:row;align-items:center;padding-block:var(--calcite-internal-table-cell-padding)}.selection-area calcite-chip:last-of-type{margin-inline-end:var(--calcite-space-sm)}.selection-area calcite-chip:last-of-type:not(:first-of-type){margin-inline-start:var(--calcite-space-sm)}.selection-area calcite-button{margin-inline-end:var(--calcite-space-lg)}.selection-chip{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color)}.selection-chip.selection-chip--active{--calcite-chip-background-color: var(--calcite-table-selection-chip-background-color-selected);--calcite-chip-border-color: var(--calcite-table-selection-chip-border-color-selected);--calcite-chip-text-color: var(--calcite-table-selection-chip-text-color-selected)}.selection-chip--out-of-view{--calcite-chip-background-color: var(--calcite-table-selection-out-of-view-chip-background-color);--calcite-chip-border-color: var(--calcite-table-selection-out-of-view-chip-border-color);--calcite-chip-corner-radius: var(--calcite-table-selection-out-of-view-chip-corner-radius);--calcite-chip-shadow: var(--calcite-table-selection-out-of-view-chip-shadow);--calcite-chip-text-color: var(--calcite-table-selection-out-of-view-chip-text-color);--calcite-chip-icon-color: var(--calcite-table-selection-out-of-view-chip-icon-color)}.pagination-area{display:flex;flex-direction:row;inline-size:100%;justify-content:center;padding-block:var(--calcite-internal-table-cell-padding)}calcite-pagination{flex:1;justify-content:center;--calcite-pagination-color: var(--calcite-table-pagination-color);--calcite-pagination-color-hover: var(--calcite-table-pagination-color-hover);--calcite-pagination-color-border-hover: var(--calcite-table-pagination-color-border-hover);--calcite-pagination-color-border-active: var(--calcite-table-pagination-color-border-active);--calcite-pagination-background-color: var(--calcite-table-pagination-background-color);--calcite-pagination-icon-color-background-hover: var(--calcite-table-pagination-icon-color-background-hover)}.dismiss-button{margin-inline-end:var(--calcite-space-lg);--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color);--calcite-button-corner-radius: var(--calcite-table-selection-dismiss-button-corner-radius);--calcite-button-shadow: var(--calcite-table-selection-dismiss-button-shadow);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color)}.dismiss-button:hover{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-hover);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-hover);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-hover)}.dismiss-button:active{--calcite-button-background-color: var(--calcite-table-selection-dismiss-button-background-color-active);--calcite-button-border-color: var(--calcite-table-selection-dismiss-button-border-color-active);--calcite-button-text-color: var(--calcite-table-selection-dismiss-button-text-color-active)}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends T{constructor(){super(),this.allRows=[],this.bodyRows=[],this.footRows=[],this.headRows=[],this.paginationRef=b(),this.tableContainerRef=b(),this.tableEl=null,this.tableBodySlotRef=b(),this.tableFootSlotRef=b(),this.tableHeadSlotRef=b(),this.tableContainerOverflowAnimationFrame=null,this.tableContainerResizeObserver=P("resize",()=>this.scheduleTableContainerOverflowUpdate()),this.messages=H({blocking:!0}),this.colCount=0,this.pageStartRow=1,this.readCellContentsToAT=!1,this.selectedCount=0,this.tableContainerHasOverflow=!1,this._selectedItems=[],this.bordered=!1,this.currentPage=0,this.groupSeparator=!1,this.interactionMode="interactive",this.layout="auto",this.numbered=!1,this.pageSize=0,this.scale="m",this.selectionDisplay="top",this.selectionMode="none",this.striped=!1,this.stickyHeader=!1,this.calciteInternalTableRowFocusChange=u({cancelable:!1}),this.calciteTablePageChange=u({cancelable:!1}),this.calciteTableSelect=u({cancelable:!1}),this.listen("calciteTableRowSelect",this.calciteTableRowSelectListener),this.listen("calciteInternalTableRowSelect",this.calciteInternalTableRowSelectListener),this.listen("calciteInternalTableRowFocusRequest",this.calciteInternalTableRowFocusEvent)}static{this.properties={colCount:[16,{},{state:!0}],pageStartRow:[16,{},{state:!0}],readCellContentsToAT:[16,{},{state:!0}],selectedCount:[16,{},{state:!0}],tableContainerHasOverflow:[16,{},{state:!0}],_selectedItems:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],caption:1,currentPage:[11,{},{reflect:!0,type:Number}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],interactionMode:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],pageSize:[11,{},{reflect:!0,type:Number}],scale:[3,{},{reflect:!0}],selectedItems:[32,{},{attribute:!1,readOnly:!0}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],striped:[7,{},{reflect:!0,type:Boolean}],stickyHeader:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[q,F]}get selectedItems(){return this._selectedItems}async load(){this.readCellContentsToAT=/safari/i.test(j()),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}disconnectedCallback(){super.disconnectedCallback(),this.tableContainerOverflowAnimationFrame!==null&&(cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=null),this.tableContainerResizeObserver?.disconnect()}updated(e){e.has("messages")&&this.allRows.forEach(t=>{t.messages=this.messages})}willUpdate(e){(e.has("groupSeparator")&&(this.hasUpdated||this.groupSeparator!==!1)||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("numberingSystem")||e.has("pageSize")&&(this.hasUpdated||this.pageSize!==0)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("currentPage")&&(this.hasUpdated||this.currentPage>1)&&this.pageSize>0)&&this.updateRows(),e.has("stickyHeader")&&(this.hasUpdated||this.stickyHeader!==!1)&&(this.allRows?.forEach(t=>{t.stickyHeaderEnabled=this.stickyHeader}),this.stickyHeader?this.applyHeaderRowPositionStyles():this.resetStickyHeaderState())}handleSlotChange(){this.updateRows()}clearStickyHeaderRowStyles(){this.headRows?.forEach(e=>{e.style.removeProperty("--calcite-internal-table-header-offset"),e.style.removeProperty("--calcite-internal-table-header-z-index"),e.style.removeProperty("--calcite-internal-table-header-row-position")})}resetStickyHeaderState(){this.clearStickyHeaderRowStyles()}calciteTableRowSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(e.target)}calciteInternalTableRowSelectListener(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(!1),e.stopPropagation())}calciteInternalTableRowFocusEvent(e){let t=e.detail.cellPosition,a=e.detail.rowPosition,o=e.detail.destination,n=e.detail.lastCell,i=this.bodyRows?.filter(p=>!f(p)),s=this.allRows?.filter(p=>!f(p)),y=this.headRows[this.headRows.length-1]?.positionAll,S=i[0]?.positionAll,C=i[i.length-1]?.positionAll,$=this.footRows[0]?.positionAll,M=s[s.length-1]?.positionAll,U=o==="next"&&a===y,B=o==="previous"&&a===$,L=o==="previous"&&a===S,N=o==="next"&&a===C,d;switch(o){case"first":d=0;break;case"last":d=M;break;case"next":d=U?S:N?$:a+1;break;case"previous":d=B?C:L?y:a-1;break}let v=this.allRows.find(p=>p.positionAll===d)?.cellCount,D=v&&t>v?v:t;d!==void 0&&this.calciteInternalTableRowFocusChange.emit({cellPosition:D,rowPosition:d,destination:o,lastCell:n})}getSlottedRows(e){return e?e.assignedElements({flatten:!0}).filter(I):[]}observeTableContainer(){this.tableContainerResizeObserver?.disconnect();let e=this.tableContainerRef.value,t=this.tableEl;e&&this.tableContainerResizeObserver?.observe(e),t&&this.tableContainerResizeObserver?.observe(t)}scheduleTableContainerOverflowUpdate(){this.tableContainerOverflowAnimationFrame!==null&&cancelAnimationFrame(this.tableContainerOverflowAnimationFrame),this.tableContainerOverflowAnimationFrame=requestAnimationFrame(()=>{this.tableContainerOverflowAnimationFrame=null,this.updateTableContainerOverflow()})}applyHeaderRowPositionStyles(){this.clearStickyHeaderRowStyles();let e=this.headRows?.[0];e&&(e.style.setProperty("--calcite-internal-table-header-offset","0"),e.style.setProperty("--calcite-internal-table-header-z-index","2"),e.style.setProperty("--calcite-internal-table-header-row-position",this.stickyHeader?"sticky":"static"))}updateTableContainerOverflow(){let e=this.tableContainerRef.value;this.tableContainerHasOverflow=!!e&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}updateRows(){let e=this.getSlottedRows(this.tableHeadSlotRef.value),t=this.getSlottedRows(this.tableBodySlotRef.value),a=this.getSlottedRows(this.tableFootSlotRef.value),o=[...e,...t,...a];e.forEach(i=>{let s=e.indexOf(i);i.rowType="head",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),t.forEach(i=>{let s=t.indexOf(i);i.rowType="body",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),a.forEach(i=>{let s=a.indexOf(i);i.rowType="foot",i.positionSection=s,i.positionSectionLocalized=this.localizeNumber((s+1).toString())}),o.forEach(i=>{i.interactionMode=this.interactionMode,i.messages=this.messages,i.selectionMode=this.selectionMode,i.bodyRowCount=t?.length,i.positionAll=o?.indexOf(i),i.numbered=this.numbered,i.scale=this.scale,i.readCellContentsToAT=this.readCellContentsToAT,i.lastVisibleRow=o?.indexOf(i)===o.length-1});let n=e[0]?.cellCount||0;this.colCount=n,this.headRows=e,this.bodyRows=t,this.footRows=a,this.allRows=o,this.applyHeaderRowPositionStyles(),this.observeTableContainer(),this.scheduleTableContainerOverflowUpdate(),this.handleCurrentPageRange(),this.updateSelectedItems()}handleCurrentPageRange(){let e=this.currentPage,t=this.bodyRows?.length||0,a=this.pageSize>0?Math.ceil(t/this.pageSize):1;if(a>0){let o=Math.min(Math.max(e,1),a);this.currentPage=o,this.pageStartRow=(o-1)*this.pageSize+1}this.paginateRows()}handlePaginationChange(){let e=this.paginationRef.value?.startItem;this.pageStartRow=e||1,this.currentPage=Math.ceil(this.pageStartRow/this.pageSize),this.calciteTablePageChange.emit(),this.updateRows()}paginateRows(){this.bodyRows?.forEach(e=>{let t=e.positionSection+1,a=t>=this.pageStartRow&&t<this.pageStartRow+this.pageSize;e.itemHidden=this.pageSize>0&&!a&&!this.footRows.includes(e),e.lastVisibleRow=t===this.pageStartRow+this.pageSize-1||t===this.bodyRows.length})}async updateSelectedItems(e){let t=this.bodyRows?.filter(a=>a.selected);this._selectedItems=t,this.selectedCount=t?.length,this.allRows?.forEach(a=>{a.selectedRowCount=this.selectedCount,a.selectedRowCountLocalized=this.localizeNumber(this.selectedCount)}),e&&this.calciteTableSelect.emit()}handleDeselectAllRows(){this.bodyRows?.forEach(e=>{e.selected=!1}),this.updateSelectedItems(!0)}setSelectedItems(e){this.bodyRows?.forEach(t=>{e?.rowType==="head"?t.selected=this.selectedCount!==this.bodyRows?.length:t.selected=this.selectionMode==="multiple"||e===t?t.selected:!1}),this.updateSelectedItems(!0)}localizeNumber(e){return m.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},m.localize(e.toString())}renderSelectionArea(){let e=this._selectedItems?.filter(i=>f(i))?.length,t=this.localizeNumber(e?.toString()),o=`${this.localizeNumber(this.selectedCount?.toString())} ${this.messages.selected}`,n=`${t} ${this.messages.hiddenSelected}`;return r`<div class=${c(l.selectionArea)}><calcite-chip class=${c({[l.selectionCountChip]:!0,[l.selectionChipActive]:this.selectedCount>0})} .kind=${this.selectedCount>0?"brand":"neutral"} .label=${o} .scale=${this.scale} .value=${o}>${o}</calcite-chip>${e>0&&r`<calcite-chip class=${c(l.selectionOutOfViewChip)} .icon=${E.hideEmpty} .label=${n} .scale=${this.scale} title=${n??x} .value=${n}>${t}</calcite-chip>`||""}${this.selectedCount>0&&r`<calcite-button class=${c(l.dismissButton)} .iconStart=${E.clear} kind=neutral @click=${this.handleDeselectAllRows} round .scale=${this.scale} .title=${`${this.messages.clear} ${o} ${this.messages.row}`}>${this.messages.clear}</calcite-button>`||""}<div class=${c(l.selectionActions)}><slot name=${w.selectionActions}></slot></div></div>`}renderPaginationArea(){return r`<div class=${c(l.paginationArea)}><calcite-pagination .groupSeparator=${this.groupSeparator} .numberingSystem=${this.numberingSystem} @calcitePaginationChange=${this.handlePaginationChange} .pageSize=${this.pageSize} .scale=${this.scale} .startItem=${this.pageStartRow} .totalItems=${this.bodyRows?.length} ${h(this.paginationRef)}></calcite-pagination></div>`}renderTHead(){return r`<thead><slot name=${w.tableHeader} ${h(this.tableHeadSlotRef)}></slot></thead>`}renderTBody(){return r`<tbody><slot ${h(this.tableBodySlotRef)}></slot></tbody>`}renderTFoot(){return r`<tfoot><slot name=${w.tableFooter} ${h(this.tableFootSlotRef)}></slot></tfoot>`}render(){return r`<div class=${c(l.container)}>${this.selectionMode!=="none"&&this.selectionDisplay!=="none"&&this.renderSelectionArea()||""}<div class=${c({[l.bordered]:this.bordered,[l.striped]:this.striped,[l.tableContainer]:!0,[l.tableContainerOverflow]:this.tableContainerHasOverflow})} ${h(this.tableContainerRef)}><table .ariaColCount=${this.colCount} .ariaMultiSelectable=${this.selectionMode==="multiple"?"true":void 0} .ariaRowCount=${this.allRows?.length} class=${c({[l.tableFixed]:this.layout==="fixed"})} .role=${this.interactionMode==="interactive"?"grid":"table"} ${h(e=>{e&&(this.tableEl=e,k(r`<caption class=${c(A.screenReaderText)}>${this.caption}</caption>${this.renderTHead()}${this.renderTBody()}${this.renderTFoot()}`,e))})}></table></div>${this.pageSize>0&&this.renderPaginationArea()||""}</div>`}};O("calcite-table",R);export{R as Table};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as C}from"./
|
|
2
|
+
import{b as C}from"./YE5HVMTC.js";import{G as g,l as h,m as v}from"./W77STZAT.js";var W=C((e,t)=>{t.onConnected(()=>{L(e)}),t.onDisconnected(()=>{O(e)})}),w="calciteInternalLabelClick",E="calciteInternalLabelConnected",f="calciteInternalLabelDisconnected",k="calcite-label",i=new WeakMap,r=new WeakMap,c=new WeakMap,o=new WeakMap,s=new Set,D=e=>{let{id:t}=e,l=t&&h(e,{selector:`${k}[for="${t}"]`});if(l)return l;let a=v(e,k);return!a||M(a,e)?null:a};function M(e,t){let l,a="custom-element-ancestor-check",d=(n=>{n.stopImmediatePropagation();let u=n.composedPath();l=u.slice(u.indexOf(t),u.indexOf(e))});return e.addEventListener(a,d,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,d),l.filter(n=>n!==t&&n!==e).filter(n=>n.tagName?.includes("-")).length>0}function L(e){if(!e)return;let t=D(e.el);if(t&&r.has(t)&&t===e.labelEl||!t&&s.has(e))return;let l=T.bind(e);if(t){e.labelEl=t;let a=i.get(t)||[];a.push(e),i.set(t,a.sort(y)),r.has(e.labelEl)||(r.set(e.labelEl,m),e.labelEl.addEventListener(w,m)),s.delete(e),document.removeEventListener(E,c.get(e)),o.set(e,l),document.addEventListener(f,l)}else s.has(e)||(l(),document.removeEventListener(f,o.get(e)))}function O(e){if(!e||(s.delete(e),document.removeEventListener(E,c.get(e)),document.removeEventListener(f,o.get(e)),c.delete(e),o.delete(e),!e.labelEl))return;let t=i.get(e.labelEl);t.length===1&&(e.labelEl.removeEventListener(w,r.get(e.labelEl)),r.delete(e.labelEl)),i.set(e.labelEl,t.filter(l=>l!==e).sort(y)),e.labelEl=void 0}function y(e,t){return g(e.el,t.el)?-1:1}function m(e){let t=e.detail.sourceEvent.target,l=i.get(this),a=l.find(n=>n.el===t);if(a&&l.includes(a))return;let b=l[0];b.disabled||b.onLabelClick(e)}function I(){s.has(this)&&L(this)}function T(){s.add(this);let e=c.get(this)||I.bind(this);c.set(this,e),document.addEventListener(E,e)}async function q(e){if(await e.componentOnReady(),i.has(e))return;let l=e.for&&e.ownerDocument?.getElementById(e.for);l&&requestAnimationFrame(()=>{for(let a of s)if(a.el===l){L(a);break}})}export{W as a,E as b,f as c,q as d};
|