@esri/calcite-components 6.0.0-next.11 → 6.0.0-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{7ZLCN4OR.js → 226WRU24.js} +1 -1
- package/dist/cdn/{NMLH456H.js → 2AEQO2JE.js} +1 -1
- package/dist/cdn/{AG54BMT7.js → 2IKENHKH.js} +1 -1
- package/dist/cdn/{CZP724EL.js → 2T3T32JN.js} +1 -1
- package/dist/cdn/2Y6QL4G6.js +2 -0
- package/dist/cdn/34U6PPVQ.js +2 -0
- package/dist/cdn/{EV2BLP2M.js → 3H5VBZ62.js} +1 -1
- package/dist/cdn/{WIB6QS4N.js → 3UQDQWWD.js} +1 -1
- package/dist/cdn/{3NQAIIHX.js → 4BMXESCG.js} +1 -1
- package/dist/cdn/{IR2V5547.js → 4DANLFHF.js} +1 -1
- package/dist/cdn/{MGUAW2MN.js → 4EROZLL5.js} +1 -1
- package/dist/cdn/{YSVKKDJF.js → 4L5C6PV6.js} +1 -1
- package/dist/cdn/{XRU35TLK.js → 4O26NBVS.js} +1 -1
- package/dist/cdn/{7JIBASTT.js → 52NOMOAU.js} +1 -1
- package/dist/cdn/{CR4NUST3.js → 56GBIJYV.js} +1 -1
- package/dist/cdn/5AX5YDQJ.js +2 -0
- package/dist/cdn/{V3JWWLRL.js → 5BO2JHHZ.js} +1 -1
- package/dist/cdn/{RIDD2XKE.js → 5PEY6ZJC.js} +1 -1
- package/dist/cdn/{CSXQJZEL.js → 6XSLOVRL.js} +1 -1
- package/dist/cdn/{DQIQKIDG.js → 6YFILVOY.js} +1 -1
- package/dist/cdn/{T5UHOSA2.js → 732C5EA6.js} +1 -1
- package/dist/cdn/7DAEWRPY.js +2 -0
- package/dist/cdn/{JXZTPWEI.js → 7F3Z3XZS.js} +1 -1
- package/dist/cdn/{EX5IXZL6.js → 7F6WR4BF.js} +1 -1
- package/dist/cdn/{Z2UWNG35.js → 7JIJRVGH.js} +1 -1
- package/dist/cdn/{A2JZMCJR.js → 7K22HRES.js} +1 -1
- package/dist/cdn/{7YDOJPTG.js → 7LERYOST.js} +1 -1
- package/dist/cdn/{ZDKXHZNU.js → 7NK6WWOE.js} +1 -1
- package/dist/cdn/{Z3PSNA4F.js → 7OUC45V3.js} +1 -1
- package/dist/cdn/{5B5QNGAG.js → 7ZQDVW4P.js} +1 -1
- package/dist/cdn/{KAYPDW25.js → A2C3XAPM.js} +1 -1
- package/dist/cdn/AISDE45I.js +2 -0
- package/dist/cdn/{AZRYWXF2.js → AIUA5OHT.js} +1 -1
- package/dist/cdn/{3AJYILOJ.js → AKPVVHWX.js} +1 -1
- package/dist/cdn/{A3GKBR34.js → BGEAZB5Y.js} +1 -1
- package/dist/cdn/{LW2W54GS.js → BKPETW42.js} +1 -1
- package/dist/cdn/{KA36OY4J.js → BPOXOLDC.js} +1 -1
- package/dist/cdn/{SSCGJSIX.js → C7P5LVX5.js} +1 -1
- package/dist/cdn/{JKGQEGYT.js → CCR7BYNW.js} +1 -1
- package/dist/cdn/{PUBTIJIU.js → CU3QP7FM.js} +1 -1
- package/dist/cdn/{CNL2XWGH.js → D2T5RH3F.js} +1 -1
- package/dist/cdn/{RPDLVOMK.js → D6MKPPI3.js} +1 -1
- package/dist/cdn/D7YNVZZS.js +2 -0
- package/dist/cdn/{IQ5PDJZT.js → DC4Y43PL.js} +1 -1
- package/dist/cdn/{TUXGJBDC.js → DD5ZZEJR.js} +1 -1
- package/dist/cdn/{D4HRXS4E.js → DE4RWCLG.js} +1 -1
- package/dist/cdn/{UWKL3MMP.js → DY4U6PXW.js} +1 -1
- package/dist/cdn/{2ZVI5D2F.js → E2QDY3HO.js} +1 -1
- package/dist/cdn/E3I26OX2.js +2 -0
- package/dist/cdn/{77HN7RDZ.js → EJHM42BF.js} +1 -1
- package/dist/cdn/{OAB226QL.js → EKTV7MOB.js} +1 -1
- package/dist/cdn/{KJ5X5JQ2.js → ETP6C6RA.js} +1 -1
- package/dist/cdn/{FAW6HCZE.js → EUZQIA3P.js} +1 -1
- package/dist/cdn/{KAADRWY5.js → F3VMM64Y.js} +1 -1
- package/dist/cdn/{DYUHRMVD.js → FD6HFC4G.js} +1 -1
- package/dist/cdn/{JHAK7Y4E.js → FOBZEAWE.js} +1 -1
- package/dist/cdn/{G6XTP7VM.js → FYOEOAKD.js} +1 -1
- package/dist/cdn/{YUU5WSIS.js → G2WLWL6V.js} +1 -1
- package/dist/cdn/{2M4ETWZU.js → G4SOANDF.js} +1 -1
- package/dist/cdn/G6O2CV2F.js +2 -0
- package/dist/cdn/{JFOHL6M6.js → GBURLWJN.js} +1 -1
- package/dist/cdn/{WICQMZUZ.js → GFRQU4NS.js} +1 -1
- package/dist/cdn/{M6L42LD5.js → H4FH6GCL.js} +1 -1
- package/dist/cdn/HDFJQN2E.js +2 -0
- package/dist/cdn/{2C677XOQ.js → HKNFFM3H.js} +1 -1
- package/dist/cdn/{72Q3454I.js → HKXJXU7S.js} +1 -1
- package/dist/cdn/{D47QLMSE.js → HMDOGGRS.js} +1 -1
- package/dist/cdn/{PYR4KQWG.js → HPVBQPMK.js} +1 -1
- package/dist/cdn/HSZPWWHX.js +2 -0
- package/dist/cdn/{YVL7L5VZ.js → IBWXXYZF.js} +1 -1
- package/dist/cdn/{N6CONYT7.js → IDKES2H3.js} +1 -1
- package/dist/cdn/IO6FMDHU.js +2 -0
- package/dist/cdn/{G4EENJPP.js → IOSENTHN.js} +1 -1
- package/dist/cdn/{MKOYBNHN.js → IROC5RHF.js} +1 -1
- package/dist/cdn/{V7TWPLUL.js → IVGWRRNH.js} +1 -1
- package/dist/cdn/{YC33WRPJ.js → JEUKCT7D.js} +1 -1
- package/dist/cdn/{V53VO7TG.js → JKLDEWO5.js} +1 -1
- package/dist/cdn/{O5R6HMDZ.js → JOPTOKFI.js} +1 -1
- package/dist/cdn/{OGTOSWWU.js → JOYGOSED.js} +1 -1
- package/dist/cdn/{BCE72WLM.js → JPH4XX2X.js} +1 -1
- package/dist/cdn/{OE3QOF5V.js → JUQUMWIR.js} +1 -1
- package/dist/cdn/{YRDE6L4T.js → JVNYAFKM.js} +1 -1
- package/dist/cdn/{6HT2CTFJ.js → KRWXSPYM.js} +1 -1
- package/dist/cdn/{XIV422LP.js → KT2KAETI.js} +1 -1
- package/dist/cdn/{C5QTLDCU.js → LCO7EM6P.js} +1 -1
- package/dist/cdn/{SKEOVYI3.js → LDXZ5GIZ.js} +1 -1
- package/dist/cdn/{JLKKNEX5.js → LF2RQSST.js} +1 -1
- package/dist/cdn/{DQADORUS.js → LGEHMF5F.js} +1 -1
- package/dist/cdn/{YV4UJTWH.js → LJNUAHIO.js} +1 -1
- package/dist/cdn/LNRZGNCR.js +2 -0
- package/dist/cdn/{BIV2IIE7.js → LX4GMWXD.js} +1 -1
- package/dist/cdn/{CI322RY4.js → M4D2IMI5.js} +1 -1
- package/dist/cdn/{Y664PBYS.js → M6PVZJEB.js} +1 -1
- package/dist/cdn/{ZRMDVPEA.js → M7AIQAZU.js} +1 -1
- package/dist/cdn/{OSEH2NR3.js → MLJPIF3H.js} +1 -1
- package/dist/cdn/{7235Z7Q6.js → MMBRYH3R.js} +1 -1
- package/dist/cdn/{4ZIP4QSM.js → MNWBZB5O.js} +1 -1
- package/dist/cdn/{CTEHP75R.js → MOMZFIAJ.js} +1 -1
- package/dist/cdn/{IQRWVDGY.js → MPFCQYWP.js} +1 -1
- package/dist/cdn/{M3IAYV6K.js → NEVIBLOJ.js} +1 -1
- package/dist/cdn/{3GCTS7TK.js → NMFEKIJV.js} +1 -1
- package/dist/cdn/{ATSQHGM4.js → NN6QCPSW.js} +1 -1
- package/dist/cdn/{WYCH4Z2A.js → NZROCOKX.js} +1 -1
- package/dist/cdn/OBIYAJSP.js +2 -0
- package/dist/cdn/{DH4YOHMH.js → OOYTODIL.js} +1 -1
- package/dist/cdn/{BNMRQ2VK.js → OQKCDO4H.js} +1 -1
- package/dist/cdn/{ADDYXN36.js → P23XETEI.js} +1 -1
- package/dist/cdn/{2S5IEARK.js → PEI6H7DT.js} +1 -1
- package/dist/cdn/{GY2EZ3FB.js → PM7FP7FS.js} +1 -1
- package/dist/cdn/{BOR3QCTX.js → PWGENG33.js} +1 -1
- package/dist/cdn/{WCIKADAE.js → QAE4HZ24.js} +1 -1
- package/dist/cdn/{YDPZAW5A.js → QCHUTTZX.js} +1 -1
- package/dist/cdn/{BTF6YFRK.js → QOWGE23O.js} +1 -1
- package/dist/cdn/{Q4VHTJKT.js → QWGNAOIM.js} +1 -1
- package/dist/cdn/{5NKPO7CK.js → RHUCISCR.js} +1 -1
- package/dist/cdn/{RI4JK6O2.js → RKOWNK75.js} +1 -1
- package/dist/cdn/{CKSEAT5O.js → RLSYZFHC.js} +1 -1
- package/dist/cdn/{IOESPC3K.js → RTAMPW4H.js} +1 -1
- package/dist/cdn/{DPKQFZ63.js → SVFHNGST.js} +1 -1
- package/dist/cdn/{EZWCNW5M.js → SVS63RTV.js} +1 -1
- package/dist/cdn/{5MU4KFJP.js → SZ3D7STA.js} +1 -1
- package/dist/cdn/{DIFQPNFB.js → TLRXKBSR.js} +1 -1
- package/dist/cdn/{B2B4K2SR.js → TMPJIIH2.js} +1 -1
- package/dist/cdn/{AWCFCAHJ.js → U47KLOKE.js} +1 -1
- package/dist/cdn/{IVELW3IC.js → U7XVFSSC.js} +1 -1
- package/dist/cdn/{OMQ7WOPQ.js → V56SEY2Y.js} +1 -1
- package/dist/cdn/{JUJMRIPL.js → VAHG3SDY.js} +1 -1
- package/dist/cdn/{KPTJTPBQ.js → VFB4EPKN.js} +1 -1
- package/dist/cdn/{VITY2ZWH.js → VOHXLPUC.js} +1 -1
- package/dist/cdn/VZ4JPH7J.js +2 -0
- package/dist/cdn/{FE2JAX5D.js → WC6VV45C.js} +1 -1
- package/dist/cdn/WDIBGLNU.js +2 -0
- package/dist/cdn/{DWXODW3D.js → WT3AO26J.js} +1 -1
- package/dist/cdn/{SEG7ZWJV.js → XJ2HKCH4.js} +1 -1
- package/dist/cdn/{NHEFZRKK.js → Y2WTDN5G.js} +1 -1
- package/dist/cdn/{ILASMNOD.js → Y4P57YTG.js} +1 -1
- package/dist/cdn/{QAXF4UPJ.js → YTOQZWS3.js} +1 -1
- package/dist/cdn/{A33WOUFY.js → YUTF6CP3.js} +1 -1
- package/dist/cdn/{P4COLKFN.js → Z44VIZTV.js} +1 -1
- package/dist/cdn/{NC6GXJRL.js → ZVX6KPMU.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/dom.js +6 -16
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useForm.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.js +1 -1
- package/dist/components/calcite-action-bar/customElement.js +2 -2
- package/dist/components/calcite-action-group/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.js +6 -6
- 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-dropdown/customElement.js +1 -1
- package/dist/components/calcite-input-message/customElement.d.ts +1 -4
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-text/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +0 -14
- package/dist/loader.js +0 -2
- package/dist/types/lumina.d.ts +0 -11
- package/dist/types/preact.d.ts +0 -13
- package/dist/types/react.d.ts +0 -15
- package/dist/types/stencil.d.ts +0 -11
- package/package.json +1 -1
- package/dist/cdn/3ZGDL7CM.js +0 -2
- package/dist/cdn/4KLUF2XI.js +0 -2
- package/dist/cdn/5VXMQ6DN.js +0 -2
- package/dist/cdn/7RW33PAY.js +0 -2
- package/dist/cdn/BM5RCN6S.js +0 -2
- package/dist/cdn/C2EL3ITN.js +0 -2
- package/dist/cdn/CZ7GAGEJ.js +0 -2
- package/dist/cdn/EFDHGXCK.js +0 -2
- package/dist/cdn/HZF6EPZ3.js +0 -2
- package/dist/cdn/JUAYHBAX.js +0 -2
- package/dist/cdn/LPE5WKMF.js +0 -2
- package/dist/cdn/M4RGPK4P.js +0 -2
- package/dist/cdn/NDICGBNV.js +0 -2
- package/dist/cdn/Q6VH6KBT.js +0 -2
- package/dist/cdn/UAXV5QU2.js +0 -2
- package/dist/cdn/ZPXEKSRI.js +0 -2
- package/dist/cdn/ZUR4NUA5.js +0 -2
- package/dist/components/calcite-color-picker-swatch/customElement.d.ts +0 -25
- package/dist/components/calcite-color-picker-swatch/customElement.js +0 -104
- package/dist/components/calcite-color-picker-swatch/index.d.ts +0 -1
- package/dist/components/calcite-color-picker-swatch/index.js +0 -1
- package/dist/components/calcite-focus-trap/customElement.d.ts +0 -53
- package/dist/components/calcite-focus-trap/customElement.js +0 -61
- package/dist/components/calcite-focus-trap/index.d.ts +0 -1
- package/dist/components/calcite-focus-trap/index.js +0 -1
package/dist/cdn/JUAYHBAX.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as e}from"./XIERF7M3.js";import{d as u}from"./K4N2EM4F.js";import"./2IM7ZZ7U.js";import{A as g}from"./2M4ETWZU.js";import{E as o,F as n,G as s,H as t,J as p,T as m,g as l,h as i,p as r}from"./2C677XOQ.js";var d=l`.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var( --calcite-theme-space-sm, var(--calcite-spacing-sm) );--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var( --calcite-theme-space-2xs, var(--calcite-spacing-xxs) )}.scale--s .first-title{padding-block-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}.scale--s .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var( --calcite-theme-space-md, var(--calcite-spacing-md) );--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var( --calcite-theme-space-xs, var(--calcite-spacing-xs) )}.scale--m .first-title{padding-block-start:var(--calcite-theme-space-md, var(--calcite-spacing-md))}.scale--m .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var( --calcite-theme-space-lg, var(--calcite-spacing-lg) );--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var( --calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus) )}.scale--l .first-title{padding-block-start:var(--calcite-theme-space-xl, var(--calcite-spacing-xl))}.scale--l .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host{margin:0;display:flex;flex-direction:column}.container{display:flex;flex-direction:column;background-color:var(--calcite-autocomplete-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}.container--no-spacing{padding-block-start:0}.separator{block-size:var(--calcite-theme-space-px, var(--calcite-spacing-px));background-color:var(--calcite-autocomplete-border-color, var(--calcite-color-border-3))}.heading{box-sizing:border-box;inline-size:100%;min-inline-size:0px;max-inline-size:100%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));padding-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);padding-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host([hidden]){display:none}[hidden]{display:none}`,v="calcite-autocomplete-item",c=class extends s{constructor(){super(...arguments),this.defaultSlotRef=o(),this._items=[],this.disableSpacing=!1,this.position=0,this.scale="m",this.calciteInternalAutocompleteItemGroupItemsChange=r({cancelable:!1})}static{this.properties={disableSpacing:[5,{},{type:Boolean}],heading:1,label:1,position:[9,{},{type:Number}],scale:1,items:[32,{},{attribute:!1,readOnly:!0}]}}static{this.styles=d}get items(){return this._items}loaded(){this.updateItems()}handleDefaultSlotChange(){this.updateItems()}updateItems(){let a=this.defaultSlotRef.value?g(this.defaultSlotRef.value,v):Array.from(this.el.children).filter(u);this._items=a,this.calciteInternalAutocompleteItemGroupItemsChange.emit()}render(){let{scale:a}=this,h=this.position>0?i`<div class=${t(e.separator)} role=separator></div>`:null;return i`<div aria-label=${this.label??this.heading??p} class=${t({[e.container]:!0,[e.containerNoSpacing]:this.disableSpacing,[e.scale(a)]:!0})} role=group>${h}<div class=${t({[e.heading]:!0,[e.firstTitle]:this.position===0})}>${this.heading}</div><slot @slotchange=${this.handleDefaultSlotChange} ${n(this.defaultSlotRef)}></slot></div>`}};m("calcite-autocomplete-item-group",c);export{c as AutocompleteItemGroup};
|
package/dist/cdn/LPE5WKMF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as c,b as r,c as i}from"./J2OH4U4P.js";import{i as F}from"./5NKPO7CK.js";import{a as S}from"./NC6GXJRL.js";import{a as E}from"./KAADRWY5.js";import{a as k}from"./ZDKXHZNU.js";import{a as A}from"./IQ5PDJZT.js";import"./JN6YLTUP.js";import{a as $,b as B}from"./2IM7ZZ7U.js";import{a as T}from"./EV2BLP2M.js";import{a as z}from"./VMHJHFFS.js";import"./B2B4K2SR.js";import"./Y664PBYS.js";import{s as x,y as w}from"./2M4ETWZU.js";import{E as g,F as v,G as b,H as o,L as y,T as C,g as p,h as a,p as l}from"./2C677XOQ.js";var L=300,d=class{constructor(){this.registeredElements=[]}registerElement(e){let{registeredElements:t}=this;if(!t.includes(e)){switch(e.queue){case"immediate":t.unshift(e);break;case"next":t.splice(1,0,e);break;case"last":t.push(e);break}this.updateAlerts()}}unregisterElement(e){let{registeredElements:t}=this,s=t.indexOf(e);s!==-1&&t.splice(s,1),e.active=!1,this.updateAlerts()}updateAlerts(){window.clearTimeout(this.queueTimeoutId),this.queueTimeoutId=void 0,this.registeredElements.forEach((e,t)=>{e.openAlertCount=this.registeredElements.length,t===0?this.queueTimeoutId=window.setTimeout(()=>e.active=!0,L):e.active=!1})}},R=p`:host([scale=s]){--calcite-internal-alert-action-spacing: var(--calcite-theme-space-xs, var(--calcite-spacing-xs))}:host([scale=m]){--calcite-internal-alert-action-spacing: var(--calcite-theme-space-xs, var(--calcite-spacing-xs))}:host([scale=l]){--calcite-internal-alert-action-spacing: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host{display:block;inline-size:var(--calcite-alert-width)}.container--embedded,.container[popover]{pointer-events:none;position:fixed;margin-inline:auto;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:min-content;align-items:center;justify-content:center;padding:0;text-align:start;opacity:0;inset:initial;box-shadow:var(--calcite-alert-shadow, var(--calcite-shadow-md));background-color:var(--calcite-alert-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));border-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));border-block-start:0 solid transparent;border-inline:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3);max-inline-size:calc(100% - var(--calcite-alert-offset-size, 2rem) * 2);transition:opacity var(--calcite-internal-animation-timing-slow) ease-in-out,all var(--calcite-animation-timing) ease-in-out;overflow:visible}.container--bottom,.container--top,.container--bottom[popover],.container--top[popover]{inset-inline-end:0;inset-inline-start:0}.container[class*=bottom]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),0);inset-block-end:var(--calcite-alert-offset-size, 2rem)}.container[class*=top]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),0);inset-block-start:var(--calcite-alert-offset-size, 2rem)}.container[class*=start]{inset-inline-start:var(--calcite-alert-offset-size, 2rem);inset-inline-end:auto}.container[class*=end]{inset-inline-end:var(--calcite-alert-offset-size, 2rem);inset-inline-start:auto}.icon{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;margin-block:auto;margin-inline-end:auto}.close{margin-inline-end:var(--calcite-internal-alert-action-spacing)}.queue-count{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;visibility:hidden;display:flex;min-inline-size:min-content;cursor:default;align-items:center;justify-content:space-around;align-self:stretch;overflow:hidden;text-align:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-2);opacity:0;border-inline:0 solid transparent;border-start-end-radius:0}.queue-count--active{visibility:visible;opacity:1}.dismiss-progress{position:absolute;display:block;inline-size:100%;overflow:hidden;inset-inline:0;inset-block-start:-2px;block-size:2px;border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}.dismiss-progress:after{position:absolute;inset-block-start:0px;display:block;block-size:2px;content:"";background-color:var(--calcite-color-transparent-tint);inset-inline-end:0}.actions-end{display:flex;gap:var(--calcite-internal-alert-action-spacing);padding-block:var(--calcite-internal-alert-action-spacing);padding-inline:0 var(--calcite-internal-alert-action-spacing)}.text-container{box-sizing:border-box;display:flex;min-inline-size:0px;flex:1 1 auto;flex-direction:column;overflow-wrap:break-word}.footer{position:relative;display:flex;inline-size:auto;justify-content:flex-end;align-self:stretch;padding-block-start:1px;block-size:inherit}:host([scale=s]) slot[name=title]::slotted(*),:host([scale=s]) *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) .queue-count{margin-inline:.5rem}:host([scale=s]) .container{--calcite-internal-alert-min-height: 3.5rem;inline-size:var(--calcite-alert-width, 40em)}:host([scale=s]) .icon{padding-inline-start:.75rem}:host([scale=s]) .text-container{padding-block:.5rem;padding-inline:.75rem .5rem}:host([scale=m]) slot[name=title]::slotted(*),:host([scale=m]) *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) .queue-count{margin-inline:.75rem}:host([scale=m]) .container{--calcite-internal-alert-min-height: 4.1875rem;inline-size:var(--calcite-alert-width, 50em)}:host([scale=m]) .icon{padding-inline-start:1rem}:host([scale=m]) .text-container{padding-block:.75rem;padding-inline:1rem .75rem}:host([scale=l]) slot[name=title]::slotted(*),:host([scale=l]) *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .queue-count{margin-inline:1rem}:host([scale=l]) .container{--calcite-internal-alert-min-height: 5.625rem;inline-size:var(--calcite-alert-width, 60em)}:host([scale=l]) .icon{padding-inline-start:1.25rem}:host([scale=l]) .text-container{padding-block:1rem;padding-inline:1.25rem 1rem}:host([open]) .container--active{border-block-start-width:2px;opacity:1;pointer-events:initial}:host([open]) .container--active[class*=bottom]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),inherit)}:host([open]) .container--active[class*=top]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),inherit)}:host([auto-close])>.queue-count{border-inline-end:0 solid transparent}slot[name=title]::slotted(*),*::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}slot[name=message]::slotted(*),*::slotted([slot=message]){margin:0;display:inline;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));margin-inline-end:.5rem;color:var(--calcite-color-text-2)}slot[name=link]::slotted(*),*::slotted([slot=link]){color:var(--calcite-color-text-link)}slot[name=link]::slotted(:not(calcite-link)){display:inline-flex}:host([kind=brand]) .container{border-block-start-color:var(--calcite-color-brand)}:host([kind=brand]) .container .icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-block-start-color:var(--calcite-color-status-info)}:host([kind=info]) .container .icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-block-start-color:var(--calcite-color-status-success)}:host([kind=success]) .container .icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-block-start-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .icon{color:var(--calcite-color-status-warning)}:host([auto-close-duration=fast]) .dismiss-progress:after{animation:dismissProgress calc(6s * var(--calcite-internal-duration-factor)) ease-out}:host(:hover[auto-close-duration=fast]) .dismiss-progress:after,:host(:focus[auto-close-duration=fast]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=medium]) .dismiss-progress:after{animation:dismissProgress calc(10s * var(--calcite-internal-duration-factor)) ease-out}:host(:hover[auto-close-duration=medium]) .dismiss-progress:after,:host(:focus[auto-close-duration=medium]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=slow]) .dismiss-progress:after{animation:dismissProgress calc(14s * var(--calcite-internal-duration-factor)) ease-out}:host(:hover[auto-close-duration=slow]) .dismiss-progress:after,:host(:focus[auto-close-duration=slow]) .dismiss-progress:after{animation-play-state:paused}.container.focused .dismiss-progress:after{animation-play-state:paused}@keyframes dismissProgress{0%{inline-size:0px;opacity:.75}to{inline-size:100%;opacity:1}}:host([top-layer-disabled]) .container,.container--embedded{z-index:var(--calcite-z-index-toast)}.container--embedded{position:absolute}:host([hidden]){display:none}[hidden]{display:none}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}`,n=new d,h=class extends b{constructor(){super(...arguments),this.initialOpenTime=-1,this.isHovered=!1,this.lastMouseOverBegin=-1,this.transitionProp="opacity",this.totalHoverTime=0,this.totalOpenTime=0,this.transitionRef=g(),this.messages=A(),this.focusSetter=T()(this),this.topLayer=S({disabledOverride:()=>this.embedded,target:this.transitionRef})(this),this.hasEndActions=!1,this.isFocused=!1,this.numberStringFormatter=new F,this.active=!1,this.autoClose=!1,this.autoCloseDuration="medium",this.embedded=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.openAlertCount=0,this.placement="bottom",this.queue="last",this.scale="m",this.topLayerDisabled=!1,this.calciteAlertBeforeClose=l({cancelable:!1}),this.calciteAlertBeforeOpen=l({cancelable:!1}),this.calciteAlertClose=l({cancelable:!1}),this.calciteAlertOpen=l({cancelable:!1})}static{this.properties={hasEndActions:[16,{},{state:!0}],isFocused:[16,{},{state:!0}],numberStringFormatter:[16,{},{state:!0}],active:[5,{},{type:Boolean}],autoClose:[7,{},{reflect:!0,type:Boolean}],autoCloseDuration:[3,{},{reflect:!0}],embedded:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:y},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],openAlertCount:[9,{},{type:Number}],placement:[3,{},{reflect:!0}],queue:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=R}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.open&&n.registerElement(this.el),this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("active")&&(this.hasUpdated||this.active!==!1)&&this.handleActiveChange(),e.has("autoCloseDuration")&&(this.hasUpdated||this.autoCloseDuration!=="medium")&&this.updateDuration(),e.has("queue")&&(this.hasUpdated||this.queue!=="last")&&this.handleQueueChange(),e.has("numberingSystem")&&this.numberingSystemChange(),e.has("messages")&&this.effectiveLocaleChange()}disconnectedCallback(){super.disconnectedCallback(),n.unregisterElement(this.el),this.clearAutoCloseTimeout(),this.embedded=!1}handleActiveChange(){E(this),this.clearAutoCloseTimeout(),this.active&&this.autoClose&&!this.autoCloseTimeoutId&&(this.initialOpenTime=Date.now(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),c[this.autoCloseDuration]))}openHandler(){this.open?n.registerElement(this.el):n.unregisterElement(this.el)}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(this.clearAutoCloseTimeout(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),c[this.autoCloseDuration]))}handleQueueChange(){this.open&&(n.unregisterElement(this.el),n.registerElement(this.el))}handleKeyBoardFocus(){this.isFocused=!0,this.handleFocus()}handleKeyBoardBlur(){this.isFocused=!1,this.isHovered||this.handleBlur()}effectiveLocaleChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}numberingSystemChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}clearAutoCloseTimeout(){window.clearTimeout(this.autoCloseTimeoutId),this.autoCloseTimeoutId=void 0}closeAlert(){this.open=!1,this.clearAutoCloseTimeout()}onBeforeOpen(){this.calciteAlertBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit(),this.topLayer.hide()}actionsEndSlotChangeHandler(e){this.hasEndActions=w(e)}handleMouseOver(){this.isHovered=!0,this.handleFocus()}handleMouseLeave(){this.isHovered=!1,this.isFocused||this.handleBlur()}handleFocus(){this.clearAutoCloseTimeout(),this.totalOpenTime=Date.now()-this.initialOpenTime,this.lastMouseOverBegin=Date.now()}handleBlur(){let e=Date.now()-this.lastMouseOverBegin,t=c[this.autoCloseDuration]-this.totalOpenTime+this.totalHoverTime;this.totalHoverTime=this.totalHoverTime?e+this.totalHoverTime:e,this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),t)}render(){let{open:e,autoClose:t,label:s,placement:D,active:u,openAlertCount:q}=this,I=t?"alert":"alertdialog",m=!e,f=x(this.kind==="brand"?$:B,this.icon,this.kind),H=q>1;return this.el.inert=m,this.el.ariaLabel=s,this.el.toggleAttribute("calcite-hydrated-hidden",m),this.el.role=I,a`<div class=${o({[i.container]:!0,[i.containerActive]:u,[`${i.container}--${D}`]:!0,[i.containerEmbedded]:this.embedded,[i.focused]:this.isFocused})} @pointerenter=${this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:void 0} @pointerleave=${this.autoClose?this.handleMouseLeave:void 0} .popover=${this.embedded?void 0:"manual"} ${v(this.transitionRef)}>${f&&this.renderIcon(f)||""}<div class=${o(i.textContainer)} @focusin=${this.autoClose&&this.autoCloseTimeoutId?this.handleKeyBoardFocus:void 0} @focusout=${this.autoClose?this.handleKeyBoardBlur:void 0}><slot name=${r.title}></slot><slot name=${r.message}></slot><slot name=${r.link}></slot></div>${this.renderActionsEnd()}${H?this.renderQueueCount():void 0}${this.renderCloseButton()}${e&&u&&t?a`<div class=${o(i.dismissProgress)}></div>`:void 0}</div>`}renderCloseButton(){return a`<calcite-action class=${o(i.close)} icon=x .label=${this.messages.close} @click=${this.closeAlert} @focusin=${this.autoClose?this.handleKeyBoardFocus:void 0} @focusout=${this.autoClose?this.handleKeyBoardBlur:void 0} .scale=${this.scale} .text=${this.messages.close}></calcite-action>`}renderQueueCount(){let{openAlertCount:e}=this,t=e>2?e-1:1,s=this.numberStringFormatter.numberFormatter.format(t);return k("queue-count",a`<div class=${o({[i.queueCount]:!0,[i.queueCountActive]:e>1})}><calcite-chip .label=${s} .scale=${this.scale} .value=${s}>${s}</calcite-chip></div>`)}renderActionsEnd(){return a`<div class=${o(i.actionsEnd)}><slot name=${r.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderIcon(e){return a`<div class=${o(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${e} .scale=${z(this.scale)}></calcite-icon></div>`}};C("calcite-alert",h);export{h as Alert};
|
package/dist/cdn/M4RGPK4P.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{c as o}from"./IR2A2F5H.js";import{a as S}from"./YC33WRPJ.js";import{a as k}from"./D4HRXS4E.js";import{c as A}from"./DQADORUS.js";import{a as C}from"./XN5GTOTE.js";import{a as D}from"./VITY2ZWH.js";import{a as I}from"./7235Z7Q6.js";import{a as w}from"./IQ5PDJZT.js";import"./2IM7ZZ7U.js";import{a as x}from"./EV2BLP2M.js";import"./VMHJHFFS.js";import{e as b}from"./B2B4K2SR.js";import"./Y664PBYS.js";import{z as y}from"./2M4ETWZU.js";import{G as u,H as f,L as g,T as v,g as h,h as c,l as m,p}from"./2C677XOQ.js";var $={itemWrapper:"item-wrapper"},z={validationMessage:"segmentedControlValidationMessage"},E=h`: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:flex;flex-direction:column}.item-wrapper{display:flex;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));inline-size:fit-content;border-radius:var(--calcite-segmented-control-corner-radius, var(--calcite-corner-radius));outline:1px solid var(--calcite-segmented-control-border-color, var(--calcite-color-border-input));outline-offset:-1px}:host([appearance=outline])>.item-wrapper{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([layout=vertical])>.item-wrapper{flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full])>.item-wrapper{inline-size:100%;min-inline-size:fit-content}:host([width=full])>.item-wrapper ::slotted(calcite-segmented-control-item){flex:1 1 auto}:host([width=full][layout=vertical])>.item-wrapper ::slotted(calcite-segmented-control-item){justify-content:flex-start}.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--2)}: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--1)}: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-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends u{constructor(){super(),this.direction=b(),this.formSupport=A({inputType:"text"})(this),this.items=[],this.messages=w(),this.focusSetter=x()(this),this.interactiveContainer=I(this),this.appearance="solid",this.disabled=!1,this.layout="horizontal",this.required=!1,this.scale="m",this.status="idle",this.value=null,this.width="auto",this.calciteSegmentedControlChange=p({cancelable:!1}),D(this),this.listen("calciteInternalSegmentedControlItemChange",this.handleSelected),this.listen("keydown",this.handleKeyDown),this.listen("click",this.handleClick)}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:g},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1,width:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=E}async setFocus(e){return this.focusSetter(()=>this.selectedItem||this.items[0],e)}willUpdate(e){(e.has("appearance")&&(this.hasUpdated||this.appearance!=="solid")||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.handleItemPropChange(),e.has("value")&&(this.hasUpdated||this.value!==null)&&this.valueHandler(this.value),e.has("selectedItem")&&this.handleSelectedItemChange(this.selectedItem,e.get("selectedItem"))}loaded(){this.formSupport.overrideDefaultValue(this.value)}valueHandler(e){let{items:t}=this;t.forEach(a=>a.checked=a.value===e)}handleSelectedItemChange(e,t){if(this.value=e?.value,e===t)return;let{items:a}=this,l=a.filter(s=>s===e).pop();l?this.selectItem(l):a[0]&&(a[0].tabIndex=0)}handleClick(e){this.disabled||o(e.target)&&this.selectItem(e.target,!0)}handleSelected(e){e.preventDefault();let t=e.target;t.checked&&this.selectItem(t),e.stopPropagation()}handleKeyDown(e){let t=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:a}=e,{selectedItem:l}=this;if(t.indexOf(a)===-1)return;let s=a;this.direction==="rtl"&&(a==="ArrowRight"&&(s="ArrowLeft"),a==="ArrowLeft"&&(s="ArrowRight"));let{items:i}=this,r=-1;switch(i.forEach((n,L)=>{n===l&&(r=L)}),s){case"ArrowLeft":case"ArrowUp":{e.preventDefault();let n=r<1?i[i.length-1]:i[r-1];this.selectItem(n,!0);return}case"ArrowRight":case"ArrowDown":{e.preventDefault();let n=r===-1?i[1]:i[r+1]||i[0];this.selectItem(n,!0);return}case" ":e.preventDefault(),this.selectItem(e.target,!0);return;default:return}}handleItemPropChange(){let{items:e}=this;e.forEach(t=>{t.appearance=this.appearance,t.layout=this.layout,t.scale=this.scale})}handleSelectedItem(){let{items:e}=this,t=e.filter(a=>a.checked).pop();t?this.selectItem(t):e[0]&&(e[0].tabIndex=0)}async handleDefaultSlotChange(e){let t=y(e).filter(o);await Promise.all(t.map(a=>a.componentOnReady())),this.items=t,this.handleSelectedItem(),this.handleItemPropChange()}onLabelClick(){this.setFocus()}async selectItem(e,t=!1){if(e===this.selectedItem)return;let{items:a}=this,l;a.forEach(s=>{let i=s===e;(i&&!s.checked||!i&&s.checked)&&(s.checked=i),s.tabIndex=i?0:-1,i&&(l=s)}),this.selectedItem=l,l&&t&&(await this.updateComplete,this.calciteSegmentedControlChange.emit(),l.focus())}render(){return this.el.role="radiogroup",c`${this.labelText&&k({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${z.validationMessage} aria-label=${C(this)??m} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${f($.itemWrapper)}>${this.interactiveContainer({disabled:this.disabled,children:c`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}</div>${this.validationMessage&&this.status==="invalid"?S({icon:this.validationIcon,id:z.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};v("calcite-segmented-control",d);export{d as SegmentedControl};
|
package/dist/cdn/NDICGBNV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as y}from"./KAADRWY5.js";import{a as b}from"./IQ5PDJZT.js";import{a as k,b as x}from"./2IM7ZZ7U.js";import{a as f}from"./EV2BLP2M.js";import{a as u}from"./VMHJHFFS.js";import"./B2B4K2SR.js";import"./Y664PBYS.js";import{s as r,y as m}from"./2M4ETWZU.js";import{E as n,F as l,G as g,H as t,L as p,T as v,g as h,h as c,p as o}from"./2C677XOQ.js";var a={title:"title",message:"message",link:"link",actionsEnd:"actions-end"},i={actionsEnd:"actions-end",close:"notice-close",container:"container",content:"notice-content",icon:"notice-icon"},w=h`:host([scale=s]){--calcite-notice-spacing-token-small: .5rem;--calcite-notice-spacing-token-large: .75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]){--calcite-notice-spacing-token-small: .75rem;--calcite-notice-spacing-token-large: 1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]){--calcite-notice-spacing-token-small: 1rem;--calcite-notice-spacing-token-large: 1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .notice-close{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]) .actions-end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));gap:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([width=auto]){--calcite-notice-width: auto}:host([width=half]){--calcite-notice-width: 50%}:host([width=full]){--calcite-notice-width: 100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;opacity:0;overflow:hidden;max-block-size:0;transition-property:opacity,max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-radius:var(--calcite-notice-corner-radius, var(--calcite-corner-radius-sm));box-shadow:var(--calcite-notice-shadow, var(--calcite-shadow-none))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;overflow:visible}@starting-style{:host([open]) .container{opacity:0;max-block-size:0}}:host([open][appearance=outline-fill]) .container{border:var(--calcite-border-width-sm) solid}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-notice-title-text-color, var(--calcite-color-text-1))}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0;display:inline;font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=title]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=title]){color:var(--calcite-notice-title-text-color, var(--calcite-color-text-inverse))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=message]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=message]){color:var(--calcite-notice-content-text-color, var(--calcite-color-text-inverse))}.notice-content{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;box-sizing:border-box;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-large)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;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;box-sizing:border-box;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;padding-inline:var(--calcite-notice-spacing-token-small)}.notice-close{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;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;flex:0 0 auto;margin-inline-end:var(--calcite-theme-space-xs, var(--calcite-spacing-xs));--calcite-action-background-color: var(--calcite-notice-close-background-color);--calcite-action-background-color-hover: var( --calcite-notice-close-background-color-hover, var(--calcite-notice-close-background-color-focus) );--calcite-action-background-color-press: var(--calcite-notice-close-background-color-press);--calcite-action-text-color: var(--calcite-notice-close-icon-color, var(--calcite-color-text-3));--calcite-action-text-color-press: var(--calcite-notice-close-icon-color-hover)}.actions-end{display:flex;align-items:center;flex:0 0 auto;margin-inline-end:var(--calcite-theme-space-xs, var(--calcite-spacing-xs));gap:var(--calcite-theme-space-xs, var(--calcite-spacing-xs))}:host([kind=brand][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-brand) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-brand) 5%, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))))}:host([kind=brand][appearance=outline-fill]) .notice-icon,:host([kind=brand][appearance=transparent]) .notice-icon{color:var(--calcite-color-brand)}:host([kind=info][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-info) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-info) 5%, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))))}:host([kind=info][appearance=outline-fill]) .notice-icon,:host([kind=info][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-danger) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-danger) 5%, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))))}:host([kind=danger][appearance=outline-fill]) .notice-icon,:host([kind=danger][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-success) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-success) 5%, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))))}:host([kind=success][appearance=outline-fill]) .notice-icon,:host([kind=success][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-warning) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-warning) 5%, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))))}:host([kind=warning][appearance=outline-fill]) .notice-icon,:host([kind=warning][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-warning)}:host([kind=neutral][appearance=outline-fill]) .container{border-color:var(--calcite-color-border-2);background-color:var(--calcite-notice-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}:host([kind=neutral]) .notice-icon{color:var(--calcite-color-text-3)}:host([appearance=transparent]) .container{background-color:transparent}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends g{constructor(){super(...arguments),this.closeButtonRef=n(),this.transitionProp="opacity",this.transitionRef=n(),this.messages=b(),this.focusSetter=f()(this),this.hasActionEnd=!1,this.appearance="outline-fill",this.closable=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.scale="m",this.width="auto",this.calciteNoticeBeforeClose=o({cancelable:!1}),this.calciteNoticeBeforeOpen=o({cancelable:!1}),this.calciteNoticeClose=o({cancelable:!1}),this.calciteNoticeOpen=o({cancelable:!1})}static{this.properties={hasActionEnd:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:p},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=w}async setFocus(e){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,e)}async load(){this.kindIcons={...x,brand:k.brand},this.requestedIcon=r(this.kindIcons,this.icon,this.kind)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&y(this),(e.has("icon")||e.has("kind")&&(this.hasUpdated||this.kind!=="brand"))&&(this.requestedIcon=r(this.kindIcons,this.icon,this.kind))}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}close(){this.open=!1}handleActionsEndSlotChange(e){this.hasActionEnd=m(e)}render(){let{open:e}=this,d=!e;this.el.inert=d;let z=c`<calcite-action class=${t(i.close)} icon=x @click=${this.close} .scale=${this.scale} .text=${this.messages.close} ${l(this.closeButtonRef)}></calcite-action>`;return c`<div class=${t(i.container)} ${l(this.transitionRef)}>${this.requestedIcon?c`<div class=${t(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${u(this.scale)}></calcite-icon></div>`:null}<div class=${t(i.content)}><slot name=${a.title}></slot><slot name=${a.message}></slot><slot name=${a.link}></slot></div><div class=${t(i.actionsEnd)} .hidden=${!this.hasActionEnd}><slot name=${a.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?z:null}</div>`}};v("calcite-notice",s);export{s as Notice};
|
package/dist/cdn/Q6VH6KBT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as w,b as R}from"./7XS2SBMV.js";import{a as it}from"./WICQMZUZ.js";import{a as et}from"./5K4OZJAZ.js";import{a as J}from"./FDHY2TZA.js";import{b as at}from"./6FZVJGKC.js";import{a as I,d as f}from"./HJHRSII7.js";import{c as N,e as S}from"./TJGNWJF6.js";import{c as U}from"./UTXN6YZB.js";import{a as tt}from"./IQ5PDJZT.js";import"./2IM7ZZ7U.js";import{a as _}from"./EV2BLP2M.js";import"./VMHJHFFS.js";import{e as X}from"./B2B4K2SR.js";import"./Y664PBYS.js";import{A as Z,D as T,I as g,r as H,z as Y}from"./2M4ETWZU.js";import{E as A,F as E,G as V,H as z,N as K,Q as P,T as Q,g as j,h as m,l as F,p as O}from"./2C677XOQ.js";var ot={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function lt(s,t){return t||s.closest("calcite-shell-panel")?.position||"start"}function dt({actions:s,expandables:t,expanded:e}){s.filter(i=>i.slot!==I.menuActions).forEach(i=>i.textEnabled=e),t.forEach(i=>i.expanded=e)}var ht=({tooltip:s,referenceElement:t,expanded:e,ref:i})=>(s&&(s.referenceElement=!e&&t?t:void 0),i&&i(t),t),pt=({collapseText:s,collapseLabel:t,direction:e,expanded:i,expandText:a,expandLabel:r,toggle:n,el:o,position:l,tooltip:c,ref:d,scale:G})=>{let M=e==="rtl",x=i?s:a,u=i?t:r,h=[ot.chevronsLeft,ot.chevronsRight];M&&h.reverse();let v=lt(o,l)==="end",C=v?h[1]:h[0],p=v?h[0]:h[1];return m`<calcite-action .aria=${{expanded:i}} .icon=${i?C:p} id=expand-toggle .label=${u} @click=${n} .scale=${G} .text=${x} .textEnabled=${i} title=${(!i&&!c?x:void 0)??F} ${E($=>ht({tooltip:c,referenceElement:$,expanded:i,ref:d}))}></calcite-action>`},ut=({bufferSize:s=0,containerSize:t,itemSizes:e})=>{let i=t-s,a=e.length,r=0;for(let[n,o]of e.entries())if(r=r+o,r>i){a=n;break}else continue;return a},gt=({bufferSize:s=0,containerSize:t,itemSizes:e})=>Math.max(e.length-ut({bufferSize:s,itemSizes:e,containerSize:t}),0),ft=s=>s.flatMap(t=>f(t)?t.actions:S(t)?t.actions.filter(e=>e.slot===N.trigger):t).filter(t=>!!t),vt=({item:s,containerRect:t,horizontal:e,rtl:i})=>{let a=s.getBoundingClientRect();return e?a.top-t.top:i?t.right-a.right:a.left-t.left},bt=({actionGroups:s,expanded:t,overflowCount:e})=>{let i=e;[...s].reverse().forEach(a=>{let r=0,n=a.actions.filter(o=>o.parentElement===a).reverse();n.forEach(o=>{o.slot===I.menuActions&&(o.removeAttribute("slot"),o.textEnabled=t)}),i>0&&!a.overflowActionsDisabled&&n.some(o=>(n.filter(c=>!c.slot).length>1&&n.length>2&&!o.closest("calcite-action-menu")&&!o.overflowDisabled&&(o.textEnabled=!0,o.setAttribute("slot",I.menuActions),r++,r>1&&i--),i<1)),a.manager.component.requestUpdate()})},mt=j`: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--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{display:inline-flex;align-self:stretch;background:transparent;--calcite-internal-action-group-dividing-border-margin: calc( var(--calcite-theme-space-base, var(--calcite-spacing-base)) + 1px )}.container{display:inline-flex;flex:1 1 auto;flex-direction:column;background-color:var(--calcite-action-bar-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));gap:var(--calcite-internal-action-bar-gap);padding:var(--calcite-internal-action-bar-padding)}@keyframes in{0%{opacity:0}to{opacity:1}}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;padding-block-end:var(--calcite-internal-action-bar-padding)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;border-inline-end-width:var(--calcite-border-width-sm);padding-inline-end:var(--calcite-internal-action-bar-padding)}.action-group--end{justify-content:flex-end}.line-overlay{position:absolute;inset:0;pointer-events:none}.line{position:absolute;--calcite-internal-action-bar-divider-inset: calc( var(--calcite-internal-action-group-dividing-border-margin) - var(--calcite-border-width-sm) )}:host([overflow-mode=wrap][layout=horizontal]) .container,:host([overflow-mode=wrap][layout=vertical]) .container{position:relative;flex-wrap:wrap;align-content:flex-start;--calcite-internal-action-bar-line-gap: calc( var(--calcite-internal-action-bar-padding) + var(--calcite-internal-action-bar-gap) )}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group[slot=actions-start]),:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group[slot=actions-start]){padding-inline-end:0;padding-block-end:0;border-inline-end-width:0;border-block-end-width:0}:host([overflow-mode=wrap][layout=horizontal]) .container{row-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-inline-start:calc(-1 * var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-action-bar-padding) 0;border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0;border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=horizontal]) .line{inset-inline:var(--calcite-internal-action-bar-padding);block-size:var(--calcite-border-width-sm);inset-block-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to right,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups{overflow:hidden;padding-inline-start:0;column-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups .action-group--start{padding-inline-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=wrap][layout=vertical]) .container{block-size:100%;min-block-size:0;column-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-block-start:calc(-1 * var(--calcite-border-width-sm));padding-block:var(--calcite-internal-action-bar-padding) 0;border-block-start-width:var(--calcite-border-width-sm);border-block-end-width:0;border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=vertical]) .line{inset-block:var(--calcite-internal-action-bar-padding);inline-size:var(--calcite-border-width-sm);inset-inline-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to bottom,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups{overflow:hidden;padding-block-start:0;row-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups .action-group--start{padding-block-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=none][layout=horizontal]) .container{overflow-x:auto}:host([overflow-mode=none][layout=vertical]) .container{overflow-y:auto}:host([hidden]){display:none}[hidden]{display:none}`,q=class extends V{constructor(){super(),this.actions=[],this.containerRef=A(),this.defaultSlotRef=A(),this.actionsStartSlotRef=A(),this.actionsEndSlotRef=A(),this.actionsStartGroupRef=A(),this.actionsEndGroupRef=A(),this.direction=X(),this.defaultSlotItems=[],this.actionGroups=[],this.actionMenus=[],this.actionsStart=[],this.actionsStartGroups=[],this.actionsEnd=[],this.actionsEndGroups=[],this.overflowPassId=0,this.suppressedActionGroupActionsChange=new WeakMap,this.cancelable=it()(this),this.resize=et(({width:t,height:e})=>{let{expanded:i,expandToggleDisabled:a,layout:r,expandPosition:n}=this;if(!this.containerRef.value)return;if(this.usesWrap){this.scheduleLineMeasure();return}if(this.overflowMode!=="collapse"||r==="vertical"&&!e||r==="horizontal"&&!t)return;this.updateGroups();let o=this.getItemSizes(),{actionGroups:l,actionsEnd:c,actionsEndGroups:d,actionsStart:G,actionsStartGroups:M,defaultSlotItems:x}=this,u=[...M,...l,...d],h=this.hasActionsEnd||!a&&n==="end"?1:0,v=this.hasActionsStart||!a&&n==="start"?1:0,C=x.length+h+v,p=C,y=getComputedStyle(this.containerRef.value);if(p+=g(r==="horizontal"?y.paddingInlineStart:y.paddingBlockStart)+g(r==="horizontal"?y.paddingInlineEnd:y.paddingBlockEnd),u.length>0){let D=u.length-1;u.forEach((k,L)=>{let b=getComputedStyle(k),B=g(b.gap),W=this.getActionGroupItemCount(k),ct=Math.max(W-1,0);p+=B*ct,L!==D&&(p+=g(r==="horizontal"?b.paddingInlineEnd:b.paddingBlockEnd),p+=g(r==="horizontal"?b.borderInlineEndWidth:b.borderBlockEndWidth))})}let $=(D,k,L)=>{if(!k||D.length<1)return;let b=getComputedStyle(k),B=g(b.gap),W=D.length+(L?1:0);p+=B*Math.max(W-1,0)},nt=!a&&n==="start",rt=!a&&n==="end";$(G,this.actionsStartGroupRef.value,nt),$(c,this.actionsEndGroupRef.value,rt),C>1&&(p+=g(y.gap)*(C-1));let st=gt({bufferSize:p,containerSize:r==="horizontal"?t:e,itemSizes:o});this.runOverflowActions({actionGroups:u,expanded:i,overflowCount:st})},K.resize),this.resizeHandler=t=>{if(this.usesWrap){this.scheduleLineMeasure();return}let{width:e,height:i}=t.contentRect;this.resize({width:e,height:i})},this.resizeObserver=J("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.messages=tt({blocking:!0}),this.focusSetter=_()(this),this.setExpandToggleEl=t=>{this.expandToggleEl=t},this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasActionGroups=!1,this.lineOffsets=[],this.floating=!1,this.expandToggleDisabled=!1,this.expanded=!1,this.expandPosition="end",this.layout="vertical",this.overflowMode="collapse",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionBarCollapse=O({cancelable:!1}),this.calciteActionBarExpand=O({cancelable:!1}),this.calciteActionBarToggle=O({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange),this.listen("calciteInternalActionMenuActionsChange",this.handleActionMenuActionsChange),this.listen("keydown",this.handleKeyDown)}static{this.properties={expandTooltip:[16,{},{state:!0}],hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasActionGroups:[16,{},{state:!0}],lineOffsets:[16,{},{state:!0}],actionsEndGroupLabel:1,actionsStartGroupLabel:1,floating:[7,{},{reflect:!0,type:Boolean}],expandToggleDisabled:[7,{},{reflect:!0,type:Boolean}],expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],expandPosition:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],overflowMode:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=mt}get usesWrap(){return this.overflowMode==="wrap"&&this.layout!=="grid"}get expandDisabled(){return this.expandToggleDisabled}set expandDisabled(t){P.deprecated("property",{component:this,name:"expandDisabled",removalVersion:6,suggested:"expandToggleDisabled"}),this.expandToggleDisabled=t}get overflowActionsDisabled(){return this.overflowMode==="none"}set overflowActionsDisabled(t){P.deprecated("property",{component:this,name:"overflowActionsDisabled",removalVersion:7,suggested:'overflowMode="none"'}),this.overflowMode=t?"none":"collapse"}async overflowActions(){if(this.overflowMode!=="collapse"){this.usesWrap&&this.scheduleLineMeasure();return}this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.overflowModeHandler(),this.cancelable.add(this.resize)}willUpdate(t){(t.has("expandDisabled")&&(this.hasUpdated||this.expandDisabled!==!1)||t.has("expandToggleDisabled")&&(this.hasUpdated||this.expandToggleDisabled!==!1)||t.has("expandPosition")&&(this.hasUpdated||this.expandPosition!=="end"))&&this.overflowActions(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.updateGroups(),this.overflowModeHandler(),this.usesWrap||this.updateLines()),t.has("overflowMode")&&(this.hasUpdated||this.overflowMode!=="collapse")&&(!this.usesWrap&&this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0),this.usesWrap?this.scheduleLineMeasure():this.updateLines(),this.overflowModeHandler()),t.has("expanded")&&this.hasUpdated&&(this.expandedHandler(),this.expanded?this.calciteActionBarExpand.emit():this.calciteActionBarCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}updated(){this.usesWrap&&this.lineMeasureFrame==null&&this.scheduleLineMeasure()}loaded(){this.syncDefaultSlot(),this.syncActionsStartSlot(),this.syncActionsEndSlot(),this.syncActionsState(),this.overflowActions()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0)}getItemSizes(){let{layout:t,expandToggleEl:e}=this,i=t==="horizontal"?"clientWidth":"clientHeight",a=this.actions.map(o=>o[i]||0);this.getTrackedActionGroups().flatMap(o=>H(o,"calcite-action-menu")).forEach(o=>{let l=o.actions.find(c=>c.slot===N.trigger);a.push((l??o)[i]||0)}),e&&a.push(e[i]||0);let n=Math.max(...a,0);return a.map(o=>o||n)}getActionGroupItemCount(t){let e=t.actions.filter(a=>a.parentElement===t),i=H(t,"calcite-action-menu").length;return e.length+i}expandedHandler(){this.syncActionsState(!0),this.overflowActions()}overflowModeHandler(){this.overflowMode==="none"?this.resizeObserver?.disconnect():this.resizeObserver?.observe(this.el),this.overflowActions()}actionMenuOpenHandler(t){let e=t.composedPath(),i=e.find(a=>f(a)||S(a));i&&(f(i)&&!i.menuOpen||S(i)&&!i.open||(this.getTrackedActionGroups().forEach(a=>{e.includes(a)||(a.menuOpen=!1)}),this.getTrackedActionMenus().forEach(a=>{e.includes(a)||(a.open=!1)})))}runOverflowActions({actionGroups:t,expanded:e,overflowCount:i}){let a=++this.overflowPassId,r=new Map;t.forEach(n=>{let o=n.actions.filter(l=>l.parentElement===n);r.set(n,o.map(l=>l.slot??"").join("|"))}),bt({actionGroups:t,expanded:e,overflowCount:i}),t.forEach(n=>{let l=n.actions.filter(c=>c.parentElement===n).map(c=>c.slot??"").join("|");r.get(n)!==l&&(this.suppressedActionGroupActionsChange.set(n,a),this.queueSuppressedActionGroupActionsChangeCleanup(n,a))})}queueSuppressedActionGroupActionsChangeCleanup(t,e){queueMicrotask(()=>{this.suppressedActionGroupActionsChange.get(t)===e&&this.suppressedActionGroupActionsChange.delete(t)})}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}getSectionWrapperGroups(){return[this.actionsStartGroupRef.value,this.actionsEndGroupRef.value].filter(t=>!!t)}updateGroups(){let t=[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups,...this.getSectionWrapperGroups()];this.hasActionGroups=this.actionGroups.length>0,t.forEach(e=>{e.layout=this.layout,e.scale=this.scale})}scheduleLineMeasure(){this.lineMeasureFrame!=null&&cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=requestAnimationFrame(()=>{this.lineMeasureFrame=void 0,this.updateLines()})}getWrapItems(){let t=[],e=this.actionsStartGroupRef.value;e&&!e.hidden&&t.push(e),this.defaultSlotItems.forEach(a=>{a.hidden||t.push(a)});let i=this.actionsEndGroupRef.value;return i&&!i.hidden&&t.push(i),t}updateLines(){let t=this.containerRef.value;if(!t||!this.usesWrap){this.lineOffsets.length>0&&(this.lineOffsets=[]);return}let e=this.layout==="horizontal",i=this.direction==="rtl",a=t.getBoundingClientRect(),r=this.getWrapItems(),n=[],o=null;r.forEach(c=>{let d=vt({item:c,containerRect:a,horizontal:e,rtl:i});o!==null&&Math.abs(d-o)>1&&n.push(d),o=d}),(n.length!==this.lineOffsets.length||n.some((c,d)=>c!==this.lineOffsets[d]))&&(this.lineOffsets=n)}handleDefaultSlotChange(){this.syncSlotAndActions(()=>this.syncDefaultSlot()),this.usesWrap&&this.scheduleLineMeasure()}handleActionsEndSlotChange(){this.syncSlotAndActions(()=>this.syncActionsEndSlot())}handleActionsStartSlotChange(){this.syncSlotAndActions(()=>this.syncActionsStartSlot())}handleTooltipSlotChange(t){let e=Y(t).filter(at);this.expandTooltip=e[0]}updateActions(){let t=new Set(this.actions);this.getTrackedActionMenus().forEach(e=>{e.actions.forEach(i=>t.add(i))}),t.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}syncActions(){this.actions=ft([...this.actionsStart,...this.defaultSlotItems,...this.actionsEnd])}syncActionsAndOverflow(){this.syncActionsState(),this.overflowActions()}syncSlotAndActions(t){t(),this.syncActionsAndOverflow()}syncActionsState(t=!1){this.syncActions(),this.updateActions(),t&&dt({actions:this.actions,expandables:[...this.getTrackedActionGroups(),...this.getTrackedActionMenus(),...this.getSectionWrapperGroups()],expanded:this.expanded})}getTrackedActionGroups(){return[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups]}getTrackedActionMenus(){return[...this.actionMenus,...this.actionsStart,...this.actionsEnd].filter(t=>S(t))}getAssignedActionBarItems(t){return t?Z(t).filter(e=>U(e)||f(e)||S(e)):[]}syncDefaultSlot(){this.defaultSlotItems=this.getAssignedActionBarItems(this.defaultSlotRef.value),this.actionGroups=this.defaultSlotItems.filter(t=>f(t)),this.actionMenus=this.defaultSlotItems.filter(t=>S(t)),this.updateGroups()}syncActionsStartSlot(){this.actionsStart=this.getAssignedActionBarItems(this.actionsStartSlotRef.value),this.actionsStartGroups=this.actionsStart.filter(t=>f(t)),this.hasActionsStart=this.actionsStart.length>0,this.updateGroups()}syncActionsEndSlot(){this.actionsEnd=this.getAssignedActionBarItems(this.actionsEndSlotRef.value),this.actionsEndGroups=this.actionsEnd.filter(t=>f(t)),this.hasActionsEnd=this.actionsEnd.length>0,this.updateGroups()}handleActionGroupActionsChange(t){let e=t.target;this.getTrackedActionGroups().includes(e)&&(this.suppressedActionGroupActionsChange.has(e)||this.syncActionsAndOverflow())}handleActionMenuActionsChange(t){let e=t.target;this.getTrackedActionMenus().includes(e)&&this.syncActionsAndOverflow()}getNavigableActions(){return this.actions.filter(t=>!t.disabled&&t.slot!==I.menuActions)}handleKeyDown(t){let e=this.getNavigableActions(),i=document.activeElement;if(!(!U(i)||!e.includes(i)))switch(t.key){case"ArrowRight":case"ArrowDown":T(e,i,"next",!0),t.preventDefault();break;case"ArrowLeft":case"ArrowUp":T(e,i,"previous",!0),t.preventDefault();break;case"Home":T(e,i,"first",!0),t.preventDefault();break;case"End":T(e,i,"last",!0),t.preventDefault();break;case"Tab":this.setActionTabIndexes(i);break}}setActionTabIndexes(t){this.actions.forEach(e=>{let i=!e.disabled&&e===t?0:-1;i===0?e.removeAttribute("tabindex"):e.tabIndex=i})}renderExpandTooltipSlot(){return m`<slot name=${R.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>`}renderExpandToggle(){let{el:t,expanded:e,toggleExpand:i,messages:a,position:r,scale:n}=this;return pt({collapseLabel:a.collapseLabel,collapseText:a.collapse,direction:this.direction,el:t,expanded:e,expandLabel:a.expandLabel,expandText:a.expand,position:r,ref:this.setExpandToggleEl,scale:n,toggle:i,tooltip:this.expandTooltip})}renderActionsGroup(t){let{expandToggleDisabled:e,scale:i,layout:a,overlayPositioning:r,expandPosition:n}=this,o=t==="start",l=!e&&n===t,c=o?this.hasActionsStart:this.hasActionsEnd,d=o?R.actionsStart:R.actionsEnd,G=o?this.handleActionsStartSlotChange:this.handleActionsEndSlotChange,M=o?this.actionsStartGroupLabel:this.actionsEndGroupLabel,x=!l&&!c,u=o?this.actionsStartGroupRef:this.actionsEndGroupRef,h=o?this.actionsStartSlotRef:this.actionsEndSlotRef,v=l?this.renderExpandToggle():null;return m`<calcite-action-group class=${z({[w.actionGroupStart]:o,[w.actionGroupEnd]:!o})} .hidden=${x} .label=${M} .layout=${a} .overlayPositioning=${r} .scale=${i} ${E(u)}>${o?v:null}<slot name=${d??F} @slotchange=${G} ${E(h)}></slot>${l?this.renderExpandTooltipSlot():null}${o?null:v}</calcite-action-group>`}render(){let t=this.layout==="horizontal"?"horizontal":"vertical";return m`<div .ariaOrientation=${t} class=${z({[w.container]:!0,[w.hasActionGroups]:this.hasActionGroups})} role=toolbar ${E(this.containerRef)}>${this.renderActionsGroup("start")}<slot @slotchange=${this.handleDefaultSlotChange} ${E(this.defaultSlotRef)}></slot>${this.renderActionsGroup("end")}${this.usesWrap?m`<div aria-hidden=true class=${z(w.lineOverlay)}>${this.lineOffsets.map(e=>m`<div class=${z(w.line)} style=${`--calcite-internal-action-bar-line-offset: ${e}px`}></div>`)}</div>`:null}</div>`}};Q("calcite-action-bar",q);export{q as ActionBar};
|
package/dist/cdn/UAXV5QU2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as x,t as m}from"./4XVKHJ2X.js";import"./B3OV6FHO.js";import"./5K4OZJAZ.js";import{a as y}from"./ZDKXHZNU.js";import{h as z}from"./2M4ETWZU.js";import{G as S,H as h,T as k,g as $,h as f,i as a,l as t}from"./2C677XOQ.js";var l={swatch:"swatch",noColorSwatch:"swatch--no-color",checker:"checker"},C={borderLight:"rgba(0, 0, 0, 0.3)",borderDark:"rgba(255, 255, 255, 0.15)"},b=4,i={squareSize:b,size:b*2},v={checker:"checker",shape:"shape"},R=$`:host{position:relative;display:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1)}.swatch--no-color rect{fill:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))}.swatch--no-color line{stroke:var(--calcite-color-status-danger)}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends S{constructor(){super(...arguments),this.active=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],color:1,scale:[3,{},{reflect:!0}]}}static{this.styles=R}load(){this.handleColorChange(this.color)}willUpdate(e){e.has("color")&&this.handleColorChange(this.color)}handleColorChange(e){this.internalColor=e?x(e):void 0}render(){let e=!this.internalColor,c={[l.swatch]:!0,[l.noColorSwatch]:e};return f`<svg class=${h(c)} xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg>`}renderSwatch(){let{active:e,el:c,internalColor:s}=this,o=e?"100%":"0",n=z(c)==="light"?C.borderLight:C.borderDark,d=!s,r={height:"100%",rx:o,stroke:n,strokeWidth:"2",width:"100%"};if(d)return a`<clipPath id=${v.shape}><rect height=100% rx=${o??t} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round ${o})`,...r})}<line clip-path=url(#shape) stroke-width=3 x1=100% x2=0 y1=0 y2=100% />`;let p=s.alpha(),q=m(s),g=m(s,p<1);return a`<title>${g}</title><defs><pattern height=${i.size} id=${v.checker} patternUnits=userSpaceOnUse width=${i.size} x=0 y=0><rect class=${h(l.checker)} height=${i.squareSize} width=${i.squareSize} x=0 y=0 /><rect class=${h(l.checker)} height=${i.squareSize} width=${i.squareSize} x=${i.squareSize} y=${i.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:r.rx,height:r.height,width:r.width})}${this.renderSwatchRect({clipPath:p<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round ${o})`,fill:q,...r})}${p<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:g,key:"opacity-fill",...r}):null}`}renderSwatchRect({clipPath:e,fill:c,height:s,key:o,rx:u,stroke:n,strokeWidth:d,width:r}){return y(o,a`<rect clip-path=${e??t} fill=${c??t} height=${s??t} rx=${u??t} stroke=${n??t} stroke-width=${d??t} width=${r??t} />`)}};k("calcite-color-picker-swatch",w);export{w as ColorPickerSwatch};
|
package/dist/cdn/ZPXEKSRI.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{p as m,w as p}from"./4XVKHJ2X.js";import"./B3OV6FHO.js";import"./5K4OZJAZ.js";import{G as b,H as c,I as g,J as h,T as v,g as f,h as o}from"./2C677XOQ.js";var u={thumbnail:"thumbnail",background:"background",initials:"initials",icon:"icon"};function k(a){a=x(a);let e=0;for(let i=0;i<a.length;i++)e=a.charCodeAt(i)+((e<<5)-e);let t="#";for(let i=0;i<3;i++){let r=e>>i*8&255;t+=("00"+r.toString(16)).substr(-2)}return t}function x(a){let e=Math.floor(a.length/2),t=a.split("").reverse().join("");return t.substring(e)+t.slice(0,e)}function z(a){let{r:e,g:t,b:i}=a;e/=255,t/=255,i/=255;let r=Math.max(e,t,i),n=Math.min(e,t,i),l=r-n;if(r===n)return 0;let s=(r+n)/2;switch(r){case e:s=(t-i)/l+(t<i?6:0);break;case t:s=(i-e)/l+2;break;case i:s=(e-t)/l+4;break}return Math.round(s*60)}function $(a){return z(p(a))}var y=f`:host{display:inline-block;overflow:hidden;border-radius:var(--calcite-avatar-corner-radius, 50%);color:var(--calcite-avatar-color, var(--calcite-color-text-2))}:host([scale=s]){block-size:1.5rem;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-xs)}:host([scale=m]){block-size:2rem;inline-size:2rem;font-size:var(--calcite-font-size-relative-sm)}:host([scale=l]){block-size:2.75rem;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:var(--calcite-avatar-corner-radius, 50%)}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase}.thumbnail{block-size:100%;inline-size:100%;border-radius:var(--calcite-avatar-corner-radius, 50%)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends b{constructor(){super(...arguments),this.thumbnailFailedToLoad=!1,this.scale="m"}static{this.properties={thumbnailFailedToLoad:[16,{},{state:!0}],fullName:[3,{},{reflect:!0}],label:1,scale:[3,{},{reflect:!0}],thumbnail:[3,{},{reflect:!0}],userId:[3,{},{reflect:!0}],username:[3,{},{reflect:!0}]}}static{this.styles=y}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return o`<img alt=${(this.label||"")??h} class=${c(u.thumbnail)} @error=${()=>this.thumbnailFailedToLoad=!0} src=${this.thumbnail??h}>`;let e=this.generateInitials(),t=this.generateFillColor();return o`<span .ariaLabel=${this.label||this.fullName} class=${c(u.background)} role=figure style=${g({backgroundColor:t})}>${e?o`<span aria-hidden=true class=${c(u.initials)}>${e}</span>`:o`<calcite-icon class=${c(u.icon)} icon=user .scale=${this.scale}></calcite-icon>`}</span>`}generateFillColor(){let{userId:e,username:t,fullName:i}=this,r=e&&`#${e.substr(e.length-6)}`,n=t||i||"",l=r&&m(r)?r:k(n);if(!e&&!n||!m(l))return"var(--calcite-avatar-background-color, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)))";let s=$(l);return`var(--calcite-avatar-background-color, light-dark(hsl(${s}, 60%, 90%), hsl(${s}, 60%, 20%)))`}generateInitials(){let{fullName:e,username:t}=this;return e?e.trim().split(" ").map(i=>i.substring(0,1)).join(""):t?t.substring(0,2):!1}render(){return this.determineContent()}};v("calcite-avatar",d);export{d as Avatar};
|
package/dist/cdn/ZUR4NUA5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as G}from"./YC33WRPJ.js";import{b as F}from"./G2G5ELGL.js";import{a as q}from"./D4HRXS4E.js";import{c as W}from"./DQADORUS.js";import{a as H}from"./V53VO7TG.js";import{b as V}from"./XIERF7M3.js";import{d as I}from"./K4N2EM4F.js";import{a as b,c as x,e as U,g as p,h as M}from"./FAW6HCZE.js";import{a as y}from"./XN5GTOTE.js";import{a as K}from"./VITY2ZWH.js";import{a as B}from"./7235Z7Q6.js";import"./5K4OZJAZ.js";import{a as E,b as w}from"./FDHY2TZA.js";import{a as L}from"./CASNTUXN.js";import{a as P}from"./NC6GXJRL.js";import{a as D}from"./KAADRWY5.js";import{a as z}from"./IQ5PDJZT.js";import"./2IM7ZZ7U.js";import{a as R}from"./EV2BLP2M.js";import"./VMHJHFFS.js";import{c as T,e as O}from"./B2B4K2SR.js";import"./Y664PBYS.js";import{A as v,y as g}from"./2M4ETWZU.js";import{E as h,F as c,G as A,H as r,L as f,T as S,g as k,h as d,l as m,p as o}from"./2C677XOQ.js";var J=k`: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{position:relative;display:block}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{width:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius, var(--calcite-corner-radius));--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.content-container{box-sizing:border-box;width:100%}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content-container .calcite-floating-ui-anim{width:100%;overflow-y:auto;box-shadow:var(--calcite-shadow-md);max-block-size:var(--calcite-autocomplete-menu-max-size-y, 45vh);color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)))}.content--hidden{display:none}@media(forced-colors:active){.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.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--2)}: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--1)}: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-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`,N={contentBottom:"content-bottom",contentTop:"content-top"},l={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active",screenReadersOnly:"screen-readers-only"},j="autocomplete",_={validationMessage:"autocompleteValidationMessage",input:u=>`${j}-input-${u}`,list:u=>`${j}-list-${u}`},Q="calcite-autocomplete-item-group",X="calcite-autocomplete-item",C=class extends A{constructor(){super(),this.guid=L(),this.attributeWatch=T(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.direction=O(),this.formSupport=W({inputType:"text"})(this),this.listId=_.list(this.guid),this.messages=z(),this.transitionProp="opacity",this.transitionRef=h(),this.defaultSlotRef=h(),this.listboxRef=h(),this.listboxOptionRefs=new Map,this.focusSetter=R()(this),this.resizeObserver=E("resize",()=>{this.setFloatingElSize()}),this.interactiveContainer=B(this),this.topLayer=P({target:()=>this.floatingEl})(this),this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=b,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.topLayerDisabled=!1,this.value="",this.calciteAutocompleteBeforeClose=o({cancelable:!1}),this.calciteAutocompleteBeforeOpen=o({cancelable:!1}),this.calciteAutocompleteChange=o({cancelable:!1}),this.calciteAutocompleteClose=o({cancelable:!1}),this.calciteAutocompleteOpen=o({cancelable:!1}),this.calciteAutocompleteTextChange=o({cancelable:!1}),this.calciteAutocompleteTextInput=o({cancelable:!1}),K(this),this.listen("calciteAutocompleteItemSelect",this.handleAutocompleteItemSelect),this.listen("calciteInternalAutocompleteItemChange",this.handleAutocompleteItemChange),this.listen("calciteInternalAutocompleteItemGroupItemsChange",this.handleAutocompleteItemGroupItemsChange)}static{this.properties={activeDescendantElement:[16,{},{state:!0}],activeIndex:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],items:[16,{},{state:!0}],groups:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:1,disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],icon:[3,{converter:f},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],inputValue:1,label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],pattern:1,placeholder:1,placement:[3,{},{reflect:!0}],prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],suffixText:1,topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:f},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=J}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:a,placement:i,overlayPositioning:n,flipPlacements:s}=this;return U(this,{direction:this.direction,floatingEl:e,referenceEl:a,overlayPositioning:n,placement:i,flipPlacements:s,type:"menu"},t)}async scrollContentTo(t){this.transitionRef.value?.scrollTo(t)}async selectText(){return this.referenceEl?.selectText()}async setFocus(t){return this.focusSetter(()=>this.referenceEl,t)}connectedCallback(){super.connectedCallback(),p(this)}load(){this.listenOn(document,"click",this.documentClickHandler)}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),t.has("value")&&this.hasUpdated&&this.selectedItemsHandler(),(t.has("flipPlacements")||t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||t.has("placement")&&(this.hasUpdated||this.placement!==b))&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue?new RegExp(`(${F(this.inputValue)})`,"i"):void 0,this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}updated(){this.syncActiveDescendantElement()}loaded(){this.getAllItems(),p(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),M(this)}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}selectedItemsHandler(){this.items.forEach(t=>t.selected=t.value===this.value)}openHandler(){if(this.disabled){this.open=!1;return}this.open||(this.activeIndex=-1),D(this),this.setFloatingElSize(),this.reposition(!0)}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleAutocompleteItemSelect(t){this.value=t.target.value,this.selectedItemsHandler(),this.emitChange(),await this.setFocus(),this.open=!1}handleAutocompleteItemChange(t){t.stopPropagation(),this.items.length&&(this.updateItems(),this.requestUpdate())}onLabelClick(){this.setFocus()}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit(),this.topLayer.hide()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,a)=>{t.scale=this.scale,t.position=e,e===0&&(t.disableSpacing=!0);let i=a[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){this.value&&this.selectedItemsHandler(),this.items.forEach(t=>{t.scale=this.scale,t.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((t,e)=>{let a=e===this.activeIndex;t.active=a}),this.syncActiveDescendantElement()}syncActiveDescendantElement(){let t=this.enabledItems[this.activeIndex];this.activeDescendantElement=t?this.listboxOptionRefs.get(t.guid)?.value:void 0}handleInputFocus(){this.open=!0}handleContentTopSlotChange(t){this.hasContentTop=g(t)}handleContentBottomSlotChange(t){this.hasContentBottom=g(t)}handleDefaultSlotChange(){this.getAllItems()}handleAutocompleteItemGroupItemsChange(t){t.stopPropagation(),this.getAllItems()}getAllItems(){let t=this.defaultSlotRef.value?v(this.defaultSlotRef.value,Q):Array.from(this.el.children).filter(V),e=this.defaultSlotRef.value?v(this.defaultSlotRef.value,X):Array.from(this.el.children).filter(I),a=t.flatMap(n=>n.items??[]),i=Array.from(new Set([...e,...a].filter(I)));this.groups=t,this.items=i,this.removeStaleListboxOptionRefs(i),this.updateItems(),this.updateGroups()}removeStaleListboxOptionRefs(t){let e=new Set(t.map(a=>a.guid));this.listboxOptionRefs.forEach((a,i)=>{e.has(i)||this.listboxOptionRefs.delete(i)})}getListboxOptionRef(t){let e=this.listboxOptionRefs.get(t.guid);return e||(e=h(),this.listboxOptionRefs.set(t.guid,e)),e}setReferenceEl(t){w(this.resizeObserver,this.referenceEl,t),this.referenceEl=t,p(this)}keyDownHandler(t){let{defaultPrevented:e,key:a}=t;if(e)return;let{open:i,activeIndex:n,enabledItems:s}=this,$=s.length&&n>-1?s[n]:null;switch(a){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&$?($.requestSelection(),this.open=!1,t.preventDefault()):!t.defaultPrevented&&this.formSupport.active&&(t.preventDefault(),this.formSupport.requestSubmit());break;case"ArrowDown":s.length&&(this.open=!0,this.activeIndex=n!==-1?Math.min(n+1,s.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":s.length&&(this.open=!0,this.activeIndex=n!==-1?Math.max(n-1,0):s.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":s.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":s.length&&(this.open=!0,this.activeIndex=s.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.open=this.inputValue?.length>0,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,p(this)}render(){let{disabled:t,isOpen:e}=this,a=this.el.autofocus,i=this.el.enterKeyHint,n=this.el.inputMode;return this.interactiveContainer({disabled:t,children:d`${this.labelText&&q({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${r(l.inputContainer)}><calcite-input .alignment=${this.alignment} .aria=${{activeDescendantElement:this.activeDescendantElement,autoComplete:"list",controlsElements:this.listboxRef.value?[this.listboxRef.value]:void 0,expanded:e,hasPopup:"listbox",label:y(this)}} .autocomplete=${this.autocomplete} .autofocus=${a} class=${r(l.input)} clearable .disabled=${t} enterkeyhint=${i??m} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} inputmode=${n??m} .inputRole=${"combobox"} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${c(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[l.contentContainer]:!0,[l.floatingUIContainer]:!0,[l.floatingUIContainerActive]:e})} popover=manual ${c(this.setFloatingEl)}><div class=${r({[l.contentAnimation]:!0,[x.animation]:!0,[x.animationActive]:e})} ${c(this.transitionRef)}><div class=${r({[l.content]:!0,[l.contentHidden]:!e})}><slot name=${N.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true @slotchange=${this.handleDefaultSlotChange} ${c(this.defaultSlotRef)}></slot><slot name=${N.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${this.validationMessage&&this.status==="invalid"?G({icon:this.validationIcon,id:_.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return d`<ul .ariaLabel=${y(this)} aria-live=polite class=${r(l.screenReadersOnly)} id=${this.listId??m} role=listbox tabindex=-1 ${c(this.listboxRef)}>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return H(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>d`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} .ariaSelected=${t.selected} role=option tabindex=-1 ${c(this.getListboxOptionRef(t))}>${t.heading}${t.description}</li>`)}};S("calcite-autocomplete",C);export{C as Autocomplete};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { Scale } from "../types.js";
|
|
4
|
-
|
|
5
|
-
/** @deprecated in v3.3.0, removal target v6.0.0. Use the `calcite-swatch-group` and `calcite-swatch` components instead. */
|
|
6
|
-
export abstract class ColorPickerSwatch extends LitElement {
|
|
7
|
-
/**
|
|
8
|
-
* When `true`, the component is active.
|
|
9
|
-
*
|
|
10
|
-
* @default false
|
|
11
|
-
*/
|
|
12
|
-
accessor active: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* The color value.
|
|
15
|
-
*
|
|
16
|
-
* @see [MDN - Color CSS data type](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
|
|
17
|
-
*/
|
|
18
|
-
accessor color: string | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* Specifies the size of the component.
|
|
21
|
-
*
|
|
22
|
-
* @default "m"
|
|
23
|
-
*/
|
|
24
|
-
accessor scale: Scale;
|
|
25
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
|
-
import { keyed } from "lit/directives/keyed.js";
|
|
4
|
-
import Color from "color";
|
|
5
|
-
import { css, html, nothing, svg } from "lit";
|
|
6
|
-
import { LitElement, safeClassMap } from "@arcgis/lumina";
|
|
7
|
-
import { y as getModeName } from "../../chunks/dom.js";
|
|
8
|
-
import { h as hexify } from "../../chunks/utils3.js";
|
|
9
|
-
const CSS = {
|
|
10
|
-
swatch: "swatch",
|
|
11
|
-
noColorSwatch: "swatch--no-color",
|
|
12
|
-
checker: "checker"
|
|
13
|
-
};
|
|
14
|
-
const COLORS = {
|
|
15
|
-
borderLight: "rgba(0, 0, 0, 0.3)",
|
|
16
|
-
borderDark: "rgba(255, 255, 255, 0.15)"
|
|
17
|
-
};
|
|
18
|
-
const checkerSquareSize = 4;
|
|
19
|
-
const CHECKER_DIMENSIONS = {
|
|
20
|
-
squareSize: checkerSquareSize,
|
|
21
|
-
size: checkerSquareSize * 2
|
|
22
|
-
};
|
|
23
|
-
const IDS = {
|
|
24
|
-
checker: "checker",
|
|
25
|
-
shape: "shape"
|
|
26
|
-
};
|
|
27
|
-
const styles = css`:host{position:relative;display:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1)}.swatch--no-color rect{fill:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))}.swatch--no-color line{stroke:var(--calcite-color-status-danger)}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
28
|
-
class ColorPickerSwatch extends LitElement {
|
|
29
|
-
constructor() {
|
|
30
|
-
super(...arguments);
|
|
31
|
-
this.active = false;
|
|
32
|
-
this.scale = "m";
|
|
33
|
-
}
|
|
34
|
-
static {
|
|
35
|
-
this.properties = { active: [7, {}, { reflect: true, type: Boolean }], color: 1, scale: [3, {}, { reflect: true }] };
|
|
36
|
-
}
|
|
37
|
-
static {
|
|
38
|
-
this.styles = styles;
|
|
39
|
-
}
|
|
40
|
-
load() {
|
|
41
|
-
this.handleColorChange(this.color);
|
|
42
|
-
}
|
|
43
|
-
willUpdate(changes) {
|
|
44
|
-
if (changes.has("color")) {
|
|
45
|
-
this.handleColorChange(this.color);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
handleColorChange(color) {
|
|
49
|
-
this.internalColor = color ? Color(color) : void 0;
|
|
50
|
-
}
|
|
51
|
-
render() {
|
|
52
|
-
const isEmpty = !this.internalColor;
|
|
53
|
-
const classes = {
|
|
54
|
-
[CSS.swatch]: true,
|
|
55
|
-
[CSS.noColorSwatch]: isEmpty
|
|
56
|
-
};
|
|
57
|
-
return html`<svg class=${safeClassMap(classes)} xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg>`;
|
|
58
|
-
}
|
|
59
|
-
renderSwatch() {
|
|
60
|
-
const { active, el, internalColor } = this;
|
|
61
|
-
const borderRadius = active ? "100%" : "0";
|
|
62
|
-
const theme = getModeName(el);
|
|
63
|
-
const borderColor = theme === "light" ? COLORS.borderLight : COLORS.borderDark;
|
|
64
|
-
const isEmpty = !internalColor;
|
|
65
|
-
const commonSwatchProps = {
|
|
66
|
-
height: "100%",
|
|
67
|
-
rx: borderRadius,
|
|
68
|
-
stroke: borderColor,
|
|
69
|
-
strokeWidth: "2",
|
|
70
|
-
width: "100%"
|
|
71
|
-
};
|
|
72
|
-
if (isEmpty) {
|
|
73
|
-
return svg`<clipPath id=${IDS.shape}><rect height=100% rx=${borderRadius ?? nothing} width=100% /></clipPath>${this.renderSwatchRect({
|
|
74
|
-
clipPath: `inset(0 round ${borderRadius})`,
|
|
75
|
-
...commonSwatchProps
|
|
76
|
-
})}<line clip-path=url(#shape) stroke-width=3 x1=100% x2=0 y1=0 y2=100% />`;
|
|
77
|
-
}
|
|
78
|
-
const alpha = internalColor.alpha();
|
|
79
|
-
const hex = hexify(internalColor);
|
|
80
|
-
const hexa = hexify(internalColor, alpha < 1);
|
|
81
|
-
return svg`<title>${hexa}</title><defs><pattern height=${CHECKER_DIMENSIONS.size} id=${IDS.checker} patternUnits=userSpaceOnUse width=${CHECKER_DIMENSIONS.size} x=0 y=0><rect class=${safeClassMap(CSS.checker)} height=${CHECKER_DIMENSIONS.squareSize} width=${CHECKER_DIMENSIONS.squareSize} x=0 y=0 /><rect class=${safeClassMap(CSS.checker)} height=${CHECKER_DIMENSIONS.squareSize} width=${CHECKER_DIMENSIONS.squareSize} x=${CHECKER_DIMENSIONS.squareSize} y=${CHECKER_DIMENSIONS.squareSize} /></pattern></defs>${this.renderSwatchRect({
|
|
82
|
-
fill: "url(#checker)",
|
|
83
|
-
rx: commonSwatchProps.rx,
|
|
84
|
-
height: commonSwatchProps.height,
|
|
85
|
-
width: commonSwatchProps.width
|
|
86
|
-
})}${this.renderSwatchRect({
|
|
87
|
-
clipPath: alpha < 1 ? "polygon(100% 0, 0 0, 0 100%)" : `inset(0 round ${borderRadius})`,
|
|
88
|
-
fill: hex,
|
|
89
|
-
...commonSwatchProps
|
|
90
|
-
})}${alpha < 1 ? this.renderSwatchRect({
|
|
91
|
-
clipPath: "polygon(100% 0, 100% 100%, 0 100%)",
|
|
92
|
-
fill: hexa,
|
|
93
|
-
key: "opacity-fill",
|
|
94
|
-
...commonSwatchProps
|
|
95
|
-
}) : null}`;
|
|
96
|
-
}
|
|
97
|
-
renderSwatchRect({ clipPath, fill, height, key, rx, stroke, strokeWidth, width }) {
|
|
98
|
-
return keyed(key, svg`<rect clip-path=${clipPath ?? nothing} fill=${fill ?? nothing} height=${height ?? nothing} rx=${rx ?? nothing} stroke=${stroke ?? nothing} stroke-width=${strokeWidth ?? nothing} width=${width ?? nothing} />`);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
customElement("calcite-color-picker-swatch", ColorPickerSwatch);
|
|
102
|
-
export {
|
|
103
|
-
ColorPickerSwatch
|
|
104
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./customElement.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./customElement.js";
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { FocusTrapOptions } from "../../controllers/useFocusTrap.js";
|
|
4
|
-
|
|
5
|
-
/** @slot - A slot for adding focus-trapped content. */
|
|
6
|
-
export abstract class FocusTrap extends LitElement {
|
|
7
|
-
/**
|
|
8
|
-
* Indicates whether the component's focus trap is currently active.
|
|
9
|
-
*
|
|
10
|
-
* @default false
|
|
11
|
-
*/
|
|
12
|
-
get active(): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* When `true`, prevents focus trapping.
|
|
15
|
-
*
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
|
-
accessor focusTrapDisabled: boolean;
|
|
19
|
-
/** When defined, provides a condition to disable focus trapping. When `true`, prevents focus trapping. */
|
|
20
|
-
accessor focusTrapDisabledOverride: (() => boolean) | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Specifies custom focus trap configuration on the component.
|
|
23
|
-
*
|
|
24
|
-
* - `"allowOutsideClick"` allows outside clicks.
|
|
25
|
-
* - `"initialFocus"` enables initial focus.
|
|
26
|
-
* - `"returnFocusOnDeactivate"` returns focus when not active.
|
|
27
|
-
* - `"extraContainers"` specifies additional focusable elements external to the trap.
|
|
28
|
-
* - `"setReturnFocus"` customizes the element to which focus is returned when the trap is deactivated.
|
|
29
|
-
*/
|
|
30
|
-
accessor focusTrapOptions: Partial<FocusTrapOptions> | undefined;
|
|
31
|
-
/** Activates the component's focus trap. */
|
|
32
|
-
activate(): Promise<void>;
|
|
33
|
-
/** Deactivates the component's focus trap. */
|
|
34
|
-
deactivate(): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Sets focus on the component's first focusable element.
|
|
37
|
-
*
|
|
38
|
-
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
39
|
-
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
40
|
-
*/
|
|
41
|
-
setFocus(options?: FocusOptions): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Updates the element(s) that are included in the focus-trap of the component.
|
|
44
|
-
*
|
|
45
|
-
* @param extraContainers - Additional elements to include in the focus trap. This is useful for including elements that may have related parts rendered outside the main focus trapping element.
|
|
46
|
-
*/
|
|
47
|
-
updateFocusTrapElements(extraContainers?: FocusTrapOptions["extraContainers"]): Promise<void>;
|
|
48
|
-
/** Fires when the focus-trap active state has changed. */
|
|
49
|
-
readonly calciteFocusTrapActiveChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
50
|
-
readonly "@eventTypes": {
|
|
51
|
-
calciteFocusTrapActiveChange: FocusTrap["calciteFocusTrapActiveChange"]["detail"];
|
|
52
|
-
};
|
|
53
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
|
-
import { css, html } from "lit";
|
|
4
|
-
import { LitElement, createEvent } from "@arcgis/lumina";
|
|
5
|
-
import { u as useFocusTrap } from "../../chunks/useFocusTrap.js";
|
|
6
|
-
import { u as useFocusable } from "../../chunks/useFocusable.js";
|
|
7
|
-
const styles = css`:host{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
8
|
-
class FocusTrap extends LitElement {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this._active = false;
|
|
12
|
-
this.focusSetter = useFocusable()(this);
|
|
13
|
-
this.focusTrapController = useFocusTrap({
|
|
14
|
-
focusTrapOptions: {
|
|
15
|
-
onActivate: () => {
|
|
16
|
-
this.setActive(true);
|
|
17
|
-
},
|
|
18
|
-
onDeactivate: () => {
|
|
19
|
-
this.setActive(false);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
})(this);
|
|
23
|
-
this.focusTrapDisabled = false;
|
|
24
|
-
this.calciteFocusTrapActiveChange = createEvent({ cancelable: false });
|
|
25
|
-
}
|
|
26
|
-
static {
|
|
27
|
-
this.properties = { focusTrapDisabled: [7, {}, { reflect: true, type: Boolean }], active: [32, {}, { attribute: false, readOnly: true }], focusTrapDisabledOverride: [0, {}, { attribute: false }], focusTrapOptions: [0, {}, { attribute: false }] };
|
|
28
|
-
}
|
|
29
|
-
static {
|
|
30
|
-
this.styles = styles;
|
|
31
|
-
}
|
|
32
|
-
get active() {
|
|
33
|
-
return this._active;
|
|
34
|
-
}
|
|
35
|
-
async activate() {
|
|
36
|
-
this.focusTrapController.activate();
|
|
37
|
-
}
|
|
38
|
-
async deactivate() {
|
|
39
|
-
this.focusTrapController.deactivate();
|
|
40
|
-
}
|
|
41
|
-
async setFocus(options) {
|
|
42
|
-
return this.focusSetter(() => this.el, options);
|
|
43
|
-
}
|
|
44
|
-
async updateFocusTrapElements(extraContainers) {
|
|
45
|
-
this.focusTrapController.setExtraContainers(extraContainers);
|
|
46
|
-
this.focusTrapController.updateContainerElements();
|
|
47
|
-
}
|
|
48
|
-
setActive(active) {
|
|
49
|
-
const oldActive = this._active;
|
|
50
|
-
this._active = active;
|
|
51
|
-
this.requestUpdate("active", oldActive);
|
|
52
|
-
this.calciteFocusTrapActiveChange.emit();
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
return html`<slot></slot>`;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
customElement("calcite-focus-trap", FocusTrap);
|
|
59
|
-
export {
|
|
60
|
-
FocusTrap
|
|
61
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./customElement.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./customElement.js";
|