@esri/calcite-components 5.0.0-next.3 → 5.0.0-next.5
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/calcite/{VBT5FAGS.js → 2GG4AF5T.js} +1 -1
- package/dist/calcite/{LSTKQGBO.js → 2HKRJLBG.js} +2 -2
- package/dist/calcite/{MEERCHNE.js → 2IWOXJH7.js} +2 -2
- package/dist/calcite/{RQU4NRTA.js → 2KH3AUCG.js} +2 -2
- package/dist/calcite/{KIGAOJGV.js → 2VKJIYLT.js} +1 -1
- package/dist/calcite/{KZSABN6Z.js → 2YBCAJSV.js} +2 -2
- package/dist/calcite/{QDR7A47F.js → 3266GV6Z.js} +2 -2
- package/dist/calcite/{FQH6NA2N.js → 3HXEF55M.js} +2 -2
- package/dist/calcite/{J3FSCDUX.js → 3KUVOQAL.js} +2 -2
- package/dist/calcite/{AYEIZT5Y.js → 3NOZ7M75.js} +2 -2
- package/dist/calcite/{JW4SOJWB.js → 3YZG7MA3.js} +2 -2
- package/dist/calcite/{GPIMJEMU.js → 45F6XOYY.js} +2 -2
- package/dist/calcite/{SKKSLFHT.js → 4ARTWEEZ.js} +2 -2
- package/dist/calcite/4GHB4NY4.js +4 -0
- package/dist/calcite/{2FBU6T3T.js → 4JZMONLD.js} +2 -2
- package/dist/calcite/{2OBK2KGK.js → 5AL5GWRD.js} +2 -2
- package/dist/calcite/{SLICSH62.js → 5IPJANUU.js} +2 -2
- package/dist/calcite/{SN7NAXJ7.js → 5K2Z2TMW.js} +2 -2
- package/dist/calcite/{CNF3Q4TX.js → 5LAPR75M.js} +2 -2
- package/dist/calcite/{BGDALDXM.js → 62OUMNJ6.js} +2 -2
- package/dist/calcite/{XXYGNCPD.js → 67HVFNHP.js} +2 -2
- package/dist/calcite/{HXDER6NO.js → 6J5W2PAJ.js} +2 -2
- package/dist/calcite/{S5TFXGHY.js → 6VPACZP5.js} +2 -2
- package/dist/calcite/{VGOGYBOG.js → 6VQ5IL36.js} +2 -2
- package/dist/calcite/{6RQZN7N2.js → 73LRFHS4.js} +2 -2
- package/dist/calcite/{JXRRZQUL.js → 7DTG5KDL.js} +2 -2
- package/dist/calcite/{OT4HMOKY.js → 7IHVHMIY.js} +2 -2
- package/dist/calcite/{MIR3A75I.js → 7IYAKB7Q.js} +2 -2
- package/dist/calcite/{GT3B6N5Y.js → 7NUC3WBG.js} +1 -1
- package/dist/calcite/{PSYXUHRF.js → 7PFVW4JF.js} +1 -1
- package/dist/calcite/{WRVSFB7L.js → 7QP5BUGE.js} +2 -2
- package/dist/calcite/{FXAVGIBO.js → 7XJU5OTS.js} +2 -2
- package/dist/calcite/{35QUJIVR.js → 7ZNR3GNI.js} +2 -2
- package/dist/calcite/{6BL35Y24.js → A4CO6B7Z.js} +2 -2
- package/dist/calcite/{OBEAWB6Y.js → AHOXXRX5.js} +2 -2
- package/dist/calcite/{RSQ6RL3K.js → ALDDSDTX.js} +1 -1
- package/dist/calcite/{DY2XHFEN.js → APIFFM3O.js} +2 -2
- package/dist/calcite/{PO2U44AW.js → AQ4DKRX6.js} +2 -2
- package/dist/calcite/{BCBU5ZR6.js → AUF6YLAM.js} +2 -2
- package/dist/calcite/{ALOAVLGK.js → AUIOWPFN.js} +2 -2
- package/dist/calcite/{UXWFYSWM.js → B5JXPZDV.js} +2 -2
- package/dist/calcite/{6RMUSGEC.js → BE5OB2TH.js} +2 -2
- package/dist/calcite/{UTGJTZUE.js → BEUZYBM5.js} +3 -3
- package/dist/calcite/{WWH2YWKG.js → BFINWHLX.js} +2 -2
- package/dist/calcite/{KGALTIIM.js → BHBYSC5H.js} +2 -2
- package/dist/calcite/{S5R35RX3.js → BHU252WA.js} +2 -2
- package/dist/calcite/{6UGLHCRO.js → BNKVQYLQ.js} +2 -2
- package/dist/calcite/{JDVZQ6HH.js → BYZPKQRD.js} +2 -2
- package/dist/calcite/{EWPZP6OD.js → C2X6VADY.js} +2 -2
- package/dist/calcite/{XYJQXYRM.js → C3BQ4W7K.js} +2 -2
- package/dist/calcite/{QP5GAAB3.js → C4S2BOWK.js} +2 -2
- package/dist/calcite/{BVHWNNF7.js → CF6DTFNX.js} +2 -2
- package/dist/calcite/{P2RYGBBZ.js → CIU4VM7X.js} +2 -2
- package/dist/calcite/{WVP5XPLP.js → CJWGQETT.js} +2 -2
- package/dist/calcite/{YG7PWF3G.js → CQMVTE7J.js} +2 -2
- package/dist/calcite/{VFZYB7KV.js → CTLGVBKW.js} +2 -2
- package/dist/calcite/{QTBEVUXO.js → CUL3VHSD.js} +2 -2
- package/dist/calcite/{I2EB746H.js → CVLFEMH2.js} +2 -2
- package/dist/calcite/{2U5DG73Y.js → DDW4WTS2.js} +2 -2
- package/dist/calcite/{GTQBX3SK.js → DDXY7TRY.js} +2 -2
- package/dist/calcite/{57WVJI5D.js → DJVVGNTK.js} +1 -1
- package/dist/calcite/{777CURPL.js → DOH3ZW2R.js} +2 -2
- package/dist/calcite/{ICWMT556.js → DONAES6Q.js} +2 -2
- package/dist/calcite/{52U5HSRZ.js → DSEMLW7Z.js} +2 -2
- package/dist/calcite/{4IBSL24S.js → DZWPXJWV.js} +2 -2
- package/dist/calcite/{ZN5NGGVV.js → F6EDNLSI.js} +2 -2
- package/dist/calcite/{3GUK3G7C.js → FZIUTVKD.js} +1 -1
- package/dist/calcite/{XRAT3TME.js → GE7SQF7S.js} +2 -2
- package/dist/calcite/{ZTZGAKAG.js → GUT2GKDG.js} +2 -2
- package/dist/calcite/{XAUVURWR.js → H2FWQITV.js} +1 -1
- package/dist/calcite/{QX6ZGXUA.js → H5ANNFJC.js} +2 -2
- package/dist/calcite/{WTV3W5WN.js → H5DKF7F3.js} +2 -2
- package/dist/calcite/{KMS2JCWI.js → HBHSBTMM.js} +1 -1
- package/dist/calcite/{WWKRJ5BW.js → HT5KXL4J.js} +2 -2
- package/dist/calcite/{5E23KXQW.js → HU4SHWE7.js} +2 -2
- package/dist/calcite/{K6F4PVVD.js → HVF3RXXI.js} +2 -2
- package/dist/calcite/{34B5K3VC.js → HXGFAPCM.js} +2 -2
- package/dist/calcite/{CSBYILHE.js → I53JH7YD.js} +2 -2
- package/dist/calcite/{DQJ4CTWW.js → IEL7YV5C.js} +2 -2
- package/dist/calcite/{XWOGKL32.js → IHEW664E.js} +2 -2
- package/dist/calcite/{HZVXI5VT.js → IKDSO2OB.js} +2 -2
- package/dist/calcite/{P5PS2PVQ.js → JJWGSKGI.js} +2 -2
- package/dist/calcite/{ANAWJ75J.js → K3AHNZL7.js} +2 -2
- package/dist/calcite/{YT4SL4T4.js → K5GJLIBR.js} +2 -2
- package/dist/calcite/{VAG4CLRN.js → KH3UKQ2D.js} +2 -2
- package/dist/calcite/{E2ETQPML.js → KRHM7ACI.js} +2 -2
- package/dist/calcite/{BHCRRG5K.js → KT4EQWT6.js} +2 -2
- package/dist/calcite/{WIJWBGXQ.js → LH7245HX.js} +2 -2
- package/dist/calcite/{KNTW4634.js → LJI5SYGA.js} +1 -1
- package/dist/calcite/{4BE5CM4R.js → LQ3URZCB.js} +2 -2
- package/dist/calcite/{LT2NMLTM.js → LRKWQ3C3.js} +2 -2
- package/dist/calcite/{YANBAVXH.js → LROCCBRV.js} +2 -2
- package/dist/calcite/{X3IVLT67.js → LYDOM6VQ.js} +2 -2
- package/dist/calcite/{HJBVI5HP.js → MEFMO7UB.js} +2 -2
- package/dist/calcite/{BE4UHKT6.js → MP3OWQ2A.js} +2 -2
- package/dist/calcite/{TKNM6PGC.js → MVLJJOH2.js} +2 -2
- package/dist/calcite/{XXNZUORE.js → N5MSFOLW.js} +2 -2
- package/dist/calcite/{425YTQUT.js → N7OO7R2S.js} +2 -2
- package/dist/calcite/{UA4KBTNZ.js → NID6WJOW.js} +2 -2
- package/dist/calcite/{EFEUKCWA.js → NLYYOFNV.js} +1 -1
- package/dist/calcite/{IVEARGFQ.js → NQJMDHT5.js} +2 -2
- package/dist/calcite/{EU6IVBMM.js → NSBK36H4.js} +2 -2
- package/dist/calcite/{PBJYTCZQ.js → NU57UAAO.js} +1 -1
- package/dist/calcite/{7WAFUV2T.js → NULQJBCW.js} +2 -2
- package/dist/calcite/{PDC2HFCE.js → OCT7LR2O.js} +1 -1
- package/dist/calcite/{UCRIU7RD.js → OFZACK2Y.js} +2 -2
- package/dist/calcite/{KEKHXXG2.js → OMKDUGKV.js} +2 -2
- package/dist/calcite/{FJ6DIGL4.js → PFDLGOVS.js} +2 -2
- package/dist/calcite/{4T2MXJFD.js → PFKUB7JD.js} +2 -2
- package/dist/calcite/{5MVGEBA4.js → PJOGMC7F.js} +2 -2
- package/dist/calcite/{WRHL43TZ.js → PLD7OLLJ.js} +2 -2
- package/dist/calcite/{3QKRHYDR.js → PSCEW76J.js} +2 -2
- package/dist/calcite/{WJT34A4V.js → PSNA5FAF.js} +2 -2
- package/dist/calcite/{E22QVECL.js → PU5TGCQG.js} +2 -2
- package/dist/calcite/{N4VKIVPS.js → PVL2DQVP.js} +2 -2
- package/dist/calcite/{5MCNWZT7.js → PZL4QWV5.js} +2 -2
- package/dist/calcite/{NL3LLRLQ.js → Q23OEAP2.js} +2 -2
- package/dist/calcite/{D2QA5PI3.js → Q2GRCTSJ.js} +2 -2
- package/dist/calcite/{YTEVYZWQ.js → Q3MUDXRY.js} +2 -2
- package/dist/calcite/{EH4IJP5H.js → QF6F6CY3.js} +2 -2
- package/dist/calcite/{WWUSLEON.js → QFT74HW3.js} +2 -2
- package/dist/calcite/{C47YSH7C.js → R73QB7MJ.js} +2 -2
- package/dist/calcite/{N5LX4COS.js → RFALVOKT.js} +2 -2
- package/dist/calcite/{IWU3WQTA.js → RI3NRBMI.js} +2 -2
- package/dist/calcite/{PAKKXMW6.js → RND3V33U.js} +1 -1
- package/dist/calcite/{K6E5LSS6.js → ROWPIQLT.js} +2 -2
- package/dist/calcite/{6CFV5RKV.js → RRP2E2T3.js} +2 -2
- package/dist/calcite/{L6HFE67F.js → S5CLKCGJ.js} +1 -1
- package/dist/calcite/{7CSKQBJD.js → SGJU36YV.js} +2 -2
- package/dist/calcite/{KUUFM5EV.js → SMRCCHJE.js} +2 -2
- package/dist/calcite/{RQFHIC47.js → SXB76NOR.js} +2 -2
- package/dist/calcite/{ZLSS7CXL.js → SZWYWOXZ.js} +2 -2
- package/dist/calcite/{KXG3JNXH.js → T6Y6ZTWW.js} +2 -2
- package/dist/calcite/{6HTHE64W.js → U3KRKTQY.js} +2 -2
- package/dist/calcite/{ZMYI2UVC.js → UGI3YWJM.js} +2 -2
- package/dist/calcite/{AEYCEODJ.js → UN7GLLXI.js} +2 -2
- package/dist/calcite/{2QSQXOI5.js → UNJRBV2R.js} +2 -2
- package/dist/calcite/{6J3DGER2.js → UOZDXXIF.js} +2 -2
- package/dist/calcite/{XO5ETFTI.js → V3ZR6RFK.js} +1 -1
- package/dist/calcite/{HXF4YIAH.js → V4NPQ4WA.js} +2 -2
- package/dist/calcite/{JEZYPF4D.js → VBRBI7IU.js} +2 -2
- package/dist/calcite/{NHJ736R2.js → VIWDW2WZ.js} +2 -2
- package/dist/calcite/{DLM7KEK5.js → VKRWRFEJ.js} +2 -2
- package/dist/calcite/{PX5VW7CA.js → VMWAAH5B.js} +2 -2
- package/dist/calcite/{TG4OK7FQ.js → VQMSSO2U.js} +2 -2
- package/dist/calcite/{VQT3LLC7.js → VYFT5EAY.js} +1 -1
- package/dist/calcite/{FPD3KMKK.js → W5OJOVZY.js} +1 -1
- package/dist/calcite/{WLATCKTT.js → W6EWFSR3.js} +2 -2
- package/dist/calcite/{43SYTK5U.js → W72YZH73.js} +2 -2
- package/dist/calcite/{YPBCS4NA.js → WBGRGCXR.js} +2 -2
- package/dist/calcite/{XWXCOJUO.js → WOTQIMPZ.js} +2 -2
- package/dist/calcite/{NHUHCQ4J.js → WPTOKN7K.js} +1 -1
- package/dist/calcite/{P2MLMFIB.js → WTY55PPZ.js} +2 -2
- package/dist/calcite/{R7GSVJN5.js → WWJXVV6U.js} +2 -2
- package/dist/calcite/{2IUZ3YR2.js → X374PRV7.js} +2 -2
- package/dist/calcite/{BSQIX4WQ.js → XNFJXDQ6.js} +2 -2
- package/dist/calcite/{HS3YVIY4.js → XNLWKJLM.js} +2 -2
- package/dist/calcite/{MBIDNSLG.js → XRSYDXWZ.js} +1 -1
- package/dist/calcite/{QSCN7J3O.js → XZTRPLLK.js} +2 -2
- package/dist/calcite/{RWVRFF3I.js → Y3HXK6MO.js} +2 -2
- package/dist/calcite/{OPTERABQ.js → Y442PVMQ.js} +2 -2
- package/dist/calcite/{A7PQJDZZ.js → YCLOS6NX.js} +2 -2
- package/dist/calcite/{2526AKXE.js → YSBWKH76.js} +1 -1
- package/dist/calcite/{7STMP4B2.js → YSP6WWQB.js} +1 -1
- package/dist/calcite/{U235MJ2F.js → YV7DKMEQ.js} +2 -2
- package/dist/calcite/{OWE3TUYA.js → ZAQTILTS.js} +2 -2
- package/dist/calcite/{DNM3U3Z7.js → ZLR2B6GQ.js} +1 -1
- package/dist/calcite/{ZCDYIKPL.js → ZSMNT5VS.js} +2 -2
- package/dist/calcite/{3DRRZPK3.js → ZTOBC3PN.js} +2 -2
- package/dist/calcite/{PHQB3YSI.js → ZV7YL7QG.js} +2 -2
- package/dist/calcite/{5JALWDSF.js → ZVWKN3G7.js} +2 -2
- package/dist/calcite/{4AHB62J2.js → ZZGPQLEW.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +2 -1
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/calcite/HGI7ZMWJ.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as d}from"./PSYXUHRF.js";import{a as k}from"./TG4OK7FQ.js";import{a as v}from"./WIJWBGXQ.js";import{a as b}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import{a as r}from"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{o as l,t as u}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as a,C as s,D as g,E as e,I as p,P as f,g as m,h as n,o}from"./ALOAVLGK.js";var c={title:"title",message:"message",link:"link",actionsEnd:"actions-end"},i={actionsEnd:"actions-end",close:"notice-close",container:"container",content:"notice-content",icon:"notice-icon"},x=m`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:.5rem}: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]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}: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]){margin-block:.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}: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-inline-start:var(--calcite-border-width-md) solid;box-shadow:0 0 0 0 transparent;background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}.notice-close{outline-color:transparent}.notice-close:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);overflow:visible}.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-font-weight-normal);margin-inline-end:var(--calcite-notice-spacing-token-small);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}.notice-content{box-sizing:border-box;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;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-small)}.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;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none;color:var(--calcite-notice-close-icon-color, var(--calcite-color-text-3))}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-notice-close-background-color-focus, var(--calcite-color-foreground-2));color:var(--calcite-notice-close-icon-color-hover, var(--calcite-color-text-1))}.notice-close:active{background-color:var(--calcite-notice-close-background-color-press, var(--calcite-color-foreground-3))}.actions-end{display:flex;align-self:stretch}:host([kind=brand]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand]) .container .notice-icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-color:var(--calcite-color-status-info)}:host([kind=info]) .container .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-color:var(--calcite-color-status-success)}:host([kind=success]) .container .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .notice-icon{color:var(--calcite-color-status-warning)}:host([hidden]){display:none}[hidden]{display:none}`,h=class extends g{constructor(){super(...arguments),this.closeButtonRef=a(),this.transitionProp="opacity",this.transitionRef=a(),this.messages=v(),this.focusSetter=b()(this),this.hasActionEnd=!1,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}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:p,type:String},{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=x}async setFocus(t){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,t)}async load(){this.requestedIcon=l(d,this.icon,this.kind)}willUpdate(t){t.has("open")&&(this.hasUpdated||this.open!==!1)&&k(this),(t.has("icon")||t.has("kind")&&(this.hasUpdated||this.kind!=="brand"))&&(this.requestedIcon=l(d,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(t){this.hasActionEnd=u(t)}render(){let t=n`<button .ariaLabel=${this.messages.close} class=${e(i.close)} @click=${this.close} ${s(this.closeButtonRef)}><calcite-icon icon=x .scale=${r(this.scale)}></calcite-icon></button>`;return n`<div class=${e(i.container)} ${s(this.transitionRef)}>${this.requestedIcon?n`<div class=${e(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${r(this.scale)}></calcite-icon></div>`:null}<div class=${e(i.content)}><slot name=${c.title}></slot><slot name=${c.message}></slot><slot name=${c.link}></slot></div><div class=${e(i.actionsEnd)} .hidden=${!this.hasActionEnd}><slot name=${c.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?t:null}</div>`}};f("calcite-notice",h);export{h as Notice};
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as d}from"./7PFVW4JF.js";import{a as k}from"./VQMSSO2U.js";import{a as v}from"./LH7245HX.js";import{a as b}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as r}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{o as l,t as u}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as a,C as s,D as g,E as e,I as p,P as f,g as m,h as n,o}from"./AUIOWPFN.js";var c={title:"title",message:"message",link:"link",actionsEnd:"actions-end"},i={actionsEnd:"actions-end",close:"notice-close",container:"container",content:"notice-content",icon:"notice-icon"},x=m`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:.5rem}: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]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}: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]){margin-block:.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}: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-inline-start:var(--calcite-border-width-md) solid;box-shadow:0 0 0 0 transparent;background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}.notice-close{outline-color:transparent}.notice-close:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);overflow:visible}.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-font-weight-normal);margin-inline-end:var(--calcite-notice-spacing-token-small);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}.notice-content{box-sizing:border-box;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;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-small)}.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;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none;color:var(--calcite-notice-close-icon-color, var(--calcite-color-text-3))}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-notice-close-background-color-focus, var(--calcite-color-foreground-2));color:var(--calcite-notice-close-icon-color-hover, var(--calcite-color-text-1))}.notice-close:active{background-color:var(--calcite-notice-close-background-color-press, var(--calcite-color-foreground-3))}.actions-end{display:flex;align-self:stretch}:host([kind=brand]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand]) .container .notice-icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-color:var(--calcite-color-status-info)}:host([kind=info]) .container .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-color:var(--calcite-color-status-success)}:host([kind=success]) .container .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .notice-icon{color:var(--calcite-color-status-warning)}:host([hidden]){display:none}[hidden]{display:none}`,h=class extends g{constructor(){super(...arguments),this.closeButtonRef=a(),this.transitionProp="opacity",this.transitionRef=a(),this.messages=v(),this.focusSetter=b()(this),this.hasActionEnd=!1,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}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:p,type:String},{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=x}async setFocus(t){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,t)}async load(){this.requestedIcon=l(d,this.icon,this.kind)}willUpdate(t){t.has("open")&&(this.hasUpdated||this.open!==!1)&&k(this),(t.has("icon")||t.has("kind")&&(this.hasUpdated||this.kind!=="brand"))&&(this.requestedIcon=l(d,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(t){this.hasActionEnd=u(t)}render(){let t=n`<button .ariaLabel=${this.messages.close} class=${e(i.close)} @click=${this.close} ${s(this.closeButtonRef)}><calcite-icon icon=x .scale=${r(this.scale)}></calcite-icon></button>`;return n`<div class=${e(i.container)} ${s(this.transitionRef)}>${this.requestedIcon?n`<div class=${e(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${r(this.scale)}></calcite-icon></div>`:null}<div class=${e(i.content)}><slot name=${c.title}></slot><slot name=${c.message}></slot><slot name=${c.link}></slot></div><div class=${e(i.actionsEnd)} .hidden=${!this.hasActionEnd}><slot name=${c.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?t:null}</div>`}};f("calcite-notice",h);export{h as Notice};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as m,b as i,c as s}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as m,b as i,c as s}from"./AQ4DKRX6.js";import{a as l}from"./NULQJBCW.js";import{E as t}from"./AUIOWPFN.js";var f=({children:r,...e})=>{let a=e.level?m(`h${e.level}`):i`div`;return l(e.key,s`<${a} class=${t(e.class)}>${r}</${a}>`)};export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as f,b}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as f,b}from"./NSBK36H4.js";import{a as m}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{y as i}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as d,C as n,D as h,E as p,P as u,g as c,h as r,o}from"./AUIOWPFN.js";var g=c`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}.container{display:flex;flex-wrap:wrap;gap:var(--calcite-card-group-space, var(--calcite-card-group-gap, var(--calcite-spacing-md)))}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,I={container:"container"},l=class extends h{constructor(){super(),this.items=[],this.slotRef=d(),this.focusSetter=m()(this),this.disabled=!1,this.selectedItems=[],this.selectionMode="none",this.calciteCardGroupSelect=o({cancelable:!1}),this.listen("calciteInternalCardKeyEvent",this.calciteInternalCardKeyEventListener),this.listen("calciteCardSelect",this.calciteCardSelectListener)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=g}async setFocus(e){return this.focusSetter(()=>this.items[0],e)}willUpdate(e){e.has("selectionMode")&&this.hasUpdated&&this.updateItemsOnSelectionModeChange()}updated(){f(this)}loaded(){this.updateSelectedItems()}calciteInternalCardKeyEventListener(e){if(e.composedPath().includes(this.el)){let s=this.items.filter(t=>!t.disabled);switch(e.detail.key){case"ArrowRight":i(s,e.target,"next",!0,!1);break;case"ArrowLeft":i(s,e.target,"previous",!0,!1);break;case"Home":i(s,e.target,"first",!0,!1);break;case"End":i(s,e.target,"last",!0,!1);break}}}calciteCardSelectListener(e){e.composedPath().includes(this.el)&&!e.target.selectable&&this.setSelectedItems(!0,e.target)}updateItemsOnSelectionModeChange(){this.updateSlottedItems(this.slotRef.value),this.updateSelectedItems()}updateItemsOnSlotChange(e){this.updateSlottedItems(e.target),this.updateSelectedItems()}updateSlottedItems(e){this.items=e?.assignedElements({flatten:!0}).filter(s=>s?.matches("calcite-card"))||[]}updateSelectedItems(){this.items.forEach(e=>{e.selectionMode=this.selectionMode}),this.setSelectedItems(!1)}setSelectedItems(e,s){s&&this.items.forEach(t=>{let a=s===t;switch(this.selectionMode){case"multiple":a&&(t.selected=!t.selected);break;case"single":t.selected=a?!t.selected:!1;break;case"single-persist":t.selected=!!a;break}}),this.selectedItems=this.items.filter(t=>t.selected),e&&this.selectionMode!=="none"&&!this.disabled&&this.calciteCardGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup";return b({disabled:this.disabled,children:r`<div .ariaLabel=${this.label} class=${p(I.container)} .role=${e}><slot @slotchange=${this.updateItemsOnSlotChange} ${n(this.slotRef)}></slot></div>`})}};u("calcite-card-group",l);export{l as CardGroup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as r,c as k}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{b as r,c as k}from"./AQ4DKRX6.js";import{a as v,b as y}from"./NSBK36H4.js";import{a as g}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{e as m}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as d,C as h,D as u,E as n,G as e,I as p,J as b,P as f,g as s,h as o}from"./AUIOWPFN.js";var z=s`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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:inline}:host a,:host button{position:relative;display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:0;border-style:none;font-family:inherit;text-decoration:none;line-height:inherit;font-size:inherit;-webkit-appearance:none}:host a:hover,:host button:hover{text-decoration:none}:host a,:host button{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,background-size;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}calcite-icon{inline-size:1em;block-size:1em;min-inline-size:unset;min-block-size:unset}.calcite-link--icon{vertical-align:middle;margin-block-start:-.25em}:host .calcite-link--icon.icon-start{margin-inline-end:.5rem}:host .calcite-link--icon.icon-end{margin-inline-start:.5rem}:host button,:host a{position:relative;display:inline;border-style:none;background-color:transparent;padding:0;color:var(--calcite-link-text-color, var(--calcite-color-text-link));line-height:inherit;white-space:initial;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px}:host button:hover,:host button:focus,:host a:hover,:host a:focus{background-size:100% 1px,100% 1px}:host button:active,:host a:active{background-size:100% 2px,100% 2px}:host button.calcite--rtl,:host a.calcite--rtl{background-position:100% 100%,100% 100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,c={calciteLinkIcon:"calcite-link--icon",iconStart:"icon-start",iconEnd:"icon-end"},l=class extends u{constructor(){super(),this.childRef=d(),this.focusSetter=g()(this),this.disabled=!1,this.download=!1,this.listen("click",this.clickHandler)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:p},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],rel:1,target:1}}static{this.styles=z}async setFocus(t){return this.focusSetter(()=>this.childRef.value,t)}updated(){v(this)}clickHandler(t){this.disabled||t.isTrusted||this.childRef.value.click()}childElClickHandler(t){t.isTrusted||t.stopPropagation()}render(){let{download:t,el:$}=this,x=m($),i=this.href?"a":"button",S=o`<calcite-icon class=${n({[c.calciteLinkIcon]:!0,[c.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} scale=s></calcite-icon>`,E=o`<calcite-icon class=${n({[c.calciteLinkIcon]:!0,[c.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} scale=s></calcite-icon>`,a=i==="button"?r`button`:r`a`,R=i==="button"?0:null;return this.el.role="presentation",y({disabled:this.disabled,children:k`<${a} class=${n({[b.rtl]:x==="rtl"})} download=${(i==="a"?t===!0||t===""?"":t||null:null)??e} href=${(i==="a"&&this.href)??e} @click=${this.childElClickHandler} rel=${(i==="a"&&this.rel)??e} tabindex=${R??e} target=${(i==="a"&&this.target)??e} ${h(this.childRef)}>${o`${this.iconStart?S:null}<slot></slot>${this.iconEnd?E:null}`}</${a}>`})}};f("calcite-link",l);export{l as Link};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as c,b as s,c as a}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as c,b as s,c as a}from"./YSP6WWQB.js";import{c as r}from"./5IPJANUU.js";function b(e){let o=e.parentElement?.closest(a),t=o?.parentElement?.closest(a);return[o,t].filter(n=>n)}function d(e){return e.ancestors?.filter(o=>o.nodeName==="CALCITE-COMBOBOX-ITEM")||[]}function p(e){return r(e.querySelectorAll("calcite-combobox-item"))}function g(e){return r(e.querySelectorAll("calcite-combobox-item")).filter(t=>t.selected).length>0}function h(e){if(!1)return 0;let o=document.evaluate("ancestor::calcite-combobox-item | ancestor::calcite-combobox-item-group",e,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null),t=o.snapshotLength;if(t>0&&e.nodeName===c){for(let n=0;n<t;n++)if(o.snapshotItem(n).nodeName===s)return t}else if(e.nodeName===s)return t;return t+1}function A(e){return e.includes("single")}function C(e){return e.shortHeading||e.heading||e.textLabel}export{b as a,d as b,p as c,g as d,h as e,A as f,C as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as g}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as g}from"./LH7245HX.js";import{a as v}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as m}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as h,C as u,D as p,E as c,P as b,g as d,h as o,l as i}from"./AUIOWPFN.js";var e={contentCell:"content-cell",numberCell:"number-cell",selectionCell:"selection-cell",bodyRow:"body-row",footerRow:"footer-row",heading:"heading",description:"description",multipleSelectionCell:"cell--multiple-selection",assistiveText:"assistive-text",active:"active",selectedCell:"selected-cell",lastCell:"last-cell",staticCell:"static-cell"},a={checked:"check-square-f",indeterminate:"minus-square-f",unchecked:"square"},w=d`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}:host([alignment=center]) th{text-align:center}:host([alignment=end]) th{text-align:end}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}th{white-space:normal;text-align:start;vertical-align:top;font-weight:var(--calcite-font-weight-medium);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)));padding-block:calc(var(--calcite-internal-table-cell-padding) * 1.5);padding-inline:var(--calcite-internal-table-cell-padding);background-color:var(--calcite-table-header-background-color, var(--calcite-table-header-background, var(--calcite-color-foreground-2)));font-size:var(--calcite-internal-table-cell-font-size);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}th:not(.static-cell){outline-color:transparent}th:not(.static-cell):not(.static-cell):focus-within{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}th:not(.center):not(.end).content-cell{vertical-align:top}th.center{vertical-align:middle}th.end.content-cell{vertical-align:bottom}th.body-row,th.footer-row{padding-block:var(--calcite-internal-table-cell-padding);border-block-end:0}th.footer-row{border-block-start:var(--calcite-border-width-sm) solid var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}th.last-cell{border-inline-end:0}.cell--multiple-selection{cursor:pointer;vertical-align:middle;color:var(--calcite-table-selection-cell-icon-color, var(--calcite-color-text-3));background-color:var(--calcite-table-selection-cell-background-color, var(--calcite-color-foreground-2))}.cell--multiple-selection.selected-cell{background-color:var(--calcite-table-selection-cell-background-color-selected, var(--calcite-color-foreground-2))}.cell--multiple-selection:not(.end){vertical-align:middle}.number-cell{background-color:var(--calcite-table-number-cell-background-color, var(--calcite-table-cell-background-color, var(--calcite-color-foreground-2)))}.number-cell,.selection-cell{inline-size:2rem;min-inline-size:2rem}.selection-cell calcite-icon.active{color:var(--calcite-table-selection-cell-icon-color-selected, var(--calcite-color-brand))}.number-cell calcite-icon,.selection-cell calcite-icon{margin-inline-start:auto;margin-inline-end:auto;vertical-align:middle}.heading{color:var(--calcite-table-header-heading-text-color, var(--calcite-color-text-1))}.description{color:var(--calcite-table-header-description-text-color, var(--calcite-color-text-3));font-size:var(--calcite-internal-table-cell-font-size-secondary)}`,r=class extends p{constructor(){super(...arguments),this.containerRef=h(),this.messages=g({blocking:!0}),this.focusSetter=v()(this),this.focused=!1,this.screenReaderText="",this.alignment="start",this.interactionMode="interactive",this.numberCell=!1,this.parentRowAlignment="start",this.selectionCell=!1}static{this.properties={focused:[16,{},{state:!0}],screenReaderText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],bodyRowCount:[9,{},{type:Number}],colSpan:[11,{},{reflect:!0,type:Number}],description:[3,{},{reflect:!0}],heading:[3,{},{reflect:!0}],interactionMode:1,lastCell:[5,{},{type:Boolean}],messageOverrides:[0,{},{attribute:!1}],numberCell:[5,{},{type:Boolean}],parentRowAlignment:1,parentRowIsSelected:[5,{},{type:Boolean}],parentRowType:1,positionInRow:[9,{},{type:Number}],rowSpan:[11,{},{reflect:!0,type:Number}],scale:1,selectedRowCount:[9,{},{type:Number}],selectedRowCountLocalized:1,selectionCell:[5,{},{type:Boolean}],selectionMode:1}}static{this.styles=w}async setFocus(t){return this.focusSetter(()=>this.containerRef.value,t)}async load(){this.updateScreenReaderText()}willUpdate(t){(t.has("selectedRowCount")||t.has("selectedRowCountLocalized"))&&this.updateScreenReaderText()}updateScreenReaderText(){let t="",l=`${this.selectedRowCountLocalized} ${this.messages?.selected}`;this.numberCell?t=this.messages?.rowNumber:this.selectionMode==="single"?t=`${this.messages?.selectionColumn}. ${l}`:this.bodyRowCount===this.selectedRowCount?t=`${this.messages?.selectionColumn}. ${this.messages?.all} ${l} ${this.messages?.keyboardDeselectAll}`:t=`${this.messages?.selectionColumn}. ${l} ${this.messages?.keyboardSelectAll}`,this.screenReaderText=t}onContainerBlur(){this.focused=!1}onContainerFocus(){this.focused=!0}render(){let t=this.rowSpan?"rowgroup":this.colSpan?"colgroup":this.parentRowType==="body"?"row":"col",l=this.selectedRowCount===this.bodyRowCount,n=this.selectedRowCount>0,f=l?a.checked:n?a.indeterminate:a.unchecked,s=this.interactionMode==="static"&&!this.selectionCell;return o`<th .ariaColIndex=${this.parentRowType==="head"?this.positionInRow:void 0} class=${c({[e.bodyRow]:this.parentRowType==="body",[e.footerRow]:this.parentRowType==="foot",[e.contentCell]:!this.numberCell&&!this.selectionCell,[e.numberCell]:this.numberCell,[e.selectionCell]:this.selectionCell,[e.selectedCell]:this.parentRowIsSelected,[e.multipleSelectionCell]:this.selectionMode==="multiple",[e.staticCell]:s,[e.lastCell]:this.lastCell&&(!this.rowSpan||this.colSpan&&!!this.rowSpan),[this.parentRowAlignment]:this.parentRowAlignment==="center"||this.parentRowAlignment==="end"})} colSpan=${this.colSpan??i} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} .role=${this.parentRowType==="head"?"columnheader":"rowheader"} rowSpan=${this.rowSpan??i} scope=${t??i} .tabIndex=${this.selectionCell?0:s?-1:0} ${u(this.containerRef)}>${this.heading&&o`<div class=${c(e.heading)}>${this.heading}</div>`||""}${this.description&&o`<div class=${c(e.description)}>${this.description}</div>`||""}${this.selectionCell&&this.selectionMode==="multiple"&&o`<calcite-icon class=${c({[e.active]:n||l})} .icon=${f} .scale=${m(this.scale)}></calcite-icon>`||""}${(this.selectionCell||this.numberCell)&&o`<span .ariaLive=${this.focused?"polite":"off"} class=${c(e.assistiveText)}>${this.screenReaderText}</span>`||""}</th>`}};b("calcite-table-header",r);export{r as TableHeader};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as d}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as d}from"./ALDDSDTX.js";import{a as m}from"./LH7245HX.js";import"./B5JXPZDV.js";import{r as h}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as c,C as l,D as o,E as s,P as r,g as n,h as t}from"./AUIOWPFN.js";var f={scrim:"scrim",content:"content"},u={s:72,l:480},v=n`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:absolute;inset:0;z-index:var(--calcite-z-index-overlay);display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity: 0}to{--tw-text-opacity: 1}}.scrim{position:absolute;inset:0;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background, var(--calcite-color-transparent-scrim))}.content{padding:1rem}:host([hidden]){display:none}[hidden]{display:none}`,i=class extends o{constructor(){super(...arguments),this.loaderRef=c(),this.resizeObserver=d("resize",()=>this.handleResize()),this.messages=m(),this.hasContent=!1,this.loading=!1}static{this.properties={hasContent:[16,{},{state:!0}],loaderScale:[16,{},{state:!0}],loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}]}}static{this.styles=v}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}handleDefaultSlotChange(e){this.hasContent=h(e)}getScale(e){return e<u.s?"s":e>=u.l?"l":"m"}handleResize(){let{el:e}=this;this.loaderScale=this.getScale(Math.min(e.clientHeight,e.clientWidth)??0)}render(){let{hasContent:e,loading:p,loaderScale:a,messages:g}=this;return t`<div class=${s(f.scrim)}>${p&&a?t`<calcite-loader .label=${g.loading} .scale=${a} ${l(this.loaderRef)}></calcite-loader>`:null}<div class=${s(f.content)} .hidden=${!e}><slot @slotchange=${this.handleDefaultSlotChange}></slot></div></div>`}};r("calcite-scrim",i);export{i as Scrim};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as o,c as r}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{b as o,c as r}from"./WPTOKN7K.js";var t="Global";function i(n){return o(n).countries.length===0}function a(n){if(i(n))return t;let e=n.indexOf("/");return e===-1?n:n.slice(0,e)}function c(n){return r(n)?.id??n}export{t as a,a as b,c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
4
|
var n={menuActions:"menu-actions",menuTooltip:"menu-tooltip"},o={menu:"ellipsis"},t={container:"container"};export{n as a,o as b,t as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as p}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as p}from"./LH7245HX.js";import{a as f}from"./WOTQIMPZ.js";import{b as m}from"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{l as h,u as c,y as l}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{D as u,P as r,g as o,h as n}from"./AUIOWPFN.js";var d=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:flex}ul{margin:0;display:inline-flex;block-size:100%;align-items:center;padding:0}:host([layout=vertical]) ul{display:flex;inline-size:100%;flex-direction:column}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends u{constructor(){super(),this.attributeWatch=m(["role"],this.handleGlobalAttributesChanged),this.menuItems=[],this.messages=p(),this.focusSetter=f()(this),this.layout="horizontal",this.listen("calciteInternalMenuItemKeyEvent",this.calciteInternalNavMenuItemKeyEvent)}static{this.properties={label:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=d}async setFocus(e){return this.focusSetter(()=>this.menuItems[0],e)}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")&&this.setMenuItemLayout(this.menuItems,this.layout)}handleGlobalAttributesChanged(){this.requestUpdate(),this.setMenuItemLayout(this.menuItems,this.layout)}calciteInternalNavMenuItemKeyEvent(e){let t=e.target,s=e.detail.children,i=e.detail.event.key;e.stopPropagation(),i==="ArrowDown"?t.layout==="vertical"?l(this.menuItems,t,"next",!1,!1):e.detail.isSubmenuOpen&&s[0].setFocus():i==="ArrowUp"?this.layout==="vertical"?l(this.menuItems,t,"previous",!1,!1):e.detail.isSubmenuOpen&&s[s.length-1].setFocus():i==="ArrowRight"?this.layout==="horizontal"?l(this.menuItems,t,"next",!1,!1):e.detail.isSubmenuOpen&&s[0].setFocus():i==="ArrowLeft"?this.layout==="horizontal"?l(this.menuItems,t,"previous",!1,!1):e.detail.isSubmenuOpen&&this.focusParentElement(e.target):i==="Escape"&&this.focusParentElement(e.target),e.preventDefault()}handleMenuSlotChange(e){this.menuItems=c(e),this.setMenuItemLayout(this.menuItems,this.layout)}focusParentElement(e){let t=e.parentElement;t&&(h(t),t.open=!1)}setMenuItemLayout(e,t){e.forEach(s=>{s.layout=t,this.getEffectiveRole()==="menubar"&&(s.isTopLevelItem=!0,s.topLevelMenuLayout=this.layout)})}getEffectiveRole(){return this.el.role||"menubar"}render(){return n`<ul .ariaLabel=${this.label} .role=${this.getEffectiveRole()}><slot @slotchange=${this.handleMenuSlotChange}></slot></ul>`}};r("calcite-menu",a);export{a as Menu};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{E as r,h as i}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{E as r,h as i}from"./AUIOWPFN.js";function s(){let{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function a(e){e.target.disabled&&e.preventDefault()}var o=["mousedown","mouseup","click"];function c(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}var n={capture:!0};function m(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),l(e);return}u(e),e.el.removeAttribute("aria-disabled")}function l(e){e.el.click=s,d(e.el)}function d(e){e.addEventListener("pointerdown",a,n),o.forEach(t=>e.addEventListener(t,c,n))}function u(e){delete e.el.click,f(e.el)}function f(e){e.removeEventListener("pointerdown",a,n),o.forEach(t=>e.removeEventListener(t,c,n))}var v={container:"interaction-container"},p=({children:e,disabled:t})=>i`<div class=${r(v.container)} .inert=${t}>${e}</div>`;export{m as a,p as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{l as r,t as s,u as i,x as o}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{l as r,t as s,u as i,x as o}from"./AUIOWPFN.js";var u=s(class extends i{constructor(){super(...arguments),this.key=r}render(t,e){return this.key=t,e}update(t,[e,m]){return e!==this.key&&(o(t),this.key=e),m}});export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
4
|
var n={container:"container",containerNone:"container--none-selection",icon:"dropdown-item-icon",iconEnd:"dropdown-item-icon--end",iconStart:"dropdown-item-icon--start",itemContent:"dropdown-item-content",link:"dropdown-link"},o={check:"check",bulletPoint:"bullet-point"};export{n as a,o as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as c}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as c}from"./Q2GRCTSJ.js";import{b as m}from"./NID6WJOW.js";import"./WPTOKN7K.js";var u=n=>n.map(o=>{let{label:a}=o,t=m(a);return{...o,continent:t}});async function v(){let n=[],o=c.map(t=>({label:t})),a=u(o);for(let t of a){let{label:e,continent:l}=t;if(t.visited)continue;t.visited=!0;let i={label:l,tzs:[{label:e}]};for(let r of a.filter(s=>!s.visited)){let{label:s,continent:b}=r;if(l===b){let p={label:s};i.tzs.push(p),r.visited=!0}}n.push(i)}return n.map(t=>(t.tzs=t.tzs.sort((e,l)=>e.label.localeCompare(l.label)),{label:t.label,tzs:t.tzs.map(e=>e.label)})).sort((t,e)=>t.label.localeCompare(e.label))}export{v as groupByRegion};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as $}from"./PSYXUHRF.js";import{j as A}from"./I2EB746H.js";import{a as E}from"./TG4OK7FQ.js";import{a as c}from"./7WAFUV2T.js";import"./L6HFE67F.js";import{a as T}from"./WIJWBGXQ.js";import{a as z}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import{a as d}from"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{o as w,t as x}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{C as b,D as y,E as o,I as C,P as k,g as v,h as a,o as l}from"./ALOAVLGK.js";var u={slow:14e3,medium:1e4,fast:6e3},r={actionsEnd:"actions-end",title:"title",message:"message",link:"link"},i={actionsEnd:"actions-end",close:"close",container:"container",containerActive:"container--active",dismissProgress:"dismiss-progress",icon:"icon",containerEmbedded:"container--embedded",queueCount:"queue-count",queueCountActive:"queue-count--active",textContainer:"text-container",focused:"focused"},I=300,h=class{constructor(){this.registeredElements=[],this.queueTimeoutId=null}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=null,this.registeredElements.forEach((e,t)=>{e.openAlertCount=this.registeredElements.length,t===0?this.queueTimeoutId=window.setTimeout(()=>e.active=!0,I):e.active=!1})}},D=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--calcite-alert-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));background-color:var(--calcite-alert-background-color, 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) cubic-bezier(.215,.44,.42,.88),all var(--calcite-animation-timing) ease-in-out}.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{display:flex;cursor:pointer;align-items:center;justify-content:flex-end;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline:2px solid transparent;outline-offset:2px;-webkit-appearance:none;border-start-end-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));border-end-end-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));outline-color:transparent}.close:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.close:hover,.close:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-2)}.close:active{background-color:var(--calcite-color-foreground-3)}.queue-count{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;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-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;align-self:stretch}.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--1);line-height:1.375}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size--2);line-height:1.375}: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]) .close{padding:.75rem}: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-0);line-height:1.375}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size--1);line-height:1.375}: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]) .close{padding:1rem}: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]){margin-block-end:.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-0);line-height:1.375}: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]) .close{padding:1.25rem}: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-0);line-height:1.375;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--1);line-height:1.375;font-weight:var(--calcite-font-weight-normal);margin-inline-end:.5rem;color:var(--calcite-color-text-2)}slot[name=link]::slotted(*),*::slotted([slot=link]){display:inline-flex;color:var(--calcite-color-text-link)}: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 6s 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 10s 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 14s 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}}.container--embedded{position:absolute;z-index:var(--calcite-z-index-toast)}:host([hidden]){display:none}[hidden]{display:none}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}`,n=new h,m=class extends y{constructor(){super(...arguments),this.autoCloseTimeoutId=null,this.transitionProp="opacity",this.totalHoverTime=0,this.totalOpenTime=0,this.messages=T(),this.focusSetter=z()(this),this.hasEndActions=!1,this.isFocused=!1,this.numberStringFormatter=new A,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.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:C,type:String},{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}]}}static{this.styles=D}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(),u[this.autoCloseDuration]))}async handlePopover(){await this.componentOnReady(),!(this.embedded||!this.transitionEl)&&(this.open?this.transitionEl.showPopover():this.transitionEl.hidePopover())}openHandler(){this.open?n.registerElement(this.el):n.unregisterElement(this.el),this.handlePopover()}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(this.clearAutoCloseTimeout(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),u[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=null}setTransitionEl(e){e&&(this.transitionEl=e,this.handlePopover())}closeAlert(){this.open=!1,this.clearAutoCloseTimeout()}onBeforeOpen(){this.calciteAlertBeforeOpen.emit()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit()}actionsEndSlotChangeHandler(e){this.hasEndActions=x(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=u[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:B,active:p,openAlertCount:F}=this,q=t?"alert":"alertdialog",f=!e,g=w($,this.icon,this.kind),O=F>1;return this.el.inert=f,this.el.ariaLabel=s,this.el.toggleAttribute("calcite-hydrated-hidden",f),this.el.role=q,a`<div class=${o({[i.container]:!0,[i.containerActive]:p,[`${i.container}--${B}`]:!0,[i.containerEmbedded]:this.embedded,[i.focused]:this.isFocused})} @pointerenter=${this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:null} @pointerleave=${this.autoClose?this.handleMouseLeave:null} .popover=${this.embedded?null:"manual"} ${b(this.setTransitionEl)}>${g&&this.renderIcon(g)||""}<div class=${o(i.textContainer)} @focusin=${this.autoClose&&this.autoCloseTimeoutId?this.handleKeyBoardFocus:null} @focusout=${this.autoClose?this.handleKeyBoardBlur:null}><slot name=${r.title}></slot><slot name=${r.message}></slot><slot name=${r.link}></slot></div>${this.renderActionsEnd()}${O?this.renderQueueCount():null}${this.renderCloseButton()}${e&&p&&t?a`<div class=${o(i.dismissProgress)}></div>`:null}</div>`}renderCloseButton(){return c("close",a`<button .ariaLabel=${this.messages.close} class=${o(i.close)} @click=${this.closeAlert} @focusin=${this.autoClose?this.handleKeyBoardFocus:null} @focusout=${this.autoClose?this.handleKeyBoardBlur:null} type=button><calcite-icon icon=x .scale=${d(this.scale)}></calcite-icon></button>`)}renderQueueCount(){let{openAlertCount:e}=this,t=e>2?e-1:1,s=this.numberStringFormatter.numberFormatter.format(t);return c("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=${d(this.scale)}></calcite-icon></div>`}};k("calcite-alert",m);export{m as Alert};
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as $}from"./7PFVW4JF.js";import{j as A}from"./CVLFEMH2.js";import{a as E}from"./VQMSSO2U.js";import{a as c}from"./NULQJBCW.js";import"./S5CLKCGJ.js";import{a as T}from"./LH7245HX.js";import{a as z}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as d}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{o as w,t as x}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{C as b,D as y,E as o,I as C,P as k,g as v,h as a,o as l}from"./AUIOWPFN.js";var u={slow:14e3,medium:1e4,fast:6e3},r={actionsEnd:"actions-end",title:"title",message:"message",link:"link"},i={actionsEnd:"actions-end",close:"close",container:"container",containerActive:"container--active",dismissProgress:"dismiss-progress",icon:"icon",containerEmbedded:"container--embedded",queueCount:"queue-count",queueCountActive:"queue-count--active",textContainer:"text-container",focused:"focused"},I=300,h=class{constructor(){this.registeredElements=[],this.queueTimeoutId=null}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=null,this.registeredElements.forEach((e,t)=>{e.openAlertCount=this.registeredElements.length,t===0?this.queueTimeoutId=window.setTimeout(()=>e.active=!0,I):e.active=!1})}},D=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--calcite-alert-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));background-color:var(--calcite-alert-background-color, 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) cubic-bezier(.215,.44,.42,.88),all var(--calcite-animation-timing) ease-in-out}.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{display:flex;cursor:pointer;align-items:center;justify-content:flex-end;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline:2px solid transparent;outline-offset:2px;-webkit-appearance:none;border-start-end-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));border-end-end-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));outline-color:transparent}.close:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.close:hover,.close:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-2)}.close:active{background-color:var(--calcite-color-foreground-3)}.queue-count{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;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-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;align-self:stretch}.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--1);line-height:1.375}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size--2);line-height:1.375}: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]) .close{padding:.75rem}: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-0);line-height:1.375}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size--1);line-height:1.375}: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]) .close{padding:1rem}: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]){margin-block-end:.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-0);line-height:1.375}: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]) .close{padding:1.25rem}: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-0);line-height:1.375;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--1);line-height:1.375;font-weight:var(--calcite-font-weight-normal);margin-inline-end:.5rem;color:var(--calcite-color-text-2)}slot[name=link]::slotted(*),*::slotted([slot=link]){display:inline-flex;color:var(--calcite-color-text-link)}: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 6s 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 10s 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 14s 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}}.container--embedded{position:absolute;z-index:var(--calcite-z-index-toast)}:host([hidden]){display:none}[hidden]{display:none}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}`,n=new h,m=class extends y{constructor(){super(...arguments),this.autoCloseTimeoutId=null,this.transitionProp="opacity",this.totalHoverTime=0,this.totalOpenTime=0,this.messages=T(),this.focusSetter=z()(this),this.hasEndActions=!1,this.isFocused=!1,this.numberStringFormatter=new A,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.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:C,type:String},{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}]}}static{this.styles=D}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(),u[this.autoCloseDuration]))}async handlePopover(){await this.componentOnReady(),!(this.embedded||!this.transitionEl)&&(this.open?this.transitionEl.showPopover():this.transitionEl.hidePopover())}openHandler(){this.open?n.registerElement(this.el):n.unregisterElement(this.el),this.handlePopover()}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(this.clearAutoCloseTimeout(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),u[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=null}setTransitionEl(e){e&&(this.transitionEl=e,this.handlePopover())}closeAlert(){this.open=!1,this.clearAutoCloseTimeout()}onBeforeOpen(){this.calciteAlertBeforeOpen.emit()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit()}actionsEndSlotChangeHandler(e){this.hasEndActions=x(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=u[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:B,active:p,openAlertCount:F}=this,q=t?"alert":"alertdialog",f=!e,g=w($,this.icon,this.kind),O=F>1;return this.el.inert=f,this.el.ariaLabel=s,this.el.toggleAttribute("calcite-hydrated-hidden",f),this.el.role=q,a`<div class=${o({[i.container]:!0,[i.containerActive]:p,[`${i.container}--${B}`]:!0,[i.containerEmbedded]:this.embedded,[i.focused]:this.isFocused})} @pointerenter=${this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:null} @pointerleave=${this.autoClose?this.handleMouseLeave:null} .popover=${this.embedded?null:"manual"} ${b(this.setTransitionEl)}>${g&&this.renderIcon(g)||""}<div class=${o(i.textContainer)} @focusin=${this.autoClose&&this.autoCloseTimeoutId?this.handleKeyBoardFocus:null} @focusout=${this.autoClose?this.handleKeyBoardBlur:null}><slot name=${r.title}></slot><slot name=${r.message}></slot><slot name=${r.link}></slot></div>${this.renderActionsEnd()}${O?this.renderQueueCount():null}${this.renderCloseButton()}${e&&p&&t?a`<div class=${o(i.dismissProgress)}></div>`:null}</div>`}renderCloseButton(){return c("close",a`<button .ariaLabel=${this.messages.close} class=${o(i.close)} @click=${this.closeAlert} @focusin=${this.autoClose?this.handleKeyBoardFocus:null} @focusout=${this.autoClose?this.handleKeyBoardBlur:null} type=button><calcite-icon icon=x .scale=${d(this.scale)}></calcite-icon></button>`)}renderQueueCount(){let{openAlertCount:e}=this,t=e>2?e-1:1,s=this.numberStringFormatter.numberFormatter.format(t);return c("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=${d(this.scale)}></calcite-icon></div>`}};k("calcite-alert",m);export{m as Alert};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as v,b as g}from"./
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a as v,b as g}from"./NSBK36H4.js";import{a as m}from"./LH7245HX.js";import{a as p}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{e as h}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as n,C as s,D as d,E as a,J as b,P as u,g as i,h as c,l as o}from"./AUIOWPFN.js";var e={contentCell:"content-cell",numberCell:"number-cell",footerCell:"footer-cell",selectionCell:"selection-cell",selectedCell:"selected-cell",assistiveText:"assistive-text",lastCell:"last-cell",staticCell:"static-cell"},f=i`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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:contents}:host([alignment=center]) td:not(.selection-cell):not(.number-cell){text-align:center}:host([alignment=end]) td:not(.selection-cell):not(.number-cell){text-align:end}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}td{white-space:normal;text-align:start;vertical-align:middle;color:var(--calcite-table-cell-text-color, var(--calcite-color-text-1));background-color:var(--calcite-internal-table-cell-background-color, var(--calcite-table-cell-background-color, transparent));font-size:var(--calcite-internal-table-cell-font-size);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)));padding:var(--calcite-internal-table-cell-padding)}td:not(.static-cell){outline-color:transparent}td:not(.static-cell):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}td.start.content-cell{vertical-align:top}td.end.content-cell{vertical-align:bottom}td.last-cell{border-inline-end:0}.footer-cell{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-table-cell-text-color, var(--calcite-color-text-1));background-color:var(--calcite-table-cell-background-color, var(--calcite-table-cell-background, var(--calcite-color-background)));border-block-start:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)))}.number-cell,.selection-cell{text-align:center;border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-2)));inline-size:2rem;min-inline-size:2rem}.number-cell{color:var(--calcite-table-number-cell-text-color, var(--calcite-color-text-1));background-color:var(--calcite-table-number-cell-background-color, var(--calcite-color-foreground-2))}.number-cell.footer-cell{background-color:var(--calcite-table-number-cell-background-color, var(--calcite-table-cell-background-color, var(--calcite-color-background)))}.selection-cell{color:var(--calcite-table-selection-cell-icon-color, var(--calcite-color-text-3))}.selection-cell:not(.footer-cell){cursor:pointer;background-color:var(--calcite-table-selection-cell-background-color, var(--calcite-table-cell-background-color, transparent))}.selection-cell.footer-cell{background-color:var(--calcite-table-selection-cell-background-color, var(--calcite-table-cell-background-color, var(--calcite-color-background)))}.selected-cell:not(.number-cell):not(.footer-cell){background-color:var(--calcite-table-cell-background-color-selected, var(--calcite-table-row-background-color-selected, var(--calcite-color-surface-highlight)))}.selection-cell.selected-cell{box-shadow:inset 0 0 0 0 var(--calcite-table-row-accent-color-selected, var(--calcite-color-brand));color:var(--calcite-table-selection-cell-icon-color-selected, var(--calcite-color-brand))}.calcite--rtl.selection-cell.selected-cell{box-shadow:inset -.25rem 0 0 0 var(--calcite-table-row-accent-color-selected, var(--calcite-color-brand))}.selection-cell{vertical-align:middle}.selection-cell ::slotted(calcite-icon){pointer-events:none;margin-block-start:.25rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,r=class extends d{constructor(){super(...arguments),this.containerRef=n(),this.messages=m(),this.focusSetter=p()(this),this.contentsText="",this.focused=!1,this.selectionText="",this.alignment="start",this.interactionMode="interactive",this.parentRowAlignment="start",this.scale="m"}static{this.properties={contentsText:[16,{},{state:!0}],focused:[16,{},{state:!0}],selectionText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],colSpan:[11,{},{reflect:!0,type:Number}],disabled:[5,{},{type:Boolean}],interactionMode:1,lastCell:[5,{},{type:Boolean}],messageOverrides:[0,{},{attribute:!1}],numberCell:[5,{},{type:Boolean}],parentRowAlignment:1,parentRowIsSelected:[5,{},{type:Boolean}],parentRowPositionLocalized:1,parentRowType:1,positionInRow:[9,{},{type:Number}],readCellContentsToAT:[5,{},{type:Boolean}],rowSpan:[11,{},{reflect:!0,type:Number}],scale:1,selectionCell:[5,{},{type:Boolean}]}}static{this.styles=f}async setFocus(t){return this.focusSetter(()=>this.containerRef.value,t)}async load(){this.updateScreenReaderContentsText(),this.updateScreenReaderSelectionText()}willUpdate(t){t.has("parentRowIsSelected")&&this.updateScreenReaderSelectionText()}updated(){v(this)}updateScreenReaderSelectionText(){let t=`${this.messages?.row} ${this.parentRowPositionLocalized} ${this.messages?.selected} ${this.messages?.keyboardDeselect}`,l=`${this.messages?.row} ${this.parentRowPositionLocalized} ${this.messages?.unselected} ${this.messages?.keyboardSelect}`;this.selectionText=this.parentRowIsSelected?t:l}updateScreenReaderContentsText(){this.contentsText=this.el.textContent}onContainerBlur(){this.focused=!1}onContainerFocus(){this.focused=!0}render(){let t=h(this.el),l=this.disabled||this.interactionMode==="static"&&(!this.selectionCell||this.selectionCell&&this.parentRowType==="foot");return g({disabled:this.disabled,children:c`<td class=${a({[e.footerCell]:this.parentRowType==="foot",[e.contentCell]:!this.numberCell&&!this.selectionCell,[e.numberCell]:this.numberCell,[e.selectionCell]:this.selectionCell,[e.selectedCell]:this.parentRowIsSelected,[e.lastCell]:this.lastCell&&(!this.rowSpan||this.colSpan&&!!this.rowSpan),[b.rtl]:t==="rtl",[e.staticCell]:l,[this.parentRowAlignment]:this.parentRowAlignment==="start"||this.parentRowAlignment==="end"})} colSpan=${this.colSpan??o} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} .role=${this.interactionMode==="interactive"?"gridcell":"cell"} rowSpan=${this.rowSpan??o} .tabIndex=${l?-1:0} ${s(this.containerRef)}>${(this.selectionCell||this.readCellContentsToAT)&&c`<span .ariaLive=${this.focused?"polite":"off"} class=${a(e.assistiveText)}>${this.selectionCell&&this.selectionText||""}${this.readCellContentsToAT&&!this.selectionCell&&this.contentsText||""}</span>`||""}<slot @slotchange=${this.updateScreenReaderContentsText}></slot></td>`})}};u("calcite-table-cell",r);export{r as TableCell};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a}from"./7WAFUV2T.js";import{a as L}from"./WIJWBGXQ.js";import{a as k}from"./XWXCOJUO.js";import"./UXWFYSWM.js";import"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{e as $,u as I}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as p,C as v,D as y,E as r,G as d,J as w,P as x,g,h as o,o as m}from"./ALOAVLGK.js";var t={container:"container",content:"content",dropdownVertical:"dropdown--vertical",dropdownMenuItems:"dropdown-menu-items",dropdownAction:"dropdown-action",layoutVertical:"layout--vertical",hoverHrefIcon:"hover-href-icon",icon:"icon",iconBreadcrumb:"icon--breadcrumb",iconDropdown:"icon--dropdown",iconEnd:"icon--end",iconStart:"icon--start",isParentVertical:"parent--vertical",itemContent:"item-content",open:"open",nested:"nested",textContainer:"text-container"},S={submenuItem:"submenu-item"},c={arrowLeft:"arrow-left",arrowRight:"arrow-right",chevronLeft:"chevron-left",chevronRight:"chevron-right",chevronUp:"chevron-up",chevronDown:"chevron-down"},M=g`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;box-sizing:border-box;display:flex;align-items:center;flex-shrink:0}:host .container,:host .item-content,:host .content{min-block-size:3rem}:host([layout=vertical]){inline-size:100%}:host(:not([layout=vertical])){block-size:100%}.container,.item-content{display:flex;block-size:100%;inline-size:100%;flex-direction:row;align-items:stretch}.content{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-items:center;justify-content:center;padding-inline:1rem;font-size:var(--calcite-font-size-0);outline:2px solid transparent;outline-offset:2px;text-decoration:none;padding-block-start:.125rem;border-block-end:.125rem solid var(--calcite-color-transparent);background-color:var(--calcite-menu-background-color, var(--calcite-internal-menu-background-color, var(--calcite-color-foreground-1)));color:var(--calcite-menu-text-color, var(--calcite-internal-menu-text-color, var(--calcite-color-text-2)))}.content:hover{--calcite-internal-menu-background-color: var(--calcite-color-foreground-2)}.content:focus{border-block-end-width:4px;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));padding-block-start:.25rem;border-block-end-width:.25rem}.content:active{--calcite-internal-menu-background-color: var(--calcite-color-foreground-3);--calcite-internal-menu-text-color: var(--calcite-color-text-1)}.content span{display:inline-flex}.content.layout--vertical{display:flex;inline-size:100%;justify-content:flex-start;padding-block:1rem;border-block-end:0;border-inline-end:.25rem solid var(--calcite-color-transparent)}:host([layout=vertical]) .content{padding-inline:.75rem}:host([active]) .content{--calcite-internal-menu-text-color: var(--calcite-color-text-1);border-color:var(--calcite-menu-item-accent-color, var(--calcite-color-brand))}:host([active]) .icon{--calcite-internal-menu-item-icon-color: var(--calcite-color-brand)}.icon{color:var(--calcite-menu-text-color, var(--calcite-icon-color, var(--calcite-internal-menu-item-icon-color, var(--calcite-color-text-3))))}.icon--start{margin-inline-end:.75rem}.icon--end{margin-inline-start:.75rem}:host([layout=vertical]) .icon--end{margin-inline-start:auto;padding-inline-start:.75rem}.icon--dropdown{position:relative;margin-inline-start:auto;margin-inline-end:0px;padding-inline-start:.5rem}:host([layout=vertical]) .icon--end~.icon--dropdown{margin-inline-start:.75rem}:host([layout=vertical]) .hover-href-icon{padding-inline-start:.5rem}:host([layout=vertical]) .hover-href-icon~.icon--end{margin-inline-start:.5rem}:host([layout=vertical]) .hover-href-icon~.icon--breadcrumb{margin-inline-start:.75rem}.icon--breadcrumb{margin-inline-end:0px;padding-inline-start:.5rem}:host([layout=vertical]) .icon--breadcrumb{margin-inline-start:auto}:host([layout=vertical]) .icon--breadcrumb~.icon--dropdown{margin-inline-start:.5rem}:host([layout=vertical]) .icon--end~.icon--breadcrumb{margin-inline-start:.5rem}:host([breadcrumb]) .content{padding-inline-end:.75rem}calcite-action{position:relative;block-size:auto;border-inline-start:1px solid var(--calcite-color-foreground-1);--calcite-action-background-color: var(--calcite-menu-background-color);--calcite-action-text-color: var(--calcite-menu-text-color)}calcite-action:after{position:absolute;inset-inline-start:-1px;display:block;inline-size:1px;content:"";inset-block:.75rem;background-color:var(--calcite-color-border-3)}calcite-action:hover:after{block-size:100%;inset-block:0}calcite-action:active{--calcite-action-background-color-press: var(--calcite-menu-background-color)}.content:focus~calcite-action,.content:hover~calcite-action{--calcite-action-text-color: var(--calcite-menu-text-color, var(--calcite-color-text-1))}.content:focus~calcite-action:after,.content:hover~calcite-action:after{block-size:100%;inset-block:0}.dropdown-menu-items{position:absolute;display:none;block-size:auto;min-inline-size:100%;flex-direction:column;overflow:visible;border:1px solid var(--calcite-menu-item-sub-menu-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-menu-item-sub-menu-corner-radius, var(--calcite-corner-radius));inset-block-start:100%;z-index:var(--calcite-z-index-dropdown)}.dropdown-menu-items.open{display:block}.dropdown-menu-items.nested{position:absolute;inset-block-start:-1px;transform:translate(calc(100% - 2px))}.parent--vertical{flex-direction:column}.dropdown--vertical.dropdown-menu-items{position:relative;box-shadow:none;inset-block-start:0;transform:none}.dropdown--vertical.dropdown-menu-items:last-of-type{border-inline:0}:host([layout=vertical]:last-of-type) .dropdown-menu-items{border-block-end:0}:host([slot=submenu-item]) .parent--vertical{padding-inline-start:1.5rem}.dropdown-menu-items.nested.calcite--rtl{transform:translate(calc(-100% + 2px))}.dropdown--vertical.dropdown-menu-items.nested.calcite--rtl{transform:none}.hover-href-icon{position:relative;inset-inline-end:.25rem;margin-inline-start:auto;opacity:0;transition:all var(--calcite-internal-animation-timing-medium) ease-in-out}.content:focus .hover-href-icon,.content:hover .hover-href-icon{inset-inline-end:-.25rem;opacity:1}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends y{constructor(){super(),this.anchorRef=p(),this.dropdownActionRef=p(),this.messages=L(),this.focusSetter=k()(this),this.hasSubmenu=!1,this.isTopLevelItem=!1,this.open=!1,this.calciteInternalMenuItemKeyEvent=m(),this.calciteMenuItemSelect=m(),this.listenOn(window,"click",this.handleClickOut),this.listen("focusout",this.handleFocusOut),this.listen("blur",this.blurHandler),this.listen("focus",this.focusHandler)}static{this.properties={hasSubmenu:[16,{},{state:!0}],submenuItems:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],breadcrumb:[7,{},{reflect:!0,type:Boolean}],href:1,iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],isTopLevelItem:[5,{},{type:Boolean}],label:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],text:1,topLevelMenuLayout:1}}static{this.styles=M}async setFocus(e){return this.focusSetter(()=>this.anchorRef.value,e)}handleClickOut(e){this.topLevelMenuLayout!=="vertical"&&this.hasSubmenu&&this.open&&!e.composedPath().includes(this.el)&&(this.open=!1)}handleFocusOut(e){this.topLevelMenuLayout!=="vertical"&&!this.el.contains(e.relatedTarget)&&(this.open=!1)}blurHandler(){this.isFocused=!1}clickHandler(e){(this.href&&e.target===this.dropdownActionRef.value||!this.href&&this.hasSubmenu)&&(this.open=!this.open),this.selectMenuItem(e)}focusHandler(e){let n=e.target;this.isFocused=!0,n.open&&!this.open&&(n.open=!1)}handleMenuItemSlotChange(e){this.submenuItems=I(e),this.submenuItems.forEach(n=>{n.topLevelMenuLayout||(n.topLevelMenuLayout=this.topLevelMenuLayout)}),this.hasSubmenu=this.submenuItems.length>0}async keyDownHandler(e){let{hasSubmenu:n,href:l,layout:b,open:s,submenuItems:h}=this,i=e.key,u=e.target===this.dropdownActionRef.value;if(!e.defaultPrevented){if(i===" "||i==="Enter")n&&(!l||l&&u)&&(this.open=!s),!(l&&u)&&i!=="Enter"&&this.selectMenuItem(e),(i===" "||l&&u)&&e.preventDefault();else if(i==="Escape"){if(s){this.open=!1;return}this.calciteInternalMenuItemKeyEvent.emit({event:e}),e.preventDefault()}else if(i==="ArrowDown"||i==="ArrowUp"){if(e.preventDefault(),(u||!l)&&n&&!s&&b==="horizontal"){this.open=!0;return}this.calciteInternalMenuItemKeyEvent.emit({event:e,children:h,isSubmenuOpen:s&&n})}else if(i==="ArrowLeft")e.preventDefault(),this.calciteInternalMenuItemKeyEvent.emit({event:e,children:h,isSubmenuOpen:!0});else if(i==="ArrowRight"){if(e.preventDefault(),(u||!l)&&n&&!s&&b==="vertical"){this.open=!0;return}this.calciteInternalMenuItemKeyEvent.emit({event:e,children:h,isSubmenuOpen:s&&n})}}}selectMenuItem(e){e.target!==this.dropdownActionRef.value&&this.calciteMenuItemSelect.emit()}renderIconStart(){return a(t.iconStart,o`<calcite-icon class=${`${t.icon} ${t.iconStart}`} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} scale=s></calcite-icon>`)}renderIconEnd(){return a(t.iconEnd,o`<calcite-icon class=${`${t.icon} ${t.iconEnd}`} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} scale=s></calcite-icon>`)}renderBreadcrumbIcon(e){return a(t.iconBreadcrumb,o`<calcite-icon class=${`${t.icon} ${t.iconBreadcrumb}`} .icon=${e==="rtl"?c.chevronLeft:c.chevronRight} scale=s></calcite-icon>`)}renderDropdownIcon(e){let n=e==="rtl"?"chevron-left":"chevron-right";return a(t.iconDropdown,o`<calcite-icon class=${`${t.icon} ${t.iconDropdown}`} .icon=${this.topLevelMenuLayout==="vertical"||this.isTopLevelItem?this.open?c.chevronUp:c.chevronDown:n} scale=s></calcite-icon>`)}renderDropdownAction(e){let n=e==="rtl"?"chevron-left":"chevron-right";return a(t.dropdownAction,o`<calcite-action .aria=${{expanded:this.open}} class=${r(t.dropdownAction)} .icon=${this.topLevelMenuLayout==="vertical"||this.isTopLevelItem?this.open?c.chevronUp:c.chevronDown:n} @click=${this.clickHandler} @keydown=${this.keyDownHandler} .text=${this.messages.open} ${v(this.dropdownActionRef)}></calcite-action>`)}renderSubmenuItems(e){return o`<calcite-menu class=${r({[t.dropdownMenuItems]:!0,[t.open]:this.open,[t.nested]:!this.isTopLevelItem,[w.rtl]:e==="rtl",[t.dropdownVertical]:this.topLevelMenuLayout==="vertical"})} .label=${this.messages.submenu} layout=vertical role=menu><slot name=${S.submenuItem} @slotchange=${this.handleMenuItemSlotChange}></slot></calcite-menu>`}renderHrefIcon(e){return a(t.hoverHrefIcon,o`<calcite-icon class=${r(t.hoverHrefIcon)} .icon=${e==="rtl"?c.arrowLeft:c.arrowRight} scale=s></calcite-icon>`)}renderItemContent(e){let n=this.href&&(this.topLevelMenuLayout==="vertical"||!this.isTopLevelItem);return o`${this.iconStart&&this.renderIconStart()||""}<div class=${r(t.textContainer)}><span>${this.text}</span></div>${n&&this.renderHrefIcon(e)||""}${this.iconEnd&&this.renderIconEnd()||""}${this.breadcrumb?this.renderBreadcrumbIcon(e):null}${!this.href&&this.hasSubmenu?this.renderDropdownIcon(e):null}`}render(){let e=$(this.el);return o`<li class=${r({[t.container]:!0,[t.isParentVertical]:this.topLevelMenuLayout==="vertical"})} role=none><div class=${r(t.itemContent)}><a .ariaCurrent=${this.isFocused?"page":!1} .ariaExpanded=${this.open} .ariaHasPopup=${this.hasSubmenu} .ariaLabel=${this.label} class=${r({[t.layoutVertical]:this.layout==="vertical",[t.content]:!0})} href=${this.href??d} @click=${this.clickHandler} @keydown=${this.keyDownHandler} rel=${this.rel??d} role=menuitem .tabIndex=${this.isTopLevelItem?0:-1} target=${this.target??d} ${v(this.anchorRef)}>${this.renderItemContent(e)}</a>${this.href&&this.hasSubmenu?this.renderDropdownAction(e):null}</div>${this.renderSubmenuItems(e)}</li>`}};x("calcite-menu-item",f);export{f as MenuItem};
|
|
3
|
+
v5.0.0-next.5 */
|
|
4
|
+
import{a}from"./NULQJBCW.js";import{a as L}from"./LH7245HX.js";import{a as k}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import"./3YZG7MA3.js";import"./CIU4VM7X.js";import{e as $,u as I}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as p,C as v,D as y,E as r,G as d,J as w,P as x,g,h as o,o as m}from"./AUIOWPFN.js";var t={container:"container",content:"content",dropdownVertical:"dropdown--vertical",dropdownMenuItems:"dropdown-menu-items",dropdownAction:"dropdown-action",layoutVertical:"layout--vertical",hoverHrefIcon:"hover-href-icon",icon:"icon",iconBreadcrumb:"icon--breadcrumb",iconDropdown:"icon--dropdown",iconEnd:"icon--end",iconStart:"icon--start",isParentVertical:"parent--vertical",itemContent:"item-content",open:"open",nested:"nested",textContainer:"text-container"},S={submenuItem:"submenu-item"},c={arrowLeft:"arrow-left",arrowRight:"arrow-right",chevronLeft:"chevron-left",chevronRight:"chevron-right",chevronUp:"chevron-up",chevronDown:"chevron-down"},M=g`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;box-sizing:border-box;display:flex;align-items:center;flex-shrink:0}:host .container,:host .item-content,:host .content{min-block-size:3rem}:host([layout=vertical]){inline-size:100%}:host(:not([layout=vertical])){block-size:100%}.container,.item-content{display:flex;block-size:100%;inline-size:100%;flex-direction:row;align-items:stretch}.content{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-items:center;justify-content:center;padding-inline:1rem;font-size:var(--calcite-font-size-0);outline:2px solid transparent;outline-offset:2px;text-decoration:none;padding-block-start:.125rem;border-block-end:.125rem solid var(--calcite-color-transparent);background-color:var(--calcite-menu-background-color, var(--calcite-internal-menu-background-color, var(--calcite-color-foreground-1)));color:var(--calcite-menu-text-color, var(--calcite-internal-menu-text-color, var(--calcite-color-text-2)))}.content:hover{--calcite-internal-menu-background-color: var(--calcite-color-foreground-2)}.content:focus{border-block-end-width:4px;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));padding-block-start:.25rem;border-block-end-width:.25rem}.content:active{--calcite-internal-menu-background-color: var(--calcite-color-foreground-3);--calcite-internal-menu-text-color: var(--calcite-color-text-1)}.content span{display:inline-flex}.content.layout--vertical{display:flex;inline-size:100%;justify-content:flex-start;padding-block:1rem;border-block-end:0;border-inline-end:.25rem solid var(--calcite-color-transparent)}:host([layout=vertical]) .content{padding-inline:.75rem}:host([active]) .content{--calcite-internal-menu-text-color: var(--calcite-color-text-1);border-color:var(--calcite-menu-item-accent-color, var(--calcite-color-brand))}:host([active]) .icon{--calcite-internal-menu-item-icon-color: var(--calcite-color-brand)}.icon{color:var(--calcite-menu-text-color, var(--calcite-icon-color, var(--calcite-internal-menu-item-icon-color, var(--calcite-color-text-3))))}.icon--start{margin-inline-end:.75rem}.icon--end{margin-inline-start:.75rem}:host([layout=vertical]) .icon--end{margin-inline-start:auto;padding-inline-start:.75rem}.icon--dropdown{position:relative;margin-inline-start:auto;margin-inline-end:0px;padding-inline-start:.5rem}:host([layout=vertical]) .icon--end~.icon--dropdown{margin-inline-start:.75rem}:host([layout=vertical]) .hover-href-icon{padding-inline-start:.5rem}:host([layout=vertical]) .hover-href-icon~.icon--end{margin-inline-start:.5rem}:host([layout=vertical]) .hover-href-icon~.icon--breadcrumb{margin-inline-start:.75rem}.icon--breadcrumb{margin-inline-end:0px;padding-inline-start:.5rem}:host([layout=vertical]) .icon--breadcrumb{margin-inline-start:auto}:host([layout=vertical]) .icon--breadcrumb~.icon--dropdown{margin-inline-start:.5rem}:host([layout=vertical]) .icon--end~.icon--breadcrumb{margin-inline-start:.5rem}:host([breadcrumb]) .content{padding-inline-end:.75rem}calcite-action{position:relative;block-size:auto;border-inline-start:1px solid var(--calcite-color-foreground-1);--calcite-action-background-color: var(--calcite-menu-background-color);--calcite-action-text-color: var(--calcite-menu-text-color)}calcite-action:after{position:absolute;inset-inline-start:-1px;display:block;inline-size:1px;content:"";inset-block:.75rem;background-color:var(--calcite-color-border-3)}calcite-action:hover:after{block-size:100%;inset-block:0}calcite-action:active{--calcite-action-background-color-press: var(--calcite-menu-background-color)}.content:focus~calcite-action,.content:hover~calcite-action{--calcite-action-text-color: var(--calcite-menu-text-color, var(--calcite-color-text-1))}.content:focus~calcite-action:after,.content:hover~calcite-action:after{block-size:100%;inset-block:0}.dropdown-menu-items{position:absolute;display:none;block-size:auto;min-inline-size:100%;flex-direction:column;overflow:visible;border:1px solid var(--calcite-menu-item-sub-menu-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-menu-item-sub-menu-corner-radius, var(--calcite-corner-radius));inset-block-start:100%;z-index:var(--calcite-z-index-dropdown)}.dropdown-menu-items.open{display:block}.dropdown-menu-items.nested{position:absolute;inset-block-start:-1px;transform:translate(calc(100% - 2px))}.parent--vertical{flex-direction:column}.dropdown--vertical.dropdown-menu-items{position:relative;box-shadow:none;inset-block-start:0;transform:none}.dropdown--vertical.dropdown-menu-items:last-of-type{border-inline:0}:host([layout=vertical]:last-of-type) .dropdown-menu-items{border-block-end:0}:host([slot=submenu-item]) .parent--vertical{padding-inline-start:1.5rem}.dropdown-menu-items.nested.calcite--rtl{transform:translate(calc(-100% + 2px))}.dropdown--vertical.dropdown-menu-items.nested.calcite--rtl{transform:none}.hover-href-icon{position:relative;inset-inline-end:.25rem;margin-inline-start:auto;opacity:0;transition:all var(--calcite-internal-animation-timing-medium) ease-in-out}.content:focus .hover-href-icon,.content:hover .hover-href-icon{inset-inline-end:-.25rem;opacity:1}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends y{constructor(){super(),this.anchorRef=p(),this.dropdownActionRef=p(),this.messages=L(),this.focusSetter=k()(this),this.hasSubmenu=!1,this.isTopLevelItem=!1,this.open=!1,this.calciteInternalMenuItemKeyEvent=m(),this.calciteMenuItemSelect=m(),this.listenOn(window,"click",this.handleClickOut),this.listen("focusout",this.handleFocusOut),this.listen("blur",this.blurHandler),this.listen("focus",this.focusHandler)}static{this.properties={hasSubmenu:[16,{},{state:!0}],submenuItems:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],breadcrumb:[7,{},{reflect:!0,type:Boolean}],href:1,iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],isTopLevelItem:[5,{},{type:Boolean}],label:1,layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],text:1,topLevelMenuLayout:1}}static{this.styles=M}async setFocus(e){return this.focusSetter(()=>this.anchorRef.value,e)}handleClickOut(e){this.topLevelMenuLayout!=="vertical"&&this.hasSubmenu&&this.open&&!e.composedPath().includes(this.el)&&(this.open=!1)}handleFocusOut(e){this.topLevelMenuLayout!=="vertical"&&!this.el.contains(e.relatedTarget)&&(this.open=!1)}blurHandler(){this.isFocused=!1}clickHandler(e){(this.href&&e.target===this.dropdownActionRef.value||!this.href&&this.hasSubmenu)&&(this.open=!this.open),this.selectMenuItem(e)}focusHandler(e){let n=e.target;this.isFocused=!0,n.open&&!this.open&&(n.open=!1)}handleMenuItemSlotChange(e){this.submenuItems=I(e),this.submenuItems.forEach(n=>{n.topLevelMenuLayout||(n.topLevelMenuLayout=this.topLevelMenuLayout)}),this.hasSubmenu=this.submenuItems.length>0}async keyDownHandler(e){let{hasSubmenu:n,href:l,layout:b,open:s,submenuItems:h}=this,i=e.key,u=e.target===this.dropdownActionRef.value;if(!e.defaultPrevented){if(i===" "||i==="Enter")n&&(!l||l&&u)&&(this.open=!s),!(l&&u)&&i!=="Enter"&&this.selectMenuItem(e),(i===" "||l&&u)&&e.preventDefault();else if(i==="Escape"){if(s){this.open=!1;return}this.calciteInternalMenuItemKeyEvent.emit({event:e}),e.preventDefault()}else if(i==="ArrowDown"||i==="ArrowUp"){if(e.preventDefault(),(u||!l)&&n&&!s&&b==="horizontal"){this.open=!0;return}this.calciteInternalMenuItemKeyEvent.emit({event:e,children:h,isSubmenuOpen:s&&n})}else if(i==="ArrowLeft")e.preventDefault(),this.calciteInternalMenuItemKeyEvent.emit({event:e,children:h,isSubmenuOpen:!0});else if(i==="ArrowRight"){if(e.preventDefault(),(u||!l)&&n&&!s&&b==="vertical"){this.open=!0;return}this.calciteInternalMenuItemKeyEvent.emit({event:e,children:h,isSubmenuOpen:s&&n})}}}selectMenuItem(e){e.target!==this.dropdownActionRef.value&&this.calciteMenuItemSelect.emit()}renderIconStart(){return a(t.iconStart,o`<calcite-icon class=${`${t.icon} ${t.iconStart}`} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} scale=s></calcite-icon>`)}renderIconEnd(){return a(t.iconEnd,o`<calcite-icon class=${`${t.icon} ${t.iconEnd}`} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} scale=s></calcite-icon>`)}renderBreadcrumbIcon(e){return a(t.iconBreadcrumb,o`<calcite-icon class=${`${t.icon} ${t.iconBreadcrumb}`} .icon=${e==="rtl"?c.chevronLeft:c.chevronRight} scale=s></calcite-icon>`)}renderDropdownIcon(e){let n=e==="rtl"?"chevron-left":"chevron-right";return a(t.iconDropdown,o`<calcite-icon class=${`${t.icon} ${t.iconDropdown}`} .icon=${this.topLevelMenuLayout==="vertical"||this.isTopLevelItem?this.open?c.chevronUp:c.chevronDown:n} scale=s></calcite-icon>`)}renderDropdownAction(e){let n=e==="rtl"?"chevron-left":"chevron-right";return a(t.dropdownAction,o`<calcite-action .aria=${{expanded:this.open}} class=${r(t.dropdownAction)} .icon=${this.topLevelMenuLayout==="vertical"||this.isTopLevelItem?this.open?c.chevronUp:c.chevronDown:n} @click=${this.clickHandler} @keydown=${this.keyDownHandler} .text=${this.messages.open} ${v(this.dropdownActionRef)}></calcite-action>`)}renderSubmenuItems(e){return o`<calcite-menu class=${r({[t.dropdownMenuItems]:!0,[t.open]:this.open,[t.nested]:!this.isTopLevelItem,[w.rtl]:e==="rtl",[t.dropdownVertical]:this.topLevelMenuLayout==="vertical"})} .label=${this.messages.submenu} layout=vertical role=menu><slot name=${S.submenuItem} @slotchange=${this.handleMenuItemSlotChange}></slot></calcite-menu>`}renderHrefIcon(e){return a(t.hoverHrefIcon,o`<calcite-icon class=${r(t.hoverHrefIcon)} .icon=${e==="rtl"?c.arrowLeft:c.arrowRight} scale=s></calcite-icon>`)}renderItemContent(e){let n=this.href&&(this.topLevelMenuLayout==="vertical"||!this.isTopLevelItem);return o`${this.iconStart&&this.renderIconStart()||""}<div class=${r(t.textContainer)}><span>${this.text}</span></div>${n&&this.renderHrefIcon(e)||""}${this.iconEnd&&this.renderIconEnd()||""}${this.breadcrumb?this.renderBreadcrumbIcon(e):null}${!this.href&&this.hasSubmenu?this.renderDropdownIcon(e):null}`}render(){let e=$(this.el);return o`<li class=${r({[t.container]:!0,[t.isParentVertical]:this.topLevelMenuLayout==="vertical"})} role=none><div class=${r(t.itemContent)}><a .ariaCurrent=${this.isFocused?"page":!1} .ariaExpanded=${this.open} .ariaHasPopup=${this.hasSubmenu} .ariaLabel=${this.label} class=${r({[t.layoutVertical]:this.layout==="vertical",[t.content]:!0})} href=${this.href??d} @click=${this.clickHandler} @keydown=${this.keyDownHandler} rel=${this.rel??d} role=menuitem .tabIndex=${this.isTopLevelItem?0:-1} target=${this.target??d} ${v(this.anchorRef)}>${this.renderItemContent(e)}</a>${this.href&&this.hasSubmenu?this.renderDropdownAction(e):null}</div>${this.renderSubmenuItems(e)}</li>`}};x("calcite-menu-item",f);export{f as MenuItem};
|