@esri/calcite-components 5.1.0-next.43 → 5.1.0-next.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/cdn/{LMBRHECU.js → 2CUW6SVU.js} +1 -1
  2. package/dist/cdn/{IQCRJABI.js → 2Q3FDO3O.js} +1 -1
  3. package/dist/cdn/{J6E2YQ2Y.js → 2RHWA4LK.js} +1 -1
  4. package/dist/cdn/{L2S4PCK6.js → 3IT2UDER.js} +1 -1
  5. package/dist/cdn/{ZFQIX6UA.js → 437Z4DGO.js} +1 -1
  6. package/dist/cdn/{VNVUBN26.js → 4L26OPTQ.js} +1 -1
  7. package/dist/cdn/{ZMI2A2ER.js → 4RISXHDQ.js} +1 -1
  8. package/dist/cdn/{WXL4CDTV.js → 4RVGHVAH.js} +1 -1
  9. package/dist/cdn/{L5KBXV6Y.js → 4UUEKTY6.js} +1 -1
  10. package/dist/cdn/{24GPNKV7.js → 5BWQ6FCI.js} +1 -1
  11. package/dist/cdn/{JNABQYBK.js → 5DUIUSD4.js} +1 -1
  12. package/dist/cdn/{3VTZNCUO.js → 5GRSM5NK.js} +1 -1
  13. package/dist/cdn/{2BB53E36.js → 5ZXZ2AZ5.js} +1 -1
  14. package/dist/cdn/{A45SZDQV.js → 63C6E7P2.js} +1 -1
  15. package/dist/cdn/{3HGJACZB.js → 63Q6MJSO.js} +1 -1
  16. package/dist/cdn/{DNOXMQDS.js → 6G4H6ZSG.js} +1 -1
  17. package/dist/cdn/{7MX6K7I6.js → 6HV6NM3H.js} +1 -1
  18. package/dist/cdn/{5BUR7I6A.js → 6WBV6QA5.js} +1 -1
  19. package/dist/cdn/{NEDMRCOF.js → 6XCMWDXL.js} +1 -1
  20. package/dist/cdn/{555SDRUZ.js → 7DS6EOBS.js} +1 -1
  21. package/dist/cdn/{2RICINDY.js → AC7F4FLS.js} +1 -1
  22. package/dist/cdn/{VYNP23UO.js → B7LXG6P4.js} +1 -1
  23. package/dist/cdn/{GEXBHRBO.js → BGSPDXNV.js} +1 -1
  24. package/dist/cdn/{GQGPEPRZ.js → BKQLR2AD.js} +1 -1
  25. package/dist/cdn/{BYKYE7CW.js → BO7LMIWD.js} +1 -1
  26. package/dist/cdn/{DKXGE3CW.js → BTUBFZMZ.js} +1 -1
  27. package/dist/cdn/{7L5PN44P.js → BUEHQXFW.js} +1 -1
  28. package/dist/cdn/{WQPHWUXI.js → CI3X5SUP.js} +1 -1
  29. package/dist/cdn/{MDHWIWT5.js → CL3QBCWQ.js} +1 -1
  30. package/dist/cdn/{4NZGIFOM.js → COILRLRR.js} +1 -1
  31. package/dist/cdn/{4NYITE75.js → CRIZUXS5.js} +1 -1
  32. package/dist/cdn/{DMB3J5AA.js → CXCZS4UL.js} +1 -1
  33. package/dist/cdn/{3SITVGTE.js → DBFO4FYK.js} +1 -1
  34. package/dist/cdn/{R2MDKHXD.js → DXXITGPA.js} +1 -1
  35. package/dist/cdn/{TMTITIYU.js → EHTAKCBT.js} +1 -1
  36. package/dist/cdn/{ZNY5I77U.js → EJ3YAHEF.js} +1 -1
  37. package/dist/cdn/{LDY5MXXT.js → EZNQLVJI.js} +1 -1
  38. package/dist/cdn/{LX4PMP3X.js → FAO7C3JZ.js} +1 -1
  39. package/dist/cdn/{ZXRGCNES.js → FWSAYX7I.js} +1 -1
  40. package/dist/cdn/{IRRSSLTA.js → FZO3ZMEF.js} +1 -1
  41. package/dist/cdn/{RMBCP4P6.js → GJ7W74HI.js} +1 -1
  42. package/dist/cdn/{YVDXSNF7.js → GS3UCA7F.js} +1 -1
  43. package/dist/cdn/{7S5HZRYB.js → GUIHI3BV.js} +1 -1
  44. package/dist/cdn/{WN6ABOQ2.js → H5TBQCW7.js} +1 -1
  45. package/dist/cdn/{PG3YI3LJ.js → HDZ4UEAD.js} +1 -1
  46. package/dist/cdn/{KFED2RWY.js → HFWC5L6L.js} +1 -1
  47. package/dist/cdn/{Z72HN4IE.js → HMSWFUBJ.js} +1 -1
  48. package/dist/cdn/HV5WXCUR.js +4 -0
  49. package/dist/cdn/{AIMJAYF5.js → HY2CJOFB.js} +1 -1
  50. package/dist/cdn/{VOLITLZQ.js → IE7F4MCU.js} +1 -1
  51. package/dist/cdn/{JFCOTF4X.js → IJ6FNT5M.js} +1 -1
  52. package/dist/cdn/{RMQMFLJJ.js → IJBYXHVY.js} +1 -1
  53. package/dist/cdn/{AP2ELCOL.js → IKGQDME6.js} +1 -1
  54. package/dist/cdn/{B5BJEF6W.js → IPM4QVYT.js} +1 -1
  55. package/dist/cdn/{RVK7AGJY.js → IQTVLPAV.js} +1 -1
  56. package/dist/cdn/{O5QY4PM5.js → JAENSPF6.js} +1 -1
  57. package/dist/cdn/{5RPSB6JK.js → JEENJP36.js} +1 -1
  58. package/dist/cdn/{VHPBKL2E.js → JESAMKYH.js} +1 -1
  59. package/dist/cdn/{MPQHQY2O.js → JP6KG2GJ.js} +1 -1
  60. package/dist/cdn/{ZV5MIE6S.js → JQUSJNDG.js} +1 -1
  61. package/dist/cdn/{CQEZT7CQ.js → JTKFGT4G.js} +1 -1
  62. package/dist/cdn/{XQOIEFK4.js → K3635UG6.js} +1 -1
  63. package/dist/cdn/{QC6TIX3T.js → KRD5C6LV.js} +1 -1
  64. package/dist/cdn/{YU5BN3HW.js → KWJN7BVY.js} +1 -1
  65. package/dist/cdn/{6BGGPXMX.js → L467PTZK.js} +1 -1
  66. package/dist/cdn/{B2LLJTRB.js → LJUN3ZYA.js} +1 -1
  67. package/dist/cdn/{U36XLIJO.js → LLCQTFCY.js} +1 -1
  68. package/dist/cdn/{BQNPOOMS.js → LS2PO7F3.js} +1 -1
  69. package/dist/cdn/{WKISVZXP.js → MK3U3JKC.js} +1 -1
  70. package/dist/cdn/{UUEBQ77O.js → MMHRNEUB.js} +1 -1
  71. package/dist/cdn/{HJBXD2RY.js → MP4YHUFX.js} +1 -1
  72. package/dist/cdn/{PYCAWNDZ.js → MQXWWFWL.js} +1 -1
  73. package/dist/cdn/NFSOZ2HG.js +2 -0
  74. package/dist/cdn/{ATBTFTHL.js → NYNHXURV.js} +1 -1
  75. package/dist/cdn/{5SLE5OTV.js → OICRMLHL.js} +1 -1
  76. package/dist/cdn/{EKDWQZ2F.js → OLY26YYG.js} +1 -1
  77. package/dist/cdn/{R7TTHQY6.js → OQ44KHDI.js} +1 -1
  78. package/dist/cdn/{A6VHKAIA.js → OWTUIHHK.js} +1 -1
  79. package/dist/cdn/{INLGIRKT.js → P56DFFWS.js} +1 -1
  80. package/dist/cdn/{GLWYDOXQ.js → PCRY4SDG.js} +1 -1
  81. package/dist/cdn/{5XSD4F2U.js → PNQYAJKD.js} +1 -1
  82. package/dist/cdn/{O2H6HNOD.js → PNRDC5FL.js} +1 -1
  83. package/dist/cdn/{HWI7HSYY.js → PSSYLN5H.js} +1 -1
  84. package/dist/cdn/{QJGDW4A3.js → PSWMMAXH.js} +1 -1
  85. package/dist/cdn/{SLPX32KY.js → PSXVEGZF.js} +1 -1
  86. package/dist/cdn/{MC7VIWBS.js → PZWBMV4V.js} +1 -1
  87. package/dist/cdn/{7A2PGF7W.js → Q23UYGG4.js} +1 -1
  88. package/dist/cdn/{H3ZT7OKY.js → Q2IPANQM.js} +1 -1
  89. package/dist/cdn/{L43RMTAP.js → Q47DXAH2.js} +1 -1
  90. package/dist/cdn/{KUPS36J3.js → Q624L2G5.js} +1 -1
  91. package/dist/cdn/{KAPFLKLZ.js → QHYWK37R.js} +1 -1
  92. package/dist/cdn/{ZYUBA3AR.js → QKSXNG7X.js} +1 -1
  93. package/dist/cdn/{Z6W2R7TV.js → QNAY3CT6.js} +1 -1
  94. package/dist/cdn/{QHGI7X2A.js → QZOFR4RG.js} +1 -1
  95. package/dist/cdn/{LFXHGOMV.js → R5PSADRO.js} +1 -1
  96. package/dist/cdn/{WDH6SQXQ.js → RCKKZWUV.js} +1 -1
  97. package/dist/cdn/{5XHCDQFZ.js → RGDL46ZL.js} +1 -1
  98. package/dist/cdn/{VJM5IWD3.js → RISZAKI3.js} +1 -1
  99. package/dist/cdn/{DICEHD76.js → RQ5D7JEX.js} +1 -1
  100. package/dist/cdn/{DCG527KT.js → RTE3F4BJ.js} +1 -1
  101. package/dist/cdn/{A6MVMCXA.js → SN5MB356.js} +1 -1
  102. package/dist/cdn/{TKZ7DC2I.js → SOVE3ZOA.js} +1 -1
  103. package/dist/cdn/{7CO2P5IJ.js → SYN7K75A.js} +1 -1
  104. package/dist/cdn/{6S5EWY5E.js → TF5B3J57.js} +1 -1
  105. package/dist/cdn/{X7IZ6MVC.js → TGYGLTUZ.js} +1 -1
  106. package/dist/cdn/{XBC2NZ37.js → TI5NDBVM.js} +1 -1
  107. package/dist/cdn/{VAZMO2Z7.js → TNXW7AEV.js} +1 -1
  108. package/dist/cdn/{ZEEKQWVY.js → TQPSWTJT.js} +1 -1
  109. package/dist/cdn/{J35AD3PZ.js → TSPOULLO.js} +1 -1
  110. package/dist/cdn/{XXUEJ7P4.js → TVFF5BW6.js} +1 -1
  111. package/dist/cdn/{IKKIGQHK.js → TWXXLOEA.js} +1 -1
  112. package/dist/cdn/{LYY5PKKO.js → U4MTKQJV.js} +1 -1
  113. package/dist/cdn/{3UY2ASYF.js → URIX3IB2.js} +1 -1
  114. package/dist/cdn/{WZFVGOB6.js → UWO4JZZH.js} +1 -1
  115. package/dist/cdn/{Z3LUJ6AB.js → V6GUDGYG.js} +1 -1
  116. package/dist/cdn/{YGWAEV4M.js → V7JISHYK.js} +1 -1
  117. package/dist/cdn/{V2GF3JT4.js → VCJIPATY.js} +1 -1
  118. package/dist/cdn/{HAOWQAZA.js → VE2SY3NU.js} +1 -1
  119. package/dist/cdn/{PZTXPQU2.js → VHK3JMNS.js} +1 -1
  120. package/dist/cdn/{K3G7H6HP.js → VNR4RRJB.js} +1 -1
  121. package/dist/cdn/{NN5QIMEH.js → VOBUQWID.js} +1 -1
  122. package/dist/cdn/{VKKNNVSC.js → VUDMYZCP.js} +1 -1
  123. package/dist/cdn/{AVNNKHNX.js → VWX3UX7Q.js} +1 -1
  124. package/dist/cdn/{LPKNS5AG.js → VYEDSQAV.js} +1 -1
  125. package/dist/cdn/{JTFUSPQO.js → W4LSPOQH.js} +1 -1
  126. package/dist/cdn/{DPOTI7IX.js → WMMDDESG.js} +1 -1
  127. package/dist/cdn/{KYPH442R.js → WW6MXNHB.js} +1 -1
  128. package/dist/cdn/{TM5CULPA.js → WYZ2NRQC.js} +1 -1
  129. package/dist/cdn/{SFTGKQSB.js → X2YVGXOR.js} +1 -1
  130. package/dist/cdn/{GK4OCOP2.js → XJTP3YA2.js} +1 -1
  131. package/dist/cdn/{UPPM5CEL.js → XLVMVXPQ.js} +1 -1
  132. package/dist/cdn/{7VJGRTI2.js → XSH2B7JO.js} +1 -1
  133. package/dist/cdn/{Q4P6Z6E5.js → XZWWOTIE.js} +1 -1
  134. package/dist/cdn/{D2P3RJ55.js → YEFJK6GB.js} +1 -1
  135. package/dist/cdn/YINW32VB.js +2 -0
  136. package/dist/cdn/{VHR5TDB3.js → YSWGRIK3.js} +1 -1
  137. package/dist/cdn/{JAIZ2T5E.js → YWSDLKEM.js} +1 -1
  138. package/dist/cdn/{TN4GX3CY.js → YY6WQEZD.js} +1 -1
  139. package/dist/cdn/{64ZTPB46.js → ZBY2YI72.js} +1 -1
  140. package/dist/cdn/{VKDMNBGB.js → ZCD56OLL.js} +1 -1
  141. package/dist/cdn/{SCCN3HH6.js → ZMSMDBV4.js} +1 -1
  142. package/dist/cdn/{PQJAXQQE.js → ZNYS4SM3.js} +1 -1
  143. package/dist/cdn/{GP7XSV5A.js → ZXPMERYO.js} +1 -1
  144. package/dist/cdn/assets/combobox/t9n/messages.fr.json +1 -1
  145. package/dist/cdn/index.js +1 -1
  146. package/dist/chunks/runtime.js +4 -4
  147. package/dist/chunks/useFocusTrap.js +4 -4
  148. package/dist/chunks/useForm.js +34 -4
  149. package/dist/components/calcite-card/customElement.d.ts +1 -1
  150. package/dist/components/calcite-card-group/customElement.d.ts +1 -1
  151. package/dist/components/calcite-flow-item/customElement.d.ts +2 -1
  152. package/dist/components/calcite-flow-item/customElement.js +2 -2
  153. package/dist/components/calcite-list/customElement.js +4 -4
  154. package/dist/components/calcite-radio-button/customElement.d.ts +15 -0
  155. package/dist/components/calcite-radio-button/customElement.js +11 -187
  156. package/dist/docs/api.json +1 -1
  157. package/dist/docs/docs.json +1 -1
  158. package/dist/docs/translations.json +1 -1
  159. package/dist/docs/vscode.html-custom-data.json +1 -1
  160. package/dist/docs/web-types.json +1 -1
  161. package/dist/loader.js +1 -1
  162. package/package.json +2 -2
  163. package/dist/cdn/HBJF6FOJ.js +0 -2
  164. package/dist/cdn/JMN7KYK5.js +0 -2
  165. package/dist/cdn/SVKOELUR.js +0 -4
