@synergy-design-system/components 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{chunk.525LGYB4.js → chunk.2URWP5LD.js} +10 -4
- package/dist/chunks/chunk.2URWP5LD.js.map +7 -0
- package/dist/chunks/{chunk.DXL3JN6D.js → chunk.3EONOQ2P.js} +2 -2
- package/dist/chunks/{chunk.COFVSXEF.js → chunk.3M6IVPMZ.js} +6 -6
- package/dist/chunks/{chunk.YRMXDJFM.js → chunk.4MBMY5UE.js} +2 -2
- package/dist/chunks/{chunk.GDHER3FZ.js → chunk.4RMP4EST.js} +2 -2
- package/dist/chunks/{chunk.UEQDHG7J.js → chunk.5I7DR4UT.js} +2 -2
- package/dist/chunks/{chunk.MEDX62IL.js → chunk.5OV7FNMN.js} +3 -3
- package/dist/chunks/{chunk.7UVCYUNR.js → chunk.66MOXMDP.js} +2 -2
- package/dist/chunks/{chunk.QQB6JCQY.js → chunk.6V72DOSV.js} +16 -17
- package/dist/chunks/chunk.6V72DOSV.js.map +7 -0
- package/dist/chunks/chunk.74N5WLM5.js +53 -0
- package/dist/chunks/chunk.74N5WLM5.js.map +7 -0
- package/dist/chunks/{chunk.A6S4OYWD.js → chunk.7NH6SYGG.js} +21 -17
- package/dist/chunks/chunk.7NH6SYGG.js.map +7 -0
- package/dist/chunks/{chunk.VSEAHAW7.js → chunk.7PYQKCMR.js} +3 -3
- package/dist/chunks/{chunk.B57ZVQ2Q.js → chunk.ABSGP4AA.js} +2 -2
- package/dist/chunks/{chunk.JDXKGJ63.js → chunk.AOKNP4QD.js} +42 -2
- package/dist/chunks/{chunk.JDXKGJ63.js.map → chunk.AOKNP4QD.js.map} +2 -2
- package/dist/chunks/{chunk.4QS5IWYB.js → chunk.AW2HNLNP.js} +1 -9
- package/dist/chunks/{chunk.4QS5IWYB.js.map → chunk.AW2HNLNP.js.map} +2 -2
- package/dist/chunks/{chunk.PAK472WN.js → chunk.BKRTJVKH.js} +2 -2
- package/dist/chunks/{chunk.QFMUPETV.js → chunk.BQ3U6CVQ.js} +3 -3
- package/dist/chunks/{chunk.H33SDUY3.js → chunk.CCITL3IY.js} +14 -11
- package/dist/chunks/chunk.CCITL3IY.js.map +7 -0
- package/dist/chunks/{chunk.SRZMRKLQ.js → chunk.CNKXQN5I.js} +4 -4
- package/dist/chunks/{chunk.PSTO5STZ.js → chunk.CXLJMDBV.js} +2 -2
- package/dist/chunks/{chunk.4MRXASVT.js → chunk.D63XRN3X.js} +2 -2
- package/dist/chunks/{chunk.2NRG7KJT.js → chunk.E3MWAHV4.js} +2 -2
- package/dist/chunks/{chunk.EZE5M5XB.js → chunk.EHMIJIZ2.js} +2 -2
- package/dist/chunks/{chunk.2SLHEFOH.js → chunk.ENAW6YL5.js} +7 -7
- package/dist/chunks/chunk.EQ2W2Z5B.js +12 -0
- package/dist/chunks/chunk.EQ2W2Z5B.js.map +7 -0
- package/dist/chunks/{chunk.KUO3KJOC.js → chunk.GBARDV25.js} +2 -2
- package/dist/chunks/{chunk.RK7OBPZ5.js → chunk.GEHO4WRP.js} +2 -2
- package/dist/chunks/{chunk.RK7OBPZ5.js.map → chunk.GEHO4WRP.js.map} +1 -1
- package/dist/chunks/chunk.GO3CCKC3.js +96 -0
- package/dist/chunks/chunk.GO3CCKC3.js.map +7 -0
- package/dist/chunks/{chunk.64MHCKTF.js → chunk.H3GKRGN6.js} +7 -7
- package/dist/chunks/{chunk.CSOIUDS4.js → chunk.HZTZOBNJ.js} +2 -2
- package/dist/chunks/{chunk.4LMFTSOM.js → chunk.I3SSNN7J.js} +10 -4
- package/dist/chunks/chunk.I3SSNN7J.js.map +7 -0
- package/dist/chunks/{chunk.BUIBP2TA.js → chunk.INLTRHSF.js} +2 -2
- package/dist/chunks/{chunk.GGY5VQYA.js → chunk.IVHB4EQ6.js} +3 -3
- package/dist/chunks/chunk.IVHB4EQ6.js.map +7 -0
- package/dist/chunks/{chunk.2ZEMD2N7.js → chunk.J3HTR5NX.js} +2 -2
- package/dist/chunks/{chunk.RRWSXFQ5.js → chunk.JDBDBGQP.js} +3 -2
- package/dist/chunks/{chunk.RRWSXFQ5.js.map → chunk.JDBDBGQP.js.map} +2 -2
- package/dist/chunks/{chunk.Q4CT57M2.js → chunk.JJZKPNJZ.js} +2 -2
- package/dist/chunks/{chunk.SZCGMXW5.js → chunk.JUJZBRXD.js} +2 -2
- package/dist/chunks/chunk.JUJZBRXD.js.map +7 -0
- package/dist/chunks/{chunk.722JR5BD.js → chunk.K2H37OYP.js} +6 -6
- package/dist/chunks/{chunk.722JR5BD.js.map → chunk.K2H37OYP.js.map} +2 -2
- package/dist/chunks/chunk.K6AHAO25.js +166 -0
- package/dist/chunks/chunk.K6AHAO25.js.map +7 -0
- package/dist/chunks/{chunk.2OLQHFOR.js → chunk.KJ7V3TWI.js} +3 -3
- package/dist/chunks/{chunk.UYD2OVFV.js → chunk.KZMWNTUS.js} +2 -2
- package/dist/chunks/chunk.KZMWNTUS.js.map +7 -0
- package/dist/chunks/chunk.L4UUXVRZ.js +312 -0
- package/dist/chunks/chunk.L4UUXVRZ.js.map +7 -0
- package/dist/chunks/{chunk.ETREUSYO.js → chunk.LFNAPJXT.js} +4 -4
- package/dist/chunks/{chunk.H7XP6JAS.js → chunk.LOUVN7OA.js} +3 -3
- package/dist/chunks/{chunk.3STW62TA.js → chunk.NIYKFSPR.js} +2 -1
- package/dist/chunks/{chunk.3STW62TA.js.map → chunk.NIYKFSPR.js.map} +2 -2
- package/dist/chunks/{chunk.34NAFEQ7.js → chunk.NLWT6VZN.js} +2 -2
- package/dist/chunks/{chunk.ZLEQ5DOF.js → chunk.NOB4TQLJ.js} +2 -2
- package/dist/chunks/{chunk.7UUZ5ISH.js → chunk.O3AC2EVL.js} +3 -3
- package/dist/chunks/chunk.OCH36GVS.js +12 -0
- package/dist/chunks/chunk.OCH36GVS.js.map +7 -0
- package/dist/chunks/{chunk.OLM7IVHA.js → chunk.OEMIM5RD.js} +6 -6
- package/dist/chunks/chunk.ONVWJKVD.js +318 -0
- package/dist/chunks/chunk.ONVWJKVD.js.map +7 -0
- package/dist/chunks/{chunk.ITUSK365.js → chunk.PCI22DJU.js} +2 -2
- package/dist/chunks/{chunk.3HTXK6WY.js → chunk.PGM6WEYY.js} +2 -2
- package/dist/chunks/{chunk.SJMMPKWP.js → chunk.Q4CRAGN3.js} +11 -11
- package/dist/chunks/{chunk.SJMMPKWP.js.map → chunk.Q4CRAGN3.js.map} +1 -1
- package/dist/chunks/{chunk.CG753OYA.js → chunk.Q7WVOJG4.js} +2 -2
- package/dist/chunks/{chunk.ZIQXX272.js → chunk.QPK7SLOE.js} +2 -2
- package/dist/chunks/{chunk.V53WYKEU.js → chunk.QY3GFWGZ.js} +6 -1
- package/dist/chunks/{chunk.V53WYKEU.js.map → chunk.QY3GFWGZ.js.map} +2 -2
- package/dist/chunks/{chunk.2QYALZBT.js → chunk.RIJKFEYZ.js} +14 -7
- package/dist/chunks/chunk.RIJKFEYZ.js.map +7 -0
- package/dist/chunks/{chunk.MQCFDVLW.js → chunk.SAHA7Z3T.js} +2 -2
- package/dist/chunks/chunk.SHOXPF5L.js +12 -0
- package/dist/chunks/chunk.SHOXPF5L.js.map +7 -0
- package/dist/chunks/{chunk.VDYPXC2H.js → chunk.SOAZXMVH.js} +2 -2
- package/dist/chunks/{chunk.ADRKUQGR.js → chunk.TAO5QIIQ.js} +2 -1
- package/dist/chunks/{chunk.ADRKUQGR.js.map → chunk.TAO5QIIQ.js.map} +2 -2
- package/dist/chunks/{chunk.5HAKNNIR.js → chunk.TUFBQA52.js} +2 -2
- package/dist/chunks/{chunk.P2D7PUR2.js → chunk.TWZC4LT2.js} +4 -4
- package/dist/chunks/chunk.U2H36O5J.js +208 -0
- package/dist/chunks/chunk.U2H36O5J.js.map +7 -0
- package/dist/chunks/chunk.UHVHULGW.js +286 -0
- package/dist/chunks/chunk.UHVHULGW.js.map +7 -0
- package/dist/chunks/{chunk.5TOD3QS2.js → chunk.VCFVQ6KS.js} +2 -2
- package/dist/chunks/{chunk.5TOD3QS2.js.map → chunk.VCFVQ6KS.js.map} +1 -1
- package/dist/chunks/{chunk.N4VSEIRQ.js → chunk.VTKIDI7N.js} +7 -1
- package/dist/chunks/{chunk.N4VSEIRQ.js.map → chunk.VTKIDI7N.js.map} +2 -2
- package/dist/chunks/{chunk.PEMSU7RY.js → chunk.WM7IMLTR.js} +2 -2
- package/dist/chunks/{chunk.2KV3G5JF.js → chunk.WMYFFFHI.js} +2 -2
- package/dist/chunks/{chunk.VCXIV7H4.js → chunk.WPAPTZLW.js} +3 -3
- package/dist/chunks/{chunk.EWGDHM27.js → chunk.WZWI3VYU.js} +2 -2
- package/dist/chunks/{chunk.NXX572OD.js → chunk.XADGSL34.js} +2 -2
- package/dist/chunks/chunk.XNP4OTUB.js +16 -0
- package/dist/chunks/chunk.XNP4OTUB.js.map +7 -0
- package/dist/chunks/{chunk.KEEDSK2V.js → chunk.ZM72G6GO.js} +4 -4
- package/dist/components/badge/badge.component.js +4 -4
- package/dist/components/badge/badge.js +5 -5
- package/dist/components/button/button.component.js +10 -10
- package/dist/components/button/button.js +11 -11
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/button-group/button-group.component.js +2 -2
- package/dist/components/button-group/button-group.js +3 -3
- package/dist/components/checkbox/checkbox.component.js +7 -7
- package/dist/components/checkbox/checkbox.js +8 -8
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/divider/divider.component.js +2 -2
- package/dist/components/divider/divider.js +3 -3
- package/dist/components/drawer/drawer.component.js +10 -10
- package/dist/components/drawer/drawer.custom.styles.js +1 -1
- package/dist/components/drawer/drawer.js +11 -11
- package/dist/components/dropdown/dropdown.component.d.ts +4 -0
- package/dist/components/dropdown/dropdown.component.js +5 -5
- package/dist/components/dropdown/dropdown.js +6 -6
- package/dist/components/header/header.component.d.ts +42 -1
- package/dist/components/header/header.component.js +9 -7
- package/dist/components/header/header.js +10 -8
- package/dist/components/header/header.styles.js +1 -1
- package/dist/components/icon/icon.component.js +4 -4
- package/dist/components/icon/icon.js +5 -5
- package/dist/components/icon/library.js +2 -2
- package/dist/components/icon/library.system.js +1 -1
- package/dist/components/icon-button/icon-button.component.js +5 -5
- package/dist/components/icon-button/icon-button.js +6 -6
- package/dist/components/input/input.component.js +10 -10
- package/dist/components/input/input.js +11 -11
- package/dist/components/input/input.styles.js +1 -1
- package/dist/components/menu/menu.component.js +2 -2
- package/dist/components/menu/menu.js +3 -3
- package/dist/components/menu-item/menu-item.component.js +10 -10
- package/dist/components/menu-item/menu-item.js +11 -11
- package/dist/components/menu-item/submenu-controller.js +3 -3
- package/dist/components/menu-label/menu-label.component.js +3 -3
- package/dist/components/menu-label/menu-label.js +4 -4
- package/dist/components/nav-item/nav-item.component.d.ts +145 -0
- package/dist/components/nav-item/nav-item.component.js +15 -0
- package/dist/components/nav-item/nav-item.component.js.map +7 -0
- package/dist/components/nav-item/nav-item.d.ts +8 -0
- package/dist/components/nav-item/nav-item.js +16 -0
- package/dist/components/nav-item/nav-item.js.map +7 -0
- package/dist/components/nav-item/nav-item.styles.d.ts +2 -0
- package/dist/components/nav-item/nav-item.styles.js +8 -0
- package/dist/components/nav-item/nav-item.styles.js.map +7 -0
- package/dist/components/optgroup/optgroup.component.js +3 -3
- package/dist/components/optgroup/optgroup.js +4 -4
- package/dist/components/option/option.component.js +7 -7
- package/dist/components/option/option.js +8 -8
- package/dist/components/popup/popup.component.d.ts +1 -0
- package/dist/components/popup/popup.component.js +2 -2
- package/dist/components/popup/popup.js +3 -3
- package/dist/components/prio-nav/prio-nav.component.d.ts +110 -0
- package/dist/components/prio-nav/prio-nav.component.js +38 -0
- package/dist/components/prio-nav/prio-nav.component.js.map +7 -0
- package/dist/components/prio-nav/prio-nav.d.ts +8 -0
- package/dist/components/prio-nav/prio-nav.js +39 -0
- package/dist/components/prio-nav/prio-nav.js.map +7 -0
- package/dist/components/prio-nav/prio-nav.styles.d.ts +2 -0
- package/dist/components/prio-nav/prio-nav.styles.js +8 -0
- package/dist/components/prio-nav/prio-nav.styles.js.map +7 -0
- package/dist/components/prio-nav/utils.d.ts +20 -0
- package/dist/components/prio-nav/utils.js +12 -0
- package/dist/components/prio-nav/utils.js.map +7 -0
- package/dist/components/radio/radio.component.js +6 -6
- package/dist/components/radio/radio.js +7 -7
- package/dist/components/radio-button/radio-button.component.js +4 -4
- package/dist/components/radio-button/radio-button.js +5 -5
- package/dist/components/radio-button/radio-button.styles.js +2 -2
- package/dist/components/radio-group/radio-group.component.js +4 -4
- package/dist/components/radio-group/radio-group.js +5 -5
- package/dist/components/select/select.component.js +12 -12
- package/dist/components/select/select.js +13 -13
- package/dist/components/side-nav/side-nav.component.d.ts +122 -0
- package/dist/components/side-nav/side-nav.component.js +34 -0
- package/dist/components/side-nav/side-nav.component.js.map +7 -0
- package/dist/components/side-nav/side-nav.d.ts +8 -0
- package/dist/components/side-nav/side-nav.js +35 -0
- package/dist/components/side-nav/side-nav.js.map +7 -0
- package/dist/components/side-nav/side-nav.styles.d.ts +2 -0
- package/dist/components/side-nav/side-nav.styles.js +8 -0
- package/dist/components/side-nav/side-nav.styles.js.map +7 -0
- package/dist/components/spinner/spinner.component.js +4 -4
- package/dist/components/switch/switch.component.js +4 -4
- package/dist/components/switch/switch.js +5 -5
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/tag/tag.component.js +8 -8
- package/dist/components/tag/tag.js +9 -9
- package/dist/components/textarea/textarea.component.js +3 -3
- package/dist/components/textarea/textarea.js +4 -4
- package/dist/custom-elements.json +2086 -860
- package/dist/events/events.d.ts +2 -0
- package/dist/events/syn-burger-menu-hide.d.ts +6 -0
- package/dist/events/syn-burger-menu-show.d.ts +6 -0
- package/dist/synergy.d.ts +3 -0
- package/dist/synergy.js +97 -78
- package/dist/themes/utility.css +2 -1
- package/dist/translations/de.js +7 -2
- package/dist/translations/de.js.map +2 -2
- package/dist/translations/en.js +1 -1
- package/dist/utilities/form.js +2 -2
- package/dist/utilities/icon-library.js +2 -2
- package/dist/utilities/localize.d.ts +3 -0
- package/dist/utilities/localize.js +2 -2
- package/dist/vscode.html-custom-data.json +125 -19
- package/package.json +5 -4
- package/dist/chunks/chunk.2QYALZBT.js.map +0 -7
- package/dist/chunks/chunk.4LMFTSOM.js.map +0 -7
- package/dist/chunks/chunk.525LGYB4.js.map +0 -7
- package/dist/chunks/chunk.A6S4OYWD.js.map +0 -7
- package/dist/chunks/chunk.GGY5VQYA.js.map +0 -7
- package/dist/chunks/chunk.H33SDUY3.js.map +0 -7
- package/dist/chunks/chunk.L6ZUZPOW.js +0 -80
- package/dist/chunks/chunk.L6ZUZPOW.js.map +0 -7
- package/dist/chunks/chunk.QQB6JCQY.js.map +0 -7
- package/dist/chunks/chunk.SZCGMXW5.js.map +0 -7
- package/dist/chunks/chunk.UYD2OVFV.js.map +0 -7
- /package/dist/chunks/{chunk.DXL3JN6D.js.map → chunk.3EONOQ2P.js.map} +0 -0
- /package/dist/chunks/{chunk.COFVSXEF.js.map → chunk.3M6IVPMZ.js.map} +0 -0
- /package/dist/chunks/{chunk.YRMXDJFM.js.map → chunk.4MBMY5UE.js.map} +0 -0
- /package/dist/chunks/{chunk.GDHER3FZ.js.map → chunk.4RMP4EST.js.map} +0 -0
- /package/dist/chunks/{chunk.UEQDHG7J.js.map → chunk.5I7DR4UT.js.map} +0 -0
- /package/dist/chunks/{chunk.MEDX62IL.js.map → chunk.5OV7FNMN.js.map} +0 -0
- /package/dist/chunks/{chunk.7UVCYUNR.js.map → chunk.66MOXMDP.js.map} +0 -0
- /package/dist/chunks/{chunk.VSEAHAW7.js.map → chunk.7PYQKCMR.js.map} +0 -0
- /package/dist/chunks/{chunk.B57ZVQ2Q.js.map → chunk.ABSGP4AA.js.map} +0 -0
- /package/dist/chunks/{chunk.PAK472WN.js.map → chunk.BKRTJVKH.js.map} +0 -0
- /package/dist/chunks/{chunk.QFMUPETV.js.map → chunk.BQ3U6CVQ.js.map} +0 -0
- /package/dist/chunks/{chunk.SRZMRKLQ.js.map → chunk.CNKXQN5I.js.map} +0 -0
- /package/dist/chunks/{chunk.PSTO5STZ.js.map → chunk.CXLJMDBV.js.map} +0 -0
- /package/dist/chunks/{chunk.4MRXASVT.js.map → chunk.D63XRN3X.js.map} +0 -0
- /package/dist/chunks/{chunk.2NRG7KJT.js.map → chunk.E3MWAHV4.js.map} +0 -0
- /package/dist/chunks/{chunk.EZE5M5XB.js.map → chunk.EHMIJIZ2.js.map} +0 -0
- /package/dist/chunks/{chunk.2SLHEFOH.js.map → chunk.ENAW6YL5.js.map} +0 -0
- /package/dist/chunks/{chunk.KUO3KJOC.js.map → chunk.GBARDV25.js.map} +0 -0
- /package/dist/chunks/{chunk.64MHCKTF.js.map → chunk.H3GKRGN6.js.map} +0 -0
- /package/dist/chunks/{chunk.CSOIUDS4.js.map → chunk.HZTZOBNJ.js.map} +0 -0
- /package/dist/chunks/{chunk.BUIBP2TA.js.map → chunk.INLTRHSF.js.map} +0 -0
- /package/dist/chunks/{chunk.2ZEMD2N7.js.map → chunk.J3HTR5NX.js.map} +0 -0
- /package/dist/chunks/{chunk.Q4CT57M2.js.map → chunk.JJZKPNJZ.js.map} +0 -0
- /package/dist/chunks/{chunk.2OLQHFOR.js.map → chunk.KJ7V3TWI.js.map} +0 -0
- /package/dist/chunks/{chunk.ETREUSYO.js.map → chunk.LFNAPJXT.js.map} +0 -0
- /package/dist/chunks/{chunk.H7XP6JAS.js.map → chunk.LOUVN7OA.js.map} +0 -0
- /package/dist/chunks/{chunk.34NAFEQ7.js.map → chunk.NLWT6VZN.js.map} +0 -0
- /package/dist/chunks/{chunk.ZLEQ5DOF.js.map → chunk.NOB4TQLJ.js.map} +0 -0
- /package/dist/chunks/{chunk.7UUZ5ISH.js.map → chunk.O3AC2EVL.js.map} +0 -0
- /package/dist/chunks/{chunk.OLM7IVHA.js.map → chunk.OEMIM5RD.js.map} +0 -0
- /package/dist/chunks/{chunk.ITUSK365.js.map → chunk.PCI22DJU.js.map} +0 -0
- /package/dist/chunks/{chunk.3HTXK6WY.js.map → chunk.PGM6WEYY.js.map} +0 -0
- /package/dist/chunks/{chunk.CG753OYA.js.map → chunk.Q7WVOJG4.js.map} +0 -0
- /package/dist/chunks/{chunk.ZIQXX272.js.map → chunk.QPK7SLOE.js.map} +0 -0
- /package/dist/chunks/{chunk.MQCFDVLW.js.map → chunk.SAHA7Z3T.js.map} +0 -0
- /package/dist/chunks/{chunk.VDYPXC2H.js.map → chunk.SOAZXMVH.js.map} +0 -0
- /package/dist/chunks/{chunk.5HAKNNIR.js.map → chunk.TUFBQA52.js.map} +0 -0
- /package/dist/chunks/{chunk.P2D7PUR2.js.map → chunk.TWZC4LT2.js.map} +0 -0
- /package/dist/chunks/{chunk.PEMSU7RY.js.map → chunk.WM7IMLTR.js.map} +0 -0
- /package/dist/chunks/{chunk.2KV3G5JF.js.map → chunk.WMYFFFHI.js.map} +0 -0
- /package/dist/chunks/{chunk.VCXIV7H4.js.map → chunk.WPAPTZLW.js.map} +0 -0
- /package/dist/chunks/{chunk.EWGDHM27.js.map → chunk.WZWI3VYU.js.map} +0 -0
- /package/dist/chunks/{chunk.NXX572OD.js.map → chunk.XADGSL34.js.map} +0 -0
- /package/dist/chunks/{chunk.KEEDSK2V.js.map → chunk.ZM72G6GO.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utilities/localize.ts"],
|
|
4
|
-
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { LocalizeController as DefaultLocalizationController, registerTranslation } from '@shoelace-style/localize';\nimport en from '../translations/en.js'; // Register English as the default/fallback language\nimport type { Translation as DefaultTranslation } from '@shoelace-style/localize';\n\n// Extend the controller and apply our own translation interface for better typings\nexport class LocalizeController extends DefaultLocalizationController<Translation> {\n // Technicallly '../translations/en.js' is supposed to work via side-effects. However, by some mystery sometimes the\n // translations don't get bundled as expected resulting in `no translation found` errors.\n // This is basically some extra assurance that our translations get registered prior to our localizer connecting in a component\n // and we don't rely on implicit import ordering.\n static {\n registerTranslation(en);\n }\n}\n\n// Export functions from the localize lib so we have one central place to import them from\nexport { registerTranslation } from '@shoelace-style/localize';\n\nexport interface Translation extends DefaultTranslation {\n
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { LocalizeController as DefaultLocalizationController, registerTranslation } from '@shoelace-style/localize';\nimport en from '../translations/en.js'; // Register English as the default/fallback language\nimport type { Translation as DefaultTranslation } from '@shoelace-style/localize';\n\n// Extend the controller and apply our own translation interface for better typings\nexport class LocalizeController extends DefaultLocalizationController<Translation> {\n // Technicallly '../translations/en.js' is supposed to work via side-effects. However, by some mystery sometimes the\n // translations don't get bundled as expected resulting in `no translation found` errors.\n // This is basically some extra assurance that our translations get registered prior to our localizer connecting in a component\n // and we don't rely on implicit import ordering.\n static {\n registerTranslation(en);\n }\n}\n\n// Export functions from the localize lib so we have one central place to import them from\nexport { registerTranslation } from '@shoelace-style/localize';\n\nexport interface Translation extends DefaultTranslation {\n closeMenu: string;\n danger: string;\n notification: string;\n openMenu: string;\n sideNav: string;\n success: string;\n warning: string;\n\n $code: string; // e.g. en, en-GB\n $name: string; // e.g. English, Espa\u00F1ol\n $dir: 'ltr' | 'rtl';\n\n carousel: string;\n clearEntry: string;\n close: string;\n copied: string;\n copy: string;\n currentValue: string;\n error: string;\n goToSlide: (slide: number, count: number) => string;\n hidePassword: string;\n loading: string;\n nextSlide: string;\n numOptionsSelected: (num: number) => string;\n previousSlide: string;\n progress: string;\n remove: string;\n resize: string;\n scrollToEnd: string;\n scrollToStart: string;\n selectAColorFromTheScreen: string;\n showPassword: string;\n slideNum: (slide: number) => string;\n toggleColorFormat: string;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;AAMA,SAAS,sBAAsB,+BAA+B,2BAA2B;AAgBzF,SAAS,uBAAAA,4BAA2B;AAX7B,IAAM,qBAAN,cAAiC,8BAA2C;AAQnF;AAFI,oBAAoB,UAAE;",
|
|
6
6
|
"names": ["registerTranslation"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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: 25rem;
|
|
6
|
+
--side-nav-rail-width: 4.5rem;
|
|
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
|
+
}
|
|
36
|
+
|
|
37
|
+
.side-nav__drawer::part(body), .side-nav__drawer::part(footer) {
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Overlay
|
|
43
|
+
*/
|
|
44
|
+
.side-nav__drawer::part(overlay){
|
|
45
|
+
position: absolute;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Fixed mode
|
|
50
|
+
*/
|
|
51
|
+
.side-nav--fix .side-nav__drawer::part(overlay){
|
|
52
|
+
display: block;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Rail mode
|
|
57
|
+
*/
|
|
58
|
+
:not(.side-nav--open).side-nav--rail .side-nav__drawer {
|
|
59
|
+
--size: var(--side-nav-rail-width);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.side-nav--open.side-nav--rail.side-nav--touch .side-nav__drawer::part(overlay){
|
|
63
|
+
display: block;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Avoid multiline flickering on open and close animation
|
|
68
|
+
*/
|
|
69
|
+
.side-nav--rail.side-nav--animation {
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Hide the scrollbars in closed rail mode
|
|
75
|
+
*/
|
|
76
|
+
:not(.side-nav--open).side-nav--rail .side-nav__drawer::part(body){
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Footer divider
|
|
82
|
+
*/
|
|
83
|
+
.side-nav__footer-divider{
|
|
84
|
+
--spacing: 0;
|
|
85
|
+
--color: var(--syn-color-neutral-300);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:not(.side-nav--open).side-nav--rail ::slotted(syn-nav-item){
|
|
89
|
+
--display-children: none;
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
side_nav_styles_default
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=chunk.GO3CCKC3.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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: 25rem;\n --side-nav-rail-width: 4.5rem;\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 }\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;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -6,30 +6,30 @@ import {
|
|
|
6
6
|
} from "./chunk.PDHVYHXD.js";
|
|
7
7
|
import {
|
|
8
8
|
SubmenuController
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.JDBDBGQP.js";
|
|
10
10
|
import {
|
|
11
11
|
SynPopup
|
|
12
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.IVHB4EQ6.js";
|
|
13
13
|
import {
|
|
14
14
|
SynSpinner
|
|
15
|
-
} from "./chunk.
|
|
15
|
+
} from "./chunk.KJ7V3TWI.js";
|
|
16
16
|
import {
|
|
17
17
|
HasSlotController,
|
|
18
18
|
getTextContent
|
|
19
19
|
} from "./chunk.66WXVGAW.js";
|
|
20
20
|
import {
|
|
21
21
|
SynIcon
|
|
22
|
-
} from "./chunk.
|
|
22
|
+
} from "./chunk.I3SSNN7J.js";
|
|
23
23
|
import {
|
|
24
24
|
watch
|
|
25
25
|
} from "./chunk.AVTU2BGE.js";
|
|
26
26
|
import {
|
|
27
27
|
LocalizeController
|
|
28
|
-
} from "./chunk.
|
|
28
|
+
} from "./chunk.GEHO4WRP.js";
|
|
29
29
|
import {
|
|
30
30
|
SynergyElement,
|
|
31
31
|
component_styles_default
|
|
32
|
-
} from "./chunk.
|
|
32
|
+
} from "./chunk.VCFVQ6KS.js";
|
|
33
33
|
import {
|
|
34
34
|
__decorateClass
|
|
35
35
|
} from "./chunk.QNDC5KWA.js";
|
|
@@ -191,4 +191,4 @@ __decorateClass([
|
|
|
191
191
|
export {
|
|
192
192
|
SynMenuItem
|
|
193
193
|
};
|
|
194
|
-
//# sourceMappingURL=chunk.
|
|
194
|
+
//# sourceMappingURL=chunk.H3GKRGN6.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynSwitch
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.CNKXQN5I.js";
|
|
4
4
|
|
|
5
5
|
// src/components/switch/switch.ts
|
|
6
6
|
var switch_default = SynSwitch;
|
|
@@ -9,4 +9,4 @@ SynSwitch.define("syn-switch");
|
|
|
9
9
|
export {
|
|
10
10
|
switch_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.HZTZOBNJ.js.map
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getIconLibrary,
|
|
9
9
|
unwatchIcon,
|
|
10
10
|
watchIcon
|
|
11
|
-
} from "./chunk.
|
|
11
|
+
} from "./chunk.66MOXMDP.js";
|
|
12
12
|
import {
|
|
13
13
|
watch
|
|
14
14
|
} from "./chunk.AVTU2BGE.js";
|
|
15
15
|
import {
|
|
16
16
|
SynergyElement,
|
|
17
17
|
component_styles_default
|
|
18
|
-
} from "./chunk.
|
|
18
|
+
} from "./chunk.VCFVQ6KS.js";
|
|
19
19
|
import {
|
|
20
20
|
__decorateClass
|
|
21
21
|
} from "./chunk.QNDC5KWA.js";
|
|
@@ -41,9 +41,15 @@ var SynIcon = class extends SynergyElement {
|
|
|
41
41
|
var _a;
|
|
42
42
|
let fileData;
|
|
43
43
|
if (library == null ? void 0 : library.spriteSheet) {
|
|
44
|
-
|
|
44
|
+
this.svg = html`<svg part="svg">
|
|
45
45
|
<use part="use" href="${url}"></use>
|
|
46
46
|
</svg>`;
|
|
47
|
+
await this.updateComplete;
|
|
48
|
+
const svg = this.shadowRoot.querySelector("[part='svg']");
|
|
49
|
+
if (typeof library.mutator === "function") {
|
|
50
|
+
library.mutator(svg);
|
|
51
|
+
}
|
|
52
|
+
return this.svg;
|
|
47
53
|
}
|
|
48
54
|
try {
|
|
49
55
|
fileData = await fetch(url, { mode: "cors" });
|
|
@@ -176,4 +182,4 @@ __decorateClass([
|
|
|
176
182
|
export {
|
|
177
183
|
SynIcon
|
|
178
184
|
};
|
|
179
|
-
//# sourceMappingURL=chunk.
|
|
185
|
+
//# sourceMappingURL=chunk.I3SSNN7J.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/icon/icon.component.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { getIconLibrary, type IconLibrary, unwatchIcon, watchIcon } from './library.js';\nimport { html } from 'lit';\nimport { isTemplateResult } from 'lit/directive-helpers.js';\nimport { property, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport styles from './icon.styles.js';\nimport customStyles from './icon.custom.styles.js';\nimport type { CSSResultGroup, HTMLTemplateResult } from 'lit';\n\nconst CACHEABLE_ERROR = Symbol();\nconst RETRYABLE_ERROR = Symbol();\ntype SVGResult = HTMLTemplateResult | SVGSVGElement | typeof RETRYABLE_ERROR | typeof CACHEABLE_ERROR;\n\nlet parser: DOMParser;\nconst iconCache = new Map<string, Promise<SVGResult>>();\n\ninterface IconSource {\n url?: string;\n fromLibrary: boolean;\n}\n\n/**\n * @summary Icons are symbols that can be used to represent various options within an application.\n * @documentation https://synergy.style/components/icon\n * @status stable\n * @since 2.0\n *\n * @event syn-load - Emitted when the icon has loaded. When using `spriteSheet: true` this will not emit.\n * @event syn-error - Emitted when the icon fails to load due to an error. When using `spriteSheet: true` this will not emit.\n *\n * @csspart svg - The internal SVG element.\n * @csspart use - The <use> element generated when using `spriteSheet: true`\n */\nexport default class SynIcon extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles, customStyles];\n\n private initialRender = false;\n\n /** Given a URL, this function returns the resulting SVG element or an appropriate error symbol. */\n private async resolveIcon(url: string, library?: IconLibrary): Promise<SVGResult> {\n let fileData: Response;\n\n if (library?.spriteSheet) {\n this.svg = html`<svg part=\"svg\">\n <use part=\"use\" href=\"${url}\"></use>\n </svg>`;\n\n // Using a templateResult requires the SVG to be written to the DOM first before we can grab the SVGElement\n // to be passed to the library's mutator function.\n await this.updateComplete;\n\n const svg = this.shadowRoot!.querySelector(\"[part='svg']\")!;\n\n if (typeof library.mutator === 'function') {\n library.mutator(svg as SVGElement);\n }\n\n return this.svg;\n }\n\n try {\n fileData = await fetch(url, { mode: 'cors' });\n if (!fileData.ok) return fileData.status === 410 ? CACHEABLE_ERROR : RETRYABLE_ERROR;\n } catch {\n return RETRYABLE_ERROR;\n }\n\n try {\n const div = document.createElement('div');\n div.innerHTML = await fileData.text();\n\n const svg = div.firstElementChild;\n if (svg?.tagName?.toLowerCase() !== 'svg') return CACHEABLE_ERROR;\n\n if (!parser) parser = new DOMParser();\n const doc = parser.parseFromString(svg.outerHTML, 'text/html');\n\n const svgEl = doc.body.querySelector('svg');\n if (!svgEl) return CACHEABLE_ERROR;\n\n svgEl.part.add('svg');\n return document.adoptNode(svgEl);\n } catch {\n return CACHEABLE_ERROR;\n }\n }\n\n @state() private svg: SVGElement | HTMLTemplateResult | null = null;\n\n /** The name of the icon to draw. Available names depend on the icon library being used. */\n @property({ reflect: true }) name?: string;\n\n /**\n * An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\n * can result in XSS attacks.\n */\n @property() src?: string;\n\n /**\n * An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and\n * ignored by assistive devices.\n */\n @property() label = '';\n\n /** The name of a registered custom icon library. */\n @property({ reflect: true }) library = 'default';\n\n connectedCallback() {\n super.connectedCallback();\n watchIcon(this);\n }\n\n firstUpdated() {\n this.initialRender = true;\n this.setIcon();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unwatchIcon(this);\n }\n\n private getIconSource(): IconSource {\n const library = getIconLibrary(this.library);\n if (this.name && library) {\n return {\n url: library.resolver(this.name),\n fromLibrary: true\n };\n }\n\n return {\n url: this.src,\n fromLibrary: false\n };\n }\n\n @watch('label')\n handleLabelChange() {\n const hasLabel = typeof this.label === 'string' && this.label.length > 0;\n\n if (hasLabel) {\n this.setAttribute('role', 'img');\n this.setAttribute('aria-label', this.label);\n this.removeAttribute('aria-hidden');\n } else {\n this.removeAttribute('role');\n this.removeAttribute('aria-label');\n this.setAttribute('aria-hidden', 'true');\n }\n }\n\n @watch(['name', 'src', 'library'])\n async setIcon() {\n const { url, fromLibrary } = this.getIconSource();\n const library = fromLibrary ? getIconLibrary(this.library) : undefined;\n\n if (!url) {\n this.svg = null;\n return;\n }\n\n let iconResolver = iconCache.get(url);\n if (!iconResolver) {\n iconResolver = this.resolveIcon(url, library);\n iconCache.set(url, iconResolver);\n }\n\n // If we haven't rendered yet, exit early. This avoids unnecessary work due to watching multiple props.\n if (!this.initialRender) {\n return;\n }\n\n const svg = await iconResolver;\n\n if (svg === RETRYABLE_ERROR) {\n iconCache.delete(url);\n }\n\n if (url !== this.getIconSource().url) {\n // If the url has changed while fetching the icon, ignore this request\n return;\n }\n\n if (isTemplateResult(svg)) {\n this.svg = svg;\n return;\n }\n\n switch (svg) {\n case RETRYABLE_ERROR:\n case CACHEABLE_ERROR:\n this.svg = null;\n this.emit('syn-error');\n break;\n default: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button_group_default = SynButtonGroup;
|
|
@@ -9,4 +9,4 @@ SynButtonGroup.define("syn-button-group");
|
|
|
9
9
|
export {
|
|
10
10
|
button_group_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.INLTRHSF.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SynergyElement,
|
|
6
6
|
component_styles_default
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.VCFVQ6KS.js";
|
|
8
8
|
import {
|
|
9
9
|
__decorateClass,
|
|
10
10
|
__spreadProps,
|
|
@@ -18,7 +18,7 @@ import { html } from "lit";
|
|
|
18
18
|
import { offsetParent } from "composed-offset-position";
|
|
19
19
|
import { property, query } from "lit/decorators.js";
|
|
20
20
|
function isVirtualElement(e) {
|
|
21
|
-
return e !== null && typeof e === "object" && "getBoundingClientRect" in e;
|
|
21
|
+
return e !== null && typeof e === "object" && "getBoundingClientRect" in e && ("contextElement" in e ? e instanceof Element : true);
|
|
22
22
|
}
|
|
23
23
|
var SynPopup = class extends SynergyElement {
|
|
24
24
|
constructor() {
|
|
@@ -409,4 +409,4 @@ __decorateClass([
|
|
|
409
409
|
export {
|
|
410
410
|
SynPopup
|
|
411
411
|
};
|
|
412
|
-
//# sourceMappingURL=chunk.
|
|
412
|
+
//# sourceMappingURL=chunk.IVHB4EQ6.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/popup/popup.component.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { arrow, autoUpdate, computePosition, flip, offset, platform, shift, size } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit';\nimport { offsetParent } from 'composed-offset-position';\nimport { property, query } from 'lit/decorators.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport styles from './popup.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\nexport interface VirtualElement {\n getBoundingClientRect: () => DOMRect;\n contextElement?: Element;\n}\n\nfunction isVirtualElement(e: unknown): e is VirtualElement {\n return (\n e !== null &&\n typeof e === 'object' &&\n 'getBoundingClientRect' in e &&\n ('contextElement' in e ? e instanceof Element : true)\n );\n}\n\n/**\n * @summary Popup is a utility that lets you declaratively anchor \"popup\" containers to another element.\n * @documentation https://synergy.style/components/popup\n * @status stable\n * @since 2.0\n *\n * @event syn-reposition - Emitted when the popup is repositioned. This event can fire a lot, so avoid putting expensive\n * operations in your listener or consider debouncing it.\n *\n * @slot - The popup's content.\n * @slot anchor - The element the popup will be anchored to. If the anchor lives outside of the popup, you can use the\n * `anchor` attribute or property instead.\n *\n * @csspart arrow - The arrow's container. Avoid setting `top|bottom|left|right` properties, as these values are\n * assigned dynamically as the popup moves. This is most useful for applying a background color to match the popup, and\n * maybe a border or box shadow.\n * @csspart popup - The popup's container. Useful for setting a background color, box shadow, etc.\n * @csspart hover-bridge - The hover bridge element. Only available when the `hover-bridge` option is enabled.\n *\n * @cssproperty [--arrow-size=6px] - The size of the arrow. Note that an arrow won't be shown unless the `arrow`\n * attribute is used.\n * @cssproperty [--arrow-color=var(--syn-color-neutral-0)] - The color of the arrow.\n * @cssproperty [--auto-size-available-width] - A read-only custom property that determines the amount of width the\n * popup can be before overflowing. Useful for positioning child elements that need to overflow. This property is only\n * available when using `auto-size`.\n * @cssproperty [--auto-size-available-height] - A read-only custom property that determines the amount of height the\n * popup can be before overflowing. Useful for positioning child elements that need to overflow. This property is only\n * available when using `auto-size`.\n */\nexport default class SynPopup extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles];\n\n private anchorEl: Element | VirtualElement | null;\n private cleanup: ReturnType<typeof autoUpdate> | undefined;\n\n /** A reference to the internal popup container. Useful for animating and styling the popup with JavaScript. */\n @query('.popup') popup: HTMLElement;\n @query('.popup__arrow') private arrowEl: HTMLElement;\n\n /**\n * The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide the anchor\n * element `id`, a DOM element reference, or a `VirtualElement`. If the anchor lives inside the popup, use the\n * `anchor` slot instead.\n */\n @property() anchor: Element | string | VirtualElement;\n\n /**\n * Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\n * down and the popup will be hidden.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\n * panel inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /**\n * Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\n * clipped, using a `fixed` position strategy can often workaround it.\n */\n @property({ reflect: true }) strategy: 'absolute' | 'fixed' = 'absolute';\n\n /** The distance in pixels from which to offset the panel away from its anchor. */\n @property({ type: Number }) distance = 0;\n\n /** The distance in pixels from which to offset the panel along its anchor. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n * `--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n * `::part(arrow)` in your stylesheet.\n */\n @property({ type: Boolean }) arrow = false;\n\n /**\n * The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\n * anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\n * align the arrow to the start, end, or center of the popover instead.\n */\n @property({ attribute: 'arrow-placement' }) arrowPlacement: 'start' | 'end' | 'center' | 'anchor' = 'anchor';\n\n /**\n * The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\n * this will prevent it from overflowing the corners.\n */\n @property({ attribute: 'arrow-padding', type: Number }) arrowPadding = 10;\n\n /**\n * When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n * `flipFallbackPlacements` to further configure how the fallback placement is determined.\n */\n @property({ type: Boolean }) flip = false;\n\n /**\n * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\n * string of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\n * fallback strategy will be used instead.\n * */\n @property({\n attribute: 'flip-fallback-placements',\n converter: {\n fromAttribute: (value: string) => {\n return value\n .split(' ')\n .map(p => p.trim())\n .filter(p => p !== '');\n },\n toAttribute: (value: []) => {\n return value.join(' ');\n }\n }\n })\n flipFallbackPlacements = '';\n\n /**\n * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\n * the popup should be positioned using the best available fit based on available space or as it was initially\n * preferred.\n */\n @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'best-fit';\n\n /**\n * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) flipBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the flip behavior will occur. */\n @property({ attribute: 'flip-padding', type: Number }) flipPadding = 0;\n\n /** Moves the popup along the axis to keep it in view when clipped. */\n @property({ type: Boolean }) shift = false;\n\n /**\n * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) shiftBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the shift behavior will occur. */\n @property({ attribute: 'shift-padding', type: Number }) shiftPadding = 0;\n\n /** When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */\n @property({ attribute: 'auto-size' }) autoSize: 'horizontal' | 'vertical' | 'both';\n\n /** Syncs the popup's width or height to that of the anchor element. */\n @property() sync: 'width' | 'height' | 'both';\n\n /**\n * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) autoSizeBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */\n @property({ attribute: 'auto-size-padding', type: Number }) autoSizePadding = 0;\n\n /**\n * When a gap exists between the anchor and the popup element, this option will add a \"hover bridge\" that fills the\n * gap using an invisible element. This makes listening for events such as `mouseenter` and `mouseleave` more sane\n * because the pointer never technically leaves the element. The hover bridge will only be drawn when the popover is\n * active.\n */\n @property({ attribute: 'hover-bridge', type: Boolean }) hoverBridge = false;\n\n async connectedCallback() {\n super.connectedCallback();\n\n // Start the positioner after the first update\n await this.updateComplete;\n this.start();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.stop();\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n // Start or stop the positioner when active changes\n if (changedProps.has('active')) {\n if (this.active) {\n this.start();\n } else {\n this.stop();\n }\n }\n\n // Update the anchor when anchor changes\n if (changedProps.has('anchor')) {\n this.handleAnchorChange();\n }\n\n // All other properties will trigger a reposition when active\n if (this.active) {\n await this.updateComplete;\n this.reposition();\n }\n }\n\n private async handleAnchorChange() {\n await this.stop();\n\n if (this.anchor && typeof this.anchor === 'string') {\n // Locate the anchor by id\n const root = this.getRootNode() as Document | ShadowRoot;\n this.anchorEl = root.getElementById(this.anchor);\n } else if (this.anchor instanceof Element || isVirtualElement(this.anchor)) {\n // Use the anchor's reference\n this.anchorEl = this.anchor;\n } else {\n // Look for a slotted anchor\n this.anchorEl = this.querySelector<HTMLElement>('[slot=\"anchor\"]');\n }\n\n // If the anchor is a <slot>, we'll use the first assigned element as the target since slots use `display: contents`\n // and positioning can't be calculated on them\n if (this.anchorEl instanceof HTMLSlotElement) {\n this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n // If the anchor is valid, start it up\n if (this.anchorEl) {\n this.start();\n }\n }\n\n private start() {\n // We can't start the positioner without an anchor\n if (!this.anchorEl) {\n return;\n }\n\n this.cleanup = autoUpdate(this.anchorEl, this.popup, () => {\n this.reposition();\n });\n }\n\n private async stop(): Promise<void> {\n return new Promise(resolve => {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = undefined;\n this.removeAttribute('data-current-placement');\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n requestAnimationFrame(() => resolve());\n } else {\n resolve();\n }\n });\n }\n\n /** Forces the popup to recalculate and reposition itself. */\n reposition() {\n // Nothing to do if the popup is inactive or the anchor doesn't exist\n if (!this.active || !this.anchorEl) {\n return;\n }\n\n //\n // NOTE: Floating UI middlewares are order dependent: https://floating-ui.com/docs/middleware\n //\n const middleware = [\n // The offset middleware goes first\n offset({ mainAxis: this.distance, crossAxis: this.skidding })\n ];\n\n // First we sync width/height\n if (this.sync) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n const syncWidth = this.sync === 'width' || this.sync === 'both';\n const syncHeight = this.sync === 'height' || this.sync === 'both';\n this.popup.style.width = syncWidth ? `${rects.reference.width}px` : '';\n this.popup.style.height = syncHeight ? `${rects.reference.height}px` : '';\n }\n })\n );\n } else {\n // Cleanup styles if we're not matching width/height\n this.popup.style.width = '';\n this.popup.style.height = '';\n }\n\n // Then we flip\n if (this.flip) {\n middleware.push(\n flip({\n boundary: this.flipBoundary,\n // @ts-expect-error - We're converting a string attribute to an array here\n fallbackPlacements: this.flipFallbackPlacements,\n fallbackStrategy: this.flipFallbackStrategy === 'best-fit' ? 'bestFit' : 'initialPlacement',\n padding: this.flipPadding\n })\n );\n }\n\n // Then we shift\n if (this.shift) {\n middleware.push(\n shift({\n boundary: this.shiftBoundary,\n padding: this.shiftPadding\n })\n );\n }\n\n // Now we adjust the size as needed\n if (this.autoSize) {\n middleware.push(\n size({\n boundary: this.autoSizeBoundary,\n padding: this.autoSizePadding,\n apply: ({ availableWidth, availableHeight }) => {\n if (this.autoSize === 'vertical' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-height', `${availableHeight}px`);\n } else {\n this.style.removeProperty('--auto-size-available-height');\n }\n\n if (this.autoSize === 'horizontal' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-width', `${availableWidth}px`);\n } else {\n this.style.removeProperty('--auto-size-available-width');\n }\n }\n })\n );\n } else {\n // Cleanup styles if we're no longer using auto-size\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n }\n\n // Finally, we add an arrow\n if (this.arrow) {\n middleware.push(\n arrow({\n element: this.arrowEl,\n padding: this.arrowPadding\n })\n );\n }\n\n //\n // Use custom positioning logic if the strategy is absolute. Otherwise, fall back to the default logic.\n //\n // More info: https://github.com/synergy-design-system/synergy/issues/1135\n //\n const getOffsetParent =\n this.strategy === 'absolute'\n ? (element: Element) => platform.getOffsetParent(element, offsetParent)\n : platform.getOffsetParent;\n\n computePosition(this.anchorEl, this.popup, {\n placement: this.placement,\n middleware,\n strategy: this.strategy,\n platform: {\n ...platform,\n getOffsetParent\n }\n }).then(({ x, y, middlewareData, placement }) => {\n //\n // Even though we have our own localization utility, it uses different heuristics to determine RTL. Because of\n // that, we'll use the same approach that Floating UI uses.\n //\n // Source: https://github.com/floating-ui/floating-ui/blob/cb3b6ab07f95275730d3e6e46c702f8d4908b55c/packages/dom/src/utils/getDocumentRect.ts#L31\n //\n const isRtl = getComputedStyle(this).direction === 'rtl';\n const staticSide = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[placement.split('-')[0]]!;\n\n this.setAttribute('data-current-placement', placement);\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n\n if (this.arrow) {\n const arrowX = middlewareData.arrow!.x;\n const arrowY = middlewareData.arrow!.y;\n let top = '';\n let right = '';\n let bottom = '';\n let left = '';\n\n if (this.arrowPlacement === 'start') {\n // Start\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n top = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? value : '';\n left = isRtl ? '' : value;\n } else if (this.arrowPlacement === 'end') {\n // End\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? '' : value;\n left = isRtl ? value : '';\n bottom = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n } else if (this.arrowPlacement === 'center') {\n // Center\n left = typeof arrowX === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n top = typeof arrowY === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n } else {\n // Anchor (default)\n left = typeof arrowX === 'number' ? `${arrowX}px` : '';\n top = typeof arrowY === 'number' ? `${arrowY}px` : '';\n }\n\n Object.assign(this.arrowEl.style, {\n top,\n right,\n bottom,\n left,\n [staticSide]: 'calc(var(--arrow-size-diagonal) * -1)'\n });\n }\n });\n\n // Wait until the new position is drawn before updating the hover bridge, otherwise it can get out of sync\n requestAnimationFrame(() => this.updateHoverBridge());\n\n this.emit('syn-reposition');\n }\n\n private updateHoverBridge = () => {\n if (this.hoverBridge && this.anchorEl) {\n const anchorRect = this.anchorEl.getBoundingClientRect();\n const popupRect = this.popup.getBoundingClientRect();\n const isVertical = this.placement.includes('top') || this.placement.includes('bottom');\n let topLeftX = 0;\n let topLeftY = 0;\n let topRightX = 0;\n let topRightY = 0;\n let bottomLeftX = 0;\n let bottomLeftY = 0;\n let bottomRightX = 0;\n let bottomRightY = 0;\n\n if (isVertical) {\n if (anchorRect.top < popupRect.top) {\n // Anchor is above\n topLeftX = anchorRect.left;\n topLeftY = anchorRect.bottom;\n topRightX = anchorRect.right;\n topRightY = anchorRect.bottom;\n\n bottomLeftX = popupRect.left;\n bottomLeftY = popupRect.top;\n bottomRightX = popupRect.right;\n bottomRightY = popupRect.top;\n } else {\n // Anchor is below\n topLeftX = popupRect.left;\n topLeftY = popupRect.bottom;\n topRightX = popupRect.right;\n topRightY = popupRect.bottom;\n\n bottomLeftX = anchorRect.left;\n bottomLeftY = anchorRect.top;\n bottomRightX = anchorRect.right;\n bottomRightY = anchorRect.top;\n }\n } else {\n if (anchorRect.left < popupRect.left) {\n // Anchor is on the left\n topLeftX = anchorRect.right;\n topLeftY = anchorRect.top;\n topRightX = popupRect.left;\n topRightY = popupRect.top;\n\n bottomLeftX = anchorRect.right;\n bottomLeftY = anchorRect.bottom;\n bottomRightX = popupRect.left;\n bottomRightY = popupRect.bottom;\n } else {\n // Anchor is on the right\n topLeftX = popupRect.right;\n topLeftY = popupRect.top;\n topRightX = anchorRect.left;\n topRightY = anchorRect.top;\n\n bottomLeftX = popupRect.right;\n bottomLeftY = popupRect.bottom;\n bottomRightX = anchorRect.left;\n bottomRightY = anchorRect.bottom;\n }\n }\n\n this.style.setProperty('--hover-bridge-top-left-x', `${topLeftX}px`);\n this.style.setProperty('--hover-bridge-top-left-y', `${topLeftY}px`);\n this.style.setProperty('--hover-bridge-top-right-x', `${topRightX}px`);\n this.style.setProperty('--hover-bridge-top-right-y', `${topRightY}px`);\n this.style.setProperty('--hover-bridge-bottom-left-x', `${bottomLeftX}px`);\n this.style.setProperty('--hover-bridge-bottom-left-y', `${bottomLeftY}px`);\n this.style.setProperty('--hover-bridge-bottom-right-x', `${bottomRightX}px`);\n this.style.setProperty('--hover-bridge-bottom-right-y', `${bottomRightY}px`);\n }\n };\n\n render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this.handleAnchorChange}></slot>\n\n <span\n part=\"hover-bridge\"\n class=${classMap({\n 'popup-hover-bridge': true,\n 'popup-hover-bridge--visible': this.hoverBridge && this.active\n })}\n ></span>\n\n <div\n part=\"popup\"\n class=${classMap({\n popup: true,\n 'popup--active': this.active,\n 'popup--fixed': this.strategy === 'fixed',\n 'popup--has-arrow': this.arrow\n })}\n >\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>` : ''}\n </div>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAMA,SAAS,OAAO,YAAY,iBAAiB,MAAM,QAAQ,UAAU,OAAO,YAAY;AACxF,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAAS,UAAU,aAAa;AAWhC,SAAS,iBAAiB,GAAiC;AACzD,SACE,MAAM,QACN,OAAO,MAAM,YACb,2BAA2B,MAC1B,oBAAoB,IAAI,aAAa,UAAU;AAEpD;AA+BA,IAAqB,WAArB,cAAsC,eAAe;AAAA,EAArD;AAAA;AAqB8C,kBAAS;AAMxB,qBAYZ;AAMY,oBAAiC;AAGlC,oBAAW;AAGX,oBAAW;AAOV,iBAAQ;AAOO,0BAAwD;AAM5C,wBAAe;AAM1C,gBAAO;AAqBpC,kCAAyB;AAO0B,gCAA+C;AAU3C,uBAAc;AAGxC,iBAAQ;AAUmB,wBAAe;AAgBX,2BAAkB;AAQtB,uBAAc;AA0QtE,SAAQ,oBAAoB,MAAM;AAChC,UAAI,KAAK,eAAe,KAAK,UAAU;AACrC,cAAM,aAAa,KAAK,SAAS,sBAAsB;AACvD,cAAM,YAAY,KAAK,MAAM,sBAAsB;AACnD,cAAM,aAAa,KAAK,UAAU,SAAS,KAAK,KAAK,KAAK,UAAU,SAAS,QAAQ;AACrF,YAAI,WAAW;AACf,YAAI,WAAW;AACf,YAAI,YAAY;AAChB,YAAI,YAAY;AAChB,YAAI,cAAc;AAClB,YAAI,cAAc;AAClB,YAAI,eAAe;AACnB,YAAI,eAAe;AAEnB,YAAI,YAAY;AACd,cAAI,WAAW,MAAM,UAAU,KAAK;AAElC,uBAAW,WAAW;AACtB,uBAAW,WAAW;AACtB,wBAAY,WAAW;AACvB,wBAAY,WAAW;AAEvB,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Divider
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.TUFBQA52.js";
|
|
4
4
|
|
|
5
5
|
// src/components/divider/divider.ts
|
|
6
6
|
var divider_default = SynDivider;
|
|
@@ -9,4 +9,4 @@ SynDivider.define("syn-divider");
|
|
|
9
9
|
export {
|
|
10
10
|
divider_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.J3HTR5NX.js.map
|
|
@@ -181,6 +181,7 @@ var SubmenuController = class {
|
|
|
181
181
|
// newly opened menu.
|
|
182
182
|
enableSubmenu(delay = true) {
|
|
183
183
|
if (delay) {
|
|
184
|
+
window.clearTimeout(this.enableSubmenuTimer);
|
|
184
185
|
this.enableSubmenuTimer = window.setTimeout(() => {
|
|
185
186
|
this.setSubmenuState(true);
|
|
186
187
|
}, this.submenuOpenDelay);
|
|
@@ -189,7 +190,7 @@ var SubmenuController = class {
|
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
192
|
disableSubmenu() {
|
|
192
|
-
clearTimeout(this.enableSubmenuTimer);
|
|
193
|
+
window.clearTimeout(this.enableSubmenuTimer);
|
|
193
194
|
this.setSubmenuState(false);
|
|
194
195
|
}
|
|
195
196
|
// Calculate the space the top of a menu takes-up, for aligning the popup menu-item with the activating element.
|
|
@@ -236,4 +237,4 @@ var SubmenuController = class {
|
|
|
236
237
|
export {
|
|
237
238
|
SubmenuController
|
|
238
239
|
};
|
|
239
|
-
//# sourceMappingURL=chunk.
|
|
240
|
+
//# sourceMappingURL=chunk.JDBDBGQP.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/menu-item/submenu-controller.ts"],
|
|
4
|
-
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { createRef, ref, type Ref } from 'lit/directives/ref.js';\nimport { type HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { type LocalizeController } from '../../utilities/localize.js';\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type SynMenuItem from './menu-item.js';\nimport type SynPopup from '../popup/popup.js';\n\n/** A reactive controller to manage the registration of event listeners for submenus. */\nexport class SubmenuController implements ReactiveController {\n private host: ReactiveControllerHost & SynMenuItem;\n private popupRef: Ref<SynPopup> = createRef();\n private enableSubmenuTimer = -1;\n private isConnected = false;\n private isPopupConnected = false;\n private skidding = 0;\n private readonly hasSlotController: HasSlotController;\n private readonly localize: LocalizeController;\n private readonly submenuOpenDelay = 100;\n\n constructor(\n host: ReactiveControllerHost & SynMenuItem,\n hasSlotController: HasSlotController,\n localize: LocalizeController\n ) {\n (this.host = host).addController(this);\n this.hasSlotController = hasSlotController;\n this.localize = localize;\n }\n\n hostConnected() {\n if (this.hasSlotController.test('submenu') && !this.host.disabled) {\n this.addListeners();\n }\n }\n\n hostDisconnected() {\n this.removeListeners();\n }\n\n hostUpdated() {\n if (this.hasSlotController.test('submenu') && !this.host.disabled) {\n this.addListeners();\n this.updateSkidding();\n } else {\n this.removeListeners();\n }\n }\n\n private addListeners() {\n if (!this.isConnected) {\n this.host.addEventListener('mousemove', this.handleMouseMove);\n this.host.addEventListener('mouseover', this.handleMouseOver);\n this.host.addEventListener('keydown', this.handleKeyDown);\n this.host.addEventListener('click', this.handleClick);\n this.host.addEventListener('focusout', this.handleFocusOut);\n this.isConnected = true;\n }\n\n // The popup does not seem to get wired when the host is\n // connected, so manage its listeners separately.\n if (!this.isPopupConnected) {\n if (this.popupRef.value) {\n this.popupRef.value.addEventListener('mouseover', this.handlePopupMouseover);\n this.popupRef.value.addEventListener('syn-reposition', this.handlePopupReposition);\n this.isPopupConnected = true;\n }\n }\n }\n\n private removeListeners() {\n if (this.isConnected) {\n this.host.removeEventListener('mousemove', this.handleMouseMove);\n this.host.removeEventListener('mouseover', this.handleMouseOver);\n this.host.removeEventListener('keydown', this.handleKeyDown);\n this.host.removeEventListener('click', this.handleClick);\n this.host.removeEventListener('focusout', this.handleFocusOut);\n this.isConnected = false;\n }\n if (this.isPopupConnected) {\n if (this.popupRef.value) {\n this.popupRef.value.removeEventListener('mouseover', this.handlePopupMouseover);\n this.popupRef.value.removeEventListener('syn-reposition', this.handlePopupReposition);\n this.isPopupConnected = false;\n }\n }\n }\n\n // Set the safe triangle cursor position\n private handleMouseMove = (event: MouseEvent) => {\n this.host.style.setProperty('--safe-triangle-cursor-x', `${event.clientX}px`);\n this.host.style.setProperty('--safe-triangle-cursor-y', `${event.clientY}px`);\n };\n\n private handleMouseOver = () => {\n if (this.hasSlotController.test('submenu')) {\n this.enableSubmenu();\n }\n };\n\n private handleSubmenuEntry(event: KeyboardEvent) {\n // Pass focus to the first menu-item in the submenu.\n const submenuSlot: HTMLSlotElement | null = this.host.renderRoot.querySelector(\"slot[name='submenu']\");\n\n // Missing slot\n if (!submenuSlot) {\n console.error('Cannot activate a submenu if no corresponding menuitem can be found.', this);\n return;\n }\n\n // Menus\n let menuItems: NodeListOf<Element> | null = null;\n for (const elt of submenuSlot.assignedElements()) {\n menuItems = elt.querySelectorAll(\"syn-menu-item, [role^='menuitem']\");\n if (menuItems.length !== 0) {\n break;\n }\n }\n\n if (!menuItems || menuItems.length === 0) {\n return;\n }\n\n menuItems[0].setAttribute('tabindex', '0');\n for (let i = 1; i !== menuItems.length; ++i) {\n menuItems[i].setAttribute('tabindex', '-1');\n }\n\n // Open the submenu (if not open), and set focus to first menuitem.\n if (this.popupRef.value) {\n event.preventDefault();\n event.stopPropagation();\n if (this.popupRef.value.active) {\n if (menuItems[0] instanceof HTMLElement) {\n menuItems[0].focus();\n }\n } else {\n this.enableSubmenu(false);\n this.host.updateComplete.then(() => {\n if (menuItems![0] instanceof HTMLElement) {\n menuItems![0].focus();\n }\n });\n this.host.requestUpdate();\n }\n }\n }\n\n // Focus on the first menu-item of a submenu.\n private handleKeyDown = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'Escape':\n case 'Tab':\n this.disableSubmenu();\n break;\n case 'ArrowLeft':\n // Either focus is currently on the host element or a child\n if (event.target !== this.host) {\n event.preventDefault();\n event.stopPropagation();\n this.host.focus();\n this.disableSubmenu();\n }\n break;\n case 'ArrowRight':\n case 'Enter':\n case ' ':\n this.handleSubmenuEntry(event);\n break;\n default:\n break;\n }\n };\n\n private handleClick = (event: MouseEvent) => {\n // Clicking on the item which heads the menu does nothing, otherwise hide submenu and propagate\n if (event.target === this.host) {\n event.preventDefault();\n event.stopPropagation();\n } else if (\n event.target instanceof Element &&\n (event.target.tagName === 'syn-menu-item' || event.target.role?.startsWith('menuitem'))\n ) {\n this.disableSubmenu();\n }\n };\n\n // Close this submenu on focus outside of the parent or any descendants.\n private handleFocusOut = (event: FocusEvent) => {\n if (event.relatedTarget && event.relatedTarget instanceof Element && this.host.contains(event.relatedTarget)) {\n return;\n }\n this.disableSubmenu();\n };\n\n // Prevent the parent menu-item from getting focus on mouse movement on the submenu\n private handlePopupMouseover = (event: MouseEvent) => {\n event.stopPropagation();\n };\n\n // Set the safe triangle values for the submenu when the position changes\n private handlePopupReposition = () => {\n const submenuSlot: HTMLSlotElement | null = this.host.renderRoot.querySelector(\"slot[name='submenu']\");\n const menu = submenuSlot?.assignedElements({ flatten: true }).filter(el => el.localName === 'syn-menu')[0];\n const isRtl = this.localize.dir() === 'rtl';\n\n if (!menu) {\n return;\n }\n\n const { left, top, width, height } = menu.getBoundingClientRect();\n\n this.host.style.setProperty('--safe-triangle-submenu-start-x', `${isRtl ? left + width : left}px`);\n this.host.style.setProperty('--safe-triangle-submenu-start-y', `${top}px`);\n this.host.style.setProperty('--safe-triangle-submenu-end-x', `${isRtl ? left + width : left}px`);\n this.host.style.setProperty('--safe-triangle-submenu-end-y', `${top + height}px`);\n };\n\n private setSubmenuState(state: boolean) {\n if (this.popupRef.value) {\n if (this.popupRef.value.active !== state) {\n this.popupRef.value.active = state;\n this.host.requestUpdate();\n }\n }\n }\n\n // Shows the submenu. Supports disabling the opening delay, e.g. for keyboard events that want to set the focus to the\n // newly opened menu.\n private enableSubmenu(delay = true) {\n if (delay) {\n this.enableSubmenuTimer = window.setTimeout(() => {\n this.setSubmenuState(true);\n }, this.submenuOpenDelay);\n } else {\n this.setSubmenuState(true);\n }\n }\n\n private disableSubmenu() {\n clearTimeout(this.enableSubmenuTimer);\n this.setSubmenuState(false);\n }\n\n // Calculate the space the top of a menu takes-up, for aligning the popup menu-item with the activating element.\n private updateSkidding(): void {\n // .computedStyleMap() not always available.\n if (!this.host.parentElement?.computedStyleMap) {\n return;\n }\n const styleMap: StylePropertyMapReadOnly = this.host.parentElement.computedStyleMap();\n const attrs: string[] = ['padding-top', 'border-top-width', 'margin-top'];\n\n const skidding = attrs.reduce((accumulator, attr) => {\n const styleValue: CSSStyleValue = styleMap.get(attr) ?? new CSSUnitValue(0, 'px');\n const unitValue = styleValue instanceof CSSUnitValue ? styleValue : new CSSUnitValue(0, 'px');\n const pxValue = unitValue.to('px');\n return accumulator - pxValue.value;\n }, 0);\n\n this.skidding = skidding;\n }\n\n isExpanded(): boolean {\n return this.popupRef.value ? this.popupRef.value.active : false;\n }\n\n renderSubmenu() {\n const isLtr = this.localize.dir() === 'ltr';\n\n // Always render the slot, but conditionally render the outer <syn-popup>\n if (!this.isConnected) {\n return html` <slot name=\"submenu\" hidden></slot> `;\n }\n\n return html`\n <syn-popup\n ${ref(this.popupRef)}\n placement=${isLtr ? 'right-start' : 'left-start'}\n anchor=\"anchor\"\n flip\n flip-fallback-strategy=\"best-fit\"\n skidding=\"${this.skidding}\"\n strategy=\"fixed\"\n >\n <slot name=\"submenu\"></slot>\n </syn-popup>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": ";AAMA,SAAS,WAAW,WAAqB;AAEzC,SAAS,YAAY;AAOd,IAAM,oBAAN,MAAsD;AAAA,EAW3D,YACE,MACA,mBACA,UACA;AA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AAI,iBAAiB,mCAAmC;AACpE,UAAI,UAAU,WAAW,GAAG;AAC1B;AAAA,MACF;AAAA,IACF;AAEA,QAAI,CAAC,aAAa,UAAU,WAAW,GAAG;AACxC;AAAA,IACF;AAEA,cAAU,CAAC,EAAE,aAAa,YAAY,GAAG;AACzC,aAAS,IAAI,GAAG,MAAM,UAAU,QAAQ,EAAE,GAAG;AAC3C,gBAAU,CAAC,EAAE,aAAa,YAAY,IAAI;AAAA,IAC5C;AAGA,QAAI,KAAK,SAAS,OAAO;AACvB,YAAM,eAAe;AACrB,YAAM,gBAAgB;AACtB,UAAI,KAAK,SAAS,MAAM,QAAQ;AAC9B,YAAI,UAAU,CAAC,aAAa,aAAa;AACvC,oBAAU,CAAC,EAAE,MAAM;AAAA,QACrB;AAAA,MACF,OAAO;AACL,aAAK,cAAc,KAAK;AACxB,aAAK,KAAK,eAAe,KAAK,MAAM;AAClC,cAAI,UAAW,CAAC,aAAa,aAAa;AACxC,sBAAW,CAAC,EAAE,MAAM;AAAA,UACtB;AAAA,QACF,CAAC;AACD,aAAK,KAAK,cAAc;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAAA,EAwEQ,gBAAgB,OAAgB;AACtC,QAAI,KAAK,SAAS,OAAO;AACvB,UAAI,KAAK,SAAS,MAAM,WAAW,OAAO;AACxC,aAAK,SAAS,MAAM,SAAS;AAC7B,aAAK,KAAK,cAAc;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA,EAIQ,cAAc,QAAQ,MAAM;AAClC,QAAI,OAAO;AACT,WAAK,qBAAqB,OAAO,WAAW,MAAM;AAChD,aAAK,gBAAgB,IAAI;AAAA,MAC3B,GAAG,KAAK,gBAAgB;AAAA,IAC1B,OAAO;AACL,WAAK,gBAAgB,IAAI;AAAA,IAC3B;AAAA,EACF;AAAA,EAEQ,iBAAiB;AACvB,
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { createRef, ref, type Ref } from 'lit/directives/ref.js';\nimport { type HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { type LocalizeController } from '../../utilities/localize.js';\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type SynMenuItem from './menu-item.js';\nimport type SynPopup from '../popup/popup.js';\n\n/** A reactive controller to manage the registration of event listeners for submenus. */\nexport class SubmenuController implements ReactiveController {\n private host: ReactiveControllerHost & SynMenuItem;\n private popupRef: Ref<SynPopup> = createRef();\n private enableSubmenuTimer = -1;\n private isConnected = false;\n private isPopupConnected = false;\n private skidding = 0;\n private readonly hasSlotController: HasSlotController;\n private readonly localize: LocalizeController;\n private readonly submenuOpenDelay = 100;\n\n constructor(\n host: ReactiveControllerHost & SynMenuItem,\n hasSlotController: HasSlotController,\n localize: LocalizeController\n ) {\n (this.host = host).addController(this);\n this.hasSlotController = hasSlotController;\n this.localize = localize;\n }\n\n hostConnected() {\n if (this.hasSlotController.test('submenu') && !this.host.disabled) {\n this.addListeners();\n }\n }\n\n hostDisconnected() {\n this.removeListeners();\n }\n\n hostUpdated() {\n if (this.hasSlotController.test('submenu') && !this.host.disabled) {\n this.addListeners();\n this.updateSkidding();\n } else {\n this.removeListeners();\n }\n }\n\n private addListeners() {\n if (!this.isConnected) {\n this.host.addEventListener('mousemove', this.handleMouseMove);\n this.host.addEventListener('mouseover', this.handleMouseOver);\n this.host.addEventListener('keydown', this.handleKeyDown);\n this.host.addEventListener('click', this.handleClick);\n this.host.addEventListener('focusout', this.handleFocusOut);\n this.isConnected = true;\n }\n\n // The popup does not seem to get wired when the host is\n // connected, so manage its listeners separately.\n if (!this.isPopupConnected) {\n if (this.popupRef.value) {\n this.popupRef.value.addEventListener('mouseover', this.handlePopupMouseover);\n this.popupRef.value.addEventListener('syn-reposition', this.handlePopupReposition);\n this.isPopupConnected = true;\n }\n }\n }\n\n private removeListeners() {\n if (this.isConnected) {\n this.host.removeEventListener('mousemove', this.handleMouseMove);\n this.host.removeEventListener('mouseover', this.handleMouseOver);\n this.host.removeEventListener('keydown', this.handleKeyDown);\n this.host.removeEventListener('click', this.handleClick);\n this.host.removeEventListener('focusout', this.handleFocusOut);\n this.isConnected = false;\n }\n if (this.isPopupConnected) {\n if (this.popupRef.value) {\n this.popupRef.value.removeEventListener('mouseover', this.handlePopupMouseover);\n this.popupRef.value.removeEventListener('syn-reposition', this.handlePopupReposition);\n this.isPopupConnected = false;\n }\n }\n }\n\n // Set the safe triangle cursor position\n private handleMouseMove = (event: MouseEvent) => {\n this.host.style.setProperty('--safe-triangle-cursor-x', `${event.clientX}px`);\n this.host.style.setProperty('--safe-triangle-cursor-y', `${event.clientY}px`);\n };\n\n private handleMouseOver = () => {\n if (this.hasSlotController.test('submenu')) {\n this.enableSubmenu();\n }\n };\n\n private handleSubmenuEntry(event: KeyboardEvent) {\n // Pass focus to the first menu-item in the submenu.\n const submenuSlot: HTMLSlotElement | null = this.host.renderRoot.querySelector(\"slot[name='submenu']\");\n\n // Missing slot\n if (!submenuSlot) {\n console.error('Cannot activate a submenu if no corresponding menuitem can be found.', this);\n return;\n }\n\n // Menus\n let menuItems: NodeListOf<Element> | null = null;\n for (const elt of submenuSlot.assignedElements()) {\n menuItems = elt.querySelectorAll(\"syn-menu-item, [role^='menuitem']\");\n if (menuItems.length !== 0) {\n break;\n }\n }\n\n if (!menuItems || menuItems.length === 0) {\n return;\n }\n\n menuItems[0].setAttribute('tabindex', '0');\n for (let i = 1; i !== menuItems.length; ++i) {\n menuItems[i].setAttribute('tabindex', '-1');\n }\n\n // Open the submenu (if not open), and set focus to first menuitem.\n if (this.popupRef.value) {\n event.preventDefault();\n event.stopPropagation();\n if (this.popupRef.value.active) {\n if (menuItems[0] instanceof HTMLElement) {\n menuItems[0].focus();\n }\n } else {\n this.enableSubmenu(false);\n this.host.updateComplete.then(() => {\n if (menuItems![0] instanceof HTMLElement) {\n menuItems![0].focus();\n }\n });\n this.host.requestUpdate();\n }\n }\n }\n\n // Focus on the first menu-item of a submenu.\n private handleKeyDown = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'Escape':\n case 'Tab':\n this.disableSubmenu();\n break;\n case 'ArrowLeft':\n // Either focus is currently on the host element or a child\n if (event.target !== this.host) {\n event.preventDefault();\n event.stopPropagation();\n this.host.focus();\n this.disableSubmenu();\n }\n break;\n case 'ArrowRight':\n case 'Enter':\n case ' ':\n this.handleSubmenuEntry(event);\n break;\n default:\n break;\n }\n };\n\n private handleClick = (event: MouseEvent) => {\n // Clicking on the item which heads the menu does nothing, otherwise hide submenu and propagate\n if (event.target === this.host) {\n event.preventDefault();\n event.stopPropagation();\n } else if (\n event.target instanceof Element &&\n (event.target.tagName === 'syn-menu-item' || event.target.role?.startsWith('menuitem'))\n ) {\n this.disableSubmenu();\n }\n };\n\n // Close this submenu on focus outside of the parent or any descendants.\n private handleFocusOut = (event: FocusEvent) => {\n if (event.relatedTarget && event.relatedTarget instanceof Element && this.host.contains(event.relatedTarget)) {\n return;\n }\n this.disableSubmenu();\n };\n\n // Prevent the parent menu-item from getting focus on mouse movement on the submenu\n private handlePopupMouseover = (event: MouseEvent) => {\n event.stopPropagation();\n };\n\n // Set the safe triangle values for the submenu when the position changes\n private handlePopupReposition = () => {\n const submenuSlot: HTMLSlotElement | null = this.host.renderRoot.querySelector(\"slot[name='submenu']\");\n const menu = submenuSlot?.assignedElements({ flatten: true }).filter(el => el.localName === 'syn-menu')[0];\n const isRtl = this.localize.dir() === 'rtl';\n\n if (!menu) {\n return;\n }\n\n const { left, top, width, height } = menu.getBoundingClientRect();\n\n this.host.style.setProperty('--safe-triangle-submenu-start-x', `${isRtl ? left + width : left}px`);\n this.host.style.setProperty('--safe-triangle-submenu-start-y', `${top}px`);\n this.host.style.setProperty('--safe-triangle-submenu-end-x', `${isRtl ? left + width : left}px`);\n this.host.style.setProperty('--safe-triangle-submenu-end-y', `${top + height}px`);\n };\n\n private setSubmenuState(state: boolean) {\n if (this.popupRef.value) {\n if (this.popupRef.value.active !== state) {\n this.popupRef.value.active = state;\n this.host.requestUpdate();\n }\n }\n }\n\n // Shows the submenu. Supports disabling the opening delay, e.g. for keyboard events that want to set the focus to the\n // newly opened menu.\n private enableSubmenu(delay = true) {\n if (delay) {\n window.clearTimeout(this.enableSubmenuTimer);\n this.enableSubmenuTimer = window.setTimeout(() => {\n this.setSubmenuState(true);\n }, this.submenuOpenDelay);\n } else {\n this.setSubmenuState(true);\n }\n }\n\n private disableSubmenu() {\n window.clearTimeout(this.enableSubmenuTimer);\n this.setSubmenuState(false);\n }\n\n // Calculate the space the top of a menu takes-up, for aligning the popup menu-item with the activating element.\n private updateSkidding(): void {\n // .computedStyleMap() not always available.\n if (!this.host.parentElement?.computedStyleMap) {\n return;\n }\n const styleMap: StylePropertyMapReadOnly = this.host.parentElement.computedStyleMap();\n const attrs: string[] = ['padding-top', 'border-top-width', 'margin-top'];\n\n const skidding = attrs.reduce((accumulator, attr) => {\n const styleValue: CSSStyleValue = styleMap.get(attr) ?? new CSSUnitValue(0, 'px');\n const unitValue = styleValue instanceof CSSUnitValue ? styleValue : new CSSUnitValue(0, 'px');\n const pxValue = unitValue.to('px');\n return accumulator - pxValue.value;\n }, 0);\n\n this.skidding = skidding;\n }\n\n isExpanded(): boolean {\n return this.popupRef.value ? this.popupRef.value.active : false;\n }\n\n renderSubmenu() {\n const isLtr = this.localize.dir() === 'ltr';\n\n // Always render the slot, but conditionally render the outer <syn-popup>\n if (!this.isConnected) {\n return html` <slot name=\"submenu\" hidden></slot> `;\n }\n\n return html`\n <syn-popup\n ${ref(this.popupRef)}\n placement=${isLtr ? 'right-start' : 'left-start'}\n anchor=\"anchor\"\n flip\n flip-fallback-strategy=\"best-fit\"\n skidding=\"${this.skidding}\"\n strategy=\"fixed\"\n >\n <slot name=\"submenu\"></slot>\n </syn-popup>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAMA,SAAS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// src/components/icon/icon.ts
|
|
6
6
|
var icon_default = SynIcon;
|
|
@@ -9,4 +9,4 @@ SynIcon.define("syn-icon");
|
|
|
9
9
|
export {
|
|
10
10
|
icon_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.JJZKPNJZ.js.map
|
|
@@ -86,7 +86,7 @@ var FormControlController = class {
|
|
|
86
86
|
const formId = input.form;
|
|
87
87
|
if (formId) {
|
|
88
88
|
const root = input.getRootNode();
|
|
89
|
-
const form = root.
|
|
89
|
+
const form = root.querySelector(`#${formId}`);
|
|
90
90
|
if (form) {
|
|
91
91
|
return form;
|
|
92
92
|
}
|
|
@@ -301,4 +301,4 @@ export {
|
|
|
301
301
|
valueMissingValidityState,
|
|
302
302
|
customErrorValidityState
|
|
303
303
|
};
|
|
304
|
-
//# sourceMappingURL=chunk.
|
|
304
|
+
//# sourceMappingURL=chunk.JUJZBRXD.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/internal/form.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { SynergyFormControl } from '../internal/synergy-element.js';\nimport type SynButton from '../components/button/button.js';\n\n//\n// We store a WeakMap of forms + controls so we can keep references to all Synergy controls within a given form. As\n// elements connect and disconnect to/from the DOM, their containing form is used as the key and the form control is\n// added and removed from the form's set, respectively.\n//\nexport const formCollections: WeakMap<HTMLFormElement, Set<SynergyFormControl>> = new WeakMap();\n\n//\n// We store a WeakMap of reportValidity() overloads so we can override it when form controls connect to the DOM and\n// restore the original behavior when they disconnect.\n//\nconst reportValidityOverloads: WeakMap<HTMLFormElement, () => boolean> = new WeakMap();\nconst checkValidityOverloads: WeakMap<HTMLFormElement, () => boolean> = new WeakMap();\n\n//\n// We store a Set of controls that users have interacted with. This allows us to determine the interaction state\n// without littering the DOM with additional data attributes.\n//\nconst userInteractedControls: WeakSet<SynergyFormControl> = new WeakSet();\n\n//\n// We store a WeakMap of interactions for each form control so we can track when all conditions are met for validation.\n//\nconst interactions = new WeakMap<SynergyFormControl, string[]>();\n\nexport interface FormControlControllerOptions {\n /** A function that returns the form containing the form control. */\n form: (input: SynergyFormControl) => HTMLFormElement | null;\n /** A function that returns the form control's name, which will be submitted with the form data. */\n name: (input: SynergyFormControl) => string;\n /** A function that returns the form control's current value. */\n value: (input: SynergyFormControl) => unknown | unknown[];\n /** A function that returns the form control's default value. */\n defaultValue: (input: SynergyFormControl) => unknown | unknown[];\n /** A function that returns the form control's current disabled state. If disabled, the value won't be submitted. */\n disabled: (input: SynergyFormControl) => boolean;\n /**\n * A function that maps to the form control's reportValidity() function. When the control is invalid, this will\n * prevent submission and trigger the browser's constraint violation warning.\n */\n reportValidity: (input: SynergyFormControl) => boolean;\n\n /**\n * A function that maps to the form control's `checkValidity()` function. When the control is invalid, this will return false.\n * this is helpful is you want to check validation without triggering the native browser constraint violation warning.\n */\n checkValidity: (input: SynergyFormControl) => boolean;\n /** A function that sets the form control's value */\n setValue: (input: SynergyFormControl, value: unknown) => void;\n /**\n * An array of event names to listen to. When all events in the list are emitted, the control will receive validity\n * states such as user-valid and user-invalid.user interacted validity states. */\n assumeInteractionOn: string[];\n}\n\n/** A reactive controller to allow form controls to participate in form submission, validation, etc. */\nexport class FormControlController implements ReactiveController {\n host: SynergyFormControl & ReactiveControllerHost;\n form?: HTMLFormElement | null;\n options: FormControlControllerOptions;\n\n constructor(host: ReactiveControllerHost & SynergyFormControl, options?: Partial<FormControlControllerOptions>) {\n (this.host = host).addController(this);\n this.options = {\n form: input => {\n // If there's a form attribute, use it to find the target form by id\n // Controls may not always reflect the 'form' property. For example, `<syn-button>` doesn't reflect.\n const formId = input.form;\n\n if (formId) {\n const root = input.getRootNode() as Document | ShadowRoot | HTMLElement;\n const form = root.querySelector(`#${formId}`);\n\n if (form) {\n return form as HTMLFormElement;\n }\n }\n\n return input.closest('form');\n },\n name: input => input.name,\n value: input => input.value,\n defaultValue: input => input.defaultValue,\n disabled: input => input.disabled ?? false,\n reportValidity: input => (typeof input.reportValidity === 'function' ? input.reportValidity() : true),\n checkValidity: input => (typeof input.checkValidity === 'function' ? input.checkValidity() : true),\n setValue: (input, value: string) => (input.value = value),\n assumeInteractionOn: ['syn-input'],\n ...options\n };\n }\n\n hostConnected() {\n const form = this.options.form(this.host);\n\n if (form) {\n this.attachForm(form);\n }\n\n // Listen for interactions\n interactions.set(this.host, []);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.addEventListener(event, this.handleInteraction);\n });\n }\n\n hostDisconnected() {\n this.detachForm();\n\n // Clean up interactions\n interactions.delete(this.host);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.removeEventListener(event, this.handleInteraction);\n });\n }\n\n hostUpdated() {\n const form = this.options.form(this.host);\n\n // Detach if the form no longer exists\n if (!form) {\n this.detachForm();\n }\n\n // If the form has changed, reattach it\n if (form && this.form !== form) {\n this.detachForm();\n this.attachForm(form);\n }\n\n if (this.host.hasUpdated) {\n this.setValidity(this.host.validity.valid);\n }\n }\n\n private attachForm(form?: HTMLFormElement) {\n if (form) {\n this.form = form;\n\n // Add this element to the form's collection\n if (formCollections.has(this.form)) {\n formCollections.get(this.form)!.add(this.host);\n } else {\n formCollections.set(this.form, new Set<SynergyFormControl>([this.host]));\n }\n\n this.form.addEventListener('formdata', this.handleFormData);\n this.form.addEventListener('submit', this.handleFormSubmit);\n this.form.addEventListener('reset', this.handleFormReset);\n\n // Overload the form's reportValidity() method so it looks at Synergy form controls\n if (!reportValidityOverloads.has(this.form)) {\n reportValidityOverloads.set(this.form, this.form.reportValidity);\n this.form.reportValidity = () => this.reportFormValidity();\n }\n\n // Overload the form's checkValidity() method so it looks at Synergy form controls\n if (!checkValidityOverloads.has(this.form)) {\n checkValidityOverloads.set(this.form, this.form.checkValidity);\n this.form.checkValidity = () => this.checkFormValidity();\n }\n } else {\n this.form = undefined;\n }\n }\n\n private detachForm() {\n if (!this.form) return;\n\n const formCollection = formCollections.get(this.form);\n\n if (!formCollection) {\n return;\n }\n\n // Remove this host from the form's collection\n formCollection.delete(this.host);\n\n // Check to make sure there's no other form controls in the collection. If we do this\n // without checking if any other controls are still in the collection, then we will wipe out the\n // validity checks for all other elements.\n // see: https://github.com/synergy-design-system/synergy/issues/1703\n if (formCollection.size <= 0) {\n this.form.removeEventListener('formdata', this.handleFormData);\n this.form.removeEventListener('submit', this.handleFormSubmit);\n this.form.removeEventListener('reset', this.handleFormReset);\n\n // Remove the overload and restore the original method\n if (reportValidityOverloads.has(this.form)) {\n this.form.reportValidity = reportValidityOverloads.get(this.form)!;\n reportValidityOverloads.delete(this.form);\n }\n\n if (checkValidityOverloads.has(this.form)) {\n this.form.checkValidity = checkValidityOverloads.get(this.form)!;\n checkValidityOverloads.delete(this.form);\n }\n\n // So it looks weird here to not always set the form to undefined. But I _think_ if we unattach this.form here,\n // we end up in this fun spot where future validity checks don't have a reference to the form validity handler.\n // First form element in sets the validity handler. So we can't clean up `this.form` until there are no other form elements in the form.\n this.form = undefined;\n }\n }\n\n private handleFormData = (event: FormDataEvent) => {\n const disabled = this.options.disabled(this.host);\n const name = this.options.name(this.host);\n const value = this.options.value(this.host);\n\n // For buttons, we only submit the value if they were the submitter. This is currently done in doAction() by\n // injecting the name/value on a temporary button, so we can just skip them here.\n const isButton = this.host.tagName.toLowerCase() === 'syn-button';\n\n if (\n this.host.isConnected &&\n !disabled &&\n !isButton &&\n typeof name === 'string' &&\n name.length > 0 &&\n typeof value !== 'undefined'\n ) {\n if (Array.isArray(value)) {\n (value as unknown[]).forEach(val => {\n event.formData.append(name, (val as string | number | boolean).toString());\n });\n } else {\n event.formData.append(name, (value as string | number | boolean).toString());\n }\n }\n };\n\n private handleFormSubmit = (event: Event) => {\n const disabled = this.options.disabled(this.host);\n const reportValidity = this.options.reportValidity;\n\n // Update the interacted state for all controls when the form is submitted\n if (this.form && !this.form.noValidate) {\n formCollections.get(this.form)?.forEach(control => {\n this.setUserInteracted(control, true);\n });\n }\n\n if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n\n private handleFormReset = () => {\n this.options.setValue(this.host, this.options.defaultValue(this.host));\n this.setUserInteracted(this.host, false);\n interactions.set(this.host, []);\n };\n\n private handleInteraction = (event: Event) => {\n const emittedEvents = interactions.get(this.host)!;\n\n if (!emittedEvents.includes(event.type)) {\n emittedEvents.push(event.type);\n }\n\n // Mark it as user-interacted as soon as all associated events have been emitted\n if (emittedEvents.length === this.options.assumeInteractionOn.length) {\n this.setUserInteracted(this.host, true);\n }\n };\n\n private checkFormValidity = () => {\n //\n // This is very similar to the `reportFormValidity` function, but it does not trigger native constraint validation\n // Allow the user to simply check if the form is valid and handling validity in their own way.\n //\n // We preserve the original method in a WeakMap, but we don't call it from the overload because that would trigger\n // validations in an unexpected order. When the element disconnects, we revert to the original behavior. This won't\n // be necessary once we can use ElementInternals.\n //\n // Note that we're also honoring the form's novalidate attribute.\n //\n if (this.form && !this.form.noValidate) {\n // This seems sloppy, but checking all elements will cover native inputs, Synergy inputs, and other custom\n // elements that support the constraint validation API.\n const elements = this.form.querySelectorAll<HTMLInputElement>('*');\n\n for (const element of elements) {\n if (typeof element.checkValidity === 'function') {\n if (!element.checkValidity()) {\n return false;\n }\n }\n }\n }\n\n return true;\n };\n\n private reportFormValidity = () => {\n //\n // Synergy form controls work hard to act like regular form controls. They support the Constraint Validation API\n // and its associated methods such as setCustomValidity() and reportValidity(). However, the HTMLFormElement also\n // has a reportValidity() method that will trigger validation on all child controls. Since we're not yet using\n // ElementInternals, we need to overload this method so it looks for any element with the reportValidity() method.\n //\n // We preserve the original method in a WeakMap, but we don't call it from the overload because that would trigger\n // validations in an unexpected order. When the element disconnects, we revert to the original behavior. This won't\n // be necessary once we can use ElementInternals.\n //\n // Note that we're also honoring the form's novalidate attribute.\n //\n if (this.form && !this.form.noValidate) {\n // This seems sloppy, but checking all elements will cover native inputs, Synergy inputs, and other custom\n // elements that support the constraint validation API.\n const elements = this.form.querySelectorAll<HTMLInputElement>('*');\n\n for (const element of elements) {\n if (typeof element.reportValidity === 'function') {\n if (!element.reportValidity()) {\n return false;\n }\n }\n }\n }\n\n return true;\n };\n\n private setUserInteracted(el: SynergyFormControl, hasInteracted: boolean) {\n if (hasInteracted) {\n userInteractedControls.add(el);\n } else {\n userInteractedControls.delete(el);\n }\n\n el.requestUpdate();\n }\n\n private doAction(type: 'submit' | 'reset', submitter?: HTMLInputElement | SynButton) {\n if (this.form) {\n const button = document.createElement('button');\n button.type = type;\n button.style.position = 'absolute';\n button.style.width = '0';\n button.style.height = '0';\n button.style.clipPath = 'inset(50%)';\n button.style.overflow = 'hidden';\n button.style.whiteSpace = 'nowrap';\n\n // Pass name, value, and form attributes through to the temporary button\n if (submitter) {\n button.name = submitter.name;\n button.value = submitter.value;\n\n ['formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget'].forEach(attr => {\n if (submitter.hasAttribute(attr)) {\n button.setAttribute(attr, submitter.getAttribute(attr)!);\n }\n });\n }\n\n this.form.append(button);\n button.click();\n button.remove();\n }\n }\n\n /** Returns the associated `<form>` element, if one exists. */\n getForm() {\n return this.form ?? null;\n }\n\n /** Resets the form, restoring all the control to their default value */\n reset(submitter?: HTMLInputElement | SynButton) {\n this.doAction('reset', submitter);\n }\n\n /** Submits the form, triggering validation and form data injection. */\n submit(submitter?: HTMLInputElement | SynButton) {\n // Calling form.submit() bypasses the submit event and constraint validation. To prevent this, we can inject a\n // native submit button into the form, \"click\" it, then remove it to simulate a standard form submission.\n this.doAction('submit', submitter);\n }\n\n /**\n * Synchronously sets the form control's validity. Call this when you know the future validity but need to update\n * the host element immediately, i.e. before Lit updates the component in the next update.\n */\n setValidity(isValid: boolean) {\n const host = this.host;\n const hasInteracted = Boolean(userInteractedControls.has(host));\n const required = Boolean(host.required);\n\n //\n // We're mapping the following \"states\" to data attributes. In the future, we can use ElementInternals.states to\n // create a similar mapping, but instead of [data-invalid] it will look like :--invalid.\n //\n // See this RFC for more details: https://github.com/synergy-design-system/synergy/issues/1011\n //\n host.toggleAttribute('data-required', required);\n host.toggleAttribute('data-optional', !required);\n host.toggleAttribute('data-invalid', !isValid);\n host.toggleAttribute('data-valid', isValid);\n host.toggleAttribute('data-user-invalid', !isValid && hasInteracted);\n host.toggleAttribute('data-user-valid', isValid && hasInteracted);\n }\n\n /**\n * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything\n * that affects constraint validation changes so the component receives the correct validity states.\n */\n updateValidity() {\n const host = this.host;\n this.setValidity(host.validity.valid);\n }\n\n /**\n * Dispatches a non-bubbling, cancelable custom event of type `syn-invalid`.\n * If the `syn-invalid` event will be cancelled then the original `invalid`\n * event (which may have been passed as argument) will also be cancelled.\n * If no original `invalid` event has been passed then the `syn-invalid`\n * event will be cancelled before being dispatched.\n */\n emitInvalidEvent(originalInvalidEvent?: Event) {\n const slInvalidEvent = new CustomEvent<Record<PropertyKey, never>>('syn-invalid', {\n bubbles: false,\n composed: false,\n cancelable: true,\n detail: {}\n });\n\n if (!originalInvalidEvent) {\n slInvalidEvent.preventDefault();\n }\n\n if (!this.host.dispatchEvent(slInvalidEvent)) {\n originalInvalidEvent?.preventDefault();\n }\n }\n}\n\n/*\n * Predefined common validity states.\n * All of them are read-only.\n */\n\n// A validity state object that represents `valid`\nexport const validValidityState: ValidityState = Object.freeze({\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: true,\n valueMissing: false\n});\n\n// A validity state object that represents `value missing`\nexport const valueMissingValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n valueMissing: true\n});\n\n// A validity state object that represents a custom error\nexport const customErrorValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n customError: true\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;AAeO,IAAM,kBAAqE,oBAAI,QAAQ;AAM9F,IAAM,0BAAmE,oBAAI,QAAQ;AACrF,IAAM,yBAAkE,oBAAI,QAAQ;AAMpF,IAAM,yBAAsD,oBAAI,QAAQ;AAKxE,IAAM,eAAe,oBAAI,QAAsC;AAiCxD,IAAM,wBAAN,MAA0D;AAAA,EAK/D,YAAY,MAAmD,SAAiD;AAgJhH,SAAQ,iBAAiB,CAAC,UAAyB;AACjD,YAAM,WAAW,KAAK,QAAQ,SAAS,KAAK,IAAI;AAChD,YAAM,OAAO,KAAK,QAAQ,KAAK,KAAK,IAAI;AACxC,YAAM,QAAQ,KAAK,QAAQ,MAAM,KAAK,IAAI;AAI1C,YAAM,WAAW,KAAK,KAAK,QAAQ,YAAY,MAAM;AAErD,UACE,KAAK,KAAK,eACV,CAAC,YACD,CAAC,YACD,OAAO,SAAS,YAChB,KAAK,SAAS,KACd,OAAO,UAAU,aACjB;AACA,YAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,UAAC,MAAoB,QAAQ,SAAO;AAClC,kBAAM,SAAS,OAAO,MAAO,IAAkC,SAAS,CAAC;AAAA,UAC3E,CAAC;AAAA,QACH,OAAO;AACL,gBAAM,SAAS,OAAO,MAAO,MAAoC,SAAS,CAAC;AAAA,QAC7E;AAAA,MACF;AAAA,IACF;AAEA,SAAQ,mBAAmB,CAAC,UAAiB;AAlP/C;AAmPI,YAAM,WAAW,KAAK,QAAQ,SAAS,KAAK,IAAI;AAChD,YAAM,iBAAiB,KAAK,QAAQ;AAGpC,UAAI,KAAK,QAAQ,CAAC,KAAK,KAAK,YAAY;AACtC,8BAAgB,IAAI,KAAK,IAAI,MAA7B,mBAAgC,QAAQ,aAAW;AACjD,eAAK,kBAAkB,SAAS,IAAI;AAAA,QACtC;AAAA,MACF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