@synergy-design-system/components 2.11.8 → 2.12.0
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.RIZ3OICD.js → chunk.2DTLMVCC.js} +6 -4
- package/dist/chunks/{chunk.RIZ3OICD.js.map → chunk.2DTLMVCC.js.map} +1 -1
- package/dist/chunks/{chunk.W5EZFWUS.js → chunk.2HVKUBS7.js} +10 -8
- package/dist/chunks/{chunk.W5EZFWUS.js.map → chunk.2HVKUBS7.js.map} +1 -1
- package/dist/chunks/{chunk.5JHL4BNI.js → chunk.2JVLDJOZ.js} +8 -6
- package/dist/chunks/{chunk.5JHL4BNI.js.map → chunk.2JVLDJOZ.js.map} +1 -1
- package/dist/chunks/{chunk.W4OTSXB2.js → chunk.2N7XLLRT.js} +10 -8
- package/dist/chunks/{chunk.W4OTSXB2.js.map → chunk.2N7XLLRT.js.map} +1 -1
- package/dist/chunks/{chunk.TI5RKSNH.js → chunk.2RR6PD3H.js} +2 -2
- package/dist/chunks/{chunk.OULRXKKF.js → chunk.2VWVV75N.js} +2 -2
- package/dist/chunks/{chunk.IBHCGBFT.js → chunk.2XCTA3AO.js} +2 -2
- package/dist/chunks/{chunk.BVTARVRR.js → chunk.2XJUCSO3.js} +2 -2
- package/dist/chunks/{chunk.D6WAL6UA.js → chunk.35GWQ3HX.js} +9 -7
- package/dist/chunks/{chunk.D6WAL6UA.js.map → chunk.35GWQ3HX.js.map} +1 -1
- package/dist/chunks/{chunk.S5WQTT5P.js → chunk.3DLFZSF7.js} +2 -2
- package/dist/chunks/{chunk.MJKQGREK.js → chunk.46LZSYUL.js} +2 -2
- package/dist/chunks/{chunk.RZUSPMLI.js → chunk.47JTZI3N.js} +7 -5
- package/dist/chunks/{chunk.RZUSPMLI.js.map → chunk.47JTZI3N.js.map} +1 -1
- package/dist/chunks/{chunk.V433PDP3.js → chunk.4JYTX6L6.js} +2 -2
- package/dist/chunks/{chunk.EMLJTW54.js → chunk.4UIWHJGU.js} +6 -4
- package/dist/chunks/{chunk.EMLJTW54.js.map → chunk.4UIWHJGU.js.map} +1 -1
- package/dist/chunks/{chunk.KALYMTPW.js → chunk.5MAFVQHL.js} +2 -2
- package/dist/chunks/{chunk.7FTH6MTB.js → chunk.5PHPJIT3.js} +5 -3
- package/dist/chunks/{chunk.7FTH6MTB.js.map → chunk.5PHPJIT3.js.map} +1 -1
- package/dist/chunks/{chunk.2WDJUG6Y.js → chunk.6FBJHPH5.js} +5 -3
- package/dist/chunks/{chunk.2WDJUG6Y.js.map → chunk.6FBJHPH5.js.map} +1 -1
- package/dist/chunks/{chunk.S7WPODC5.js → chunk.6HHHEQL2.js} +2 -2
- package/dist/chunks/{chunk.NG4FGTJV.js → chunk.6K5JDD4E.js} +2 -2
- package/dist/chunks/{chunk.DMS25RNS.js → chunk.7GDRQYV4.js} +2 -2
- package/dist/chunks/{chunk.W3KWWIOY.js → chunk.7JAGIORC.js} +2 -2
- package/dist/chunks/{chunk.GLLSMQ3B.js → chunk.7KHURS47.js} +5 -3
- package/dist/chunks/{chunk.GLLSMQ3B.js.map → chunk.7KHURS47.js.map} +1 -1
- package/dist/chunks/{chunk.LKK53ROU.js → chunk.7T2JCP5U.js} +12 -10
- package/dist/chunks/{chunk.LKK53ROU.js.map → chunk.7T2JCP5U.js.map} +1 -1
- package/dist/chunks/{chunk.LGJBHX6A.js → chunk.A4LXD7RK.js} +6 -4
- package/dist/chunks/{chunk.LGJBHX6A.js.map → chunk.A4LXD7RK.js.map} +1 -1
- package/dist/chunks/{chunk.QHXZDWJ6.js → chunk.AHZOH7NS.js} +2 -2
- package/dist/chunks/{chunk.JHWCBSRQ.js → chunk.AIYNTCBR.js} +5 -3
- package/dist/chunks/{chunk.JHWCBSRQ.js.map → chunk.AIYNTCBR.js.map} +1 -1
- package/dist/chunks/{chunk.BBNQVEPD.js → chunk.AMIQC3O7.js} +8 -2
- package/dist/chunks/chunk.AMIQC3O7.js.map +7 -0
- package/dist/chunks/{chunk.IR4XTCB5.js → chunk.AOYLQDC7.js} +2 -2
- package/dist/chunks/{chunk.UYC7HFUR.js → chunk.B6ORTU2I.js} +5 -3
- package/dist/chunks/{chunk.UYC7HFUR.js.map → chunk.B6ORTU2I.js.map} +1 -1
- package/dist/chunks/{chunk.DSY3ZF3J.js → chunk.BJMYDPMI.js} +2 -2
- package/dist/chunks/{chunk.CUP2GDTO.js → chunk.BUGMDNEC.js} +2 -2
- package/dist/chunks/{chunk.RJ2FFIQS.js → chunk.C63XSKGJ.js} +9 -7
- package/dist/chunks/{chunk.RJ2FFIQS.js.map → chunk.C63XSKGJ.js.map} +1 -1
- package/dist/chunks/{chunk.C4GXUMW4.js → chunk.CBX6NOJC.js} +2 -2
- package/dist/chunks/{chunk.NEF5MMN5.js → chunk.CEHNUDZV.js} +5 -3
- package/dist/chunks/{chunk.NEF5MMN5.js.map → chunk.CEHNUDZV.js.map} +1 -1
- package/dist/chunks/{chunk.4QIBC54B.js → chunk.D3BR2E23.js} +9 -7
- package/dist/chunks/{chunk.4QIBC54B.js.map → chunk.D3BR2E23.js.map} +1 -1
- package/dist/chunks/{chunk.EWWPH2HQ.js → chunk.DUTZXAX3.js} +2 -2
- package/dist/chunks/{chunk.FMP3QKPO.js → chunk.DVJ5ESOK.js} +2 -2
- package/dist/chunks/{chunk.VHDQ5336.js → chunk.E3ZZVSK2.js} +5 -3
- package/dist/chunks/{chunk.VHDQ5336.js.map → chunk.E3ZZVSK2.js.map} +1 -1
- package/dist/chunks/{chunk.PYXGDZO2.js → chunk.EL6YEL4Z.js} +6 -4
- package/dist/chunks/{chunk.PYXGDZO2.js.map → chunk.EL6YEL4Z.js.map} +1 -1
- package/dist/chunks/{chunk.GQIUTJM5.js → chunk.F7DPSZNS.js} +2 -2
- package/dist/chunks/{chunk.AVXZX623.js → chunk.FJAWKC4Q.js} +2 -2
- package/dist/chunks/{chunk.GFW6NZQB.js → chunk.FW2KAIBS.js} +2 -2
- package/dist/chunks/{chunk.QAYEUQYU.js → chunk.GE4N3DEH.js} +2 -2
- package/dist/chunks/{chunk.YCXG7KSZ.js → chunk.GJKBCEE2.js} +11 -9
- package/dist/chunks/{chunk.YCXG7KSZ.js.map → chunk.GJKBCEE2.js.map} +1 -1
- package/dist/chunks/{chunk.NE2ORRAH.js → chunk.H44EMWNO.js} +9 -7
- package/dist/chunks/{chunk.NE2ORRAH.js.map → chunk.H44EMWNO.js.map} +1 -1
- package/dist/chunks/{chunk.543GQUFN.js → chunk.HA5UYBEI.js} +2 -2
- package/dist/chunks/{chunk.UGTJCM2I.js → chunk.HNJ7JOOE.js} +3 -3
- package/dist/chunks/{chunk.NMDEJANS.js → chunk.HRCFYO6D.js} +2 -2
- package/dist/chunks/{chunk.PYNYDLMG.js → chunk.IDTO73ND.js} +11 -9
- package/dist/chunks/{chunk.PYNYDLMG.js.map → chunk.IDTO73ND.js.map} +1 -1
- package/dist/chunks/{chunk.T2266GEL.js → chunk.IU2XW7CB.js} +9 -7
- package/dist/chunks/{chunk.T2266GEL.js.map → chunk.IU2XW7CB.js.map} +1 -1
- package/dist/chunks/{chunk.J7WHKDJL.js → chunk.J6AGKJUK.js} +7 -5
- package/dist/chunks/{chunk.J7WHKDJL.js.map → chunk.J6AGKJUK.js.map} +1 -1
- package/dist/chunks/{chunk.542NKF5M.js → chunk.JAKZ77B7.js} +2 -2
- package/dist/chunks/{chunk.FVTRWUGA.js → chunk.JGNDU3BQ.js} +2 -2
- package/dist/chunks/{chunk.U4M2MZGL.js → chunk.JHRKJLEP.js} +2 -2
- package/dist/chunks/{chunk.WKVPIQN6.js → chunk.JSAB4Y6I.js} +5 -3
- package/dist/chunks/{chunk.WKVPIQN6.js.map → chunk.JSAB4Y6I.js.map} +1 -1
- package/dist/chunks/{chunk.KDBAMJ7H.js → chunk.KFN7XYP3.js} +2 -2
- package/dist/chunks/{chunk.HL5G5I73.js → chunk.KJGQ4ZXQ.js} +2 -2
- package/dist/chunks/{chunk.NABDH7AM.js → chunk.LBRFK4LI.js} +2 -2
- package/dist/chunks/{chunk.ZULYG2RD.js → chunk.LFFBRQZW.js} +6 -4
- package/dist/chunks/{chunk.ZULYG2RD.js.map → chunk.LFFBRQZW.js.map} +1 -1
- package/dist/chunks/{chunk.BEWDGV6L.js → chunk.LRPIQZUE.js} +9 -7
- package/dist/chunks/{chunk.BEWDGV6L.js.map → chunk.LRPIQZUE.js.map} +1 -1
- package/dist/chunks/{chunk.AINKZEUX.js → chunk.LUXDS4EY.js} +6 -4
- package/dist/chunks/chunk.LUXDS4EY.js.map +7 -0
- package/dist/chunks/chunk.M53SBVYB.js +289 -0
- package/dist/chunks/chunk.M53SBVYB.js.map +7 -0
- package/dist/chunks/{chunk.76F2JPAB.js → chunk.MPLBBUS4.js} +2 -2
- package/dist/chunks/chunk.MVM3NN6Y.js +14 -0
- package/dist/chunks/chunk.MVM3NN6Y.js.map +7 -0
- package/dist/chunks/{chunk.P6ZEPHHU.js → chunk.NB5A7N4Y.js} +2 -2
- package/dist/chunks/{chunk.RGRP4UPT.js → chunk.NERVPV5E.js} +14 -12
- package/dist/chunks/{chunk.RGRP4UPT.js.map → chunk.NERVPV5E.js.map} +1 -1
- package/dist/chunks/chunk.NLYVOJGK.js +23 -0
- package/dist/chunks/chunk.NLYVOJGK.js.map +7 -0
- package/dist/chunks/{chunk.R4526FJB.js → chunk.OI2YSFSJ.js} +2 -2
- package/dist/chunks/{chunk.NAL5K4VA.js → chunk.OTWB4YCK.js} +2 -2
- package/dist/chunks/{chunk.KKGBDRNO.js → chunk.OVKKA5PU.js} +5 -3
- package/dist/chunks/{chunk.KKGBDRNO.js.map → chunk.OVKKA5PU.js.map} +1 -1
- package/dist/chunks/{chunk.4XBZOW3G.js → chunk.QNDW2KU7.js} +8 -6
- package/dist/chunks/{chunk.4XBZOW3G.js.map → chunk.QNDW2KU7.js.map} +1 -1
- package/dist/chunks/{chunk.C7OU636Z.js → chunk.R76M6KAF.js} +7 -5
- package/dist/chunks/{chunk.C7OU636Z.js.map → chunk.R76M6KAF.js.map} +1 -1
- package/dist/chunks/{chunk.LIC7AOOH.js → chunk.RCLQ6KWO.js} +5 -3
- package/dist/chunks/{chunk.LIC7AOOH.js.map → chunk.RCLQ6KWO.js.map} +1 -1
- package/dist/chunks/{chunk.L7GQX3OV.js → chunk.RHPPIKE6.js} +3 -23
- package/dist/chunks/{chunk.L7GQX3OV.js.map → chunk.RHPPIKE6.js.map} +3 -3
- package/dist/chunks/{chunk.EFY4HIY5.js → chunk.RICGHU7R.js} +2 -2
- package/dist/chunks/{chunk.ETUGGGA3.js → chunk.RTNMPZXS.js} +9 -7
- package/dist/chunks/{chunk.ETUGGGA3.js.map → chunk.RTNMPZXS.js.map} +1 -1
- package/dist/chunks/{chunk.ILW7HGXV.js → chunk.S2HGI6BM.js} +9 -7
- package/dist/chunks/{chunk.ILW7HGXV.js.map → chunk.S2HGI6BM.js.map} +1 -1
- package/dist/chunks/{chunk.KVTBTAR7.js → chunk.S6ITAIH6.js} +11 -9
- package/dist/chunks/{chunk.KVTBTAR7.js.map → chunk.S6ITAIH6.js.map} +1 -1
- package/dist/chunks/{chunk.733QK4CG.js → chunk.SCLHFDHD.js} +5 -3
- package/dist/chunks/{chunk.733QK4CG.js.map → chunk.SCLHFDHD.js.map} +1 -1
- package/dist/chunks/{chunk.BSJZ6U76.js → chunk.SILUTMTL.js} +2 -2
- package/dist/chunks/{chunk.KB4LHFCJ.js → chunk.SOEUVX7Q.js} +6 -4
- package/dist/chunks/{chunk.KB4LHFCJ.js.map → chunk.SOEUVX7Q.js.map} +1 -1
- package/dist/chunks/{chunk.M6ZU4ROZ.js → chunk.SVBD2JZ2.js} +5 -3
- package/dist/chunks/{chunk.M6ZU4ROZ.js.map → chunk.SVBD2JZ2.js.map} +1 -1
- package/dist/chunks/chunk.SWC5FQRY.js +12 -0
- package/dist/chunks/chunk.SWC5FQRY.js.map +7 -0
- package/dist/chunks/{chunk.GB7MKJKF.js → chunk.THXJYLZH.js} +6 -4
- package/dist/chunks/{chunk.GB7MKJKF.js.map → chunk.THXJYLZH.js.map} +1 -1
- package/dist/chunks/{chunk.A5UWHPQ3.js → chunk.TJTS3RJ6.js} +8 -6
- package/dist/chunks/{chunk.A5UWHPQ3.js.map → chunk.TJTS3RJ6.js.map} +1 -1
- package/dist/chunks/{chunk.A4GBTCHA.js → chunk.TUI5HJJF.js} +2 -2
- package/dist/chunks/{chunk.V3Y6BG3X.js → chunk.U7JCACM5.js} +2 -2
- package/dist/chunks/{chunk.GJ4TX4CQ.js → chunk.UAYDJJOS.js} +2 -2
- package/dist/chunks/{chunk.DRLBTO2U.js → chunk.UTJJJQMA.js} +2 -2
- package/dist/chunks/{chunk.Q72AFOXT.js → chunk.V5QBVSUE.js} +5 -3
- package/dist/chunks/{chunk.Q72AFOXT.js.map → chunk.V5QBVSUE.js.map} +1 -1
- package/dist/chunks/{chunk.YH3O4D2Y.js → chunk.VYWKS5N3.js} +2 -2
- package/dist/chunks/{chunk.BTV2TDGA.js → chunk.WAN4H4BO.js} +2 -2
- package/dist/chunks/{chunk.GCB4Y6VR.js → chunk.WRQHSCDL.js} +2 -2
- package/dist/chunks/{chunk.QHIYAAOK.js → chunk.X6UQBEJW.js} +6 -4
- package/dist/chunks/{chunk.QHIYAAOK.js.map → chunk.X6UQBEJW.js.map} +1 -1
- package/dist/chunks/{chunk.JGKF4SHV.js → chunk.XHX52IKN.js} +11 -9
- package/dist/chunks/{chunk.JGKF4SHV.js.map → chunk.XHX52IKN.js.map} +1 -1
- package/dist/chunks/{chunk.CTJCCRDS.js → chunk.XY3F3BWV.js} +2 -2
- package/dist/chunks/{chunk.IFXH7TS2.js → chunk.YB4KKBGA.js} +2 -2
- package/dist/chunks/{chunk.W5R6JVI6.js → chunk.YDFXKQKE.js} +10 -8
- package/dist/chunks/{chunk.W5R6JVI6.js.map → chunk.YDFXKQKE.js.map} +1 -1
- package/dist/chunks/{chunk.WW4R4RVW.js → chunk.YR33QXK4.js} +9 -7
- package/dist/chunks/{chunk.WW4R4RVW.js.map → chunk.YR33QXK4.js.map} +1 -1
- package/dist/chunks/chunk.YXVEHDZY.js +36 -0
- package/dist/chunks/chunk.YXVEHDZY.js.map +7 -0
- package/dist/chunks/{chunk.PELVVM7V.js → chunk.ZU7ZBKHI.js} +2 -2
- package/dist/components/accordion/accordion.component.js +4 -3
- package/dist/components/accordion/accordion.js +5 -4
- package/dist/components/alert/alert.component.js +11 -10
- package/dist/components/alert/alert.js +12 -11
- package/dist/components/badge/badge.component.js +5 -4
- package/dist/components/badge/badge.js +6 -5
- package/dist/components/breadcrumb/breadcrumb.component.js +10 -9
- package/dist/components/breadcrumb/breadcrumb.js +11 -10
- package/dist/components/breadcrumb-item/breadcrumb-item.component.js +3 -2
- package/dist/components/breadcrumb-item/breadcrumb-item.js +4 -3
- package/dist/components/button/button.component.js +10 -9
- package/dist/components/button/button.js +11 -10
- package/dist/components/button-group/button-group.component.js +3 -2
- package/dist/components/button-group/button-group.js +4 -3
- package/dist/components/card/card.component.js +3 -2
- package/dist/components/card/card.js +4 -3
- package/dist/components/checkbox/checkbox.component.js +7 -6
- package/dist/components/checkbox/checkbox.js +8 -7
- package/dist/components/combobox/combobox.component.js +10 -9
- package/dist/components/combobox/combobox.js +11 -10
- package/dist/components/details/details.component.js +8 -7
- package/dist/components/details/details.js +9 -8
- package/dist/components/dialog/dialog.component.js +9 -8
- package/dist/components/dialog/dialog.js +10 -9
- package/dist/components/divider/divider.component.js +3 -2
- package/dist/components/divider/divider.js +4 -3
- package/dist/components/drawer/drawer.component.js +9 -8
- package/dist/components/drawer/drawer.js +10 -9
- package/dist/components/dropdown/dropdown.component.js +5 -4
- package/dist/components/dropdown/dropdown.js +6 -5
- package/dist/components/file/file.component.js +11 -10
- package/dist/components/file/file.js +12 -11
- package/dist/components/header/header.component.js +9 -8
- package/dist/components/header/header.js +10 -9
- package/dist/components/icon/icon.component.js +5 -4
- package/dist/components/icon/icon.js +6 -5
- package/dist/components/icon/library.js +2 -2
- package/dist/components/icon/library.system.js +1 -1
- package/dist/components/icon-button/icon-button.component.js +6 -5
- package/dist/components/icon-button/icon-button.js +7 -6
- package/dist/components/input/input.component.js +10 -9
- package/dist/components/input/input.js +11 -10
- package/dist/components/menu/menu.component.js +3 -2
- package/dist/components/menu/menu.js +4 -3
- package/dist/components/menu-item/menu-item.component.js +10 -9
- package/dist/components/menu-item/menu-item.js +11 -10
- package/dist/components/menu-label/menu-label.component.js +4 -3
- package/dist/components/menu-label/menu-label.js +5 -4
- package/dist/components/nav-item/nav-item.component.js +4 -3
- package/dist/components/nav-item/nav-item.js +5 -4
- package/dist/components/optgroup/optgroup.component.js +4 -3
- package/dist/components/optgroup/optgroup.js +5 -4
- package/dist/components/option/option.component.js +8 -7
- package/dist/components/option/option.js +9 -8
- package/dist/components/popup/popup.component.js +3 -2
- package/dist/components/popup/popup.js +4 -3
- package/dist/components/prio-nav/prio-nav.component.js +13 -12
- package/dist/components/prio-nav/prio-nav.js +14 -13
- package/dist/components/progress-bar/progress-bar.component.js +3 -2
- package/dist/components/progress-bar/progress-bar.js +4 -3
- package/dist/components/progress-ring/progress-ring.component.js +3 -2
- package/dist/components/progress-ring/progress-ring.js +4 -3
- package/dist/components/radio/radio.component.js +6 -5
- package/dist/components/radio/radio.js +7 -6
- package/dist/components/radio-button/radio-button.component.js +3 -2
- package/dist/components/radio-button/radio-button.js +4 -3
- package/dist/components/radio-group/radio-group.component.js +5 -4
- package/dist/components/radio-group/radio-group.js +6 -5
- package/dist/components/range/range.component.js +7 -6
- package/dist/components/range/range.js +8 -7
- package/dist/components/range-tick/range-tick.component.js +3 -2
- package/dist/components/range-tick/range-tick.js +4 -3
- package/dist/components/resize-observer/resize-observer.component.js +3 -2
- package/dist/components/select/select.component.js +12 -11
- package/dist/components/select/select.js +13 -12
- package/dist/components/side-nav/side-nav.component.js +11 -10
- package/dist/components/side-nav/side-nav.js +12 -11
- package/dist/components/spinner/spinner.component.js +3 -2
- package/dist/components/spinner/spinner.js +4 -3
- package/dist/components/switch/switch.component.js +4 -3
- package/dist/components/switch/switch.js +5 -4
- package/dist/components/tab/tab.component.js +9 -8
- package/dist/components/tab/tab.js +10 -9
- package/dist/components/tab-group/tab-group.component.js +10 -9
- package/dist/components/tab-group/tab-group.js +11 -10
- package/dist/components/tab-panel/tab-panel.component.js +3 -2
- package/dist/components/tab-panel/tab-panel.js +4 -3
- package/dist/components/tag/tag.component.js +9 -8
- package/dist/components/tag/tag.js +10 -9
- package/dist/components/textarea/textarea.component.js +4 -3
- package/dist/components/textarea/textarea.js +5 -4
- package/dist/components/tooltip/tooltip.component.js +5 -4
- package/dist/components/tooltip/tooltip.js +6 -5
- package/dist/components/validate/utility.d.ts +27 -0
- package/dist/components/validate/utility.js +17 -0
- package/dist/components/validate/utility.js.map +7 -0
- package/dist/components/validate/validate.component.d.ts +126 -0
- package/dist/components/validate/validate.component.js +32 -0
- package/dist/components/validate/validate.component.js.map +7 -0
- package/dist/components/validate/validate.d.ts +8 -0
- package/dist/components/validate/validate.js +33 -0
- package/dist/components/validate/validate.js.map +7 -0
- package/dist/components/validate/validate.styles.d.ts +2 -0
- package/dist/components/validate/validate.styles.js +8 -0
- package/dist/components/validate/validate.styles.js.map +7 -0
- package/dist/custom-elements.json +407 -77
- package/dist/styles/fouc.css +2 -1
- package/dist/styles/index.css +3 -2
- package/dist/synergy.d.ts +1 -0
- package/dist/synergy.js +116 -108
- package/dist/utilities/form.js +2 -2
- package/dist/utilities/icon-library.js +2 -2
- package/dist/vscode.html-custom-data.json +60 -23
- package/package.json +4 -4
- package/dist/chunks/chunk.AINKZEUX.js.map +0 -7
- package/dist/chunks/chunk.BBNQVEPD.js.map +0 -7
- /package/dist/chunks/{chunk.TI5RKSNH.js.map → chunk.2RR6PD3H.js.map} +0 -0
- /package/dist/chunks/{chunk.OULRXKKF.js.map → chunk.2VWVV75N.js.map} +0 -0
- /package/dist/chunks/{chunk.IBHCGBFT.js.map → chunk.2XCTA3AO.js.map} +0 -0
- /package/dist/chunks/{chunk.BVTARVRR.js.map → chunk.2XJUCSO3.js.map} +0 -0
- /package/dist/chunks/{chunk.S5WQTT5P.js.map → chunk.3DLFZSF7.js.map} +0 -0
- /package/dist/chunks/{chunk.MJKQGREK.js.map → chunk.46LZSYUL.js.map} +0 -0
- /package/dist/chunks/{chunk.V433PDP3.js.map → chunk.4JYTX6L6.js.map} +0 -0
- /package/dist/chunks/{chunk.KALYMTPW.js.map → chunk.5MAFVQHL.js.map} +0 -0
- /package/dist/chunks/{chunk.S7WPODC5.js.map → chunk.6HHHEQL2.js.map} +0 -0
- /package/dist/chunks/{chunk.NG4FGTJV.js.map → chunk.6K5JDD4E.js.map} +0 -0
- /package/dist/chunks/{chunk.DMS25RNS.js.map → chunk.7GDRQYV4.js.map} +0 -0
- /package/dist/chunks/{chunk.W3KWWIOY.js.map → chunk.7JAGIORC.js.map} +0 -0
- /package/dist/chunks/{chunk.QHXZDWJ6.js.map → chunk.AHZOH7NS.js.map} +0 -0
- /package/dist/chunks/{chunk.IR4XTCB5.js.map → chunk.AOYLQDC7.js.map} +0 -0
- /package/dist/chunks/{chunk.DSY3ZF3J.js.map → chunk.BJMYDPMI.js.map} +0 -0
- /package/dist/chunks/{chunk.CUP2GDTO.js.map → chunk.BUGMDNEC.js.map} +0 -0
- /package/dist/chunks/{chunk.C4GXUMW4.js.map → chunk.CBX6NOJC.js.map} +0 -0
- /package/dist/chunks/{chunk.EWWPH2HQ.js.map → chunk.DUTZXAX3.js.map} +0 -0
- /package/dist/chunks/{chunk.FMP3QKPO.js.map → chunk.DVJ5ESOK.js.map} +0 -0
- /package/dist/chunks/{chunk.GQIUTJM5.js.map → chunk.F7DPSZNS.js.map} +0 -0
- /package/dist/chunks/{chunk.AVXZX623.js.map → chunk.FJAWKC4Q.js.map} +0 -0
- /package/dist/chunks/{chunk.GFW6NZQB.js.map → chunk.FW2KAIBS.js.map} +0 -0
- /package/dist/chunks/{chunk.QAYEUQYU.js.map → chunk.GE4N3DEH.js.map} +0 -0
- /package/dist/chunks/{chunk.543GQUFN.js.map → chunk.HA5UYBEI.js.map} +0 -0
- /package/dist/chunks/{chunk.UGTJCM2I.js.map → chunk.HNJ7JOOE.js.map} +0 -0
- /package/dist/chunks/{chunk.NMDEJANS.js.map → chunk.HRCFYO6D.js.map} +0 -0
- /package/dist/chunks/{chunk.542NKF5M.js.map → chunk.JAKZ77B7.js.map} +0 -0
- /package/dist/chunks/{chunk.FVTRWUGA.js.map → chunk.JGNDU3BQ.js.map} +0 -0
- /package/dist/chunks/{chunk.U4M2MZGL.js.map → chunk.JHRKJLEP.js.map} +0 -0
- /package/dist/chunks/{chunk.KDBAMJ7H.js.map → chunk.KFN7XYP3.js.map} +0 -0
- /package/dist/chunks/{chunk.HL5G5I73.js.map → chunk.KJGQ4ZXQ.js.map} +0 -0
- /package/dist/chunks/{chunk.NABDH7AM.js.map → chunk.LBRFK4LI.js.map} +0 -0
- /package/dist/chunks/{chunk.76F2JPAB.js.map → chunk.MPLBBUS4.js.map} +0 -0
- /package/dist/chunks/{chunk.P6ZEPHHU.js.map → chunk.NB5A7N4Y.js.map} +0 -0
- /package/dist/chunks/{chunk.R4526FJB.js.map → chunk.OI2YSFSJ.js.map} +0 -0
- /package/dist/chunks/{chunk.NAL5K4VA.js.map → chunk.OTWB4YCK.js.map} +0 -0
- /package/dist/chunks/{chunk.EFY4HIY5.js.map → chunk.RICGHU7R.js.map} +0 -0
- /package/dist/chunks/{chunk.BSJZ6U76.js.map → chunk.SILUTMTL.js.map} +0 -0
- /package/dist/chunks/{chunk.A4GBTCHA.js.map → chunk.TUI5HJJF.js.map} +0 -0
- /package/dist/chunks/{chunk.V3Y6BG3X.js.map → chunk.U7JCACM5.js.map} +0 -0
- /package/dist/chunks/{chunk.GJ4TX4CQ.js.map → chunk.UAYDJJOS.js.map} +0 -0
- /package/dist/chunks/{chunk.DRLBTO2U.js.map → chunk.UTJJJQMA.js.map} +0 -0
- /package/dist/chunks/{chunk.YH3O4D2Y.js.map → chunk.VYWKS5N3.js.map} +0 -0
- /package/dist/chunks/{chunk.BTV2TDGA.js.map → chunk.WAN4H4BO.js.map} +0 -0
- /package/dist/chunks/{chunk.GCB4Y6VR.js.map → chunk.WRQHSCDL.js.map} +0 -0
- /package/dist/chunks/{chunk.CTJCCRDS.js.map → chunk.XY3F3BWV.js.map} +0 -0
- /package/dist/chunks/{chunk.IFXH7TS2.js.map → chunk.YB4KKBGA.js.map} +0 -0
- /package/dist/chunks/{chunk.PELVVM7V.js.map → chunk.ZU7ZBKHI.js.map} +0 -0
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/drawer/drawer.component.ts", "../../src/internal/string.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * ---------------------------------------------------------------------\n * \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n * Removing this comment will prevent it from being managed by it.\n * ---------------------------------------------------------------------\n */\n\n/* eslint-disable */\nimport { animateTo, stopAnimations } from '../../internal/animate.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { getAnimation, setDefaultAnimation } from '../../utilities/animation-registry.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../../internal/scroll.js';\nimport { property, query } from 'lit/decorators.js';\nimport { uppercaseFirstLetter } from '../../internal/string.js';\nimport { waitForEvent } from '../../internal/event.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport Modal from '../../internal/modal.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIconButton from '../icon-button/icon-button.component.js';\nimport styles from './drawer.styles.js';\nimport customStyles from './drawer.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Drawers slide in from a container to expose additional options and information.\n * @documentation https://synergy.style/components/drawer\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<syn-icon-button>`.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event syn-show - Emitted when the drawer opens.\n * @event syn-after-show - Emitted after the drawer opens and all animations are complete.\n * @event syn-hide - Emitted when the drawer closes.\n * @event syn-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event syn-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} syn-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<syn-icon-button>`.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button, an `<syn-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.\n *\n * @property modal - Exposes the internal modal utility that controls focus trapping. To temporarily disable focus\n * trapping and allow third-party modals spawned from an active Synergy modal, call `modal.activateExternal()` when\n * the third-party modal opens. Upon closing, call `modal.deactivateExternal()` to restore Synergy's focus trapping.\n */\nexport default class SynDrawer extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles, customStyles];\n static dependencies = { 'syn-icon-button': SynIconButton };\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private readonly localize = new LocalizeController(this);\n private originalTrigger: HTMLElement | null;\n public modal = new Modal(this);\n private closeWatcher: CloseWatcher | null;\n\n @query('.drawer') drawer: HTMLElement;\n @query('.drawer__panel') panel: HTMLElement;\n @query('.drawer__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /** The direction from which the drawer will open. */\n @property({ reflect: true }) placement: 'top' | 'end' | 'bottom' | 'start' = 'end';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ attribute: 'no-header', type: Boolean, reflect: true }) noHeader = false;\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n this.closeWatcher?.destroy();\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n const slRequestClose = this.emit('syn-request-close', {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, 'drawer.denyClose', { dir: this.localize.dir() });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n if ('CloseWatcher' in window) {\n this.closeWatcher?.destroy();\n if (!this.contained) {\n this.closeWatcher = new CloseWatcher();\n this.closeWatcher.onclose = () => this.requestClose('keyboard');\n }\n } else {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n this.closeWatcher?.destroy();\n }\n\n private handleDocumentKeyDown = (event: KeyboardEvent) => {\n // Contained drawers aren't modal and don't response to the escape key\n if (this.contained) {\n return;\n }\n\n if (event.key === 'Escape' && this.modal.isActive() && this.open) {\n event.stopImmediatePropagation();\n this.requestClose('keyboard');\n }\n };\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('syn-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n // Related: https://github.com/synergy-design-system/synergy/issues/693\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit('syn-initial-focus', { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {\n dir: this.localize.dir()\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.show', { dir: this.localize.dir() });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit('syn-after-show');\n } else {\n // Hide\n this.emit('syn-hide');\n this.removeOpenListeners();\n\n if (!this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {\n dir: this.localize.dir()\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.hide', { dir: this.localize.dir() });\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('syn-after-hide');\n }\n }\n\n @watch('contained', { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'syn-after-show');\n }\n\n /** Hides the drawer */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'syn-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--top': this.placement === 'top',\n 'drawer--end': this.placement === 'end',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--start': this.placement === 'start',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--rtl': this.localize.dir() === 'rtl',\n 'drawer--has-footer': this.hasSlotController.test('footer')\n })}\n >\n <div part=\"overlay\" class=\"drawer__overlay\" @click=${() => this.requestClose('overlay')} tabindex=\"-1\"></div>\n\n <div\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer__header\">\n <h2 part=\"title\" class=\"drawer__title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\"> ${this.label.length > 0 ? this.label : String.fromCharCode(65279)} </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer__header-actions\">\n <slot name=\"header-actions\"></slot>\n <syn-icon-button\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"drawer__close\"\n name=\"x-lg\"\n label=${this.localize.term('close')}\n library=\"system\"\n @click=${() => this.requestClose('close-button')}\n ></syn-icon-button>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"drawer__body\"></slot>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation('drawer.showTop', {\n keyframes: [\n { opacity: 0, translate: '0 -100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideTop', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 -100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// End\nsetDefaultAnimation('drawer.showEnd', {\n keyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideEnd', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Bottom\nsetDefaultAnimation('drawer.showBottom', {\n keyframes: [\n { opacity: 0, translate: '0 100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideBottom', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Start\nsetDefaultAnimation('drawer.showStart', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideStart', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Deny close\nsetDefaultAnimation('drawer.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation('drawer.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('drawer.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n", "/**\n * ---------------------------------------------------------------------\n * \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n * Removing this comment will prevent it from being managed by it.\n * ---------------------------------------------------------------------\n */\n\n/* eslint-disable */\n/** Converts the first letter of a string to uppercase */\nexport function uppercaseFirstLetter(string: string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,SAAS,gBAAgB;AAGzB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAG1B,SAAS,UAAU,aAAa;;;ACPzB,SAAS,qBAAqB,QAAgB;AACnD,SAAO,OAAO,OAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC;AACxD;;;AD0EA,IAAqB,YAArB,cAAuC,eAAe;AAAA,EAAtD;AAAA;AAIE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,QAAQ;AACzE,SAAiB,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AAG,WAAW,QAAQ;AAAA,IACjC,EAAE,SAAS,GAAG,WAAW,IAAI;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,IACZ,EAAE,SAAS,GAAG,WAAW,OAAO;AAAA,IAChC,EAAE,SAAS,GAAG,WAAW,IAAI;AAAA,EAC/B;AAAA,EACA,SAAS,EAAE,UAAU,KAAK,QAAQ,OAAO;AAC3C,CAAC;AAED,oBAAoB,oBAAoB;AAAA,EACtC,WAAW;AAAA,IACT,EAAE,SAAS,GAAG,WAAW,IAAI;AAAA,IAC7B,EAAE,SAAS,GAAG,WAAW,QAAQ;AAAA,EACnC;AAAA,EACA,cAAc;AAAA,IACZ,EAAE,SAAS,GAAG,WAAW,IAAI;AAAA,IAC7B,EAAE,SAAS,GAAG,WAAW,OAAO;AAAA,EAClC;AAAA,EACA,SAAS,EAAE,UAAU,KAAK,QAAQ,OAAO;AAC3C,CAAC;AAGD,oBAAoB,oBAAoB;AAAA,EACtC,WAAW,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,KAAK,GAAG,EAAE,OAAO,EAAE,CAAC;AAAA,EACvD,SAAS,EAAE,UAAU,IAAI;AAC3B,CAAC;AAGD,oBAAoB,uBAAuB;AAAA,EACzC,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAAA,EAC1C,SAAS,EAAE,UAAU,IAAI;AAC3B,CAAC;AAED,oBAAoB,uBAAuB;AAAA,EACzC,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAAA,EAC1C,SAAS,EAAE,UAAU,IAAI;AAC3B,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,13 +3,15 @@ var icons = {
|
|
|
3
3
|
"add": `
|
|
4
4
|
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"/></svg>`,
|
|
5
5
|
"caret": `
|
|
6
|
-
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M16.59 8.
|
|
6
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M16.59 8.29501L12 12.875L7.41 8.29501L6 9.70501L12 15.705L18 9.70501L16.59 8.29501Z"/></svg>`,
|
|
7
7
|
"check": `
|
|
8
|
-
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M8.79496 15.875L4.62496 11.705L3.20496 13.115L8.79496 18.705L20.795 6.
|
|
8
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M8.79496 15.875L4.62496 11.705L3.20496 13.115L8.79496 18.705L20.795 6.70501L19.385 5.29501L8.79496 15.875Z"/></svg>`,
|
|
9
9
|
"chevron-down": `
|
|
10
|
-
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M16.59 8.
|
|
10
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M16.59 8.29501L12 12.875L7.41 8.29501L6 9.70501L12 15.705L18 9.70501L16.59 8.29501Z"/></svg>`,
|
|
11
11
|
"chevron-right": `
|
|
12
12
|
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M9.70504 6L8.29504 7.41L12.875 12L8.29504 16.59L9.70504 18L15.705 12L9.70504 6Z"/></svg>`,
|
|
13
|
+
"error": `
|
|
14
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z"/></svg>`,
|
|
13
15
|
"eye-slash": `
|
|
14
16
|
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill='currentColor'><path d="M12.005 6.5C14.765 6.5 17.005 8.74 17.005 11.5C17.005 12.15 16.875 12.76 16.645 13.33L19.565 16.25C21.075 14.99 22.265 13.36 22.995 11.5C21.265 7.11 16.995 4 11.995 4C10.595 4 9.255 4.25 8.01501 4.7L10.175 6.86C10.745 6.63 11.355 6.5 12.005 6.5ZM2.005 3.77L4.745 6.51C3.085 7.8 1.785 9.52 1.005 11.5C2.735 15.89 7.005 19 12.005 19C13.555 19 15.035 18.7 16.385 18.16L16.805 18.58L19.735 21.5L21.005 20.23L3.275 2.5L2.005 3.77ZM7.53501 9.3L9.085 10.85C9.035 11.06 9.005 11.28 9.005 11.5C9.005 13.16 10.345 14.5 12.005 14.5C12.225 14.5 12.445 14.47 12.655 14.42L14.205 15.97C13.535 16.3 12.795 16.5 12.005 16.5C9.245 16.5 7.005 14.26 7.005 11.5C7.005 10.71 7.20501 9.97 7.53501 9.3ZM11.845 8.52L14.995 11.67L15.015 11.51C15.015 9.85 13.675 8.51 12.015 8.51L11.845 8.52Z"/></svg>`,
|
|
15
17
|
"eye": `
|
|
@@ -47,4 +49,4 @@ var library_system_default = systemLibrary;
|
|
|
47
49
|
export {
|
|
48
50
|
library_system_default
|
|
49
51
|
};
|
|
50
|
-
//# sourceMappingURL=chunk.
|
|
52
|
+
//# sourceMappingURL=chunk.LUXDS4EY.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/icon/library.system.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable */\nimport type { IconLibrary } from './library.js';\n\n//\n// System icons are a separate library to ensure they're always available, regardless of how the default icon library is\n// configured or if its icons resolve properly.\n//\n// All Synergy components must use the system library instead of the default library. For visual consistency, system\n// icons are a subset of Bootstrap Icons.\n//\n// **Start system icons**\nconst icons = {\n\t'add': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z\"/></svg>`,\n\t'caret': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M16.59 8.29501L12 12.875L7.41 8.29501L6 9.70501L12 15.705L18 9.70501L16.59 8.29501Z\"/></svg>`,\n\t'check': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M8.79496 15.875L4.62496 11.705L3.20496 13.115L8.79496 18.705L20.795 6.70501L19.385 5.29501L8.79496 15.875Z\"/></svg>`,\n\t'chevron-down': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M16.59 8.29501L12 12.875L7.41 8.29501L6 9.70501L12 15.705L18 9.70501L16.59 8.29501Z\"/></svg>`,\n\t'chevron-right': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M9.70504 6L8.29504 7.41L12.875 12L8.29504 16.59L9.70504 18L15.705 12L9.70504 6Z\"/></svg>`,\n\t'error': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z\"/></svg>`,\n\t'eye-slash': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M12.005 6.5C14.765 6.5 17.005 8.74 17.005 11.5C17.005 12.15 16.875 12.76 16.645 13.33L19.565 16.25C21.075 14.99 22.265 13.36 22.995 11.5C21.265 7.11 16.995 4 11.995 4C10.595 4 9.255 4.25 8.01501 4.7L10.175 6.86C10.745 6.63 11.355 6.5 12.005 6.5ZM2.005 3.77L4.745 6.51C3.085 7.8 1.785 9.52 1.005 11.5C2.735 15.89 7.005 19 12.005 19C13.555 19 15.035 18.7 16.385 18.16L16.805 18.58L19.735 21.5L21.005 20.23L3.275 2.5L2.005 3.77ZM7.53501 9.3L9.085 10.85C9.035 11.06 9.005 11.28 9.005 11.5C9.005 13.16 10.345 14.5 12.005 14.5C12.225 14.5 12.445 14.47 12.655 14.42L14.205 15.97C13.535 16.3 12.795 16.5 12.005 16.5C9.245 16.5 7.005 14.26 7.005 11.5C7.005 10.71 7.20501 9.97 7.53501 9.3ZM11.845 8.52L14.995 11.67L15.015 11.51C15.015 9.85 13.675 8.51 12.015 8.51L11.845 8.52Z\"/></svg>`,\n\t'eye': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z\"/></svg>`,\n\t'indeterminate': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M19 13H5V11H19V13Z\"/></svg>`,\n\t'logo-color': `\n\t\t<svg width=\"295\" height=\"94\" viewBox=\"0 0 295 94\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><g clip-path=\"url(#clip0_9951_9907)\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M207.961 69.0591C200.132 83.8898 184.613 93.983 166.804 93.983C141.096 93.983 120.257 72.9431 120.257 46.9915C120.257 21.0399 141.096 0 166.804 0C184.439 0 199.775 9.89295 207.674 24.4885L188.602 34.7821C184.335 26.9182 176.088 21.6757 166.804 21.6757C153.262 21.6757 141.932 32.8139 141.932 46.9915C141.932 61.1691 153.262 72.3074 166.804 72.3074C176.279 72.3074 184.726 66.8558 188.907 58.7133L207.961 69.0591ZM111.078 1.66335H89.7768V91.8668H111.078V1.66335ZM26.0822 91.8669C13.9511 91.8669 0.592136 85.318 0.592136 70.1128C0.592136 70.1128 47.1743 70.1128 54.5941 70.1215C62.4927 68.5453 61.6132 58.5826 54.5941 57.2067H26.8746C12.1223 57.2067 0.444092 44.6141 0.444092 29.6092C0.444092 15.1791 11.234 1.67206 26.8746 1.67206H57.285C69.8254 1.67206 78.7778 11.0599 78.7778 22.9645H26.8746C19.8991 23.9573 19.4549 34.6602 26.8746 35.8707H54.5157C69.6773 36.28 81.7735 48.3501 81.7735 63.6336C81.7735 77.7154 69.8254 91.8669 54.5853 91.8669H26.0822ZM215.99 91.8668V1.66335H237.535V37.8388H245.826L268.224 1.66335H294.716L264.192 47.3399L294.272 91.8668H267.771L245.103 56.9193H237.535V91.8668H215.99Z\"/></g><defs><clipPath id=\"clip0_9951_9907\"><rect width=\"295\" height=\"94\"/></clipPath></defs></svg>`,\n\t'menu': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M3 18H21V16H3V18ZM3 13H21V11H3V13ZM3 6V8H21V6H3Z\"/></svg>`,\n\t'more-vert': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M12 8C13.1 8 14 7.1 14 6C14 4.9 13.1 4 12 4C10.9 4 10 4.9 10 6C10 7.1 10.9 8 12 8ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10ZM12 16C10.9 16 10 16.9 10 18C10 19.1 10.9 20 12 20C13.1 20 14 19.1 14 18C14 16.9 13.1 16 12 16Z\"/></svg>`,\n\t'more': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z\"/></svg>`,\n\t'radio': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z\"/></svg>`,\n\t'upload-file': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M14 2H6C4.9 2 4.01 2.9 4.01 4L4 20C4 21.1 4.89 22 5.99 22H18C19.1 22 20 21.1 20 20V8L14 2ZM18 20H6V4H13V9H18V20ZM8 15.01L9.41 16.42L11 14.84V19H13V14.84L14.59 16.43L16 15.01L12.01 11L8 15.01Z\"/></svg>`,\n\t'x-circle-fill': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M12 2C6.47 2 2 6.47 2 12C2 17.53 6.47 22 12 22C17.53 22 22 17.53 22 12C22 6.47 17.53 2 12 2ZM17 15.59L15.59 17L12 13.41L8.41 17L7 15.59L10.59 12L7 8.41L8.41 7L12 10.59L15.59 7L17 8.41L13.41 12L17 15.59Z\"/></svg>`,\n\t'x-lg': `\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill='currentColor'><path d=\"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z\"/></svg>`\n};\n// **End system icons**\n\nconst systemLibrary: IconLibrary = {\n name: 'system',\n resolver: (name: keyof typeof icons) => {\n if (name in icons) {\n return `data:image/svg+xml,${encodeURIComponent(icons[name])}`;\n }\n return '';\n }\n};\n\nexport default systemLibrary;\n"],
|
|
5
|
+
"mappings": ";AAWA,IAAM,QAAQ;AAAA,EACb,OAAO;AAAA;AAAA,EAEP,SAAS;AAAA;AAAA,EAET,SAAS;AAAA;AAAA,EAET,gBAAgB;AAAA;AAAA,EAEhB,iBAAiB;AAAA;AAAA,EAEjB,SAAS;AAAA;AAAA,EAET,aAAa;AAAA;AAAA,EAEb,OAAO;AAAA;AAAA,EAEP,iBAAiB;AAAA;AAAA,EAEjB,cAAc;AAAA;AAAA,EAEd,QAAQ;AAAA;AAAA,EAER,aAAa;AAAA;AAAA,EAEb,QAAQ;AAAA;AAAA,EAER,SAAS;AAAA;AAAA,EAET,eAAe;AAAA;AAAA,EAEf,iBAAiB;AAAA;AAAA,EAEjB,QAAQ;AAAA;AAET;AAGA,IAAM,gBAA6B;AAAA,EACjC,MAAM;AAAA,EACN,UAAU,CAAC,SAA6B;AACtC,QAAI,QAAQ,OAAO;AACjB,aAAO,sBAAsB,mBAAmB,MAAM,IAAI,CAAC,CAAC;AAAA,IAC9D;AACA,WAAO;AAAA,EACT;AACF;AAEA,IAAO,yBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getEventNameForElement,
|
|
3
|
+
isBlurEvent,
|
|
4
|
+
isInvalidEvent,
|
|
5
|
+
normalizeEventAttribute
|
|
6
|
+
} from "./chunk.YXVEHDZY.js";
|
|
7
|
+
import {
|
|
8
|
+
validate_styles_default
|
|
9
|
+
} from "./chunk.MVM3NN6Y.js";
|
|
10
|
+
import {
|
|
11
|
+
SynAlert
|
|
12
|
+
} from "./chunk.NERVPV5E.js";
|
|
13
|
+
import {
|
|
14
|
+
watch
|
|
15
|
+
} from "./chunk.74IOULXM.js";
|
|
16
|
+
import {
|
|
17
|
+
component_styles_default
|
|
18
|
+
} from "./chunk.NLYVOJGK.js";
|
|
19
|
+
import {
|
|
20
|
+
SynergyElement
|
|
21
|
+
} from "./chunk.RHPPIKE6.js";
|
|
22
|
+
import {
|
|
23
|
+
__decorateClass
|
|
24
|
+
} from "./chunk.2GFK6XTO.js";
|
|
25
|
+
|
|
26
|
+
// src/components/validate/validate.component.ts
|
|
27
|
+
import { html } from "lit";
|
|
28
|
+
import { property, queryAssignedElements, state } from "lit/decorators.js";
|
|
29
|
+
var SynValidate = class extends SynergyElement {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
this.controller = new AbortController();
|
|
33
|
+
this.validationMessage = "";
|
|
34
|
+
this.eagerFirstMount = true;
|
|
35
|
+
this.isInternalTriggeredInvalid = false;
|
|
36
|
+
this.isValid = true;
|
|
37
|
+
this.variant = "native";
|
|
38
|
+
this.hideIcon = false;
|
|
39
|
+
this.on = "";
|
|
40
|
+
this.customValidationMessage = "";
|
|
41
|
+
this.eager = false;
|
|
42
|
+
/**
|
|
43
|
+
* Set the validation message from the input element
|
|
44
|
+
* @param e The event that was received
|
|
45
|
+
*/
|
|
46
|
+
this.internalRevalidate = (e) => {
|
|
47
|
+
var _a;
|
|
48
|
+
const input = e.currentTarget;
|
|
49
|
+
if ((_a = input.validity) == null ? void 0 : _a.valid) {
|
|
50
|
+
this.validationMessage = "";
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Triggers a validation run, showing the validation message if needed.
|
|
55
|
+
*/
|
|
56
|
+
// eslint-disable-next-line complexity
|
|
57
|
+
this.validate = (e) => {
|
|
58
|
+
var _a;
|
|
59
|
+
if (isInvalidEvent(e.type) && this.variant === "native" && this.isInternalTriggeredInvalid === true) {
|
|
60
|
+
this.isInternalTriggeredInvalid = false;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (isInvalidEvent(e.type) && this.variant !== "native") {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
}
|
|
67
|
+
const input = e.currentTarget;
|
|
68
|
+
this.isValid = (_a = input.validity) == null ? void 0 : _a.valid;
|
|
69
|
+
if (this.eager && this.eagerFirstMount) {
|
|
70
|
+
this.eagerFirstMount = false;
|
|
71
|
+
this.setValidationMessage(input);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (!this.isValid && !isBlurEvent(e.type)) {
|
|
75
|
+
this.handleFocus(input);
|
|
76
|
+
}
|
|
77
|
+
this.setValidationMessage(input);
|
|
78
|
+
if (!isBlurEvent(e.type) && this.variant === "native") {
|
|
79
|
+
this.updateComplete.then(() => {
|
|
80
|
+
this.isInternalTriggeredInvalid = true;
|
|
81
|
+
input.reportValidity();
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
handleListenerChange() {
|
|
87
|
+
this.updateEvents();
|
|
88
|
+
}
|
|
89
|
+
async handleEagerChange() {
|
|
90
|
+
if (this.eager) {
|
|
91
|
+
const input = this.getInput();
|
|
92
|
+
await this.updateComplete;
|
|
93
|
+
input == null ? void 0 : input.reportValidity();
|
|
94
|
+
this.eagerFirstMount = true;
|
|
95
|
+
} else {
|
|
96
|
+
this.eagerFirstMount = false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
handleCustomValidationMessageChange() {
|
|
100
|
+
const input = this.getInput();
|
|
101
|
+
if (input) {
|
|
102
|
+
this.setCustomValidationMessage(input);
|
|
103
|
+
this.setValidationMessage(input);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Returns the validity state of the input component.
|
|
108
|
+
* `true` for valid and `false` for invalid.
|
|
109
|
+
*/
|
|
110
|
+
getValidity() {
|
|
111
|
+
return this.isValid;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Get the input element to validate. Defined as the first slotted element
|
|
115
|
+
* @returns The input element or undefined if not found
|
|
116
|
+
*/
|
|
117
|
+
getInput() {
|
|
118
|
+
const input = this.slottedChildren[0];
|
|
119
|
+
return input ? input : void 0;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get the event names to listen for.
|
|
123
|
+
* If the input is a synergy element, will use syn- prefixes.
|
|
124
|
+
* @returns The event names to listen for
|
|
125
|
+
*/
|
|
126
|
+
// eslint-disable-next-line complexity
|
|
127
|
+
getUsedEventNames() {
|
|
128
|
+
const input = this.getInput();
|
|
129
|
+
if (!input) {
|
|
130
|
+
return [];
|
|
131
|
+
}
|
|
132
|
+
const on = normalizeEventAttribute(this.on);
|
|
133
|
+
const [...events] = on.filter(Boolean);
|
|
134
|
+
if (!events.includes("invalid")) {
|
|
135
|
+
events.push("invalid");
|
|
136
|
+
}
|
|
137
|
+
if (events.includes("live")) {
|
|
138
|
+
events.push("input");
|
|
139
|
+
events.push("blur");
|
|
140
|
+
}
|
|
141
|
+
return Array.from(new Set(
|
|
142
|
+
events.filter((e) => e !== "live").map((e) => getEventNameForElement(input, e))
|
|
143
|
+
));
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Update the events on the input element.
|
|
147
|
+
*/
|
|
148
|
+
updateEvents() {
|
|
149
|
+
this.controller.abort();
|
|
150
|
+
this.controller = new AbortController();
|
|
151
|
+
const input = this.getInput();
|
|
152
|
+
if (!input) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const events = this.getUsedEventNames();
|
|
156
|
+
events.forEach((eventName) => {
|
|
157
|
+
input.addEventListener(eventName, this.validate, {
|
|
158
|
+
capture: isInvalidEvent(eventName),
|
|
159
|
+
signal: this.controller.signal
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
const usedChangeEvent = getEventNameForElement(input, "change");
|
|
163
|
+
if (!events.includes(usedChangeEvent)) {
|
|
164
|
+
input.addEventListener(usedChangeEvent, this.internalRevalidate, {
|
|
165
|
+
signal: this.controller.signal
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
setValidationMessage(input) {
|
|
170
|
+
const { customValidationMessage } = this;
|
|
171
|
+
const validationMessage = customValidationMessage || input.validationMessage;
|
|
172
|
+
this.validationMessage = validationMessage;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Set the custom validation message to the input. This will make sure to either:
|
|
176
|
+
* - use the custom message if one is set or
|
|
177
|
+
* - use the default message if the custom message is empty
|
|
178
|
+
*/
|
|
179
|
+
setCustomValidationMessage(input) {
|
|
180
|
+
input.setCustomValidity(this.customValidationMessage);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Handle the blur event during validation
|
|
184
|
+
*/
|
|
185
|
+
// eslint-disable-next-line class-methods-use-this
|
|
186
|
+
handleFocus(input) {
|
|
187
|
+
var _a;
|
|
188
|
+
const activeElement = document.activeElement;
|
|
189
|
+
const activeElementIsWrapped = activeElement.closest("syn-validate");
|
|
190
|
+
if (!((_a = activeElement.validity) == null ? void 0 : _a.valid) && activeElementIsWrapped) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
input.scrollIntoView({ block: "nearest" });
|
|
194
|
+
input.focus();
|
|
195
|
+
}
|
|
196
|
+
async firstUpdated() {
|
|
197
|
+
var _a, _b;
|
|
198
|
+
this.updateEvents();
|
|
199
|
+
if (this.eager) {
|
|
200
|
+
const input = this.getInput();
|
|
201
|
+
await this.updateComplete;
|
|
202
|
+
this.isValid = (_b = (_a = input == null ? void 0 : input.validity) == null ? void 0 : _a.valid) != null ? _b : false;
|
|
203
|
+
input == null ? void 0 : input.reportValidity();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
disconnectedCallback() {
|
|
207
|
+
super.disconnectedCallback();
|
|
208
|
+
this.controller.abort();
|
|
209
|
+
}
|
|
210
|
+
renderInlineValidation() {
|
|
211
|
+
if (this.variant !== "inline" || !this.validationMessage) {
|
|
212
|
+
return "";
|
|
213
|
+
}
|
|
214
|
+
return html`
|
|
215
|
+
<syn-alert
|
|
216
|
+
open
|
|
217
|
+
exportparts="base:alert__base,message:alert__message,icon:alert__icon"
|
|
218
|
+
part="alert"
|
|
219
|
+
variant="danger"
|
|
220
|
+
>
|
|
221
|
+
${!this.hideIcon ? html`<syn-icon slot="icon" name="error" library="system"></syn-icon>` : ""}
|
|
222
|
+
${this.validationMessage}
|
|
223
|
+
</syn-alert>
|
|
224
|
+
`;
|
|
225
|
+
}
|
|
226
|
+
render() {
|
|
227
|
+
return html`
|
|
228
|
+
<div
|
|
229
|
+
class="validate"
|
|
230
|
+
part="base"
|
|
231
|
+
>
|
|
232
|
+
<slot
|
|
233
|
+
class="validate__input-wrapper"
|
|
234
|
+
part="input-wrapper"
|
|
235
|
+
></slot>
|
|
236
|
+
|
|
237
|
+
${this.renderInlineValidation()}
|
|
238
|
+
</div>
|
|
239
|
+
`;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
SynValidate.styles = [component_styles_default, validate_styles_default];
|
|
243
|
+
SynValidate.dependencies = {
|
|
244
|
+
"syn-alert": SynAlert
|
|
245
|
+
};
|
|
246
|
+
__decorateClass([
|
|
247
|
+
queryAssignedElements()
|
|
248
|
+
], SynValidate.prototype, "slottedChildren", 2);
|
|
249
|
+
__decorateClass([
|
|
250
|
+
state()
|
|
251
|
+
], SynValidate.prototype, "validationMessage", 2);
|
|
252
|
+
__decorateClass([
|
|
253
|
+
state()
|
|
254
|
+
], SynValidate.prototype, "eagerFirstMount", 2);
|
|
255
|
+
__decorateClass([
|
|
256
|
+
state()
|
|
257
|
+
], SynValidate.prototype, "isInternalTriggeredInvalid", 2);
|
|
258
|
+
__decorateClass([
|
|
259
|
+
state()
|
|
260
|
+
], SynValidate.prototype, "isValid", 2);
|
|
261
|
+
__decorateClass([
|
|
262
|
+
property({ reflect: true })
|
|
263
|
+
], SynValidate.prototype, "variant", 2);
|
|
264
|
+
__decorateClass([
|
|
265
|
+
property({ attribute: "hide-icon", reflect: true, type: Boolean })
|
|
266
|
+
], SynValidate.prototype, "hideIcon", 2);
|
|
267
|
+
__decorateClass([
|
|
268
|
+
property({ reflect: true })
|
|
269
|
+
], SynValidate.prototype, "on", 2);
|
|
270
|
+
__decorateClass([
|
|
271
|
+
property({ attribute: "custom-validation-message", type: String })
|
|
272
|
+
], SynValidate.prototype, "customValidationMessage", 2);
|
|
273
|
+
__decorateClass([
|
|
274
|
+
property({ type: Boolean })
|
|
275
|
+
], SynValidate.prototype, "eager", 2);
|
|
276
|
+
__decorateClass([
|
|
277
|
+
watch("on", { waitUntilFirstUpdate: true })
|
|
278
|
+
], SynValidate.prototype, "handleListenerChange", 1);
|
|
279
|
+
__decorateClass([
|
|
280
|
+
watch("eager", { waitUntilFirstUpdate: false })
|
|
281
|
+
], SynValidate.prototype, "handleEagerChange", 1);
|
|
282
|
+
__decorateClass([
|
|
283
|
+
watch("customValidationMessage", { waitUntilFirstUpdate: true })
|
|
284
|
+
], SynValidate.prototype, "handleCustomValidationMessageChange", 1);
|
|
285
|
+
|
|
286
|
+
export {
|
|
287
|
+
SynValidate
|
|
288
|
+
};
|
|
289
|
+
//# sourceMappingURL=chunk.M53SBVYB.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/validate/validate.component.ts"],
|
|
4
|
+
"sourcesContent": ["import type { CSSResultGroup } from 'lit';\nimport { html } from 'lit';\nimport { property, queryAssignedElements, state } from 'lit/decorators.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport { watch } from '../../internal/watch.js';\nimport SynAlert from '../alert/alert.component.js';\nimport {\n getEventNameForElement,\n isBlurEvent,\n isInvalidEvent,\n normalizeEventAttribute,\n} from './utility.js';\nimport styles from './validate.styles.js';\n\n/**\n * @summary Validate provides form field validation messages in a unified way.\n * It does this by using [the native browser validation](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation)\n * and showing the validation message in a consistent, user defined way.\n *\n * @dependency syn-alert\n *\n * @slot - The form field that should be validated.\n * Avoid slotting in more than one element, as subsequent ones will be ignored.\n *\n * @csspart base - The component's base wrapper.\n * @csspart input-wrapper - The container that wraps the form field.\n * @csspart alert - The syn-alert that is shown when the variant is set to \"inline\".\n * @csspart alert__base - The container that wraps the alert.\n * @csspart alert__message - The container that wraps the alert message.\n * @csspart alert__icon - The container that wraps the alert icon.\n */\nexport default class SynValidate extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles];\n\n static dependencies = {\n 'syn-alert': SynAlert,\n };\n\n controller = new AbortController();\n\n @queryAssignedElements() private slottedChildren: HTMLElement[];\n\n @state() validationMessage = '';\n\n @state() eagerFirstMount = true;\n\n @state() isInternalTriggeredInvalid = false;\n\n @state() isValid = true;\n\n /**\n * The variant that should be used to show validation alerts.\n *\n * The following variants are supported:\n * - **native** (default): Uses the native browser validation, usually a browser tooltip.\n * - **inline**: Show the validation message underneath the element, using a `<syn-alert>`\n */\n @property({ reflect: true }) variant: 'native' | 'inline' = 'native';\n\n /** Do not show the error icon when using the inline variant validation */\n @property({ attribute: 'hide-icon', reflect: true, type: Boolean }) hideIcon = false;\n\n /**\n * Defines the events that trigger the validation.\n * `invalid` will always automatically be included.\n * You may also use the `live` keyword to validate on every input change.\n * `live` will make sure to listen to the `invalid`, `input` and `blur` events.\n *\n * Please have a look at the [documentation for native form validation](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation)\n * and [the use of form invalid events](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) for further information.\n *\n * @example ```html\n * <!-- Validate on invalid and change events (invalid, change) -->\n * <syn-validate on=\"invalid change\"></syn-validate>\n *\n * <!-- Validate on live events (invalid, blur, input)-->\n * <syn-validate on=\"live\"></syn-validate>\n *\n * <!-- Validate on live and custom events (invalid, blur, input, focus, change) -->\n * <syn-validate on=\"live focus change\"></syn-validate>\n * ```\n */\n @property({ reflect: true }) on: string = '';\n\n /**\n * Custom validation message to be displayed when the input is invalid.\n * Will override the default browser validation message.\n * Set to an empty string to reset the validation message.\n */\n @property({ attribute: 'custom-validation-message', type: String }) customValidationMessage = '';\n\n /**\n * Set this to true to validate the input immediately when it is rendered.\n * Best used with a `variant` of `inline`.\n * When setting eager, the input will not be focused automatically.\n *\n * When using a `variant` of `native` the browser will focus\n * the last eager field as it is using a tooltip.\n * In this case it is better to just provide one eager field.\n */\n @property({ type: Boolean }) eager = false;\n\n // Automatically refresh all event listeners when the on property changes.\n @watch('on', { waitUntilFirstUpdate: true })\n handleListenerChange() {\n this.updateEvents();\n }\n\n @watch('eager', { waitUntilFirstUpdate: false })\n async handleEagerChange() {\n if (this.eager) {\n const input = this.getInput();\n await this.updateComplete;\n input?.reportValidity();\n this.eagerFirstMount = true;\n } else {\n this.eagerFirstMount = false;\n }\n }\n\n // Synchronize the validation message on the wrapped input with the custom message\n @watch('customValidationMessage', { waitUntilFirstUpdate: true })\n handleCustomValidationMessageChange() {\n const input = this.getInput();\n if (input) {\n this.setCustomValidationMessage(input);\n this.setValidationMessage(input);\n }\n }\n\n /**\n * Returns the validity state of the input component.\n * `true` for valid and `false` for invalid.\n */\n getValidity() {\n return this.isValid;\n }\n\n /**\n * Get the input element to validate. Defined as the first slotted element\n * @returns The input element or undefined if not found\n */\n private getInput() {\n const input = this.slottedChildren[0];\n return input ? input as HTMLInputElement : undefined;\n }\n\n /**\n * Get the event names to listen for.\n * If the input is a synergy element, will use syn- prefixes.\n * @returns The event names to listen for\n */\n // eslint-disable-next-line complexity\n private getUsedEventNames() {\n const input = this.getInput();\n\n // If there is no input, skip before doing any harm\n if (!input) {\n return [];\n }\n\n // Make sure to always use an array of events\n // This is needed because on may be a special value like \"live\"\n const on = normalizeEventAttribute(this.on);\n\n // Filter makes sure to remove empty values, e.g.\n // <syn-validate on=\"\"></syn-validate>\n const [...events] = on.filter(Boolean);\n\n // Make sure to always have an invalid event\n if (!events.includes('invalid')) {\n events.push('invalid');\n }\n\n // Special handling for the live keyword:\n // live always means on input and blur\n if (events.includes('live')) {\n events.push('input');\n events.push('blur');\n }\n\n // Make sure to remove duplicated events and the live property\n // and map the events to the correct event names\n return Array.from(new Set(\n events\n .filter(e => e !== 'live')\n .map(e => getEventNameForElement(input, e)),\n ));\n }\n\n /**\n * Update the events on the input element.\n */\n private updateEvents() {\n this.controller.abort();\n this.controller = new AbortController();\n const input = this.getInput();\n\n if (!input) {\n return;\n }\n\n const events = this.getUsedEventNames();\n events.forEach(eventName => {\n input.addEventListener(eventName, this.validate, {\n capture: isInvalidEvent(eventName),\n signal: this.controller.signal,\n });\n });\n\n // If the change event is not included,\n // make sure to attach a custom listener that resets the validation message\n // This is needed as the custom message may be set on change\n const usedChangeEvent = getEventNameForElement(input, 'change');\n if (!events.includes(usedChangeEvent)) {\n input.addEventListener(usedChangeEvent, this.internalRevalidate, {\n signal: this.controller.signal,\n });\n }\n }\n\n private setValidationMessage(input: HTMLInputElement) {\n const { customValidationMessage } = this;\n const validationMessage = customValidationMessage || input.validationMessage;\n this.validationMessage = validationMessage;\n }\n\n /**\n * Set the custom validation message to the input. This will make sure to either:\n * - use the custom message if one is set or\n * - use the default message if the custom message is empty\n */\n private setCustomValidationMessage(input: HTMLInputElement) {\n // Set the custom validation message on the input only once, when the customValidationMessage\n // is changed. Otherwise there could be problems with `variant=\"native\"` and `on=\"live\"` or\n // `on=\"blur\"`, because the browser popup will never disappear even if clicking somewhere else.\n input.setCustomValidity(this.customValidationMessage);\n }\n\n /**\n * Set the validation message from the input element\n * @param e The event that was received\n */\n private internalRevalidate = (e: Event) => {\n const input = e.currentTarget as HTMLInputElement;\n if (input.validity?.valid) {\n this.validationMessage = '';\n }\n };\n\n /**\n * Handle the blur event during validation\n */\n // eslint-disable-next-line class-methods-use-this\n private handleFocus(input: HTMLInputElement) {\n const activeElement = document.activeElement! as HTMLInputElement;\n const activeElementIsWrapped = activeElement.closest('syn-validate');\n\n if (!activeElement.validity?.valid && activeElementIsWrapped) {\n // The active element is invalid do not scroll\n return;\n }\n\n input.scrollIntoView({ block: 'nearest' });\n input.focus();\n }\n\n /**\n * Triggers a validation run, showing the validation message if needed.\n */\n // eslint-disable-next-line complexity\n private validate = (e: Event) => {\n // Make sure to stop the validate component from going into an endless cycle of triggering\n if (isInvalidEvent(e.type) && this.variant === 'native' && this.isInternalTriggeredInvalid === true) {\n this.isInternalTriggeredInvalid = false;\n return;\n }\n\n // Make sure to always prevent the invalid event when not using native validation\n if (isInvalidEvent(e.type) && this.variant !== 'native') {\n e.preventDefault();\n e.stopPropagation();\n }\n\n const input = e.currentTarget as HTMLInputElement;\n this.isValid = input.validity?.valid;\n\n // When we are using eager, make sure to skip focus on the first mount\n if (this.eager && this.eagerFirstMount) {\n this.eagerFirstMount = false;\n this.setValidationMessage(input);\n return;\n }\n\n // If the active element that has focus is placed in a validate component,\n // make sure to not loose focus.\n if (!this.isValid && !isBlurEvent(e.type)) {\n this.handleFocus(input);\n }\n\n this.setValidationMessage(input);\n\n // Trigger reportValidity when using native validation, so the browser popup is also shown\n // for other events than `invalid`. All events except the blur event, should trigger this.\n if (!isBlurEvent(e.type) && this.variant === 'native') {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.updateComplete.then(() => {\n this.isInternalTriggeredInvalid = true;\n input.reportValidity();\n });\n }\n };\n\n async firstUpdated() {\n this.updateEvents();\n\n // Make sure to run validation on mount if eager is set\n if (this.eager) {\n const input = this.getInput();\n await this.updateComplete;\n this.isValid = input?.validity?.valid ?? false;\n input?.reportValidity();\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.controller.abort();\n }\n\n private renderInlineValidation() {\n if (this.variant !== 'inline' || !this.validationMessage) {\n return '';\n }\n\n return html`\n <syn-alert\n open\n exportparts=\"base:alert__base,message:alert__message,icon:alert__icon\"\n part=\"alert\"\n variant=\"danger\"\n >\n ${!this.hideIcon\n ? html`<syn-icon slot=\"icon\" name=\"error\" library=\"system\"></syn-icon>`\n : ''\n }\n ${this.validationMessage}\n </syn-alert>\n `;\n }\n\n render() {\n return html`\n <div\n class=\"validate\"\n part=\"base\"\n >\n <slot\n class=\"validate__input-wrapper\"\n part=\"input-wrapper\"\n ></slot>\n \n ${this.renderInlineValidation()}\n </div>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,YAAY;AACrB,SAAS,UAAU,uBAAuB,aAAa;AA8BvD,IAAqB,cAArB,cAAyC,eAAe;AAAA,EAAxD;AAAA;AAOE,sBAAa,IAAI,gBAAgB;AAIxB,6BAAoB;AAEpB,2BAAkB;AAElB,sCAA6B;AAE7B,mBAAU;AASU,mBAA+B;AAGQ,oBAAW;AAsBlD,cAAa;AAO0B,mCAA0B;AAWjE,iBAAQ;AA+IrC;AAAA;AAAA;AAAA;AAAA,SAAQ,qBAAqB,CAAC,MAAa;AApP7C;AAqPI,YAAM,QAAQ,EAAE;AAChB,WAAI,WAAM,aAAN,mBAAgB,OAAO;AACzB,aAAK,oBAAoB;AAAA,MAC3B;AAAA,IACF;AAuBA;AAAA;AAAA;AAAA;AAAA,SAAQ,WAAW,CAAC,MAAa;AAhRnC;AAkRI,UAAI,eAAe,EAAE,IAAI,KAAK,KAAK,YAAY,YAAY,KAAK,+BAA+B,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,EAAR,MAAM;AAAA,GAbY,YAaV;AAEA;AAAA,EAAR,MAAM;AAAA,GAfY,YAeV;AAEA;AAAA,EAAR,MAAM;AAAA,GAjBY,YAiBV;AASoB;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GA1BR,YA0BU;AAGuC;AAAA,EAAnE,SAAS,EAAE,WAAW,aAAa,SAAS,MAAM,MAAM,QAAQ,CAAC;AAAA,GA7B/C,YA6BiD;AAsBvC;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAnDR,YAmDU;AAOuC;AAAA,EAAnE,SAAS,EAAE,WAAW,6BAA6B,MAAM,OAAO,CAAC;AAAA,GA1D/C,YA0DiD;AAWvC;AAAA,EAA5B,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GArER,YAqEU;AAI7B;AAAA,EADC,MAAM,MAAM,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAxExB,YAyEnB;AAKM;AAAA,EADL,MAAM,SAAS,EAAE,sBAAsB,MAAM,CAAC;AAAA,GA7E5B,YA8Eb;AAaN;AAAA,EADC,MAAM,2BAA2B,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA1F7C,YA2FnB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynTabGroup
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.YDFXKQKE.js";
|
|
4
4
|
|
|
5
5
|
// src/components/tab-group/tab-group.ts
|
|
6
6
|
var tab_group_default = SynTabGroup;
|
|
@@ -9,4 +9,4 @@ SynTabGroup.define("syn-tab-group");
|
|
|
9
9
|
export {
|
|
10
10
|
tab_group_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.MPLBBUS4.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/components/validate/validate.styles.ts
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
var validate_styles_default = css`
|
|
4
|
+
.validate {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: var(--syn-spacing-small);
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
validate_styles_default
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=chunk.MVM3NN6Y.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/validate/validate.styles.ts"],
|
|
4
|
+
"sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n .validate {\n display: flex;\n flex-direction: column;\n gap: var(--syn-spacing-small);\n }\n`;\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,0BAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynOption
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.35GWQ3HX.js";
|
|
4
4
|
|
|
5
5
|
// src/components/option/option.ts
|
|
6
6
|
var option_default = SynOption;
|
|
@@ -9,4 +9,4 @@ SynOption.define("syn-option");
|
|
|
9
9
|
export {
|
|
10
10
|
option_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.NB5A7N4Y.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynIconButton
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.THXJYLZH.js";
|
|
4
4
|
import {
|
|
5
5
|
waitForEvent
|
|
6
6
|
} from "./chunk.C2ENQBPM.js";
|
|
@@ -16,21 +16,23 @@ import {
|
|
|
16
16
|
HasSlotController
|
|
17
17
|
} from "./chunk.WVVQK5TE.js";
|
|
18
18
|
import {
|
|
19
|
-
|
|
20
|
-
} from "./chunk.
|
|
21
|
-
import {
|
|
22
|
-
alert_styles_default
|
|
23
|
-
} from "./chunk.IFXKIEOU.js";
|
|
19
|
+
LocalizeController
|
|
20
|
+
} from "./chunk.GIU3H3J3.js";
|
|
24
21
|
import {
|
|
25
22
|
watch
|
|
26
23
|
} from "./chunk.74IOULXM.js";
|
|
27
24
|
import {
|
|
28
|
-
LocalizeController
|
|
29
|
-
} from "./chunk.GIU3H3J3.js";
|
|
30
|
-
import {
|
|
31
|
-
SynergyElement,
|
|
32
25
|
component_styles_default
|
|
33
|
-
} from "./chunk.
|
|
26
|
+
} from "./chunk.NLYVOJGK.js";
|
|
27
|
+
import {
|
|
28
|
+
SynergyElement
|
|
29
|
+
} from "./chunk.RHPPIKE6.js";
|
|
30
|
+
import {
|
|
31
|
+
alert_custom_styles_default
|
|
32
|
+
} from "./chunk.JRYXECAY.js";
|
|
33
|
+
import {
|
|
34
|
+
alert_styles_default
|
|
35
|
+
} from "./chunk.IFXKIEOU.js";
|
|
34
36
|
import {
|
|
35
37
|
__decorateClass
|
|
36
38
|
} from "./chunk.2GFK6XTO.js";
|
|
@@ -269,4 +271,4 @@ setDefaultAnimation("alert.hide", {
|
|
|
269
271
|
export {
|
|
270
272
|
SynAlert
|
|
271
273
|
};
|
|
272
|
-
//# sourceMappingURL=chunk.
|
|
274
|
+
//# sourceMappingURL=chunk.NERVPV5E.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/alert/alert.component.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * ---------------------------------------------------------------------\n * \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n * Removing this comment will prevent it from being managed by it.\n * ---------------------------------------------------------------------\n */\n\n/* eslint-disable */\nimport { animateTo, stopAnimations } from '../../internal/animate.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { getAnimation, setDefaultAnimation } from '../../utilities/animation-registry.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { waitForEvent } from '../../internal/event.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIconButton from '../icon-button/icon-button.component.js';\nimport styles from './alert.styles.js';\nimport customStyles from './alert.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\nconst toastStack = Object.assign(document.createElement('div'), { className: 'syn-toast-stack' });\n\n/**\n * @summary Alerts are used to display important messages inline or as toast notifications.\n * @documentation https://synergy.style/components/alert\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - The alert's main content.\n * @slot icon - An icon to show in the alert. Works best with `<syn-icon>`.\n *\n * @event syn-show - Emitted when the alert opens.\n * @event syn-after-show - Emitted after the alert opens and all animations are complete.\n * @event syn-hide - Emitted when the alert closes.\n * @event syn-after-hide - Emitted after the alert closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart icon - The container that wraps the optional icon.\n * @csspart message - The container that wraps the alert's main content.\n * @csspart close-button - The close button, an `<syn-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n *\n * @animation alert.show - The animation to use when showing the alert.\n * @animation alert.hide - The animation to use when hiding the alert.\n */\nexport default class SynAlert extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles, customStyles];\n static dependencies = { 'syn-icon-button': SynIconButton };\n\n private autoHideTimeout: number;\n private remainingTimeInterval: number;\n private countdownAnimation?: Animation;\n private readonly hasSlotController = new HasSlotController(this, 'icon', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n @query('[part~=\"base\"]') base: HTMLElement;\n\n @query('.alert__countdown-elapsed') countdownElement: HTMLElement;\n\n /**\n * Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /** Enables a close button that allows the user to dismiss the alert. */\n @property({ type: Boolean, reflect: true }) closable = false;\n\n /** The alert's theme variant. */\n @property({ reflect: true }) variant: 'primary' | 'success' | 'neutral' | 'warning' | 'danger' = 'primary';\n\n /**\n * The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\n * the alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\n * the alert will not close on its own.\n */\n @property({ type: Number }) duration = Infinity;\n\n /**\n * Enables a countdown that indicates the remaining time the alert will be displayed.\n * Typically used to indicate the remaining time before a whole app refresh.\n */\n private countdown? : 'rtl' | 'ltr';\n\n @state() private remainingTime = this.duration;\n\n firstUpdated() {\n this.base.hidden = !this.open;\n }\n\n private restartAutoHide() {\n this.handleCountdownChange();\n clearTimeout(this.autoHideTimeout);\n clearInterval(this.remainingTimeInterval);\n if (this.open && this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n this.remainingTime = this.duration;\n this.remainingTimeInterval = window.setInterval(() => {\n this.remainingTime -= 100;\n }, 100);\n }\n }\n\n private pauseAutoHide() {\n this.countdownAnimation?.pause();\n clearTimeout(this.autoHideTimeout);\n clearInterval(this.remainingTimeInterval);\n }\n\n private resumeAutoHide() {\n if (this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.remainingTime);\n this.remainingTimeInterval = window.setInterval(() => {\n this.remainingTime -= 100;\n }, 100);\n this.countdownAnimation?.play();\n }\n }\n\n private handleCountdownChange() {\n if (this.open && this.duration < Infinity && this.countdown) {\n const { countdownElement } = this;\n const start = '100%';\n const end = '0';\n this.countdownAnimation = countdownElement.animate([{ width: start }, { width: end }], {\n duration: this.duration,\n easing: 'linear'\n });\n }\n }\n\n private handleCloseClick() {\n this.hide();\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('syn-show');\n\n if (this.duration < Infinity) {\n this.restartAutoHide();\n }\n\n await stopAnimations(this.base);\n this.base.hidden = false;\n const { keyframes, options } = getAnimation(this, 'alert.show', { dir: this.localize.dir() });\n await animateTo(this.base, keyframes, options);\n\n this.emit('syn-after-show');\n } else {\n // Hide\n this.emit('syn-hide');\n\n clearTimeout(this.autoHideTimeout);\n clearInterval(this.remainingTimeInterval);\n\n await stopAnimations(this.base);\n const { keyframes, options } = getAnimation(this, 'alert.hide', { dir: this.localize.dir() });\n await animateTo(this.base, keyframes, options);\n this.base.hidden = true;\n\n this.emit('syn-after-hide');\n }\n }\n\n @watch('duration')\n handleDurationChange() {\n this.restartAutoHide();\n }\n\n /** Shows the alert. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'syn-after-show');\n }\n\n /** Hides the alert */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'syn-after-hide');\n }\n\n /**\n * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when\n * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by\n * calling this method again. The returned promise will resolve after the alert is hidden.\n */\n async toast() {\n return new Promise<void>(resolve => {\n this.handleCountdownChange();\n if (toastStack.parentElement === null) {\n document.body.append(toastStack);\n }\n\n toastStack.appendChild(this);\n\n // Wait for the toast stack to render\n requestAnimationFrame(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- force a reflow for the initial transition\n this.clientWidth;\n this.show();\n });\n\n this.addEventListener(\n 'syn-after-hide',\n () => {\n toastStack.removeChild(this);\n resolve();\n\n // Remove the toast stack from the DOM when there are no more alerts\n if (toastStack.querySelector('syn-alert') === null) {\n toastStack.remove();\n }\n },\n { once: true }\n );\n });\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n alert: true,\n 'alert--open': this.open,\n 'alert--closable': this.closable,\n 'alert--has-icon': this.hasSlotController.test('icon'),\n 'alert--primary': this.variant === 'primary',\n 'alert--success': this.variant === 'success',\n 'alert--neutral': this.variant === 'neutral',\n 'alert--warning': this.variant === 'warning',\n 'alert--danger': this.variant === 'danger'\n })}\n role=\"alert\"\n aria-hidden=${this.open ? 'false' : 'true'}\n @mouseenter=${this.pauseAutoHide}\n @mouseleave=${this.resumeAutoHide}\n >\n <div part=\"icon\" class=\"alert__icon\">\n <slot name=\"icon\"></slot>\n </div>\n\n <div part=\"message\" class=\"alert__message\" aria-live=\"polite\">\n <slot></slot>\n </div>\n\n ${this.closable\n ? html`\n <syn-icon-button\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"alert__close-button\"\n name=\"x-lg\"\n library=\"system\"\n label=${this.localize.term('close')}\n @click=${this.handleCloseClick}\n ></syn-icon-button>\n `\n : ''}\n\n <div role=\"timer\" class=\"alert__timer\">${this.remainingTime}</div>\n\n ${this.countdown\n ? html`\n <div\n class=${classMap({\n alert__countdown: true,\n 'alert__countdown--ltr': this.countdown === 'ltr'\n })}\n >\n <div class=\"alert__countdown-elapsed\"></div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nsetDefaultAnimation('alert.show', {\n keyframes: [\n { opacity: 0, scale: 0.8 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('alert.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.8 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,SAAS,gBAAgB;AAGzB,SAAS,YAAY;AAErB,SAAS,UAAU,OAAO,aAAa;AAUvC,IAAM,aAAa,OAAO,OAAO,SAAS,cAAc,KAAK,GAAG,EAAE,WAAW,kBAAkB,CAAC;AA2BhG,IAAqB,WAArB,cAAsC,eAAe;AAAA,EAArD;AAAA;A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