package/dist/loader.js CHANGED
@@ -73,7 +73,7 @@ const defineCustomElements = makeDefineCustomElements(runtime, {
73
73
  "calcite-panel": [() => import("./components/calcite-panel/customElement.js"), "beforeClose:,closable,closed,collapsed,collapseDirection,collapsible,description,disabled,heading,headingLevel,icon,iconFlipRtl,loading,menuFlipPlacements:,menuOpen,menuPlacement,messageOverrides:,overlayPositioning,scale,topLayerDisabled;scrollContentTo,setFocus"],
74
74
  "calcite-popover": [() => import("./components/calcite-popover/customElement.js"), "autoClose,closable,flipDisabled,flipPlacements:,focusTrapDisabled,focusTrapOptions:,heading,headingLevel,label,messageOverrides:,offsetDistance,offsetSkidding,open,overlayPositioning,placement,pointerDisabled,referenceElement,scale,topLayerDisabled,triggerDisabled;reposition,setFocus,updateFocusTrapElements"],
75
75
  "calcite-progress": [() => import("./components/calcite-progress/customElement.js"), "label,reversed,text,type,value"],
76
- "calcite-radio-button": [() => import("./components/calcite-radio-button/customElement.js"), "checked,disabled,focused,form,hovered,label,labelText,name,required,scale,value;emitCheckedChange,setFocus"],
76
+ "calcite-radio-button": [() => import("./components/calcite-radio-button/customElement.js"), "checked,disabled,focused,form,hovered,label,labelText,name,required,scale,validity:,value;emitCheckedChange,setFocus,setValidity", 1],
77
77
  "calcite-radio-button-group": [() => import("./components/calcite-radio-button-group/customElement.js"), "disabled,labelText,layout,messageOverrides:,name,required,scale,selectedItem:,status,validationIcon,validationMessage;setFocus"],
78
78
  "calcite-rating": [() => import("./components/calcite-rating/customElement.js"), "average,count,disabled,form,labelText,messageOverrides:,name,readOnly,required,scale,showChip,status,validationIcon,validationMessage,validity:,value;setFocus", 1],
79
79
  "calcite-scrim": [() => import("./components/calcite-scrim/customElement.js"), "loading,messageOverrides:"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/calcite-components",
3
- "version": "5.1.0-next.43",
3
+ "version": "5.1.0-next.45",
4
4
  "description": "Web Components for Esri's Calcite Design System.",
5
5
  "homepage": "https://developers.arcgis.com/calcite-design-system/",
6
6
  "repository": {
@@ -108,5 +108,5 @@
108
108
  "dist/docs/vscode.html-custom-data.json"
109
109
  ],
110
110
  "web-types": "dist/docs/web-types.json",
111
- "gitHead": "2e082b63a10396805813e077efdfac5d61af7a41"
111
+ "gitHead": "bf67efde41c9cf3fe2678ad6b9f678eb040993c3"
112
112
  }
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as T}from"./Q4P6Z6E5.js";import{c as q,d as H,e as O}from"./GP7XSV5A.js";import{a as S}from"./5XHCDQFZ.js";import{a as v}from"./YSDXNIIL.js";import{a as L}from"./Z6W2R7TV.js";import"./RH6ZIP65.js";import{e as z}from"./SLPX32KY.js";import"./RVK7AGJY.js";import{i as A,j as b}from"./QHGI7X2A.js";import"./OAOQ5BXS.js";import{E as B,F as R,G as F,H as p,S as E,g as w,h as m,l as C,p as f}from"./WDH6SQXQ.js";var g="hidden-form-input";function y(i){return"checked"in i}var k=new WeakMap,I=new WeakSet;function P(i,e){if(b(e.parentElement,"[form]"))return!0;let t="calciteInternalFormComponentRegister",o=!1;return i.addEventListener(t,r=>{o=r.composedPath().some(n=>I.has(n)),r.stopPropagation()},{once:!0}),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0})),o}function V(i){return i.nodeName==="CALCITE-RADIO-BUTTON"?b(i,"calcite-radio-button-group"):i}function W(i){let{el:e,value:a}=i,t=K(i);if(!t||P(t,e))return;i.formEl=t,i.defaultValue=a,y(i)&&(i.defaultChecked=i.checked);let o=j.bind(i);t.addEventListener("reset",o),k.set(i.el,o),I.add(e)}function K(i){let{el:e,form:a}=i;return a?A(e,{id:a}):b(e,"form")}function j(){if("status"in this&&(this.status="idle"),"validationIcon"in this&&(this.validationIcon=!1),"validationMessage"in this&&(this.validationMessage=""),y(this)){this.checked=this.defaultChecked;return}this.value=this.defaultValue,this.onFormReset?.()}function J(i){let{el:e,formEl:a}=i;if(!a)return;let t=k.get(e);a.removeEventListener("reset",t),k.delete(e),i.formEl=null,I.delete(e)}var Q="calciteInternalHiddenInputInput",G=i=>{i.target.dispatchEvent(new CustomEvent(Q,{bubbles:!0}))},N=i=>i.removeEventListener("input",G);function X(i){let{el:e,formEl:a,name:t,value:o}=i,{ownerDocument:r}=e;if(!1)return;let n=e.querySelectorAll(`input[slot="${g}"]`);if(!a||!t){n.forEach(s=>{N(s),s.remove()});return}let d=Array.isArray(o)?o:[o],l=[],h=new Set;n.forEach(s=>{let c=d.find(U=>U==s.value);c!=null?(h.add(c),D(i,s,c)):l.push(s)});let u;d.forEach(s=>{if(h.has(s))return;let c=l.pop();c||(c=r.createElement("input"),c.ariaHidden="true",c.slot=g),u||(u=r.createDocumentFragment()),u.append(c),c.addEventListener("input",G),D(i,c,s)}),u&&e.append(u),l.forEach(s=>{N(s),s.remove()})}function D(i,e,a){let{defaultValue:t,disabled:o,form:r,name:n,required:d}=i;e.defaultValue=t,e.disabled=o,e.name=n,e.required=d,e.tabIndex=-1,r?e.setAttribute("form",r):e.removeAttribute("form"),y(i)?(e.checked=i.checked,e.defaultChecked=i.defaultChecked,e.value=i.checked?a||"on":""):e.value=a||"",i.syncHiddenFormInput?.(e);let l=V(i.el);if(l&&"validity"in l)for(let h in{...e?.validity})l.validity[h]=e.validity[h]}var Y=({component:i})=>(X(i),m`<slot name=${g}></slot>`),$={container:"container",radio:"radio"},Z=w`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;outline-color:transparent;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;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{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-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md))}:host([scale=m]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md-plus))}:host([scale=l]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-lg))}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.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-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-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,x=class extends F{constructor(){super(),this.containerRef=B(),this.direction=z(),this.focusSetter=L()(this),this.interactiveContainer=S(this),this.checked=!1,this.disabled=!1,this.focused=!1,this.hovered=!1,this.required=!1,this.scale="m",this.calciteInternalRadioButtonBlur=f({cancelable:!1}),this.calciteInternalRadioButtonCheckedChange=f({cancelable:!1}),this.calciteInternalRadioButtonFocus=f({cancelable:!1}),this.calciteRadioButtonChange=f({cancelable:!1}),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("click",this.clickHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],focused:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1}}static{this.styles=Z}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}connectedCallback(){this.rootNode=this.el.getRootNode(),this.name&&this.checkLastRadioButton(),q(this),W(this),this.updateTabIndexOfOtherRadioButtonsInGroup(),super.connectedCallback()}willUpdate(e){this.hasUpdated&&e.has("checked")&&this.checkedChanged(this.checked),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.updateTabIndexOfOtherRadioButtonsInGroup(),e.has("name")&&this.checkLastRadioButton()}loaded(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){super.disconnectedCallback(),H(this),J(this),this.updateTabIndexOfOtherRadioButtonsInGroup()}checkedChanged(e){e&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}syncHiddenFormInput(e){e.type="radio"}selectItem(e,a){e[a].click()}queryButtons(){return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(e=>e.name===this.name)}isFocusable(){let e=this.queryButtons(),a=e.find(o=>!o.disabled),t=e.find(o=>o.checked);return a===this.el&&!t}check(){this.disabled||(this.focused=!0,this.setFocus(),!this.checked&&(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.calciteRadioButtonChange.emit()))}clickHandler(){this.disabled||this.check()}onLabelClick(e){if(this.disabled||this.el.hidden)return;let a=e.currentTarget,t=a.for?this.rootNode.querySelector(`calcite-radio-button[id="${a.for}"]`):a.querySelector(`calcite-radio-button[name="${this.name}"]`);t&&(t.focused=!0,this.setFocus(),!t.checked&&(this.uncheckOtherRadioButtonsInGroup(),t.checked=!0,this.calciteRadioButtonChange.emit()))}checkLastRadioButton(){let a=this.queryButtons().filter(t=>t.checked);if(a?.length>1){let t=a[a.length-1];a.filter(o=>o!==t).forEach(o=>{o.checked=!1,o.emitCheckedChange()})}}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach(a=>{a.checked&&(a.checked=!1,a.focused=!1)})}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el).forEach(t=>{t.checked&&(t.checked=!1,t.focused=!1)})}updateTabIndexOfOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el&&!t.disabled).forEach(t=>{t.manager?.component.requestUpdate()})}getTabIndex(){if(!this.disabled)return this.checked||this.isFocusable()?0:-1}pointerEnterHandler(){this.disabled||(this.hovered=!0)}pointerLeaveHandler(){this.disabled||(this.hovered=!1)}handleKeyDown(e){let a=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:t}=e;if(a.indexOf(t)===-1)return;if(t===" "){this.check(),e.preventDefault();return}let o=t;this.direction==="rtl"&&(t==="ArrowRight"&&(o="ArrowLeft"),t==="ArrowLeft"&&(o="ArrowRight"));let r=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(d=>d.name===this.name),n=0;switch(r.some((d,l)=>{if(d.checked)return n=l,!0}),o){case"ArrowLeft":case"ArrowUp":e.preventDefault(),this.selectItem(r,this.getNextNonDisabledIndex(r,n,"left"));return;case"ArrowRight":case"ArrowDown":e.preventDefault(),this.selectItem(r,this.getNextNonDisabledIndex(r,n,"right"));return;default:return}}getNextNonDisabledIndex(e,a,t){let o=e.length,r=t==="left"?-1:1,n=v(a+r,o);for(;e[n].disabled;)n=v(n+r,o);return n}onContainerBlur(){this.focused=!1,this.calciteInternalRadioButtonBlur.emit()}onContainerFocus(){this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}render(){let e=this.getTabIndex();return this.interactiveContainer({disabled:this.disabled,children:m`<div .ariaChecked=${this.checked} .ariaLabel=${O(this)} class=${p($.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${e??C} ${R(this.containerRef)}><div class=${p($.radio)}></div>${this.labelText&&T({labelText:this.labelText,spacingInlineStart:!0})||""}</div>${Y({component:this})}`})}};E("calcite-radio-button",x);export{x as RadioButton};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as m}from"./SLPX32KY.js";import{k as V}from"./QHGI7X2A.js";import{f as I,s as b,t as C}from"./WDH6SQXQ.js";var F=["date","datetime-local","month","number","range","time","week"],x=["email","password","search","tel","text","url"],E=["email","password","search","tel","text","textarea","url"];function u(a,e,t,s){let l=t.toLowerCase(),n=a[t];s&&n!=null?e.setAttribute(l,`${n}`):e.removeAttribute(l)}function L(a,e,t){t.type=a;let s=F.includes(a),l=e;u(l,t,"min",s),u(l,t,"max",s),u(l,t,"step",s);let n=E.includes(a),d=e;u(d,t,"minLength",n),u(d,t,"maxLength",n);let c=x.includes(a);u(d,t,"pattern",c)}function w(a){let e=a==="textarea"?"text":a;return F.includes(e)||x.includes(e)||E.includes(e)}var j=["text","email","search","hidden","tel","url"],k=Object.freeze({validity:{},validationMessage:""});function q(a,e){if(!Array.isArray(e))return g(a,e)?k:{validity:y(a.validity),validationMessage:a.validationMessage};if(j.includes(a.type))return g(a,e.join(","))?k:{validity:y(a.validity),validationMessage:a.validationMessage};let t={},s=[];for(let l of e)g(a,l)||(Object.assign(t,y(a.validity)),a.validationMessage&&s.push(a.validationMessage));return{validity:t,validationMessage:s.join("; ")}}function g(a,e){return a.value=a.type==="file"||e==null?"":String(e),a.validity.valid}function y(a){let e={};for(let t in a)t!=="valid"&&a[t]&&(e[t]=!0);return e}var D=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"];function S(a){return`${C(b(a))}${D.includes(a)?"Input":"Change"}`}function O(a){return"form"in a&&"name"in a&&V(a)}function P(a,{status:e,message:t,icon:s}){"status"in a&&(a.status=e),"validationIcon"in a&&typeof a.validationIcon!="string"&&(a.validationIcon=s),"validationMessage"in a&&!a.validationMessage&&(a.validationMessage=t)}function R(a,e){let{disabled:t,required:s}=a;e.disabled=t,e.required=!!s,v(a)?e.checked=a.checked:$(a,e)&&L(e.type,a,e)}function v(a){return"checked"in a}function $(a,e){return a&&w(e.type)}function z(a){let e=Array.from(a.elements);requestAnimationFrame(()=>{let t=e.filter(s=>s.matches("[status=invalid]")&&O(s));for(let s of t)if(s.validationMessage){s.setFocus();break}})}var W=a=>m((e,t)=>{let s="",l,n=null,d=a.inputType;d&&(l=document.createElement("input"));function c(i){if(i.defaultPrevented)return;i.preventDefault();let r=i.currentTarget;z(r)}function T(){"status"in e&&(e.status="idle"),"validationIcon"in e&&(e.validationIcon=!1),"validationMessage"in e&&(e.validationMessage=""),v(e)&&(e.checked=e.defaultChecked),e.value=e.defaultValue}e.listen("luminaFormResetCallback",()=>{T()}),e.listen("luminaFormAssociatedCallback",({detail:[i]})=>{i?i.addEventListener("invalid",c,{capture:!0}):n?.removeEventListener("invalid",c,{capture:!0}),n=i});function M(){let i=s||l?.validationMessage||"";e.el.dispatchEvent(new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0})),P(e,{message:i,icon:!0,status:"invalid"});let r=S(e.el.tagName.toLowerCase());e.listen(r,()=>{"status"in e&&(e.status="idle"),"validationIcon"in e&&(!e.validationIcon||e.validationIcon===!0)&&(e.validationIcon=!1),"validationMessage"in e&&e.validationMessage===i&&(e.validationMessage="")},{once:!0})}t.onConnected(()=>{e.el.addEventListener("invalid",M)}),t.onDisconnected(()=>{e.el.removeEventListener("invalid",M)}),t.onUpdate(i=>{e.hasUpdated||(e.defaultValue=e.value,v(e)&&(e.defaultChecked=e.checked)),(i.has("name")||i.has("value")||v(e)&&i.has("checked"))&&e.elementInternals.setFormValue(A()),o()});function o(){let{elementInternals:i}=e,r={},f="";l&&(l.type=d,R(e,l),{validity:r,validationMessage:f}=q(l,h())),s&&(r={...r,customError:!0},f=s),i.setValidity(r,f),"validity"in e&&I(()=>{e.validity=i.validity})}function h(){return a.getValue?a.getValue():e.value}function A(){let i=h();if(Array.isArray(i)){let r=new FormData;return i.forEach(f=>r.append(e.name,f)),r}return v(e)?e.checked?i||"on":null:i}return{get active(){return!!e.elementInternals.form},overrideDefaultValue:i=>{e.defaultValue=i},overrideInputType:i=>{d=i,o()},requestSubmit:()=>{e.elementInternals.form?.requestSubmit()},setCustomValidity:i=>{s=i,o()}}});export{W as a};
@@ -1,4 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as fe}from"./SLPX32KY.js";import{a as de,l as ve}from"./QHGI7X2A.js";import{Q as le}from"./WDH6SQXQ.js";var pe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],$=pe.join(","),he=typeof Element>"u",G=he?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J=!he&&Element.prototype.getRootNode?function(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}:function(r){return r?.ownerDocument},Q=function(e,t){var a;t===void 0&&(t=!0);var u=e==null||(a=e.getAttribute)===null||a===void 0?void 0:a.call(e,"inert"),c=u===""||u==="true",n=c||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Q(e.parentNode));return n},Ce=function(e){var t,a=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return a===""||a==="true"},ye=function(e,t,a){if(Q(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll($));return t&&G.call(e,$)&&u.unshift(e),u=u.filter(a),u},ee=function(e,t,a){for(var u=[],c=Array.from(e);c.length;){var n=c.shift();if(!Q(n,!1))if(n.tagName==="SLOT"){var f=n.assignedElements(),l=f.length?f:n.children,p=ee(l,!0,a);a.flatten?u.push.apply(u,p):u.push({scopeParent:n,candidates:p})}else{var S=G.call(n,$);S&&a.filter(n)&&(t||!e.includes(n))&&u.push(n);var w=n.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(n),P=!Q(w,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(n));if(w&&P){var A=ee(w===!0?n.children:w.children,!0,a);a.flatten?u.push.apply(u,A):u.push({scopeParent:n,candidates:A})}else c.unshift.apply(c,n.children)}}return u},me=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},L=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ce(e))&&!me(e)?0:e.tabIndex},je=function(e,t){var a=L(e);return a<0&&t&&!me(e)?0:a},xe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ge=function(e){return e.tagName==="INPUT"},Le=function(e){return ge(e)&&e.type==="hidden"},Be=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(a){return a.tagName==="SUMMARY"});return t},_e=function(e,t){for(var a=0;a<e.length;a++)if(e[a].checked&&e[a].form===t)return e[a]},Ge=function(e){if(!e.name)return!0;var t=e.form||J(e),a=function(f){return t.querySelectorAll('input[type="radio"][name="'+f+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=a(window.CSS.escape(e.name));else try{u=a(e.name)}catch(n){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",n.message),!1}var c=_e(u,e.form);return!c||c===e},Ke=function(e){return ge(e)&&e.type==="radio"},Me=function(e){return Ke(e)&&!Ge(e)},Ve=function(e){var t,a=e&&J(e),u=(t=a)===null||t===void 0?void 0:t.host,c=!1;if(a&&a!==e){var n,f,l;for(c=!!((n=u)!==null&&n!==void 0&&(f=n.ownerDocument)!==null&&f!==void 0&&f.contains(u)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!c&&u;){var p,S,w;a=J(u),u=(p=a)===null||p===void 0?void 0:p.host,c=!!((S=u)!==null&&S!==void 0&&(w=S.ownerDocument)!==null&&w!==void 0&&w.contains(u))}}return c},be=function(e){var t=e.getBoundingClientRect(),a=t.width,u=t.height;return a===0&&u===0},qe=function(e,t){var a=t.displayCheck,u=t.getShadowRoot;if(a==="full-native"&&"checkVisibility"in e){var c=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!c}if(getComputedStyle(e).visibility==="hidden")return!0;var n=G.call(e,"details>summary:first-of-type"),f=n?e.parentElement:e;if(G.call(f,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof u=="function"){for(var l=e;e;){var p=e.parentElement,S=J(e);if(p&&!p.shadowRoot&&u(p)===!0)return be(e);e.assignedSlot?e=e.assignedSlot:!p&&S!==e.ownerDocument?e=S.host:e=p}e=l}if(Ve(e))return!e.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return be(e);return!1},Ue=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var a=0;a<t.children.length;a++){var u=t.children.item(a);if(u.tagName==="LEGEND")return G.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},te=function(e,t){return!(t.disabled||Le(t)||qe(t,e)||Be(t)||Ue(t))},ce=function(e,t){return!(Me(t)||L(t)<0||!te(e,t))},We=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},we=function(e){var t=[],a=[];return e.forEach(function(u,c){var n=!!u.scopeParent,f=n?u.scopeParent:u,l=je(f,n),p=n?we(u.candidates):f;l===0?n?t.push.apply(t,p):t.push(f):a.push({documentOrder:c,tabIndex:l,item:u,isScope:n,content:p})}),a.sort(xe).reduce(function(u,c){return c.isScope?u.push.apply(u,c.content):u.push(c.content),u},[]).concat(t)},Te=function(e,t){t=t||{};var a;return t.getShadowRoot?a=ee([e],t.includeContainer,{filter:ce.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:We}):a=ye(e,t.includeContainer,ce.bind(null,t)),we(a)},Se=function(e,t){t=t||{};var a;return t.getShadowRoot?a=ee([e],t.includeContainer,{filter:te.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):a=ye(e,t.includeContainer,te.bind(null,t)),a},K=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return G.call(e,$)===!1?!1:ce(t,e)},Ye=pe.concat("iframe:not([inert]):not([inert] *)").join(","),re=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return G.call(e,Ye)===!1?!1:te(t,e)};function se(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=Array(e);t<e;t++)a[t]=r[t];return a}function He(r){if(Array.isArray(r))return se(r)}function Fe(r,e,t,a,u,c,n){try{var f=r[c](n),l=f.value}catch(p){return void t(p)}f.done?e(l):Promise.resolve(l).then(a,u)}function Ee(r){return function(){var e=this,t=arguments;return new Promise(function(a,u){var c=r.apply(e,t);function n(l){Fe(c,a,u,n,f,"next",l)}function f(l){Fe(c,a,u,n,f,"throw",l)}n(void 0)})}}function Ne(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Oe(r))||e){t&&(r=t);var a=0,u=function(){};return{s:u,n:function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(l){throw l},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c,n=!0,f=!1;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return n=l.done,l},e:function(l){f=!0,c=l},f:function(){try{n||t.return==null||t.return()}finally{if(f)throw c}}}}function Ze(r,e,t){return(e=Qe(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ze(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Xe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ke(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),t.push.apply(t,a)}return t}function Ae(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ke(Object(t),!0).forEach(function(a){Ze(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function U(){var r,e,t=typeof Symbol=="function"?Symbol:{},a=t.iterator||"@@iterator",u=t.toStringTag||"@@toStringTag";function c(A,R,Y,H){var M=R&&R.prototype instanceof f?R:f,V=Object.create(M.prototype);return O(V,"_invoke",(function(ie,Z,z){var I,T,N,B=0,X=z||[],C=!1,E={p:0,n:0,v:r,a:y,f:y.bind(r,4),d:function(i,o){return I=i,T=0,N=r,E.n=o,n}};function y(i,o){for(T=i,N=o,e=0;!C&&B&&!s&&e<X.length;e++){var s,d=X[e],b=E.p,h=d[2];i>3?(s=h===o)&&(N=d[(T=d[4])?5:(T=3,3)],d[4]=d[5]=r):d[0]<=b&&((s=i<2&&b<d[1])?(T=0,E.v=o,E.n=d[1]):b<h&&(s=i<3||d[0]>o||o>h)&&(d[4]=i,d[5]=o,E.n=h,T=0))}if(s||i>1)return n;throw C=!0,o}return function(i,o,s){if(B>1)throw TypeError("Generator is already running");for(C&&o===1&&y(o,s),T=o,N=s;(e=T<2?r:N)||!C;){I||(T?T<3?(T>1&&(E.n=-1),y(T,N)):E.n=N:E.v=N);try{if(B=2,I){if(T||(i="next"),e=I[i]){if(!(e=e.call(I,N)))throw TypeError("iterator result is not an object");if(!e.done)return e;N=e.value,T<2&&(T=0)}else T===1&&(e=I.return)&&e.call(I),T<2&&(N=TypeError("The iterator does not provide a '"+i+"' method"),T=1);I=r}else if((e=(C=E.n<0)?N:ie.call(Z,E))!==n)break}catch(d){I=r,T=1,N=d}finally{B=1}}return{value:e,done:C}}})(A,Y,H),!0),V}var n={};function f(){}function l(){}function p(){}e=Object.getPrototypeOf;var S=[][a]?e(e([][a]())):(O(e={},a,function(){return this}),e),w=p.prototype=f.prototype=Object.create(S);function P(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,p):(A.__proto__=p,O(A,u,"GeneratorFunction")),A.prototype=Object.create(w),A}return l.prototype=p,O(w,"constructor",p),O(p,"constructor",l),l.displayName="GeneratorFunction",O(p,u,"GeneratorFunction"),O(w),O(w,u,"Generator"),O(w,a,function(){return this}),O(w,"toString",function(){return"[object Generator]"}),(U=function(){return{w:c,m:P}})()}function O(r,e,t,a){var u=Object.defineProperty;try{u({},"",{})}catch{u=0}O=function(c,n,f,l){function p(S,w){O(c,S,function(P){return this._invoke(S,w,P)})}n?u?u(c,n,{value:f,enumerable:!l,configurable:!l,writable:!l}):c[n]=f:(p("next",0),p("throw",1),p("return",2))},O(r,e,t,a)}function $e(r){return He(r)||ze(r)||Oe(r)||Xe()}function Je(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Qe(r){var e=Je(r,"string");return typeof e=="symbol"?e:e+""}function Oe(r,e){if(r){if(typeof r=="string")return se(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?se(r,e):void 0}}var j={getActiveTrap:function(e){return e?.length>0?e[e.length-1]:null},activateTrap:function(e,t){var a=j.getActiveTrap(e);t!==a&&j.pauseTrap(e);var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var a=e.indexOf(t);a!==-1&&e.splice(a,1),j.unpauseTrap(e)},pauseTrap:function(e){var t=j.getActiveTrap(e);t?._setPausedState(!0)},unpauseTrap:function(e){var t=j.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},et=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},tt=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},W=function(e){return e?.key==="Tab"||e?.keyCode===9},rt=function(e){return W(e)&&!e.shiftKey},at=function(e){return W(e)&&e.shiftKey},De=function(e){return setTimeout(e,0)},q=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),u=1;u<t;u++)a[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,a):e},ae=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},nt=[],Re=function(e,t){var a=t?.document||document,u=t?.trapStack||nt,c=Ae({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:rt,isKeyBackward:at},t),n={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},f,l=function(i,o,s){return i&&i[o]!==void 0?i[o]:c[s||o]},p=function(i,o){var s=typeof o?.composedPath=="function"?o.composedPath():void 0;return n.containerGroups.findIndex(function(d){var b=d.container,h=d.tabbableNodes;return b.contains(i)||s?.includes(b)||h.find(function(v){return v===i})})},S=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=o.hasFallback,d=s===void 0?!1:s,b=o.params,h=b===void 0?[]:b,v=c[i];if(typeof v=="function"&&(v=v.apply(void 0,$e(h))),v===!0&&(v=void 0),!v){if(v===void 0||v===!1)return v;throw new Error("`".concat(i,"` was specified but was not a node, or did not return a node"))}var m=v;if(typeof v=="string"){try{m=a.querySelector(v)}catch(g){throw new Error("`".concat(i,'` appears to be an invalid selector; error="').concat(g.message,'"'))}if(!m&&!d)throw new Error("`".concat(i,"` as selector refers to no known node"))}return m},w=function(){var i=S("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!re(i,c.tabbableOptions))if(p(a.activeElement)>=0)i=a.activeElement;else{var o=n.tabbableGroups[0],s=o&&o.firstTabbableNode;i=s||S("fallbackFocus")}else i===null&&(i=S("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},P=function(){if(n.containerGroups=n.containers.map(function(i){var o=Te(i,c.tabbableOptions),s=Se(i,c.tabbableOptions),d=o.length>0?o[0]:void 0,b=o.length>0?o[o.length-1]:void 0,h=s.find(function(g){return K(g)}),v=s.slice().reverse().find(function(g){return K(g)}),m=!!o.find(function(g){return L(g)>0});return{container:i,tabbableNodes:o,focusableNodes:s,posTabIndexesFound:m,firstTabbableNode:d,lastTabbableNode:b,firstDomTabbableNode:h,lastDomTabbableNode:v,nextTabbableNode:function(F){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,k=o.indexOf(F);return k<0?D?s.slice(s.indexOf(F)+1).find(function(_){return K(_)}):s.slice(0,s.indexOf(F)).reverse().find(function(_){return K(_)}):o[k+(D?1:-1)]}}}),n.tabbableGroups=n.containerGroups.filter(function(i){return i.tabbableNodes.length>0}),n.tabbableGroups.length<=0&&!S("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(n.containerGroups.find(function(i){return i.posTabIndexesFound})&&n.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},A=function(i){var o=i.activeElement;if(o)return o.shadowRoot&&o.shadowRoot.activeElement!==null?A(o.shadowRoot):o},R=function(i){if(i!==!1&&i!==A(document)){if(!i||!i.focus){R(w());return}i.focus({preventScroll:!!c.preventScroll}),n.mostRecentlyFocusedNode=i,et(i)&&i.select()}},Y=function(i){var o=S("setReturnFocus",{params:[i]});return o||(o===!1?!1:i)},H=function(i){var o=i.target,s=i.event,d=i.isBackward,b=d===void 0?!1:d;o=o||ae(s),P();var h=null;if(n.tabbableGroups.length>0){var v=p(o,s),m=v>=0?n.containerGroups[v]:void 0;if(v<0)b?h=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode:h=n.tabbableGroups[0].firstTabbableNode;else if(b){var g=n.tabbableGroups.findIndex(function(oe){var ue=oe.firstTabbableNode;return o===ue});if(g<0&&(m.container===o||re(o,c.tabbableOptions)&&!K(o,c.tabbableOptions)&&!m.nextTabbableNode(o,!1))&&(g=v),g>=0){var F=g===0?n.tabbableGroups.length-1:g-1,D=n.tabbableGroups[F];h=L(o)>=0?D.lastTabbableNode:D.lastDomTabbableNode}else W(s)||(h=m.nextTabbableNode(o,!1))}else{var k=n.tabbableGroups.findIndex(function(oe){var ue=oe.lastTabbableNode;return o===ue});if(k<0&&(m.container===o||re(o,c.tabbableOptions)&&!K(o,c.tabbableOptions)&&!m.nextTabbableNode(o))&&(k=v),k>=0){var _=k===n.tabbableGroups.length-1?0:k+1,x=n.tabbableGroups[_];h=L(o)>=0?x.firstTabbableNode:x.firstDomTabbableNode}else W(s)||(h=m.nextTabbableNode(o))}}else h=S("fallbackFocus");return h},M=function(i){var o=ae(i);if(!(p(o,i)>=0)){if(q(c.clickOutsideDeactivates,i)){f.deactivate({returnFocus:c.returnFocusOnDeactivate});return}q(c.allowOutsideClick,i)||i.preventDefault()}},V=function(i){var o=ae(i),s=p(o,i)>=0;if(s||o instanceof Document)s&&(n.mostRecentlyFocusedNode=o);else{i.stopImmediatePropagation();var d,b=!0;if(n.mostRecentlyFocusedNode)if(L(n.mostRecentlyFocusedNode)>0){var h=p(n.mostRecentlyFocusedNode),v=n.containerGroups[h].tabbableNodes;if(v.length>0){var m=v.findIndex(function(g){return g===n.mostRecentlyFocusedNode});m>=0&&(c.isKeyForward(n.recentNavEvent)?m+1<v.length&&(d=v[m+1],b=!1):m-1>=0&&(d=v[m-1],b=!1))}}else n.containerGroups.some(function(g){return g.tabbableNodes.some(function(F){return L(F)>0})})||(b=!1);else b=!1;b&&(d=H({target:n.mostRecentlyFocusedNode,isBackward:c.isKeyBackward(n.recentNavEvent)})),R(d||n.mostRecentlyFocusedNode||w())}n.recentNavEvent=void 0},ie=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n.recentNavEvent=i;var s=H({event:i,isBackward:o});s&&(W(i)&&i.preventDefault(),R(s))},Z=function(i){(c.isKeyForward(i)||c.isKeyBackward(i))&&ie(i,c.isKeyBackward(i))},z=function(i){tt(i)&&q(c.escapeDeactivates,i)!==!1&&(i.preventDefault(),f.deactivate())},I=function(i){var o=ae(i);p(o,i)>=0||q(c.clickOutsideDeactivates,i)||q(c.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())},T=function(){if(!n.active)return Promise.resolve();j.activateTrap(u,f);var i;return c.delayInitialFocus?i=new Promise(function(o){n.delayInitialFocusTimer=De(function(){R(w()),o()})}):(i=Promise.resolve(),R(w())),a.addEventListener("focusin",V,!0),a.addEventListener("mousedown",M,{capture:!0,passive:!1}),a.addEventListener("touchstart",M,{capture:!0,passive:!1}),a.addEventListener("click",I,{capture:!0,passive:!1}),a.addEventListener("keydown",Z,{capture:!0,passive:!1}),a.addEventListener("keydown",z),i},N=function(i){n.active&&!n.paused&&f._setSubtreeIsolation(!1),n.adjacentElements.clear(),n.alreadySilent.clear();var o=new Set,s=new Set,d=Ne(i),b;try{for(d.s();!(b=d.n()).done;){var h=b.value;o.add(h);for(var v=typeof ShadowRoot<"u"&&h.getRootNode()instanceof ShadowRoot,m=h;m;){o.add(m);var g=m.parentElement,F=[];g?F=g.children:!g&&v&&(F=m.getRootNode().children,g=m.getRootNode().host,v=typeof ShadowRoot<"u"&&g.getRootNode()instanceof ShadowRoot);var D=Ne(F),k;try{for(D.s();!(k=D.n()).done;){var _=k.value;s.add(_)}}catch(x){D.e(x)}finally{D.f()}m=g}}}catch(x){d.e(x)}finally{d.f()}o.forEach(function(x){s.delete(x)}),n.adjacentElements=s},B=function(){if(n.active)return a.removeEventListener("focusin",V,!0),a.removeEventListener("mousedown",M,!0),a.removeEventListener("touchstart",M,!0),a.removeEventListener("click",I,!0),a.removeEventListener("keydown",Z,!0),a.removeEventListener("keydown",z),f},X=function(i){var o=i.some(function(s){var d=Array.from(s.removedNodes);return d.some(function(b){return b===n.mostRecentlyFocusedNode})});o&&R(w())},C=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(X):void 0,E=function(){C&&(C.disconnect(),n.active&&!n.paused&&n.containers.map(function(i){C.observe(i,{subtree:!0,childList:!0})}))};return f={get active(){return n.active},get paused(){return n.paused},activate:function(i){if(n.active)return this;var o=l(i,"onActivate"),s=l(i,"onPostActivate"),d=l(i,"checkCanFocusTrap"),b=j.getActiveTrap(u),h=!1;if(b&&!b.paused){var v;(v=b._setSubtreeIsolation)===null||v===void 0||v.call(b,!1),h=!0}try{d||P(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=A(a),o?.();var m=(function(){var F=Ee(U().m(function D(){return U().w(function(k){for(;;)switch(k.n){case 0:return d&&P(),k.n=1,T();case 1:f._setSubtreeIsolation(!0),E(),s?.();case 2:return k.a(2)}},D)}));return function(){return F.apply(this,arguments)}})();if(d)return d(n.containers.concat()).then(m,m),this;m()}catch(F){if(b===j.getActiveTrap(u)&&h){var g;(g=b._setSubtreeIsolation)===null||g===void 0||g.call(b,!0)}throw F}return this},deactivate:function(i){if(!n.active)return this;var o=Ae({onDeactivate:c.onDeactivate,onPostDeactivate:c.onPostDeactivate,checkCanReturnFocus:c.checkCanReturnFocus},i);clearTimeout(n.delayInitialFocusTimer),n.delayInitialFocusTimer=void 0,n.paused||f._setSubtreeIsolation(!1),n.alreadySilent.clear(),B(),n.active=!1,n.paused=!1,E(),j.deactivateTrap(u,f);var s=l(o,"onDeactivate"),d=l(o,"onPostDeactivate"),b=l(o,"checkCanReturnFocus"),h=l(o,"returnFocus","returnFocusOnDeactivate");s?.();var v=function(){De(function(){h&&R(Y(n.nodeFocusedBeforeActivation)),d?.()})};return h&&b?(b(Y(n.nodeFocusedBeforeActivation)).then(v,v),this):(v(),this)},pause:function(i){return n.active?(n.manuallyPaused=!0,this._setPausedState(!0,i)):this},unpause:function(i){return n.active?(n.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,i)):this},updateContainerElements:function(i){var o=[].concat(i).filter(Boolean);return n.containers=o.map(function(s){return typeof s=="string"?a.querySelector(s):s}),c.isolateSubtrees&&N(n.containers),n.active&&(P(),n.paused||f._setSubtreeIsolation(!0)),E(),this}},Object.defineProperties(f,{_isManuallyPaused:{value:function(){return n.manuallyPaused}},_setPausedState:{value:function(i,o){if(n.paused===i)return this;if(n.paused=i,i){var s=l(o,"onPause"),d=l(o,"onPostPause");s?.(),B(),f._setSubtreeIsolation(!1),E(),d?.()}else{var b=l(o,"onUnpause"),h=l(o,"onPostUnpause");b?.();var v=(function(){var m=Ee(U().m(function g(){return U().w(function(F){for(;;)switch(F.n){case 0:return P(),F.n=1,T();case 1:f._setSubtreeIsolation(!0),E(),h?.();case 2:return F.a(2)}},g)}));return function(){return m.apply(this,arguments)}})();v()}return this}},_setSubtreeIsolation:{value:function(i){c.isolateSubtrees&&n.adjacentElements.forEach(function(o){var s;if(i)switch(c.isolateSubtrees){case"aria-hidden":(o.ariaHidden==="true"||((s=o.getAttribute("aria-hidden"))===null||s===void 0?void 0:s.toLowerCase())==="true")&&n.alreadySilent.add(o),o.setAttribute("aria-hidden","true");break;default:(o.inert||o.hasAttribute("inert"))&&n.alreadySilent.add(o),o.setAttribute("inert",!0);break}else if(!n.alreadySilent.has(o))switch(c.isolateSubtrees){case"aria-hidden":o.removeAttribute("aria-hidden");break;default:o.removeAttribute("inert");break}})}}}),f.updateContainerElements(e),f};function Ie(r,{focusTrapOptions:e},t){return!e?.extraContainers&&!t?r:[r,...Pe(e?.extraContainers),...Pe(t)]}function Pe(r=[]){return Array.isArray(r)?r:[r]}var ne=new WeakSet;function it(r,e){let t=e&&e!==document.body&&e!==document.documentElement;return!ne.has(r)&&t&&ve(e),!1}function ot(r,e){let t=e?.fallbackFocus||r,a=e?.clickOutsideDeactivates??!0,u;return{fallbackFocus:t,...e,document:r.ownerDocument,tabbableOptions:de,trapStack:le().focusTrapStack,clickOutsideDeactivates:c=>(ne.has(r)||ne.add(r),typeof a=="function"?a(c):a),onActivate:()=>{e?.escapeDeactivates&&(u=new AbortController,r.addEventListener("keydown",c=>{c.key==="Escape"&&typeof e?.escapeDeactivates=="function"&&e.escapeDeactivates(c)},{signal:u.signal})),e?.onActivate?.()},onDeactivate:()=>{u?.abort(),u=void 0,e?.onDeactivate?.()},onPostDeactivate:()=>{ne.delete(r)},setReturnFocus:c=>{let n=typeof e?.setReturnFocus=="function"?e.setReturnFocus(c):e?.setReturnFocus;return n===void 0?it(r,c):n}}}var bt=r=>fe((e,t)=>{let a,u,c,n=r.focusTrapOptions;t.onConnected(()=>{e[r.triggerProp]&&a&&f.activate()}),t.onUpdate(l=>{e.hasUpdated&&l.has("focusTrapDisabled")&&(e.focusTrapDisabled?f.deactivate():f.activate())}),t.onDisconnected(()=>f.deactivate());let f={get _instance(){},activate:()=>{let l=u||e.el;l.isConnected&&(a||(c||=Ie(l,e),a=Re(c,ot(l,{...n,...e.focusTrapOptions}))),(typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled)&&a.activate())},deactivate:()=>a?.deactivate(),overrideFocusTrapEl:l=>{if(a)throw new Error("Focus trap already created");u=l},setExtraContainers:l=>{let p=u||e.el;c=Ie(p,e,l)},updateContainerElements:()=>a?.updateContainerElements(c)};return f});export{bt as a};