scu-web-components 0.0.21 → 0.0.24
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/chunks/chunk.24NBMK6U.js +209 -0
- package/dist/chunks/chunk.24NBMK6U.js.map +7 -0
- package/dist/chunks/chunk.2BQ7UODT.js +2 -0
- package/dist/chunks/chunk.2BQ7UODT.js.map +7 -0
- package/dist/chunks/chunk.2ELG5CNM.js +36 -0
- package/dist/chunks/chunk.2ELG5CNM.js.map +7 -0
- package/dist/chunks/chunk.2EWF7YQO.js +2 -0
- package/dist/chunks/chunk.2EWF7YQO.js.map +7 -0
- package/dist/chunks/chunk.2SWJYWHF.js +4 -0
- package/dist/chunks/chunk.2SWJYWHF.js.map +7 -0
- package/dist/chunks/chunk.2WHWWJLN.js +246 -0
- package/dist/chunks/chunk.2WHWWJLN.js.map +7 -0
- package/dist/chunks/chunk.3FBPDSVX.js +246 -0
- package/dist/chunks/chunk.3FBPDSVX.js.map +7 -0
- package/dist/chunks/chunk.3G6ANMKZ.js +2 -0
- package/dist/chunks/chunk.3G6ANMKZ.js.map +7 -0
- package/dist/chunks/chunk.3JE4PL4T.js +2 -0
- package/dist/chunks/chunk.3JE4PL4T.js.map +7 -0
- package/dist/chunks/chunk.3ZF5XE56.js +2 -0
- package/dist/chunks/chunk.3ZF5XE56.js.map +7 -0
- package/dist/chunks/chunk.4J2YYREQ.js +2 -0
- package/dist/chunks/chunk.4J2YYREQ.js.map +7 -0
- package/dist/chunks/chunk.4M3UL46P.js +2 -0
- package/dist/chunks/chunk.4M3UL46P.js.map +7 -0
- package/dist/chunks/chunk.4QKLGLBT.js +17 -0
- package/dist/chunks/chunk.4QKLGLBT.js.map +7 -0
- package/dist/chunks/chunk.4UACPW3F.js +36 -0
- package/dist/chunks/chunk.4UACPW3F.js.map +7 -0
- package/dist/chunks/chunk.55WXL65L.js +2 -0
- package/dist/chunks/chunk.55WXL65L.js.map +7 -0
- package/dist/chunks/chunk.5B2MVQ27.js +2 -0
- package/dist/chunks/chunk.5B2MVQ27.js.map +7 -0
- package/dist/chunks/chunk.5BFTTZIS.js +17 -0
- package/dist/chunks/chunk.5BFTTZIS.js.map +7 -0
- package/dist/chunks/chunk.5I3BUSVW.js +4 -0
- package/dist/chunks/chunk.5I3BUSVW.js.map +7 -0
- package/dist/chunks/chunk.5KRMSIKB.js +2 -0
- package/dist/chunks/chunk.5KRMSIKB.js.map +7 -0
- package/dist/chunks/chunk.5O57EYF4.js +2 -0
- package/dist/chunks/chunk.5O57EYF4.js.map +7 -0
- package/dist/chunks/chunk.5P5RU7GD.js +2 -0
- package/dist/chunks/chunk.5P5RU7GD.js.map +7 -0
- package/dist/chunks/chunk.5SNSWZHO.js +2 -0
- package/dist/chunks/chunk.5SNSWZHO.js.map +7 -0
- package/dist/chunks/chunk.5Y44B36I.js +2 -0
- package/dist/chunks/chunk.5Y44B36I.js.map +7 -0
- package/dist/chunks/chunk.62BSOUMV.js +246 -0
- package/dist/chunks/chunk.62BSOUMV.js.map +7 -0
- package/dist/chunks/chunk.62GWBO3B.js +2 -0
- package/dist/chunks/chunk.62GWBO3B.js.map +7 -0
- package/dist/chunks/chunk.6IOOPRMR.js +246 -0
- package/dist/chunks/chunk.6IOOPRMR.js.map +7 -0
- package/dist/chunks/chunk.6JEOFLOD.js +2 -0
- package/dist/chunks/chunk.6JEOFLOD.js.map +7 -0
- package/dist/chunks/chunk.6JZBSBO7.js +2 -0
- package/dist/chunks/chunk.6JZBSBO7.js.map +7 -0
- package/dist/chunks/chunk.6PZBNKZO.js +2 -0
- package/dist/chunks/chunk.6PZBNKZO.js.map +7 -0
- package/dist/chunks/chunk.6Z3LLVPT.js +2 -0
- package/dist/chunks/chunk.6Z3LLVPT.js.map +7 -0
- package/dist/chunks/chunk.75XREEIK.js +58 -0
- package/dist/chunks/chunk.75XREEIK.js.map +7 -0
- package/dist/chunks/chunk.76QR74HA.js +2 -0
- package/dist/chunks/chunk.76QR74HA.js.map +7 -0
- package/dist/chunks/chunk.76VAIQNL.js +2 -0
- package/dist/chunks/chunk.76VAIQNL.js.map +7 -0
- package/dist/chunks/chunk.7CJJ52HY.js +2 -0
- package/dist/chunks/chunk.7CJJ52HY.js.map +7 -0
- package/dist/chunks/chunk.7I6Z5MNC.js +32 -0
- package/dist/chunks/chunk.7I6Z5MNC.js.map +7 -0
- package/dist/chunks/chunk.7K6STK3D.js +2 -0
- package/dist/chunks/chunk.7K6STK3D.js.map +7 -0
- package/dist/chunks/chunk.7N44TYQ4.js +36 -0
- package/dist/chunks/chunk.7N44TYQ4.js.map +7 -0
- package/dist/chunks/chunk.7RDBE3IG.js +2 -0
- package/dist/chunks/chunk.7RDBE3IG.js.map +7 -0
- package/dist/chunks/chunk.7UYJHKA2.js +2 -0
- package/dist/chunks/chunk.7UYJHKA2.js.map +7 -0
- package/dist/chunks/chunk.7VW267FJ.js +17 -0
- package/dist/chunks/chunk.7VW267FJ.js.map +7 -0
- package/dist/chunks/chunk.7Z2IEKUA.js +17 -0
- package/dist/chunks/chunk.7Z2IEKUA.js.map +7 -0
- package/dist/chunks/chunk.ACJT3GFX.js +17 -0
- package/dist/chunks/chunk.ACJT3GFX.js.map +7 -0
- package/dist/chunks/chunk.AFSROIGE.js +2 -0
- package/dist/chunks/chunk.AFSROIGE.js.map +7 -0
- package/dist/chunks/chunk.AGSOV6KN.js +2 -0
- package/dist/chunks/chunk.AGSOV6KN.js.map +7 -0
- package/dist/chunks/chunk.ALNUWLAA.js +246 -0
- package/dist/chunks/chunk.ALNUWLAA.js.map +7 -0
- package/dist/chunks/chunk.B2K5UEIA.js +4 -0
- package/dist/chunks/chunk.B2K5UEIA.js.map +7 -0
- package/dist/chunks/chunk.B63G34N3.js +2 -0
- package/dist/chunks/chunk.B63G34N3.js.map +7 -0
- package/dist/chunks/chunk.BCRS6BHB.js +2 -0
- package/dist/chunks/chunk.BCRS6BHB.js.map +7 -0
- package/dist/chunks/chunk.BLUL53KO.js +2 -0
- package/dist/chunks/chunk.BLUL53KO.js.map +7 -0
- package/dist/chunks/chunk.BLURUGZZ.js +2 -0
- package/dist/chunks/chunk.BLURUGZZ.js.map +7 -0
- package/dist/chunks/chunk.BQDEQXNF.js +246 -0
- package/dist/chunks/chunk.BQDEQXNF.js.map +7 -0
- package/dist/chunks/chunk.BRZSOG7L.js +17 -0
- package/dist/chunks/chunk.BRZSOG7L.js.map +7 -0
- package/dist/chunks/chunk.BXOGDFND.js +17 -0
- package/dist/chunks/chunk.BXOGDFND.js.map +7 -0
- package/dist/chunks/chunk.C5GIRELG.js +246 -0
- package/dist/chunks/chunk.C5GIRELG.js.map +7 -0
- package/dist/chunks/chunk.C77Z2GOU.js +2 -0
- package/dist/chunks/chunk.C77Z2GOU.js.map +7 -0
- package/dist/chunks/chunk.CJCFUQDV.js +2 -0
- package/dist/chunks/chunk.CJCFUQDV.js.map +7 -0
- package/dist/chunks/chunk.CL4H34X3.js +2 -0
- package/dist/chunks/chunk.CL4H34X3.js.map +7 -0
- package/dist/chunks/chunk.CPPVHUGU.js +58 -0
- package/dist/chunks/chunk.CPPVHUGU.js.map +7 -0
- package/dist/chunks/chunk.CQVODQM5.js +246 -0
- package/dist/chunks/chunk.CQVODQM5.js.map +7 -0
- package/dist/chunks/chunk.CUVIYUQF.js +4 -0
- package/dist/chunks/chunk.CUVIYUQF.js.map +7 -0
- package/dist/chunks/chunk.DCCR6AGA.js +4 -0
- package/dist/chunks/chunk.DCCR6AGA.js.map +7 -0
- package/dist/chunks/chunk.DIGVG2Z4.js +2 -0
- package/dist/chunks/chunk.DIGVG2Z4.js.map +7 -0
- package/dist/chunks/chunk.DMINXQPK.js +2 -0
- package/dist/chunks/chunk.DMINXQPK.js.map +7 -0
- package/dist/chunks/chunk.DSHY3BSF.js +2 -0
- package/dist/chunks/chunk.DSHY3BSF.js.map +7 -0
- package/dist/chunks/chunk.DTU7NHQP.js +2 -0
- package/dist/chunks/chunk.DTU7NHQP.js.map +7 -0
- package/dist/chunks/chunk.DX5NKIGH.js +2 -0
- package/dist/chunks/chunk.DX5NKIGH.js.map +7 -0
- package/dist/chunks/chunk.EFY6AEW3.js +256 -0
- package/dist/chunks/chunk.EFY6AEW3.js.map +7 -0
- package/dist/chunks/chunk.EXCY4PGS.js +2 -0
- package/dist/chunks/chunk.EXCY4PGS.js.map +7 -0
- package/dist/chunks/chunk.EXTERN74.js +246 -0
- package/dist/chunks/chunk.EXTERN74.js.map +7 -0
- package/dist/chunks/chunk.F37ZBJTZ.js +58 -0
- package/dist/chunks/chunk.F37ZBJTZ.js.map +7 -0
- package/dist/chunks/chunk.F7TA5BBQ.js +4 -0
- package/dist/chunks/chunk.F7TA5BBQ.js.map +7 -0
- package/dist/chunks/chunk.FFYRZL5P.js +36 -0
- package/dist/chunks/chunk.FFYRZL5P.js.map +7 -0
- package/dist/chunks/chunk.FGDIFLCG.js +209 -0
- package/dist/chunks/chunk.FGDIFLCG.js.map +7 -0
- package/dist/chunks/chunk.FGYESAKS.js +17 -0
- package/dist/chunks/chunk.FGYESAKS.js.map +7 -0
- package/dist/chunks/chunk.FSDNLIWI.js +246 -0
- package/dist/chunks/chunk.FSDNLIWI.js.map +7 -0
- package/dist/chunks/chunk.FTZRYMGD.js +246 -0
- package/dist/chunks/chunk.FTZRYMGD.js.map +7 -0
- package/dist/chunks/chunk.FXIPPNQF.js +4 -0
- package/dist/chunks/chunk.FXIPPNQF.js.map +7 -0
- package/dist/chunks/chunk.FYX7SUTY.js +2 -0
- package/dist/chunks/chunk.FYX7SUTY.js.map +7 -0
- package/dist/chunks/chunk.GKPHHJ6O.js +2 -0
- package/dist/chunks/chunk.GKPHHJ6O.js.map +7 -0
- package/dist/chunks/chunk.GNYOOVQH.js +2 -0
- package/dist/chunks/chunk.GNYOOVQH.js.map +7 -0
- package/dist/chunks/chunk.GPGNXNQL.js +2 -0
- package/dist/chunks/chunk.GPGNXNQL.js.map +7 -0
- package/dist/chunks/chunk.GZA7MQCC.js +2 -0
- package/dist/chunks/chunk.GZA7MQCC.js.map +7 -0
- package/dist/chunks/chunk.GZS6TA3M.js +2 -0
- package/dist/chunks/chunk.GZS6TA3M.js.map +7 -0
- package/dist/chunks/chunk.H4SWVIDO.js +2 -0
- package/dist/chunks/chunk.H4SWVIDO.js.map +7 -0
- package/dist/chunks/chunk.HLMRJM7V.js +47 -0
- package/dist/chunks/chunk.HLMRJM7V.js.map +7 -0
- package/dist/chunks/chunk.I3OTM2TA.js +58 -0
- package/dist/chunks/chunk.I3OTM2TA.js.map +7 -0
- package/dist/chunks/chunk.IAALPGL2.js +2 -0
- package/dist/chunks/chunk.IAALPGL2.js.map +7 -0
- package/dist/chunks/chunk.IHF2YHH2.js +2 -0
- package/dist/chunks/chunk.IHF2YHH2.js.map +7 -0
- package/dist/chunks/chunk.INKWYFUB.js +4 -0
- package/dist/chunks/chunk.INKWYFUB.js.map +7 -0
- package/dist/chunks/chunk.IP7ASGZ6.js +2 -0
- package/dist/chunks/chunk.IP7ASGZ6.js.map +7 -0
- package/dist/chunks/chunk.J5HZGWVY.js +17 -0
- package/dist/chunks/chunk.J5HZGWVY.js.map +7 -0
- package/dist/chunks/chunk.JJRLXFKE.js +58 -0
- package/dist/chunks/chunk.JJRLXFKE.js.map +7 -0
- package/dist/chunks/chunk.JS4YAO4B.js +29 -0
- package/dist/chunks/chunk.JS4YAO4B.js.map +7 -0
- package/dist/chunks/chunk.KLCHR5KI.js +2 -0
- package/dist/chunks/chunk.KLCHR5KI.js.map +7 -0
- package/dist/chunks/chunk.KLH46EZA.js +2 -0
- package/dist/chunks/chunk.KLH46EZA.js.map +7 -0
- package/dist/chunks/chunk.KT4MZLLK.js +2 -0
- package/dist/chunks/chunk.KT4MZLLK.js.map +7 -0
- package/dist/chunks/chunk.L3ILTO7U.js +2 -0
- package/dist/chunks/chunk.L3ILTO7U.js.map +7 -0
- package/dist/chunks/chunk.L6NJJXH5.js +2 -0
- package/dist/chunks/chunk.L6NJJXH5.js.map +7 -0
- package/dist/chunks/chunk.L7PT5ADQ.js +4 -0
- package/dist/chunks/chunk.L7PT5ADQ.js.map +7 -0
- package/dist/chunks/chunk.LAQTQIRZ.js +2 -0
- package/dist/chunks/chunk.LAQTQIRZ.js.map +7 -0
- package/dist/chunks/chunk.LCOK4GPO.js +2 -0
- package/dist/chunks/chunk.LCOK4GPO.js.map +7 -0
- package/dist/chunks/chunk.LEIF5C3J.js +17 -0
- package/dist/chunks/chunk.LEIF5C3J.js.map +7 -0
- package/dist/chunks/chunk.LPZIEPKJ.js +2 -0
- package/dist/chunks/chunk.LPZIEPKJ.js.map +7 -0
- package/dist/chunks/chunk.LZYJXAXV.js +4 -0
- package/dist/chunks/chunk.LZYJXAXV.js.map +7 -0
- package/dist/chunks/chunk.M3VMHGNE.js +2 -0
- package/dist/chunks/chunk.M3VMHGNE.js.map +7 -0
- package/dist/chunks/chunk.MBVU2OPU.js +4 -0
- package/dist/chunks/chunk.MBVU2OPU.js.map +7 -0
- package/dist/chunks/chunk.MDHIXFBN.js +2 -0
- package/dist/chunks/chunk.MDHIXFBN.js.map +7 -0
- package/dist/chunks/chunk.MGZVQJ3S.js +245 -0
- package/dist/chunks/chunk.MGZVQJ3S.js.map +7 -0
- package/dist/chunks/chunk.MLENW6F3.js +246 -0
- package/dist/chunks/chunk.MLENW6F3.js.map +7 -0
- package/dist/chunks/chunk.MMXBXV6L.js +17 -0
- package/dist/chunks/chunk.MMXBXV6L.js.map +7 -0
- package/dist/chunks/chunk.MTKBF5OZ.js +2 -0
- package/dist/chunks/chunk.MTKBF5OZ.js.map +7 -0
- package/dist/chunks/chunk.MX2YVDL5.js +17 -0
- package/dist/chunks/chunk.MX2YVDL5.js.map +7 -0
- package/dist/chunks/chunk.NDDFSJRX.js +209 -0
- package/dist/chunks/chunk.NDDFSJRX.js.map +7 -0
- package/dist/chunks/chunk.NTUWOJ5D.js +17 -0
- package/dist/chunks/chunk.NTUWOJ5D.js.map +7 -0
- package/dist/chunks/chunk.NZGSYMV4.js +4 -0
- package/dist/chunks/chunk.NZGSYMV4.js.map +7 -0
- package/dist/chunks/chunk.O2YFBNPC.js +2 -0
- package/dist/chunks/chunk.O2YFBNPC.js.map +7 -0
- package/dist/chunks/chunk.O5A7YZKV.js +29 -0
- package/dist/chunks/chunk.O5A7YZKV.js.map +7 -0
- package/dist/chunks/chunk.O5UC6O56.js +32 -0
- package/dist/chunks/chunk.O5UC6O56.js.map +7 -0
- package/dist/chunks/chunk.O6N6AMBN.js +209 -0
- package/dist/chunks/chunk.O6N6AMBN.js.map +7 -0
- package/dist/chunks/chunk.OINL3FAK.js +4 -0
- package/dist/chunks/chunk.OINL3FAK.js.map +7 -0
- package/dist/chunks/chunk.PD4IRPPA.js +2 -0
- package/dist/chunks/chunk.PD4IRPPA.js.map +7 -0
- package/dist/chunks/chunk.PMYMTICS.js +2 -0
- package/dist/chunks/chunk.PMYMTICS.js.map +7 -0
- package/dist/chunks/chunk.PN3RL7XO.js +36 -0
- package/dist/chunks/chunk.PN3RL7XO.js.map +7 -0
- package/dist/chunks/chunk.PXGXIL4I.js +246 -0
- package/dist/chunks/chunk.PXGXIL4I.js.map +7 -0
- package/dist/chunks/chunk.QHUX6JHG.js +36 -0
- package/dist/chunks/chunk.QHUX6JHG.js.map +7 -0
- package/dist/chunks/chunk.QMLRJZZB.js +2 -0
- package/dist/chunks/chunk.QMLRJZZB.js.map +7 -0
- package/dist/chunks/chunk.QST5ZAJK.js +246 -0
- package/dist/chunks/chunk.QST5ZAJK.js.map +7 -0
- package/dist/chunks/chunk.QVUO4ZOA.js +4 -0
- package/dist/chunks/chunk.QVUO4ZOA.js.map +7 -0
- package/dist/chunks/chunk.QXE7UNSK.js +245 -0
- package/dist/chunks/chunk.QXE7UNSK.js.map +7 -0
- package/dist/chunks/chunk.R4YGOT4Y.js +49 -0
- package/dist/chunks/chunk.R4YGOT4Y.js.map +7 -0
- package/dist/chunks/chunk.RBSBLP6E.js +256 -0
- package/dist/chunks/chunk.RBSBLP6E.js.map +7 -0
- package/dist/chunks/chunk.RH7GIGVO.js +17 -0
- package/dist/chunks/chunk.RH7GIGVO.js.map +7 -0
- package/dist/chunks/chunk.RKKGBGBX.js +4 -0
- package/dist/chunks/chunk.RKKGBGBX.js.map +7 -0
- package/dist/chunks/chunk.RMDMYNAU.js +36 -0
- package/dist/chunks/chunk.RMDMYNAU.js.map +7 -0
- package/dist/chunks/chunk.RNTFMTDE.js +17 -0
- package/dist/chunks/chunk.RNTFMTDE.js.map +7 -0
- package/dist/chunks/chunk.RSW5FCED.js +4 -0
- package/dist/chunks/chunk.RSW5FCED.js.map +7 -0
- package/dist/chunks/chunk.RXMGI7HR.js +2 -0
- package/dist/chunks/chunk.RXMGI7HR.js.map +7 -0
- package/dist/chunks/chunk.S4MESEBR.js +32 -0
- package/dist/chunks/chunk.S4MESEBR.js.map +7 -0
- package/dist/chunks/chunk.S5J43BJV.js +2 -0
- package/dist/chunks/chunk.S5J43BJV.js.map +7 -0
- package/dist/chunks/chunk.SHPKVE4P.js +117 -0
- package/dist/chunks/chunk.SHPKVE4P.js.map +7 -0
- package/dist/chunks/chunk.SIJSFRVB.js +2 -0
- package/dist/chunks/chunk.SIJSFRVB.js.map +7 -0
- package/dist/chunks/chunk.SPEZE3RA.js +2 -0
- package/dist/chunks/chunk.SPEZE3RA.js.map +7 -0
- package/dist/chunks/chunk.TJZEAEKS.js +2 -0
- package/dist/chunks/chunk.TJZEAEKS.js.map +7 -0
- package/dist/chunks/chunk.TXOGG2T7.js +2 -0
- package/dist/chunks/chunk.TXOGG2T7.js.map +7 -0
- package/dist/chunks/chunk.UAADPCC6.js +246 -0
- package/dist/chunks/chunk.UAADPCC6.js.map +7 -0
- package/dist/chunks/chunk.UDJE7KH5.js +2 -0
- package/dist/chunks/chunk.UDJE7KH5.js.map +7 -0
- package/dist/chunks/chunk.UFYA7GJU.js +36 -0
- package/dist/chunks/chunk.UFYA7GJU.js.map +7 -0
- package/dist/chunks/chunk.UKX45VM7.js +2 -0
- package/dist/chunks/chunk.UKX45VM7.js.map +7 -0
- package/dist/chunks/chunk.UPR7HWJ5.js +17 -0
- package/dist/chunks/chunk.UPR7HWJ5.js.map +7 -0
- package/dist/chunks/chunk.UVVG6NF4.js +2 -0
- package/dist/chunks/chunk.UVVG6NF4.js.map +7 -0
- package/dist/chunks/chunk.V3LEMJZR.js +256 -0
- package/dist/chunks/chunk.V3LEMJZR.js.map +7 -0
- package/dist/chunks/chunk.V7F4VPXB.js +2 -0
- package/dist/chunks/chunk.V7F4VPXB.js.map +7 -0
- package/dist/chunks/chunk.VFAS7RP6.js +2 -0
- package/dist/chunks/chunk.VFAS7RP6.js.map +7 -0
- package/dist/chunks/chunk.VPDYSMB4.js +58 -0
- package/dist/chunks/chunk.VPDYSMB4.js.map +7 -0
- package/dist/chunks/chunk.VT6GFWJT.js +2 -0
- package/dist/chunks/chunk.VT6GFWJT.js.map +7 -0
- package/dist/chunks/chunk.VT7UXJBE.js +17 -0
- package/dist/chunks/chunk.VT7UXJBE.js.map +7 -0
- package/dist/chunks/chunk.W3ITQHQQ.js +245 -0
- package/dist/chunks/chunk.W3ITQHQQ.js.map +7 -0
- package/dist/chunks/chunk.W6H7G665.js +2 -0
- package/dist/chunks/chunk.W6H7G665.js.map +7 -0
- package/dist/chunks/chunk.WDBRBMRH.js +2 -0
- package/dist/chunks/chunk.WDBRBMRH.js.map +7 -0
- package/dist/chunks/chunk.WJZDCAGA.js +2 -0
- package/dist/chunks/chunk.WJZDCAGA.js.map +7 -0
- package/dist/chunks/chunk.WKZAWGJI.js +2 -0
- package/dist/chunks/chunk.WKZAWGJI.js.map +7 -0
- package/dist/chunks/chunk.WPOS6KBC.js +2 -0
- package/dist/chunks/chunk.WPOS6KBC.js.map +7 -0
- package/dist/chunks/chunk.WQYSOMPH.js +58 -0
- package/dist/chunks/chunk.WQYSOMPH.js.map +7 -0
- package/dist/chunks/chunk.WRAMQCIW.js +2 -0
- package/dist/chunks/chunk.WRAMQCIW.js.map +7 -0
- package/dist/chunks/chunk.WSDDWC5Y.js +47 -0
- package/dist/chunks/chunk.WSDDWC5Y.js.map +7 -0
- package/dist/chunks/chunk.X3WJMHOP.js +36 -0
- package/dist/chunks/chunk.X3WJMHOP.js.map +7 -0
- package/dist/chunks/chunk.XASOWM5Z.js +2 -0
- package/dist/chunks/chunk.XASOWM5Z.js.map +7 -0
- package/dist/chunks/chunk.XNMMKUIO.js +2 -0
- package/dist/chunks/chunk.XNMMKUIO.js.map +7 -0
- package/dist/chunks/chunk.XPT2Z5AB.js +117 -0
- package/dist/chunks/chunk.XPT2Z5AB.js.map +7 -0
- package/dist/chunks/chunk.XQPLZOJP.js +2 -0
- package/dist/chunks/chunk.XQPLZOJP.js.map +7 -0
- package/dist/chunks/chunk.Y53HTV6U.js +2 -0
- package/dist/chunks/chunk.Y53HTV6U.js.map +7 -0
- package/dist/chunks/chunk.YI7XGVNH.js +4 -0
- package/dist/chunks/chunk.YI7XGVNH.js.map +7 -0
- package/dist/chunks/chunk.YPWTNS7G.js +17 -0
- package/dist/chunks/chunk.YPWTNS7G.js.map +7 -0
- package/dist/chunks/chunk.YT6IL43L.js +2 -0
- package/dist/chunks/chunk.YT6IL43L.js.map +7 -0
- package/dist/chunks/chunk.YXBLJ773.js +4 -0
- package/dist/chunks/chunk.YXBLJ773.js.map +7 -0
- package/dist/chunks/chunk.Z2VCNYLY.js +2 -0
- package/dist/chunks/chunk.Z2VCNYLY.js.map +7 -0
- package/dist/chunks/chunk.Z3OBLET2.js +2 -0
- package/dist/chunks/chunk.Z3OBLET2.js.map +7 -0
- package/dist/chunks/chunk.Z7EPKDUX.js +246 -0
- package/dist/chunks/chunk.Z7EPKDUX.js.map +7 -0
- package/dist/chunks/chunk.ZD65JR3R.js +2 -0
- package/dist/chunks/chunk.ZD65JR3R.js.map +7 -0
- package/dist/chunks/chunk.ZDH2SNRY.js +2 -0
- package/dist/chunks/chunk.ZDH2SNRY.js.map +7 -0
- package/dist/chunks/chunk.ZIY3H5FX.js +2 -0
- package/dist/chunks/chunk.ZIY3H5FX.js.map +7 -0
- package/dist/chunks/chunk.ZKGK7XFD.js +117 -0
- package/dist/chunks/chunk.ZKGK7XFD.js.map +7 -0
- package/dist/chunks/chunk.ZKH7NVYV.js +17 -0
- package/dist/chunks/chunk.ZKH7NVYV.js.map +7 -0
- package/dist/chunks/chunk.ZTT4JEQS.js +29 -0
- package/dist/chunks/chunk.ZTT4JEQS.js.map +7 -0
- package/dist/chunks/chunk.ZWJHKP3F.js +4 -0
- package/dist/chunks/chunk.ZWJHKP3F.js.map +7 -0
- package/dist/custom-elements.json +797 -490
- package/dist/docs/components/ScwAlert.json +25 -0
- package/dist/docs/components/ScwButton.json +25 -0
- package/dist/docs/components/ScwCard.json +44 -0
- package/dist/docs/components/ScwHeading.json +25 -0
- package/dist/docs/components/ScwIcon.json +25 -0
- package/dist/docs/components/ScwImage.json +81 -10
- package/dist/docs/components/ScwLink.json +25 -0
- package/dist/docs/components/ScwLinkBase.json +17 -0
- package/dist/docs/components/ScwMenu.json +1 -1
- package/dist/docs/components/ScwMenuItem.json +25 -0
- package/dist/docs/components/ScwPageAlert.json +25 -0
- package/dist/docs/components/manifest.json +57 -57
- package/dist/docs/config.json +1 -1
- package/dist/scw-alert/ScwAlert.js +1 -1
- package/dist/scw-alert/scw-alert.js +1 -1
- package/dist/scw-button/ScwButton.js +1 -1
- package/dist/scw-button/scw-button.js +1 -1
- package/dist/scw-card/ScwCard.js +1 -1
- package/dist/scw-card/scw-card.js +1 -1
- package/dist/scw-components.js +1 -1
- package/dist/scw-form-component/scw-form-component.js +1 -1
- package/dist/scw-heading/ScwHeading.js +1 -1
- package/dist/scw-heading/scw-heading.js +1 -1
- package/dist/scw-icon/ScwIcon.js +1 -1
- package/dist/scw-icon/scw-icon.js +1 -1
- package/dist/scw-image/ScwImage.js +1 -1
- package/dist/scw-image/scw-image-validate.js +1 -1
- package/dist/scw-image/scw-image.js +1 -1
- package/dist/scw-input/scw-input.js +1 -1
- package/dist/scw-link/ScwLink.js +1 -1
- package/dist/scw-link/scw-link.js +1 -1
- package/dist/scw-link-base/ScwLinkBase.js +1 -1
- package/dist/scw-link-base/scw-link-base.js +1 -1
- package/dist/scw-menu/ScwMenu.js +1 -1
- package/dist/scw-menu/keyboard/keyboardElements.js +1 -1
- package/dist/scw-menu/keyboard/scw-menu-keyboard.js +1 -1
- package/dist/scw-menu/scw-menu.js +1 -1
- package/dist/scw-menu-item/ScwMenuItem.js +1 -1
- package/dist/scw-menu-item/scw-menu-item.js +1 -1
- package/dist/scw-page-alert/scw-page-alert.js +1 -1
- package/dist/scw-select/scw-select.js +1 -1
- package/dist/scw-single-input/scw-single-input.js +1 -1
- package/dist/scw-textarea/scw-textarea.js +1 -1
- package/dist/scw.js +1 -1
- package/dist/utils/suffix.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../node_modules/lit-html/src/directive-helpers.ts", "../../../node_modules/lit-html/src/experimental-hydrate.ts", "../../../node_modules/lit-element/src/experimental-hydrate-support.ts", "../../src/scw.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {_$LH, Part, DirectiveParent, TemplateResult} from './lit-html.js';\nimport {\n DirectiveResult,\n DirectiveClass,\n PartInfo,\n AttributePartInfo,\n} from './directive.js';\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\n\nconst {_ChildPart: ChildPart} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\n\nconst ENABLE_SHADYDOM_NOPATCH = true;\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n window.ShadyDOM?.inUse &&\n window.ShadyDOM?.noPatch === true\n ? window.ShadyDOM!.wrap\n : (node: Node) => node;\n\n/**\n * Tests if a value is a primitive value.\n *\n * See https://tc39.github.io/ecma262/#sec-typeof-operator\n */\nexport const isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\n\nexport const TemplateResultType = {\n HTML: 1,\n SVG: 2,\n} as const;\n\nexport type TemplateResultType =\n typeof TemplateResultType[keyof typeof TemplateResultType];\n\n/**\n * Tests if a value is a TemplateResult.\n */\nexport const isTemplateResult = (\n value: unknown,\n type?: TemplateResultType\n): value is TemplateResult =>\n type === undefined\n ? // This property needs to remain unminified.\n (value as TemplateResult)?.['_$litType$'] !== undefined\n : (value as TemplateResult)?.['_$litType$'] === type;\n\n/**\n * Tests if a value is a DirectiveResult.\n */\nexport const isDirectiveResult = (value: unknown): value is DirectiveResult =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'] !== undefined;\n\n/**\n * Retrieves the Directive class for a DirectiveResult\n */\nexport const getDirectiveClass = (value: unknown): DirectiveClass | undefined =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'];\n\n/**\n * Tests whether a part has only a single-expression with no strings to\n * interpolate between.\n *\n * Only AttributePart and PropertyPart can have multiple expressions.\n * Multi-expression parts have a `strings` property and single-expression\n * parts do not.\n */\nexport const isSingleExpression = (part: PartInfo) =>\n (part as AttributePartInfo).strings === undefined;\n\nconst createMarker = () => document.createComment('');\n\n/**\n * Inserts a ChildPart into the given container ChildPart's DOM, either at the\n * end of the container ChildPart, or before the optional `refPart`.\n *\n * This does not add the part to the containerPart's committed value. That must\n * be done by callers.\n *\n * @param containerPart Part within which to add the new ChildPart\n * @param refPart Part before which to add the new ChildPart; when omitted the\n * part added to the end of the `containerPart`\n * @param part Part to insert, or undefined to create a new part\n */\nexport const insertPart = (\n containerPart: ChildPart,\n refPart?: ChildPart,\n part?: ChildPart\n): ChildPart => {\n const container = wrap(containerPart._$startNode).parentNode!;\n\n const refNode =\n refPart === undefined ? containerPart._$endNode : refPart._$startNode;\n\n if (part === undefined) {\n const startNode = wrap(container).insertBefore(createMarker(), refNode);\n const endNode = wrap(container).insertBefore(createMarker(), refNode);\n part = new ChildPart(\n startNode,\n endNode,\n containerPart,\n containerPart.options\n );\n } else {\n const endNode = wrap(part._$endNode!).nextSibling;\n const oldParent = part._$parent;\n const parentChanged = oldParent !== containerPart;\n if (parentChanged) {\n part._$reparentDisconnectables?.(containerPart);\n // Note that although `_$reparentDisconnectables` updates the part's\n // `_$parent` reference after unlinking from its current parent, that\n // method only exists if Disconnectables are present, so we need to\n // unconditionally set it here\n part._$parent = containerPart;\n // Since the _$isConnected getter is somewhat costly, only\n // read it once we know the subtree has directives that need\n // to be notified\n let newConnectionState;\n if (\n part._$notifyConnectionChanged !== undefined &&\n (newConnectionState = containerPart._$isConnected) !==\n oldParent!._$isConnected\n ) {\n part._$notifyConnectionChanged(newConnectionState);\n }\n }\n if (endNode !== refNode || parentChanged) {\n let start: Node | null = part._$startNode;\n while (start !== endNode) {\n const n: Node | null = wrap(start!).nextSibling;\n wrap(container).insertBefore(start!, refNode);\n start = n;\n }\n }\n }\n\n return part;\n};\n\n/**\n * Sets the value of a Part.\n *\n * Note that this should only be used to set/update the value of user-created\n * parts (i.e. those created using `insertPart`); it should not be used\n * by directives to set the value of the directive's container part. Directives\n * should return a value from `update`/`render` to update their part state.\n *\n * For directives that require setting their part value asynchronously, they\n * should extend `AsyncDirective` and call `this.setValue()`.\n *\n * @param part Part to set\n * @param value Value to set\n * @param index For `AttributePart`s, the index to set\n * @param directiveParent Used internally; should not be set by user\n */\nexport const setChildPartValue = <T extends ChildPart>(\n part: T,\n value: unknown,\n directiveParent: DirectiveParent = part\n): T => {\n part._$setValue(value, directiveParent);\n return part;\n};\n\n// A sentinal value that can never appear as a part value except when set by\n// live(). Used to force a dirty-check to fail and cause a re-render.\nconst RESET_VALUE = {};\n\n/**\n * Sets the committed value of a ChildPart directly without triggering the\n * commit stage of the part.\n *\n * This is useful in cases where a directive needs to update the part such\n * that the next update detects a value change or not. When value is omitted,\n * the next update will be guaranteed to be detected as a change.\n *\n * @param part\n * @param value\n */\nexport const setCommittedValue = (part: Part, value: unknown = RESET_VALUE) =>\n (part._$committedValue = value);\n\n/**\n * Returns the committed value of a ChildPart.\n *\n * The committed value is used for change detection and efficient updates of\n * the part. It can differ from the value set by the template or directive in\n * cases where the template value is transformed before being commited.\n *\n * - `TemplateResult`s are committed as a `TemplateInstance`\n * - Iterables are committed as `Array<ChildPart>`\n * - All other types are committed as the template value or value returned or\n * set by a directive.\n *\n * @param part\n */\nexport const getCommittedValue = (part: ChildPart) => part._$committedValue;\n\n/**\n * Removes a ChildPart from the DOM, including any of its content.\n *\n * @param part The Part to remove\n */\nexport const removePart = (part: ChildPart) => {\n part._$notifyConnectionChanged?.(false, true);\n let start: ChildNode | null = part._$startNode;\n const end: ChildNode | null = wrap(part._$endNode!).nextSibling;\n while (start !== end) {\n const n: ChildNode | null = wrap(start!).nextSibling;\n (wrap(start!) as ChildNode).remove();\n start = n;\n }\n};\n\nexport const clearPart = (part: ChildPart) => {\n part._$clear();\n};\n", "/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport type {TemplateResult} from './lit-html.js';\n\nimport {noChange, RenderOptions, _$LH} from './lit-html.js';\nimport {AttributePartInfo, PartType} from './directive.js';\nimport {\n isPrimitive,\n isSingleExpression,\n isTemplateResult,\n} from './directive-helpers.js';\n\nconst {\n _TemplateInstance: TemplateInstance,\n _isIterable: isIterable,\n _resolveDirective: resolveDirective,\n _ChildPart: ChildPart,\n _ElementPart: ElementPart,\n} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\ntype TemplateInstance = InstanceType<typeof TemplateInstance>;\n\n/**\n * Information needed to rehydrate a single TemplateResult.\n */\ntype ChildPartState =\n | {\n type: 'leaf';\n /** The ChildPart that the result is rendered to */\n part: ChildPart;\n }\n | {\n type: 'iterable';\n /** The ChildPart that the result is rendered to */\n part: ChildPart;\n value: Iterable<unknown>;\n iterator: Iterator<unknown>;\n done: boolean;\n }\n | {\n type: 'template-instance';\n /** The ChildPart that the result is rendered to */\n part: ChildPart;\n\n result: TemplateResult;\n\n /** The TemplateInstance created from the TemplateResult */\n instance: TemplateInstance;\n\n /**\n * The index of the next Template part to be hydrated. This is mutable and\n * updated as the tree walk discovers new part markers at the right level in\n * the template instance tree. Note there is only one Template part per\n * attribute with (one or more) bindings.\n */\n templatePartIndex: number;\n\n /**\n * The index of the next TemplateInstance part to be hydrated. This is used\n * to retrieve the value from the TemplateResult and initialize the\n * TemplateInstance parts' values for dirty-checking on first render.\n */\n instancePartIndex: number;\n };\n\n/**\n * hydrate() operates on a container with server-side rendered content and\n * restores the client side data structures needed for lit-html updates such as\n * TemplateInstances and Parts. After calling `hydrate`, lit-html will behave as\n * if it initially rendered the DOM, and any subsequent updates will update\n * efficiently, the same as if lit-html had rendered the DOM on the client.\n *\n * hydrate() must be called on DOM that adheres the to lit-ssr structure for\n * parts. ChildParts must be represented with both a start and end comment\n * marker, and ChildParts that contain a TemplateInstance must have the template\n * digest written into the comment data.\n *\n * Since render() encloses its output in a ChildPart, there must always be a root\n * ChildPart.\n *\n * Example (using for # ... for annotations in HTML)\n *\n * Given this input:\n *\n * html`<div class=${x}>${y}</div>`\n *\n * The SSR DOM is:\n *\n * <!--lit-part AEmR7W+R0Ak=--> # Start marker for the root ChildPart created\n * # by render(). Includes the digest of the\n * # template\n * <div class=\"TEST_X\">\n * <!--lit-node 0--> # Indicates there are attribute bindings here\n * # The number is the depth-first index of the parent\n * # node in the template.\n * <!--lit-part--> # Start marker for the ${x} expression\n * TEST_Y\n * <!--/lit-part--> # End marker for the ${x} expression\n * </div>\n *\n * <!--/lit-part--> # End marker for the root ChildPart\n *\n * @param rootValue\n * @param container\n * @param userOptions\n */\nexport const hydrate = (\n rootValue: unknown,\n container: Element | DocumentFragment,\n options: Partial<RenderOptions> = {}\n) => {\n // TODO(kschaaf): Do we need a helper for _$litPart$ (\"part for node\")?\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((container as any)['_$litPart$'] !== undefined) {\n throw new Error('container already contains a live render');\n }\n\n // Since render() creates a ChildPart to render into, we'll always have\n // exactly one root part. We need to hold a reference to it so we can set\n // it in the parts cache.\n let rootPart: ChildPart | undefined = undefined;\n\n // When we are in-between ChildPart markers, this is the current ChildPart.\n // It's needed to be able to set the ChildPart's endNode when we see a\n // close marker\n let currentChildPart: ChildPart | undefined = undefined;\n\n // Used to remember parent template state as we recurse into nested\n // templates\n const stack: Array<ChildPartState> = [];\n\n const walker = document.createTreeWalker(\n container,\n NodeFilter.SHOW_COMMENT,\n null,\n false\n );\n let marker: Comment | null;\n\n // Walk the DOM looking for part marker comments\n while ((marker = walker.nextNode() as Comment | null) !== null) {\n const markerText = marker.data;\n if (markerText.startsWith('lit-part')) {\n if (stack.length === 0 && rootPart !== undefined) {\n throw new Error('there must be only one root part per container');\n }\n // Create a new ChildPart and push it onto the stack\n currentChildPart = openChildPart(rootValue, marker, stack, options);\n rootPart ??= currentChildPart;\n } else if (markerText.startsWith('lit-node')) {\n // Create and hydrate attribute parts into the current ChildPart on the\n // stack\n createAttributeParts(marker, stack, options);\n // Remove `defer-hydration` attribute, if any\n const parent = marker.parentElement!;\n if (parent.hasAttribute('defer-hydration')) {\n parent.removeAttribute('defer-hydration');\n }\n } else if (markerText.startsWith('/lit-part')) {\n // Close the current ChildPart, and pop the previous one off the stack\n if (stack.length === 1 && currentChildPart !== rootPart) {\n throw new Error('internal error');\n }\n currentChildPart = closeChildPart(marker, currentChildPart, stack);\n }\n }\n console.assert(\n rootPart !== undefined,\n 'there should be exactly one root part in a render container'\n );\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (container as any)['_$litPart$'] = rootPart;\n};\n\nconst openChildPart = (\n rootValue: unknown,\n marker: Comment,\n stack: Array<ChildPartState>,\n options: RenderOptions\n) => {\n let value: unknown;\n // We know the startNode now. We'll know the endNode when we get to\n // the matching marker and set it in closeChildPart()\n // TODO(kschaaf): Current constructor takes both nodes\n let part;\n if (stack.length === 0) {\n part = new ChildPart(marker, null, undefined, options);\n value = rootValue;\n } else {\n const state = stack[stack.length - 1];\n if (state.type === 'template-instance') {\n part = new ChildPart(marker, null, state.instance, options);\n state.instance._parts.push(part);\n value = state.result.values[state.instancePartIndex++];\n state.templatePartIndex++;\n } else if (state.type === 'iterable') {\n part = new ChildPart(marker, null, state.part, options);\n const result = state.iterator.next();\n if (result.done) {\n value = undefined;\n state.done = true;\n throw new Error('Unhandled shorter than expected iterable');\n } else {\n value = result.value;\n }\n (state.part._$committedValue as Array<ChildPart>).push(part);\n } else {\n // state.type === 'leaf'\n // TODO(kschaaf): This is unexpected, and likely a result of a primitive\n // been rendered on the client when a TemplateResult was rendered on the\n // server; this part will be hydrated but not used. We can detect it, but\n // we need to decide what to do in this case. Note that this part won't be\n // retained by any parent TemplateInstance, since a primitive had been\n // rendered in its place.\n // https://github.com/lit/lit/issues/1434\n // throw new Error('Hydration value mismatch: Found a TemplateInstance' +\n // 'where a leaf value was expected');\n part = new ChildPart(marker, null, state.part, options);\n }\n }\n\n // Initialize the ChildPart state depending on the type of value and push\n // it onto the stack. This logic closely follows the ChildPart commit()\n // cascade order:\n // 1. directive\n // 2. noChange\n // 3. primitive (note strings must be handled before iterables, since they\n // are iterable)\n // 4. TemplateResult\n // 5. Node (not yet implemented, but fallback handling is fine)\n // 6. Iterable\n // 7. nothing (handled in fallback)\n // 8. Fallback for everything else\n value = resolveDirective(part, value);\n if (value === noChange) {\n stack.push({part, type: 'leaf'});\n } else if (isPrimitive(value)) {\n stack.push({part, type: 'leaf'});\n part._$committedValue = value;\n // TODO(kschaaf): We can detect when a primitive is being hydrated on the\n // client where a TemplateResult was rendered on the server, but we need to\n // decide on a strategy for what to do next.\n // https://github.com/lit/lit/issues/1434\n // if (marker.data !== 'lit-part') {\n // throw new Error('Hydration value mismatch: Primitive found where TemplateResult expected');\n // }\n } else if (isTemplateResult(value)) {\n // Check for a template result digest\n const markerWithDigest = `lit-part ${digestForTemplateResult(value)}`;\n if (marker.data === markerWithDigest) {\n const template = ChildPart.prototype._$getTemplate(value);\n const instance = new TemplateInstance(template, part);\n stack.push({\n type: 'template-instance',\n instance,\n part,\n templatePartIndex: 0,\n instancePartIndex: 0,\n result: value,\n });\n // For TemplateResult values, we set the part value to the\n // generated TemplateInstance\n part._$committedValue = instance;\n } else {\n // TODO: if this isn't the server-rendered template, do we\n // need to stop hydrating this subtree? Clear it? Add tests.\n throw new Error(\n 'Hydration value mismatch: Unexpected TemplateResult rendered to part'\n );\n }\n } else if (isIterable(value)) {\n // currentChildPart.value will contain an array of ChildParts\n stack.push({\n part: part,\n type: 'iterable',\n value,\n iterator: value[Symbol.iterator](),\n done: false,\n });\n part._$committedValue = [];\n } else {\n // Fallback for everything else (nothing, Objects, Functions,\n // etc.): we just initialize the part's value\n // Note that `Node` value types are not currently supported during\n // SSR, so that part of the cascade is missing.\n stack.push({part: part, type: 'leaf'});\n part._$committedValue = value == null ? '' : value;\n }\n return part;\n};\n\nconst closeChildPart = (\n marker: Comment,\n part: ChildPart | undefined,\n stack: Array<ChildPartState>\n): ChildPart | undefined => {\n if (part === undefined) {\n throw new Error('unbalanced part marker');\n }\n\n part._$endNode = marker;\n\n const currentState = stack.pop()!;\n\n if (currentState.type === 'iterable') {\n if (!currentState.iterator.next().done) {\n throw new Error('unexpected longer than expected iterable');\n }\n }\n\n if (stack.length > 0) {\n const state = stack[stack.length - 1];\n return state.part;\n } else {\n return undefined;\n }\n};\n\nconst createAttributeParts = (\n comment: Comment,\n stack: Array<ChildPartState>,\n options: RenderOptions\n) => {\n // Get the nodeIndex from DOM. We're only using this for an integrity\n // check right now, we might not need it.\n const match = /lit-node (\\d+)/.exec(comment.data)!;\n const nodeIndex = parseInt(match[1]);\n\n // For void elements, the node the comment was referring to will be\n // the previousSibling; for non-void elements, the comment is guaranteed\n // to be the first child of the element (i.e. it won't have a previousSibling\n // meaning it should use the parentElement)\n const node = comment.previousSibling ?? comment.parentElement;\n\n const state = stack[stack.length - 1];\n if (state.type === 'template-instance') {\n const instance = state.instance;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // If the next template part is in attribute-position on the current node,\n // create the instance part for it and prime its state\n const templatePart = instance._$template.parts[state.templatePartIndex];\n if (\n templatePart === undefined ||\n (templatePart.type !== PartType.ATTRIBUTE &&\n templatePart.type !== PartType.ELEMENT) ||\n templatePart.index !== nodeIndex\n ) {\n break;\n }\n\n if (templatePart.type === PartType.ATTRIBUTE) {\n // The instance part is created based on the constructor saved in the\n // template part\n const instancePart = new templatePart.ctor(\n node as HTMLElement,\n templatePart.name,\n templatePart.strings,\n state.instance,\n options\n );\n\n const value = isSingleExpression(\n instancePart as unknown as AttributePartInfo\n )\n ? state.result.values[state.instancePartIndex]\n : state.result.values;\n\n // Setting the attribute value primes committed value with the resolved\n // directive value; we only then commit that value for event/property\n // parts since those were not serialized, and pass `noCommit` for the\n // others to avoid perf impact of touching the DOM unnecessarily\n const noCommit = !(\n instancePart.type === PartType.EVENT ||\n instancePart.type === PartType.PROPERTY\n );\n instancePart._$setValue(\n value,\n instancePart,\n state.instancePartIndex,\n noCommit\n );\n state.instancePartIndex += templatePart.strings.length - 1;\n instance._parts.push(instancePart);\n } else {\n // templatePart.type === PartType.ELEMENT\n const instancePart = new ElementPart(\n node as HTMLElement,\n state.instance,\n options\n );\n resolveDirective(\n instancePart,\n state.result.values[state.instancePartIndex++]\n );\n instance._parts.push(instancePart);\n }\n state.templatePartIndex++;\n }\n } else {\n throw new Error('internal error');\n }\n};\n\n// Number of 32 bit elements to use to create template digests\nconst digestSize = 2;\n// We need to specify a digest to use across rendering environments. This is a\n// simple digest build from a DJB2-ish hash modified from:\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\n// It has been changed to an array of hashes to add additional bits.\n// Goals:\n// - Extremely low collision rate. We may not be able to detect collisions.\n// - Extremely fast.\n// - Extremely small code size.\n// - Safe to include in HTML comment text or attribute value.\n// - Easily specifiable and implementable in multiple languages.\n// We don't care about cryptographic suitability.\nexport const digestForTemplateResult = (templateResult: TemplateResult) => {\n const hashes = new Uint32Array(digestSize).fill(5381);\n\n for (const s of templateResult.strings) {\n for (let i = 0; i < s.length; i++) {\n hashes[i % digestSize] = (hashes[i % digestSize] * 33) ^ s.charCodeAt(i);\n }\n }\n return btoa(String.fromCharCode(...new Uint8Array(hashes.buffer)));\n};\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * LitElement support for hydration of content rendered using lit-ssr.\n *\n * @packageDocumentation\n */\n\nimport type {PropertyValues} from '@lit/reactive-element';\nimport {render, RenderOptions} from 'lit-html';\nimport {hydrate} from 'lit-html/experimental-hydrate.js';\n\ninterface PatchableLitElement extends HTMLElement {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-misused-new\n new (...args: any[]): PatchableLitElement;\n enableUpdating(requestedUpdate?: boolean): void;\n createRenderRoot(): Element | ShadowRoot;\n renderRoot: HTMLElement | DocumentFragment;\n render(): unknown;\n renderOptions: RenderOptions;\n _$needsHydration: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nglobalThis.litElementHydrateSupport = ({\n LitElement,\n}: {\n LitElement: PatchableLitElement;\n}) => {\n const observedAttributes = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(LitElement),\n 'observedAttributes'\n )!.get!;\n\n // Add `defer-hydration` to observedAttributes\n Object.defineProperty(LitElement, 'observedAttributes', {\n get() {\n return [...observedAttributes.call(this), 'defer-hydration'];\n },\n });\n\n // Enable element when 'defer-hydration' attribute is removed by calling the\n // super.connectedCallback()\n const attributeChangedCallback =\n LitElement.prototype.attributeChangedCallback;\n LitElement.prototype.attributeChangedCallback = function (\n name: string,\n old: string | null,\n value: string | null\n ) {\n if (name === 'defer-hydration' && value === null) {\n connectedCallback.call(this);\n }\n attributeChangedCallback.call(this, name, old, value);\n };\n\n // Override `connectedCallback` to capture whether we need hydration, and\n // defer `super.connectedCallback()` if the 'defer-hydration' attribute is set\n const connectedCallback = LitElement.prototype.connectedCallback;\n LitElement.prototype.connectedCallback = function (\n this: PatchableLitElement\n ) {\n // If the outer scope of this element has not yet been hydrated, wait until\n // 'defer-hydration' attribute has been removed to enable\n if (!this.hasAttribute('defer-hydration')) {\n connectedCallback.call(this);\n }\n };\n\n // If we've been server-side rendered, just return `this.shadowRoot`, don't\n // call the base implementation, which would also adopt styles (for now)\n const createRenderRoot = LitElement.prototype.createRenderRoot;\n LitElement.prototype.createRenderRoot = function (this: PatchableLitElement) {\n if (this.shadowRoot) {\n this._$needsHydration = true;\n return this.shadowRoot;\n } else {\n return createRenderRoot.call(this);\n }\n };\n\n // Hydrate on first update when needed\n const update = Object.getPrototypeOf(LitElement.prototype).update;\n LitElement.prototype.update = function (\n this: PatchableLitElement,\n changedProperties: PropertyValues\n ) {\n const value = this.render();\n // Since this is a patch, we can't call super.update(), so we capture\n // it off the proto chain and call it instead\n update.call(this, changedProperties);\n if (this._$needsHydration) {\n this._$needsHydration = false;\n hydrate(value, this.renderRoot, this.renderOptions);\n } else {\n render(value, this.renderRoot, this.renderOptions);\n }\n };\n};\n", "import 'lit-element/experimental-hydrate-support.js';\n\nconst registeredComponents : {\n [key: string]: true;\n} = {};\n\nexport let config : {\n suffix : string | false,\n};\n\n/**\n * Define Components\n * Gotchas:\n * - can't have two runtimes on same page, so need root to be unversioned and \n * child versioned (from same url)\n * - b/c the comp classes can only be registered once. The child should\n * always be bundled.\n * @param {object} args\n * @return {void}\n */\nexport async function defineComponents(\n args : {\n components?: string[],\n suffix?: string,\n } = {},\n) {\n // defaults to a runtime config w/ all comps, no suffix, and assets runtime.\n const {\n components = false,\n suffix = false,\n } = args;\n\n // Global Config\n config = {\n suffix,\n };\n\n const allComponents = components ? false : true;\n\n const suffixFinal = suffix ? `-${suffix}` : '';\n const promiseArr: Promise<void>[] = [];\n\n /**\n * Add to a promise\n * @param {string} compStr\n * @param {any} importCall\n */\n function addToPromise(compStr: string, importCall: any) {\n promiseArr.push((async () => {\n const compName = `${compStr}${suffixFinal}`;\n // avoid name dups (doesn't catch class dups!!!!)\n if ( !registeredComponents[compName] ) {\n registeredComponents[compName] = true;\n try {\n window.customElements.define(\n compName,\n (await importCall).default,\n );\n } catch (error) {\n console.error( compName, error );\n }\n }\n })());\n }\n\n /**\n * include\n * @argument {string} compStr\n * @return {boolean}\n */\n function include(compStr: string) {\n if (allComponents) return true;\n if (Array.isArray( components) ) {\n return components ? components.includes(compStr) : false;\n }\n }\n\n // need the import to be picked up by esbuild...\n if (include('scw-component')) {\n addToPromise('scw-component',\n import(`./scw-component/ScwComponent`));\n }\n if (include('scw-form-component')) {\n addToPromise('scw-form-component',\n import(`./scw-form-component/scw-form-component`) );\n }\n if (include('scw-card')) {\n addToPromise('scw-card',\n import(`./scw-card/ScwCard`));\n }\n if (include('scw-input-field')) {\n addToPromise('scw-input-field',\n import(`./scw-input-field/scw-input-field`) );\n }\n if (include('scw-input-layout')) {\n addToPromise('scw-input-layout',\n import(`./scw-input-layout/scw-input-layout`) );\n }\n if (include('scw-link')) {\n addToPromise('scw-link',\n import(`./scw-link/ScwLink`) );\n }\n if (include('scw-button')) {\n addToPromise('scw-button',\n import(`./scw-button/ScwButton`) );\n }\n if (include('scw-menu')) {\n addToPromise('scw-menu',\n import(`./scw-menu/ScwMenu`) );\n }\n if (include('scw-menu-item')) {\n addToPromise('scw-menu-item',\n import(`./scw-menu-item/ScwMenuItem`) );\n }\n if (include('scw-icon')) {\n addToPromise('scw-icon',\n import(`./scw-icon/ScwIcon`) );\n }\n if (include('scw-heading')) {\n addToPromise('scw-heading',\n import(`./scw-heading/ScwHeading`) );\n }\n if (include('scw-image')) {\n addToPromise('scw-image',\n import(`./scw-image/ScwImage`) );\n }\n if (include('scw-input')) {\n addToPromise('scw-input',\n import(`./scw-input/scw-input`) );\n }\n if (include('scw-single-input')) {\n addToPromise('scw-single-input',\n import(`./scw-single-input/scw-single-input`) );\n }\n if (include('scw-single-input-layout')) {\n addToPromise('scw-single-input-layout',\n import(`./scw-single-input-layout/scw-single-input-layout`) );\n }\n if (include('scw-responsive')) {\n addToPromise('scw-responsive',\n import(`./scw-responsive/scw-responsive`) );\n }\n if (include('scw-validation')) {\n addToPromise('scw-validation',\n import(`./scw-validation/scw-validation`) );\n }\n if (include('scw-validate')) {\n addToPromise('scw-validate',\n import(`./scw-validate/scw-validate`) );\n }\n if (include('scw-flex-h-component')) {\n addToPromise('scw-flex-h-component',\n import(`./scw-flex-h-component/scw-flex-h-component`) );\n }\n if (include('scw-flex-v-component')) {\n addToPromise('scw-flex-v-component',\n import(`./scw-flex-v-component/scw-flex-v-component`) );\n }\n if (include('scw-stack-component')) {\n addToPromise('scw-stack-component',\n import(`./scw-stack-component/scw-stack-component`) );\n }\n if (include('scw-layout-component')) {\n addToPromise('scw-layout-component',\n import(`./scw-layout-component/scw-layout-component`) );\n }\n if (include('scw-element-component')) {\n addToPromise('scw-element-component',\n import(`./scw-element-component/scw-element-component`) );\n }\n if (include('scw-center-component')) {\n addToPromise('scw-center-component',\n import(`./scw-center-component/ScwCenterComponent`) );\n }\n if (include('scw-float-component')) {\n addToPromise('scw-float-component',\n import(`./scw-float-component/scw-float-component`) );\n }\n if (include('scw-pane-component')) {\n addToPromise('scw-pane-component',\n import(`./scw-pane-component/scw-pane-component`) );\n }\n if (include('scw-form')) {\n addToPromise('scw-form',\n import(`./scw-form/scw-form`) );\n }\n if (include('scw-page-alert')) {\n addToPromise('scw-page-alert',\n import(`./scw-page-alert/scw-page-alert`) );\n }\n if (include('scw-link-base')) {\n addToPromise('scw-link-base',\n import(`./scw-link-base/ScwLinkBase`) );\n }\n if (include('scw-textarea')) {\n addToPromise('scw-textarea',\n import(`./scw-textarea/scw-textarea`) );\n }\n if (include('scw-select')) {\n addToPromise('scw-select',\n import(`./scw-select/scw-select`) );\n }\n if (include('scw-alert')) {\n addToPromise('scw-alert',\n import(`./scw-alert/ScwAlert`) );\n }\n\n return Promise.all(promiseArr);\n}\n"],
|
|
5
|
+
"mappings": "8FAeA,G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Q,oBAAoB,GAC9B,EAAa,qBACX,OAAO,8CAA2C,EAElD,EAAQ,UAAU,GACpB,EAAa,WACX,OAAO,0BAAuB,EAE9B,EAAQ,gBAAgB,GAC1B,EAAa,iBACX,OAAO,sCAAmC,EAE1C,EAAQ,eAAe,GACzB,EAAa,gBACX,OAAO,kCAA+B,EAEtC,EAAQ,cAAc,GACxB,EAAa,eACX,OAAO,kCAA+B,EAEtC,EAAQ,YAAY,GACtB,EAAa,aACX,OAAO,8BAA2B,EAElC,EAAQ,WAAW,GACrB,EAAa,YACX,OAAO,2BAAwB,EAG5B,QAAQ,IAAI,CAAU,CAC/B",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as u}from"./chunk.BLURUGZZ.js";import{b as n,c as r,e as f}from"./chunk.HCMPRDIX.js";import{a as o}from"./chunk.ZS4C3T6Z.js";import{g as a}from"./chunk.5YJY6NT6.js";var c=(e=>(e.text="text",e.boolean="boolean",e.submit="submit",e))(c||{}),h=(i=>(i.submit="submit",i.cancel="cancel",i))(h||{}),t=class extends f{constructor(){super(...arguments);this.formType="text";this.value="";this.placeholder="";this.selected=!1;this.readOnly=!1;this.required=!1;this.requiredLabel=" *";this.focused=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.required&&this.createAndAddValidationRule("required",this.requiredFeedback)}decorateValues(i){if(!this.name){this.warn(`${this.element} didn't find a name`);return}this.formType==="boolean"?i[this.name]=this.selected:i[this.name]=this.value}findIfRequired(){let i=this.findValidationRules();return i?i.isRequired():!1}findValidationRules(){return Array.from(this.children).find(l=>l.nodeName.indexOf("SCW-VALIDATION")===0)}validate(){let i=this.findValidationRules(),e=[];return i&&(e=i.validate(this.value)),this.invalid=e.length>0,this.invalid?this.feedback=e[0].feedback:this.feedback="",e}createValidateRule(){return document.createElement(`scw-${"validate"}${u()}`)}addValidationRule(i){let e=this.findValidationRules();e||(e=document.createElement(`scw-${"validation"}${u()}`),this.prepend(e)),Array.from(e.children).find(s=>s.getAttribute("type")===i.type)||e.appendChild(i)}createAndAddValidationRule(i,e){let l=this.createValidateRule();l.setAttribute("type",i),e&&l.setAttribute("feedback",e),this.addValidationRule(l)}removeValidationRule(i){let e=this.findValidationRules();if(!e)return;let d=Array.from(e.children).find(s=>s.type===i);d&&d.parentNode&&d.parentNode.removeChild(d)}render(){return o`
|
|
2
|
+
scw-form-component
|
|
3
|
+
`}};a([n({type:c,reflect:!0,attribute:"form-type"})],t.prototype,"formType",2),a([n({type:String})],t.prototype,"name",2),a([n({type:String})],t.prototype,"value",2),a([n({type:String})],t.prototype,"placeholder",2),a([n({type:String})],t.prototype,"selected",2),a([n({type:Boolean,attribute:"read-only"})],t.prototype,"readOnly",2),a([n({type:Boolean})],t.prototype,"required",2),a([n({type:String,attribute:"required-label"})],t.prototype,"requiredLabel",2),a([n({type:String,attribute:"required-feedback"})],t.prototype,"requiredFeedback",2),a([r()],t.prototype,"feedback",2),a([r()],t.prototype,"focused",2),a([r()],t.prototype,"invalid",2);export{c as a,h as b,t as c};
|
|
4
|
+
//# sourceMappingURL=chunk.RSW5FCED.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/scw-form-component/scw-form-component.ts"],
|
|
4
|
+
"sourcesContent": ["import {html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport ScwComponent from '../scw-component/ScwComponent';\nimport {Components} from '../utils/enums/Components';\nimport ScwValidate from '../scw-validate/scw-validate';\nimport ScwValidation from '../scw-validation/scw-validation';\nimport {ValidationResult, ValidationTypes}\n from '../scw-validate/validationTypes';\nimport getSuffix from '../utils/suffix';\n\nexport enum ScwFormComponentTypes {\n text = 'text',\n boolean = 'boolean',\n submit = 'submit'\n}\n\nexport enum ScwFormComponentSubmitTypes {\n submit = 'submit',\n cancel = 'cancel'\n}\n\n/**\n * ScwFormComponent\n * @class\n * @tag scw-form-component\n */\nexport default class ScwFormComponent extends ScwComponent {\n // ============== ScwFormComponent ===========================================\n /** (ScwFormComponent) the usage in a form (& scw-form a query target) */\n @property({\n type: ScwFormComponentTypes,\n reflect: true,\n attribute: 'form-type',\n })\n formType: ScwFormComponentTypes = ScwFormComponentTypes.text;\n\n /** (ScwFormComponent) name to identify form element and attach data */\n @property({type: String})\n name: string | undefined;\n\n /** (ScwFormComponent) name to identify form element and attach data */\n @property({type: String})\n value: string = '';\n\n /** (ScwFormComponent) text showing when there is no value */\n @property({type: String})\n placeholder: string = '';\n\n /** (ScwFormComponent) name to identify form element and attach data */\n @property({type: String})\n selected: boolean = false;\n\n /** (ScwFormComponent) read-only state management */\n @property({type: Boolean, attribute: 'read-only'})\n readOnly: boolean = false;\n\n /** (ScwFormComponent) required state management */\n @property({type: Boolean})\n required: boolean = false;\n\n /** (ScwFormComponent) label indicator for required */\n @property({type: String, attribute: 'required-label'})\n requiredLabel: string = ' *';\n\n /** (ScwFormComponent) label indicator for required */\n @property({type: String, attribute: 'required-feedback'})\n requiredFeedback?: string;\n\n // ===== STATE ===============================================================\n /** the text to use for feedback */\n @state() feedback: string | undefined;\n\n /** determines whether the input is focused or not */\n @state() focused : boolean = false;\n\n /** whether this form element is valid, passed validation */\n @state() invalid: boolean = false;\n\n /** connectedCallback */\n connectedCallback(): void {\n super.connectedCallback();\n if (this.required) {\n this.createAndAddValidationRule(\n ValidationTypes.required,\n this.requiredFeedback,\n );\n }\n }\n\n /** (ScwFormComponent) each form element to decorates the final data object\n * @param {Object} formData\n */\n decorateValues(formData: {}): void {\n if (!this.name) {\n this.warn(`${this.element} didn't find a name`);\n return;\n }\n if (this.formType === ScwFormComponentTypes.boolean) {\n formData[this.name] = this.selected;// ? 'true' : 'false';\n } else {\n formData[this.name] = this.value;\n }\n }\n\n /**\n * Check to see if form element is required w/o knowing if there is validation\n * @return {boolean}\n */\n findIfRequired() : boolean {\n const rules = this.findValidationRules();\n if (rules) {\n return rules.isRequired();\n }\n return false;\n }\n\n /**\n * Find validation child if there...\n * @return {ScwValidation | undefined}\n */\n findValidationRules() : ScwValidation | undefined {\n const childrenArr = Array.from(this.children);\n const validation = childrenArr.find((child: any) => {\n // component may not be initialized yet...\n return child.nodeName.indexOf('SCW-VALIDATION') === 0;\n // return child.element === Components.validation;\n });\n return validation as unknown as ScwValidation;\n }\n\n /**\n * run the validation rules if there...\n * @param {string} value\n * @return {ValidationResult[]}\n */\n validate() : ValidationResult[] {\n const validation = this.findValidationRules();\n let results : ValidationResult[] = [];\n if (validation) {\n results = validation.validate(this.value);\n }\n this.invalid = ( results.length > 0);\n if (this.invalid ) {\n this.feedback = results[0].feedback;\n } else {\n this.feedback = '';\n }\n return results;\n }\n\n\n /**\n * create a validation rule from scratch\n * @return {ScwValidate}\n */\n createValidateRule() : ScwValidate {\n return document.createElement(\n `scw-${Components.validate}${getSuffix()}`,\n ) as unknown as ScwValidate;\n }\n\n /**\n * add validation to to child validation (create if not there)\n * @param {ScwValidate} rule\n */\n addValidationRule(rule: ScwValidate ) {\n let validationRules = this.findValidationRules();\n if (!validationRules) {\n validationRules = document.createElement(\n `scw-${Components.validation}${getSuffix()}`,\n ) as unknown as ScwValidation;\n this.prepend( validationRules );\n }\n // Check for dups?\n const children = Array.from(validationRules.children);\n const existingRule = children.find((child : any) => {\n return child.getAttribute('type') === rule.type;\n });\n if ( !existingRule ) {\n validationRules.appendChild(rule);\n }\n }\n\n /**\n * create a validation of a certain type...\n * @param {ValidationTypes} type\n * @param {string} feedbackOverride\n */\n createAndAddValidationRule(\n type: ValidationTypes,\n feedbackOverride?: string,\n ) {\n const rule = this.createValidateRule();\n rule.setAttribute('type', type );// .type = type;\n if (feedbackOverride) {\n rule.setAttribute('feedback', feedbackOverride );\n }\n this.addValidationRule( rule );\n }\n\n /**\n *\n * @param {ValidationTypes} type\n */\n removeValidationRule(\n type: ValidationTypes,\n ) {\n const validationRules = this.findValidationRules();\n if (!validationRules) return;\n const children = Array.from(validationRules.children);\n const child = children.find(\n (child : any) => child.type === type,\n ) as unknown as HTMLElement;\n if ( child && child.parentNode ) child.parentNode.removeChild(child);\n }\n\n /**\n * render\n * @return {object} component DOM\n */\n render(): object {\n return html`\n scw-form-component\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": "8KAUO,GAAK,GAAL,CAAK,GACV,QAAO,OACP,UAAU,UACV,SAAS,SAHC,WAMA,EAAL,CAAK,GACV,UAAS,SACT,SAAS,SAFC,WAUZ,eAA8C,EAAa,CAA3D,kCAQI,cAAkC,OAQlC,WAAgB,GAIhB,iBAAsB,GAItB,cAAoB,GAIpB,cAAoB,GAIpB,cAAoB,GAIpB,mBAAwB,KAWjB,aAAoB,GAGpB,aAAmB,GAG5B,mBAA0B,CACxB,MAAM,kBAAkB,EACpB,KAAK,UACP,KAAK,2BACH,WACA,KAAK,gBACP,CAEJ,CAKA,eAAe,EAAoB,CACjC,GAAI,CAAC,KAAK,KAAM,CACd,KAAK,KAAK,GAAG,KAAK,4BAA4B,EAC9C,MACF,CACA,AAAI,KAAK,WAAa,UACpB,EAAS,KAAK,MAAQ,KAAK,SAE3B,EAAS,KAAK,MAAQ,KAAK,KAE/B,CAMA,gBAA2B,CACzB,GAAM,GAAQ,KAAK,oBAAoB,EACvC,MAAI,GACK,EAAM,WAAW,EAEnB,EACT,CAMA,qBAAkD,CAOhD,MALmB,AADC,OAAM,KAAK,KAAK,QAAQ,EACb,KAAK,AAAC,GAE5B,EAAM,SAAS,QAAQ,gBAAgB,IAAM,CAErD,CAEH,CAOA,UAAgC,CAC9B,GAAM,GAAa,KAAK,oBAAoB,EACxC,EAA+B,CAAC,EACpC,MAAI,IACF,GAAU,EAAW,SAAS,KAAK,KAAK,GAE1C,KAAK,QAAY,EAAQ,OAAS,EAClC,AAAI,KAAK,QACP,KAAK,SAAW,EAAQ,GAAG,SAE3B,KAAK,SAAW,GAEX,CACT,CAOA,oBAAmC,CACjC,MAAO,UAAS,cACd,OAAO,aAAsB,EAAU,GACzC,CACF,CAMA,kBAAkB,EA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AAS,CAAC,KAAM,OAAQ,UAAW,gBAAgB,CAAC,GACnD,AApCJ,EAoCI,6BAIA,GADF,AAAC,EAAS,CAAC,KAAM,OAAQ,UAAW,mBAAmB,CAAC,GACtD,AAxCJ,EAwCI,gCAIO,GAAT,AAAC,EAAM,GAAE,AA5CX,EA4CW,wBAGA,GAAT,AAAC,EAAM,GAAE,AA/CX,EA+CW,uBAGA,GAAT,AAAC,EAAM,GAAE,AAlDX,EAkDW",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/suffix.ts"],
|
|
4
|
+
"sourcesContent": ["import {config} from '../scw';\n\n/**\n * Pulls suffix from global design system config with some formatting options\n * @param {string} connector\n * @return {string}\n */\nexport default function getSuffix(connector: string = '-') {\n return config ? config.suffix ? `${connector}${config.suffix}` : '' : '';\n}\n\n"],
|
|
5
|
+
"mappings": "wCAOe,WAAmB,EAAoB,IAAK,CACzD,MAAO,IAAS,EAAO,OAAS,GAAG,IAAY,EAAO,SAAgB,EACxE",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import{a as u}from"./chunk.QRG5WBRU.js";import{a as l,b as r,e as f}from"./chunk.HCMPRDIX.js";import{a,d as c}from"./chunk.ZS4C3T6Z.js";import{b,d as m,f as g,g as i}from"./chunk.5YJY6NT6.js";var p={};m(p,{validationWarnings:()=>v});var v,d=b(()=>{v={ariaLabelWarning:"link without a label",noIconWarning:"could not find the icon"}});var s=n=>n!=null?n:c;var h=l`
|
|
2
|
+
.scw-link-base {
|
|
3
|
+
display: block;
|
|
4
|
+
text-decoration: none;
|
|
5
|
+
}
|
|
6
|
+
.scw-link-base:focus-visible {
|
|
7
|
+
outline: none;
|
|
8
|
+
box-shadow: var(--scw-effect-focus-shadow);
|
|
9
|
+
border-radius: 4px;
|
|
10
|
+
}
|
|
11
|
+
.scw-link-base:focus:not(:focus-visible) {
|
|
12
|
+
outline: none;
|
|
13
|
+
box-shadow: none;
|
|
14
|
+
}`;var{validationWarnings:k}=(d(),g(p)),t=class extends f{constructor(){super();this.ariaLabel="";this.ariaDisabled="false";this.element="link-base"}static get styles(){return[super.styles,h]}updated(){this.ariaDisabled==="true"?this.addEventListener("click",this.cancelEvent,{capture:!0}):this.removeEventListener("click",this.cancelEvent,{capture:!0})}cancelEvent(e){e.preventDefault(),e.stopImmediatePropagation()}parseAndValidateLightDom(){super.parseAndValidateLightDom(),u(this),this.isLink()&&this.ariaLabel.trim().length===0&&this.warn(k.ariaLabelWarning)}isLink(){return!!(this.href||this.getAttribute("onclick"))}renderLink(e,o){return this.isLink()&&this.ariaDisabled!=="true"?a`
|
|
15
|
+
<a
|
|
16
|
+
class="scw-link-base"
|
|
17
|
+
style="${s(o)}"
|
|
18
|
+
href="${this.href?this.href:"javascript:"}"
|
|
19
|
+
target="${this.target?this.target:"_self"}"
|
|
20
|
+
aria-label="${this.ariaLabel}">
|
|
21
|
+
${e}
|
|
22
|
+
</a>`:a`
|
|
23
|
+
<div class="scw-link-base"
|
|
24
|
+
style="${s(o)}">
|
|
25
|
+
${e}
|
|
26
|
+
</div>`}render(){return this.renderLink(a`${this._lastWarning?this._lastWarning:this.ariaLabel}`)}};i([r({type:String,reflect:!0,attribute:"aria-label"})],t.prototype,"ariaLabel",2),i([r({type:String,attribute:"aria-disabled"})],t.prototype,"ariaDisabled",2),i([r({type:String,reflect:!0})],t.prototype,"href",2),i([r({type:String,reflect:!0})],t.prototype,"target",2);export{s as a,p as b,d as c,t as d};
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2018 Google LLC
|
|
30
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
+
*/
|
|
32
|
+
//# sourceMappingURL=chunk.S4MESEBR.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/validation/warnings.mjs", "../../../node_modules/lit-html/src/directives/if-defined.ts", "sass-plugin-0:/Users/scottrouse/Workspace/scu-design-system-mono/scu-web-components/src/scw-link-base/scss/scw-link-base.scss", "../../src/scw-link-base/ScwLinkBase.ts"],
|
|
4
|
+
"sourcesContent": ["\n\nexport const validationWarnings = {\n ariaLabelWarning: 'link without a label',\n noIconWarning: 'could not find the icon',\n};\n", "/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {nothing} from '../lit-html.js';\n\n/**\n * For AttributeParts, sets the attribute if the value is defined and removes\n * the attribute if the value is undefined.\n *\n * For other part types, this directive is a no-op.\n */\nexport const ifDefined = <T>(value: T) => value ?? nothing;\n", "import {css} from \"lit-element/lit-element.js\";\nexport default css`\n.scw-link-base {\n display: block;\n text-decoration: none;\n}\n.scw-link-base:focus-visible {\n outline: none;\n box-shadow: var(--scw-effect-focus-shadow);\n border-radius: 4px;\n}\n.scw-link-base:focus:not(:focus-visible) {\n outline: none;\n box-shadow: none;\n}`;\n", "import {html} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport ScwComponent from '../scw-component/ScwComponent';\nimport parseLightDomAnchor from './parseLightDomAnchor';\nimport {Components} from '../utils/enums/Components';\nimport styles from './scss/scw-link-base.scss';\nconst {validationWarnings} = require('../utils/validation/warnings.mjs');\n\n/**\n * ScwLinkBase\n * @class\n * @tag scw-link-base\n *\n * @slot [default=\"<a href target />\"]\n (OPTIONAL) anchor (for SEO) will determine the label, href, and target.\n * @slot [default=\"<... />\"]\n (OPTIONAL) random content (paired with design=\"plain\") will wrap that\n content with a link.\n */\nexport default class ScwLinkBase extends ScwComponent {/**\n * styles\n */\n static get styles() {\n return [\n super.styles,\n styles,\n ];\n }\n\n // ============== ScwLinkBase =======================================\n /**\n * (ScwLinkBase) Main text within component\n * @type {string}\n */\n @property({type: String, reflect: true, attribute: 'aria-label'})\n ariaLabel: string = '';\n\n /**\n * (ScwLinkBase) Makes the link unclickable and faded out.\n * @type {string}\n */\n @property({type: String, attribute: 'aria-disabled'})\n ariaDisabled: string = 'false';\n\n /**\n * (ScwLinkBase) link location - private\n * ...should not be able to be set directly b/c scu-link should use this\n */\n @property({type: String, reflect: true})\n href : string | undefined;\n\n /**\n * (ScwLinkBase) link target - private\n * ...should not be able to be set directly b/c scu-link should use this\n */\n @property({type: String, reflect: true})\n target : '_blank' | '_parent' | '_self' | '_top' | undefined;\n\n /**\n * Constructor\n */\n constructor() {\n super();\n this.element = Components.linkBase;\n }\n\n /**\n * request update\n */\n updated() {\n if (this.ariaDisabled === 'true') {\n this.addEventListener('click', this.cancelEvent, {capture: true} );\n } else {\n this.removeEventListener('click', this.cancelEvent, {capture: true} );\n }\n }\n\n /**\n * cancel event\n * @param {Event} evt\n */\n cancelEvent(evt: Event) {\n evt.preventDefault();\n evt.stopImmediatePropagation();\n }\n\n /**\n * override with anchor info\n */\n parseAndValidateLightDom() {\n super.parseAndValidateLightDom();\n parseLightDomAnchor(this);\n if (this.isLink() && this.ariaLabel.trim().length === 0) {\n this.warn(validationWarnings.ariaLabelWarning);// 'link without a label');\n }\n }\n\n /**\n * Should this element be rendered as a link...\n * @return {boolean}\n */\n isLink() {\n if (this.href || this.getAttribute('onclick')) {\n return true;\n }\n return false;\n }\n\n /**\n * renderLink\n * @param {object} children\n * @param {string} styles\n * @return {object} component DOM\n */\n renderLink(children: object, styles?: string): object {\n if (this.isLink() && this.ariaDisabled !== 'true') {\n return html`\n <a\n class=\"scw-link-base\"\n style=\"${ifDefined(styles)}\"\n href=\"${this.href ? this.href : 'javascript:'}\"\n target=\"${this.target ? this.target : '_self'}\"\n aria-label=\"${this.ariaLabel}\">\n ${children}\n </a>`;\n } else {\n // need a consistent container for styling\n return html`\n <div class=\"scw-link-base\"\n style=\"${ifDefined(styles)}\">\n ${children}\n </div>`;\n }\n }\n\n /**\n * render\n * @return {object} component DOM\n */\n render(): object {\n return this.renderLink(\n html`${this._lastWarning ? this._lastWarning : this.ariaLabel}`,\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "gMAAA,4CAEa,GAFb,SAEO,AAAM,EAAqB,CAChC,iBAAkB,uBAClB,cAAe,yBACjB,OCSa,GAAgB,GAAa,AAAA,GAAA,KAAA,EAAS,ECbnD,GAAO,GAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;GCMf,GAAM,CAAC,sBAAsB,WAa7B,eAAyC,EAAa,CA0CpD,aAAc,CACZ,MAAM,EA3BN,eAAoB,GAOpB,kBAAuB,QAqBvB,KAAK,QAAU,WACjB,WA1CW,SAAS,CAClB,MAAO,CACL,MAAM,OACN,CACF,CACF,CA0CA,SAAU,CACR,AAAI,KAAK,eAAiB,OACxB,KAAK,iBAAiB,QAAS,KAAK,YAAa,CAAC,QAAS,EAAI,CAAE,EAEjE,KAAK,oBAAoB,QAAS,KAAK,YAAa,CAAC,QAAS,EAAI,CAAE,CAExE,CAMA,YAAY,EAAY,CACtB,EAAI,eAAe,EACnB,EAAI,yBAAyB,CAC/B,CAKA,0BAA2B,CACzB,MAAM,yBAAyB,EAC/B,EAAoB,IAAI,EACpB,KAAK,OAAO,GAAK,KAAK,UAAU,KAAK,EAAE,SAAW,GACpD,KAAK,KAAK,EAAmB,gBAAgB,CAEjD,CAMA,QAAS,CACP,MAAI,QAAK,MAAQ,KAAK,aAAa,SAAS,EAI9C,CAQA,WAAW,EAAkB,EAAyB,CACpD,MAAI,MAAK,OAAO,GAAK,KAAK,eAAiB,OAClC;AAAA;AAAA;AAAA,mBAGM,EAAU,CAAM;AAAA,kBACjB,KAAK,KAAO,KAAK,KAAO;AAAA,oBACtB,KAAK,OAAS,KAAK,OAAS;AAAA,wBACxB,KAAK;AAAA,YACjB;AAAA,cAIC;AAAA;AAAA,mBAEM,EAAU,CAAM;AAAA,YACvB;AAAA,eAGV,CAMA,QAAiB,CACf,MAAO,MAAK,WACV,IAAO,KAAK,aAAe,KAAK,aAAe,KAAK,WACtD,CACF,CACF,EA7GI,GADF,AAAC,EAAS,CAAC,KAAM,OAAQ,QAAS,GAAM,UAAW,YAAY,CAAC,GAC9D,AAhBJ,EAgBI,yBAOA,GADF,AAAC,EAAS,CAAC,KAAM,OAAQ,UAAW,eAAe,CAAC,GAClD,AAvBJ,EAuBI,4BAOA,GADF,AAAC,EAAS,CAAC,KAAM,OAAQ,QAAS,EAAI,CAAC,GACrC,AA9BJ,EA8BI,oBAOA,GADF,AAAC,EAAS,CAAC,KAAM,OAAQ,QAAS,EAAI,CAAC,GACrC,AArCJ,EAqCI",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/suffix.ts"],
|
|
4
|
+
"sourcesContent": ["import {config} from '../scw';\n\n/**\n * Pulls suffix from global design system config with some formatting options\n * @param {string} connector\n * @return {string}\n */\nexport default function getSuffix(connector: string = '-') {\n return config ? config.suffix ? `${connector}${config.suffix}` : '' : '';\n}\n\n"],
|
|
5
|
+
"mappings": "wCAOe,WAAmB,EAAoB,IAAK,CACzD,MAAO,IAAS,EAAO,OAAS,GAAG,IAAY,EAAO,SAAgB,EACxE",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import{a as h}from"./chunk.K3V3AEZG.js";import{a}from"./chunk.27N4OQ6C.js";import{b as p,c as v,d as c}from"./chunk.7I6Z5MNC.js";import{a as e,b as s,c as l}from"./chunk.HCMPRDIX.js";import{a as i}from"./chunk.ZS4C3T6Z.js";import{f as n,g as r}from"./chunk.5YJY6NT6.js";var g=e`
|
|
2
|
+
:host .scw-link-base {
|
|
3
|
+
outline: none;
|
|
4
|
+
user-select: none;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
border-radius: 50%;
|
|
9
|
+
}
|
|
10
|
+
:host .scw-link-base svg {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host {
|
|
18
|
+
width: 30px;
|
|
19
|
+
height: 30px;
|
|
20
|
+
}
|
|
21
|
+
:host a.scw-link-base:hover {
|
|
22
|
+
background-color: var(--scw-color-grey-092);
|
|
23
|
+
}
|
|
24
|
+
:host svg, :host svg * {
|
|
25
|
+
fill: var(--scw-color, var(--scw-color-grey-02));
|
|
26
|
+
}
|
|
27
|
+
:host svg .color-step-01 {
|
|
28
|
+
fill: var(--scw-color-01, var(--scw-color-grey-01));
|
|
29
|
+
}
|
|
30
|
+
:host svg .color-step-02 {
|
|
31
|
+
fill: var(--scw-color-02, var(--scw-color-grey-02));
|
|
32
|
+
}
|
|
33
|
+
:host svg .color-step-03 {
|
|
34
|
+
fill: var(--scw-color-03, var(--scw-color-grey-03));
|
|
35
|
+
}
|
|
36
|
+
:host svg .color-step-04 {
|
|
37
|
+
fill: var(--scw-color-04, var(--scw-color-grey-04));
|
|
38
|
+
}
|
|
39
|
+
:host svg .color-step-05,
|
|
40
|
+
:host svg .color-step {
|
|
41
|
+
fill: var(--scw-color-05, var(--scw-color-grey-05));
|
|
42
|
+
}
|
|
43
|
+
:host svg .color-step-06 {
|
|
44
|
+
fill: var(--scw-color-06, var(--scw-color-grey-06));
|
|
45
|
+
}
|
|
46
|
+
:host svg .color-step-07 {
|
|
47
|
+
fill: var(--scw-color-07, var(--scw-color-grey-07));
|
|
48
|
+
}
|
|
49
|
+
:host svg .color-step-08 {
|
|
50
|
+
fill: var(--scw-color-08, var(--scw-color-grey-08));
|
|
51
|
+
}
|
|
52
|
+
:host svg .color-step-09 {
|
|
53
|
+
fill: var(--scw-color-09, var(--scw-color-grey-09));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([color-background]) .scw-link-base {
|
|
57
|
+
background-color: var(--scw-color, var(--scw-color-grey-02));
|
|
58
|
+
}
|
|
59
|
+
:host([color-background]) a.scw-link-base:hover {
|
|
60
|
+
background-color: var(--scw-color-06, var(--scw-color-dark, var(--scw-color-grey-02)));
|
|
61
|
+
}
|
|
62
|
+
:host([color-background]) svg, :host([color-background]) svg * {
|
|
63
|
+
fill: var(--scw-color-grey-10);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([size="10"]) {
|
|
67
|
+
width: 10px;
|
|
68
|
+
height: 10px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([size="20"]) {
|
|
72
|
+
width: 20px;
|
|
73
|
+
height: 20px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([size="30"]) {
|
|
77
|
+
width: 30px;
|
|
78
|
+
height: 30px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([size="40"]) {
|
|
82
|
+
width: 40px;
|
|
83
|
+
height: 40px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host([size="50"]) {
|
|
87
|
+
width: 50px;
|
|
88
|
+
height: 50px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([size="60"]) {
|
|
92
|
+
width: 60px;
|
|
93
|
+
height: 60px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([size="70"]) {
|
|
97
|
+
width: 70px;
|
|
98
|
+
height: 70px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host([size="80"]) {
|
|
102
|
+
width: 80px;
|
|
103
|
+
height: 80px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([size="90"]) {
|
|
107
|
+
width: 90px;
|
|
108
|
+
height: 90px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:host([size="100"]) {
|
|
112
|
+
width: 100px;
|
|
113
|
+
height: 100px;
|
|
114
|
+
}`;var{validationWarnings:w}=(v(),n(p)),o=class extends c{constructor(){super();this.size="50";this.colorBackground=!1;this._svgInfo="";this.element="icon"}static get styles(){return[super.styles,g]}parseAndValidateLightDom(){super.parseAndValidateLightDom(),a(this.icon,t=>{t===!1?this.warn(w.noIconWarning):this._svgInfo=t})}render(){return this.renderLink(i`
|
|
115
|
+
${h(this._svgInfo)}
|
|
116
|
+
`)}};r([s({type:String,reflect:!0})],o.prototype,"icon",2),r([s({type:String,reflect:!0})],o.prototype,"size",2),r([s({type:Boolean,reflect:!0,attribute:"color-background"})],o.prototype,"colorBackground",2),r([l()],o.prototype,"_svgInfo",2);export{o as a};
|
|
117
|
+
//# sourceMappingURL=chunk.SHPKVE4P.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["sass-plugin-0:/Users/scottrouse/Workspace/scu-design-system-mono/scu-web-components/src/scw-icon/scss/scw-icon.scss", "../../src/scw-icon/ScwIcon.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from \"lit-element/lit-element.js\";\nexport default css`\n:host .scw-link-base {\n outline: none;\n user-select: none;\n display: inline-flex;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n}\n:host .scw-link-base svg {\n box-sizing: border-box;\n vertical-align: top;\n width: 100%;\n height: 100%;\n}\n\n:host {\n width: 30px;\n height: 30px;\n}\n:host a.scw-link-base:hover {\n background-color: var(--scw-color-grey-092);\n}\n:host svg, :host svg * {\n fill: var(--scw-color, var(--scw-color-grey-02));\n}\n:host svg .color-step-01 {\n fill: var(--scw-color-01, var(--scw-color-grey-01));\n}\n:host svg .color-step-02 {\n fill: var(--scw-color-02, var(--scw-color-grey-02));\n}\n:host svg .color-step-03 {\n fill: var(--scw-color-03, var(--scw-color-grey-03));\n}\n:host svg .color-step-04 {\n fill: var(--scw-color-04, var(--scw-color-grey-04));\n}\n:host svg .color-step-05,\n:host svg .color-step {\n fill: var(--scw-color-05, var(--scw-color-grey-05));\n}\n:host svg .color-step-06 {\n fill: var(--scw-color-06, var(--scw-color-grey-06));\n}\n:host svg .color-step-07 {\n fill: var(--scw-color-07, var(--scw-color-grey-07));\n}\n:host svg .color-step-08 {\n fill: var(--scw-color-08, var(--scw-color-grey-08));\n}\n:host svg .color-step-09 {\n fill: var(--scw-color-09, var(--scw-color-grey-09));\n}\n\n:host([color-background]) .scw-link-base {\n background-color: var(--scw-color, var(--scw-color-grey-02));\n}\n:host([color-background]) a.scw-link-base:hover {\n background-color: var(--scw-color-06, var(--scw-color-dark, var(--scw-color-grey-02)));\n}\n:host([color-background]) svg, :host([color-background]) svg * {\n fill: var(--scw-color-grey-10);\n}\n\n:host([size=\"10\"]) {\n width: 10px;\n height: 10px;\n}\n\n:host([size=\"20\"]) {\n width: 20px;\n height: 20px;\n}\n\n:host([size=\"30\"]) {\n width: 30px;\n height: 30px;\n}\n\n:host([size=\"40\"]) {\n width: 40px;\n height: 40px;\n}\n\n:host([size=\"50\"]) {\n width: 50px;\n height: 50px;\n}\n\n:host([size=\"60\"]) {\n width: 60px;\n height: 60px;\n}\n\n:host([size=\"70\"]) {\n width: 70px;\n height: 70px;\n}\n\n:host([size=\"80\"]) {\n width: 80px;\n height: 80px;\n}\n\n:host([size=\"90\"]) {\n width: 90px;\n height: 90px;\n}\n\n:host([size=\"100\"]) {\n width: 100px;\n height: 100px;\n}`;\n", "import {html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport {unsafeHTML} from 'lit/directives/unsafe-html.js';\n// import styles from './scss/scw-icon.scss';\nimport getIconSvg from '../utils/getIconSvg';\nimport {\n ScwIconSizes,\n} from './scw-icon-enums';\nimport {Components} from '../utils/enums/Components';\nimport ScwLinkBase from '../scw-link-base/ScwLinkBase';\nimport styles from './scss/scw-icon.scss';\nconst {validationWarnings} = require('../utils/validation/warnings.mjs');\n\n/**\n * ScwIcon\n * @class\n * @tag scw-icon\n *\n * @slot [default=\"<a href target />\"]\n (OPTIONAL) anchor (for SEO) will determine the label, href, and target.\n */\nexport default class ScwIcon extends ScwLinkBase {\n /**\n * styles\n */\n static get styles() {\n return [\n super.styles,\n styles,\n ];\n }\n\n // ============== ScwIcon ====================================================\n /** (ScwIcon) Determines the icon to use with the text */\n @property({type: String, reflect: true}) icon: string | undefined;\n\n /** (ScwIcon) Determines the square size of the icon */\n @property({type: String, reflect: true})\n size: ScwIconSizes = ScwIconSizes.size50;\n\n /** (ScwIcon) Background color (w/ accompanying state colors) */\n @property({type: Boolean, reflect: true, attribute: 'color-background'})\n colorBackground: boolean = false;\n\n @state() _svgInfo : string = '';\n\n /** Constructor */\n constructor() {\n super();\n this.element = Components.icon;\n }\n\n /** parseAndValidateLightDom, just adding local parsing and validation */\n parseAndValidateLightDom() {\n super.parseAndValidateLightDom();\n getIconSvg(this.icon, (svgInfo: string | false ) => {\n if (svgInfo === false ) {\n this.warn(validationWarnings.noIconWarning);\n } else {\n this._svgInfo = svgInfo;\n }\n });\n }\n\n /**\n * render\n * @return {object} component DOM\n */\n render(): object {\n return this.renderLink(\n html`\n ${unsafeHTML(this._svgInfo)}\n `,\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "8QACA,GAAO,GAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;GCUf,GAAM,CAAC,sBAAsB,WAU7B,eAAqC,EAAY,CA0B/C,aAAc,CACZ,MAAM,EAVN,UAAqB,KAIrB,qBAA2B,GAEpB,cAAoB,GAK3B,KAAK,QAAU,MACjB,WAzBY,SAAS,CACnB,MAAO,CACL,MAAM,OACN,CACF,CACF,CAuBA,0BAA2B,CACzB,MAAM,yBAAyB,EAC/B,EAAW,KAAK,KAAM,AAAC,GAA6B,CAClD,AAAI,IAAY,GACd,KAAK,KAAK,EAAmB,aAAa,EAE1C,KAAK,SAAW,CAEpB,CAAC,CACH,CAMA,QAAiB,CACf,MAAO,MAAK,WACV;AAAA,UACI,EAAW,KAAK,QAAQ;AAAA,OAE9B,CACF,CACF,EAzC2C,GAAzC,AAAC,EAAS,CAAC,KAAM,OAAQ,QAAS,EAAI,CAAC,GAAE,AAb3C,EAa2C,oBAIvC,GADF,AAAC,EAAS,CAAC,KAAM,OAAQ,QAAS,EAAI,CAAC,GACrC,AAjBJ,EAiBI,oBAIA,GADF,AAAC,EAAS,CAAC,KAAM,QAAS,QAAS,GAAM,UAAW,kBAAkB,CAAC,GACrE,AArBJ,EAqBI,+BAEO,GAAT,AAAC,EAAM,GAAE,AAvBX,EAuBW",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i,b as o}from"./chunk.TUFC4UAB.js";import{a as n}from"./chunk.2VW3SHYK.js";var s=class{constructor(e){this.tabbablelist=["menu-item","icon","link","button","BUTTON","A"];this.ignorelist=["scw-menu"];this.menu=e,this.handleKeydown=this.handleKeydown.bind(this),this.initKeyboard(),this.documentClickHandler=this.documentClickHandler.bind(this)}initKeyboard(){this.menu.addEventListener("focusin",e=>{console.log("focus in",e.target===this.menu),e.target===this.menu&&this.focusOnNextTabbableElement(this.menu),this.menu.setAttribute("tabindex","-1"),n("scw-app-mode-on",this.menu),this.menu.isSubMenu()&&document.addEventListener("click",this.documentClickHandler)}),this.menu.addEventListener("focusout",e=>{e.relatedTarget&&this.menu.contains(e.relatedTarget)||(this.menu.setAttribute("tabindex","0"),n("scw-app-mode-off",this.menu))}),this.menu.addEventListener("keydown",e=>{this.handleKeydown(e)}),this.menu.addEventListener("click",e=>{this.clickHandler(e)})}documentClickHandler(e){let t=e.target;this.menu.contains(t)||this.closeMenu()}closeMenu(e=!1){if(this.menu.isSubMenu()&&(document.removeEventListener("click",this.documentClickHandler),this.menu.ariaHidden="true",this.menu.setAttribute("aria-hidden","true"),e)){let t=this.menu.previousElementSibling;t&&t.element==="menu-item"&&t.focus()}}clickHandler(e){let t=e.target;t&&t.element==="menu-item"&&(t.focus(),this.toggleSubMenu())}toggleSubMenu(){let e=this.findSubmenu();return e?(e.ariaHidden==="false"?(e.ariaHidden="true",e.setAttribute("aria-hidden","true")):(e.ariaHidden="false",e.setAttribute("aria-hidden","false"),setTimeout(()=>{e.focus()},0)),!0):!1}focusOnNextTabbableElement(e){i(this.menu,e,"forwards")}focusOnPreviousTabbableElement(e){i(this.menu,e,"backwards")}stopEvent(e){e.stopPropagation(),e.preventDefault()}handleKeydown(e){if(console.log(e),this.menu.isSubMenu()&&e.key==="Tab")if(e.shiftKey){this.focusOnPreviousTabbableElement(),this.stopEvent(e);return}else{this.focusOnNextTabbableElement(),this.stopEvent(e);return}switch(e.key){case"ArrowRight":this.menu.keyboardDirection==="vertical"?this.toggleSubMenu():this.focusOnNextTabbableElement(),this.stopEvent(e);break;case"ArrowDown":this.menu.keyboardDirection==="horizontal"?this.toggleSubMenu():this.focusOnNextTabbableElement(),this.stopEvent(e);break;case"ArrowLeft":this.menu.keyboardDirection==="vertical"?this.toggleSubMenu()||this.closeMenu(!0):this.focusOnPreviousTabbableElement(),this.stopEvent(e);break;case"ArrowUp":this.menu.keyboardDirection==="horizontal"?this.toggleSubMenu()||this.closeMenu(!0):this.focusOnPreviousTabbableElement(),this.stopEvent(e);break;case"Escape":this.closeMenu(!0),this.stopEvent(e);break;case"Home":this.focusOnNextTabbableElement(this.menu),this.stopEvent(e);break;case"End":this.focusOnPreviousTabbableElement(this.menu),this.stopEvent(e);break}}findSubmenu(){let e=o(this.menu);if(e){let t=e.nextElementSibling;if(t&&t.element==="menu")return t}}};export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk.SPEZE3RA.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/scw-menu/keyboard/scw-menu-keyboard.ts"],
|
|
4
|
+
"sourcesContent": ["import ScwMenu from '../ScwMenu';\n// import ScwMenuItem from '../scw-menu-item/scw-menu-item';\n// import {dispatchCustomEvent} from '../../utils/customEvents';\n// import ScwComponent from '../scw-component/scw-component';\nimport {emit, ScwEvents} from '../../utils/events/event';\nimport\n focusOnTabbableElement,\n {\n findActiveMenuElement,\n } from './keyboardElements';\nimport {ScwMenuDirections} from '../scw-menu-enums';\nimport ScwComponent from '../../scw-component/ScwComponent';\nimport {Components} from '../../utils/enums/Components';\n\n/**\n * ScwMenuKeyboard\n * manages all the keyboard events for ScwMenu\n */\nexport default class ScwMenuKeyboard {\n /** menu to manage */\n menu : ScwMenu;\n\n /** list of elements that are tabbable */\n tabbablelist = [\n Components.menuItem,\n Components.icon,\n Components.link,\n Components.button,\n 'BUTTON',\n 'A',\n ];\n\n /** list of elements that should be ignored */\n ignorelist = ['scw-menu'];\n\n /**\n * constructor\n * @param {ScwMenu} menu\n */\n constructor( menu: ScwMenu) {\n this.menu = menu;\n this.handleKeydown = this.handleKeydown.bind(this);\n this.initKeyboard();\n this.documentClickHandler = this.documentClickHandler.bind(this);\n // TODO: capture all menuItems at beginning.\n }\n\n /**\n * initialize keyboard event handling for ScwMenu\n */\n initKeyboard() {\n this.menu.addEventListener('focusin', (evt) => {\n console.log('focus in', evt.target === this.menu);\n if (evt.target === this.menu) {\n this.focusOnNextTabbableElement(this.menu);\n }\n // take menu out of tab index so we can tab out smoothly\n this.menu.setAttribute('tabindex', '-1');\n emit(\n ScwEvents.appModeOn,\n this.menu,\n );\n if (this.menu.isSubMenu()) {\n document.addEventListener('click', this.documentClickHandler );\n }\n });\n\n this.menu.addEventListener('focusout', (evt) => {\n if ( // don't matter if it is still within menu\n evt.relatedTarget &&\n this.menu.contains( evt.relatedTarget as unknown as HTMLElement)\n ) {\n return;\n }\n this.menu.setAttribute('tabindex', '0');\n\n emit(\n ScwEvents.appModeOff,\n this.menu,\n );\n });\n\n this.menu.addEventListener('keydown', (evt: KeyboardEvent) => {\n this.handleKeydown(evt);\n });\n\n this.menu.addEventListener('click', (evt: MouseEvent) => {\n this.clickHandler(evt);\n });\n }\n\n /**\n * close menu if clicked anywhere but menu\n * @param {MouseEvent} evt\n */\n documentClickHandler(evt: MouseEvent) {\n const target = evt.target as unknown as HTMLElement;\n if (!this.menu.contains(target)) {\n this.closeMenu();\n }\n }\n\n /**\n * closes menu if it is a submenu\n * @param {boolean} doFocus\n */\n closeMenu(doFocus = false) {\n if (this.menu.isSubMenu()) {\n document.removeEventListener('click', this.documentClickHandler );\n this.menu.ariaHidden = 'true';\n this.menu.setAttribute('aria-hidden', 'true');\n\n if (doFocus) {\n const menuItem =\n this.menu.previousElementSibling as unknown as ScwComponent;\n if (\n menuItem && menuItem.element === Components.menuItem\n ) {\n menuItem.focus();\n }\n }\n }\n }\n\n /**\n * handle clicks within the menu\n * @param {MouseEvent} evt\n */\n clickHandler(evt : MouseEvent) {\n const target = evt.target as unknown as ScwComponent;\n if (target && target.element === Components.menuItem) {\n target.focus();\n this.toggleSubMenu();\n }\n }\n\n /**\n * opens/closes submenu if there is one\n * @return {boolean}\n */\n toggleSubMenu() : boolean {\n const subMenu = this.findSubmenu();\n if (subMenu) {\n if (subMenu.ariaHidden === 'false') {\n subMenu.ariaHidden = 'true';\n subMenu.setAttribute('aria-hidden', 'true');\n } else {\n subMenu.ariaHidden = 'false';\n subMenu.setAttribute('aria-hidden', 'false');\n setTimeout(() => {\n subMenu.focus();\n }, 0);\n }\n return true;\n }\n return false;\n }\n\n /**\n * Focus on the next tabbable element\n * @param {HTMLElement} ele\n */\n focusOnNextTabbableElement(ele?: HTMLElement) {\n focusOnTabbableElement( this.menu, ele, 'forwards' );\n }\n\n /**\n * Focus on the previous tabbable element\n * @param {HTMLElement} ele\n */\n focusOnPreviousTabbableElement(ele?: HTMLElement) {\n focusOnTabbableElement( this.menu, ele, 'backwards' );\n }\n\n /**\n * Fully stops event\n * @param {KeyboardEvent} evt\n */\n stopEvent(evt: Event) {\n evt.stopPropagation();\n evt.preventDefault();\n }\n\n /**\n * Handle keyboard down events\n * @param {KeyboardEvent} evt\n */\n handleKeydown(evt : KeyboardEvent) {\n console.log(evt);\n\n // figure out extents of Tab\n if (\n this.menu.isSubMenu() &&\n evt.key === 'Tab'\n ) {\n if (evt.shiftKey) {// backwards....\n // const prevTabbable = findPrevTabbableEle( this.menu );\n // if (!prevTabbable) this.closeMenu();\n this.focusOnPreviousTabbableElement();\n this.stopEvent(evt);\n return;\n } else {\n // const nextTabbable = findNextTabbableEle( this.menu );\n // if (!nextTabbable) this.closeMenu();\n this.focusOnNextTabbableElement();\n this.stopEvent(evt);\n return;\n }\n }\n\n // Otherwise look for keys\n switch (evt.key) {\n case 'ArrowRight':\n if (\n this.menu.keyboardDirection === ScwMenuDirections.vertical\n ) {\n this.toggleSubMenu();\n } else { // horizontal, either\n this.focusOnNextTabbableElement();\n }\n this.stopEvent(evt);\n break;\n case 'ArrowDown':\n if (\n this.menu.keyboardDirection === ScwMenuDirections.horizontal\n ) {\n this.toggleSubMenu();\n } else { // vertical, either\n this.focusOnNextTabbableElement();\n }\n this.stopEvent(evt);\n break;\n case 'ArrowLeft':\n if (\n this.menu.keyboardDirection === ScwMenuDirections.vertical\n ) {\n if ( !this.toggleSubMenu() ) {\n this.closeMenu(true);\n }\n } else { // horizontal, either\n this.focusOnPreviousTabbableElement();\n }\n this.stopEvent(evt);\n break;\n case 'ArrowUp':\n if (\n this.menu.keyboardDirection === ScwMenuDirections.horizontal\n ) {\n if ( !this.toggleSubMenu() ) {\n this.closeMenu(true);\n }\n } else { // horizontal, either\n this.focusOnPreviousTabbableElement();\n }\n this.stopEvent(evt);\n break;\n case 'Escape':\n this.closeMenu(true);\n this.stopEvent(evt);\n break;\n case 'Home':\n this.focusOnNextTabbableElement(this.menu);\n this.stopEvent(evt);\n break;\n case 'End':\n this.focusOnPreviousTabbableElement(this.menu);\n this.stopEvent(evt);\n break;\n }\n }\n\n /**\n * find the submenu of the focused ScwMenuItem\n * @return {ScwMenu | undefined}\n */\n findSubmenu() : ScwMenu | undefined {\n const focusedElement = findActiveMenuElement(this.menu);\n if (focusedElement) {\n const nextSibling =\n focusedElement.nextElementSibling;\n if ( nextSibling && nextSibling['element'] === Components.menu ) {\n return nextSibling as unknown as ScwMenu;\n }\n }\n return undefined;\n }\n}\n\n\n"],
|
|
5
|
+
"mappings": "uFAkBA,WAAqC,CAqBnC,YAAa,EAAe,CAhB5B,kBAAe,CACb,YACA,OACA,OACA,SACA,SACA,GACF,EAGA,gBAAa,CAAC,UAAU,EAOtB,KAAK,KAAO,EACZ,KAAK,cAAgB,KAAK,cAAc,KAAK,IAAI,EACjD,KAAK,aAAa,EAClB,KAAK,qBAAuB,KAAK,qBAAqB,KAAK,IAAI,CAEjE,CAKA,cAAe,CACb,KAAK,KAAK,iBAAiB,UAAW,AAAC,GAAQ,CAC7C,QAAQ,IAAI,WAAY,EAAI,SAAW,KAAK,IAAI,EAC5C,EAAI,SAAW,KAAK,MACtB,KAAK,2BAA2B,KAAK,IAAI,EAG3C,KAAK,KAAK,aAAa,WAAY,IAAI,EACvC,EACE,kBACA,KAAK,IACP,EACI,KAAK,KAAK,UAAU,GACtB,SAAS,iBAAiB,QAAS,KAAK,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|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/suffix.ts"],
|
|
4
|
+
"sourcesContent": ["import {config} from '../scw';\n\n/**\n * Pulls suffix from global design system config with some formatting options\n * @param {string} connector\n * @return {string}\n */\nexport default function getSuffix(connector: string = '-') {\n return config ? config.suffix ? `${connector}${config.suffix}` : '' : '';\n}\n\n"],
|
|
5
|
+
"mappings": "wCAOe,WAAmB,EAAoB,IAAK,CACzD,MAAO,IAAS,EAAO,OAAS,GAAG,IAAY,EAAO,SAAgB,EACxE",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/suffix.ts"],
|
|
4
|
+
"sourcesContent": ["import {config} from '../scw';\n\n/**\n * Pulls suffix from global design system config with some formatting options\n * @param {string} connector\n * @return {string}\n */\nexport default function getSuffix(connector: string = '-') {\n return config ? config.suffix ? `${connector}${config.suffix}` : '' : '';\n}\n\n"],
|
|
5
|
+
"mappings": "wCAOe,WAAmB,EAAoB,IAAK,CACzD,MAAO,IAAS,EAAO,OAAS,GAAG,IAAY,EAAO,SAAgB,EACxE",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|