@tylertech/forge 2.21.1 → 2.21.2
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/custom-elements.json +1243 -143
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/avatar/index.js +1 -1
- package/dist/esm/backdrop/index.js +1 -1
- package/dist/esm/badge/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/busy-indicator/index.js +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-area/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.G6GRI7UL.js → chunk.34KPY5LA.js} +2 -2
- package/dist/esm/chunks/{chunk.KQK2XX5H.js → chunk.34QUWF7V.js} +2 -2
- package/dist/esm/chunks/{chunk.F5LXG5X7.js → chunk.34XMCEIP.js} +2 -2
- package/dist/esm/chunks/chunk.356ZQ2XS.js +7 -0
- package/dist/esm/chunks/{chunk.45KYMP5J.js.map → chunk.356ZQ2XS.js.map} +1 -1
- package/dist/esm/chunks/{chunk.Y7YPNMPI.js → chunk.4E7RA4KA.js} +2 -2
- package/dist/esm/chunks/{chunk.Y7YPNMPI.js.map → chunk.4E7RA4KA.js.map} +2 -2
- package/dist/esm/chunks/{chunk.3FAYFYXF.js → chunk.4HYZFGYD.js} +2 -2
- package/dist/esm/chunks/{chunk.2GDEYC4V.js → chunk.4OBKQO2C.js} +2 -2
- package/dist/esm/chunks/{chunk.67G7HT5S.js → chunk.5TU5W4VX.js} +2 -2
- package/dist/esm/chunks/{chunk.UHU4FUIS.js → chunk.5XP6JI3R.js} +2 -2
- package/dist/esm/chunks/{chunk.TH7RLTJK.js → chunk.626HG3FA.js} +2 -2
- package/dist/esm/chunks/{chunk.2T6HVSO4.js → chunk.6E43KAVU.js} +2 -2
- package/dist/esm/chunks/{chunk.3C44DXZ2.js → chunk.6M3DKBNE.js} +2 -2
- package/dist/esm/chunks/{chunk.UQTJSPU4.js → chunk.6TTLHD2N.js} +2 -2
- package/dist/esm/chunks/chunk.6UQ4QU6Q.js +7 -0
- package/dist/esm/chunks/{chunk.PWHMNJ5Y.js.map → chunk.6UQ4QU6Q.js.map} +3 -3
- package/dist/esm/chunks/{chunk.EMV7JGHB.js → chunk.7EL6SQHJ.js} +2 -2
- package/dist/esm/chunks/{chunk.FCTKNIBN.js → chunk.7GETSYAV.js} +2 -2
- package/dist/esm/chunks/{chunk.FCTKNIBN.js.map → chunk.7GETSYAV.js.map} +2 -2
- package/dist/esm/chunks/{chunk.5E2BG6O3.js → chunk.AO6HECKT.js} +2 -2
- package/dist/esm/chunks/{chunk.ON2K3O3I.js → chunk.B3FAMC7O.js} +2 -2
- package/dist/esm/chunks/{chunk.76PI42C5.js → chunk.CZW42BMS.js} +2 -2
- package/dist/esm/chunks/{chunk.D43PPRFO.js → chunk.DTSUVDYY.js} +2 -2
- package/dist/esm/chunks/{chunk.XTMXGKUO.js → chunk.DX6QB7DJ.js} +2 -2
- package/dist/esm/chunks/chunk.E5EFBGTJ.js +12 -0
- package/dist/esm/chunks/{chunk.Y2I2VRMF.js → chunk.FFABH6GU.js} +2 -2
- package/dist/esm/chunks/{chunk.L52XPVYZ.js → chunk.FO3INOWB.js} +2 -2
- package/dist/esm/chunks/chunk.FTZHHRGK.js +7 -0
- package/dist/esm/chunks/{chunk.MXVJSEF3.js.map → chunk.FTZHHRGK.js.map} +1 -1
- package/dist/esm/chunks/{chunk.N6XHXCZE.js → chunk.G23TTQRE.js} +2 -2
- package/dist/esm/chunks/chunk.GDYEENZH.js +7 -0
- package/dist/esm/chunks/chunk.GDYEENZH.js.map +7 -0
- package/dist/esm/chunks/{chunk.DPZU5F27.js → chunk.GIEAUIYJ.js} +2 -2
- package/dist/esm/chunks/chunk.HBHYHMJR.js +7 -0
- package/dist/esm/chunks/chunk.HBHYHMJR.js.map +7 -0
- package/dist/esm/chunks/{chunk.44WDRTRR.js → chunk.HIS5OR6E.js} +2 -2
- package/dist/esm/chunks/{chunk.7BAO5IED.js → chunk.HQA6NHEQ.js} +2 -2
- package/dist/esm/chunks/chunk.I2Q6DCOP.js +7 -0
- package/dist/esm/chunks/chunk.I2Q6DCOP.js.map +7 -0
- package/dist/esm/chunks/{chunk.J2PHUKSR.js → chunk.I567TCRS.js} +2 -2
- package/dist/esm/chunks/chunk.I6TJZZMO.js +7 -0
- package/dist/esm/chunks/chunk.I6TJZZMO.js.map +7 -0
- package/dist/esm/chunks/chunk.J3PYKSC7.js +7 -0
- package/dist/esm/chunks/chunk.J3PYKSC7.js.map +7 -0
- package/dist/esm/chunks/{chunk.BINM3NUA.js → chunk.JDGO7PBU.js} +2 -2
- package/dist/esm/chunks/chunk.JE4JMYK4.js +29 -0
- package/dist/esm/chunks/chunk.JE4JMYK4.js.map +7 -0
- package/dist/esm/chunks/chunk.JGQ574IS.js +7 -0
- package/dist/esm/chunks/chunk.JGQ574IS.js.map +7 -0
- package/dist/esm/chunks/{chunk.APHMTBRQ.js → chunk.JIEPQLGT.js} +2 -2
- package/dist/esm/chunks/{chunk.7NHFZL6J.js → chunk.JOPEH3MU.js} +2 -2
- package/dist/esm/chunks/{chunk.43RHBWGI.js → chunk.KDGNGV2Q.js} +2 -2
- package/dist/esm/chunks/chunk.KZJYLYWN.js +7 -0
- package/dist/esm/chunks/chunk.KZJYLYWN.js.map +7 -0
- package/dist/esm/chunks/{chunk.M6PJ3PNN.js → chunk.L3PT6MFO.js} +2 -2
- package/dist/esm/chunks/{chunk.AZFF62ZK.js → chunk.LOA2PXPF.js} +2 -2
- package/dist/esm/chunks/{chunk.7IHNVPY5.js → chunk.MAG6CV5M.js} +2 -2
- package/dist/esm/chunks/{chunk.7IHNVPY5.js.map → chunk.MAG6CV5M.js.map} +3 -3
- package/dist/esm/chunks/{chunk.M2ATVI24.js → chunk.N24HFRA7.js} +2 -2
- package/dist/esm/chunks/{chunk.YJTE34LC.js → chunk.NGNONQIQ.js} +2 -2
- package/dist/esm/chunks/{chunk.SFTWKDQV.js → chunk.NOQTT5CC.js} +2 -2
- package/dist/esm/chunks/{chunk.IWICN773.js → chunk.NZI24S27.js} +2 -2
- package/dist/esm/chunks/{chunk.GQCUI7YS.js → chunk.O3HLTRZ7.js} +2 -2
- package/dist/esm/chunks/chunk.OPU47W2S.js +7 -0
- package/dist/esm/chunks/chunk.OPU47W2S.js.map +7 -0
- package/dist/esm/chunks/{chunk.IV2GMOPB.js → chunk.OQ2YXL5K.js} +2 -2
- package/dist/esm/chunks/{chunk.L3SL4NW6.js → chunk.OVRFFUGY.js} +2 -2
- package/dist/esm/chunks/{chunk.COS4RDZB.js → chunk.PIEVCFVP.js} +2 -2
- package/dist/esm/chunks/{chunk.IZSUW7WG.js → chunk.PITKIE6U.js} +2 -2
- package/dist/esm/chunks/chunk.PVKUTCJL.js +7 -0
- package/dist/esm/chunks/chunk.PVKUTCJL.js.map +7 -0
- package/dist/esm/chunks/{chunk.4R6NK524.js → chunk.PXXVBTZK.js} +2 -2
- package/dist/esm/chunks/chunk.Q5S2PLLO.js +7 -0
- package/dist/esm/chunks/chunk.Q5S2PLLO.js.map +7 -0
- package/dist/esm/chunks/chunk.QUQ2LN2S.js +7 -0
- package/dist/esm/chunks/chunk.QUQ2LN2S.js.map +7 -0
- package/dist/esm/chunks/chunk.QY5JYJPV.js +7 -0
- package/dist/esm/chunks/chunk.QY5JYJPV.js.map +7 -0
- package/dist/esm/chunks/{chunk.OEZZ2NEY.js → chunk.REOK5HDT.js} +2 -2
- package/dist/esm/chunks/{chunk.PKVY6EWM.js → chunk.RNV6JSP4.js} +2 -2
- package/dist/esm/chunks/chunk.RWXLU5GZ.js +7 -0
- package/dist/esm/chunks/chunk.RWXLU5GZ.js.map +7 -0
- package/dist/esm/chunks/{chunk.LM57IEFE.js → chunk.S5GROM77.js} +2 -2
- package/dist/esm/chunks/{chunk.F5CFD2NG.js → chunk.SFREF7YC.js} +2 -2
- package/dist/esm/chunks/{chunk.7SULS4D2.js → chunk.SKFSEWYY.js} +2 -2
- package/dist/esm/chunks/chunk.SNGYY7HZ.js +7 -0
- package/dist/esm/chunks/chunk.SNGYY7HZ.js.map +7 -0
- package/dist/esm/chunks/{chunk.6G4DOKR2.js → chunk.SQESFOGY.js} +2 -2
- package/dist/esm/chunks/{chunk.6G4DOKR2.js.map → chunk.SQESFOGY.js.map} +2 -2
- package/dist/esm/chunks/{chunk.UVL4TIK2.js → chunk.SS46JP47.js} +2 -2
- package/dist/esm/chunks/{chunk.KII37K76.js → chunk.SYGMZUV7.js} +2 -2
- package/dist/esm/chunks/{chunk.H3IPTBWM.js → chunk.T7UBP53Q.js} +2 -2
- package/dist/esm/chunks/{chunk.NLXSZNQI.js → chunk.TGF5WRAW.js} +2 -2
- package/dist/esm/chunks/{chunk.JCDIPDQR.js → chunk.TR4JGRMS.js} +2 -2
- package/dist/esm/chunks/{chunk.TBSCULSM.js → chunk.TT4KSKDQ.js} +2 -2
- package/dist/esm/chunks/{chunk.TBSCULSM.js.map → chunk.TT4KSKDQ.js.map} +1 -1
- package/dist/esm/chunks/{chunk.73GVVX4K.js → chunk.UA7R255A.js} +2 -2
- package/dist/esm/chunks/{chunk.73GVVX4K.js.map → chunk.UA7R255A.js.map} +2 -2
- package/dist/esm/chunks/{chunk.PADHAJLS.js → chunk.VIMC4REI.js} +2 -2
- package/dist/esm/chunks/{chunk.SAQSXX2T.js → chunk.VVAZNQMU.js} +2 -2
- package/dist/esm/chunks/{chunk.42QTJZSF.js → chunk.VXT4TNZZ.js} +2 -2
- package/dist/esm/chunks/{chunk.6TTAKWXI.js → chunk.WHY2OAQJ.js} +2 -2
- package/dist/esm/chunks/{chunk.WOTVTBJS.js → chunk.XQS6FU2G.js} +2 -2
- package/dist/esm/chunks/{chunk.AIUIUCZH.js → chunk.YCKKFYVM.js} +2 -2
- package/dist/esm/chunks/chunk.YPR3VFCP.js +7 -0
- package/dist/esm/chunks/chunk.YPR3VFCP.js.map +7 -0
- package/dist/esm/chunks/chunk.ZFBCYZNK.js +7 -0
- package/dist/esm/chunks/chunk.ZFBCYZNK.js.map +7 -0
- package/dist/esm/chunks/chunk.ZTN2FNFX.js +7 -0
- package/dist/esm/chunks/chunk.ZTN2FNFX.js.map +7 -0
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/base/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/utils/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/drawer/base/index.js +1 -1
- package/dist/esm/drawer/drawer/index.js +1 -1
- package/dist/esm/drawer/index.js +1 -1
- package/dist/esm/drawer/mini-drawer/index.js +1 -1
- package/dist/esm/drawer/modal-drawer/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-action-button/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/keyboard-shortcut/index.js +1 -1
- package/dist/esm/label-value/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/popup/index.js +1 -1
- package/dist/esm/product-icon/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/ripple/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stack/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/dist/esm/tooltip/index.js +1 -1
- package/dist/esm/view-switcher/index.js +1 -1
- package/esm/autocomplete/autocomplete.d.ts +8 -2
- package/esm/button/button.d.ts +1 -0
- package/esm/button/button.js +18 -7
- package/esm/button-area/button-area-adapter.d.ts +3 -1
- package/esm/button-area/button-area-adapter.js +14 -5
- package/esm/button-area/button-area-foundation.js +1 -0
- package/esm/calendar/calendar-foundation.js +22 -18
- package/esm/calendar/calendar.d.ts +1 -0
- package/esm/checkbox/checkbox-adapter.d.ts +1 -0
- package/esm/checkbox/checkbox-adapter.js +18 -7
- package/esm/core/base/base-adapter.d.ts +4 -2
- package/esm/core/base/base-adapter.js +3 -0
- package/esm/core/utils/utils.d.ts +5 -2
- package/esm/core/utils/utils.js +21 -6
- package/esm/date-picker/base/base-date-picker-adapter.js +1 -3
- package/esm/date-picker/base/base-date-picker-foundation.js +6 -0
- package/esm/dialog/dialog-adapter.d.ts +2 -0
- package/esm/dialog/dialog-adapter.js +14 -0
- package/esm/dialog/dialog-foundation.js +1 -0
- package/esm/icon-button/icon-button.d.ts +2 -0
- package/esm/icon-button/icon-button.js +31 -7
- package/esm/list/list/list-adapter.d.ts +2 -6
- package/esm/list/list/list-adapter.js +29 -18
- package/esm/list/list/list-constants.d.ts +2 -2
- package/esm/list/list/list-constants.js +3 -3
- package/esm/list/list/list-foundation.js +6 -0
- package/esm/list/list-item/list-item-adapter.d.ts +3 -3
- package/esm/list/list-item/list-item-adapter.js +3 -3
- package/esm/list/list-item/list-item-foundation.d.ts +1 -0
- package/esm/list/list-item/list-item-foundation.js +12 -2
- package/esm/menu/menu-foundation.js +1 -0
- package/esm/menu/menu.d.ts +4 -1
- package/esm/open-icon/open-icon.js +2 -2
- package/esm/paginator/paginator-adapter.d.ts +6 -2
- package/esm/paginator/paginator-adapter.js +34 -54
- package/esm/paginator/paginator-constants.d.ts +1 -1
- package/esm/paginator/paginator-foundation.js +7 -17
- package/esm/radio/radio-adapter.d.ts +1 -0
- package/esm/radio/radio-adapter.js +18 -7
- package/esm/ripple/forge-ripple.d.ts +2 -0
- package/esm/ripple/forge-ripple.js +4 -0
- package/esm/select/core/base-select.d.ts +4 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/switch/switch.js +15 -2
- package/esm/tooltip/tooltip.d.ts +1 -0
- package/package.json +2 -2
- package/dist/esm/chunks/chunk.45KYMP5J.js +0 -7
- package/dist/esm/chunks/chunk.4CWMNWZU.js +0 -7
- package/dist/esm/chunks/chunk.4CWMNWZU.js.map +0 -7
- package/dist/esm/chunks/chunk.5KC43VFL.js +0 -7
- package/dist/esm/chunks/chunk.5KC43VFL.js.map +0 -7
- package/dist/esm/chunks/chunk.AHDIUCUB.js +0 -7
- package/dist/esm/chunks/chunk.AHDIUCUB.js.map +0 -7
- package/dist/esm/chunks/chunk.CE6NTUWI.js +0 -7
- package/dist/esm/chunks/chunk.CE6NTUWI.js.map +0 -7
- package/dist/esm/chunks/chunk.DLALEZ73.js +0 -7
- package/dist/esm/chunks/chunk.DLALEZ73.js.map +0 -7
- package/dist/esm/chunks/chunk.DYF2MREZ.js +0 -7
- package/dist/esm/chunks/chunk.DYF2MREZ.js.map +0 -7
- package/dist/esm/chunks/chunk.ITXUKOKJ.js +0 -7
- package/dist/esm/chunks/chunk.ITXUKOKJ.js.map +0 -7
- package/dist/esm/chunks/chunk.MXVJSEF3.js +0 -7
- package/dist/esm/chunks/chunk.PWHMNJ5Y.js +0 -7
- package/dist/esm/chunks/chunk.Q7HX26UO.js +0 -7
- package/dist/esm/chunks/chunk.Q7HX26UO.js.map +0 -7
- package/dist/esm/chunks/chunk.QZ2NXIGY.js +0 -7
- package/dist/esm/chunks/chunk.QZ2NXIGY.js.map +0 -7
- package/dist/esm/chunks/chunk.RD7SYOAI.js +0 -12
- package/dist/esm/chunks/chunk.RLWX5BFQ.js +0 -7
- package/dist/esm/chunks/chunk.RLWX5BFQ.js.map +0 -7
- package/dist/esm/chunks/chunk.SXTM6OK4.js +0 -7
- package/dist/esm/chunks/chunk.SXTM6OK4.js.map +0 -7
- package/dist/esm/chunks/chunk.VT2QJ7SM.js +0 -29
- package/dist/esm/chunks/chunk.VT2QJ7SM.js.map +0 -7
- package/dist/esm/chunks/chunk.Y66GSZJB.js +0 -7
- package/dist/esm/chunks/chunk.Y66GSZJB.js.map +0 -7
- package/dist/esm/chunks/chunk.YG24YPYO.js +0 -7
- package/dist/esm/chunks/chunk.YG24YPYO.js.map +0 -7
- /package/dist/esm/chunks/{chunk.G6GRI7UL.js.map → chunk.34KPY5LA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KQK2XX5H.js.map → chunk.34QUWF7V.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.F5LXG5X7.js.map → chunk.34XMCEIP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3FAYFYXF.js.map → chunk.4HYZFGYD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2GDEYC4V.js.map → chunk.4OBKQO2C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.67G7HT5S.js.map → chunk.5TU5W4VX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UHU4FUIS.js.map → chunk.5XP6JI3R.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TH7RLTJK.js.map → chunk.626HG3FA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2T6HVSO4.js.map → chunk.6E43KAVU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3C44DXZ2.js.map → chunk.6M3DKBNE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UQTJSPU4.js.map → chunk.6TTLHD2N.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EMV7JGHB.js.map → chunk.7EL6SQHJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5E2BG6O3.js.map → chunk.AO6HECKT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ON2K3O3I.js.map → chunk.B3FAMC7O.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.76PI42C5.js.map → chunk.CZW42BMS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.D43PPRFO.js.map → chunk.DTSUVDYY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XTMXGKUO.js.map → chunk.DX6QB7DJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RD7SYOAI.js.map → chunk.E5EFBGTJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Y2I2VRMF.js.map → chunk.FFABH6GU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.L52XPVYZ.js.map → chunk.FO3INOWB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.N6XHXCZE.js.map → chunk.G23TTQRE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DPZU5F27.js.map → chunk.GIEAUIYJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.44WDRTRR.js.map → chunk.HIS5OR6E.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7BAO5IED.js.map → chunk.HQA6NHEQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.J2PHUKSR.js.map → chunk.I567TCRS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BINM3NUA.js.map → chunk.JDGO7PBU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.APHMTBRQ.js.map → chunk.JIEPQLGT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7NHFZL6J.js.map → chunk.JOPEH3MU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.43RHBWGI.js.map → chunk.KDGNGV2Q.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.M6PJ3PNN.js.map → chunk.L3PT6MFO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AZFF62ZK.js.map → chunk.LOA2PXPF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.M2ATVI24.js.map → chunk.N24HFRA7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YJTE34LC.js.map → chunk.NGNONQIQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SFTWKDQV.js.map → chunk.NOQTT5CC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IWICN773.js.map → chunk.NZI24S27.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GQCUI7YS.js.map → chunk.O3HLTRZ7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IV2GMOPB.js.map → chunk.OQ2YXL5K.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.L3SL4NW6.js.map → chunk.OVRFFUGY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.COS4RDZB.js.map → chunk.PIEVCFVP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IZSUW7WG.js.map → chunk.PITKIE6U.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4R6NK524.js.map → chunk.PXXVBTZK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OEZZ2NEY.js.map → chunk.REOK5HDT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PKVY6EWM.js.map → chunk.RNV6JSP4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LM57IEFE.js.map → chunk.S5GROM77.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.F5CFD2NG.js.map → chunk.SFREF7YC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7SULS4D2.js.map → chunk.SKFSEWYY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UVL4TIK2.js.map → chunk.SS46JP47.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KII37K76.js.map → chunk.SYGMZUV7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.H3IPTBWM.js.map → chunk.T7UBP53Q.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NLXSZNQI.js.map → chunk.TGF5WRAW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JCDIPDQR.js.map → chunk.TR4JGRMS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PADHAJLS.js.map → chunk.VIMC4REI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SAQSXX2T.js.map → chunk.VVAZNQMU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.42QTJZSF.js.map → chunk.VXT4TNZZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6TTAKWXI.js.map → chunk.WHY2OAQJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WOTVTBJS.js.map → chunk.XQS6FU2G.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AIUIUCZH.js.map → chunk.YCKKFYVM.js.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{b as S}from"./chunk.4CWMNWZU.js";import{b as C}from"./chunk.Y66GSZJB.js";import{a as A}from"./chunk.5KC43VFL.js";import{a as l}from"./chunk.KTGSZEAG.js";import{a as T,b as h}from"./chunk.QOA2O575.js";import{a as I,c as g,e as L,g as v,l as k}from"./chunk.HOXFK44F.js";import{b as x,f as c,g as p,q as w,t as f}from"./chunk.4LA6HEA7.js";import{k as n,n as E}from"./chunk.J2M2MXP2.js";import{f as a}from"./chunk.MCIQXNKY.js";var D=`${h}list`,z={STATIC:"static",DENSE:"dense",PROPAGATE_CLICK:"propagate-click",INDENTED:"indented",SELECTED_VALUE:"selected-value"},O={FOCUSABLE_LIST_ITEMS:".forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled)"},d={elementName:D,attributes:z,selectors:O};var N=`${h}list-item`,H={STATIC:"static",TWO_LINE:"two-line",THREE_LINE:"three-line",ACTIVE:"active",SELECTED:"selected",VALUE:"value",HREF:"href",TARGET:"target",RIPPLE:"ripple",DISABLED:"disabled",DENSE:"dense",PROPAGATE_CLICK:"propagate-click",INDENTED:"indented",WRAP:"wrap",DRAWER_CONTEXT:"forge-drawer-context",IGNORE:"forge-ignore"},_={LIST_ITEM:"forge-list-item",STATIC:"forge-list-item--static",TEXT:"forge-list-item__text",TWO_LINE:"forge-list-item--two-line",THREE_LINE:"forge-list-item--three-line",ACTIVE:"forge-list-item--active",ACTIVATED:"forge-list-item--activated",SELECTED:"forge-list-item--selected",DISABLED:"forge-list-item--disabled",DENSE:"forge-list-item--dense",INDENTED:"forge-list-item--indented",WRAP:"forge-list-item--wrap"},M={LIST_ITEM:`.${_.LIST_ITEM}`,DEFAULT_SLOT:`.${_.TEXT} > slot`,CHECKBOX_RADIO_SELECTOR:"input[type=checkbox]:not(:disabled):not([forge-ignore]),input[type=radio]:not(:disabled):not([forge-ignore])"},P={SELECT:`${N}-select`},F={LINK:"link",LIST_ITEM:"listitem"},t={elementName:N,attributes:H,classes:_,selectors:M,events:P,roles:F};var b=class extends A{constructor(i){super(i);this._initialize()}_initialize(){this._listItemElement=v(this._component,t.selectors.LIST_ITEM),this._defaultSlot=v(this._component,t.selectors.DEFAULT_SLOT)}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","listitem")}getListItem(){return this._component}addListener(i,r,o){this._listItemElement.addEventListener(i,r,o)}removeListener(i,r){this._listItemElement.removeEventListener(i,r)}createRipple(){return new S(this._listItemElement)}setStatic(i){i?(this._listItemElement.tabIndex=-1,c(t.classes.STATIC,this._listItemElement)):(this._listItemElement.tabIndex=0,p(t.classes.STATIC,this._listItemElement))}setTwoLine(i){i?c(t.classes.TWO_LINE,this._listItemElement):p(t.classes.TWO_LINE,this._listItemElement)}setThreeLine(i){i?c(t.classes.THREE_LINE,this._listItemElement):p(t.classes.THREE_LINE,this._listItemElement)}getLineCount(){return this._defaultSlot.assignedNodes().filter(i=>i.nodeType===Node.ELEMENT_NODE).length}setActive(i){i?c(t.classes.ACTIVE,this._listItemElement):p(t.classes.ACTIVE,this._listItemElement)}setSelected(i){i?c(t.classes.SELECTED,this._listItemElement):p(t.classes.SELECTED,this._listItemElement)}tryToggleCheckboxRadio(i){let r=this._component.querySelector(t.selectors.CHECKBOX_RADIO_SELECTOR);if(r){let o=typeof i=="boolean",m=r.checked;r.checked=o?i:!r.checked,(!o||m!==i)&&r.dispatchEvent(new Event("change",{bubbles:!0}))}}setFocus(){this._listItemElement.focus()}hasFocus(){var i;return document.activeElement===this._component||!!((i=this._component.shadowRoot)!=null&&i.activeElement)}setRole(i){this._listItemElement.setAttribute("role",i)}setDisabled(i){f(this._listItemElement,i,t.classes.DISABLED)}setDense(i){f(this._listItemElement,i,t.classes.DENSE)}setIndented(i){f(this._listItemElement,i,t.classes.INDENTED)}setWrap(i){f(this._listItemElement,i,t.classes.WRAP)}trySelect(i){let r=g(this._component,d.elementName);if(!r||r.selectedValue===void 0)return null;let m=(r.selectedValue instanceof Array?r.selectedValue:[r.selectedValue]).some(R=>E(R,i));return this.setSelected(m),this.tryToggleCheckboxRadio(m),m}userInteractionListener(){return C(this._listItemElement)}};var u=class{constructor(e){this._adapter=e;this._ripple=!0;this._static=!1;this._twoLine=!1;this._threeLine=!1;this._active=!1;this._selected=!1;this._disabled=!1;this._dense=!1;this._propagateClick=!0;this._indented=!1;this._wrap=!1;this._clickListener=i=>this._onClick(i),this._mouseDownListener=i=>this._onMouseDown(i),this._keydownListener=i=>this._onKeydown(i)}initialize(){this._adapter.initializeAccessibility(),this._setRipple(),this._adapter.setStatic(this._static),this._adapter.setDense(this._dense),this._adapter.setDisabled(this._disabled),this._adapter.setIndented(this._indented),this._adapter.setWrap(this._wrap),this._static||(this._adapter.addListener("click",this._clickListener),this._adapter.addListener("mousedown",this._mouseDownListener,{passive:!1,capture:!0}),this._adapter.addListener("keydown",this._keydownListener)),this._threeLine?this._adapter.setThreeLine(this._threeLine):this.twoLine&&this._adapter.setTwoLine(this._twoLine);let e=this._adapter.trySelect(this._value);e!=null&&(this._selected=e)}disconnect(){this._rippleInstance&&(this._rippleInstance.destroy(),this._rippleInstance=void 0)}_onMouseDown(e){(this._adapter.hasFocus()||!this._propagateClick)&&e.preventDefault()}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&(e.key===" "&&e.preventDefault(),this._select(e.target))}_onClick(e){this._select(e.target)}_select(e){let i=e==null?void 0:e.hasAttribute(t.attributes.IGNORE);if(this._static||this._disabled||i)return;if(!this._adapter.hasFocus()&&this._propagateClick&&this.setFocus(),this._href){this._target?window.open(this._href,this._target):document.location.href=this._href;return}w(e,t.selectors.CHECKBOX_RADIO_SELECTOR)||this._adapter.tryToggleCheckboxRadio();let r={value:this._value,listItem:this._adapter.getListItem()};this._adapter.emitHostEvent(t.events.SELECT,r)}get ripple(){return this._ripple}set ripple(e){if(this._ripple!==e){if(e&&this._static)return;this._ripple=e,this._setRipple(),this._adapter.setHostAttribute(t.attributes.RIPPLE,String(this._ripple))}}get static(){return this._static}set static(e){this._static!==e&&(this._static=e,this._adapter.setStatic(this._static),this._setRipple(),this._static?this._adapter.removeListener("click",this._clickListener):this._adapter.addListener("click",this._clickListener),this._static?this._adapter.setHostAttribute(t.attributes.STATIC):this._adapter.removeHostAttribute(t.attributes.STATIC))}get twoLine(){return this._twoLine}set twoLine(e){this._twoLine!==e&&(this._twoLine=e,this._adapter.setTwoLine(this._twoLine),this._twoLine?this._adapter.setHostAttribute(t.attributes.TWO_LINE):this._adapter.removeHostAttribute(t.attributes.TWO_LINE))}get threeLine(){return this._threeLine}set threeLine(e){this._threeLine!==e&&(this._threeLine=e,this._threeLine?this._adapter.setHostAttribute(t.attributes.THREE_LINE):this._adapter.removeHostAttribute(t.attributes.THREE_LINE),this._threeLine&&(this._twoLine=!1),this._adapter.setTwoLine(this._twoLine),this._adapter.setThreeLine(this._threeLine))}get active(){return this._active}set active(e){this._active!==e&&(this._active=e,this._adapter.setActive(this._active),this._active?this._adapter.setHostAttribute(t.attributes.ACTIVE):this._adapter.removeHostAttribute(t.attributes.ACTIVE))}get selected(){return this._selected}set selected(e){this._selected!==e&&(this._selected=e,this._adapter.setSelected(this._selected),this._adapter.tryToggleCheckboxRadio(this._selected),this._adapter.toggleHostAttribute(t.attributes.SELECTED,this._selected))}get value(){return this._value}set value(e){this._value=e;let i=this._adapter.trySelect(this._value);i!=null&&(this._selected=i)}get href(){return this._href}set href(e){this._href!==e&&(this._href=e,this._href?this._adapter.setRole(t.roles.LINK):this._adapter.setRole(t.roles.LIST_ITEM),this._adapter.setHostAttribute(t.attributes.HREF,this._href))}get target(){return this._target}set target(e){this._target=e}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(t.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.setDense(this._dense),this._adapter.toggleHostAttribute(t.attributes.DENSE,this._dense))}get propagateClick(){return this._propagateClick}set propagateClick(e){this._propagateClick!==e&&(this._propagateClick=e,this._adapter.setHostAttribute(t.attributes.PROPAGATE_CLICK,""+!!this._propagateClick))}get indented(){return this._indented}set indented(e){this._indented!==e&&(this._indented=e,this._adapter.setIndented(this._indented),this._adapter.toggleHostAttribute(t.attributes.INDENTED,this._indented))}get wrap(){return this._wrap}set wrap(e){this._wrap!==e&&(this._wrap=e,this._adapter.setWrap(this._wrap),this._adapter.toggleHostAttribute(t.attributes.WRAP,this._wrap))}async _setRipple(){if(this._ripple&&!this._static&&!this._rippleInstance){let e=await this._adapter.userInteractionListener();this._ripple&&!this._static&&!this._rippleInstance&&(this._rippleInstance=this._adapter.createRipple(),e==="focusin"&&this._rippleInstance.handleFocus())}else(!this._ripple||this._static)&&this._rippleInstance&&(this._rippleInstance.destroy(),this._rippleInstance=void 0)}setFocus(){this._adapter.setFocus()}};var W='<template><div class="forge-list-item" tabindex="0" part="root"><slot name="leading"></slot><slot name="avatar"></slot><div class="forge-list-item__text" part="text-container"><slot></slot><slot name="title"></slot><slot name="subtitle"></slot><slot name="tertiary-title"></slot><slot></slot></div><slot name="trailing"></slot></div></template>',B='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-list-item{min-height:32px;min-height:var(--forge-list-item-min-height,32px);max-height:none;max-height:var(--forge-list-item-max-height,none);height:32px;height:var(--forge-list-item-height,32px);padding:8px 16px;padding:var(--forge-list-item-padding,8px 16px);margin-left:0;margin-left:var(--forge-list-item-indent,0);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-list-item-align-items,center);align-items:var(--forge-list-item-align-items,center);position:relative;display:-webkit-box;display:flex;-webkit-box-pack:start;justify-content:flex-start;overflow:hidden}.forge-list-item:focus{outline:0}.forge-list-item ::slotted([slot=leading]),.forge-list-item ::slotted([slot=trailing]){font-size:1.5rem}.forge-list-item ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));margin-left:0;margin-left:var(--forge-list-item-leading-margin-left,0);margin-right:32px;margin-right:var(--forge-list-item-leading-margin-right,32px);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor}.forge-list-item ::slotted([slot=trailing]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-list-item ::slotted([slot=avatar]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));margin-left:0;margin-left:var(--forge-list-item-leading-margin-left,0);margin-right:32px;margin-right:var(--forge-list-item-leading-margin-right,32px);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor;margin-left:0;margin-right:16px;min-width:40px;min-height:40px;border-radius:50%;display:inline-flex;background-color:rgba(0,0,0,.54);background-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-surface--hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--background-focused::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated.mdc-ripple-surface--hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated.mdc-ripple-upgraded--background-focused::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected.mdc-ripple-surface--hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected.mdc-ripple-upgraded--background-focused::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:focus:hover.mdc-ripple-upgraded--background-focused:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.28}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.12}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.16}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{background-color:#000;background-color:var(--mdc-theme-on-surface,#000)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.24}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.28}.forge-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}.forge-list-item ::slotted([slot=title]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.forge-list-item ::slotted([slot=subtitle]),.forge-list-item ::slotted([slot=tertiary-title]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));display:block}.forge-list-item--two-line{min-height:56px;min-height:var(--forge-list-item-min-height,56px);height:56px;height:var(--forge-list-item-height,56px)}.forge-list-item--three-line{min-height:72px;min-height:var(--forge-list-item-min-height,72px);height:72px;height:var(--forge-list-item-height,72px)}.forge-list-item--dense{min-height:16px;min-height:var(--forge-list-item-min-height,16px);height:16px;height:var(--forge-list-item-height,16px)}.forge-list-item--dense ::slotted([slot=leading]),.forge-list-item--dense ::slotted([slot=trailing]){font-size:1.25rem}.forge-list-item--dense ::slotted([slot=leading]){margin-right:12px;margin-right:var(--forge-list-item-leading-margin-right,12px)}.forge-list-item--dense ::slotted(.forge-list-item__title){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit)}.forge-list-item--dense.forge-list-item--two-line{min-height:40px;min-height:var(--forge-list-item-min-height,40px)}.forge-list-item--dense.forge-list-item--three-line{min-height:56px;min-height:var(--forge-list-item-min-height,56px)}.forge-list-item--wrap{height:auto;height:var(--forge-list-item-height,auto)}.forge-list-item--wrap .forge-list-item__text,.forge-list-item--wrap ::slotted([slot=subtitle]),.forge-list-item--wrap ::slotted([slot=tertiary-title]),.forge-list-item--wrap ::slotted([slot=title]){text-overflow:clip;white-space:normal}.forge-list-item--indented{margin-left:56px;margin-left:var(--forge-list-item-indent,56px)}.forge-list-item--active.forge-list-item--activated:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before,.forge-list-item--active.forge-list-item--selected:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{opacity:.2}.forge-list-item--active.forge-list-item--activated:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:hover::before,.forge-list-item--active.forge-list-item--selected:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:hover::before{opacity:.24}.forge-list-item--activated,.forge-list-item--selected{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-list-item--activated .forge-list-item__text .forge-list-item__subtitle,.forge-list-item--activated .forge-list-item__text ::slotted(.forge-list-item__subtitle),.forge-list-item--selected .forge-list-item__text .forge-list-item__subtitle,.forge-list-item--selected .forge-list-item__text ::slotted(.forge-list-item__subtitle){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);opacity:.87}.forge-list-item--activated .forge-list-item__text .forge-list-item__tertiary-title,.forge-list-item--activated .forge-list-item__text ::slotted(.forge-list-item__tertiary-title),.forge-list-item--selected .forge-list-item__text .forge-list-item__tertiary-title,.forge-list-item--selected .forge-list-item__text ::slotted(.forge-list-item__tertiary-title){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);opacity:.87}.forge-list-item--activated ::slotted([slot=leading]),.forge-list-item--activated ::slotted([slot=trailing]),.forge-list-item--selected ::slotted([slot=leading]),.forge-list-item--selected ::slotted([slot=trailing]){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-list-item--activated ::slotted([slot=avatar].forge-list-item__avatar-icon),.forge-list-item--selected ::slotted([slot=avatar].forge-list-item__avatar-icon){background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12));color:#000;color:var(--mdc-theme-on-surface,#000)}.forge-list-item--disabled{cursor:not-allowed;cursor:var(--forge-list-item-cursor,not-allowed);color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-list-item--disabled ::slotted([slot=leading]),.forge-list-item--disabled ::slotted([slot=trailing]){cursor:not-allowed;cursor:var(--forge-list-item-cursor,not-allowed);color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-list-item[role=link]{cursor:pointer}:host{display:block;contain:content}:host([hidden]){display:none}:host([forge-drawer-context=true]) .forge-list-item{margin:8px;margin:var(--forge-list-item-margin,8px);padding:0 8px;padding:var(--forge-list-item-padding,0 8px);border-radius:4px;border-radius:var(--forge-list-item-border-radius,4px);cursor:pointer;cursor:var(--forge-list-item-cursor,pointer);height:40px;height:var(--forge-list-item-height,40px);font-size:.875rem;font-weight:500}:host([forge-drawer-context=true]) .forge-list-item--static{cursor:initial}:host([forge-drawer-context=true]) .forge-list-item--indented{margin-left:64px;margin-left:var(--forge-list-item-indent,64px)}:host([forge-drawer-context=true]) .forge-list-item--two-line{min-height:56px-8px;min-height:var(--forge-list-item-min-height,56px-8px);height:56px-8px;height:var(--forge-list-item-height,56px-8px)}:host([forge-drawer-context=true]) .forge-list-item--three-line{min-height:72px-8px;min-height:var(--forge-list-item-min-height,72px-8px);height:72px-8px;height:var(--forge-list-item-height,72px-8px)}:host([forge-drawer-context=true]) .forge-list-item:first-child{margin-top:4px;margin-bottom:4px}:host([forge-drawer-context=true]) .forge-list-item--dense{min-height:16px;min-height:var(--forge-list-item-min-height,16px);height:16px;height:var(--forge-list-item-height,16px)}:host([forge-drawer-context=true]) .forge-list-item--dense ::slotted([slot=leading]),:host([forge-drawer-context=true]) .forge-list-item--dense ::slotted([slot=trailing]){font-size:1.25rem}:host([forge-drawer-context=true]) .forge-list-item--dense .forge-list-item__text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit)}:host([forge-drawer-context=true]) .forge-list-item--wrap{height:auto;height:var(--forge-list-item-height,auto);padding:4px 8px;padding:var(--forge-list-item-padding,4px 8px);min-height:40px;min-height:var(--forge-list-item-min-height,40px)}:host([forge-drawer-context=true]) .forge-list-item--disabled{cursor:not-allowed;cursor:var(--forge-list-item-cursor,not-allowed)}:host([dense]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit)}',s=class extends k{constructor(){super();L(this,W,B),this._foundation=new u(new b(this))}static get observedAttributes(){return[t.attributes.STATIC,t.attributes.TWO_LINE,t.attributes.THREE_LINE,t.attributes.ACTIVE,t.attributes.SELECTED,t.attributes.VALUE,t.attributes.HREF,t.attributes.TARGET,t.attributes.RIPPLE,t.attributes.DISABLED,t.attributes.DENSE,t.attributes.PROPAGATE_CLICK,t.attributes.INDENTED,t.attributes.WRAP]}connectedCallback(){!this.hasAttribute(t.attributes.DRAWER_CONTEXT)&&x(this).some(r=>["forge-drawer","forge-modal-drawer","forge-mini-drawer"].includes(r.tagName.toLowerCase()))&&this.setAttribute(t.attributes.DRAWER_CONTEXT,"true");let i=g(this,d.elementName);i&&this._inheritParentListProps(i),this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(i,r,o){switch(i){case t.attributes.STATIC:this.static=n(o);break;case t.attributes.TWO_LINE:this.twoLine=n(o);break;case t.attributes.THREE_LINE:this.threeLine=n(o);break;case t.attributes.ACTIVE:this.active=n(o);break;case t.attributes.SELECTED:this.selected=n(o);break;case t.attributes.VALUE:this.value=o;break;case t.attributes.HREF:this.href=o;break;case t.attributes.TARGET:this.target=o;break;case t.attributes.RIPPLE:this.ripple=n(o);break;case t.attributes.DISABLED:this.disabled=n(o);break;case t.attributes.DENSE:this.dense=n(o);break;case t.attributes.PROPAGATE_CLICK:this.propagateClick=n(o);break;case t.attributes.INDENTED:this.indented=n(o);break;case t.attributes.WRAP:this.wrap=n(o);break}}_inheritParentListProps(i){i.hasAttribute(d.attributes.STATIC)&&(this.static=!0),i.hasAttribute(d.attributes.DENSE)&&(this.dense=!0),i.getAttribute(d.attributes.PROPAGATE_CLICK)==="false"&&(this.propagateClick=!1),i.hasAttribute(d.attributes.INDENTED)&&(this.indented=!0)}focus(){this._foundation.setFocus()}};a([l()],s.prototype,"static",2),a([l()],s.prototype,"twoLine",2),a([l()],s.prototype,"threeLine",2),a([l()],s.prototype,"active",2),a([l()],s.prototype,"selected",2),a([l()],s.prototype,"value",2),a([l()],s.prototype,"href",2),a([l()],s.prototype,"target",2),a([l()],s.prototype,"ripple",2),a([l()],s.prototype,"disabled",2),a([l()],s.prototype,"dense",2),a([l()],s.prototype,"propagateClick",2),a([l()],s.prototype,"indented",2),a([l()],s.prototype,"wrap",2),s=a([T({name:t.elementName})],s);function bt(){I(s)}export{d as a,t as b,b as c,u as d,s as e,bt as f};
|
|
7
|
-
//# sourceMappingURL=chunk.DYF2MREZ.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/list/list/list-constants.ts", "../../src/list/list-item/list-item-constants.ts", "../../src/list/list-item/list-item-adapter.ts", "../../src/list/list-item/list-item-foundation.ts", "../../src/list/list-item/list-item.ts", "../../src/list/list-item/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}list`;\n\nconst attributes = {\n STATIC: 'static',\n DENSE: 'dense',\n PROPAGATE_CLICK: 'propagate-click',\n INDENTED: 'indented',\n SELECTED_VALUE: 'selected-value'\n};\n\nconst selectors = {\n FOCUSABLE_LIST_ITEMS: '.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled)'\n};\n\nexport const LIST_CONSTANTS = {\n elementName,\n attributes,\n selectors\n};\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\nimport { IListItemComponent } from './list-item';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}list-item`;\n\nconst attributes = {\n STATIC: 'static',\n TWO_LINE: 'two-line',\n THREE_LINE: 'three-line',\n ACTIVE: 'active',\n SELECTED: 'selected',\n VALUE: 'value',\n HREF: 'href',\n TARGET: 'target',\n RIPPLE: 'ripple',\n DISABLED: 'disabled',\n DENSE: 'dense',\n PROPAGATE_CLICK: 'propagate-click',\n INDENTED: 'indented',\n WRAP: 'wrap',\n DRAWER_CONTEXT: 'forge-drawer-context',\n IGNORE: 'forge-ignore'\n};\n\nconst classes = {\n LIST_ITEM: 'forge-list-item',\n STATIC: 'forge-list-item--static',\n TEXT: 'forge-list-item__text',\n TWO_LINE: 'forge-list-item--two-line',\n THREE_LINE: 'forge-list-item--three-line',\n ACTIVE: 'forge-list-item--active',\n ACTIVATED: 'forge-list-item--activated',\n SELECTED: 'forge-list-item--selected',\n DISABLED: 'forge-list-item--disabled',\n DENSE: 'forge-list-item--dense',\n INDENTED: 'forge-list-item--indented',\n WRAP: 'forge-list-item--wrap'\n};\n\nconst selectors = {\n LIST_ITEM: `.${classes.LIST_ITEM}`,\n DEFAULT_SLOT: `.${classes.TEXT} > slot`,\n CHECKBOX_RADIO_SELECTOR: 'input[type=checkbox]:not(:disabled):not([forge-ignore]),input[type=radio]:not(:disabled):not([forge-ignore])'\n};\n\nconst events = {\n SELECT: `${elementName}-select`\n};\n\nconst roles = {\n LINK: 'link',\n LIST_ITEM: 'listitem'\n};\n\nexport const LIST_ITEM_CONSTANTS = {\n elementName,\n attributes,\n classes,\n selectors,\n events,\n roles\n};\n\nexport interface IListItemSelectEventData {\n value: any;\n listItem: IListItemComponent;\n}\n", "import { addClass, getShadowElement, removeClass, requireParent, isDeepEqual, toggleClass } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { userInteractionListener } from '../../core/utils';\nimport { IListComponent } from '../list/list';\nimport { LIST_CONSTANTS } from '../list/list-constants';\nimport { IListItemComponent } from './list-item';\nimport { LIST_ITEM_CONSTANTS } from './list-item-constants';\nimport { ForgeRipple } from '../../ripple';\n\nexport interface IListItemAdapter extends IBaseAdapter {\n initializeAccessibility(): void;\n getListItem(): IListItemComponent;\n addListener(type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions): void;\n removeListener(type: string, listener: (evt: Event) => void): void;\n createRipple(): any;\n setStatic(value: boolean): void;\n setTwoLine(value: boolean): void;\n setThreeLine(value: boolean): void;\n getLineCount(): number;\n setActive(value: boolean): void;\n setSelected(value: boolean): void;\n tryToggleCheckboxRadio(value?: boolean): void;\n setFocus(): void;\n hasFocus(): boolean;\n setRole(role: string): void;\n setDisabled(disabled: boolean): void;\n setDense(dense: boolean): void;\n setIndented(indented: boolean): void;\n setWrap(value: boolean): void;\n trySelect(value: unknown): boolean | null;\n userInteractionListener(): ReturnType<typeof userInteractionListener>;\n}\n\nexport class ListItemAdapter extends BaseAdapter<IListItemComponent> implements IListItemAdapter {\n private _listItemElement: HTMLElement;\n private _defaultSlot: HTMLSlotElement;\n\n constructor(component: IListItemComponent) {\n super(component);\n this._initialize();\n }\n\n private _initialize(): void {\n this._listItemElement = getShadowElement(this._component, LIST_ITEM_CONSTANTS.selectors.LIST_ITEM);\n this._defaultSlot = getShadowElement(this._component, LIST_ITEM_CONSTANTS.selectors.DEFAULT_SLOT) as HTMLSlotElement;\n }\n \n public initializeAccessibility(): void {\n if (!this._component.hasAttribute('role')) {\n this._component.setAttribute('role', 'listitem');\n }\n }\n\n public getListItem(): IListItemComponent {\n return this._component;\n }\n\n /**\n * Adds an event listener to the `<forge-list-item>` host element.\n * @param {string} type The event type.\n * @param {Function} listener The event callback.\n */\n public addListener(type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions): void {\n this._listItemElement.addEventListener(type, listener, options);\n }\n\n /**\n * Removes an event listener from the `<forge-list-item>` host element.\n * @param {string} type The event type.\n * @param {Function} listener The event callback.\n */\n public removeListener(type: string, listener: (evt: Event) => void): void {\n this._listItemElement.removeEventListener(type, listener);\n }\n\n /**\n * Creates a ripple instance on the list item.\n * @returns {ForgeRipple}\n */\n public createRipple(): any {\n return new ForgeRipple(this._listItemElement);\n }\n\n /**\n * Toggles the static state of this list item.\n * @param {boolean} value The static state.\n */\n public setStatic(value: boolean): void {\n if (value) {\n this._listItemElement.tabIndex = -1;\n addClass(LIST_ITEM_CONSTANTS.classes.STATIC, this._listItemElement);\n } else {\n this._listItemElement.tabIndex = 0;\n removeClass(LIST_ITEM_CONSTANTS.classes.STATIC, this._listItemElement);\n }\n }\n\n /**\n * Sets this list item as a two-line list item.\n * @param {boolean} value The two-line state.\n */\n public setTwoLine(value: boolean): void {\n if (value) {\n addClass(LIST_ITEM_CONSTANTS.classes.TWO_LINE, this._listItemElement);\n } else {\n removeClass(LIST_ITEM_CONSTANTS.classes.TWO_LINE, this._listItemElement);\n }\n }\n\n /**\n * Sets this list item as a three-line list item.\n * @param {boolean} value The three-line state.\n */\n public setThreeLine(value: boolean): void {\n if (value) {\n addClass(LIST_ITEM_CONSTANTS.classes.THREE_LINE, this._listItemElement);\n } else {\n removeClass(LIST_ITEM_CONSTANTS.classes.THREE_LINE, this._listItemElement);\n }\n }\n\n /**\n * Determines how many lines the list item is displaying.\n */\n public getLineCount(): number {\n return this._defaultSlot.assignedNodes().filter(e => e.nodeType === Node.ELEMENT_NODE).length; // assignedElements does not exist in the polyfilled version so filtering nodes instead\n }\n\n /**\n * Toggles the active class of the list item.\n * @param {boolean} value The active state.\n */\n public setActive(value: boolean): void {\n if (value) {\n addClass(LIST_ITEM_CONSTANTS.classes.ACTIVE, this._listItemElement);\n } else {\n removeClass(LIST_ITEM_CONSTANTS.classes.ACTIVE, this._listItemElement);\n }\n }\n\n /**\n * Toggles the selected class of the list item.\n * @param {boolean} value The active state.\n */\n public setSelected(value: boolean): void {\n if (value) {\n addClass(LIST_ITEM_CONSTANTS.classes.SELECTED, this._listItemElement);\n // We are treating selected and activated as the same state, and mdc-states hooks right into --activated\n // addClass(LIST_ITEM_CONSTANTS.classes.ACTIVATED, this._listItemElement);\n } else {\n removeClass(LIST_ITEM_CONSTANTS.classes.SELECTED, this._listItemElement);\n // removeClass(LIST_ITEM_CONSTANTS.classes.ACTIVATED, this._listItemElement);\n }\n }\n\n /**\n * Attemps to toggle a checkbox or radio button within the list item if it can find one.\n */\n public tryToggleCheckboxRadio(value?: boolean): void {\n const checkable = this._component.querySelector(LIST_ITEM_CONSTANTS.selectors.CHECKBOX_RADIO_SELECTOR) as HTMLInputElement;\n if (checkable) {\n const force = typeof value === 'boolean';\n const currentState = checkable.checked;\n \n // Check if we are just toggling or forcing to a specific checked state\n checkable.checked = force ? value as boolean : !checkable.checked;\n\n if (!force || currentState !== value) {\n checkable.dispatchEvent(new Event('change', { bubbles: true }));\n }\n }\n }\n\n /** Attempts to set focus to this list item. */\n public setFocus(): void {\n this._listItemElement.focus();\n }\n\n /** Returns whether the component has focus or not. */\n public hasFocus(): boolean {\n return document.activeElement === this._component || !!this._component.shadowRoot?.activeElement;\n }\n\n /**\n * Sets the role on the list item element.\n * @param role The role.\n */\n public setRole(role: string): void {\n this._listItemElement.setAttribute('role', role);\n }\n\n public setDisabled(disabled: boolean): void {\n toggleClass(this._listItemElement, disabled, LIST_ITEM_CONSTANTS.classes.DISABLED);\n }\n\n public setDense(dense: boolean): void {\n toggleClass(this._listItemElement, dense, LIST_ITEM_CONSTANTS.classes.DENSE);\n }\n\n public setIndented(indented: boolean): void {\n toggleClass(this._listItemElement, indented, LIST_ITEM_CONSTANTS.classes.INDENTED);\n }\n\n public setWrap(value: boolean): void {\n toggleClass(this._listItemElement, value, LIST_ITEM_CONSTANTS.classes.WRAP);\n }\n\n /**\n * Attempts to set the selected state of the list item element and it's visual indicators\n * @param value The value to compare to the parent list element's selected value\n * @returns Returns whether the list item is selected or not\n */\n public trySelect(value: unknown): boolean | null {\n const list = requireParent<IListComponent>(this._component, LIST_CONSTANTS.elementName);\n if (!list || list.selectedValue === undefined) {\n return null;\n }\n\n const listValues = list.selectedValue instanceof Array ? list.selectedValue : [list.selectedValue];\n const isSelected = listValues.some(v => isDeepEqual(v, value));\n\n this.setSelected(isSelected);\n this.tryToggleCheckboxRadio(isSelected);\n return isSelected;\n }\n\n public userInteractionListener(): ReturnType<typeof userInteractionListener> {\n return userInteractionListener(this._listItemElement);\n }\n}\n", "import { ICustomElementFoundation, matchesSelectors } from '@tylertech/forge-core';\nimport { ForgeRipple } from '../../ripple';\nimport { IListItemAdapter } from './list-item-adapter';\nimport { LIST_ITEM_CONSTANTS, IListItemSelectEventData } from './list-item-constants';\n\nexport interface IListItemFoundation extends ICustomElementFoundation {\n static: boolean;\n twoLine: boolean;\n threeLine: boolean;\n active: boolean;\n selected: boolean;\n value: any;\n href: string;\n target: string;\n ripple: boolean;\n disabled: boolean;\n dense: boolean;\n wrap: boolean;\n setFocus(): void;\n}\n\n/**\n * The foundation class behind the `<forge-list-item>` component.\n */\nexport class ListItemFoundation implements IListItemFoundation {\n private _ripple = true;\n private _rippleInstance: ForgeRipple;\n private _static = false;\n private _twoLine = false;\n private _threeLine = false;\n private _active = false;\n private _selected = false;\n private _value: any;\n private _href: string;\n private _target: string;\n private _disabled = false;\n private _dense = false;\n private _propagateClick = true;\n private _indented = false;\n private _wrap = false;\n private _clickListener: (evt: MouseEvent) => void;\n private _mouseDownListener: (evt: MouseEvent) => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n\n constructor(private _adapter: IListItemAdapter) {\n this._clickListener = (evt: MouseEvent) => this._onClick(evt);\n this._mouseDownListener = (evt: MouseEvent) => this._onMouseDown(evt);\n this._keydownListener = (evt: KeyboardEvent) => this._onKeydown(evt);\n }\n\n public initialize(): void {\n this._adapter.initializeAccessibility();\n this._setRipple();\n this._adapter.setStatic(this._static);\n this._adapter.setDense(this._dense);\n this._adapter.setDisabled(this._disabled);\n this._adapter.setIndented(this._indented);\n this._adapter.setWrap(this._wrap);\n\n if (!this._static) {\n this._adapter.addListener('click', this._clickListener);\n this._adapter.addListener('mousedown', this._mouseDownListener, { passive: false, capture: true });\n this._adapter.addListener('keydown', this._keydownListener);\n }\n\n if (this._threeLine) {\n this._adapter.setThreeLine(this._threeLine);\n } else if (this.twoLine) {\n this._adapter.setTwoLine(this._twoLine);\n }\n\n const isSelected = this._adapter.trySelect(this._value);\n if(isSelected != null) {\n this._selected = isSelected;\n }\n }\n\n public disconnect(): void {\n if (this._rippleInstance) {\n this._rippleInstance.destroy();\n this._rippleInstance = undefined as any;\n }\n }\n\n private _onMouseDown(evt: MouseEvent): void {\n if (this._adapter.hasFocus() || !this._propagateClick) {\n evt.preventDefault();\n }\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n if (evt.key === 'Enter' || evt.key === ' ') {\n if (evt.key === ' ') {\n evt.preventDefault();\n }\n this._select(evt.target as HTMLElement);\n }\n }\n\n /**\n * Handles clicking a list item.\n * @param evt\n */\n private _onClick(evt: MouseEvent): void {\n this._select(evt.target as HTMLElement);\n }\n\n private _select(targetElement: HTMLElement): void {\n const ignoreElement = targetElement?.hasAttribute(LIST_ITEM_CONSTANTS.attributes.IGNORE);\n if (this._static || this._disabled || ignoreElement) {\n return;\n }\n\n if (!this._adapter.hasFocus() && this._propagateClick) {\n this.setFocus();\n }\n\n if (this._href) {\n if (this._target) {\n window.open(this._href, this._target);\n } else {\n document.location.href = this._href;\n }\n return;\n }\n\n // If the target was not a checkbox or radio button, attempt to find one and toggle its checked state\n if (!matchesSelectors(targetElement, LIST_ITEM_CONSTANTS.selectors.CHECKBOX_RADIO_SELECTOR)) {\n this._adapter.tryToggleCheckboxRadio();\n }\n\n const data: IListItemSelectEventData = {\n value: this._value,\n listItem: this._adapter.getListItem()\n };\n this._adapter.emitHostEvent(LIST_ITEM_CONSTANTS.events.SELECT, data);\n }\n\n /** Gets/sets whether the list item has a ripple or not. */\n public get ripple(): boolean {\n return this._ripple;\n }\n public set ripple(value: boolean) {\n if (this._ripple !== value) {\n // We don't attach ripples to static items\n if (value && this._static) {\n return;\n }\n this._ripple = value;\n this._setRipple();\n\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.RIPPLE, String(this._ripple));\n }\n }\n\n /** Gets/sets whether the static state of this list item. */\n public get static(): boolean {\n return this._static;\n }\n public set static(value: boolean) {\n if (this._static !== value) {\n this._static = value;\n this._adapter.setStatic(this._static);\n\n // Ensure we either add or remove the ripple\n this._setRipple();\n\n // Toggle the click listener\n if (this._static) {\n this._adapter.removeListener('click', this._clickListener);\n } else {\n this._adapter.addListener('click', this._clickListener);\n }\n\n if (this._static) {\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.STATIC);\n } else {\n this._adapter.removeHostAttribute(LIST_ITEM_CONSTANTS.attributes.STATIC);\n }\n }\n }\n\n /** Gets/sets whether the list item displays two lines of text. */\n public get twoLine(): boolean {\n return this._twoLine;\n }\n public set twoLine(value: boolean) {\n if (this._twoLine !== value) {\n this._twoLine = value;\n this._adapter.setTwoLine(this._twoLine);\n\n if (this._twoLine) {\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.TWO_LINE);\n } else {\n this._adapter.removeHostAttribute(LIST_ITEM_CONSTANTS.attributes.TWO_LINE);\n }\n }\n }\n\n /** Gets/sets whether the list item displays two lines of text. */\n public get threeLine(): boolean {\n return this._threeLine;\n }\n public set threeLine(value: boolean) {\n if (this._threeLine !== value) {\n this._threeLine = value;\n\n if (this._threeLine) {\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.THREE_LINE);\n } else {\n this._adapter.removeHostAttribute(LIST_ITEM_CONSTANTS.attributes.THREE_LINE);\n }\n\n if (this._threeLine) {\n this._twoLine = false;\n }\n\n this._adapter.setTwoLine(this._twoLine);\n this._adapter.setThreeLine(this._threeLine);\n }\n }\n\n /** Gets/sets whether the list item is active or not. */\n public get active(): boolean {\n return this._active;\n }\n public set active(value: boolean) {\n if (this._active !== value) {\n this._active = value;\n this._adapter.setActive(this._active);\n if (this._active) {\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.ACTIVE);\n } else {\n this._adapter.removeHostAttribute(LIST_ITEM_CONSTANTS.attributes.ACTIVE);\n }\n }\n }\n\n /** Gets/sets whether the list item is selected or not. */\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(value: boolean) {\n if (this._selected !== value) {\n this._selected = value;\n this._adapter.setSelected(this._selected);\n this._adapter.tryToggleCheckboxRadio(this._selected);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.SELECTED, this._selected);\n }\n }\n\n /** Gets/sets the unique value for this list item. */\n public get value(): any {\n return this._value;\n }\n public set value(value: any) {\n this._value = value;\n const isSelected = this._adapter.trySelect(this._value);\n if(isSelected != null) {\n this._selected = isSelected;\n }\n }\n\n /** Gets/sets the href link that this list item will send the browser to when clicked. */\n public get href(): string {\n return this._href;\n }\n public set href(value: string) {\n if (this._href !== value) {\n this._href = value;\n if (this._href) {\n this._adapter.setRole(LIST_ITEM_CONSTANTS.roles.LINK);\n } else {\n this._adapter.setRole(LIST_ITEM_CONSTANTS.roles.LIST_ITEM);\n }\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.HREF, this._href);\n }\n }\n\n /** Gets/sets the href link target. */\n public get target(): string {\n return this._target;\n }\n public set target(value: string) {\n this._target = value;\n }\n\n /** Gets/sets the disabled state. */\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.setDisabled(this._disabled);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n /** Gets/sets the dense state. */\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n if (this._dense !== value) {\n this._dense = value;\n this._adapter.setDense(this._dense);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.DENSE, this._dense);\n }\n }\n\n /** Gets/sets the dense state. */\n public get propagateClick(): boolean {\n return this._propagateClick;\n }\n public set propagateClick(value: boolean) {\n if (this._propagateClick !== value) {\n this._propagateClick = value;\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.PROPAGATE_CLICK, '' + !!this._propagateClick);\n }\n }\n\n public get indented(): boolean {\n return this._indented;\n }\n public set indented(value: boolean) {\n if (this._indented !== value) {\n this._indented = value;\n this._adapter.setIndented(this._indented);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.INDENTED, this._indented);\n }\n }\n\n public get wrap(): boolean {\n return this._wrap;\n }\n public set wrap(value: boolean) {\n if (this._wrap !== value) {\n this._wrap = value;\n this._adapter.setWrap(this._wrap);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.WRAP, this._wrap);\n }\n }\n\n private async _setRipple(): Promise<void> {\n if (this._ripple && !this._static && !this._rippleInstance) {\n const type = await this._adapter.userInteractionListener();\n if (this._ripple && !this._static && !this._rippleInstance) { // need to re-check after await\n this._rippleInstance = this._adapter.createRipple();\n if (type === 'focusin') {\n this._rippleInstance.handleFocus();\n }\n }\n } else if ((!this._ripple || this._static) && this._rippleInstance) {\n this._rippleInstance.destroy();\n this._rippleInstance = undefined as any;\n }\n }\n\n /**\n * Sets focus to this list item.\n */\n public setFocus(): void {\n this._adapter.setFocus();\n }\n}\n", "import { CustomElement, attachShadowTemplate, requireParent, elementParents, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\nimport { ListItemAdapter } from './list-item-adapter';\nimport { ListItemFoundation } from './list-item-foundation';\nimport { IListItemSelectEventData, LIST_ITEM_CONSTANTS } from './list-item-constants';\nimport { LIST_CONSTANTS } from '../list/list-constants';\nimport { IListComponent } from '../list';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\n\nconst defaultTemplate = '<template><div class=\\\"forge-list-item\\\" tabindex=\\\"0\\\" part=\\\"root\\\"><slot name=\\\"leading\\\"></slot><slot name=\\\"avatar\\\"></slot><div class=\\\"forge-list-item__text\\\" part=\\\"text-container\\\"><slot></slot><slot name=\\\"title\\\"></slot><slot name=\\\"subtitle\\\"></slot><slot name=\\\"tertiary-title\\\"></slot><slot></slot></div><slot name=\\\"trailing\\\"></slot></div></template>';\nconst styles = '@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-list-item{min-height:32px;min-height:var(--forge-list-item-min-height,32px);max-height:none;max-height:var(--forge-list-item-max-height,none);height:32px;height:var(--forge-list-item-height,32px);padding:8px 16px;padding:var(--forge-list-item-padding,8px 16px);margin-left:0;margin-left:var(--forge-list-item-indent,0);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-list-item-align-items,center);align-items:var(--forge-list-item-align-items,center);position:relative;display:-webkit-box;display:flex;-webkit-box-pack:start;justify-content:flex-start;overflow:hidden}.forge-list-item:focus{outline:0}.forge-list-item ::slotted([slot=leading]),.forge-list-item ::slotted([slot=trailing]){font-size:1.5rem}.forge-list-item ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));margin-left:0;margin-left:var(--forge-list-item-leading-margin-left,0);margin-right:32px;margin-right:var(--forge-list-item-leading-margin-right,32px);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor}.forge-list-item ::slotted([slot=trailing]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-list-item ::slotted([slot=avatar]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));margin-left:0;margin-left:var(--forge-list-item-leading-margin-left,0);margin-right:32px;margin-right:var(--forge-list-item-leading-margin-right,32px);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor;margin-left:0;margin-right:16px;min-width:40px;min-height:40px;border-radius:50%;display:inline-flex;background-color:rgba(0,0,0,.54);background-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-surface--hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded--background-focused::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated.mdc-ripple-surface--hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated.mdc-ripple-upgraded--background-focused::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected.mdc-ripple-surface--hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected.mdc-ripple-upgraded--background-focused::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--selected:focus:hover.mdc-ripple-upgraded--background-focused:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.28}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.12}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.16}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{background-color:#000;background-color:var(--mdc-theme-on-surface,#000)}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.24}.forge-list-item:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.28}.forge-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}.forge-list-item ::slotted([slot=title]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.forge-list-item ::slotted([slot=subtitle]),.forge-list-item ::slotted([slot=tertiary-title]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));display:block}.forge-list-item--two-line{min-height:56px;min-height:var(--forge-list-item-min-height,56px);height:56px;height:var(--forge-list-item-height,56px)}.forge-list-item--three-line{min-height:72px;min-height:var(--forge-list-item-min-height,72px);height:72px;height:var(--forge-list-item-height,72px)}.forge-list-item--dense{min-height:16px;min-height:var(--forge-list-item-min-height,16px);height:16px;height:var(--forge-list-item-height,16px)}.forge-list-item--dense ::slotted([slot=leading]),.forge-list-item--dense ::slotted([slot=trailing]){font-size:1.25rem}.forge-list-item--dense ::slotted([slot=leading]){margin-right:12px;margin-right:var(--forge-list-item-leading-margin-right,12px)}.forge-list-item--dense ::slotted(.forge-list-item__title){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit)}.forge-list-item--dense.forge-list-item--two-line{min-height:40px;min-height:var(--forge-list-item-min-height,40px)}.forge-list-item--dense.forge-list-item--three-line{min-height:56px;min-height:var(--forge-list-item-min-height,56px)}.forge-list-item--wrap{height:auto;height:var(--forge-list-item-height,auto)}.forge-list-item--wrap .forge-list-item__text,.forge-list-item--wrap ::slotted([slot=subtitle]),.forge-list-item--wrap ::slotted([slot=tertiary-title]),.forge-list-item--wrap ::slotted([slot=title]){text-overflow:clip;white-space:normal}.forge-list-item--indented{margin-left:56px;margin-left:var(--forge-list-item-indent,56px)}.forge-list-item--active.forge-list-item--activated:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before,.forge-list-item--active.forge-list-item--selected:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item::before{opacity:.2}.forge-list-item--active.forge-list-item--activated:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:hover::before,.forge-list-item--active.forge-list-item--selected:not(.forge-list-item--static):not(.forge-list-item--disabled).forge-list-item:hover::before{opacity:.24}.forge-list-item--activated,.forge-list-item--selected{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-list-item--activated .forge-list-item__text .forge-list-item__subtitle,.forge-list-item--activated .forge-list-item__text ::slotted(.forge-list-item__subtitle),.forge-list-item--selected .forge-list-item__text .forge-list-item__subtitle,.forge-list-item--selected .forge-list-item__text ::slotted(.forge-list-item__subtitle){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);opacity:.87}.forge-list-item--activated .forge-list-item__text .forge-list-item__tertiary-title,.forge-list-item--activated .forge-list-item__text ::slotted(.forge-list-item__tertiary-title),.forge-list-item--selected .forge-list-item__text .forge-list-item__tertiary-title,.forge-list-item--selected .forge-list-item__text ::slotted(.forge-list-item__tertiary-title){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);opacity:.87}.forge-list-item--activated ::slotted([slot=leading]),.forge-list-item--activated ::slotted([slot=trailing]),.forge-list-item--selected ::slotted([slot=leading]),.forge-list-item--selected ::slotted([slot=trailing]){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-list-item--activated ::slotted([slot=avatar].forge-list-item__avatar-icon),.forge-list-item--selected ::slotted([slot=avatar].forge-list-item__avatar-icon){background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12));color:#000;color:var(--mdc-theme-on-surface,#000)}.forge-list-item--disabled{cursor:not-allowed;cursor:var(--forge-list-item-cursor,not-allowed);color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-list-item--disabled ::slotted([slot=leading]),.forge-list-item--disabled ::slotted([slot=trailing]){cursor:not-allowed;cursor:var(--forge-list-item-cursor,not-allowed);color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-list-item[role=link]{cursor:pointer}:host{display:block;contain:content}:host([hidden]){display:none}:host([forge-drawer-context=true]) .forge-list-item{margin:8px;margin:var(--forge-list-item-margin,8px);padding:0 8px;padding:var(--forge-list-item-padding,0 8px);border-radius:4px;border-radius:var(--forge-list-item-border-radius,4px);cursor:pointer;cursor:var(--forge-list-item-cursor,pointer);height:40px;height:var(--forge-list-item-height,40px);font-size:.875rem;font-weight:500}:host([forge-drawer-context=true]) .forge-list-item--static{cursor:initial}:host([forge-drawer-context=true]) .forge-list-item--indented{margin-left:64px;margin-left:var(--forge-list-item-indent,64px)}:host([forge-drawer-context=true]) .forge-list-item--two-line{min-height:56px-8px;min-height:var(--forge-list-item-min-height,56px-8px);height:56px-8px;height:var(--forge-list-item-height,56px-8px)}:host([forge-drawer-context=true]) .forge-list-item--three-line{min-height:72px-8px;min-height:var(--forge-list-item-min-height,72px-8px);height:72px-8px;height:var(--forge-list-item-height,72px-8px)}:host([forge-drawer-context=true]) .forge-list-item:first-child{margin-top:4px;margin-bottom:4px}:host([forge-drawer-context=true]) .forge-list-item--dense{min-height:16px;min-height:var(--forge-list-item-min-height,16px);height:16px;height:var(--forge-list-item-height,16px)}:host([forge-drawer-context=true]) .forge-list-item--dense ::slotted([slot=leading]),:host([forge-drawer-context=true]) .forge-list-item--dense ::slotted([slot=trailing]){font-size:1.25rem}:host([forge-drawer-context=true]) .forge-list-item--dense .forge-list-item__text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit)}:host([forge-drawer-context=true]) .forge-list-item--wrap{height:auto;height:var(--forge-list-item-height,auto);padding:4px 8px;padding:var(--forge-list-item-padding,4px 8px);min-height:40px;min-height:var(--forge-list-item-min-height,40px)}:host([forge-drawer-context=true]) .forge-list-item--disabled{cursor:not-allowed;cursor:var(--forge-list-item-cursor,not-allowed)}:host([dense]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit)}';\n\nexport interface IListItemComponent extends IBaseComponent {\n static: boolean;\n twoLine: boolean;\n threeLine: boolean;\n active: boolean;\n selected: boolean;\n value: any;\n href: string;\n target: string;\n ripple: boolean;\n disabled: boolean;\n dense: boolean;\n propagateClick: boolean;\n indented: boolean;\n wrap: boolean;\n focus(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-list-item': IListItemComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-list-item-select': CustomEvent<IListItemSelectEventData>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-list-item>` element.\n * \n * @tag forge-list-item\n */\n@CustomElement({\n name: LIST_ITEM_CONSTANTS.elementName\n})\nexport class ListItemComponent extends BaseComponent implements IListItemComponent {\n public static get observedAttributes(): string[] {\n return [\n LIST_ITEM_CONSTANTS.attributes.STATIC,\n LIST_ITEM_CONSTANTS.attributes.TWO_LINE,\n LIST_ITEM_CONSTANTS.attributes.THREE_LINE,\n LIST_ITEM_CONSTANTS.attributes.ACTIVE,\n LIST_ITEM_CONSTANTS.attributes.SELECTED,\n LIST_ITEM_CONSTANTS.attributes.VALUE,\n LIST_ITEM_CONSTANTS.attributes.HREF,\n LIST_ITEM_CONSTANTS.attributes.TARGET,\n LIST_ITEM_CONSTANTS.attributes.RIPPLE,\n LIST_ITEM_CONSTANTS.attributes.DISABLED,\n LIST_ITEM_CONSTANTS.attributes.DENSE,\n LIST_ITEM_CONSTANTS.attributes.PROPAGATE_CLICK,\n LIST_ITEM_CONSTANTS.attributes.INDENTED,\n LIST_ITEM_CONSTANTS.attributes.WRAP\n ];\n }\n\n private _foundation: ListItemFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, defaultTemplate, styles);\n this._foundation = new ListItemFoundation(new ListItemAdapter(this));\n }\n\n public connectedCallback(): void {\n // To simulate the :host-context() selector for Firefox until they implement it, we need to determine if the\n // list item is within a drawer for auto-styling the list item when included within a drawer. Check to see if\n // any of the parents of this element are a drawer.\n if (!this.hasAttribute(LIST_ITEM_CONSTANTS.attributes.DRAWER_CONTEXT) && elementParents(this).some(el => ['forge-drawer', 'forge-modal-drawer', 'forge-mini-drawer'].includes(el.tagName.toLowerCase()))) {\n this.setAttribute(LIST_ITEM_CONSTANTS.attributes.DRAWER_CONTEXT, 'true');\n }\n\n const list = requireParent<IListComponent>(this, LIST_CONSTANTS.elementName);\n if (list) {\n this._inheritParentListProps(list);\n }\n\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case LIST_ITEM_CONSTANTS.attributes.STATIC:\n this.static = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.TWO_LINE:\n this.twoLine = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.THREE_LINE:\n this.threeLine = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.ACTIVE:\n this.active = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.SELECTED:\n this.selected = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.VALUE:\n this.value = newValue;\n break;\n case LIST_ITEM_CONSTANTS.attributes.HREF:\n this.href = newValue;\n break;\n case LIST_ITEM_CONSTANTS.attributes.TARGET:\n this.target = newValue;\n break;\n case LIST_ITEM_CONSTANTS.attributes.RIPPLE:\n this.ripple = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.PROPAGATE_CLICK:\n this.propagateClick = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.INDENTED:\n this.indented = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.attributes.WRAP:\n this.wrap = coerceBoolean(newValue);\n break;\n }\n }\n\n private _inheritParentListProps(list: IListComponent): void {\n if (list.hasAttribute(LIST_CONSTANTS.attributes.STATIC)) {\n this.static = true;\n }\n if (list.hasAttribute(LIST_CONSTANTS.attributes.DENSE)) {\n this.dense = true;\n }\n if (list.getAttribute(LIST_CONSTANTS.attributes.PROPAGATE_CLICK) === 'false') {\n this.propagateClick = false;\n }\n if (list.hasAttribute(LIST_CONSTANTS.attributes.INDENTED)) {\n this.indented = true;\n }\n }\n\n /** Gets/sets whether the static state of this list item. */\n @FoundationProperty()\n public declare static: boolean;\n\n /** Gets/sets whether the list item displays two lines of text. */\n @FoundationProperty()\n public declare twoLine: boolean;\n\n /** Gets/sets whether the list item displays three lines of text. */\n @FoundationProperty()\n public declare threeLine: boolean;\n\n /** Gets/sets whether the list item is active or not. */\n @FoundationProperty()\n public declare active: boolean;\n\n /** Gets/sets whether the list item is selected or not. */\n @FoundationProperty()\n public declare selected: boolean;\n\n /** Gets/sets list item value. */\n @FoundationProperty()\n public declare value: any;\n\n /** Gets/sets the href link that this list item will send the browser to when clicked. */\n @FoundationProperty()\n public declare href: string;\n\n /** Gets/sets the href link target. Only pertains when `href` is also used. */\n @FoundationProperty()\n public declare target: string;\n\n /** Gets/sets whether the list item has a ripple or not. */\n @FoundationProperty()\n public declare ripple: boolean;\n\n /** Gets/sets whether the list item is disabled or not. */\n @FoundationProperty()\n public declare disabled: boolean;\n\n /** Gets/sets whether the list item is using dense styles or not. */\n @FoundationProperty()\n public declare dense: boolean;\n\n /** Gets/sets whether the list item allows mousedown events through to the underlying list item element. Default is true. */\n @FoundationProperty()\n public declare propagateClick: boolean;\n\n /** Gets/sets whether the list item is indented or not. Default is false. */\n @FoundationProperty()\n public declare indented: boolean;\n\n /** Gets/sets whether the list item content is wrapped or not. Default is true. */\n @FoundationProperty()\n public declare wrap: boolean;\n\n /** Sets focus to this list item. */\n public override focus(): void {\n this._foundation.setFocus();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { ListItemComponent } from './list-item';\n\nexport * from './list-item-adapter';\nexport * from './list-item-constants';\nexport * from './list-item-foundation';\nexport * from './list-item';\n\nexport function defineListItemComponent(): void {\n defineCustomElement(ListItemComponent);\n}\n"],
|
|
5
|
-
"mappings": "8aAEA,IAAMA,EAA2C,GAAGC,QAE9CC,EAAa,CACjB,OAAQ,SACR,MAAO,QACP,gBAAiB,kBACjB,SAAU,WACV,eAAgB,gBAClB,EAEMC,EAAY,CAChB,qBAAsB,gFACxB,EAEaC,EAAiB,CAC5B,YAAAJ,EACA,WAAAE,EACA,UAAAC,CACF,ECjBA,IAAME,EAA2C,GAAGC,aAE9CC,EAAa,CACjB,OAAQ,SACR,SAAU,WACV,WAAY,aACZ,OAAQ,SACR,SAAU,WACV,MAAO,QACP,KAA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B,GA3HThB,EA4HI,sBAIAe,EAAA,CADdC,EAAmB,GA/HThB,EAgII,wBAIAe,EAAA,CADdC,EAAmB,GAnIThB,EAoII,qBAIAe,EAAA,CADdC,EAAmB,GAvIThB,EAwII,oBAIAe,EAAA,CADdC,EAAmB,GA3IThB,EA4II,sBAIAe,EAAA,CADdC,EAAmB,GA/IThB,EAgJI,sBAIAe,EAAA,CADdC,EAAmB,GAnJThB,EAoJI,wBAIAe,EAAA,CADdC,EAAmB,GAvJThB,EAwJI,qBAIAe,EAAA,CADdC,EAAmB,GA3JThB,EA4JI,8BAIAe,EAAA,CADdC,EAAmB,GA/JThB,EAgKI,wBAIAe,EAAA,CADdC,EAAmB,GAnKThB,EAoKI,oBApKJA,EAANe,EAAA,CAHNE,EAAc,CACb,KAAMZ,EAAoB,WAC5B,CAAC,GACYL,GCvCN,SAASkB,IAAgC,CAC9CC,EAAoBC,CAAiB,CACvC",
|
|
6
|
-
"names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "selectors", "LIST_CONSTANTS", "elementName", "COMPONENT_NAME_PREFIX", "attributes", "classes", "selectors", "events", "roles", "LIST_ITEM_CONSTANTS", "ListItemAdapter", "BaseAdapter", "component", "getShadowElement", "LIST_ITEM_CONSTANTS", "type", "listener", "options", "ForgeRipple", "value", "addClass", "removeClass", "e", "checkable", "force", "currentState", "_a", "role", "disabled", "toggleClass", "dense", "indented", "list", "requireParent", "LIST_CONSTANTS", "isSelected", "v", "isDeepEqual", "userInteractionListener", "ListItemFoundation", "_adapter", "evt", "isSelected", "targetElement", "ignoreElement", "LIST_ITEM_CONSTANTS", "matchesSelectors", "data", "value", "type", "defaultTemplate", "styles", "ListItemComponent", "BaseComponent", "attachShadowTemplate", "ListItemFoundation", "ListItemAdapter", "LIST_ITEM_CONSTANTS", "elementParents", "el", "list", "requireParent", "LIST_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "defineListItemComponent", "defineCustomElement", "ListItemComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as c,d as S}from"./chunk.H3IPTBWM.js";import{a as O}from"./chunk.5KC43VFL.js";import{a as n}from"./chunk.KTGSZEAG.js";import{a as M,b as w}from"./chunk.QOA2O575.js";import{a as D,e as x,g as m,l as A}from"./chunk.HOXFK44F.js";import{i as C,r as T,s as y,t as k}from"./chunk.4LA6HEA7.js";import{b as u,c as f,d as E,k as p}from"./chunk.J2M2MXP2.js";import{a as _,f as r}from"./chunk.MCIQXNKY.js";var l=`${w}dialog`,H={ANIMATING:"forge-dialog--animating",OPEN:"forge-dialog--open",ACTION_BUTTON:"forge-dialog__action__button",BUTTON_TEXT:"forge-button__text",SCROLLABLE:"forge-dialog--scrollable",FULLSCREEN:"forge-dialog--fullscreen",MOVEABLE:"forge-dialog--moveable"},v={BACKDROP_CLOSE:"backdrop-close",ESCAPE_CLOSE:"escape-close",FULLSCREEN:"fullscreen",POSITION_TYPE:"position-type",POSITION_X:"position-x",POSITION_Y:"position-y",MOVEABLE:"moveable",MOVE_TARGET:"move-target",OPEN:"forge-dialog-open",INITIAL_FOCUS:"forge-dialog-focus",DFEAULT_MOVE_TARGET:"forge-dialog-move-target"},P={CONTAINER:".forge-dialog",SURFACE:".forge-dialog__surface",BACKDROP:c.elementName,INITIAL_FOCUS:`[${v.INITIAL_FOCUS}]`,DFEAULT_MOVE_TARGET:`[${v.DFEAULT_MOVE_TARGET}]`,CONTENT:".forge-dialog__body"},I={BEFORE_CLOSE:`${l}-before-close`,OPEN:`${l}-open`,CLOSE:`${l}-close`,READY:`${l}-ready`,MOVE_START:`${l}-move-start`,MOVED:`${l}-move`,MOVE_END:`${l}-move-end`},N={ANIMATION_DURATION:150,BACKDROP_MAX_OPACITY:.3},i={elementName:l,classes:H,selectors:P,attributes:v,events:I,numbers:N};var g=class{constructor(e){this._adapter=e;this._open=!1;this._backdropClose=!0;this._escapeClose=!0;this._fullscreen=!1;this._positionType="absolute";this._positionX=null;this._positionY=null;this._moveable=!1;this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET;this._isAnimating=!1;this._isMoving=!1;this._attachedDocumentKeydownHandler=!1;this._attachedBackdropClickHandler=!1;this._transitionEndHandler=t=>this._onTransitionEnd(),this._documentKeydownHandler=t=>this._onDocumentKeydown(t),this._backdropClickHandler=t=>this._onBackdropClick(t),this._moveTargetMouseDownHandler=t=>this._onMoveTargetMouseDown(t),this._moveTargetMouseMoveHandler=t=>this._onMoveTargetMouseMove(t),this._moveTargetMouseUpHandler=t=>this._onMoveTargetMouseUp(t)}initialize(){this._adapter.initializeAccessibility(),this._open&&this._moveable&&(this._adapter.setMoveable(this._moveable),this._initMoveTarget())}destroy(){this._open&&(this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._attachedDocumentKeydownHandler&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedBackdropClickHandler&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}async _applyOpen(e){if(e){if(typeof this._openCallback=="function"&&!await this._executeOpenCallback())return;this._open=e,this._openDialog()}else{if(typeof this._closeCallback=="function"&&!await this._executeCloseCallback())return;this._open=e,this._closeDialog()}this._adapter.toggleHostAttribute(i.attributes.OPEN,this._open)}async _executeOpenCallback(){try{return await Promise.resolve(this._openCallback())!==!1}catch(e){return!1}}async _executeCloseCallback(){try{return await Promise.resolve(this._closeCallback())!==!1}catch(e){return!1}}initializeMoveTarget(){this._moveTarget||(this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET),this._initMoveTarget()}resetPosition(){this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)}_normalizePositionValue(e){return E(e)?`${e}px`:f(e)?e:null}_openDialog(){this._adapter.attach(),this._fullscreen||(this._moveable&&this._adapter.setMoveable(this._moveable),(this._positionX!=null||this._positionY!=null)&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)),this._adapter.setBodyAttribute(i.attributes.OPEN,"true"),this._adapter.registerTransitionEndHandler(this._transitionEndHandler),this._setDocumentKeydownListener(this._escapeClose),this._setBackdropClickListener(this._backdropClose),this._adapter.setAnimating(!0),this._isAnimating=!0,window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.setVisibility(!0),this._adapter.emitHostEvent(i.events.OPEN),this._adapter.trySetInitialFocus(),this._adapter.isScrollable()&&this._adapter.addRootClass(i.classes.SCROLLABLE)})}),setTimeout(()=>{window.requestAnimationFrame(()=>{this._open&&this._isAnimating&&this._onTransitionEnd()})},i.numbers.ANIMATION_DURATION)}_closeDialog(){this._moveTarget&&this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._attachedDocumentKeydownHandler&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedBackdropClickHandler&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._isAnimating=!1,this._adapter.setAnimating(!0),this._adapter.setVisibility(!1),setTimeout(()=>{this._adapter.emitHostEvent(i.events.CLOSE),this._adapter.detach(),this._adapter.getOpenDialogs(i.elementName).length||this._adapter.removeBodyAttribute(i.attributes.OPEN)},i.numbers.ANIMATION_DURATION)}_onTransitionEnd(){!this._isAnimating||(this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._adapter.setAnimating(!1),this._adapter.emitHostEvent(i.events.READY),this._moveable&&this._initMoveTarget(),this._isAnimating=!1)}_initMoveTarget(){!this._fullscreen&&this._moveable&&this._moveTarget&&this._adapter.setMoveTarget(this._moveTarget)&&this._adapter.setMoveTargetHandler("mousedown",this._moveTargetMouseDownHandler)}_removeDragHandlers(){this._adapter.removeDragTargetHandler("mousedown",this._moveTargetMouseDownHandler),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseDown(e){e.preventDefault(),this._adapter.captureActiveElement();let t=this._adapter.getSurfaceBounds();this._moveContext={top:e.pageY-t.top,left:e.pageX-t.left,height:t.height,width:t.width},this._adapter.setDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.setDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseMove(e){e.preventDefault();let t=this._calculateOffsetPosition(e.pageX,e.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,!this._adapter.emitHostEvent(i.events.MOVE_START,t,!0,!0)))return;let o=this._clampPosition(t,this._moveContext);if((!this._lastPosition||o.x!==this._lastPosition.x||o.y!==this._lastPosition.y)&&this._adapter.emitHostEvent(i.events.MOVED,o,!0,!0)){this._lastPosition=_({},o);let d=this._normalizePositionValue(o.x),L=this._normalizePositionValue(o.y);this._adapter.setSurfacePosition(d,L,"absolute")}}_onMoveTargetMouseUp(e){this._isMoving&&this._adapter.emitHostEvent(i.events.MOVE_END),this._moveComplete()}_moveComplete(){this._adapter.tryRestoreActiveElement(),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler),this._lastPosition=void 0,this._moveContext=void 0,this._isMoving=!1}_onDocumentKeydown(e){e.stopPropagation(),e.key&&(e.key==="Escape"||e.key==="Esc")&&this._tryClose()}_onBackdropClick(e){e.stopPropagation(),this._tryClose()}async _tryClose(){if(!!this._adapter.emitHostEvent(i.events.BEFORE_CLOSE,void 0,void 0,!0)){if(!this._beforeCloseCallback){this.open=!1;return}try{if(await Promise.resolve(this._beforeCloseCallback())!==!1){this.open=!1;return}}catch(t){return}}}_setBackdropClickListener(e){!this._open||(e&&!this._attachedBackdropClickHandler?(this._adapter.registerBackdropClickHandler(this._backdropClickHandler),this._attachedBackdropClickHandler=!0):!e&&this._attachedBackdropClickHandler&&(this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._attachedBackdropClickHandler=!1))}_setDocumentKeydownListener(e){!this._open||(e&&!this._attachedDocumentKeydownHandler?(this._adapter.setDocumentListener("keydown",this._documentKeydownHandler),this._attachedDocumentKeydownHandler=!0):!e&&this._attachedDocumentKeydownHandler&&(this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedDocumentKeydownHandler=!1))}_calculateOffsetPosition(e,t,o){return{x:e-((o==null?void 0:o.left)||0),y:t-((o==null?void 0:o.top)||0)}}_clampPosition({x:e,y:t},o){let a=0,d=0;return o&&(a=o.width,d=o.height),e<=0?e=0:e+a>=window.innerWidth&&(e=window.innerWidth-a),t<=0?t=0:t+d>=window.innerHeight&&(t=window.innerHeight-d),{x:e,y:t}}set backdropClose(e){e=Boolean(e),this._backdropClose!==e&&(this._backdropClose=e,this._setBackdropClickListener(this._backdropClose),u(this._backdropClose)?this._adapter.setHostAttribute(i.attributes.BACKDROP_CLOSE,this._backdropClose.toString()):this._adapter.removeHostAttribute(i.attributes.BACKDROP_CLOSE))}get backdropClose(){return this._backdropClose}set escapeClose(e){e=Boolean(e),this._escapeClose!==e&&(this._escapeClose=e,this._setDocumentKeydownListener(this._escapeClose),u(this._escapeClose)?this._adapter.setHostAttribute(i.attributes.ESCAPE_CLOSE,this._escapeClose.toString()):this._adapter.removeHostAttribute(i.attributes.ESCAPE_CLOSE))}get escapeClose(){return this._escapeClose}get open(){return this._open}set open(e){this._open!==e&&(e=Boolean(e),e!==this._open&&this._applyOpen(e))}get fullscreen(){return this._fullscreen}set fullscreen(e){this._fullscreen!==e&&(this._fullscreen=!!e,this._adapter.setFullscreen(this._fullscreen),this._adapter.setHostAttribute(i.attributes.FULLSCREEN,String(this._fullscreen)))}get openCallback(){return this._openCallback}set openCallback(e){this._openCallback=e}get closeCallback(){return this._closeCallback}set closeCallback(e){this._closeCallback=e}get beforeCloseCallback(){return this._beforeCloseCallback}set beforeCloseCallback(e){this._beforeCloseCallback=e}get positionType(){return this._positionType}set positionType(e){this._positionType!==e&&(this._positionType=e,this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionX(){return this._positionX}set positionX(e){this._positionX!==e&&(this._positionX=this._normalizePositionValue(e),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionY(){return this._positionY}set positionY(e){this._positionY!==e&&(this._positionY=this._normalizePositionValue(e),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get moveable(){return this._moveable}set moveable(e){this._moveable!==e&&(this._moveable=e,this._open&&(this._adapter.setMoveable(this._moveable),this._moveable?this._initMoveTarget():(this._removeDragHandlers(),this._isMoving=!1)))}get moveTarget(){return this._moveTarget}set moveTarget(e){this._moveTarget=e}};var b=class extends O{constructor(t){super(t);this._backdropElement=m(t,i.selectors.BACKDROP),this._containerElement=m(t,i.selectors.CONTAINER),this._surfaceElement=m(t,i.selectors.SURFACE)}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","dialog"),this._component.setAttribute("aria-modal","true")}setAnimating(t){t?this._containerElement.classList.add(i.classes.ANIMATING):this._containerElement.classList.remove(i.classes.ANIMATING)}setVisibility(t){t?this._containerElement.classList.add(i.classes.OPEN):this._containerElement.classList.remove(i.classes.OPEN)}attach(){document.body.appendChild(this._component)}detach(){this._activeElement&&(this._activeElement=void 0),C(this._component)}registerTransitionEndHandler(t){this._surfaceElement.addEventListener("transitionend",t)}deregisterTransitionEndHandler(t){this._surfaceElement.removeEventListener("transitionend",t)}setDocumentListener(t,o){document.addEventListener(t,o)}removeDocumentListener(t,o){document.removeEventListener(t,o)}registerBackdropClickHandler(t){this._backdropElement.addEventListener(c.events.BACKDROP_CLICK,t)}deregisterBackdropClickHandler(t){this._backdropElement.removeEventListener(c.events.BACKDROP_CLICK,t)}getOpenDialogs(t){return document.querySelectorAll(t)}setBodyAttribute(t,o){document.body.setAttribute(t,o)}removeBodyAttribute(t){document.body.removeAttribute(t)}trySetInitialFocus(){let t=T(this._component,i.selectors.INITIAL_FOCUS);t&&t.length&&t[t.length-1].focus()}isScrollable(){let t=this._component.querySelector(i.selectors.CONTENT);return t?t.scrollHeight>t.offsetHeight:!1}addRootClass(t){this._component.classList.add(t)}setFullscreen(t){t?this._containerElement.classList.add(i.classes.FULLSCREEN):this._containerElement.classList.remove(i.classes.FULLSCREEN)}setMoveable(t){k(this._containerElement,t,i.classes.MOVEABLE)}setMoveTarget(t){return t?(this._moveTargetElement=this._component.querySelector(t),!!this._moveTargetElement):!1}setMoveTargetHandler(t,o){this._moveTargetElement&&this._moveTargetElement.addEventListener(t,o)}removeDragTargetHandler(t,o){this._moveTargetElement&&this._moveTargetElement.removeEventListener(t,o)}getSurfaceBounds(){return this._surfaceElement.getBoundingClientRect()}setSurfacePosition(t,o,a){this._surfaceElement.style.position=a==="absolute"?a:"relative",o!=null?this._surfaceElement.style.top=o:this._surfaceElement.style.removeProperty("top"),t!=null?this._surfaceElement.style.left=t:this._surfaceElement.style.removeProperty("left")}captureActiveElement(){this._activeElement=y(this._component.ownerDocument),this._activeElement&&this._activeElement.blur()}tryRestoreActiveElement(){this._activeElement&&(this._activeElement.isConnected&&this._activeElement.focus(),this._activeElement=void 0)}};var B='<template><div class="forge-dialog" part="root"><forge-backdrop part="scrim"></forge-backdrop><div class="forge-dialog__surface" part="surface"><slot></slot></div></div></template>',R='.forge-dialog{position:fixed;top:0;bottom:0;left:0;right:0;z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-dialog-align-items,center);align-items:var(--forge-dialog-align-items,center);top:0;top:var(--forge-dialog-top,0);padding:24px;padding:var(--forge-dialog-padding,24px);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;visibility:hidden}@media (max-width:599px){.forge-dialog{padding:0}}.forge-dialog--moveable:not(.forge-dialog--fullscreen) ::slotted([forge-dialog-move-target]){cursor:move}.forge-dialog--animating{visibility:visible}.forge-dialog--animating .forge-dialog--open .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--animating .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--scrollable .forge-dialog__footer,.forge-dialog--scrollable .forge-dialog__title{border-color:rgba(0,0,0,.12)}.forge-dialog--open{visibility:visible!important}.forge-dialog--open .forge-dialog__surface{-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-dialog__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);width:auto;width:var(--forge-dialog-width,auto);height:auto;height:var(--forge-dialog-height,auto);min-width:280px;min-width:var(--forge-dialog-min-width,280px);max-width:100%;max-width:var(--forge-dialog-max-width,100%);max-height:100%;max-height:var(--forge-dialog-max-height,100%);border-radius:4px;border-radius:var(--forge-dialog-border-radius,var(--mdc-shape-medium,4px));display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:scale(.8);transform:scale(.8);opacity:0;overflow:hidden;z-index:inherit}.forge-dialog__header{margin:0;padding:0 24px 9px;border-bottom:1px solid transparent}.forge-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.25rem;font-size:var(--forge-typography-title-font-size, 1.25rem);line-height:2rem;line-height:var(--forge-typography-title-line-height, 2rem);font-weight:400;font-weight:var(--forge-typography-title-font-weight,400);letter-spacing:.0125em;letter-spacing:var(--forge-typography-title-letter-spacing, .0125em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-title-text-decoration,inherit);text-decoration:var(--forge-typography-title-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-title-text-transform,inherit);-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.forge-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.forge-dialog__body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);padding-top:20px;padding:0 24px 24px;overflow:auto}.forge-dialog__body--scrollable{max-height:195px;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);overflow-x:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch}.forge-dialog__footer{display:-webkit-box;display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.forge-dialog--fullscreen{padding:0}.forge-dialog--fullscreen .forge-dialog__surface{height:100%;width:100%;min-width:auto;max-width:100%;border-radius:0}:host{display:block}:host([hidden]){display:none}',s=class extends A{constructor(){super();x(this,B,R),this._foundation=new g(new b(this))}static get observedAttributes(){return[i.attributes.BACKDROP_CLOSE,i.attributes.ESCAPE_CLOSE,i.attributes.OPEN,i.attributes.FULLSCREEN,i.attributes.POSITION_TYPE,i.attributes.POSITION_X,i.attributes.POSITION_Y,i.attributes.MOVEABLE,i.attributes.MOVE_TARGET]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(t,o,a){switch(t){case i.attributes.BACKDROP_CLOSE:this.backdropClose=a==="true";break;case i.attributes.ESCAPE_CLOSE:this.escapeClose=a==="true";break;case i.attributes.OPEN:this.open=p(a);break;case i.attributes.FULLSCREEN:this.fullscreen=p(a);break;case i.attributes.POSITION_TYPE:this.positionType=a;break;case i.attributes.POSITION_X:this.positionX=a;break;case i.attributes.POSITION_Y:this.positionY=a;break;case i.attributes.MOVEABLE:this.moveable=p(a);break;case i.attributes.MOVE_TARGET:this.moveTarget=a;break}}initializeMoveTarget(){this._foundation.initializeMoveTarget()}resetPosition(){this._foundation.resetPosition()}};r([n()],s.prototype,"backdropClose",2),r([n()],s.prototype,"escapeClose",2),r([n()],s.prototype,"open",2),r([n()],s.prototype,"fullscreen",2),r([n()],s.prototype,"openCallback",2),r([n()],s.prototype,"closeCallback",2),r([n()],s.prototype,"beforeCloseCallback",2),r([n()],s.prototype,"positionType",2),r([n()],s.prototype,"positionX",2),r([n()],s.prototype,"positionY",2),r([n()],s.prototype,"moveable",2),r([n()],s.prototype,"moveTarget",2),s=r([M({name:i.elementName,dependencies:[S]})],s);function _e(){D(s)}export{i as a,g as b,b as c,s as d,_e as e};
|
|
7
|
-
//# sourceMappingURL=chunk.ITXUKOKJ.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/dialog/dialog-constants.ts", "../../src/dialog/dialog-foundation.ts", "../../src/dialog/dialog-adapter.ts", "../../src/dialog/dialog.ts", "../../src/dialog/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\nimport { BACKDROP_CONSTANTS } from '../backdrop';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}dialog`;\n\nconst classes = {\n ANIMATING: 'forge-dialog--animating',\n OPEN: 'forge-dialog--open',\n ACTION_BUTTON: 'forge-dialog__action__button',\n BUTTON_TEXT: 'forge-button__text',\n SCROLLABLE: 'forge-dialog--scrollable',\n FULLSCREEN: 'forge-dialog--fullscreen',\n MOVEABLE: 'forge-dialog--moveable'\n};\n\nconst attributes = {\n BACKDROP_CLOSE: 'backdrop-close',\n ESCAPE_CLOSE: 'escape-close',\n FULLSCREEN: 'fullscreen',\n POSITION_TYPE: 'position-type',\n POSITION_X: 'position-x',\n POSITION_Y: 'position-y',\n MOVEABLE: 'moveable',\n MOVE_TARGET: 'move-target',\n OPEN: 'forge-dialog-open',\n INITIAL_FOCUS: 'forge-dialog-focus',\n DFEAULT_MOVE_TARGET: 'forge-dialog-move-target'\n};\n\nconst selectors = {\n CONTAINER: '.forge-dialog',\n SURFACE: '.forge-dialog__surface',\n BACKDROP: BACKDROP_CONSTANTS.elementName,\n INITIAL_FOCUS: `[${attributes.INITIAL_FOCUS}]`,\n DFEAULT_MOVE_TARGET: `[${attributes.DFEAULT_MOVE_TARGET}]`,\n CONTENT: '.forge-dialog__body'\n};\n\nconst events = {\n BEFORE_CLOSE: `${elementName}-before-close`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n READY: `${elementName}-ready`,\n MOVE_START: `${elementName}-move-start`,\n MOVED: `${elementName}-move`,\n MOVE_END: `${elementName}-move-end`\n};\n\nconst numbers = {\n ANIMATION_DURATION: 150,\n BACKDROP_MAX_OPACITY: 0.3\n};\n\nexport const DIALOG_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events,\n numbers\n};\n\nexport interface IDialogMoveEventData {\n x: number;\n y: number;\n}\n\nexport interface IDialogMoveContext {\n top: number;\n left: number;\n height: number;\n width: number;\n}\n\nexport interface IDialogMoveStartEventData extends IDialogMoveEventData {}\n\nexport type DialogPositionType = 'absolute' | 'relative';\nexport type DialogStateCallback = () => boolean | void | Promise<boolean | void>;\n", "import { ICustomElementFoundation, isDefined, isNumber, isString } from '@tylertech/forge-core';\nimport { IDialogAdapter } from './dialog-adapter';\nimport { DialogPositionType, DialogStateCallback, DIALOG_CONSTANTS, IDialogMoveContext, IDialogMoveStartEventData } from './dialog-constants';\n\nexport interface IDialogFoundation extends ICustomElementFoundation {\n backdropClose: boolean;\n escapeClose: boolean;\n open: boolean;\n fullscreen: boolean;\n openCallback: DialogStateCallback;\n closeCallback: DialogStateCallback;\n beforeCloseCallback: DialogStateCallback;\n positionType: DialogPositionType;\n positionX: number | string | null | undefined;\n positionY: number | string | null | undefined;\n moveable: boolean;\n moveTarget: string;\n initializeMoveTarget(): void;\n resetPosition(): void;\n}\n\nexport class DialogFoundation implements IDialogFoundation {\n // Private vars\n private _open = false;\n private _backdropClose = true;\n private _escapeClose = true;\n private _fullscreen = false;\n private _openCallback: DialogStateCallback;\n private _closeCallback: DialogStateCallback;\n private _beforeCloseCallback: DialogStateCallback;\n private _positionType: DialogPositionType = 'absolute';\n private _positionX: string | null = null;\n private _positionY: string | null = null;\n private _moveable = false;\n private _moveTarget = DIALOG_CONSTANTS.selectors.DFEAULT_MOVE_TARGET;\n private _isAnimating = false;\n private _isMoving = false;\n private _moveContext: IDialogMoveContext | undefined;\n private _lastPosition: { x: number; y: number } | undefined;\n\n // Event handlers\n private _transitionEndHandler: (evt: TransitionEvent) => void;\n private _documentKeydownHandler: (evt: KeyboardEvent) => void;\n private _backdropClickHandler: (evt: CustomEvent) => void;\n private _moveTargetMouseDownHandler: (evt: MouseEvent) => void;\n private _moveTargetMouseMoveHandler: (evt: MouseEvent) => void;\n private _moveTargetMouseUpHandler: (evt: MouseEvent) => void;\n\n // Event handler states\n private _attachedDocumentKeydownHandler = false;\n private _attachedBackdropClickHandler = false;\n\n constructor(public _adapter: IDialogAdapter) {\n this._transitionEndHandler = (evt: TransitionEvent) => this._onTransitionEnd();\n this._documentKeydownHandler = (evt: KeyboardEvent) => this._onDocumentKeydown(evt);\n this._backdropClickHandler = (evt: CustomEvent) => this._onBackdropClick(evt);\n this._moveTargetMouseDownHandler = (evt: MouseEvent) => this._onMoveTargetMouseDown(evt);\n this._moveTargetMouseMoveHandler = (evt: MouseEvent) => this._onMoveTargetMouseMove(evt);\n this._moveTargetMouseUpHandler = (evt: MouseEvent) => this._onMoveTargetMouseUp(evt);\n }\n\n public initialize(): void {\n this._adapter.initializeAccessibility();\n if (this._open) {\n if (this._moveable) {\n this._adapter.setMoveable(this._moveable);\n this._initMoveTarget();\n }\n }\n }\n\n public destroy(): void {\n if (this._open) {\n this._removeDragHandlers();\n this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);\n if (this._attachedDocumentKeydownHandler) {\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n }\n if (this._attachedBackdropClickHandler) {\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n }\n }\n\n private async _applyOpen(value: boolean): Promise<void> {\n if (value) {\n if (typeof this._openCallback === 'function' && !await this._executeOpenCallback()) {\n return;\n }\n this._open = value;\n this._openDialog();\n } else {\n if (typeof this._closeCallback === 'function' && !await this._executeCloseCallback()) {\n return;\n }\n this._open = value;\n this._closeDialog();\n }\n \n this._adapter.toggleHostAttribute(DIALOG_CONSTANTS.attributes.OPEN, this._open);\n }\n\n private async _executeOpenCallback(): Promise<boolean> {\n try {\n return await Promise.resolve(this._openCallback()) !== false;\n } catch (e) {\n return false;\n }\n }\n\n private async _executeCloseCallback(): Promise<boolean> {\n try {\n return await Promise.resolve(this._closeCallback()) !== false;\n } catch (e) {\n return false;\n }\n }\n\n public initializeMoveTarget(): void {\n if (!this._moveTarget) {\n this._moveTarget = DIALOG_CONSTANTS.selectors.DFEAULT_MOVE_TARGET;\n }\n this._initMoveTarget();\n }\n\n public resetPosition(): void {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n\n private _normalizePositionValue(value: number | string | null | undefined): string | null {\n if (isNumber(value)) {\n return `${value}px`;\n } else if (isString(value)) {\n return value;\n }\n return null;\n }\n\n private _openDialog(): void {\n this._adapter.attach();\n\n if (!this._fullscreen) {\n if (this._moveable) {\n this._adapter.setMoveable(this._moveable);\n }\n if (this._positionX != null || this._positionY != null) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n\n this._adapter.setBodyAttribute(DIALOG_CONSTANTS.attributes.OPEN, 'true');\n this._adapter.registerTransitionEndHandler(this._transitionEndHandler);\n this._setDocumentKeydownListener(this._escapeClose);\n this._setBackdropClickListener(this._backdropClose);\n this._adapter.setAnimating(true);\n this._isAnimating = true;\n\n // Ensure transitions are triggered properly\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n this._adapter.setVisibility(true);\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.OPEN);\n this._adapter.trySetInitialFocus();\n if (this._adapter.isScrollable()) {\n this._adapter.addRootClass(DIALOG_CONSTANTS.classes.SCROLLABLE);\n }\n });\n });\n\n // Wait for the dialog to finish animating open, then emit the ready event and attach any listeners\n setTimeout(() => {\n window.requestAnimationFrame(() => {\n if (this._open && this._isAnimating) {\n this._onTransitionEnd();\n }\n });\n }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);\n }\n\n private _closeDialog(): void {\n if (this._moveTarget) {\n this._removeDragHandlers();\n }\n\n this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);\n if (this._attachedDocumentKeydownHandler) {\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n }\n if (this._attachedBackdropClickHandler) {\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n\n this._isAnimating = false;\n this._adapter.setAnimating(true);\n this._adapter.setVisibility(false);\n\n setTimeout(() => {\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.CLOSE);\n this._adapter.detach();\n const openDialogs = this._adapter.getOpenDialogs(DIALOG_CONSTANTS.elementName);\n if (!openDialogs.length) {\n this._adapter.removeBodyAttribute(DIALOG_CONSTANTS.attributes.OPEN);\n }\n }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);\n }\n\n private _onTransitionEnd(): void {\n if (!this._isAnimating) {\n return;\n }\n\n this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);\n this._adapter.setAnimating(false);\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.READY);\n\n if (this._moveable) {\n this._initMoveTarget();\n }\n \n this._isAnimating = false;\n }\n\n private _initMoveTarget(): void {\n if (!this._fullscreen && this._moveable && this._moveTarget && this._adapter.setMoveTarget(this._moveTarget)) {\n this._adapter.setMoveTargetHandler('mousedown', this._moveTargetMouseDownHandler);\n }\n }\n\n private _removeDragHandlers(): void {\n this._adapter.removeDragTargetHandler('mousedown', this._moveTargetMouseDownHandler);\n this._adapter.removeDocumentListener('mousemove', this._moveTargetMouseMoveHandler);\n this._adapter.removeDocumentListener('mouseup', this._moveTargetMouseUpHandler);\n }\n\n private _onMoveTargetMouseDown(evt: MouseEvent): void {\n evt.preventDefault();\n this._adapter.captureActiveElement();\n const bounds = this._adapter.getSurfaceBounds();\n this._moveContext = {\n top: evt.pageY - bounds.top,\n left: evt.pageX - bounds.left,\n height: bounds.height,\n width: bounds.width\n };\n this._adapter.setDocumentListener('mousemove', this._moveTargetMouseMoveHandler);\n this._adapter.setDocumentListener('mouseup', this._moveTargetMouseUpHandler);\n }\n\n private _onMoveTargetMouseMove(evt: MouseEvent): void {\n evt.preventDefault();\n const position = this._calculateOffsetPosition(evt.pageX, evt.pageY, this._moveContext);\n\n // If this is the beginning of the move sequence, we emit the start event (to allow for preventing default) and\n // then update the surface position if not prevented\n if (!this._isMoving) {\n this._isMoving = true;\n const canDrag = this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.MOVE_START, position as IDialogMoveStartEventData, true, true);\n if (!canDrag) {\n return;\n }\n }\n\n // Ensure that the surface position stays within the bounds of the screen\n const newPosition = this._clampPosition(position, this._moveContext);\n\n // Only update the position if it actually changed\n if (!this._lastPosition || newPosition.x !== this._lastPosition.x || newPosition.y !== this._lastPosition.y) {\n const canMove = this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.MOVED, newPosition as IDialogMoveStartEventData, true, true);\n if (canMove) {\n this._lastPosition = { ...newPosition };\n const newX = this._normalizePositionValue(newPosition.x);\n const newY = this._normalizePositionValue(newPosition.y);\n this._adapter.setSurfacePosition(newX, newY, 'absolute');\n }\n }\n }\n\n private _onMoveTargetMouseUp(evt: MouseEvent): void {\n if (this._isMoving) {\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.MOVE_END);\n }\n this._moveComplete();\n }\n\n private _moveComplete(): void {\n this._adapter.tryRestoreActiveElement();\n this._adapter.removeDocumentListener('mousemove', this._moveTargetMouseMoveHandler);\n this._adapter.removeDocumentListener('mouseup', this._moveTargetMouseUpHandler);\n this._lastPosition = undefined;\n this._moveContext = undefined;\n this._isMoving = false;\n }\n\n private _onDocumentKeydown(evt: KeyboardEvent): void {\n evt.stopPropagation();\n if (evt.key && (evt.key === 'Escape' || evt.key === 'Esc')) {\n this._tryClose();\n }\n }\n\n private _onBackdropClick(evt: CustomEvent): void {\n evt.stopPropagation();\n this._tryClose();\n }\n\n private async _tryClose(): Promise<void> {\n const isCancelled = !this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.BEFORE_CLOSE, undefined, undefined, true);\n if (isCancelled) {\n return;\n }\n\n if (!this._beforeCloseCallback) {\n this.open = false;\n return;\n }\n\n try {\n const shouldClose = await Promise.resolve(this._beforeCloseCallback()) !== false;\n if (shouldClose) {\n this.open = false;\n return;\n }\n } catch (err) {\n return;\n }\n }\n\n private _setBackdropClickListener(attach: boolean): void {\n if (!this._open) {\n return;\n }\n\n if (attach && !this._attachedBackdropClickHandler) {\n this._adapter.registerBackdropClickHandler(this._backdropClickHandler);\n this._attachedBackdropClickHandler = true;\n } else if (!attach && this._attachedBackdropClickHandler) {\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n this._attachedBackdropClickHandler = false;\n }\n }\n\n private _setDocumentKeydownListener(attach: boolean): void {\n if (!this._open) {\n return;\n }\n\n if (attach && !this._attachedDocumentKeydownHandler) {\n this._adapter.setDocumentListener('keydown', this._documentKeydownHandler);\n this._attachedDocumentKeydownHandler = true;\n } else if (!attach && this._attachedDocumentKeydownHandler) {\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n this._attachedDocumentKeydownHandler = false;\n }\n }\n\n private _calculateOffsetPosition(pageX: number, pageY: number, context?: IDialogMoveContext): { x: number; y: number } {\n return {\n x: pageX - (context?.left || 0),\n y: pageY - (context?.top || 0)\n };\n }\n\n private _clampPosition({ x, y }: { x: number; y: number }, context?: IDialogMoveContext): { x: number; y: number } {\n let width = 0;\n let height = 0;\n\n if (context) {\n width = context.width;\n height = context.height;\n }\n\n if (x <= 0) {\n x = 0;\n } else if (x + width >= window.innerWidth) {\n x = window.innerWidth - width;\n }\n\n if (y <= 0) {\n y = 0;\n } else if (y + height >= window.innerHeight) {\n y = window.innerHeight - height;\n }\n\n return { x, y };\n }\n\n /** Controls whether clicking the backdrop closes the dialog or not. */\n public set backdropClose(value: boolean) {\n value = Boolean(value);\n if (this._backdropClose !== value) {\n this._backdropClose = value;\n\n this._setBackdropClickListener(this._backdropClose);\n\n if (isDefined(this._backdropClose)) {\n this._adapter.setHostAttribute(DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE, this._backdropClose.toString());\n } else {\n this._adapter.removeHostAttribute(DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE);\n }\n }\n }\n public get backdropClose(): boolean {\n return this._backdropClose;\n }\n\n /** Controls whether pressing the escape key closes the dialog or not. */\n public set escapeClose(value: boolean) {\n value = Boolean(value);\n if (this._escapeClose !== value) {\n this._escapeClose = value;\n this._setDocumentKeydownListener(this._escapeClose);\n if (isDefined(this._escapeClose)) {\n this._adapter.setHostAttribute(DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE, this._escapeClose.toString());\n } else {\n this._adapter.removeHostAttribute(DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE);\n }\n }\n }\n public get escapeClose(): boolean {\n return this._escapeClose;\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n if (this._open !== value) {\n value = Boolean(value);\n if (value !== this._open) {\n this._applyOpen(value);\n }\n }\n }\n\n public get fullscreen(): boolean {\n return this._fullscreen;\n }\n public set fullscreen(value: boolean) {\n if (this._fullscreen !== value) {\n this._fullscreen = !!value;\n this._adapter.setFullscreen(this._fullscreen);\n this._adapter.setHostAttribute(DIALOG_CONSTANTS.attributes.FULLSCREEN, String(this._fullscreen));\n }\n }\n\n public get openCallback(): DialogStateCallback {\n return this._openCallback;\n }\n public set openCallback(callback: DialogStateCallback) {\n this._openCallback = callback;\n }\n\n public get closeCallback(): DialogStateCallback {\n return this._closeCallback;\n }\n public set closeCallback(callback: DialogStateCallback) {\n this._closeCallback = callback;\n }\n\n public get beforeCloseCallback(): DialogStateCallback {\n return this._beforeCloseCallback;\n }\n public set beforeCloseCallback(callback: DialogStateCallback) {\n this._beforeCloseCallback = callback;\n }\n\n public get positionType(): DialogPositionType {\n return this._positionType;\n }\n public set positionType(value: DialogPositionType) {\n if (this._positionType !== value) {\n this._positionType = value;\n if (this._open) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n }\n\n public get positionX(): number | string | null | undefined {\n return this._positionX;\n }\n public set positionX(value: number | string | null | undefined) {\n if (this._positionX !== value) {\n this._positionX = this._normalizePositionValue(value);\n if (this._open) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n }\n\n public get positionY(): number | string | null | undefined {\n return this._positionY;\n }\n public set positionY(value: number | string | null | undefined) {\n if (this._positionY !== value) {\n this._positionY = this._normalizePositionValue(value);\n if (this._open) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n }\n\n public get moveable(): boolean {\n return this._moveable;\n }\n public set moveable(value: boolean) {\n if (this._moveable !== value) {\n this._moveable = value;\n if (this._open) {\n this._adapter.setMoveable(this._moveable);\n if (this._moveable) {\n this._initMoveTarget();\n } else {\n this._removeDragHandlers();\n this._isMoving = false;\n }\n }\n }\n }\n\n public get moveTarget(): string {\n return this._moveTarget;\n }\n public set moveTarget(value: string) {\n this._moveTarget = value;\n }\n}\n", "import { deepQuerySelectorAll, getActiveElement, getShadowElement, removeElement, toggleClass } from '@tylertech/forge-core';\nimport { BACKDROP_CONSTANTS, IBackdropComponent } from '../backdrop';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IDialogComponent } from './dialog';\nimport { DialogPositionType, DIALOG_CONSTANTS } from './dialog-constants';\n\nexport interface IDialogAdapter extends IBaseAdapter {\n initializeAccessibility(): void;\n setAnimating(animating: boolean): void;\n setVisibility(visible: boolean): void;\n attach(): void;\n detach(): void;\n setDocumentListener(type: string, listener: (evt: Event) => void): void;\n removeDocumentListener(type: string, listener: (evt: Event) => void): void;\n registerTransitionEndHandler: (handler: (evt: TransitionEvent) => void) => void;\n deregisterTransitionEndHandler: (handler: (evt: TransitionEvent) => void) => void;\n registerBackdropClickHandler: (handler: (evt: CustomEvent) => void) => void;\n deregisterBackdropClickHandler: (handler: (evt: CustomEvent) => void) => void;\n getOpenDialogs: (selector: string) => NodeListOf<HTMLElement>;\n setBodyAttribute: (name: string, value: string) => void;\n removeBodyAttribute: (name: string) => void;\n trySetInitialFocus: () => void;\n isScrollable(): boolean;\n addRootClass(name: string): void;\n setFullscreen(value: boolean): void;\n setMoveable(value: boolean): void;\n setMoveTarget(selector: string): boolean;\n setMoveTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;\n removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;\n getSurfaceBounds(): DOMRect;\n setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType): void;\n captureActiveElement(): void;\n tryRestoreActiveElement(): void;\n}\n\n/**\n * Provides facilities for interacting with the internal DOM of `DialogComponent`.\n */\nexport class DialogAdapter extends BaseAdapter<IDialogComponent> implements IDialogAdapter {\n private _backdropElement: IBackdropComponent;\n private _containerElement: HTMLElement;\n private _surfaceElement: HTMLElement;\n private _moveTargetElement: HTMLElement | null;\n private _activeElement: HTMLElement | undefined;\n\n constructor(component: IDialogComponent) {\n super(component);\n this._backdropElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.BACKDROP) as IBackdropComponent;\n this._containerElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.CONTAINER);\n this._surfaceElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.SURFACE);\n }\n\n public initializeAccessibility(): void {\n if (!this._component.hasAttribute('role')) {\n this._component.setAttribute('role', 'dialog');\n }\n this._component.setAttribute('aria-modal', 'true');\n }\n\n public setAnimating(animating: boolean): void {\n if (animating) {\n this._containerElement.classList.add(DIALOG_CONSTANTS.classes.ANIMATING);\n } else {\n this._containerElement.classList.remove(DIALOG_CONSTANTS.classes.ANIMATING);\n }\n }\n\n public setVisibility(visible: boolean): void {\n if (visible) {\n this._containerElement.classList.add(DIALOG_CONSTANTS.classes.OPEN);\n } else {\n this._containerElement.classList.remove(DIALOG_CONSTANTS.classes.OPEN);\n }\n }\n\n public attach(): void {\n document.body.appendChild(this._component);\n }\n\n public detach(): void {\n if (this._activeElement) {\n this._activeElement = undefined;\n }\n removeElement(this._component);\n }\n\n public registerTransitionEndHandler(handler: (evt: TransitionEvent) => void): void {\n this._surfaceElement.addEventListener('transitionend', handler);\n }\n\n public deregisterTransitionEndHandler(handler: (evt: TransitionEvent) => void): void {\n this._surfaceElement.removeEventListener('transitionend', handler);\n }\n\n public setDocumentListener(type: string, listener: (evt: Event) => void): void {\n document.addEventListener(type, listener);\n }\n\n public removeDocumentListener(type: string, listener: (evt: Event) => void): void {\n document.removeEventListener(type, listener);\n }\n\n public registerBackdropClickHandler(handler: (evt: CustomEvent) => void): void {\n this._backdropElement.addEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);\n }\n\n public deregisterBackdropClickHandler(handler: (evt: CustomEvent) => void): void {\n this._backdropElement.removeEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);\n }\n\n public getOpenDialogs(selector: string): NodeListOf<HTMLElement> {\n return document.querySelectorAll(selector);\n }\n\n public setBodyAttribute(name: string, value: string): void {\n document.body.setAttribute(name, value);\n }\n\n public removeBodyAttribute(name: string): void {\n document.body.removeAttribute(name);\n }\n\n public trySetInitialFocus(): void {\n const elements = deepQuerySelectorAll(this._component, DIALOG_CONSTANTS.selectors.INITIAL_FOCUS);\n if (elements && elements.length) {\n const initialElement = elements[elements.length - 1] as HTMLElement;\n initialElement.focus();\n }\n }\n\n public isScrollable(): boolean {\n const contentElement = this._component.querySelector(DIALOG_CONSTANTS.selectors.CONTENT) as HTMLElement;\n if (contentElement) {\n return contentElement.scrollHeight > contentElement.offsetHeight;\n }\n return false;\n }\n\n public addRootClass(name: string): void {\n this._component.classList.add(name);\n }\n\n public setFullscreen(value: boolean): void {\n if (value) {\n this._containerElement.classList.add(DIALOG_CONSTANTS.classes.FULLSCREEN);\n } else {\n this._containerElement.classList.remove(DIALOG_CONSTANTS.classes.FULLSCREEN);\n }\n }\n\n public setMoveable(value: boolean): void {\n toggleClass(this._containerElement, value, DIALOG_CONSTANTS.classes.MOVEABLE);\n }\n\n public setMoveTarget(selector: string): boolean {\n if (!selector) {\n return false;\n }\n this._moveTargetElement = this._component.querySelector(selector);\n return !!this._moveTargetElement;\n }\n\n public setMoveTargetHandler(type: string, listener: (evt: MouseEvent) => void): void {\n if (this._moveTargetElement) {\n this._moveTargetElement.addEventListener(type, listener);\n }\n }\n\n public removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void {\n if (this._moveTargetElement) {\n this._moveTargetElement.removeEventListener(type, listener);\n }\n }\n\n public getSurfaceBounds(): DOMRect {\n return this._surfaceElement.getBoundingClientRect() as DOMRect;\n }\n\n public setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType): void {\n this._surfaceElement.style.position = positionType === 'absolute' ? positionType : 'relative';\n if (y != null) {\n this._surfaceElement.style.top = y;\n } else {\n this._surfaceElement.style.removeProperty('top');\n }\n if (x != null) {\n this._surfaceElement.style.left = x;\n } else {\n this._surfaceElement.style.removeProperty('left');\n }\n }\n\n public captureActiveElement(): void {\n this._activeElement = getActiveElement(this._component.ownerDocument) as HTMLElement;\n if (this._activeElement) {\n this._activeElement.blur();\n }\n }\n\n public tryRestoreActiveElement(): void {\n if (this._activeElement) {\n if (this._activeElement.isConnected) {\n this._activeElement.focus();\n }\n this._activeElement = undefined;\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\n\nimport { DialogFoundation } from './dialog-foundation';\nimport { DialogAdapter } from './dialog-adapter';\nimport { DIALOG_CONSTANTS, DialogPositionType, IDialogMoveStartEventData, IDialogMoveEventData, DialogStateCallback } from './dialog-constants';\nimport { BackdropComponent } from '../backdrop';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-dialog\\\" part=\\\"root\\\"><forge-backdrop part=\\\"scrim\\\"></forge-backdrop><div class=\\\"forge-dialog__surface\\\" part=\\\"surface\\\"><slot></slot></div></div></template>';\nconst styles = '.forge-dialog{position:fixed;top:0;bottom:0;left:0;right:0;z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-dialog-align-items,center);align-items:var(--forge-dialog-align-items,center);top:0;top:var(--forge-dialog-top,0);padding:24px;padding:var(--forge-dialog-padding,24px);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;visibility:hidden}@media (max-width:599px){.forge-dialog{padding:0}}.forge-dialog--moveable:not(.forge-dialog--fullscreen) ::slotted([forge-dialog-move-target]){cursor:move}.forge-dialog--animating{visibility:visible}.forge-dialog--animating .forge-dialog--open .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--animating .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--scrollable .forge-dialog__footer,.forge-dialog--scrollable .forge-dialog__title{border-color:rgba(0,0,0,.12)}.forge-dialog--open{visibility:visible!important}.forge-dialog--open .forge-dialog__surface{-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-dialog__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);width:auto;width:var(--forge-dialog-width,auto);height:auto;height:var(--forge-dialog-height,auto);min-width:280px;min-width:var(--forge-dialog-min-width,280px);max-width:100%;max-width:var(--forge-dialog-max-width,100%);max-height:100%;max-height:var(--forge-dialog-max-height,100%);border-radius:4px;border-radius:var(--forge-dialog-border-radius,var(--mdc-shape-medium,4px));display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:scale(.8);transform:scale(.8);opacity:0;overflow:hidden;z-index:inherit}.forge-dialog__header{margin:0;padding:0 24px 9px;border-bottom:1px solid transparent}.forge-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.25rem;font-size:var(--forge-typography-title-font-size, 1.25rem);line-height:2rem;line-height:var(--forge-typography-title-line-height, 2rem);font-weight:400;font-weight:var(--forge-typography-title-font-weight,400);letter-spacing:.0125em;letter-spacing:var(--forge-typography-title-letter-spacing, .0125em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-title-text-decoration,inherit);text-decoration:var(--forge-typography-title-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-title-text-transform,inherit);-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.forge-dialog__title::before{display:inline-block;width:0;height:40px;content:\\\"\\\";vertical-align:0}.forge-dialog__body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);padding-top:20px;padding:0 24px 24px;overflow:auto}.forge-dialog__body--scrollable{max-height:195px;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);overflow-x:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch}.forge-dialog__footer{display:-webkit-box;display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.forge-dialog--fullscreen{padding:0}.forge-dialog--fullscreen .forge-dialog__surface{height:100%;width:100%;min-width:auto;max-width:100%;border-radius:0}:host{display:block}:host([hidden]){display:none}';\n\nexport interface IDialogComponent extends IBaseComponent {\n backdropClose: boolean;\n escapeClose: boolean;\n open: boolean;\n fullscreen: boolean;\n openCallback: DialogStateCallback;\n closeCallback: DialogStateCallback;\n beforeCloseCallback: () => boolean | Promise<boolean>;\n positionType: DialogPositionType;\n positionX: number | string | null | undefined;\n positionY: number | string | null | undefined;\n moveable: boolean;\n moveTarget: string;\n initializeMoveTarget(): void;\n resetPosition(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-dialog': IDialogComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-dialog-before-close': CustomEvent<void>;\n 'forge-dialog-open': CustomEvent<void>;\n 'forge-dialog-close': CustomEvent<void>;\n 'forge-dialog-ready': CustomEvent<void>;\n 'forge-dialog-move-start': CustomEvent<IDialogMoveStartEventData>;\n 'forge-dialog-move': CustomEvent<IDialogMoveEventData>;\n 'forge-dialog-move-end': CustomEvent<void>;\n }\n}\n\n/**\n * The web component class behind the `<forge-dialog>` custom element.\n * \n * @tag forge-dialog\n */\n@CustomElement({\n name: DIALOG_CONSTANTS.elementName,\n dependencies: [BackdropComponent]\n})\nexport class DialogComponent extends BaseComponent implements IDialogComponent {\n public static get observedAttributes(): string[] {\n return [\n DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE,\n DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE,\n DIALOG_CONSTANTS.attributes.OPEN,\n DIALOG_CONSTANTS.attributes.FULLSCREEN,\n DIALOG_CONSTANTS.attributes.POSITION_TYPE,\n DIALOG_CONSTANTS.attributes.POSITION_X,\n DIALOG_CONSTANTS.attributes.POSITION_Y,\n DIALOG_CONSTANTS.attributes.MOVEABLE,\n DIALOG_CONSTANTS.attributes.MOVE_TARGET\n ];\n }\n\n private _foundation: DialogFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new DialogFoundation(new DialogAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.destroy();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE:\n this.backdropClose = newValue === 'true';\n break;\n case DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE:\n this.escapeClose = newValue === 'true';\n break;\n case DIALOG_CONSTANTS.attributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n case DIALOG_CONSTANTS.attributes.FULLSCREEN:\n this.fullscreen = coerceBoolean(newValue);\n break;\n case DIALOG_CONSTANTS.attributes.POSITION_TYPE:\n this.positionType = newValue as DialogPositionType;\n break;\n case DIALOG_CONSTANTS.attributes.POSITION_X:\n this.positionX = newValue;\n break;\n case DIALOG_CONSTANTS.attributes.POSITION_Y:\n this.positionY = newValue;\n break;\n case DIALOG_CONSTANTS.attributes.MOVEABLE:\n this.moveable = coerceBoolean(newValue);\n break;\n case DIALOG_CONSTANTS.attributes.MOVE_TARGET:\n this.moveTarget = newValue;\n break;\n }\n }\n\n /** Controls whether clicking the backdrop closes the dialog or not. Default is true. */\n @FoundationProperty()\n public declare backdropClose: boolean;\n\n /** Controls whether pressing the escape key closes the dialog or not. Default is true. */\n @FoundationProperty()\n public declare escapeClose: boolean;\n\n /** Controls whether the dialog is open or not. Default is false. */\n @FoundationProperty()\n public declare open: boolean;\n\n /** Controls whether the dialog is full screen or not. Default is false. */\n @FoundationProperty()\n public declare fullscreen: boolean;\n\n /** The function to call when the dialog wants to open. */\n @FoundationProperty()\n public declare openCallback: DialogStateCallback;\n\n /** the function to call when the dialog wants to close. */\n @FoundationProperty()\n public declare closeCallback: DialogStateCallback;\n\n /** the function to call when the dialog wants to close. */\n @FoundationProperty()\n public declare beforeCloseCallback: () => boolean | Promise<boolean>;\n\n /** Gets/sets the position type when using custom positioning values. Default is 'absolute'. */\n @FoundationProperty()\n public declare positionType: DialogPositionType;\n\n /** Controls the horizontal position of the dialog surface. */\n @FoundationProperty()\n public declare positionX: number | string | null | undefined;\n\n /** Controls the vertical position of the dialog surface. */\n @FoundationProperty()\n public declare positionY: number | string | null | undefined;\n\n /** Gets/sets whether the dialog surface can be moved or not. */\n @FoundationProperty()\n public declare moveable: boolean;\n\n /** Gets/sets the selector used to target the element that is used as the drag target. */\n @FoundationProperty()\n public declare moveTarget: string;\n\n public initializeMoveTarget(): void {\n this._foundation.initializeMoveTarget();\n }\n\n public resetPosition(): void {\n this._foundation.resetPosition();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { DialogComponent } from './dialog';\n\nexport * from './dialog-adapter';\nexport * from './dialog-constants';\nexport * from './dialog-foundation';\nexport * from './dialog';\n\nexport function defineDialogComponent(): void {\n defineCustomElement(DialogComponent);\n}\n"],
|
|
5
|
-
"mappings": "oZAGA,IAAMA,EAA2C,GAAGC,UAE9CC,EAAU,CACd,UAAW,0BACX,KAAM,qBACN,cAAe,+BACf,YAAa,qBACb,WAAY,2BACZ,WAAY,2BACZ,SAAU,wBACZ,EAEMC,EAAa,CACjB,eAAgB,iBAChB,aAAc,eACd,WAAY,aACZ,cAAe,gBACf,WAAY,aACZ,WAAY,aACZ,SAAU,WACV,YAAa,cACb,KAAM,oBACN,cAAe,qBACf,oBAAqB,0BACvB,EAEMC,EAAY,CAChB,UAAW,gBACX,QAAS,yBACT,SAAUC,EAAmB,YAC7B,cAAe,IAAIF,EAAW,iBAC9B,oBAAqB,IAAIA,EAAW,uBACpC,QAAS,qBACX,EAEMG,EAAS,CACb,aAAc,GAAGN,iBACjB,KAAM,GAAGA,SACT,MAAO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AA8B,CAC5CC,EAAoBC,CAAe,CACrC",
|
|
6
|
-
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "attributes", "selectors", "BACKDROP_CONSTANTS", "events", "numbers", "DIALOG_CONSTANTS", "DialogFoundation", "_adapter", "DIALOG_CONSTANTS", "evt", "value", "isNumber", "isString", "bounds", "position", "newPosition", "__spreadValues", "newX", "newY", "err", "attach", "pageX", "pageY", "context", "x", "y", "width", "height", "isDefined", "callback", "DialogAdapter", "BaseAdapter", "component", "getShadowElement", "DIALOG_CONSTANTS", "animating", "visible", "removeElement", "handler", "type", "listener", "BACKDROP_CONSTANTS", "selector", "name", "value", "elements", "deepQuerySelectorAll", "contentElement", "toggleClass", "x", "y", "positionType", "getActiveElement", "template", "styles", "DialogComponent", "BaseComponent", "attachShadowTemplate", "DialogFoundation", "DialogAdapter", "DIALOG_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "BackdropComponent", "defineDialogComponent", "defineCustomElement", "DialogComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as rt}from"./chunk.LIKJD4SK.js";import{d as at}from"./chunk.ITXUKOKJ.js";import{a as f,b as nt}from"./chunk.NMKDIHFB.js";import{h as st}from"./chunk.WOTVTBJS.js";import{c as et}from"./chunk.SXTM6OK4.js";import{e as tt}from"./chunk.DYF2MREZ.js";import{e as it}from"./chunk.3C44DXZ2.js";import{a as C,b as ot}from"./chunk.RLWX5BFQ.js";import{j as K}from"./chunk.MZLPUI6R.js";import{a as F}from"./chunk.YI4JTY4T.js";import{a as Q,d as Z,l as E}from"./chunk.IWICN773.js";import{a as $}from"./chunk.2KXSGD3S.js";import{g as J}from"./chunk.FVRSGKJD.js";import{j as b,k as X,n as G,o as q,p as Y,q as j}from"./chunk.U6WGJELL.js";import{a as W}from"./chunk.5KC43VFL.js";import{a as u}from"./chunk.KTGSZEAG.js";import{a as R,b as z}from"./chunk.QOA2O575.js";import{a as N,e as H,g as V,i as U,l as B}from"./chunk.HOXFK44F.js";import{m as A,s as P,u as x}from"./chunk.4LA6HEA7.js";import{a as D,k as m,l as y,o as L}from"./chunk.J2M2MXP2.js";import{a as w,f as p}from"./chunk.MCIQXNKY.js";var h=`${z}time-picker`,lt={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},ft={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${lt.TOGGLE}]`},gt={OPEN:`${h}-open`,CLOSE:`${h}-close`,INPUT:`${h}-input`,CHANGE:`${h}-change`},vt={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},s={elementName:h,attributes:lt,selectors:ft,events:gt,numbers:vt};var g=class extends W{constructor(e){super(e)}initialize(){this._inputElement=this._component.querySelector(s.selectors.INPUT)}initializeMask(e){this.destroyMask(),this._inputMask=new J(this._inputElement,e)}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=void 0}initializeAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false")}addInputListener(e,i,n){this._inputElement.addEventListener(e,i,{capture:n})}removeInputListener(e,i,n){this._inputElement&&this._inputElement.removeEventListener(e,i,{capture:n})}addToggleListener(e,i){this._toggleElement&&this._toggleElement.addEventListener(e,i)}removeToggleListener(e,i){this._toggleElement&&this._toggleElement.removeEventListener(e,i)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let e=this._component.querySelector(f.elementName),i=this._component.querySelector(s.selectors.TOGGLE);if(e){let n=e.querySelector(`${C.elementName}[slot=trailing]`);if(n||i){this._toggleElement=n||i;return}let a=document.createElement(C.elementName);a.slot="trailing",a.dense=!0,a.densityLevel=3,a.style.marginRight="4px";let r=document.createElement("button");r.type="button",r.tabIndex=-1,r.setAttribute("aria-label","Toggle time dropdown");let d=document.createElement(Q.elementName);d.name="clock_outline",r.appendChild(d),a.appendChild(r),e.appendChild(a),this._toggleElement=a}else i&&(this._toggleElement=i)}tryFocusInput(){this._inputElement.select()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return P(this._component.ownerDocument)===this._inputElement}setInputValue(e,i){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.update(),i&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this.setToggleDisabled(e)}attachDropdown(e){this._listDropdown=new st(this._inputElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`)}detachDropdown(){this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0),this._inputElement.removeAttribute("aria-controls")}propagateKey(e){var i;(i=this._listDropdown)==null||i.handleKey(e)}setActiveDescendant(e){x(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._getTargetElement(e).getBoundingClientRect().width}_emitInputEvent(e){this._inputElement.dispatchEvent(new Event(e))}emitInputEvent(e,i){U(this._inputElement,e,i)}setInputReadonly(e){this._inputElement.readOnly=e}setToggleDisabled(e){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",e.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=e;else{let i=this._toggleElement.querySelector("button");i&&(i.disabled=e)}}hasActiveOption(){var e,i;return((i=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?i:-1)>=0}activateOptionByIndex(e){var i;(i=this._listDropdown)==null||i.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}getActiveOption(){var e;return(e=this._listDropdown)==null?void 0:e.getActiveOption()}_getTargetElement(e){return this._targetElement?this._targetElement:(this._targetElement=e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){let e=this._component.querySelector(f.elementName);if(e&&e.shadowRoot){let i=V(e,f.selectors.ROOT);if(i)return i}return this._component}};function v(o,t,e){if(!o||/^\s*$/.test(o))return null;let i=0,n=0,a=0;if(b.test(o)){let r=G(o);i=+r.hours||0,n=+r.minutes||0,a=+r.seconds||0}else if(X.test(o)){let r=q(o);i=+r.hours||0,n=+r.minutes||0,a=+r.seconds||0,i===12&&r.meridiem==="AM"&&(i=0),i<12&&r.meridiem==="PM"&&(i+=12)}else return null;return dt(i)+T(n)+(e?O(a):0)}function c(o,t,e){if(typeof o!="number"||o<0)return null;let i=Math.min(pt(o),23),n=Math.min(ut(o),59),r=o/(1e3*60)<720?"AM":"PM";t||(i=i<=12?i:i-12,i===0&&(i=12));let d=`${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}`;if(e){let _=Math.min(M(o),59);d+=`:${String(_).padStart(2,"0")}`}return t||(d+=` ${r}`),d}function pt(o){return Math.abs(Math.floor(o/(1e3*60*60)))}function ut(o){return Math.abs(Math.floor(I(o)%60))}function I(o){return o/(1e3*60)}function M(o){return Math.abs(Math.floor(It(o)%60))}function It(o){return o/1e3}function dt(o){return o*60*60*1e3}function T(o){return o*60*1e3}function O(o){return o*1e3}function ct(o){return o-O(M(o))}function S(o){let t=new Date,e=t.getHours(),i=t.getMinutes();return dt(e)+T(i)+(o?O(t.getSeconds()):0)}function Rt(o,t,e=!1){o||(o=new Date);let i=v(t,!0,e);if(!i)return o.setHours(0,0,0),o;let n=pt(i),a=828e5;n>a?n=a:n<0&&(n=0);let r=ut(i),d=e?M(i):0;return o.setHours(n,r,d),o}var k=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=s.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=D(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown(),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,i;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown(!0));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((i=this._dropdownConfig)==null?void 0:i.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let n=S(this._allowSeconds);if(this._value!==n){let a=c(n,!0,this._allowSeconds);this._emitChangeEvent(a)&&(this._applyValue(n),this._selectInputText())}break}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown(!0):(F.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown(!0)}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:L(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown(!0)}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=c(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(ct(this._value)),this._isInitialized&&t!==this._value){let e=c(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown(!0),t=j(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let i;!this._masked&&typeof this._parseCallback=="function"?i=this._parseCallback.call(null,t):i=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),i=this._validateMillis(i),this._trySetValue(i)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(s.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=c(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(s.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,i=typeof this._max=="number"&&t>this._max;(e||i)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):Y(t)}_isValidInputValue(t){return b.test(t)}_onSelect(t){if(this._closeDropdown(!0),!t.isCustom&&t.metadata==="now"&&(t.time=S(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let n=t.customCallback.call(null,t.metadata);if(typeof n!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=n}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=c(t.time,!0,this._allowSeconds);!this._emitChangeEvent(e)||(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let i=this._formatValue(this._value);this._adapter.getInputValue()!==i&&this._adapter.setInputValue(i,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>s.numbers.MAX_DAY_MILLIS?s.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(s.attributes.OPEN);let e=t.filter(a=>!a.divider&&!a.disabled),i=[],n=0;if(t.length)if(this._value!=null){let a=this._findClosestOptionIndex(this._value,e);a>=0&&(e[a].value.time===this._value?i=[e[a].value]:n=a)}else if(typeof this._startTime=="number"){let a=this._findClosestOptionIndex(this._startTime,e);a>=0&&a<e.length&&(n=a)}else this._startTime==null&&(n=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,selectedValues:i,syncWidth:!0,visibleStartIndex:n,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:a=>this._onSelect(a),closeCallback:()=>this._closeDropdown(!0),activeChangeCallback:a=>this._adapter.setActiveDescendant(a),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(s.events.OPEN,void 0,!1)}_closeDropdown(t=!1){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(s.attributes.OPEN),this._adapter.detachDropdown(),t&&this._adapter.emitHostEvent(s.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,i=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,n=v(i,!0,!1);return this._findClosestOptionIndex(n,t)}_findClosestOptionIndex(t,e){let i=e.reduce((n,a)=>Math.abs((a.value.time||0)-t)<Math.abs((n.value.time||0)-t)?a:n);return e.indexOf(i)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let i=this._formatValue(this._value);e!==i&&(this._adapter.setInputValue(i,t),this._adapter.emitInputEvent(s.events.INPUT,i))}_generateTimeOptions(){let t=this._min!=null?Math.max(I(this._min),0):0,e=this._max!=null?Math.min(I(this._max),s.numbers.MAX_DAY_MINUTES):s.numbers.MAX_DAY_MINUTES,i=this._step,n=[],a=[];if(this._showHourOptions){for(let d=t;d<=e&&d!==s.numbers.MAX_DAY_MINUTES;d+=i){let _=T(d),_t=this._restrictedTimes.includes(_),ht=c(_,this._use24HourTime,!1)||"",bt={time:_};n.push({label:ht,value:bt,disabled:_t})}let r=n.findIndex(d=>d.value.time/1e3/60>=720);r>=0&&r<n.length-1&&n.splice(r,0,{label:"",value:null,divider:!0})}if(this._showNow){let r={time:null,metadata:"now"};a.push({label:"Now",value:r})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let r=this._customOptions.map(d=>{let _={time:null,metadata:d.value,isCustom:!0,customCallback:d.toMilliseconds};return{label:d.label,value:_}});a=[...a,...r]}return a.length&&(n.length&&n.splice(0,0,{label:"",value:null,divider:!0}),a.forEach((r,d)=>n.splice(d,0,r))),n}_convertTimeStringToMillis(t,e,i){return(!t||!this._isValidTimeFormat(t))&&(t=""),v(t,e,i)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):c(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(s.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return c(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return c(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return c(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>c(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return c(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(s.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var Tt="<template><slot></slot></template>",kt=":host{display:block}:host([hidden]){display:none}",l=class extends B{constructor(){super();Z.define([rt,K]),H(this,Tt,kt),this._foundation=new k(new g(this))}static get observedAttributes(){return[s.attributes.VALUE,s.attributes.OPEN,s.attributes.ALLOW_SECONDS,s.attributes.MASKED,s.attributes.SHOW_MASK_FORMAT,s.attributes.USE_24_HOUR_TIME,s.attributes.ALLOW_INVALID_TIME,s.attributes.MIN,s.attributes.MAX,s.attributes.START_TIME,s.attributes.STEP,s.attributes.ALLOW_INPUT,s.attributes.SHOW_NOW,s.attributes.SHOW_HOUR_OPTIONS,s.attributes.DISABLED,s.attributes.POPUP_CLASSES,s.attributes.ALLOW_DROPDOWN]}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():A(this,s.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,n){switch(e){case s.attributes.VALUE:this.value=n;break;case s.attributes.OPEN:this.open=m(n);break;case s.attributes.ALLOW_SECONDS:this.allowSeconds=m(n);break;case s.attributes.MASKED:this.masked=m(n);break;case s.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=m(n);break;case s.attributes.USE_24_HOUR_TIME:this.use24HourTime=m(n);break;case s.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=m(n);break;case s.attributes.SHOW_NOW:this.showNow=m(n);break;case s.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=m(n);break;case s.attributes.MIN:this.min=n;break;case s.attributes.MAX:this.max=n;break;case s.attributes.START_TIME:this.startTime=n;break;case s.attributes.STEP:this.step=y(n);break;case s.attributes.ALLOW_INPUT:this.allowInput=m(n);break;case s.attributes.DISABLED:this.disabled=m(n);break;case s.attributes.POPUP_CLASSES:this.popupClasses=n;break;case s.attributes.ALLOW_DROPDOWN:this.allowDropdown=m(n);break}}};p([u()],l.prototype,"value",2),p([u()],l.prototype,"open",2),p([u()],l.prototype,"allowSeconds",2),p([u()],l.prototype,"masked",2),p([u()],l.prototype,"showMaskFormat",2),p([u()],l.prototype,"use24HourTime",2),p([u()],l.prototype,"allowInvalidTime",2),p([u()],l.prototype,"min",2),p([u()],l.prototype,"max",2),p([u()],l.prototype,"restrictedTimes",2),p([u()],l.prototype,"startTime",2),p([u()],l.prototype,"step",2),p([u()],l.prototype,"allowInput",2),p([u()],l.prototype,"showNow",2),p([u()],l.prototype,"showHourOptions",2),p([u()],l.prototype,"customOptions",2),p([u()],l.prototype,"validationCallback",2),p([u()],l.prototype,"parseCallback",2),p([u()],l.prototype,"formatCallback",2),p([u()],l.prototype,"coercionCallback",2),p([u()],l.prototype,"prepareMaskCallback",2),p([u()],l.prototype,"disabled",2),p([u()],l.prototype,"popupClasses",2),p([u()],l.prototype,"allowDropdown",2),p([u()],l.prototype,"popupTarget",2),l=p([R({name:s.elementName,dependencies:[et,tt,ot,E,it,E,at]})],l);var mt=class extends ${constructor(e){super(e)}_build(){let e=document.createElement(s.elementName);return this._attachTextField(e),e}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(s.events.CHANGE,i=>{var n;return e((n=i.detail)!=null?n:"")})}onInput(e){this._element.addEventListener(s.events.INPUT,i=>{var n;return e((n=i.detail)!=null?n:"")})}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",i=>e(i))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",i=>e(i))}_attachTextField(e){var n,a,r,d;let i={props:w({},(a=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:a.props),options:w({},(d=(r=this._config.options)==null?void 0:r.textFieldDelegateConfig)==null?void 0:d.options)};this._textFieldDelegate=new nt(i),e.appendChild(this._textFieldDelegate.element)}};function xe(){N(l)}export{s as a,g as b,v as c,c as d,pt as e,ut as f,I as g,M as h,It as i,dt as j,T as k,O as l,ct as m,S as n,Rt as o,k as p,l as q,mt as r,xe as s};
|
|
7
|
-
//# sourceMappingURL=chunk.MXVJSEF3.js.map
|