@synergy-design-system/components 2.31.2 → 2.33.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/code-quality/html-validate/scripts/deprecation.js +1 -0
- package/code-quality/html-validate/scripts/synergy-element-rules.js +7 -1
- package/dist/chunks/{chunk.JDN6CDYL.js → chunk.25GVUTU4.js} +9 -9
- package/dist/chunks/{chunk.2G7DZ3GJ.js → chunk.27L65BCF.js} +2 -2
- package/dist/chunks/{chunk.MQZANITC.js → chunk.2DU5WR27.js} +2 -2
- package/dist/chunks/{chunk.6IWBHFOD.js → chunk.2S2HN2DG.js} +11 -11
- package/dist/chunks/{chunk.SMAOMVFZ.js → chunk.3KSZ45DK.js} +7 -7
- package/dist/chunks/{chunk.RYNKWTQ6.js → chunk.3RF5SFKE.js} +5 -5
- package/dist/chunks/{chunk.NH4JQFOM.js → chunk.57DU3E3Z.js} +3 -1
- package/dist/chunks/{chunk.NH4JQFOM.js.map → chunk.57DU3E3Z.js.map} +2 -2
- package/dist/chunks/{chunk.2EJ6TB2U.js → chunk.5RDKSWHY.js} +6 -6
- package/dist/chunks/{chunk.S5N2TE2L.js → chunk.6DYKE5RE.js} +3 -1
- package/dist/chunks/{chunk.S5N2TE2L.js.map → chunk.6DYKE5RE.js.map} +2 -2
- package/dist/chunks/{chunk.JMBUWWA2.js → chunk.6IW6UFS5.js} +2 -2
- package/dist/chunks/{chunk.OH3PPVV4.js → chunk.6QJYD7WX.js} +13 -1
- package/dist/chunks/chunk.6QJYD7WX.js.map +7 -0
- package/dist/chunks/{chunk.KQQM2CWQ.js → chunk.77CM4WNK.js} +3 -3
- package/dist/chunks/{chunk.HQ6QUSK7.js → chunk.7JGKUB4A.js} +2 -2
- package/dist/chunks/{chunk.OBWURI5H.js → chunk.7TDMIG4V.js} +10 -10
- package/dist/chunks/{chunk.HE2VZIBP.js → chunk.AB3VZ5EQ.js} +2 -2
- package/dist/chunks/{chunk.3DUL2OP4.js → chunk.ACUIKTEY.js} +2 -2
- package/dist/chunks/{chunk.ELFHYJLZ.js → chunk.AGK4R4ZV.js} +2 -2
- package/dist/chunks/{chunk.2LYOMDFO.js → chunk.AYAX7BG7.js} +2 -2
- package/dist/chunks/{chunk.YPSUFGKY.js → chunk.BNHQAKO6.js} +2 -2
- package/dist/chunks/{chunk.BO7FAKBN.js → chunk.BNQHYHD5.js} +217 -11
- package/dist/chunks/chunk.BNQHYHD5.js.map +7 -0
- package/dist/chunks/{chunk.EISTC2GP.js → chunk.BVEKHL6R.js} +2 -2
- package/dist/chunks/{chunk.74IOULXM.js → chunk.BVZQ6QSY.js} +2 -2
- package/dist/chunks/{chunk.UU7653PU.js → chunk.BXPKGVZZ.js} +2 -2
- package/dist/chunks/{chunk.DX47WJSS.js → chunk.BY3QS7MP.js} +2 -2
- package/dist/chunks/{chunk.RZG7IW73.js → chunk.C5SA7J6Q.js} +8 -8
- package/dist/chunks/{chunk.JVSTXX5J.js → chunk.CD2K65PJ.js} +7 -7
- package/dist/chunks/{chunk.6DPKNL3S.js → chunk.CQFPYSAF.js} +2 -2
- package/dist/chunks/{chunk.4UOOTX72.js → chunk.D2ISHWZZ.js} +2 -2
- package/dist/chunks/{chunk.EFO5BI6T.js → chunk.DXADIAFT.js} +2 -2
- package/dist/chunks/{chunk.WROPOFUG.js → chunk.DZJHHVOD.js} +3 -3
- package/dist/chunks/{chunk.WROPOFUG.js.map → chunk.DZJHHVOD.js.map} +1 -1
- package/dist/chunks/{chunk.NUIJATJY.js → chunk.E5UUNP6E.js} +3 -3
- package/dist/chunks/{chunk.4YG7EYB2.js → chunk.ERSMRSTV.js} +2 -2
- package/dist/chunks/{chunk.TW3XHMG6.js → chunk.EXACNZQZ.js} +12 -12
- package/dist/chunks/{chunk.XNHQJ4X7.js → chunk.FEVFKETA.js} +10 -10
- package/dist/chunks/{chunk.XUFDCLB4.js → chunk.FFVIY2O3.js} +2 -2
- package/dist/chunks/{chunk.QWSLKG3U.js → chunk.FNSMFPBM.js} +9 -9
- package/dist/chunks/chunk.FWLUR33I.js +165 -0
- package/dist/chunks/chunk.FWLUR33I.js.map +7 -0
- package/dist/chunks/{chunk.JQDBNSFS.js → chunk.G66EQVXQ.js} +2 -2
- package/dist/chunks/{chunk.A3OYJILJ.js → chunk.G6ITZTTW.js} +2 -2
- package/dist/chunks/{chunk.JCIM6NE3.js → chunk.G76BKD7B.js} +2 -2
- package/dist/chunks/{chunk.LC7FBSL4.js → chunk.GQKFJKSM.js} +2 -2
- package/dist/chunks/{chunk.JTSBAJHO.js → chunk.HC4N72MX.js} +2 -2
- package/dist/chunks/{chunk.OO6R7BWT.js → chunk.HEXQ5DSO.js} +3 -3
- package/dist/chunks/{chunk.ZTFYI6ZI.js → chunk.HHBSJGPU.js} +6 -6
- package/dist/chunks/{chunk.LLNE7YOD.js → chunk.HICOUAKU.js} +4 -4
- package/dist/chunks/{chunk.6PCADVSN.js → chunk.HLRZCXQN.js} +7 -7
- package/dist/chunks/{chunk.TBQSOTUS.js → chunk.HNKS3ZIU.js} +2 -2
- package/dist/chunks/{chunk.DIV5RCIM.js → chunk.HNPPHRSN.js} +5 -5
- package/dist/chunks/{chunk.OLRA37R5.js → chunk.HP2LEQRU.js} +2 -2
- package/dist/chunks/{chunk.S5KXHITD.js → chunk.HZJ7FWRM.js} +2 -2
- package/dist/chunks/{chunk.QPAYAMLZ.js → chunk.INRGTLJX.js} +9 -9
- package/dist/chunks/{chunk.GIU3H3J3.js → chunk.IPGLY3H4.js} +2 -2
- package/dist/chunks/{chunk.GIU3H3J3.js.map → chunk.IPGLY3H4.js.map} +1 -1
- package/dist/chunks/{chunk.HFRXN2DK.js → chunk.IW72S7OZ.js} +2 -2
- package/dist/chunks/{chunk.TZUQMH6X.js → chunk.J5JGYGWR.js} +9 -9
- package/dist/chunks/{chunk.NB47QWRL.js → chunk.JGEZDRRE.js} +2 -2
- package/dist/chunks/{chunk.PFSSGWUF.js → chunk.JMJO7VCO.js} +4 -4
- package/dist/chunks/{chunk.22PGKUCU.js → chunk.KL546EBL.js} +2 -2
- package/dist/chunks/{chunk.P3HQDPXQ.js → chunk.KMSUFVZK.js} +2 -2
- package/dist/chunks/{chunk.3JXNFR6T.js → chunk.KQPO2RU5.js} +2 -2
- package/dist/chunks/{chunk.XDWFPRPE.js → chunk.L7A52E3B.js} +4 -4
- package/dist/chunks/{chunk.K7A64ZY7.js → chunk.LDZQIZHN.js} +2 -2
- package/dist/chunks/{chunk.SKYSXSBE.js → chunk.LHLVVLIM.js} +2 -2
- package/dist/chunks/{chunk.7RJUAC42.js → chunk.LI7WXEV6.js} +3 -3
- package/dist/chunks/{chunk.DOIUTN5M.js → chunk.LYMD42B7.js} +2 -2
- package/dist/chunks/{chunk.6DPMTGX6.js → chunk.MC5WHWBF.js} +2 -2
- package/dist/chunks/{chunk.XJAGZG2W.js → chunk.MLMLTXOZ.js} +2 -2
- package/dist/chunks/{chunk.2LPH33ZQ.js → chunk.MNDLFXDZ.js} +9 -9
- package/dist/chunks/chunk.MNDLFXDZ.js.map +7 -0
- package/dist/chunks/{chunk.6GBQX53P.js → chunk.MTN5NM4A.js} +2 -2
- package/dist/chunks/{chunk.KJ5DXPFW.js → chunk.MVYXUHVS.js} +4 -4
- package/dist/chunks/{chunk.JTSGQRUI.js → chunk.N47OHJ5U.js} +2 -2
- package/dist/chunks/{chunk.OYFNERZO.js → chunk.NAJ7EYD2.js} +2 -2
- package/dist/chunks/chunk.NFXT5LNY.js +55 -0
- package/dist/chunks/chunk.NFXT5LNY.js.map +7 -0
- package/dist/chunks/{chunk.DH5KSMJS.js → chunk.NM7BI4LK.js} +20 -18
- package/dist/chunks/chunk.NM7BI4LK.js.map +7 -0
- package/dist/chunks/{chunk.FTFMQV75.js → chunk.NS3DHTOO.js} +9 -9
- package/dist/chunks/{chunk.WTKBRIY4.js → chunk.O6KXOEJZ.js} +5 -5
- package/dist/chunks/{chunk.YKQLG6R3.js → chunk.OBK7WMW2.js} +3 -3
- package/dist/chunks/{chunk.B5BVIZ3W.js → chunk.OKJFZ7T2.js} +5 -5
- package/dist/chunks/{chunk.CLTYOE3E.js → chunk.ONG2YZIJ.js} +2 -2
- package/dist/chunks/{chunk.IRCX4RJL.js → chunk.OSPYBYAS.js} +2 -2
- package/dist/chunks/{chunk.V2NAJIXY.js → chunk.PB2L4AWO.js} +2 -2
- package/dist/chunks/{chunk.SUZPXB4O.js → chunk.POD3BDY6.js} +2 -2
- package/dist/chunks/{chunk.NY2GAPA3.js → chunk.PYNYGKKB.js} +6 -6
- package/dist/chunks/{chunk.PXXI4VRP.js → chunk.QFTB67TT.js} +2 -2
- package/dist/chunks/{chunk.WHKWCNJR.js → chunk.QIZNAQEE.js} +6 -6
- package/dist/chunks/{chunk.L6JQ4II4.js → chunk.QLJC3LVO.js} +2 -2
- package/dist/chunks/{chunk.BC6YFGMY.js → chunk.R6IF6UUL.js} +2 -2
- package/dist/chunks/{chunk.AAPLCFRS.js → chunk.R7UR6527.js} +2 -2
- package/dist/chunks/chunk.RB2JR2ND.js +23 -0
- package/dist/chunks/chunk.RB2JR2ND.js.map +7 -0
- package/dist/chunks/{chunk.5XVVEHBO.js → chunk.RKRTMY5X.js} +2 -2
- package/dist/chunks/{chunk.CITWLSAM.js → chunk.RVWB22MU.js} +2 -2
- package/dist/chunks/{chunk.HLZPJC4B.js → chunk.S2OZHPTC.js} +2 -2
- package/dist/chunks/{chunk.IY34DPIJ.js → chunk.SGWVV6WP.js} +12 -12
- package/dist/chunks/{chunk.VQG4ENGK.js → chunk.SMGWT2BM.js} +4 -4
- package/dist/chunks/{chunk.BMHMFPD4.js → chunk.STNQE2LY.js} +4 -4
- package/dist/chunks/{chunk.DJHTOGW7.js → chunk.T2ENURIL.js} +2 -2
- package/dist/chunks/{chunk.CELWLWZJ.js → chunk.T4JQJQYD.js} +3 -3
- package/dist/chunks/{chunk.I7ZAFHZ3.js → chunk.TIIPIHTX.js} +2 -2
- package/dist/chunks/{chunk.SRK6ZYCL.js → chunk.UAPJHMZJ.js} +6 -6
- package/dist/chunks/{chunk.XUCEJ53P.js → chunk.UCJUUKMG.js} +4 -4
- package/dist/chunks/{chunk.LOAB2FDA.js → chunk.UELDMVQY.js} +2 -2
- package/dist/chunks/{chunk.EJ4C4K46.js → chunk.UGIL6MAB.js} +6 -6
- package/dist/chunks/{chunk.UMTN2TU2.js → chunk.VFRZCASZ.js} +5 -5
- package/dist/chunks/{chunk.EHCS6X6N.js → chunk.VICINZOP.js} +5 -5
- package/dist/chunks/{chunk.3IVPV3E3.js → chunk.VJEHP5EP.js} +8 -8
- package/dist/chunks/{chunk.SFTF4XCD.js → chunk.VKNCN5RG.js} +22 -13
- package/dist/chunks/chunk.VKNCN5RG.js.map +7 -0
- package/dist/chunks/{chunk.7CRVMDW5.js → chunk.WMZ6JC2D.js} +2 -2
- package/dist/chunks/{chunk.DZZ3B5GF.js → chunk.WRF3RAGW.js} +97 -65
- package/dist/chunks/chunk.WRF3RAGW.js.map +7 -0
- package/dist/chunks/{chunk.6YPSMCHB.js → chunk.XBHOEMRR.js} +4 -4
- package/dist/chunks/{chunk.ZJFTAIAU.js → chunk.XWVTXL44.js} +2 -2
- package/dist/chunks/{chunk.XPTYP3S2.js → chunk.Y4ZGWTWO.js} +2 -2
- package/dist/chunks/{chunk.4TGDH4W7.js → chunk.YCEHUNIA.js} +8 -8
- package/dist/chunks/{chunk.OU4PLFYW.js → chunk.YKZHYCCH.js} +6 -6
- package/dist/chunks/{chunk.2GFK6XTO.js → chunk.Z4XV3SMG.js} +14 -1
- package/dist/components/accordion/accordion.component.js +8 -7
- package/dist/components/accordion/accordion.js +9 -8
- package/dist/components/accordion/accordion.styles.js +1 -1
- package/dist/components/alert/alert.component.js +16 -15
- package/dist/components/alert/alert.custom.styles.js +1 -1
- package/dist/components/alert/alert.js +17 -16
- package/dist/components/alert/alert.styles.js +1 -1
- package/dist/components/badge/badge.component.js +9 -8
- package/dist/components/badge/badge.custom.styles.js +1 -1
- package/dist/components/badge/badge.js +10 -9
- package/dist/components/badge/badge.styles.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.component.js +9 -9
- package/dist/components/breadcrumb/breadcrumb.custom.styles.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +10 -10
- package/dist/components/breadcrumb/breadcrumb.styles.js +1 -1
- package/dist/components/breadcrumb-item/breadcrumb-item.component.js +4 -4
- package/dist/components/breadcrumb-item/breadcrumb-item.custom.styles.js +1 -1
- package/dist/components/breadcrumb-item/breadcrumb-item.js +5 -5
- package/dist/components/breadcrumb-item/breadcrumb-item.styles.js +1 -1
- package/dist/components/button/button.component.js +15 -14
- package/dist/components/button/button.custom.styles.js +1 -1
- package/dist/components/button/button.js +16 -15
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/button-group/button-group.component.js +3 -3
- package/dist/components/button-group/button-group.js +4 -4
- package/dist/components/button-group/button-group.styles.js +1 -1
- package/dist/components/card/card.component.js +3 -3
- package/dist/components/card/card.custom.styles.js +1 -1
- package/dist/components/card/card.js +4 -4
- package/dist/components/card/card.styles.js +1 -1
- package/dist/components/checkbox/checkbox.component.js +12 -11
- package/dist/components/checkbox/checkbox.custom.styles.js +1 -1
- package/dist/components/checkbox/checkbox.js +13 -12
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/combobox/combobox.component.js +18 -17
- package/dist/components/combobox/combobox.custom.styles.js +1 -1
- package/dist/components/combobox/combobox.js +19 -18
- package/dist/components/combobox/combobox.styles.js +1 -1
- package/dist/components/combobox/option-renderer.js +1 -1
- package/dist/components/combobox/utils.js +1 -1
- package/dist/components/details/details.component.js +15 -14
- package/dist/components/details/details.custom.styles.js +1 -1
- package/dist/components/details/details.js +16 -15
- package/dist/components/details/details.styles.js +1 -1
- package/dist/components/dialog/dialog.component.js +18 -17
- package/dist/components/dialog/dialog.custom.styles.js +1 -1
- package/dist/components/dialog/dialog.js +19 -18
- package/dist/components/dialog/dialog.styles.js +1 -1
- package/dist/components/divider/divider.component.js +4 -4
- package/dist/components/divider/divider.custom.styles.js +1 -1
- package/dist/components/divider/divider.js +5 -5
- package/dist/components/divider/divider.styles.js +1 -1
- package/dist/components/drawer/drawer.component.d.ts +2 -0
- package/dist/components/drawer/drawer.component.js +18 -17
- package/dist/components/drawer/drawer.custom.styles.js +1 -1
- package/dist/components/drawer/drawer.js +19 -18
- package/dist/components/drawer/drawer.styles.js +1 -1
- package/dist/components/dropdown/dropdown.component.js +10 -10
- package/dist/components/dropdown/dropdown.custom.styles.js +1 -1
- package/dist/components/dropdown/dropdown.js +11 -11
- package/dist/components/dropdown/dropdown.styles.js +1 -1
- package/dist/components/file/file.component.js +18 -17
- package/dist/components/file/file.js +19 -18
- package/dist/components/file/file.styles.js +1 -1
- package/dist/components/header/header.component.d.ts +2 -1
- package/dist/components/header/header.component.js +10 -10
- package/dist/components/header/header.js +11 -11
- package/dist/components/header/header.styles.js +1 -1
- package/dist/components/icon/icon.component.js +6 -6
- package/dist/components/icon/icon.custom.styles.js +1 -1
- package/dist/components/icon/icon.js +7 -7
- package/dist/components/icon/icon.styles.js +1 -1
- package/dist/components/icon/library.default.js +1 -1
- package/dist/components/icon/library.js +3 -3
- package/dist/components/icon/library.system.js +2 -2
- package/dist/components/icon-button/icon-button.component.js +11 -10
- package/dist/components/icon-button/icon-button.custom.styles.js +1 -1
- package/dist/components/icon-button/icon-button.js +12 -11
- package/dist/components/icon-button/icon-button.styles.js +1 -1
- package/dist/components/input/formatter.d.ts +8 -0
- package/dist/components/input/formatter.js +8 -0
- package/dist/components/input/formatter.js.map +7 -0
- package/dist/components/input/input.component.d.ts +45 -0
- package/dist/components/input/input.component.js +16 -14
- package/dist/components/input/input.custom.styles.js +1 -1
- package/dist/components/input/input.js +17 -15
- package/dist/components/input/input.styles.js +1 -1
- package/dist/components/input/strategies.d.ts +61 -0
- package/dist/components/input/strategies.js +12 -0
- package/dist/components/input/strategies.js.map +7 -0
- package/dist/components/menu/menu.component.js +3 -3
- package/dist/components/menu/menu.custom.styles.js +1 -1
- package/dist/components/menu/menu.js +4 -4
- package/dist/components/menu/menu.styles.js +1 -1
- package/dist/components/menu-item/menu-item.component.js +11 -11
- package/dist/components/menu-item/menu-item.custom.styles.js +1 -1
- package/dist/components/menu-item/menu-item.js +12 -12
- package/dist/components/menu-item/menu-item.styles.js +1 -1
- package/dist/components/menu-item/submenu-controller.js +1 -1
- package/dist/components/menu-label/menu-label.component.js +6 -6
- package/dist/components/menu-label/menu-label.custom.styles.js +1 -1
- package/dist/components/menu-label/menu-label.js +7 -7
- package/dist/components/menu-label/menu-label.styles.js +1 -1
- package/dist/components/nav-item/nav-item.component.js +5 -5
- package/dist/components/nav-item/nav-item.js +6 -6
- package/dist/components/nav-item/nav-item.styles.js +1 -1
- package/dist/components/optgroup/optgroup.component.js +5 -5
- package/dist/components/optgroup/optgroup.js +6 -6
- package/dist/components/optgroup/optgroup.styles.js +1 -1
- package/dist/components/option/option-size.styles.js +1 -1
- package/dist/components/option/option.component.js +9 -9
- package/dist/components/option/option.custom.styles.js +1 -1
- package/dist/components/option/option.js +10 -10
- package/dist/components/option/option.styles.js +1 -1
- package/dist/components/option/utility.js +1 -1
- package/dist/components/popup/popup.component.js +5 -5
- package/dist/components/popup/popup.js +6 -6
- package/dist/components/popup/popup.styles.js +1 -1
- package/dist/components/prio-nav/prio-nav.component.js +17 -17
- package/dist/components/prio-nav/prio-nav.js +18 -18
- package/dist/components/prio-nav/prio-nav.styles.js +1 -1
- package/dist/components/prio-nav/utils.js +1 -1
- package/dist/components/progress-bar/progress-bar.component.js +5 -5
- package/dist/components/progress-bar/progress-bar.custom.styles.js +1 -1
- package/dist/components/progress-bar/progress-bar.js +6 -6
- package/dist/components/progress-bar/progress-bar.styles.js +1 -1
- package/dist/components/progress-ring/progress-ring.component.js +5 -5
- package/dist/components/progress-ring/progress-ring.custom.styles.js +1 -1
- package/dist/components/progress-ring/progress-ring.js +6 -6
- package/dist/components/progress-ring/progress-ring.styles.js +1 -1
- package/dist/components/radio/radio.component.js +11 -10
- package/dist/components/radio/radio.custom.styles.js +1 -1
- package/dist/components/radio/radio.js +12 -11
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/radio-button/radio-button.component.js +8 -7
- package/dist/components/radio-button/radio-button.js +9 -8
- package/dist/components/radio-button/radio-button.styles.js +1 -1
- package/dist/components/radio-group/radio-group.component.js +10 -9
- package/dist/components/radio-group/radio-group.custom.styles.js +1 -1
- package/dist/components/radio-group/radio-group.js +11 -10
- package/dist/components/radio-group/radio-group.styles.js +1 -1
- package/dist/components/range/range.component.js +16 -15
- package/dist/components/range/range.js +17 -16
- package/dist/components/range/range.styles.js +1 -1
- package/dist/components/range/utility.js +1 -1
- package/dist/components/range-tick/range-tick.component.js +3 -3
- package/dist/components/range-tick/range-tick.js +4 -4
- package/dist/components/range-tick/range-tick.styles.js +1 -1
- package/dist/components/resize-observer/resize-observer.component.js +4 -4
- package/dist/components/resize-observer/resize-observer.styles.js +1 -1
- package/dist/components/select/select.component.js +19 -18
- package/dist/components/select/select.custom.styles.js +1 -1
- package/dist/components/select/select.js +20 -19
- package/dist/components/select/select.styles.js +1 -1
- package/dist/components/select/utility.js +1 -1
- package/dist/components/side-nav/side-nav.component.d.ts +58 -14
- package/dist/components/side-nav/side-nav.component.js +23 -20
- package/dist/components/side-nav/side-nav.js +24 -21
- package/dist/components/side-nav/side-nav.styles.js +2 -2
- package/dist/components/spinner/spinner.component.js +5 -5
- package/dist/components/spinner/spinner.custom.styles.js +1 -1
- package/dist/components/spinner/spinner.js +6 -6
- package/dist/components/spinner/spinner.styles.js +1 -1
- package/dist/components/switch/switch.component.js +9 -8
- package/dist/components/switch/switch.custom.styles.js +1 -1
- package/dist/components/switch/switch.js +10 -9
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/tab/tab.component.js +14 -13
- package/dist/components/tab/tab.custom.styles.js +1 -1
- package/dist/components/tab/tab.js +15 -14
- package/dist/components/tab/tab.styles.js +1 -1
- package/dist/components/tab-group/tab-group.component.js +15 -14
- package/dist/components/tab-group/tab-group.custom.styles.js +1 -1
- package/dist/components/tab-group/tab-group.js +16 -15
- package/dist/components/tab-group/tab-group.styles.js +1 -1
- package/dist/components/tab-panel/tab-panel.component.js +4 -4
- package/dist/components/tab-panel/tab-panel.custom.styles.js +1 -1
- package/dist/components/tab-panel/tab-panel.js +5 -5
- package/dist/components/tab-panel/tab-panel.styles.js +1 -1
- package/dist/components/tag/tag.component.js +14 -13
- package/dist/components/tag/tag.custom.styles.js +1 -1
- package/dist/components/tag/tag.js +15 -14
- package/dist/components/tag/tag.styles.js +1 -1
- package/dist/components/textarea/textarea.component.js +9 -8
- package/dist/components/textarea/textarea.custom.styles.js +1 -1
- package/dist/components/textarea/textarea.js +10 -9
- package/dist/components/textarea/textarea.styles.js +1 -1
- package/dist/components/tooltip/tooltip.component.js +9 -9
- package/dist/components/tooltip/tooltip.custom.styles.js +1 -1
- package/dist/components/tooltip/tooltip.js +10 -10
- package/dist/components/tooltip/tooltip.styles.js +1 -1
- package/dist/components/validate/utility.js +3 -3
- package/dist/components/validate/validate.component.js +18 -17
- package/dist/components/validate/validate.js +19 -18
- package/dist/components/validate/validate.styles.js +1 -1
- package/dist/custom-elements.json +186 -34
- package/dist/events/events.d.ts +1 -0
- package/dist/events/syn-clamp.d.ts +16 -0
- package/dist/styles/index.css +1 -1
- package/dist/synergy-autoloader.js +1 -1
- package/dist/synergy.js +158 -156
- package/dist/translations/de.js +5 -3
- package/dist/translations/de.js.map +2 -2
- package/dist/translations/en.js +2 -2
- package/dist/utilities/animation-registry.js +2 -2
- package/dist/utilities/base-path.js +1 -1
- package/dist/utilities/defaultSettings/base.d.ts +6 -1
- package/dist/utilities/defaultSettings/base.js +3 -2
- package/dist/utilities/defaultSettings/decorator.js +5 -4
- package/dist/utilities/defaultSettings/functions.js +4 -3
- package/dist/utilities/defaultSettings/index.js +5 -4
- package/dist/utilities/form.js +3 -3
- package/dist/utilities/icon-library.js +3 -3
- package/dist/utilities/localize.d.ts +2 -0
- package/dist/utilities/localize.js +3 -3
- package/dist/vscode.html-custom-data.json +33 -5
- package/package.json +4 -4
- package/dist/chunks/chunk.2LPH33ZQ.js.map +0 -7
- package/dist/chunks/chunk.BO7FAKBN.js.map +0 -7
- package/dist/chunks/chunk.DH5KSMJS.js.map +0 -7
- package/dist/chunks/chunk.DZZ3B5GF.js.map +0 -7
- package/dist/chunks/chunk.H3HTSQKK.js +0 -97
- package/dist/chunks/chunk.H3HTSQKK.js.map +0 -7
- package/dist/chunks/chunk.OH3PPVV4.js.map +0 -7
- package/dist/chunks/chunk.SFTF4XCD.js.map +0 -7
- /package/dist/chunks/{chunk.JDN6CDYL.js.map → chunk.25GVUTU4.js.map} +0 -0
- /package/dist/chunks/{chunk.2G7DZ3GJ.js.map → chunk.27L65BCF.js.map} +0 -0
- /package/dist/chunks/{chunk.MQZANITC.js.map → chunk.2DU5WR27.js.map} +0 -0
- /package/dist/chunks/{chunk.6IWBHFOD.js.map → chunk.2S2HN2DG.js.map} +0 -0
- /package/dist/chunks/{chunk.SMAOMVFZ.js.map → chunk.3KSZ45DK.js.map} +0 -0
- /package/dist/chunks/{chunk.RYNKWTQ6.js.map → chunk.3RF5SFKE.js.map} +0 -0
- /package/dist/chunks/{chunk.2EJ6TB2U.js.map → chunk.5RDKSWHY.js.map} +0 -0
- /package/dist/chunks/{chunk.JMBUWWA2.js.map → chunk.6IW6UFS5.js.map} +0 -0
- /package/dist/chunks/{chunk.KQQM2CWQ.js.map → chunk.77CM4WNK.js.map} +0 -0
- /package/dist/chunks/{chunk.HQ6QUSK7.js.map → chunk.7JGKUB4A.js.map} +0 -0
- /package/dist/chunks/{chunk.OBWURI5H.js.map → chunk.7TDMIG4V.js.map} +0 -0
- /package/dist/chunks/{chunk.HE2VZIBP.js.map → chunk.AB3VZ5EQ.js.map} +0 -0
- /package/dist/chunks/{chunk.3DUL2OP4.js.map → chunk.ACUIKTEY.js.map} +0 -0
- /package/dist/chunks/{chunk.ELFHYJLZ.js.map → chunk.AGK4R4ZV.js.map} +0 -0
- /package/dist/chunks/{chunk.2LYOMDFO.js.map → chunk.AYAX7BG7.js.map} +0 -0
- /package/dist/chunks/{chunk.YPSUFGKY.js.map → chunk.BNHQAKO6.js.map} +0 -0
- /package/dist/chunks/{chunk.EISTC2GP.js.map → chunk.BVEKHL6R.js.map} +0 -0
- /package/dist/chunks/{chunk.74IOULXM.js.map → chunk.BVZQ6QSY.js.map} +0 -0
- /package/dist/chunks/{chunk.UU7653PU.js.map → chunk.BXPKGVZZ.js.map} +0 -0
- /package/dist/chunks/{chunk.DX47WJSS.js.map → chunk.BY3QS7MP.js.map} +0 -0
- /package/dist/chunks/{chunk.RZG7IW73.js.map → chunk.C5SA7J6Q.js.map} +0 -0
- /package/dist/chunks/{chunk.JVSTXX5J.js.map → chunk.CD2K65PJ.js.map} +0 -0
- /package/dist/chunks/{chunk.6DPKNL3S.js.map → chunk.CQFPYSAF.js.map} +0 -0
- /package/dist/chunks/{chunk.4UOOTX72.js.map → chunk.D2ISHWZZ.js.map} +0 -0
- /package/dist/chunks/{chunk.EFO5BI6T.js.map → chunk.DXADIAFT.js.map} +0 -0
- /package/dist/chunks/{chunk.NUIJATJY.js.map → chunk.E5UUNP6E.js.map} +0 -0
- /package/dist/chunks/{chunk.4YG7EYB2.js.map → chunk.ERSMRSTV.js.map} +0 -0
- /package/dist/chunks/{chunk.TW3XHMG6.js.map → chunk.EXACNZQZ.js.map} +0 -0
- /package/dist/chunks/{chunk.XNHQJ4X7.js.map → chunk.FEVFKETA.js.map} +0 -0
- /package/dist/chunks/{chunk.XUFDCLB4.js.map → chunk.FFVIY2O3.js.map} +0 -0
- /package/dist/chunks/{chunk.QWSLKG3U.js.map → chunk.FNSMFPBM.js.map} +0 -0
- /package/dist/chunks/{chunk.JQDBNSFS.js.map → chunk.G66EQVXQ.js.map} +0 -0
- /package/dist/chunks/{chunk.A3OYJILJ.js.map → chunk.G6ITZTTW.js.map} +0 -0
- /package/dist/chunks/{chunk.JCIM6NE3.js.map → chunk.G76BKD7B.js.map} +0 -0
- /package/dist/chunks/{chunk.LC7FBSL4.js.map → chunk.GQKFJKSM.js.map} +0 -0
- /package/dist/chunks/{chunk.JTSBAJHO.js.map → chunk.HC4N72MX.js.map} +0 -0
- /package/dist/chunks/{chunk.OO6R7BWT.js.map → chunk.HEXQ5DSO.js.map} +0 -0
- /package/dist/chunks/{chunk.ZTFYI6ZI.js.map → chunk.HHBSJGPU.js.map} +0 -0
- /package/dist/chunks/{chunk.LLNE7YOD.js.map → chunk.HICOUAKU.js.map} +0 -0
- /package/dist/chunks/{chunk.6PCADVSN.js.map → chunk.HLRZCXQN.js.map} +0 -0
- /package/dist/chunks/{chunk.TBQSOTUS.js.map → chunk.HNKS3ZIU.js.map} +0 -0
- /package/dist/chunks/{chunk.DIV5RCIM.js.map → chunk.HNPPHRSN.js.map} +0 -0
- /package/dist/chunks/{chunk.OLRA37R5.js.map → chunk.HP2LEQRU.js.map} +0 -0
- /package/dist/chunks/{chunk.S5KXHITD.js.map → chunk.HZJ7FWRM.js.map} +0 -0
- /package/dist/chunks/{chunk.QPAYAMLZ.js.map → chunk.INRGTLJX.js.map} +0 -0
- /package/dist/chunks/{chunk.HFRXN2DK.js.map → chunk.IW72S7OZ.js.map} +0 -0
- /package/dist/chunks/{chunk.TZUQMH6X.js.map → chunk.J5JGYGWR.js.map} +0 -0
- /package/dist/chunks/{chunk.NB47QWRL.js.map → chunk.JGEZDRRE.js.map} +0 -0
- /package/dist/chunks/{chunk.PFSSGWUF.js.map → chunk.JMJO7VCO.js.map} +0 -0
- /package/dist/chunks/{chunk.22PGKUCU.js.map → chunk.KL546EBL.js.map} +0 -0
- /package/dist/chunks/{chunk.P3HQDPXQ.js.map → chunk.KMSUFVZK.js.map} +0 -0
- /package/dist/chunks/{chunk.3JXNFR6T.js.map → chunk.KQPO2RU5.js.map} +0 -0
- /package/dist/chunks/{chunk.XDWFPRPE.js.map → chunk.L7A52E3B.js.map} +0 -0
- /package/dist/chunks/{chunk.K7A64ZY7.js.map → chunk.LDZQIZHN.js.map} +0 -0
- /package/dist/chunks/{chunk.SKYSXSBE.js.map → chunk.LHLVVLIM.js.map} +0 -0
- /package/dist/chunks/{chunk.7RJUAC42.js.map → chunk.LI7WXEV6.js.map} +0 -0
- /package/dist/chunks/{chunk.DOIUTN5M.js.map → chunk.LYMD42B7.js.map} +0 -0
- /package/dist/chunks/{chunk.6DPMTGX6.js.map → chunk.MC5WHWBF.js.map} +0 -0
- /package/dist/chunks/{chunk.XJAGZG2W.js.map → chunk.MLMLTXOZ.js.map} +0 -0
- /package/dist/chunks/{chunk.6GBQX53P.js.map → chunk.MTN5NM4A.js.map} +0 -0
- /package/dist/chunks/{chunk.KJ5DXPFW.js.map → chunk.MVYXUHVS.js.map} +0 -0
- /package/dist/chunks/{chunk.JTSGQRUI.js.map → chunk.N47OHJ5U.js.map} +0 -0
- /package/dist/chunks/{chunk.OYFNERZO.js.map → chunk.NAJ7EYD2.js.map} +0 -0
- /package/dist/chunks/{chunk.FTFMQV75.js.map → chunk.NS3DHTOO.js.map} +0 -0
- /package/dist/chunks/{chunk.WTKBRIY4.js.map → chunk.O6KXOEJZ.js.map} +0 -0
- /package/dist/chunks/{chunk.YKQLG6R3.js.map → chunk.OBK7WMW2.js.map} +0 -0
- /package/dist/chunks/{chunk.B5BVIZ3W.js.map → chunk.OKJFZ7T2.js.map} +0 -0
- /package/dist/chunks/{chunk.CLTYOE3E.js.map → chunk.ONG2YZIJ.js.map} +0 -0
- /package/dist/chunks/{chunk.IRCX4RJL.js.map → chunk.OSPYBYAS.js.map} +0 -0
- /package/dist/chunks/{chunk.V2NAJIXY.js.map → chunk.PB2L4AWO.js.map} +0 -0
- /package/dist/chunks/{chunk.SUZPXB4O.js.map → chunk.POD3BDY6.js.map} +0 -0
- /package/dist/chunks/{chunk.NY2GAPA3.js.map → chunk.PYNYGKKB.js.map} +0 -0
- /package/dist/chunks/{chunk.PXXI4VRP.js.map → chunk.QFTB67TT.js.map} +0 -0
- /package/dist/chunks/{chunk.WHKWCNJR.js.map → chunk.QIZNAQEE.js.map} +0 -0
- /package/dist/chunks/{chunk.L6JQ4II4.js.map → chunk.QLJC3LVO.js.map} +0 -0
- /package/dist/chunks/{chunk.BC6YFGMY.js.map → chunk.R6IF6UUL.js.map} +0 -0
- /package/dist/chunks/{chunk.AAPLCFRS.js.map → chunk.R7UR6527.js.map} +0 -0
- /package/dist/chunks/{chunk.5XVVEHBO.js.map → chunk.RKRTMY5X.js.map} +0 -0
- /package/dist/chunks/{chunk.CITWLSAM.js.map → chunk.RVWB22MU.js.map} +0 -0
- /package/dist/chunks/{chunk.HLZPJC4B.js.map → chunk.S2OZHPTC.js.map} +0 -0
- /package/dist/chunks/{chunk.IY34DPIJ.js.map → chunk.SGWVV6WP.js.map} +0 -0
- /package/dist/chunks/{chunk.VQG4ENGK.js.map → chunk.SMGWT2BM.js.map} +0 -0
- /package/dist/chunks/{chunk.BMHMFPD4.js.map → chunk.STNQE2LY.js.map} +0 -0
- /package/dist/chunks/{chunk.DJHTOGW7.js.map → chunk.T2ENURIL.js.map} +0 -0
- /package/dist/chunks/{chunk.CELWLWZJ.js.map → chunk.T4JQJQYD.js.map} +0 -0
- /package/dist/chunks/{chunk.I7ZAFHZ3.js.map → chunk.TIIPIHTX.js.map} +0 -0
- /package/dist/chunks/{chunk.SRK6ZYCL.js.map → chunk.UAPJHMZJ.js.map} +0 -0
- /package/dist/chunks/{chunk.XUCEJ53P.js.map → chunk.UCJUUKMG.js.map} +0 -0
- /package/dist/chunks/{chunk.LOAB2FDA.js.map → chunk.UELDMVQY.js.map} +0 -0
- /package/dist/chunks/{chunk.EJ4C4K46.js.map → chunk.UGIL6MAB.js.map} +0 -0
- /package/dist/chunks/{chunk.UMTN2TU2.js.map → chunk.VFRZCASZ.js.map} +0 -0
- /package/dist/chunks/{chunk.EHCS6X6N.js.map → chunk.VICINZOP.js.map} +0 -0
- /package/dist/chunks/{chunk.3IVPV3E3.js.map → chunk.VJEHP5EP.js.map} +0 -0
- /package/dist/chunks/{chunk.7CRVMDW5.js.map → chunk.WMZ6JC2D.js.map} +0 -0
- /package/dist/chunks/{chunk.6YPSMCHB.js.map → chunk.XBHOEMRR.js.map} +0 -0
- /package/dist/chunks/{chunk.ZJFTAIAU.js.map → chunk.XWVTXL44.js.map} +0 -0
- /package/dist/chunks/{chunk.XPTYP3S2.js.map → chunk.Y4ZGWTWO.js.map} +0 -0
- /package/dist/chunks/{chunk.4TGDH4W7.js.map → chunk.YCEHUNIA.js.map} +0 -0
- /package/dist/chunks/{chunk.OU4PLFYW.js.map → chunk.YKZHYCCH.js.map} +0 -0
- /package/dist/chunks/{chunk.2GFK6XTO.js.map → chunk.Z4XV3SMG.js.map} +0 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import "../../chunks/chunk.RSCUHBW3.js";
|
|
2
2
|
import {
|
|
3
3
|
enableDefaultSettings
|
|
4
|
-
} from "../../chunks/chunk.
|
|
4
|
+
} from "../../chunks/chunk.E5UUNP6E.js";
|
|
5
5
|
import {
|
|
6
6
|
enableExperimentalSettingEmitEvents,
|
|
7
7
|
resetGlobalDefaultSettings,
|
|
8
8
|
setDefaultSettingsForElement,
|
|
9
9
|
setGlobalDefaultSettings
|
|
10
|
-
} from "../../chunks/chunk.
|
|
11
|
-
import "../../chunks/chunk.
|
|
12
|
-
import "../../chunks/chunk.
|
|
10
|
+
} from "../../chunks/chunk.HC4N72MX.js";
|
|
11
|
+
import "../../chunks/chunk.6QJYD7WX.js";
|
|
12
|
+
import "../../chunks/chunk.RB2JR2ND.js";
|
|
13
|
+
import "../../chunks/chunk.Z4XV3SMG.js";
|
|
13
14
|
export {
|
|
14
15
|
enableDefaultSettings,
|
|
15
16
|
enableExperimentalSettingEmitEvents,
|
package/dist/utilities/form.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFormControls,
|
|
3
3
|
serialize
|
|
4
|
-
} from "../chunks/chunk.
|
|
5
|
-
import "../chunks/chunk.
|
|
6
|
-
import "../chunks/chunk.
|
|
4
|
+
} from "../chunks/chunk.MTN5NM4A.js";
|
|
5
|
+
import "../chunks/chunk.HP2LEQRU.js";
|
|
6
|
+
import "../chunks/chunk.Z4XV3SMG.js";
|
|
7
7
|
export {
|
|
8
8
|
getFormControls,
|
|
9
9
|
serialize
|
|
@@ -2,11 +2,11 @@ import "../chunks/chunk.NKIYFJN2.js";
|
|
|
2
2
|
import {
|
|
3
3
|
registerIconLibrary,
|
|
4
4
|
unregisterIconLibrary
|
|
5
|
-
} from "../chunks/chunk.
|
|
5
|
+
} from "../chunks/chunk.RVWB22MU.js";
|
|
6
6
|
import "../chunks/chunk.YTEJW7IF.js";
|
|
7
|
-
import "../chunks/chunk.
|
|
7
|
+
import "../chunks/chunk.57DU3E3Z.js";
|
|
8
8
|
import "../chunks/chunk.234ERFCE.js";
|
|
9
|
-
import "../chunks/chunk.
|
|
9
|
+
import "../chunks/chunk.Z4XV3SMG.js";
|
|
10
10
|
export {
|
|
11
11
|
registerIconLibrary,
|
|
12
12
|
unregisterIconLibrary
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocalizeController,
|
|
3
3
|
registerTranslation
|
|
4
|
-
} from "../chunks/chunk.
|
|
5
|
-
import "../chunks/chunk.
|
|
6
|
-
import "../chunks/chunk.
|
|
4
|
+
} from "../chunks/chunk.IPGLY3H4.js";
|
|
5
|
+
import "../chunks/chunk.6DYKE5RE.js";
|
|
6
|
+
import "../chunks/chunk.Z4XV3SMG.js";
|
|
7
7
|
export {
|
|
8
8
|
LocalizeController,
|
|
9
9
|
registerTranslation
|
|
@@ -753,7 +753,7 @@
|
|
|
753
753
|
},
|
|
754
754
|
{
|
|
755
755
|
"name": "burger-menu",
|
|
756
|
-
"description": "Defines the current visibility and icon of the burger-menu icon.\nThe menu button is added automatically if the component finds a syn-side-nav in
|
|
756
|
+
"description": "Defines the current visibility and icon of the burger-menu icon.\nThe menu button is added automatically if the component finds a syn-side-nav in\nvariant=\"default\".\nThe following values can be used:\n- hidden: The burger menu is not visible\n- open: The burger menu is visible and shows the close icon\n- closed: The burger menu is visible and shows the open icon",
|
|
757
757
|
"values": [
|
|
758
758
|
{ "name": "hidden" },
|
|
759
759
|
{ "name": "open" },
|
|
@@ -878,7 +878,7 @@
|
|
|
878
878
|
},
|
|
879
879
|
{
|
|
880
880
|
"name": "syn-input",
|
|
881
|
-
"description": "Inputs collect data from the user.\n---\n\n\n### **Events:**\n - **syn-blur** - Emitted when the control loses focus.\n- **syn-change** - Emitted when an alteration to the control's value is committed by the user.\n- **syn-clear** - Emitted when the clear button is activated.\n- **syn-focus** - Emitted when the control gains focus.\n- **syn-input** - Emitted when the control receives input.\n- **syn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the input.\n- **blur()** - Removes focus from the input.\n- **select()** - Selects all the text in the input.\n- **setSelectionRange(selectionStart: _number_, selectionEnd: _number_, selectionDirection: _'forward' | 'backward' | 'none'_)** - Sets the start and end positions of the text selection (0-based).\n- **setRangeText(replacement: _string_, start: _number_, end: _number_, selectMode: _'select' | 'start' | 'end' | 'preserve'_)** - Replaces a range of text with a new string.\n- **showPicker()** - Displays the browser picker for an input element (only works if the browser supports it for the input type).\n- **stepUp()** - Increments the value of a numeric input type by the value of the step attribute.\n- **stepDown()** - Decrements the value of a numeric input type by the value of the step attribute.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - **label** - The input's label. Alternatively, you can use the `label` attribute.\n- **prefix** - Used to prepend a presentational icon or similar element to the input.\n- **suffix** - Used to append a presentational icon or similar element to the input.\n- **clear-icon** - An icon to use in lieu of the default clear icon.\n- **show-password-icon** - An icon to use in lieu of the default show password icon.\n- **hide-password-icon** - An icon to use in lieu of the default hide password icon.\n- **help-text** - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n- **increment-number-stepper** - An icon to use in lieu of the default increment number stepper icon.\n- **decrement-number-stepper** - An icon to use in lieu of the default decrement number stepper icon.\n\n### **CSS Properties:**\n - **--syn-input-autofill-shadow** - The shadow to apply when the input is autofilled. _(default: undefined)_\n- **--syn-input-autofill-readonly-shadow** - The shadow to apply when the input is readonly and autofilled. _(default: undefined)_\n- **--syn-input-autofill-text-fill-color** - The text fill color to apply when the input is autofilled. _(default: undefined)_\n- **--syn-input-autofill-caret-color** - The caret color to apply when the input is autofilled. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the label, input, and help text.\n- **form-control-label** - The label's wrapper.\n- **form-control-input** - The input's wrapper.\n- **form-control-help-text** - The help text's wrapper.\n- **base** - The component's base wrapper.\n- **input** - The internal `<input>` control.\n- **prefix** - The container that wraps the prefix.\n- **clear-button** - The clear button.\n- **password-toggle-button** - The password toggle button.\n- **suffix** - The container that wraps the suffix.\n- **stepper** - The container that wraps the number stepper.\n- **decrement-number-stepper** - The decrement number stepper button.\n- **increment-number-stepper** - The increment number stepper button.\n- **divider** - The divider between the increment and decrement number stepper buttons.",
|
|
881
|
+
"description": "Inputs collect data from the user.\n---\n\n\n### **Events:**\n - **syn-blur** - Emitted when the control loses focus.\n- **syn-change** - Emitted when an alteration to the control's value is committed by the user.\n- **syn-clear** - Emitted when the clear button is activated.\n- **syn-focus** - Emitted when the control gains focus.\n- **syn-input** - Emitted when the control receives input.\n- **syn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n- **syn-clamp** - Emitted if the numeric strategy allows autoClamp and the value is clamped to the min or max attribute.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the input.\n- **blur()** - Removes focus from the input.\n- **select()** - Selects all the text in the input.\n- **setSelectionRange(selectionStart: _number_, selectionEnd: _number_, selectionDirection: _'forward' | 'backward' | 'none'_)** - Sets the start and end positions of the text selection (0-based).\n- **setRangeText(replacement: _string_, start: _number_, end: _number_, selectMode: _'select' | 'start' | 'end' | 'preserve'_)** - Replaces a range of text with a new string.\n- **showPicker()** - Displays the browser picker for an input element (only works if the browser supports it for the input type).\n- **stepUp()** - Increments the value of a numeric input type by the value of the step attribute.\n- **stepDown()** - Decrements the value of a numeric input type by the value of the step attribute.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - **label** - The input's label. Alternatively, you can use the `label` attribute.\n- **prefix** - Used to prepend a presentational icon or similar element to the input.\n- **suffix** - Used to append a presentational icon or similar element to the input.\n- **clear-icon** - An icon to use in lieu of the default clear icon.\n- **show-password-icon** - An icon to use in lieu of the default show password icon.\n- **hide-password-icon** - An icon to use in lieu of the default hide password icon.\n- **help-text** - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n- **increment-number-stepper** - An icon to use in lieu of the default increment number stepper icon.\n- **decrement-number-stepper** - An icon to use in lieu of the default decrement number stepper icon.\n\n### **CSS Properties:**\n - **--syn-input-autofill-shadow** - The shadow to apply when the input is autofilled. _(default: undefined)_\n- **--syn-input-autofill-readonly-shadow** - The shadow to apply when the input is readonly and autofilled. _(default: undefined)_\n- **--syn-input-autofill-text-fill-color** - The text fill color to apply when the input is autofilled. _(default: undefined)_\n- **--syn-input-autofill-caret-color** - The caret color to apply when the input is autofilled. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the label, input, and help text.\n- **form-control-label** - The label's wrapper.\n- **form-control-input** - The input's wrapper.\n- **form-control-help-text** - The help text's wrapper.\n- **base** - The component's base wrapper.\n- **input** - The internal `<input>` control.\n- **prefix** - The container that wraps the prefix.\n- **clear-button** - The clear button.\n- **password-toggle-button** - The password toggle button.\n- **suffix** - The container that wraps the suffix.\n- **stepper** - The container that wraps the number stepper.\n- **decrement-number-stepper** - The decrement number stepper button.\n- **increment-number-stepper** - The increment number stepper button.\n- **divider** - The divider between the increment and decrement number stepper buttons.",
|
|
882
882
|
"attributes": [
|
|
883
883
|
{ "name": "title", "values": [] },
|
|
884
884
|
{
|
|
@@ -1060,6 +1060,25 @@
|
|
|
1060
1060
|
{ "name": "email" },
|
|
1061
1061
|
{ "name": "url" }
|
|
1062
1062
|
]
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"name": "min-fraction-digits",
|
|
1066
|
+
"description": "The minimal amount of fraction digits to use for numeric values.\nUsed to format the number when the input type is `number`.",
|
|
1067
|
+
"values": []
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
"name": "max-fraction-digits",
|
|
1071
|
+
"description": "The maximal amount of fraction digits to use for numeric values.\nUsed to format the number when the input type is `number`.",
|
|
1072
|
+
"values": []
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"name": "numeric-strategy",
|
|
1076
|
+
"description": "Defines the strategy for handling numbers in the numeric input.\nThis is used to determine how the input behaves when the user interacts with it.\n\nIncludes the following configuration options:\n\n- **autoClamp**: If true, the input will clamp the value to the min and max attributes.\n- **noStepAlign**: If true, the input will not align the value to the step attribute.\n- **noStepValidation**: If true, the input will not validate the value against the step attribute.\n\nYou may provide this as one of the following values:\n\n- 'native': Uses the native browser implementation.\n- 'modern': Uses a more intuitive implementation:\n - Values are clamped to the nearest min or max value.\n - Stepping is inclusive to the provided min and max values.\n - Provided stepping is no longer used in validation.\n- An object that matches the `NumericStrategy` type. Note this can only be set via `property`, not as an `attribute`!",
|
|
1077
|
+
"values": [
|
|
1078
|
+
{ "name": "native" },
|
|
1079
|
+
{ "name": "modern" },
|
|
1080
|
+
{ "name": "Partial<NumericStrategy>" }
|
|
1081
|
+
]
|
|
1063
1082
|
}
|
|
1064
1083
|
],
|
|
1065
1084
|
"references": [
|
|
@@ -1777,11 +1796,11 @@
|
|
|
1777
1796
|
},
|
|
1778
1797
|
{
|
|
1779
1798
|
"name": "syn-side-nav",
|
|
1780
|
-
"description": "The <syn-side-nav /> element contains secondary navigation and fits below the header.\nIt can be used to group multiple navigation items (<syn-nav-item />s) together.\n---\n\n\n### **Events:**\n - **syn-show** - Emitted when the side-nav opens.\n- **syn-after-show** - Emitted after the side-nav opens and all animations are complete.\n- **syn-hide** - Emitted when the side-nav closes.\n- **syn-after-hide** - Emitted after the side-nav closes and all animations are complete.\n\n### **Methods:**\n - **show()** - Shows the side-nav.\n- **hide()** - Hides the side-nav\n\n### **Slots:**\n - _default_ - The main content of the side-nav. Used for <syn-nav-item /> elements.\n- **footer** - The footer content of the side-nav. Used for <syn-nav-item /> elements. Please avoid having to many nav-items as it can massively influence the user experience.\n\n### **CSS Properties:**\n - **--side-nav-open-width** - The width of the side-nav if in open state _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The components base wrapper\n- **drawer** - The drawer that is used under the hood for creating the side-nav\n- **content-container** - The components main content container\n- **content** - The components main content\n- **footer-container** - The components footer content container (where the footer slot content is rendered)\n- **footer-divider** - The components footer divider\n- **footer** - The components footer content\n- **overlay** - The overlay that covers the screen behind the side-nav.\n- **panel** - The side-nav's panel (where the whole content is rendered).\n- **body** - The side-nav's body (where the default slot content is rendered)\n- **drawer__base** - The drawer's base wrapper",
|
|
1799
|
+
"description": "The <syn-side-nav /> element contains secondary navigation and fits below the header.\nIt can be used to group multiple navigation items (<syn-nav-item />s) together.\n---\n\n\n### **Events:**\n - **syn-show** - Emitted when the side-nav opens.\n- **syn-after-show** - Emitted after the side-nav opens and all animations are complete.\n- **syn-hide** - Emitted when the side-nav closes.\n- **syn-after-hide** - Emitted after the side-nav closes and all animations are complete.\n\n### **Methods:**\n - **show()** - Shows the side-nav.\n- **hide()** - Hides the side-nav\n\n### **Slots:**\n - _default_ - The main content of the side-nav. Used for <syn-nav-item /> elements.\n- **footer** - The footer content of the side-nav. Used for <syn-nav-item /> elements. Please avoid having to many nav-items as it can massively influence the user experience.\n- **toggle-label** - The label of the toggle nav-item for variant=\"sticky\".\n- **toggle-icon** - An icon to use in lieu of the default icon for the toggle nav-item for variant=\"sticky\".\n\n### **CSS Properties:**\n - **--side-nav-open-width** - The width of the side-nav if in open state _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The components base wrapper\n- **drawer** - The drawer that is used under the hood for creating the side-nav\n- **content-container** - The components main content container\n- **content** - The components main content\n- **footer-container** - The components footer content container (where the footer slot content is rendered)\n- **footer-divider** - The components footer divider\n- **footer** - The components footer content\n- **overlay** - The overlay that covers the screen behind the side-nav.\n- **panel** - The side-nav's panel (where the whole content is rendered).\n- **body** - The side-nav's body (where the default slot content is rendered)\n- **drawer__base** - The drawer's base wrapper\n- **toggle-nav-item** - The nav-item to toggle open state for variant=\"sticky\"\n- **toggle-icon** - The icon of the toggle nav-item for variant=\"sticky\"\n- **toggle-label** - The label of the toggle nav-item for variant=\"sticky\".",
|
|
1781
1800
|
"attributes": [
|
|
1782
1801
|
{
|
|
1783
1802
|
"name": "open",
|
|
1784
|
-
"description": "Indicates whether or not the side-nav is open.\nYou can toggle this attribute to show and hide the side-nav, or you can use the `show()` and\n`hide()` methods and this attribute will reflect the side-nav's open state.\n\nDepending
|
|
1803
|
+
"description": "Indicates whether or not the side-nav is open.\nYou can toggle this attribute to show and hide the side-nav, or you can use the `show()` and\n`hide()` methods and this attribute will reflect the side-nav's open state.\n\nDepending on the \"variant\" attribute, the behavior will differ.\n\n__Default__:\nWith `open` will show the side-nav with an overlay.\nWithout `open`, the side-nav will be hidden.\n\n__Rail__:\nWith `open` will show the whole side-nav with an overlay for touch devices\nor without an overlay for non-touch devices.\nWithout `open`, the side-nav will only show the prefix of nav-item's.\n\n__Sticky__:\nWith `open` will show the whole side-nav with an overlay for touch devices\nor without an overlay for non-touch devices.\nWithout `open`, the side-nav will only show the prefix of nav-item's.",
|
|
1785
1804
|
"values": []
|
|
1786
1805
|
},
|
|
1787
1806
|
{
|
|
@@ -1789,9 +1808,18 @@
|
|
|
1789
1808
|
"description": "Use the rail attribute to only show the prefix of navigation items in closed state.\nThis will open on hover on the rail navigation.\nOn touch devices the navigation opens on click and shows an overlay.\n\nNote: The Rail is only an option if all Navigation Items on the first level have an Icon.\nIf this is not the case you should use a burger navigation.",
|
|
1790
1809
|
"values": []
|
|
1791
1810
|
},
|
|
1811
|
+
{
|
|
1812
|
+
"name": "variant",
|
|
1813
|
+
"description": "The variant that should be used to show the side navigation.\n\nThe following variants are supported:\n- **default** (default): Always shows the whole content and additionally an overlay.\nThis makes especially sense for applications, where you navigate to a place and stay\nthere for a longer time.\n- **rail**: Only show the prefix of navigation items in closed state.\nThis will open on hover on the rail navigation.\nOn touch devices the navigation opens on click and shows an overlay.\nNote: The rail variant is only an option if all Navigation Items on the first level\nhave an Icon.\nIf this is not the case you should use a burger navigation.\n- **sticky**: The side-nav has a pin button to show the side-nav in small (icon only)\nand full width. This variant is only possible for non-nested navigation items.\nNote: The sticky variant is only an option if all Navigation Items on the first level\nhave an Icon and if there are only \"first level\" items.",
|
|
1814
|
+
"values": [
|
|
1815
|
+
{ "name": "default" },
|
|
1816
|
+
{ "name": "rail" },
|
|
1817
|
+
{ "name": "sticky" }
|
|
1818
|
+
]
|
|
1819
|
+
},
|
|
1792
1820
|
{
|
|
1793
1821
|
"name": "no-focus-trapping",
|
|
1794
|
-
"description": "By default, the side-nav traps the focus if in
|
|
1822
|
+
"description": "By default, the side-nav traps the focus if in variant=\"default\" and open.\nTo disable the focus trapping, set this attribute.",
|
|
1795
1823
|
"values": []
|
|
1796
1824
|
}
|
|
1797
1825
|
],
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://www.sick.com"
|
|
5
5
|
},
|
|
6
6
|
"name": "@synergy-design-system/components",
|
|
7
|
-
"version": "2.
|
|
7
|
+
"version": "2.33.0",
|
|
8
8
|
"description": "",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
"user-agent-data-types": "^0.4.2",
|
|
102
102
|
"vendorism": "^5.0.0",
|
|
103
103
|
"@synergy-design-system/eslint-config-syn": "0.1.0",
|
|
104
|
-
"@synergy-design-system/
|
|
105
|
-
"@synergy-design-system/
|
|
104
|
+
"@synergy-design-system/tokens": "2.20.0",
|
|
105
|
+
"@synergy-design-system/stylelint-config-syn": "0.1.0"
|
|
106
106
|
},
|
|
107
107
|
"release": {
|
|
108
108
|
"branches": [
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"lit": "^3.2.1"
|
|
171
171
|
},
|
|
172
172
|
"peerDependencies": {
|
|
173
|
-
"@synergy-design-system/tokens": "^2.
|
|
173
|
+
"@synergy-design-system/tokens": "^2.20.0"
|
|
174
174
|
},
|
|
175
175
|
"scripts": {
|
|
176
176
|
"build": "node scripts/build.js",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/header/header.component.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/unbound-method */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit/static-html.js';\nimport { property, state } from 'lit/decorators.js';\nimport type { CSSResultGroup } from 'lit';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport styles from './header.styles.js';\nimport SynIcon from '../icon/icon.js';\nimport type SynSideNav from '../side-nav/side-nav.component.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { watch } from '../../internal/watch.js';\n\n/**\n * @summary The <syn-header /> element provides a generic application header\n * that can be used to add applications name, toolbar and primary navigation.\n *\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-header--docs\n * @status stable\n * @since 1.10.0\n *\n * @slot label - The label for the header\n * @slot logo - The logo that should be displayed. Will fall back to the SICK logo if not provided\n * @slot meta-navigation - The meta-navigation is used to add various application toolbar icons\n * Best used with `<syn-icon-button />` and `<syn-drop-down />`\n * @slot navigation - This slot can be used to add an optional horizontal navigation\n * @slot open-burger-menu-icon - An icon to use in lieu of the default burger-menu=open state.\n * The default close icon is a 'x'.\n * @slot closed-burger-menu-icon - An icon to use in lieu of the default burger-menu=closed state.\n * The default open icon is a burger menu.\n *\n * @event syn-burger-menu-closed - Emitted when the burger menu is toggled to closed\n * @event syn-burger-menu-hidden - Emitted when the burger menu is toggled to hidden\n * @event syn-burger-menu-open - Emitted when the burger menu is toggled to open\n *\n * @csspart base - The component's base wrapper\n * @csspart content - The wrapper most content items reside\n * @csspart logo - The wrapper the application logo resides in\n * @csspart label - The element wrapping the application name\n * @csspart meta-navigation - The Item wrapping the optional application menu\n * @csspart navigation - The wrapper that is holding the optional top navigation section\n * @csspart burger-menu-toggle-button - The button that toggles the burger menu\n */\nexport default class SynHeader extends SynergyElement {\n static styles: CSSResultGroup = [\n componentStyles,\n styles,\n ];\n\n static dependencies = {\n 'syn-icon': SynIcon,\n };\n\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'logo', 'label', 'meta-navigation', 'navigation');\n\n private readonly localize = new LocalizeController(this);\n\n /**\n * Internal mutation observer\n */\n private mutationObserver: MutationObserver;\n\n /*\n * #587: If the side nav is animating, we should not allow to trigger the burger menu\n */\n private isSideNavAnimating = false;\n\n /**\n * The headers label. If you need to display HTML, use the `label` slot instead.\n */\n @property() label = '';\n\n /**\n * Defines the current visibility and icon of the burger-menu icon.\n * The menu button is added automatically if the component finds a syn-side-nav in non-rail mode.\n * The following values can be used:\n * - hidden: The burger menu is not visible\n * - open: The burger menu is visible and shows the close icon\n * - closed: The burger menu is visible and shows the open icon\n */\n @property({ attribute: 'burger-menu', reflect: true }) burgerMenu: 'hidden' | 'open' | 'closed' = 'hidden';\n\n /**\n * The side nav\n */\n @state() private sideNav: SynSideNav | null;\n\n private toggleBurgerMenu() {\n switch (this.burgerMenu) {\n case 'closed': this.burgerMenu = 'open'; break;\n case 'open': this.burgerMenu = 'closed'; break;\n default: break;\n }\n }\n\n private handleBurgerMenuToggle() {\n // If there is a side-nav in non-rail mode, toggle the open state!\n if (this.sideNav && !this.sideNav.rail && !this.isSideNavAnimating) {\n this.sideNav.open = !this.sideNav.open;\n }\n if (!this.isSideNavAnimating) {\n this.toggleBurgerMenu();\n }\n }\n\n /**\n * Automatically update the burger menu icon based\n * on the state of the side-nav, if one is connected.\n */\n private updateBurgerMenuBasedOnSideNav() {\n if (this.sideNav) {\n // Hide the burger menu icon if the side-nav is in rail mode\n if (this.sideNav.rail) {\n this.burgerMenu = 'hidden';\n } else {\n this.burgerMenu = this.sideNav.open ? 'open' : 'closed';\n }\n }\n }\n\n @watch('burgerMenu', { waitUntilFirstUpdate: true })\n handleBurgerMenu() {\n const myEvt: keyof GlobalEventHandlersEventMap = `syn-burger-menu-${this.burgerMenu}`;\n this.emit(myEvt);\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n this.mutationObserver = new MutationObserver(() => this.updateBurgerMenuBasedOnSideNav());\n }\n\n firstUpdated() {\n // Search for a side-nav and use the first found in case of the connectSideNavigation method\n // is not used by the user.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.updateComplete.then(() => {\n const sideNav = document.querySelector('syn-side-nav');\n this.connectSideNavigation(sideNav);\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // Remove observer\n this.mutationObserver.disconnect();\n }\n\n /**\n * Connect a `syn-side-nav` to add automatic interaction of the header with the side navigation\n * like showing the burger menu icon and open / close handling.\n *\n * If no side navigation is connected, the header will use the first `syn-side-nav` element it\n * finds.\n *\n * @param sideNav The side navigation to connect to the header\n */\n connectSideNavigation(sideNav: SynSideNav | null) {\n this.mutationObserver.disconnect();\n\n this.sideNav = sideNav || document.querySelector('syn-side-nav');\n if (this.sideNav) {\n // Need to call the method initially, if the side-nav is not open on connect time.\n // Otherwise the mutation observer won`t trigger the method.\n this.updateBurgerMenuBasedOnSideNav();\n this.mutationObserver.observe(this.sideNav, { attributeFilter: ['open', 'rail'], attributes: true });\n\n // #587: Make sure to not trigger the burger menu if the side nav is currently\n // animating and the user clicks on the burger menu button.\n const isAnimating = () => {\n this.isSideNavAnimating = true;\n };\n\n const isNotAnimating = () => {\n this.isSideNavAnimating = false;\n };\n\n this.sideNav.addEventListener('syn-show', isAnimating);\n this.sideNav.addEventListener('syn-hide', isAnimating);\n this.sideNav.addEventListener('syn-after-show', isNotAnimating);\n this.sideNav.addEventListener('syn-after-hide', isNotAnimating);\n }\n }\n\n render() {\n const hasNavigation = this.hasSlotController.test('navigation');\n const showBurgerMenu = this.burgerMenu !== 'hidden';\n return html`\n <header\n class=${classMap({\n header: true,\n 'header--has-burger-menu': showBurgerMenu,\n 'header--has-navigation': hasNavigation,\n })}\n part=\"base\"\n >\n <!-- .header__content -->\n <div part=\"content\" class=\"header__content\">\n\n ${showBurgerMenu\n ? html`\n <button\n aria-label=${this.localize.term(this.burgerMenu === 'closed' ? 'openMenu' : 'closeMenu')}\n class=\"header__burger-menu-toggle\"\n @click=${this.handleBurgerMenuToggle}\n part=\"burger-menu-toggle-button\"\n type=\"button\"\n >\n ${this.burgerMenu === 'open'\n ? html`\n <slot name=\"open-burger-menu-icon\">\n <syn-icon name=\"x-lg\" library=\"system\"></syn-icon>\n </slot>\n `\n : html`\n <slot name=\"closed-burger-menu-icon\">\n <syn-icon name=\"menu\" library=\"system\"></syn-icon>\n </slot>\n `}\n </button>\n `\n : ''}\n\n <div part=\"logo\" class=\"header__logo\">\n <slot name=\"logo\">\n <syn-icon name=\"logo-color\" library=\"system\" label=\"SICK Sensor Intelligence\"></syn-icon>\n </slot>\n </div>\n\n <div part=\"label\" class=\"header__label\">\n <slot name=\"label\">\n ${this.label}\n </slot>\n </div>\n\n <div part=\"meta-navigation\" class=\"header__meta-navigation\">\n <slot name=\"meta-navigation\"></slot>\n </div>\n </div>\n <!-- /.header__content -->\n\n <div part=\"navigation\" class=\"header__navigation\">\n <slot name=\"navigation\"></slot>\n </div>\n </header>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,UAAU,aAAa;AAyChC,IAAqB,YAArB,cAAuC,eAAe;AAAA,EAAtD;AAAA;AAUE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,QAAQ,SAAS,mBAAmB,YAAY;AAE9H,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAUvD;AAAA;AAAA;AAAA,SAAQ,qBAAqB;AAKjB,iBAAQ;AAUmC,sBAA2C;AAAA;AAAA,EAO1F,mBAAmB;AACzB,YAAQ,KAAK,YAAY;AAAA,MACzB,KAAK;AAAU,aAAK,aAAa;AAAQ;AAAA,MACzC,KAAK;AAAQ,aAAK,aAAa;AAAU;AAAA,MACzC;AAAS;AAAA,IACT;AAAA,EACF;AAAA,EAEQ,yBAAyB;AAE/B,QAAI,KAAK,WAAW,CAAC,KAAK,QAAQ,QAAQ,CAAC,KAAK,oBAAoB;AAClE,WAAK,QAAQ,OAAO,CAAC,KAAK,QAAQ;AAAA,IACpC;AACA,QAAI,CAAC,KAAK,oBAAoB;AAC5B,WAAK,iBAAiB;AAAA,IACxB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMQ,iCAAiC;AACvC,QAAI,KAAK,SAAS;AAEhB,UAAI,KAAK,QAAQ,MAAM;AACrB,aAAK,aAAa;AAAA,MACpB,OAAO;AACL,aAAK,aAAa,KAAK,QAAQ,OAAO,SAAS;AAAA,MACjD;AAAA,IACF;AAAA,EACF;AAAA,EAGA,mBAAmB;AACjB,UAAM,QAA2C,mBAAmB,KAAK,UAAU;AACnF,SAAK,KAAK,KAAK;AAAA,EACjB;AAAA,EAEA,oBAA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K,eAAe,WAAW,aAAa,WAAW,CAAC;AAAA;AAAA,6BAE/E,KAAK,sBAAsB;AAAA;AAAA;AAAA;AAAA,sBAIlC,KAAK,eAAe,SAClB;AAAA;AAAA;AAAA;AAAA,4BAKA;AAAA;AAAA;AAAA;AAAA,yBAIC;AAAA;AAAA,oBAGT,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAUF,KAAK,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAexB;AACF;AA7MqB,UACZ,SAAyB;AAAA,EAC9B;AAAA,EACA;AACF;AAJmB,UAMZ,eAAe;AAAA,EACpB,YAAY;AACd;AAmBY;AAAA,EAAX,SAAS;AAAA,GA3BS,UA2BP;AAU2C;AAAA,EAAtD,SAAS,EAAE,WAAW,eAAe,SAAS,KAAK,CAAC;AAAA,GArClC,UAqCoC;AAKtC;AAAA,EAAhB,MAAM;AAAA,GA1CY,UA0CF;AAoCjB;AAAA,EADC,MAAM,cAAc,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA7EhC,UA8EnB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/input/input.component.ts", "../../src/internal/longpress.ts"],
|
|
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 { classMap } from 'lit/directives/class-map.js';\nimport { defaultValue } from '../../internal/default-value.js';\nimport { FormControlController } from '../../internal/form.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport formControlStyles from '../../styles/form-control.styles.js';\nimport formControlCustomStyles from '../../styles/form-control.custom.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIcon from '../icon/icon.component.js';\nimport SynDivider from '../divider/divider.component.js';\nimport { longPress } from '../../internal/longpress.js';\nimport styles from './input.styles.js';\nimport customStyles from './input.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\nimport { enableDefaultSettings } from '../../utilities/defaultSettings/decorator.js';\n\n/**\n * @summary Inputs collect data from the user.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-input--docs\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n * @dependency syn-divider\n *\n * @slot label - The input's label. Alternatively, you can use the `label` attribute.\n * @slot prefix - Used to prepend a presentational icon or similar element to the input.\n * @slot suffix - Used to append a presentational icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n * @slot increment-number-stepper - An icon to use in lieu of the default increment number stepper icon.\n * @slot decrement-number-stepper - An icon to use in lieu of the default decrement number stepper icon.\n *\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-change - Emitted when an alteration to the control's value is committed by the user.\n * @event syn-clear - Emitted when the clear button is activated.\n * @event syn-focus - Emitted when the control gains focus.\n * @event syn-input - Emitted when the control receives input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart base - The component's base wrapper.\n * @csspart input - The internal `<input>` control.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart clear-button - The clear button.\n * @csspart password-toggle-button - The password toggle button.\n * @csspart suffix - The container that wraps the suffix.\n * @csspart stepper - The container that wraps the number stepper.\n * @csspart decrement-number-stepper - The decrement number stepper button.\n * @csspart increment-number-stepper - The increment number stepper button.\n * @csspart divider - The divider between the increment and decrement number stepper buttons.\n *\n * @cssproperty --syn-input-autofill-shadow - The shadow to apply when the input is autofilled.\n * @cssproperty --syn-input-autofill-readonly-shadow - The shadow to apply when the input is readonly and autofilled.\n * @cssproperty --syn-input-autofill-text-fill-color - The text fill color to apply when the input is autofilled.\n * @cssproperty --syn-input-autofill-caret-color - The caret color to apply when the input is autofilled.\n */\n@enableDefaultSettings('SynInput')\nexport default class SynInput extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = [componentStyles, formControlStyles, styles, formControlCustomStyles, customStyles];\n static dependencies = {\n\t\t'syn-icon': SynIcon,\n\t\t'syn-divider': SynDivider\n\t};\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['syn-blur', 'syn-input']\n });\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label', 'prefix', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property({ reflect: true }) title = ''; // make reactive to pass through\n\n private __numberInput = Object.assign(document.createElement('input'), { type: 'number' });\n private __dateInput = Object.assign(document.createElement('input'), { type: 'date' });\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** The input's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle = false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible = false;\n\n /** Hides the increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons = false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string;\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false')\n }\n })\n spellcheck = true;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n /**\n * Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. This will use the native `<input type=\"{{type}}\">` implementation and may result in an error.\n */\n get valueAsDate() {\n this.__dateInput.type = this.type;\n this.__dateInput.value = this.value;\n return this.input?.valueAsDate || this.__dateInput.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n this.__dateInput.type = this.type;\n this.__dateInput.valueAsDate = newValue;\n this.value = this.__dateInput.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n this.__numberInput.value = this.value;\n return this.input?.valueAsNumber || this.__numberInput.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n this.__numberInput.valueAsNumber = newValue;\n this.value = this.__numberInput.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleStep(){\n this.handleInput();\n this.input.focus();\n }\n\n private handleStepUp() {\n this.stepUp();\n this.handleStep();\n }\n\n private handleStepDown() {\n this.stepDown();\n this.handleStep();\n }\n \n private isDecrementDisabled() {\n if(this.disabled || this.readonly) {\n return true;\n }\n\n if (this.min === undefined || this.min === null || this.disabled) {\n return false;\n }\n\n const min = typeof this.min === 'string' ? parseFloat(this.min) : this.min\n return this.valueAsNumber <= min;\n }\n\n private isIncrementDisabled() {\n if(this.disabled || this.readonly) {\n return true;\n }\n\n if (this.max === undefined || this.max === null) {\n return false;\n }\n\n const max = typeof this.max === 'string' ? parseFloat(this.max) : this.max\n return this.valueAsNumber >= max;\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emit('syn-change');\n }\n\n private handleClearClick(event: MouseEvent) {\n event.preventDefault();\n\n if (this.value !== '') {\n this.value = '';\n this.emit('syn-clear');\n this.emit('syn-input');\n this.emit('syn-change');\n }\n\n this.input.focus();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n this.emit('syn-input');\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n // See https://github.com/shoelace-style/shoelace/pull/988\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n this.formControlController.updateValidity();\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n this.formControlController.updateValidity();\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n const selectionStart = start ?? this.input.selectionStart!;\n const selectionEnd = end ?? this.input.selectionEnd!;\n\n this.input.setRangeText(replacement, selectionStart, selectionEnd, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n showPicker() {\n if ('showPicker' in HTMLInputElement.prototype) {\n this.input.showPicker();\n }\n }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasPrefixSlot = this.hasSlotController.test('prefix');\n const hasSuffixSlot = this.hasSlotController.test('suffix');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n const hasClearIcon = this.clearable && !this.disabled && !this.readonly;\n const isClearIconVisible = hasClearIcon && (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-prefix': hasPrefixSlot,\n 'form-control--has-suffix': hasSuffixSlot\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <div\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--standard': !this.readonly,\n 'input--readonly': this.readonly,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons\n })}\n >\n <span part=\"prefix\" class=\"input__prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control\"\n type=${this.type === 'password' && this.passwordVisible ? 'text' : this.type}\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${isClearIconVisible\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=${this.localize.term('clearEntry')}\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <syn-icon name=\"x-circle-fill\" library=\"system\"></syn-icon>\n </slot>\n </button>\n `\n : ''}\n ${this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.localize.term(this.passwordVisible ? 'hidePassword' : 'showPassword')}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <syn-icon name=\"eye-slash\" library=\"system\"></syn-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <syn-icon name=\"eye\" library=\"system\"></syn-icon>\n </slot>\n `}\n </button>\n `\n : ''}\n\n <span part=\"suffix\" class=\"input__suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n\n ${this.type === 'number' && !this.noSpinButtons\n ? html`\n <div part=\"stepper\" class=\"input__number-stepper\">\n <button\n part=\"decrement-number-stepper\"\n class=\"input__number-stepper-button\"\n type=\"button\"\n ?disabled=${this.isDecrementDisabled()}\n aria-hidden=\"true\"\n ${longPress({ start: () => this.handleStepDown(), end: () => this.handleChange()})}\n tabindex=\"-1\"\n >\n <slot name=\"decrement-number-stepper\">\n <syn-icon name=\"indeterminate\" library=\"system\"></syn-icon>\n </slot>\n </button>\n <syn-divider class=\"input__number-divider\" part=\"divider\" vertical></syn-divider>\n <button\n part=\"increment-number-stepper\"\n class=\"input__number-stepper-button\"\n type=\"button\"\n ?disabled=${this.isIncrementDisabled()}\n aria-hidden=\"true\"\n ${longPress({ start: () => this.handleStepUp(), end: () => this.handleChange()})}\n tabindex=\"-1\"\n >\n <slot name=\"increment-number-stepper\">\n <syn-icon name=\"add\" library=\"system\"></syn-icon>\n </slot>\n </button>\n </div>\n `\n : ''}\n </div>\n </div>\n\n <div\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">${this.helpText}</slot>\n </div>\n </div>\n `;\n }\n}\n", "import { type ElementPart, noChange, nothing } from 'lit';\nimport {\n AsyncDirective,\n type DirectiveParameters,\n type Part,\n PartType,\n directive,\n} from 'lit/async-directive.js';\n\ntype Callbacks = {\n start: () => void;\n end: () => void;\n};\n\n/**\n * A directive that determines,if a HTMLButtonElement is long pressed or only clicked.\n * Depending on the state it executes the callback once or repeating.\n *\n * Usage:\n *\n * <button\n * ${longPress({ start: () => this.handleStepUp(), end: () => this.handleChange()})}\n * >\n * my button\n * </button>\n */\nclass LongPressDirective extends AsyncDirective {\n host: HTMLButtonElement;\n\n observer: MutationObserver;\n\n callbacks: Callbacks;\n\n interval: NodeJS.Timeout;\n\n timeout: NodeJS.Timeout;\n\n constructor(part: Part) {\n super(part);\n if (part.type !== PartType.ELEMENT || !(part.element instanceof HTMLButtonElement)) {\n throw new Error('The `longPress` directive must be used on an HTMLButtonElement.');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this\n render(_callback: Callbacks): typeof nothing {\n return nothing;\n }\n\n update(part: ElementPart, [callbacks]: DirectiveParameters<this>): typeof noChange {\n // initial call\n if (this.callbacks === undefined && this.host === undefined) {\n this.host = part.element as HTMLButtonElement;\n this.callbacks = { ...callbacks };\n this.host.addEventListener('pointerdown', this.handlePointerDown);\n }\n\n return noChange;\n }\n\n reconnected(): void {\n this.host.addEventListener('pointerdown', this.handlePointerDown);\n }\n\n protected disconnected(): void {\n this.stopSpinningAndCleanUp();\n this.host.removeEventListener('pointerdown', this.handlePointerDown);\n document.removeEventListener('pointerup', this.handlePointerUp);\n }\n\n private handlePointerDown = (event: PointerEvent) => {\n // do nothing if the click was not done from the left mouse button or if the button is disabled\n if (event.button !== 0 || this.host.disabled) {\n return;\n }\n this.spinOnLongPressCallback(event);\n };\n\n /**\n * Start spinning on long press clicks otherwise handle as single click event\n */\n private spinOnLongPressCallback(event: PointerEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n // Start spinning only on long press\n this.timeout = setTimeout(() => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.timeout = undefined;\n this.interval = setInterval(() => {\n this.callbacks.start();\n }, 50);\n }, 500);\n\n document.addEventListener('pointerup', this.handlePointerUp);\n\n // when buttons becoming disabled during long-press\n this.observer?.disconnect();\n this.observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === 'disabled') {\n this.stopSpinningAndCleanUp();\n }\n });\n });\n this.observer.observe(this.host, { attributes: true });\n }\n\n private handlePointerUp = (pointerUp?: PointerEvent) => {\n pointerUp?.preventDefault();\n pointerUp?.stopPropagation();\n\n // we did not start to spin\n if (this.timeout) {\n this.callbacks.start();\n }\n\n this.stopSpinningAndCleanUp();\n\n this.callbacks.end();\n document.removeEventListener('pointerup', this.handlePointerUp);\n };\n\n /**\n * Stop the spinning and clean up all timer and observer\n */\n private stopSpinningAndCleanUp() {\n // stop spinning\n clearInterval(this.interval);\n\n clearTimeout(this.timeout);\n this.observer?.disconnect();\n }\n}\n\nexport const longPress = directive(LongPressDirective);\n\nexport type { LongPressDirective };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,gBAAgB;AAIzB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAErB,SAAS,UAAU,OAAO,aAAa;;;AChBvC,SAA2B,UAAU,eAAe;AACpD;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAmBP,IAAM,qBAAN,cAAiC,eAAe;AAAA,EAW9C,YAAY,MAAY;AACtB,UAAM,IAAI;AAgCZ,SAAQ,oBAAoB,CAAC,UAAwB;AAEnD,UAAI,MAAM,WAAW,KAAK,KAAK,KAAK,UAAU;AAC5C;AAAA,MACF;AACA,WAAK,wBAAwB,KAAK;AAAA,IACpC;AAiCA,SAAQ,kBAAkB,CAAC,cAA6B;AACtD,6CAAW;AACX,6CAAW;AAGX,UAAI,KAAK,SAAS;AAChB,aAAK,UAAU,MAAM;AAAA,MACvB;AAEA,WAAK,uBAAuB;AAE5B,WAAK,UAAU,IAAI;AACnB,eAAS,oBAAoB,aAAa,KAAK,eAAe;AAAA,IAChE;AAnFE,QAAI,KAAK,SAAS,SAAS,WAAW,EAAE,KAAK,mBAAmB,oBAAoB;AAClF,YAAM,IAAI,MAAM,iEAAiE;AAAA,IACnF;AAAA,EACF;AAAA;AAAA,EAGA,OAAO,WAAsC;AAC3C,WAAO;AAA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S;AAAA,GArHS,SAqHP;AAGiB;AAAA,EAA5B,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GAxHR,SAwHU;AAGjB;AAAA,EAAX,SAAS;AAAA,GA3HS,SA2HP;AAWZ;AAAA,EARC,SAAS;AAAA,IACR,MAAM;AAAA,IACN,WAAW;AAAA;AAAA,MAET,eAAe,WAAU,CAAC,SAAS,UAAU,UAAU,QAAQ;AAAA,MAC/D,aAAa,WAAU,QAAQ,SAAS;AAAA,IAC1C;AAAA,EACF,CAAC;AAAA,GArIkB,SAsInB;AAMY;AAAA,EAAX,SAAS;AAAA,GA5IS,SA4IP;AAwJZ;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAnS9B,SAoSnB;AAMA;AAAA,EADC,MAAM,QAAQ,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAzS1B,SA0SnB;AAQM;AAAA,EADL,MAAM,SAAS,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAjT3B,SAkTb;AAlTa,WAArB;AAAA,EADC,sBAAsB,UAAU;AAAA,GACZ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/nav-item/nav-item.component.ts"],
|
|
4
|
-
"sourcesContent": ["import { classMap } from 'lit/directives/class-map.js';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport { html, literal } from 'lit/static-html.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport SynDivider from '../divider/divider.component.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { watch } from '../../internal/watch.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport styles from './nav-item.styles.js';\n\n/**\n * @summary Flexible button / link component that can be used to quickly build navigations.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-nav-item--docs\n * Takes one of 3 forms:\n * - button (default),\n * - link (overrides button if a 'href' is provided),\n * - or accordion (overrides all other if 'children' slot is defined).\n *\n * @status stable\n * @since 1.14.0\n *\n * @dependency syn-divider\n *\n * @event syn-show - Emitted when the navigation item:\n * - has children,\n * - and is clicked while HTML details are hidden.\n *\n * @event syn-hide - Emitted when the navigation item:\n * - has children,\n * - and is clicked while HTML details are shown.\n *\n * @event syn-blur - Emitted when the button loses focus.\n * @event syn-focus - Emitted when the button gains focus.\n *\n * @slot - The navigation item's label.\n * @slot prefix - A presentational prefix icon or similar element.\n * @slot suffix - A presentational suffix icon or similar element.\n * @slot children - Slot used to provide nested child navigation elements.\n * If provided, details and summary elements will be used.\n * A chevron will be shown on the right side regardless of the chevron property.\n *\n * @csspart base - The component's base wrapper including children.\n * @csspart children - The wrapper that holds the children\n * @csspart content-wrapper - The component's content wrapper.\n * @csspart content - The component's content excluding children.\n * @csspart current-indicator - The indicator used when current is set to true\n * @csspart chevron - The container that wraps the chevron.\n * @csspart details - The details element rendered when there are children available\n * @csspart divider - The components optional top divider.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n *\n * @cssproperty --indentation - Numeric value, indicating the level the item is placed at.\n * @cssproperty --indentation-stepping - The amount of pixels each level will indent.\n * @cssproperty --display-children - Display property of the children. Defaults to \"contents\"\n */\nexport default class SynNavItem extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles];\n\n static dependencies = {\n 'syn-divider': SynDivider,\n };\n\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'children', 'prefix', 'suffix');\n\n private resizeObserver: ResizeObserver;\n\n private mutationObserver: MutationObserver;\n\n /**\n * The current focus state\n */\n @state() private hasFocus = false;\n\n /**\n * Only the prefix should be displayed\n */\n @state() private showPrefixOnly = false;\n\n /**\n * A nested nav-item is marked as current\n */\n @state() private currentMarkedChild = false;\n\n /**\n * The content area is multiline\n */\n @state() private isMultiLine = false;\n\n /**\n * Reference to the children slot\n */\n @query('slot[name=\"children\"]') childrenSlot: HTMLSlotElement;\n\n /**\n * Reference to the outermost button\n */\n @query('.nav-item') control: HTMLButtonElement | HTMLLinkElement | HTMLElement;\n\n /**\n * The navigation item's href target.\n * If provided, the navigation item will use an anchor tag otherwise it will use a button tag.\n *\n * If the 'children' slot is provided, the navigation item will ignore the 'href' and use\n * accordion behavior.\n */\n @property({ reflect: true, type: String }) href: string;\n\n /** Tells the browser where to open the link. Only used when `href` is present. */\n @property() target: '_blank' | '_parent' | '_self' | '_top';\n\n /**\n * When using `href`, this attribute will map to the underlying link's `rel` attribute.\n * Unlike regular links, the default is `noreferrer noopener` to prevent security exploits.\n *\n * However, if you're using `target` to point to a specific tab/window,\n * this will prevent that from working correctly.\n *\n * You can remove or change the default value by setting the attribute\n * to an empty string or a value of your choice, respectively.\n */\n @property() rel = 'noreferrer noopener';\n\n /*\n * Indicates that the navigation item is currently selected.\n * The aria-current attribute is set to \"page\" on the host if true.\n */\n @property({ reflect: true, type: Boolean }) current = false;\n\n /**\n * Disables the navigation item.\n */\n @property({ reflect: true, type: Boolean }) disabled = false;\n\n /**\n * The navigation item's orientation.\n */\n @property({ reflect: true, type: Boolean }) horizontal = false;\n\n /**\n * Appends a chevron to the right side of a navigation item.\n * Only used if `horizontal` is false.\n */\n @property({ reflect: true, type: Boolean }) chevron = false;\n\n /**\n * Reflects HTML details element state and allows control from parent.\n * Only used if `horizontal` is false and `children` is defined.\n */\n @property({ reflect: true, type: Boolean }) open = false;\n\n /**\n * Toggle to true to show a divider above the element.\n * Only available when horizontal is false.\n */\n @property({ reflect: true, type: Boolean }) divider = false;\n\n private isButton(): boolean {\n return !this.href && !this.hasSlotController.test('children');\n }\n\n private isLink(): boolean {\n return !!this.href && !this.hasSlotController.test('children');\n }\n\n private isAccordion(): boolean {\n return this.hasSlotController.test('children');\n }\n\n // eslint-disable-next-line class-methods-use-this\n private getNavItemChildren(childrenSlot: HTMLSlotElement): SynNavItem[] {\n return Array.from(\n childrenSlot?.assignedElements({\n flatten: true,\n }) as HTMLElement[]\n || [],\n )\n .map(slottedElement => (slottedElement.tagName.toLowerCase() === 'syn-nav-item' ? slottedElement as SynNavItem : Array.from(slottedElement.querySelectorAll<SynNavItem>(':scope > syn-nav-item'))))\n .flat();\n }\n\n private getAllNestedNavItems(childrenSlot: HTMLSlotElement): SynNavItem[] {\n const allNavItems = this.getNavItemChildren(childrenSlot);\n\n const nestedNavItems = allNavItems\n .map(item => item.getAllNestedNavItems(item.childrenSlot))\n .flat();\n\n return allNavItems.concat(nestedNavItems);\n }\n\n private handleCurrentMarkedChild() {\n const sideNav = this.closest('syn-side-nav');\n\n if (!this.open || !!sideNav?.rail) {\n this.currentMarkedChild = this\n .getAllNestedNavItems(this.childrenSlot)\n .some(item => item.current);\n }\n }\n\n private handleClickButton(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n private handleClickSummary(e: MouseEvent) {\n e.preventDefault();\n e.stopPropagation();\n\n if (this.disabled) return;\n\n if (this.open) {\n this.hideDetails();\n } else {\n this.showDetails();\n }\n }\n\n private hideDetails() {\n this.open = false;\n this.emit('syn-hide', {\n cancelable: true,\n });\n }\n\n private showDetails() {\n this.open = true;\n this.emit('syn-show', {\n cancelable: true,\n });\n }\n\n /**\n * Automatically add the correct level of indentation for sub items if none is provided\n */\n private handleSlotChange() {\n const computedStyle = getComputedStyle(this);\n const lengthStyle = computedStyle.length;\n\n // This workaround is needed for firefox.\n // When the nav-item is used inside a custom-element with a custom-element in it\n // (e.g syn-side-nav with integrated syn-drawer), the getComputedStyle property is not yet there\n // Moving it in the next render cycle works.\n // Probably related to the firefox special behavior. See: https://caniuse.com/mdn-api_window_getcomputedstyle\n if (lengthStyle === 0) {\n setTimeout(() => {\n this.handleSlotChange();\n });\n return;\n }\n\n this.handleCurrentMarkedChild();\n\n // Use the current level of the component\n const level = computedStyle.getPropertyValue('--indentation');\n\n // We allow at most 3 levels\n const nextLevel = Math.min(parseInt(level, 10) + 1, 2);\n\n this.getNavItemChildren(this.childrenSlot)\n .forEach(item => {\n item.style.setProperty('--indentation', nextLevel.toFixed(0));\n });\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleWidth(entries: ResizeObserverEntry[]) {\n entries.forEach(entry => {\n if (entry.contentRect.width < 100) {\n const hasPrefix = this.hasSlotController.test('prefix');\n this.showPrefixOnly = hasPrefix;\n } else {\n this.showPrefixOnly = false;\n }\n\n if (entry.contentRect.height > 48) {\n this.isMultiLine = true;\n } else {\n this.isMultiLine = false;\n }\n });\n }\n\n // Make sure the resize observer is disconnected when the horizontal property is set to true\n // In this case we, never want it to use prefix only mode\n @watch('horizontal', { waitUntilFirstUpdate: true })\n handleHorizontalChange() {\n if (this.horizontal) {\n this.resizeObserver.disconnect();\n } else {\n this.resizeObserver.observe(this);\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.resizeObserver = new ResizeObserver((entries) => this.handleWidth(entries));\n if (!this.horizontal) {\n this.resizeObserver.observe(this);\n }\n }\n\n firstUpdated(_changedProperties: PropertyValues) {\n super.firstUpdated(_changedProperties);\n this.mutationObserver = new MutationObserver(() => {\n if (this.childrenSlot) {\n this.handleCurrentMarkedChild();\n }\n });\n\n this.mutationObserver.observe(this, {\n attributeFilter: ['current', 'open'],\n childList: true,\n subtree: true,\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.resizeObserver?.disconnect();\n this.mutationObserver?.disconnect();\n }\n\n /**\n * Removes focus from the button.\n */\n blur() {\n this.control.blur();\n }\n\n /**\n * Simulates a click on the nav-items button, link or summary.\n */\n click() {\n this.control.click();\n }\n\n /**\n * Sets focus on the nav-item\n */\n focus(options?: FocusOptions) {\n this.control.focus(options);\n }\n\n // eslint-disable-next-line complexity\n render() {\n const isButton = this.isButton();\n const isLink = this.isLink();\n const isAccordion = this.isAccordion();\n\n const sideNav = this.closest('syn-side-nav');\n\n const showCurrentIndicatorForNested = (this.currentMarkedChild && !this.open)\n || (this.currentMarkedChild && this.open && !!sideNav?.rail && !sideNav?.open);\n\n // Defines the initial tag to use for the root component\n let tag = literal`button`;\n if (isAccordion) tag = literal`summary`;\n else if (isLink) tag = literal`a`;\n\n const hasChevron = (this.chevron || isAccordion) && !this.horizontal;\n\n // Define the click method to use\n let clickAction;\n if (isAccordion) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n clickAction = this.handleClickSummary;\n } else if (isButton) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n clickAction = this.handleClickButton;\n }\n\n /* eslint-disable lit/no-invalid-html */\n /* eslint-disable lit/binding-positions */\n /* eslint-disable @typescript-eslint/unbound-method */\n const root = html`\n <${tag}\n aria-controls=${ifDefined(isAccordion ? 'navigation-item-details' : undefined)}\n aria-current=${ifDefined(this.current ? 'page' : undefined)}\n aria-disabled=${this.disabled}\n @blur=${this.handleBlur}\n class=${classMap({\n 'nav-item': true,\n 'nav-item--current': this.current || showCurrentIndicatorForNested,\n 'nav-item--disabled': this.disabled,\n 'nav-item--focused': this.hasFocus,\n 'nav-item--has-content': this.hasSlotController.test('[default]'),\n 'nav-item--has-prefix': this.hasSlotController.test('prefix'),\n 'nav-item--has-suffix': this.hasSlotController.test('suffix'),\n 'nav-item--horizontal': this.horizontal,\n 'nav-item--is-link': isLink,\n 'nav-item--multi-line': this.isMultiLine,\n 'nav-item--show-prefix-only': this.showPrefixOnly,\n 'nav-item--vertical': !this.horizontal,\n 'nav-item-is-accordion': isAccordion,\n })}\n @click=${clickAction}\n ?disabled=${ifDefined(isLink ? undefined : this.disabled)}\n @focus=${this.handleFocus}\n href=${ifDefined(isLink ? this.href : undefined)}\n part=\"base\"\n role=${isLink ? 'link' : 'button'}\n rel=${ifDefined(isLink ? this.rel : undefined)}\n tabindex=${this.disabled ? '-1' : '0'}\n target=${ifDefined(isLink ? this.target : undefined)}\n >\n\n ${this.divider && !this.horizontal\n ? html`<syn-divider class=\"divider\" part=\"divider\"></syn-divider>`\n : ''\n }\n\n <div class=\"nav-item__content\" part=\"content-wrapper\">\n <slot name=\"prefix\" part=\"prefix\" class=\"nav-item__prefix\"></slot>\n\n <div part=\"content-container\" class=\"nav-item__content-container\">\n <slot part=\"content\"></slot>\n </div>\n\n <slot name=\"suffix\" part=\"suffix\" class=\"nav-item__suffix\"></slot>\n\n ${hasChevron ? html`\n <syn-icon\n class=${classMap({\n 'nav-item__chevron': true,\n 'nav-item__chevron-open': this.open,\n })}\n color=\"currentColor\"\n library=\"system\"\n name=\"chevron-down\"\n part=\"chevron\"\n /></syn-icon>`\n : ''}\n\n <div\n class=${classMap({\n 'current-indicator': true,\n 'current-indicator--disabled': this.disabled,\n 'current-indicator--visible': this.current || showCurrentIndicatorForNested,\n })}\n part=\"current-indicator\"\n >\n </div>\n </div>\n\n </${tag}>\n `;\n /* eslint-enable lit/no-invalid-html */\n /* eslint-enable lit/binding-positions */\n\n return isAccordion ? html`\n <details\n id=\"navigation-item-details\"\n ?open=${this.open}\n part=\"details\"\n >\n ${root}\n <slot\n class=\"children\"\n name=\"children\"\n part=\"children\"\n @slotchange=${this.handleSlotChange}\n ></slot>\n </details>\n ` : root;\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AAEzB,SAAS,MAAM,eAAe;AAC9B,SAAS,UAAU,OAAO,aAAa;AACvC,SAAS,iBAAiB;AAsD1B,IAAqB,aAArB,cAAwC,eAAe;AAAA,EAAvD;AAAA;AAOE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,YAAY,UAAU,QAAQ;AASnG,SAAQ,WAAW;AAKnB,SAAQ,iBAAiB;AAKzB,SAAQ,qBAAqB;AAK7B,SAAQ,cAAc;AAkCnB,eAAM;AAM0B,mBAAU;AAKV,oBAAW;AAKX,sBAAa;AAMb,mBAAU;AA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EvB,WAuEyB;AAKA;AAAA,EAA3C,SAAS,EAAE,SAAS,MAAM,MAAM,QAAQ,CAAC;AAAA,GA5EvB,WA4EyB;AAKA;AAAA,EAA3C,SAAS,EAAE,SAAS,MAAM,MAAM,QAAQ,CAAC;AAAA,GAjFvB,WAiFyB;AAMA;AAAA,EAA3C,SAAS,EAAE,SAAS,MAAM,MAAM,QAAQ,CAAC;AAAA,GAvFvB,WAuFyB;AAMA;AAAA,EAA3C,SAAS,EAAE,SAAS,MAAM,MAAM,QAAQ,CAAC;AAAA,GA7FvB,WA6FyB;AAMA;AAAA,EAA3C,SAAS,EAAE,SAAS,MAAM,MAAM,QAAQ,CAAC;AAAA,GAnGvB,WAmGyB;AA+I5C;AAAA,EADC,MAAM,cAAc,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAjPhC,WAkPnB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/side-nav/side-nav.component.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/unbound-method */\nimport { classMap } from 'lit/directives/class-map.js';\nimport type { CSSResultGroup } from 'lit';\nimport { html } from 'lit/static-html.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport styles from './side-nav.styles.js';\nimport SynDrawer from '../drawer/drawer.component.js';\nimport SynDivider from '../divider/divider.component.js';\nimport { waitForEvent } from '../../internal/event.js';\nimport { watch } from '../../internal/watch.js';\nimport { getAnimation, setAnimation, setDefaultAnimation } from '../../utilities/animation-registry.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { unlockBodyScrolling } from '../../internal/scroll.js';\nimport { blurActiveElement } from '../../internal/closeActiveElement.js';\n\n/**\n * @summary The <syn-side-nav /> element contains secondary navigation and fits below the header.\n * It can be used to group multiple navigation items (<syn-nav-item />s) together.\n *\n * @example\n * <syn-side-nav open>\n * <syn-nav-item >Item 1</syn-nav-item>\n * <syn-nav-item divider>Item 2</syn-nav-item>\n * </syn-side-nav>\n *\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-side-nav--docs\n * @status stable\n * @since 1.14.0\n *\n * @dependency syn-divider\n * @dependency syn-drawer\n *\n * @slot - The main content of the side-nav. Used for <syn-nav-item /> elements.\n * @slot footer - The footer content of the side-nav. Used for <syn-nav-item /> elements.\n * Please avoid having to many nav-items as it can massively influence the user experience.\n *\n * @event syn-show - Emitted when the side-nav opens.\n * @event syn-after-show - Emitted after the side-nav opens and all animations are complete.\n * @event syn-hide - Emitted when the side-nav closes.\n * @event syn-after-hide - Emitted after the side-nav closes and all animations are complete.\n *\n * @csspart base - The components base wrapper\n * @csspart drawer - The drawer that is used under the hood for creating the side-nav\n * @csspart content-container - The components main content container\n * @csspart content - The components main content\n * @csspart footer-container - The components footer content container\n (where the footer slot content is rendered)\n * @csspart footer-divider - The components footer divider\n * @csspart footer - The components footer content\n * @csspart overlay - The overlay that covers the screen behind the side-nav.\n * @csspart panel - The side-nav's panel (where the whole content is rendered).\n * @csspart body - The side-nav's body (where the default slot content is rendered)\n * @csspart drawer__base - The drawer's base wrapper\n *\n * @cssproperty --side-nav-open-width - The width of the side-nav if in open state\n *\n * @animation sideNav.showNonRail - The animation to use when showing the side-nav in non-rail mode.\n * @animation sideNav.showRail - The animation to use when showing the side-nav in rail mode.\n * @animation sideNav.hideNonRail - The animation to use when hiding the side-nav in non-rail mode.\n * @animation sideNav.hideRail - The animation to use when hiding the side-nav in rail mode.\n * @animation sideNav.overlay.show - The animation to use when showing the side-nav's overlay.\n * @animation sideNav.overlay.hide - The animation to use when hiding the side-nav's overlay.\n */\nexport default class SynSideNav extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles];\n\n static dependencies = {\n 'syn-divider': SynDivider,\n 'syn-drawer': SynDrawer,\n };\n\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'footer');\n\n private readonly localize = new LocalizeController(this);\n\n private timeout: NodeJS.Timeout;\n\n /**\n * Current animation active state\n */\n @state() private isAnimationActive = false;\n\n /**\n * Reference to the drawer\n */\n @query('.side-nav__drawer') private drawer: SynDrawer;\n\n /**\n * Indicates whether or not the side-nav is open.\n * You can toggle this attribute to show and hide the side-nav, or you can use the `show()` and\n * `hide()` methods and this attribute will reflect the side-nav's open state.\n *\n * Depending if the rail attribute is set or not, the behavior will differ.\n *\n * __Non rail__:\n * With `open` will show the side-nav.\n * Without `open`, the side-nav will be hidden.\n *\n * __Rail__:\n * With `open` will show the whole side-nav with an overlay for touch devices\n * or without an overlay for non-touch devices.\n * Without `open`, the side-nav will only show the prefix of nav-item's.\n *\n */\n @property({ reflect: true, type: Boolean }) open = false;\n\n /**\n * Use the rail attribute to only show the prefix of navigation items in closed state.\n * This will open on hover on the rail navigation.\n * On touch devices the navigation opens on click and shows an overlay.\n *\n * Note: The Rail is only an option if all Navigation Items on the first level have an Icon.\n * If this is not the case you should use a burger navigation.\n */\n @property({ reflect: true, type: Boolean }) rail = false;\n\n /**\n * By default, the side-nav traps the focus if in non-rail mode and open.\n * To disable the focus trapping, set this attribute.\n */\n @property({ attribute: 'no-focus-trapping', reflect: true, type: Boolean }) noFocusTrapping = false;\n\n private setDelayedCallback(callback: () => void) {\n clearTimeout(this.timeout);\n this.timeout = setTimeout(callback, 100);\n }\n\n private handleMouseEnter() {\n // Debounce mouse events, to avoid infinite loop of open / closing in rail mode\n this.setDelayedCallback(() => {\n this.open = true;\n });\n }\n\n private handleMouseLeave() {\n // Debounce mouse events, to avoid infinite loop of open / closing in rail mode\n this.setDelayedCallback(() => {\n this.open = false;\n });\n }\n\n private handleRequestClose() {\n if (this.open) {\n this.open = false;\n }\n }\n\n private addMouseListener() {\n this.drawer.shadowRoot!.querySelector('.drawer__panel')?.addEventListener('mouseenter', this.handleMouseEnter);\n this.drawer.shadowRoot!.querySelector('.drawer__panel')?.addEventListener('mouseleave', this.handleMouseLeave);\n }\n\n private removeMouseListener() {\n this.drawer.shadowRoot!.querySelector('.drawer__panel')?.removeEventListener('mouseenter', this.handleMouseEnter);\n this.drawer.shadowRoot!.querySelector('.drawer__panel')?.removeEventListener('mouseleave', this.handleMouseLeave);\n }\n\n private setDrawerVisibility(isVisible: boolean) {\n (this.drawer.shadowRoot!.querySelector('.drawer') as HTMLElement).hidden = !isVisible;\n this.drawer.shadowRoot!.querySelector('.drawer__panel')?.setAttribute('aria-hidden', isVisible ? 'false' : 'true');\n }\n\n private forceDrawerVisibilityForRailMode() {\n return waitForEvent(this.drawer, 'syn-after-hide').then(() => {\n this.setDrawerVisibility(true);\n this.isAnimationActive = false;\n });\n }\n\n private setDrawerAnimations() {\n const showAnimation = getAnimation(this, `sideNav.show${this.rail ? 'Rail' : 'NonRail'}`, { dir: this.localize.dir() });\n const hideAnimation = getAnimation(this, `sideNav.hide${this.rail ? 'Rail' : 'NonRail'}`, { dir: this.localize.dir() });\n const hideOverlay = getAnimation(this, 'sideNav.overlay.hide', { dir: this.localize.dir() });\n const showOverlay = getAnimation(this, 'sideNav.overlay.show', { dir: this.localize.dir() });\n\n setAnimation(this.drawer, 'drawer.showStart', showAnimation);\n setAnimation(this.drawer, 'drawer.hideStart', hideAnimation);\n setAnimation(this.drawer, 'drawer.overlay.hide', hideOverlay);\n setAnimation(this.drawer, 'drawer.overlay.show', showOverlay);\n }\n\n @watch('rail', { waitUntilFirstUpdate: true })\n handleModeChange() {\n this.setDrawerAnimations();\n\n if (this.rail) {\n this.addMouseListener();\n // Force drawer visibility for rail mode\n this.setDrawerVisibility(true);\n } else {\n this.removeMouseListener();\n // Remove forcing of drawer visibility for rail mode if not open\n if (!this.open) {\n this.setDrawerVisibility(false);\n }\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n handleOpenChange() {\n if (!this.open) {\n blurActiveElement(this);\n }\n\n if (!this.rail) {\n return;\n }\n\n this.isAnimationActive = true;\n\n if (!this.open) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.forceDrawerVisibilityForRailMode();\n } else {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n waitForEvent(this.drawer, 'syn-after-show').then(() => {\n this.isAnimationActive = false;\n });\n }\n }\n\n @watch('noFocusTrapping', { waitUntilFirstUpdate: true })\n handleFocusTrapping() {\n if (!this.rail) {\n if (this.noFocusTrapping) {\n this.drawer.modal.activateExternal();\n } else {\n this.drawer.modal.deactivateExternal();\n }\n }\n }\n\n /** Shows the side-nav. */\n async show() {\n if (this.open) {\n return undefined;\n }\n this.open = true;\n\n return waitForEvent(this.drawer, 'syn-after-show');\n }\n\n /** Hides the side-nav */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n\n return waitForEvent(this.drawer, 'syn-after-hide');\n }\n\n constructor() {\n super();\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.addEventListener('syn-initial-focus', (event) => {\n if (this.rail) {\n // We need to do this, to stop the drawer from giving focus to the panel\n event.preventDefault();\n\n // The originalTrigger needs to be removed, otherwise when closing the drawer,\n // the first focused nav-item is focused again...\n // eslint-disable-next-line @typescript-eslint/dot-notation\n this.drawer['originalTrigger'] = null;\n }\n });\n\n this.addEventListener('focusin', (event) => {\n const targetTag = (event.target as HTMLElement).tagName.toLowerCase();\n // Open the side-nav if it`s in rail mode, closed and the focused element is a nav-item\n if (targetTag === 'syn-nav-item' && this.rail && !this.open) {\n this.open = true;\n }\n });\n\n this.addEventListener('focusout', (event) => {\n const targetTag = (event.target as HTMLElement).tagName.toLowerCase();\n const relatedTargetTag = (event.relatedTarget as HTMLElement)?.tagName.toLowerCase();\n\n // Close the side-nav, if it`s in rail mode, open and the next focused element\n // is no longer a nav-item\n if (targetTag === 'syn-nav-item' && relatedTargetTag !== 'syn-nav-item' && this.rail && this.open) {\n this.open = false;\n }\n });\n }\n\n /**\n * Initial setup for first render like special rail mode handling and drawer animations.\n * */\n firstUpdated() {\n this.setDrawerAnimations();\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.drawer.updateComplete.then(() => {\n // change tabindex of drawer to make only nav-items focusable and not the panel of the drawer\n (this.drawer.shadowRoot!.querySelector('.drawer__panel') as HTMLElement).tabIndex = -1;\n });\n\n if (this.rail) {\n // Wait for the drawer`s update to be completed\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.drawer.updateComplete.then(() => {\n this.addMouseListener();\n // set initial visibility of drawer for rail mode\n this.setDrawerVisibility(true);\n });\n } else if (this.noFocusTrapping) {\n // Disable the focus trapping of the modal\n this.drawer.modal.activateExternal();\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // Remove modal listeners\n if (this.drawer) {\n unlockBodyScrolling(this.drawer);\n this.drawer.modal.deactivate();\n }\n }\n\n render() {\n const isTouch = window.navigator.maxTouchPoints > 0 || !!('ontouchstart' in window);\n const hasFooter = this.hasSlotController.test('footer');\n\n /* eslint-disable lit/no-invalid-html */\n /* eslint-disable @typescript-eslint/unbound-method */\n return html`\n <nav\n class=${classMap({\n 'side-nav': true,\n 'side-nav--animation': this.isAnimationActive,\n 'side-nav--fix': !this.rail,\n 'side-nav--has-footer': hasFooter,\n 'side-nav--open': this.open,\n 'side-nav--rail': this.rail,\n 'side-nav--touch': isTouch,\n })}\n part=\"base\"\n >\n \n <syn-drawer\n class=\"side-nav__drawer\"\n ?contained=${this.rail}\n exportparts=\"overlay,panel,body,base:drawer__base\"\n label=${this.localize.term('sideNav')}\n no-header\n ?open=${this.open}\n part=\"drawer\"\n placement=\"start\"\n @syn-request-close=${this.handleRequestClose} \n >\n <div part=\"content-container\" class=\"side-nav__content-container\">\n <slot part=\"content\"></slot>\n </div>\n \n <footer class=\"side-nav__footer\" part=\"footer-container\" slot=\"footer\"> \n\n ${hasFooter ? html`<syn-divider part=\"footer-divider\" class=\"side-nav__footer-divider\"></syn-divider>` : ''}\n <slot name=\"footer\" part=\"footer\" ></slot> \n \n </footer>\n\n </syn-drawer>\n\n </nav>\n `;\n /* eslint-enable lit/no-invalid-html */\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n}\n\n// Show animations\nsetDefaultAnimation('sideNav.showRail', {\n keyframes: [\n { width: 'var(--side-nav-rail-width)' },\n { width: 'var(--side-nav-open-width)' },\n ],\n options: { duration: 250, easing: 'ease' },\n});\n\nsetDefaultAnimation('sideNav.showNonRail', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' },\n ],\n options: { duration: 250, easing: 'ease' },\n});\n\n// Hide animations\nsetDefaultAnimation('sideNav.hideNonRail', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' },\n ],\n options: { duration: 250, easing: 'ease' },\n});\n\nsetDefaultAnimation('sideNav.hideRail', {\n keyframes: [\n { width: 'var(--side-nav-open-width)' },\n { width: 'var(--side-nav-rail-width)' },\n ],\n options: { duration: 250, easing: 'ease' },\n});\n\n// Overlay animations\nsetDefaultAnimation('sideNav.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 },\n});\n\nsetDefaultAnimation('sideNav.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 },\n});\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB;AAEzB,SAAS,YAAY;AACrB,SAAS,UAAU,OAAO,aAAa;AA8DvC,IAAqB,aAArB,cAAwC,eAAe;AAAA,EA8LrD,cAAc;AACZ,UAAM;AAvLR,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,QAAQ;AAEtF,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAO9C,SAAQ,oBAAoB;AAwBO,gBAAO;AAUP,gBAAO;AAMyB,2BAAkB;AAuI5F,SAAK,mBAAmB,KAAK,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EAC1C,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAAA,EAC1C,SAAS,EAAE,UAAU,IAAI;AAC3B,CAAC;AAED,oBAAoB,wBAAwB;AAAA,EAC1C,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAAA,EAC1C,SAAS,EAAE,UAAU,IAAI;AAC3B,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
// src/components/side-nav/side-nav.styles.ts
|
|
2
|
-
import { css } from "lit";
|
|
3
|
-
var side_nav_styles_default = css`
|
|
4
|
-
:host {
|
|
5
|
-
--side-nav-open-width: 320px;
|
|
6
|
-
--side-nav-rail-width: 72px;
|
|
7
|
-
|
|
8
|
-
display: block;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* Side nav should have a width, so it behave correct in an e.g. display flex context */
|
|
12
|
-
.side-nav:not(.side-nav--rail).side-nav--open {
|
|
13
|
-
width: var(--side-nav-open-width);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Side nav should have a width, so it behave correct in an e.g. display flex context.
|
|
18
|
-
* In rail mode the width is always the small rail width, because there should be no shrinking possible of the main content area.
|
|
19
|
-
*/
|
|
20
|
-
.side-nav.side-nav--rail {
|
|
21
|
-
width: var(--side-nav-rail-width);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Syn-drawer styling
|
|
28
|
-
*/
|
|
29
|
-
.side-nav__drawer {
|
|
30
|
-
--size: var(--side-nav-open-width);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.side-nav__drawer::part(base){
|
|
34
|
-
position: absolute;
|
|
35
|
-
z-index: var(--syn-z-index-drawer);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.side-nav__drawer::part(body), .side-nav__drawer::part(footer) {
|
|
39
|
-
padding: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Overlay
|
|
44
|
-
*/
|
|
45
|
-
.side-nav__drawer::part(overlay){
|
|
46
|
-
position: absolute;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Fixed mode
|
|
51
|
-
*/
|
|
52
|
-
.side-nav--fix .side-nav__drawer::part(overlay){
|
|
53
|
-
display: block;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Rail mode
|
|
58
|
-
*/
|
|
59
|
-
:not(.side-nav--open).side-nav--rail .side-nav__drawer {
|
|
60
|
-
--size: var(--side-nav-rail-width);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.side-nav--open.side-nav--rail.side-nav--touch .side-nav__drawer::part(overlay){
|
|
64
|
-
display: block;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Avoid multiline flickering on open and close animation
|
|
69
|
-
*/
|
|
70
|
-
.side-nav--rail.side-nav--animation {
|
|
71
|
-
white-space: nowrap;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Hide the scrollbars in closed rail mode
|
|
76
|
-
*/
|
|
77
|
-
:not(.side-nav--open).side-nav--rail .side-nav__drawer::part(body){
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Footer divider
|
|
83
|
-
*/
|
|
84
|
-
.side-nav__footer-divider{
|
|
85
|
-
--spacing: 0;
|
|
86
|
-
--color: var(--syn-color-neutral-300);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:not(.side-nav--open).side-nav--rail ::slotted(syn-nav-item){
|
|
90
|
-
--display-children: none;
|
|
91
|
-
}
|
|
92
|
-
`;
|
|
93
|
-
|
|
94
|
-
export {
|
|
95
|
-
side_nav_styles_default
|
|
96
|
-
};
|
|
97
|
-
//# sourceMappingURL=chunk.H3HTSQKK.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/side-nav/side-nav.styles.ts"],
|
|
4
|
-
"sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n :host {\n --side-nav-open-width: 320px;\n --side-nav-rail-width: 72px;\n\n display: block;\n }\n\n /* Side nav should have a width, so it behave correct in an e.g. display flex context */\n .side-nav:not(.side-nav--rail).side-nav--open {\n width: var(--side-nav-open-width);\n }\n \n /**\n * Side nav should have a width, so it behave correct in an e.g. display flex context.\n * In rail mode the width is always the small rail width, because there should be no shrinking possible of the main content area.\n */\n .side-nav.side-nav--rail {\n width: var(--side-nav-rail-width);\n }\n\n\n\n /**\n * Syn-drawer styling\n */\n .side-nav__drawer {\n --size: var(--side-nav-open-width);\n }\n \n .side-nav__drawer::part(base){\n position: absolute;\n z-index: var(--syn-z-index-drawer);\n }\n\n .side-nav__drawer::part(body), .side-nav__drawer::part(footer) {\n padding: 0;\n }\n\n /** \n * Overlay \n */\n .side-nav__drawer::part(overlay){\n position: absolute;\n }\n\n /**\n * Fixed mode\n */\n .side-nav--fix .side-nav__drawer::part(overlay){\n display: block;\n }\n\n /**\n * Rail mode\n */\n :not(.side-nav--open).side-nav--rail .side-nav__drawer {\n --size: var(--side-nav-rail-width);\n }\n\n .side-nav--open.side-nav--rail.side-nav--touch .side-nav__drawer::part(overlay){\n display: block;\n }\n\n /**\n * Avoid multiline flickering on open and close animation\n */\n .side-nav--rail.side-nav--animation {\n white-space: nowrap;\n }\n\n /**\n * Hide the scrollbars in closed rail mode\n */ \n :not(.side-nav--open).side-nav--rail .side-nav__drawer::part(body){\n overflow: hidden;\n }\n\n /**\n * Footer divider\n */\n .side-nav__footer-divider{\n --spacing: 0;\n --color: var(--syn-color-neutral-300);\n }\n\n :not(.side-nav--open).side-nav--rail ::slotted(syn-nav-item){\n --display-children: none;\n }\n`;\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,0BAAQ;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;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|