@tylertech/forge 3.0.0-next.21 → 3.0.0-next.22
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 +33600 -39264
- package/dist/dialog/forge-dialog-utils.css +1 -1
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/app-bar/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/card/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.YS5JZHJ6.js → chunk.24SQJBSQ.js} +2 -2
- package/dist/esm/chunks/{chunk.PDDBNHVU.js → chunk.2GUWHBUU.js} +2 -2
- package/dist/esm/chunks/{chunk.PDDBNHVU.js.map → chunk.2GUWHBUU.js.map} +2 -2
- package/dist/esm/chunks/chunk.37B332ZK.js +7 -0
- package/dist/esm/chunks/{chunk.SOKORSUV.js.map → chunk.37B332ZK.js.map} +3 -3
- package/dist/esm/chunks/chunk.3IUQ4C47.js +7 -0
- package/dist/esm/chunks/chunk.3IUQ4C47.js.map +7 -0
- package/dist/esm/chunks/{chunk.IZRURH7C.js → chunk.3KAKJGUS.js} +2 -2
- package/dist/esm/chunks/chunk.3PMONORO.js +7 -0
- package/dist/esm/chunks/chunk.3PMONORO.js.map +7 -0
- package/dist/esm/chunks/chunk.473WRJ5G.js +7 -0
- package/dist/esm/chunks/chunk.5A665C5E.js +7 -0
- package/dist/esm/chunks/chunk.5A665C5E.js.map +7 -0
- package/dist/esm/chunks/chunk.5ADUSMC7.js +7 -0
- package/dist/esm/chunks/chunk.5ADUSMC7.js.map +7 -0
- package/dist/esm/chunks/{chunk.USQEIRST.js → chunk.5MB6CTBA.js} +2 -2
- package/dist/esm/chunks/chunk.5SUJNEC7.js +7 -0
- package/dist/esm/chunks/chunk.5SUJNEC7.js.map +7 -0
- package/dist/esm/chunks/{chunk.47U6GVGZ.js → chunk.5UOX22ML.js} +2 -2
- package/dist/esm/chunks/chunk.6E5WHIPF.js +7 -0
- package/dist/esm/chunks/chunk.6E5WHIPF.js.map +7 -0
- package/dist/esm/chunks/{chunk.4NABD6XG.js → chunk.6VS3LYAF.js} +2 -2
- package/dist/esm/chunks/chunk.72BKSMAZ.js +7 -0
- package/dist/esm/chunks/{chunk.3TIBP6QT.js.map → chunk.72BKSMAZ.js.map} +3 -3
- package/dist/esm/chunks/chunk.77C7S7ZS.js +7 -0
- package/dist/esm/chunks/chunk.77C7S7ZS.js.map +7 -0
- package/dist/esm/chunks/chunk.7AAICE77.js +7 -0
- package/dist/esm/chunks/chunk.7AAICE77.js.map +7 -0
- package/dist/esm/chunks/chunk.7IPAW4D2.js +7 -0
- package/dist/esm/chunks/{chunk.MCR34SZQ.js.map → chunk.7IPAW4D2.js.map} +1 -1
- package/dist/esm/chunks/chunk.7Y3BUR7Q.js +7 -0
- package/dist/esm/chunks/{chunk.3U222LE4.js.map → chunk.7Y3BUR7Q.js.map} +1 -1
- package/dist/esm/chunks/chunk.A2NB7CIK.js +7 -0
- package/dist/esm/chunks/chunk.A2NB7CIK.js.map +7 -0
- package/dist/esm/chunks/{chunk.AOSBUJWW.js → chunk.A7BCLPP4.js} +2 -2
- package/dist/esm/chunks/chunk.AFWWND2C.js +7 -0
- package/dist/esm/chunks/chunk.AFWWND2C.js.map +7 -0
- package/dist/esm/chunks/{chunk.7UBIT4NP.js → chunk.AG6IRMLZ.js} +2 -2
- package/dist/esm/chunks/{chunk.A4UH52SA.js → chunk.AGLI4WR4.js} +2 -2
- package/dist/esm/chunks/{chunk.WTUXAH7Z.js → chunk.AOVXNX7P.js} +2 -2
- package/dist/esm/chunks/{chunk.AN2E2SSN.js → chunk.ASLHRT3N.js} +2 -2
- package/dist/esm/chunks/chunk.BEFAXPXJ.js +15 -0
- package/dist/esm/chunks/{chunk.EO3HELQ2.js.map → chunk.BEFAXPXJ.js.map} +1 -1
- package/dist/esm/chunks/{chunk.CBLUXYH2.js → chunk.BHE6Z5Y2.js} +2 -2
- package/dist/esm/chunks/{chunk.2WRAXA3H.js → chunk.BQ52JYLA.js} +2 -2
- package/dist/esm/chunks/chunk.BQZKOIAW.js +7 -0
- package/dist/esm/chunks/chunk.BQZKOIAW.js.map +7 -0
- package/dist/esm/chunks/chunk.BV7EAQST.js +7 -0
- package/dist/esm/chunks/chunk.BV7EAQST.js.map +7 -0
- package/dist/esm/chunks/{chunk.ROMRJIFR.js → chunk.CE35CVDV.js} +2 -2
- package/dist/esm/chunks/{chunk.ZPXMKY72.js → chunk.CEGBMUSR.js} +2 -2
- package/dist/esm/chunks/{chunk.GBGGUYTE.js → chunk.CFAI4K3E.js} +2 -2
- package/dist/esm/chunks/{chunk.ZIGVO6FN.js → chunk.CGFSMACZ.js} +2 -2
- package/dist/esm/chunks/chunk.DJSHVUEM.js +18 -0
- package/dist/esm/chunks/{chunk.MGLWXAZO.js.map → chunk.DJSHVUEM.js.map} +4 -4
- package/dist/esm/chunks/chunk.DKERDHXH.js +7 -0
- package/dist/esm/chunks/{chunk.JVWJHSPM.js.map → chunk.DKERDHXH.js.map} +1 -1
- package/dist/esm/chunks/chunk.DZJ6HBAG.js +7 -0
- package/dist/esm/chunks/chunk.DZJ6HBAG.js.map +7 -0
- package/dist/esm/chunks/{chunk.2537XOFQ.js → chunk.E2BE52ME.js} +2 -2
- package/dist/esm/chunks/chunk.EHVCEEV2.js +7 -0
- package/dist/esm/chunks/chunk.EHVCEEV2.js.map +7 -0
- package/dist/esm/chunks/{chunk.UEYPCCFG.js → chunk.ENUKGA2U.js} +2 -2
- package/dist/esm/chunks/chunk.EO3GP6DP.js +7 -0
- package/dist/esm/chunks/chunk.EO3GP6DP.js.map +7 -0
- package/dist/esm/chunks/{chunk.XYBVD3IE.js → chunk.EUJBIOGT.js} +2 -2
- package/dist/esm/chunks/{chunk.XYBVD3IE.js.map → chunk.EUJBIOGT.js.map} +2 -2
- package/dist/esm/chunks/chunk.FLBYVCQ6.js +7 -0
- package/dist/esm/chunks/chunk.FLBYVCQ6.js.map +7 -0
- package/dist/esm/chunks/chunk.FLF5RTYO.js +7 -0
- package/dist/esm/chunks/chunk.FLF5RTYO.js.map +7 -0
- package/dist/esm/chunks/chunk.GBAVJILM.js +7 -0
- package/dist/esm/chunks/chunk.GBAVJILM.js.map +7 -0
- package/dist/esm/chunks/chunk.GG7IQL46.js +7 -0
- package/dist/esm/chunks/{chunk.HBAC6E7O.js.map → chunk.GG7IQL46.js.map} +1 -1
- package/dist/esm/chunks/chunk.GIENHEMN.js +7 -0
- package/dist/esm/chunks/chunk.GIENHEMN.js.map +7 -0
- package/dist/esm/chunks/{chunk.FOSKVNVV.js → chunk.H4VQXV2H.js} +2 -2
- package/dist/esm/chunks/{chunk.FOSKVNVV.js.map → chunk.H4VQXV2H.js.map} +2 -2
- package/dist/esm/chunks/{chunk.GA6AO6FJ.js → chunk.H5RW3A4M.js} +2 -2
- package/dist/esm/chunks/chunk.HG4IDRAC.js +7 -0
- package/dist/esm/chunks/chunk.HG4IDRAC.js.map +7 -0
- package/dist/esm/chunks/{chunk.CSOKFDFQ.js → chunk.HSADKCGS.js} +2 -2
- package/dist/esm/chunks/chunk.I7YON2TC.js +7 -0
- package/dist/esm/chunks/chunk.I7YON2TC.js.map +7 -0
- package/dist/esm/chunks/chunk.IEABOPNB.js +7 -0
- package/dist/esm/chunks/{chunk.22C7GQLX.js → chunk.IL4S57WO.js} +2 -2
- package/dist/esm/chunks/{chunk.HMJODLAS.js → chunk.IQYOLMPG.js} +2 -2
- package/dist/esm/chunks/chunk.ISLJNJEE.js +7 -0
- package/dist/esm/chunks/chunk.ISLJNJEE.js.map +7 -0
- package/dist/esm/chunks/{chunk.QG5EYBS3.js → chunk.J2Y5KPON.js} +2 -2
- package/dist/esm/chunks/{chunk.QG5EYBS3.js.map → chunk.J2Y5KPON.js.map} +2 -2
- package/dist/esm/chunks/{chunk.7IJUN75W.js → chunk.JE5LSPXG.js} +2 -2
- package/dist/esm/chunks/{chunk.7IJUN75W.js.map → chunk.JE5LSPXG.js.map} +3 -3
- package/dist/esm/chunks/{chunk.GTKYO6VB.js → chunk.JGURMVW7.js} +2 -2
- package/dist/esm/chunks/{chunk.YXHMD73U.js → chunk.K6GJNDTY.js} +2 -2
- package/dist/esm/chunks/{chunk.QUWEAFGI.js → chunk.KEOLH7G3.js} +2 -2
- package/dist/esm/chunks/chunk.KLU54MDQ.js +7 -0
- package/dist/esm/chunks/chunk.KLU54MDQ.js.map +7 -0
- package/dist/esm/chunks/chunk.KO6ODCZC.js +7 -0
- package/dist/esm/chunks/chunk.KO6ODCZC.js.map +7 -0
- package/dist/esm/chunks/chunk.KTPEFU7V.js +7 -0
- package/dist/esm/chunks/{chunk.5UGN5FYV.js.map → chunk.KTPEFU7V.js.map} +2 -2
- package/dist/esm/chunks/chunk.L4QSPQDE.js +7 -0
- package/dist/esm/chunks/{chunk.DCCFF327.js.map → chunk.L4QSPQDE.js.map} +2 -2
- package/dist/esm/chunks/chunk.LGSCBWNR.js +7 -0
- package/dist/esm/chunks/chunk.LGSCBWNR.js.map +7 -0
- package/dist/esm/chunks/{chunk.BIQTNLIF.js → chunk.LNTTU2GL.js} +2 -2
- package/dist/esm/chunks/chunk.LSMHIVX2.js +7 -0
- package/dist/esm/chunks/{chunk.V7ILFIOR.js.map → chunk.LSMHIVX2.js.map} +1 -1
- package/dist/esm/chunks/{chunk.2AM2BKEO.js → chunk.MFQRXVKO.js} +2 -2
- package/dist/esm/chunks/{chunk.JLSFTWPE.js → chunk.MTIPIEXA.js} +2 -2
- package/dist/esm/chunks/chunk.MX4JX4GT.js +7 -0
- package/dist/esm/chunks/{chunk.UOD3A7M4.js.map → chunk.MX4JX4GT.js.map} +1 -1
- package/dist/esm/chunks/chunk.NEQX2QVX.js +7 -0
- package/dist/esm/chunks/chunk.NEQX2QVX.js.map +7 -0
- package/dist/esm/chunks/chunk.NWVQ5HK2.js +7 -0
- package/dist/esm/chunks/{chunk.BETICEYY.js.map → chunk.NWVQ5HK2.js.map} +2 -2
- package/dist/esm/chunks/chunk.O5WAQQNR.js +7 -0
- package/dist/esm/chunks/{chunk.ZYKP23JP.js.map → chunk.O5WAQQNR.js.map} +2 -2
- package/dist/esm/chunks/{chunk.JSTCCUKZ.js → chunk.OEI35LFU.js} +2 -2
- package/dist/esm/chunks/{chunk.6GSVB5NB.js → chunk.OLFOVKQG.js} +2 -2
- package/dist/esm/chunks/chunk.OLFOVKQG.js.map +7 -0
- package/dist/esm/chunks/{chunk.IWVAI6XM.js → chunk.OOAJHLW4.js} +2 -2
- package/dist/esm/chunks/chunk.OOAJHLW4.js.map +7 -0
- package/dist/esm/chunks/chunk.OVXEOEJF.js +7 -0
- package/dist/esm/chunks/chunk.OVXEOEJF.js.map +7 -0
- package/dist/esm/chunks/chunk.PC6TW5XE.js +7 -0
- package/dist/esm/chunks/chunk.PC6TW5XE.js.map +7 -0
- package/dist/esm/chunks/chunk.PFIIBXTS.js +7 -0
- package/dist/esm/chunks/chunk.PFIIBXTS.js.map +7 -0
- package/dist/esm/chunks/chunk.Q7TBWGKN.js +12 -0
- package/dist/esm/chunks/chunk.Q7TBWGKN.js.map +7 -0
- package/dist/esm/chunks/chunk.QCPV5DEG.js +7 -0
- package/dist/esm/chunks/{chunk.R3AWIPPK.js → chunk.QIZBZGYT.js} +2 -2
- package/dist/esm/chunks/{chunk.2XPAYTK4.js → chunk.QKTK5XUE.js} +2 -2
- package/dist/esm/chunks/chunk.QLGJS37N.js +7 -0
- package/dist/esm/chunks/chunk.QLGJS37N.js.map +7 -0
- package/dist/esm/chunks/{chunk.R66CYS27.js → chunk.QTY25OTN.js} +2 -2
- package/dist/esm/chunks/chunk.QUXMLWBJ.js +7 -0
- package/dist/esm/chunks/{chunk.BEUQVZKZ.js.map → chunk.QUXMLWBJ.js.map} +1 -1
- package/dist/esm/chunks/{chunk.BSV27GU7.js → chunk.QVATEY5S.js} +2 -2
- package/dist/esm/chunks/chunk.RFT3BAJ2.js +7 -0
- package/dist/esm/chunks/chunk.RFT3BAJ2.js.map +7 -0
- package/dist/esm/chunks/{chunk.SHBDQPPH.js → chunk.RONMNRSH.js} +2 -2
- package/dist/esm/chunks/{chunk.FRTSXX33.js → chunk.RSYEG2RW.js} +2 -2
- package/dist/esm/chunks/{chunk.A6BIUNPW.js → chunk.RXBLU4OJ.js} +2 -2
- package/dist/esm/chunks/{chunk.FBDRM4YN.js → chunk.S7KEO2CH.js} +2 -2
- package/dist/esm/chunks/{chunk.XU3YSZPA.js → chunk.SQ3AZAHF.js} +2 -2
- package/dist/esm/chunks/{chunk.35MHQH7Z.js → chunk.SROEDYPL.js} +2 -2
- package/dist/esm/chunks/chunk.T7NWP7DB.js +7 -0
- package/dist/esm/chunks/chunk.T7NWP7DB.js.map +7 -0
- package/dist/esm/chunks/{chunk.PXRGQHWR.js → chunk.TQWZDM6T.js} +2 -2
- package/dist/esm/chunks/chunk.U6J4VHU6.js +7 -0
- package/dist/esm/chunks/{chunk.STSAE2XP.js.map → chunk.U6J4VHU6.js.map} +1 -1
- package/dist/esm/chunks/{chunk.6JVMCBCR.js → chunk.UKBE2FMZ.js} +2 -2
- package/dist/esm/chunks/{chunk.MDDX4MJU.js → chunk.UPSXYWPD.js} +2 -2
- package/dist/esm/chunks/{chunk.MDDX4MJU.js.map → chunk.UPSXYWPD.js.map} +2 -2
- package/dist/esm/chunks/chunk.USTVZ6MZ.js +7 -0
- package/dist/esm/chunks/chunk.USTVZ6MZ.js.map +7 -0
- package/dist/esm/chunks/chunk.VGIRVTBJ.js +7 -0
- package/dist/esm/chunks/chunk.VGIRVTBJ.js.map +7 -0
- package/dist/esm/chunks/chunk.VRSPT7WX.js +7 -0
- package/dist/esm/chunks/{chunk.UQQQSJVM.js.map → chunk.VRSPT7WX.js.map} +3 -3
- package/dist/esm/chunks/chunk.W4HANHUO.js +7 -0
- package/dist/esm/chunks/chunk.W6FT6MKN.js +7 -0
- package/dist/esm/chunks/chunk.W6FT6MKN.js.map +7 -0
- package/dist/esm/chunks/{chunk.2W276VOR.js → chunk.WMJSYYXQ.js} +2 -2
- package/dist/esm/chunks/chunk.WXVVOFNK.js +7 -0
- package/dist/esm/chunks/chunk.WXVVOFNK.js.map +7 -0
- package/dist/esm/chunks/{chunk.OSBNFFCI.js → chunk.XATVDHDW.js} +2 -2
- package/dist/esm/chunks/chunk.XATVDHDW.js.map +7 -0
- package/dist/esm/chunks/{chunk.4AEQ7KVU.js → chunk.XTJGWT5F.js} +2 -2
- package/dist/esm/chunks/chunk.YNCTSMT6.js +7 -0
- package/dist/esm/chunks/chunk.YNCTSMT6.js.map +7 -0
- package/dist/esm/chunks/{chunk.YNXWVL4B.js → chunk.YPNSK2CK.js} +2 -2
- package/dist/esm/chunks/chunk.YRAEFQJW.js +7 -0
- package/dist/esm/chunks/{chunk.XAZ6EDIZ.js.map → chunk.YRAEFQJW.js.map} +3 -3
- package/dist/esm/chunks/chunk.YWJVZVZX.js +7 -0
- package/dist/esm/chunks/{chunk.6XLTVIUD.js → chunk.ZA7JY3AY.js} +2 -2
- package/dist/esm/chunks/chunk.ZG6YF2HI.js +7 -0
- package/dist/esm/chunks/{chunk.R6VPRRTT.js.map → chunk.ZG6YF2HI.js.map} +1 -1
- package/dist/esm/circular-progress/index.js +1 -1
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/base/index.js +1 -1
- package/dist/esm/core/delegates/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/deprecated/button/index.js +1 -1
- package/dist/esm/deprecated/index.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/divider/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/{field-next → field}/base/index.js +1 -1
- package/dist/esm/field/index.js +7 -0
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-action-button/index.js +1 -1
- package/dist/esm/focus-indicator/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/inline-message/index.js +1 -1
- package/dist/esm/keyboard-shortcut/index.js +1 -1
- package/dist/esm/label/index.js +1 -1
- package/dist/esm/label-value/index.js +1 -1
- package/dist/esm/linear-progress/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/overlay/index.js +1 -1
- package/dist/esm/page-state/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/popover/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/radio/radio/index.js +1 -1
- package/dist/esm/radio/radio-group/index.js +1 -1
- package/dist/esm/scaffold/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/option-group/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/skeleton/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-button/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/state-layer/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/toolbar/index.js +1 -1
- package/dist/esm/tooltip/index.js +1 -1
- package/dist/esm/view-switcher/index.js +1 -1
- package/dist/esm/view-switcher/view/index.js +1 -1
- package/dist/forge-core.css +1 -1
- package/dist/forge-dark.css +1 -1
- package/dist/forge.css +1 -1
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.d.ts +6 -6
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.js +18 -10
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.d.ts +3 -3
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.js +13 -17
- package/esm/app-bar/profile-button/app-bar-profile-button.d.ts +4 -4
- package/esm/app-bar/profile-button/app-bar-profile-button.js +3 -3
- package/esm/autocomplete/autocomplete-adapter.d.ts +6 -2
- package/esm/autocomplete/autocomplete-adapter.js +27 -23
- package/esm/autocomplete/autocomplete-constants.d.ts +2 -2
- package/esm/autocomplete/autocomplete-constants.js +1 -2
- package/esm/autocomplete/autocomplete-foundation.js +3 -5
- package/esm/autocomplete/autocomplete.js +2 -2
- package/esm/backdrop/backdrop-constants.d.ts +10 -13
- package/esm/backdrop/backdrop-constants.js +12 -17
- package/esm/backdrop/backdrop.d.ts +17 -29
- package/esm/backdrop/backdrop.js +79 -50
- package/esm/backdrop/index.d.ts +0 -2
- package/esm/backdrop/index.js +0 -2
- package/esm/bottom-sheet/bottom-sheet-adapter.d.ts +2 -2
- package/esm/bottom-sheet/bottom-sheet-adapter.js +12 -5
- package/esm/bottom-sheet/bottom-sheet-foundation.js +1 -1
- package/esm/bottom-sheet/bottom-sheet.js +2 -2
- package/esm/busy-indicator/busy-indicator-adapter.d.ts +2 -6
- package/esm/busy-indicator/busy-indicator-adapter.js +8 -6
- package/esm/busy-indicator/busy-indicator-foundation.js +1 -1
- package/esm/button/base/base-button-foundation.js +2 -1
- package/esm/calendar/calendar-constants.d.ts +1 -1
- package/esm/calendar/calendar-constants.js +1 -1
- package/esm/calendar/calendar-dropdown/calendar-dropdown.d.ts +6 -4
- package/esm/calendar/calendar-dropdown/calendar-dropdown.js +21 -25
- package/esm/calendar/calendar-menu/calendar-menu-constants.d.ts +1 -1
- package/esm/calendar/calendar-menu/calendar-menu-constants.js +1 -1
- package/esm/calendar/calendar-menu/calendar-menu.js +3 -3
- package/esm/calendar/calendar.js +3 -3
- package/esm/card/card-constants.d.ts +2 -5
- package/esm/card/card-constants.js +4 -10
- package/esm/card/card.d.ts +10 -5
- package/esm/card/card.js +14 -16
- package/esm/checkbox/checkbox-adapter.d.ts +0 -34
- package/esm/checkbox/checkbox-adapter.js +10 -105
- package/esm/checkbox/checkbox-constants.d.ts +13 -4
- package/esm/checkbox/checkbox-constants.js +8 -11
- package/esm/checkbox/checkbox-foundation.d.ts +5 -11
- package/esm/checkbox/checkbox-foundation.js +24 -35
- package/esm/checkbox/checkbox.d.ts +24 -24
- package/esm/checkbox/checkbox.js +65 -83
- package/esm/chip-field/chip-field-adapter.d.ts +48 -22
- package/esm/chip-field/chip-field-adapter.js +130 -30
- package/esm/chip-field/chip-field-component-delegate.js +1 -1
- package/esm/chip-field/chip-field-constants.d.ts +18 -16
- package/esm/chip-field/chip-field-constants.js +19 -20
- package/esm/chip-field/chip-field-foundation.d.ts +26 -16
- package/esm/chip-field/chip-field-foundation.js +128 -74
- package/esm/chip-field/chip-field.d.ts +9 -6
- package/esm/chip-field/chip-field.js +24 -11
- package/esm/chips/chip/chip.js +1 -1
- package/esm/constants.d.ts +2 -0
- package/esm/constants.js +2 -0
- package/esm/core/base/base-adapter.d.ts +1 -0
- package/esm/core/controllers/move-controller.d.ts +32 -0
- package/esm/core/controllers/move-controller.js +40 -0
- package/esm/core/mixins/interactions/moveable/with-moveable.d.ts +30 -0
- package/esm/core/mixins/interactions/moveable/with-moveable.js +131 -0
- package/esm/core/utils/dismissible-stack.d.ts +6 -0
- package/esm/core/utils/dismissible-stack.js +9 -0
- package/esm/core/utils/feature-detection.d.ts +5 -0
- package/esm/core/utils/feature-detection.js +7 -0
- package/esm/core/utils/index.d.ts +2 -0
- package/esm/core/utils/index.js +2 -0
- package/esm/core/utils/svg-utils.d.ts +1 -1
- package/esm/core/utils/svg-utils.js +2 -2
- package/esm/date-picker/date-picker.d.ts +0 -2
- package/esm/date-picker/date-picker.js +2 -4
- package/esm/date-range-picker/date-range-picker-adapter.js +1 -1
- package/esm/date-range-picker/date-range-picker-component-delegate.d.ts +1 -1
- package/esm/date-range-picker/date-range-picker.js +2 -2
- package/esm/dialog/dialog-adapter.d.ts +44 -62
- package/esm/dialog/dialog-adapter.js +107 -135
- package/esm/dialog/dialog-constants.d.ts +51 -28
- package/esm/dialog/dialog-constants.js +36 -33
- package/esm/dialog/dialog-foundation.d.ts +59 -75
- package/esm/dialog/dialog-foundation.js +218 -360
- package/esm/dialog/dialog.d.ts +127 -46
- package/esm/dialog/dialog.js +161 -60
- package/esm/drawer/modal-drawer/modal-drawer-adapter.js +1 -1
- package/esm/drawer/modal-drawer/modal-drawer-foundation.js +5 -6
- package/esm/{field-next → field}/base/base-field-foundation.js +14 -0
- package/esm/{field-next/field-foundation.d.ts → field/base/with-base-field.d.ts} +24 -39
- package/esm/field/base/with-base-field.js +210 -0
- package/esm/field/field-adapter.d.ts +49 -92
- package/esm/field/field-adapter.js +114 -154
- package/esm/field/field-constants.d.ts +82 -30
- package/esm/field/field-constants.js +51 -29
- package/esm/field/field-foundation.d.ts +78 -48
- package/esm/field/field-foundation.js +171 -273
- package/esm/field/field.d.ts +202 -24
- package/esm/field/field.js +267 -37
- package/esm/focus-indicator/focus-indicator-constants.d.ts +5 -0
- package/esm/focus-indicator/focus-indicator-constants.js +7 -2
- package/esm/focus-indicator/focus-indicator-foundation.d.ts +5 -0
- package/esm/focus-indicator/focus-indicator-foundation.js +21 -3
- package/esm/focus-indicator/focus-indicator.d.ts +5 -0
- package/esm/focus-indicator/focus-indicator.js +9 -7
- package/esm/icon/icon-adapter.d.ts +4 -2
- package/esm/icon/icon-adapter.js +13 -9
- package/esm/icon/icon-constants.d.ts +14 -2
- package/esm/icon/icon-constants.js +3 -1
- package/esm/icon/icon-foundation.d.ts +6 -2
- package/esm/icon/icon-foundation.js +50 -18
- package/esm/icon/icon-registry.d.ts +8 -2
- package/esm/icon/icon-registry.js +15 -2
- package/esm/icon/icon-utils.d.ts +6 -3
- package/esm/icon/icon-utils.js +6 -7
- package/esm/icon/icon.d.ts +35 -4
- package/esm/icon/icon.js +44 -18
- package/esm/icon/index.js +0 -6
- package/esm/icon-button/icon-button-component-delegate.d.ts +2 -2
- package/esm/index.d.ts +1 -4
- package/esm/index.js +2 -9
- package/esm/label-value/index.d.ts +0 -2
- package/esm/label-value/index.js +0 -2
- package/esm/label-value/label-value-constants.d.ts +7 -12
- package/esm/label-value/label-value-constants.js +7 -17
- package/esm/label-value/label-value.d.ts +44 -16
- package/esm/label-value/label-value.js +78 -36
- package/esm/list/list/list.d.ts +2 -3
- package/esm/list/list/list.js +4 -5
- package/esm/list/list-item/list-item.d.ts +1 -0
- package/esm/list/list-item/list-item.js +2 -1
- package/esm/list-dropdown/list-dropdown-adapter.d.ts +3 -1
- package/esm/list-dropdown/list-dropdown-adapter.js +24 -9
- package/esm/list-dropdown/list-dropdown-constants.d.ts +6 -5
- package/esm/list-dropdown/list-dropdown-foundation.d.ts +2 -2
- package/esm/list-dropdown/list-dropdown-foundation.js +3 -5
- package/esm/list-dropdown/list-dropdown-utils.d.ts +3 -3
- package/esm/list-dropdown/list-dropdown-utils.js +11 -19
- package/esm/list-dropdown/list-dropdown.d.ts +2 -2
- package/esm/list-dropdown/list-dropdown.js +1 -1
- package/esm/menu/menu-adapter.d.ts +4 -2
- package/esm/menu/menu-adapter.js +8 -2
- package/esm/menu/menu-foundation.d.ts +11 -10
- package/esm/menu/menu-foundation.js +9 -6
- package/esm/menu/menu.d.ts +8 -7
- package/esm/menu/menu.js +2 -2
- package/esm/overlay/overlay-adapter.d.ts +0 -1
- package/esm/overlay/overlay-adapter.js +1 -2
- package/esm/paginator/paginator.js +1 -1
- package/esm/popover/popover-adapter.d.ts +9 -0
- package/esm/popover/popover-adapter.js +41 -3
- package/esm/popover/popover-constants.d.ts +17 -0
- package/esm/popover/popover-constants.js +11 -6
- package/esm/popover/popover-foundation.d.ts +7 -1
- package/esm/popover/popover-foundation.js +35 -7
- package/esm/popover/popover.d.ts +15 -1
- package/esm/popover/popover.js +28 -15
- package/esm/radio/core/radio-group-manager.d.ts +18 -1
- package/esm/radio/core/radio-group-manager.js +27 -6
- package/esm/radio/radio/radio-adapter.js +4 -2
- package/esm/radio/radio/radio-component-delegate.d.ts +38 -0
- package/esm/radio/radio/radio-component-delegate.js +88 -1
- package/esm/radio/radio/radio-constants.d.ts +11 -0
- package/esm/radio/radio/radio-constants.js +3 -1
- package/esm/radio/radio/radio-foundation.js +3 -2
- package/esm/radio/radio/radio.d.ts +8 -3
- package/esm/radio/radio/radio.js +17 -18
- package/esm/radio/radio-group/radio-group-constants.d.ts +3 -0
- package/esm/radio/radio-group/radio-group-constants.js +3 -1
- package/esm/radio/radio-group/radio-group.js +5 -5
- package/esm/scaffold/scaffold-constants.d.ts +6 -0
- package/esm/scaffold/scaffold-constants.js +7 -1
- package/esm/scaffold/scaffold.d.ts +30 -2
- package/esm/scaffold/scaffold.js +43 -4
- package/esm/select/core/base-select-adapter.d.ts +5 -3
- package/esm/select/core/base-select-adapter.js +10 -9
- package/esm/select/core/base-select-constants.d.ts +11 -0
- package/esm/select/core/base-select-constants.js +1 -0
- package/esm/select/core/base-select-foundation.js +3 -3
- package/esm/select/core/base-select.d.ts +3 -3
- package/esm/select/select/select-adapter.d.ts +14 -60
- package/esm/select/select/select-adapter.js +52 -111
- package/esm/select/select/select-constants.d.ts +16 -14
- package/esm/select/select/select-constants.js +8 -16
- package/esm/select/select/select-foundation.d.ts +12 -58
- package/esm/select/select/select-foundation.js +45 -240
- package/esm/select/select/select.d.ts +17 -27
- package/esm/select/select/select.js +54 -62
- package/esm/select/select-dropdown/select-dropdown-adapter.d.ts +2 -2
- package/esm/select/select-dropdown/select-dropdown-adapter.js +1 -1
- package/esm/select/select-dropdown/select-dropdown.d.ts +0 -2
- package/esm/select/select-dropdown/select-dropdown.js +2 -4
- package/esm/slider/slider.d.ts +2 -2
- package/esm/slider/slider.js +2 -2
- package/esm/split-view/split-view/split-view.js +1 -1
- package/esm/split-view/split-view-panel/split-view-panel-adapter.d.ts +5 -10
- package/esm/split-view/split-view-panel/split-view-panel-adapter.js +7 -15
- package/esm/split-view/split-view-panel/split-view-panel-constants.d.ts +3 -3
- package/esm/split-view/split-view-panel/split-view-panel-constants.js +3 -3
- package/esm/split-view/split-view-panel/split-view-panel-foundation.js +0 -1
- package/esm/split-view/split-view-panel/split-view-panel-utils.js +2 -2
- package/esm/split-view/split-view-panel/split-view-panel.d.ts +0 -2
- package/esm/split-view/split-view-panel/split-view-panel.js +6 -6
- package/esm/stepper/step/step-adapter.d.ts +2 -9
- package/esm/stepper/step/step-adapter.js +3 -18
- package/esm/stepper/step/step-constants.js +21 -21
- package/esm/stepper/step/step-foundation.js +0 -2
- package/esm/stepper/step/step.d.ts +53 -0
- package/esm/stepper/step/step.js +60 -3
- package/esm/stepper/stepper/stepper-constants.js +9 -9
- package/esm/stepper/stepper/stepper.js +1 -1
- package/esm/switch/switch-adapter.d.ts +0 -32
- package/esm/switch/switch-adapter.js +15 -107
- package/esm/switch/switch-component-delegate.js +1 -1
- package/esm/switch/switch-constants.d.ts +24 -14
- package/esm/switch/switch-constants.js +11 -14
- package/esm/switch/switch-foundation.d.ts +5 -11
- package/esm/switch/switch-foundation.js +25 -31
- package/esm/switch/switch.d.ts +19 -19
- package/esm/switch/switch.js +59 -81
- package/esm/text-field/text-field-adapter.d.ts +2 -2
- package/esm/text-field/text-field-adapter.js +5 -2
- package/esm/text-field/text-field-foundation.d.ts +2 -2
- package/esm/text-field/text-field-foundation.js +2 -2
- package/esm/text-field/text-field.d.ts +1 -1
- package/esm/text-field/text-field.js +2 -2
- package/esm/time-picker/time-picker-adapter.d.ts +6 -2
- package/esm/time-picker/time-picker-adapter.js +7 -3
- package/esm/time-picker/time-picker-foundation.js +10 -10
- package/esm/time-picker/time-picker.js +2 -2
- package/esm/toast/toast-adapter.d.ts +18 -69
- package/esm/toast/toast-adapter.js +24 -121
- package/esm/toast/toast-constants.d.ts +25 -36
- package/esm/toast/toast-constants.js +20 -40
- package/esm/toast/toast-foundation.d.ts +22 -37
- package/esm/toast/toast-foundation.js +92 -92
- package/esm/toast/toast.d.ts +83 -24
- package/esm/toast/toast.js +126 -29
- package/esm/tooltip/tooltip-adapter.d.ts +1 -0
- package/esm/tooltip/tooltip-foundation.js +3 -0
- package/esm/tooltip/tooltip.d.ts +3 -1
- package/esm/tooltip/tooltip.js +4 -0
- package/package.json +1 -6
- package/styles/backdrop/_animations.scss +24 -0
- package/styles/backdrop/_core.scss +41 -0
- package/styles/backdrop/_token-utils.scss +30 -0
- package/styles/backdrop/backdrop.scss +38 -11
- package/{esm/radio/radio-group/radio-group-component-delegate.js → styles/backdrop/index.scss} +1 -0
- package/styles/bottom-sheet/_mixins.scss +3 -8
- package/styles/bottom-sheet/bottom-sheet.scss +0 -4
- package/styles/calendar/calendar-menu/calendar-menu.scss +1 -1
- package/styles/calendar/calendar.scss +1 -1
- package/styles/card/_core.scss +35 -0
- package/styles/card/_token-utils.scss +30 -0
- package/styles/card/card.scss +37 -3
- package/{esm/radio/radio-group/radio-group-component-delegate.d.ts → styles/card/index.scss} +1 -0
- package/styles/checkbox/_core.scss +9 -20
- package/styles/checkbox/checkbox.scss +2 -8
- package/styles/chip-field/_core.scss +21 -17
- package/styles/chip-field/_token-utils.scss +30 -0
- package/styles/chip-field/chip-field.scss +68 -3
- package/{dist/popup/forge-popup.css → styles/chip-field/index.scss} +1 -1
- package/styles/chips/chip/_core.scss +1 -1
- package/styles/core/styles/tokens/backdrop/_tokens.scss +29 -0
- package/styles/core/styles/tokens/card/_tokens.scss +33 -0
- package/styles/core/styles/tokens/checkbox/_tokens.scss +4 -3
- package/styles/core/styles/tokens/chip-field/_tokens.scss +16 -0
- package/styles/core/styles/tokens/dialog/_tokens.scss +82 -0
- package/styles/core/styles/tokens/field/_tokens.scss +3 -1
- package/styles/core/styles/tokens/icon/_tokens.scss +20 -0
- package/styles/core/styles/tokens/label-value/_tokens.scss +34 -0
- package/styles/core/styles/tokens/list/list/_tokens.scss +2 -3
- package/styles/core/styles/tokens/list/list-item/_tokens.scss +7 -4
- package/styles/core/styles/tokens/popover/_tokens.scss +29 -7
- package/styles/core/styles/tokens/scaffold/_tokens.scss +18 -0
- package/styles/core/styles/tokens/select/_tokens.scss +18 -0
- package/styles/core/styles/tokens/stepper/step/_tokens.scss +62 -0
- package/styles/core/styles/tokens/toast/_tokens.scss +39 -0
- package/styles/dialog/_animations.scss +82 -0
- package/styles/dialog/_core.scss +310 -0
- package/styles/dialog/_token-utils.scss +30 -0
- package/styles/dialog/dialog.scss +356 -6
- package/styles/dialog/forge-dialog-utils.scss +23 -6
- package/styles/dialog/index.scss +7 -0
- package/styles/{field-next → field}/_core.layout.scss +6 -4
- package/styles/field/_core.scss +200 -50
- package/styles/{field-next → field}/_core.shape.scss +5 -0
- package/styles/{field-next → field}/_core.variant.scss +1 -0
- package/styles/{field-next → field}/field.scss +39 -12
- package/styles/forge-core.scss +2 -6
- package/styles/forge.scss +0 -4
- package/styles/icon/_core.scss +27 -0
- package/styles/icon/_token-utils.scss +30 -0
- package/styles/icon/icon.scss +27 -12
- package/styles/icon/index.scss +6 -0
- package/styles/label-value/_core.scss +85 -0
- package/styles/label-value/_token-utils.scss +30 -0
- package/styles/label-value/index.scss +6 -0
- package/styles/label-value/label-value.scss +71 -3
- package/styles/list/list/_core.scss +6 -2
- package/styles/list/list/list.scss +4 -0
- package/styles/list/list-item/_core.scss +3 -0
- package/styles/popover/_animations.scss +30 -0
- package/styles/popover/_core.scss +43 -6
- package/styles/popover/popover.scss +227 -170
- package/styles/scaffold/_core.scss +98 -0
- package/styles/scaffold/_token-utils.scss +30 -0
- package/styles/scaffold/index.scss +6 -0
- package/styles/scaffold/scaffold.scss +85 -5
- package/{dist/esm/chunks/chunk.WF2MFLG4.js → styles/select/index.scss} +1 -1
- package/styles/select/select/_core.scss +31 -15
- package/styles/select/select/_token-utils.scss +31 -0
- package/styles/select/select/select.scss +50 -8
- package/styles/split-view/split-view/split-view.scss +0 -1
- package/styles/split-view/split-view-panel/_mixins.scss +1 -0
- package/styles/split-view/split-view-panel/split-view-panel.scss +7 -1
- package/styles/stepper/step/_core.scss +391 -0
- package/styles/stepper/step/_token-utils.scss +31 -0
- package/styles/stepper/step/step.scss +261 -81
- package/styles/stepper/stepper/_core.scss +49 -0
- package/styles/stepper/stepper/stepper.scss +38 -4
- package/styles/switch/_core.scss +3 -2
- package/styles/theme/_theme-dark.scss +8 -8
- package/styles/toast/_animations.scss +42 -0
- package/styles/toast/_core.scss +73 -0
- package/styles/toast/_token-utils.scss +30 -0
- package/styles/toast/index.scss +6 -0
- package/styles/toast/toast.scss +173 -6
- package/styles/utils/_mixins-core.scss +5 -9
- package/dist/dialog/forge-dialog.css +0 -6
- package/dist/esm/chunks/chunk.24MZM3AY.js +0 -7
- package/dist/esm/chunks/chunk.24MZM3AY.js.map +0 -7
- package/dist/esm/chunks/chunk.3L77JY5H.js +0 -7
- package/dist/esm/chunks/chunk.3TIBP6QT.js +0 -7
- package/dist/esm/chunks/chunk.3U222LE4.js +0 -7
- package/dist/esm/chunks/chunk.45PPQY45.js +0 -177
- package/dist/esm/chunks/chunk.45PPQY45.js.map +0 -7
- package/dist/esm/chunks/chunk.4UU6PWR2.js +0 -7
- package/dist/esm/chunks/chunk.4UU6PWR2.js.map +0 -7
- package/dist/esm/chunks/chunk.5A34DJLZ.js +0 -7
- package/dist/esm/chunks/chunk.5A34DJLZ.js.map +0 -7
- package/dist/esm/chunks/chunk.5UGN5FYV.js +0 -7
- package/dist/esm/chunks/chunk.5UZ2DEW3.js +0 -7
- package/dist/esm/chunks/chunk.5UZ2DEW3.js.map +0 -7
- package/dist/esm/chunks/chunk.656X22EF.js +0 -7
- package/dist/esm/chunks/chunk.656X22EF.js.map +0 -7
- package/dist/esm/chunks/chunk.66YURKP2.js +0 -7
- package/dist/esm/chunks/chunk.66YURKP2.js.map +0 -7
- package/dist/esm/chunks/chunk.6GSVB5NB.js.map +0 -7
- package/dist/esm/chunks/chunk.AFJ7QEVI.js +0 -7
- package/dist/esm/chunks/chunk.AFJ7QEVI.js.map +0 -7
- package/dist/esm/chunks/chunk.BETICEYY.js +0 -7
- package/dist/esm/chunks/chunk.BEUQVZKZ.js +0 -7
- package/dist/esm/chunks/chunk.BMQAVBWZ.js +0 -7
- package/dist/esm/chunks/chunk.BMQAVBWZ.js.map +0 -7
- package/dist/esm/chunks/chunk.CIUPY66Y.js +0 -7
- package/dist/esm/chunks/chunk.CIUPY66Y.js.map +0 -7
- package/dist/esm/chunks/chunk.CSCZRSDT.js +0 -7
- package/dist/esm/chunks/chunk.CSCZRSDT.js.map +0 -7
- package/dist/esm/chunks/chunk.CWBDPBYO.js +0 -7
- package/dist/esm/chunks/chunk.CWBDPBYO.js.map +0 -7
- package/dist/esm/chunks/chunk.D7RH43XD.js +0 -7
- package/dist/esm/chunks/chunk.D7RH43XD.js.map +0 -7
- package/dist/esm/chunks/chunk.DCCFF327.js +0 -7
- package/dist/esm/chunks/chunk.EO3HELQ2.js +0 -15
- package/dist/esm/chunks/chunk.FB4MXEIW.js +0 -7
- package/dist/esm/chunks/chunk.FB4MXEIW.js.map +0 -7
- package/dist/esm/chunks/chunk.G2HRYIIZ.js +0 -7
- package/dist/esm/chunks/chunk.G2HRYIIZ.js.map +0 -7
- package/dist/esm/chunks/chunk.G3GTO5ZC.js +0 -7
- package/dist/esm/chunks/chunk.G3GTO5ZC.js.map +0 -7
- package/dist/esm/chunks/chunk.GL2H6QOP.js +0 -7
- package/dist/esm/chunks/chunk.GL2H6QOP.js.map +0 -7
- package/dist/esm/chunks/chunk.HBAC6E7O.js +0 -7
- package/dist/esm/chunks/chunk.HYTFCFP6.js +0 -7
- package/dist/esm/chunks/chunk.HYTFCFP6.js.map +0 -7
- package/dist/esm/chunks/chunk.IM36A2ZI.js +0 -7
- package/dist/esm/chunks/chunk.IM36A2ZI.js.map +0 -7
- package/dist/esm/chunks/chunk.IWVAI6XM.js.map +0 -7
- package/dist/esm/chunks/chunk.JCEKCW4B.js +0 -7
- package/dist/esm/chunks/chunk.JCEKCW4B.js.map +0 -7
- package/dist/esm/chunks/chunk.JVWJHSPM.js +0 -7
- package/dist/esm/chunks/chunk.KDUH2DUE.js +0 -7
- package/dist/esm/chunks/chunk.KRKKMTXR.js +0 -7
- package/dist/esm/chunks/chunk.KRKKMTXR.js.map +0 -7
- package/dist/esm/chunks/chunk.LKA5HQQY.js +0 -7
- package/dist/esm/chunks/chunk.LKA5HQQY.js.map +0 -7
- package/dist/esm/chunks/chunk.MC3UAHWS.js +0 -7
- package/dist/esm/chunks/chunk.MC3UAHWS.js.map +0 -7
- package/dist/esm/chunks/chunk.MCR34SZQ.js +0 -7
- package/dist/esm/chunks/chunk.MGLWXAZO.js +0 -18
- package/dist/esm/chunks/chunk.MPUP6QAP.js +0 -7
- package/dist/esm/chunks/chunk.MZRAL4MY.js +0 -7
- package/dist/esm/chunks/chunk.MZRAL4MY.js.map +0 -7
- package/dist/esm/chunks/chunk.N632SJ7X.js +0 -7
- package/dist/esm/chunks/chunk.N632SJ7X.js.map +0 -7
- package/dist/esm/chunks/chunk.NHOGZDLN.js +0 -7
- package/dist/esm/chunks/chunk.NHOGZDLN.js.map +0 -7
- package/dist/esm/chunks/chunk.NIUX6DVF.js +0 -12
- package/dist/esm/chunks/chunk.NIUX6DVF.js.map +0 -7
- package/dist/esm/chunks/chunk.OSBNFFCI.js.map +0 -7
- package/dist/esm/chunks/chunk.OY3TG55O.js +0 -7
- package/dist/esm/chunks/chunk.OY3TG55O.js.map +0 -7
- package/dist/esm/chunks/chunk.QCRO5NSG.js +0 -7
- package/dist/esm/chunks/chunk.QCRO5NSG.js.map +0 -7
- package/dist/esm/chunks/chunk.QKYCMDLB.js +0 -7
- package/dist/esm/chunks/chunk.R6VPRRTT.js +0 -7
- package/dist/esm/chunks/chunk.RFCIELJM.js +0 -7
- package/dist/esm/chunks/chunk.RFCIELJM.js.map +0 -7
- package/dist/esm/chunks/chunk.RJC42RNR.js +0 -7
- package/dist/esm/chunks/chunk.RJC42RNR.js.map +0 -7
- package/dist/esm/chunks/chunk.SKBOB2BD.js +0 -7
- package/dist/esm/chunks/chunk.SKBOB2BD.js.map +0 -7
- package/dist/esm/chunks/chunk.SOKORSUV.js +0 -7
- package/dist/esm/chunks/chunk.STSAE2XP.js +0 -7
- package/dist/esm/chunks/chunk.SWKKDBO6.js +0 -7
- package/dist/esm/chunks/chunk.SWKKDBO6.js.map +0 -7
- package/dist/esm/chunks/chunk.SYKZ74SL.js +0 -7
- package/dist/esm/chunks/chunk.SYKZ74SL.js.map +0 -7
- package/dist/esm/chunks/chunk.UKVC23E5.js +0 -7
- package/dist/esm/chunks/chunk.UKVC23E5.js.map +0 -7
- package/dist/esm/chunks/chunk.UOD3A7M4.js +0 -7
- package/dist/esm/chunks/chunk.UQQQSJVM.js +0 -7
- package/dist/esm/chunks/chunk.V3X77TCO.js +0 -7
- package/dist/esm/chunks/chunk.V3X77TCO.js.map +0 -7
- package/dist/esm/chunks/chunk.V7ILFIOR.js +0 -7
- package/dist/esm/chunks/chunk.VBJ4WUVH.js +0 -7
- package/dist/esm/chunks/chunk.VBJ4WUVH.js.map +0 -7
- package/dist/esm/chunks/chunk.VZ2XONDI.js +0 -7
- package/dist/esm/chunks/chunk.VZ2XONDI.js.map +0 -7
- package/dist/esm/chunks/chunk.WAMFFIMP.js +0 -7
- package/dist/esm/chunks/chunk.WAMFFIMP.js.map +0 -7
- package/dist/esm/chunks/chunk.WBCQTZPS.js +0 -7
- package/dist/esm/chunks/chunk.WBCQTZPS.js.map +0 -7
- package/dist/esm/chunks/chunk.WBI34ZVP.js +0 -7
- package/dist/esm/chunks/chunk.WF2MFLG4.js.map +0 -7
- package/dist/esm/chunks/chunk.WPVGFQNY.js +0 -7
- package/dist/esm/chunks/chunk.WPVGFQNY.js.map +0 -7
- package/dist/esm/chunks/chunk.XAZ6EDIZ.js +0 -7
- package/dist/esm/chunks/chunk.XCI7O2KJ.js +0 -7
- package/dist/esm/chunks/chunk.XCI7O2KJ.js.map +0 -7
- package/dist/esm/chunks/chunk.XNJROSDZ.js +0 -7
- package/dist/esm/chunks/chunk.XNJROSDZ.js.map +0 -7
- package/dist/esm/chunks/chunk.Z6GRWPPN.js +0 -7
- package/dist/esm/chunks/chunk.Z6GRWPPN.js.map +0 -7
- package/dist/esm/chunks/chunk.ZLNI2M3F.js +0 -7
- package/dist/esm/chunks/chunk.ZLNI2M3F.js.map +0 -7
- package/dist/esm/chunks/chunk.ZSZFWZAI.js +0 -7
- package/dist/esm/chunks/chunk.ZSZFWZAI.js.map +0 -7
- package/dist/esm/chunks/chunk.ZYKP23JP.js +0 -7
- package/dist/esm/field-next/index.js +0 -7
- package/dist/esm/floating-label/index.js +0 -7
- package/dist/esm/floating-label/index.js.map +0 -7
- package/dist/esm/popup/index.js +0 -7
- package/dist/esm/popup/index.js.map +0 -7
- package/dist/esm/ripple/index.js +0 -7
- package/dist/esm/ripple/index.js.map +0 -7
- package/dist/floating-label/forge-floating-label.css +0 -6
- package/dist/form-field/forge-form-field.css +0 -6
- package/dist/ripple/forge-ripple.css +0 -6
- package/dist/scaffold/forge-scaffold.css +0 -6
- package/esm/backdrop/backdrop-adapter.d.ts +0 -36
- package/esm/backdrop/backdrop-adapter.js +0 -40
- package/esm/backdrop/backdrop-foundation.d.ts +0 -38
- package/esm/backdrop/backdrop-foundation.js +0 -82
- package/esm/field-next/field-adapter.d.ts +0 -56
- package/esm/field-next/field-adapter.js +0 -132
- package/esm/field-next/field-constants.d.ts +0 -95
- package/esm/field-next/field-constants.js +0 -64
- package/esm/field-next/field-foundation.js +0 -221
- package/esm/field-next/field.d.ts +0 -205
- package/esm/field-next/field.js +0 -287
- package/esm/floating-label/floating-label-adapter.d.ts +0 -23
- package/esm/floating-label/floating-label-adapter.js +0 -32
- package/esm/floating-label/floating-label-constants.d.ts +0 -13
- package/esm/floating-label/floating-label-constants.js +0 -14
- package/esm/floating-label/floating-label-foundation.d.ts +0 -20
- package/esm/floating-label/floating-label-foundation.js +0 -74
- package/esm/floating-label/floating-label.d.ts +0 -31
- package/esm/floating-label/floating-label.js +0 -34
- package/esm/floating-label/index.d.ts +0 -9
- package/esm/floating-label/index.js +0 -9
- package/esm/label-value/label-value-adapter.d.ts +0 -24
- package/esm/label-value/label-value-adapter.js +0 -47
- package/esm/label-value/label-value-foundation.d.ts +0 -33
- package/esm/label-value/label-value-foundation.js +0 -80
- package/esm/popup/index.d.ts +0 -10
- package/esm/popup/index.js +0 -14
- package/esm/popup/popup-adapter.d.ts +0 -45
- package/esm/popup/popup-adapter.js +0 -152
- package/esm/popup/popup-constants.d.ts +0 -55
- package/esm/popup/popup-constants.js +0 -53
- package/esm/popup/popup-foundation.d.ts +0 -72
- package/esm/popup/popup-foundation.js +0 -258
- package/esm/popup/popup.d.ts +0 -59
- package/esm/popup/popup.js +0 -102
- package/esm/ripple/forge-ripple.d.ts +0 -17
- package/esm/ripple/forge-ripple.js +0 -22
- package/esm/ripple/index.d.ts +0 -11
- package/esm/ripple/index.js +0 -15
- package/esm/ripple/ripple-adapter.d.ts +0 -23
- package/esm/ripple/ripple-adapter.js +0 -47
- package/esm/ripple/ripple-constants.d.ts +0 -15
- package/esm/ripple/ripple-constants.js +0 -19
- package/esm/ripple/ripple-foundation.d.ts +0 -30
- package/esm/ripple/ripple-foundation.js +0 -48
- package/esm/ripple/ripple.d.ts +0 -36
- package/esm/ripple/ripple.js +0 -65
- package/styles/backdrop/_mixins.scss +0 -31
- package/styles/backdrop/_variables.scss +0 -12
- package/styles/card/_mixins.scss +0 -47
- package/styles/card/_variables.scss +0 -9
- package/styles/chip-field/_base.scss +0 -299
- package/styles/chip-field/_mixins.scss +0 -26
- package/styles/chip-field/_selector.scss +0 -228
- package/styles/chip-field/_variables.scss +0 -76
- package/styles/dialog/_mixins.scss +0 -199
- package/styles/dialog/_variables.scss +0 -22
- package/styles/dialog/forge-dialog.scss +0 -8
- package/styles/field/_base.scss +0 -636
- package/styles/field/_selector.scss +0 -560
- package/styles/field/_utils.scss +0 -48
- package/styles/field/_variables.scss +0 -123
- package/styles/field-next/_core.scss +0 -213
- package/styles/floating-label/_mixins.scss +0 -291
- package/styles/floating-label/_variables.scss +0 -15
- package/styles/floating-label/forge-floating-label.scss +0 -8
- package/styles/form-field/_mixins.scss +0 -71
- package/styles/form-field/forge-form-field.scss +0 -8
- package/styles/icon/_mixins.scss +0 -37
- package/styles/icon/_variables.scss +0 -10
- package/styles/label-value/_mixins.scss +0 -205
- package/styles/label-value/_variables.scss +0 -12
- package/styles/popup/_mixins.scss +0 -86
- package/styles/popup/_variables.scss +0 -7
- package/styles/popup/forge-popup.scss +0 -8
- package/styles/popup/popup.scss +0 -20
- package/styles/ripple/forge-ripple.scss +0 -17
- package/styles/scaffold/_mixins.scss +0 -194
- package/styles/scaffold/forge-scaffold.scss +0 -43
- package/styles/select/select/_base.scss +0 -84
- package/styles/select/select/_mixins.scss +0 -25
- package/styles/select/select/_selector.scss +0 -90
- package/styles/select/select/_variables.scss +0 -16
- package/styles/stepper/step/_mixins.scss +0 -416
- package/styles/stepper/step/_variables.scss +0 -21
- package/styles/stepper/stepper/_mixins.scss +0 -113
- package/styles/toast/_mixins.scss +0 -242
- package/styles/toast/_variables.scss +0 -52
- /package/dist/esm/chunks/{chunk.YS5JZHJ6.js.map → chunk.24SQJBSQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IZRURH7C.js.map → chunk.3KAKJGUS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KDUH2DUE.js.map → chunk.473WRJ5G.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.USQEIRST.js.map → chunk.5MB6CTBA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.47U6GVGZ.js.map → chunk.5UOX22ML.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4NABD6XG.js.map → chunk.6VS3LYAF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AOSBUJWW.js.map → chunk.A7BCLPP4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7UBIT4NP.js.map → chunk.AG6IRMLZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.A4UH52SA.js.map → chunk.AGLI4WR4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WTUXAH7Z.js.map → chunk.AOVXNX7P.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AN2E2SSN.js.map → chunk.ASLHRT3N.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CBLUXYH2.js.map → chunk.BHE6Z5Y2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2WRAXA3H.js.map → chunk.BQ52JYLA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ROMRJIFR.js.map → chunk.CE35CVDV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZPXMKY72.js.map → chunk.CEGBMUSR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GBGGUYTE.js.map → chunk.CFAI4K3E.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZIGVO6FN.js.map → chunk.CGFSMACZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2537XOFQ.js.map → chunk.E2BE52ME.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UEYPCCFG.js.map → chunk.ENUKGA2U.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GA6AO6FJ.js.map → chunk.H5RW3A4M.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CSOKFDFQ.js.map → chunk.HSADKCGS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WBI34ZVP.js.map → chunk.IEABOPNB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.22C7GQLX.js.map → chunk.IL4S57WO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HMJODLAS.js.map → chunk.IQYOLMPG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GTKYO6VB.js.map → chunk.JGURMVW7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YXHMD73U.js.map → chunk.K6GJNDTY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QUWEAFGI.js.map → chunk.KEOLH7G3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BIQTNLIF.js.map → chunk.LNTTU2GL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2AM2BKEO.js.map → chunk.MFQRXVKO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JLSFTWPE.js.map → chunk.MTIPIEXA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JSTCCUKZ.js.map → chunk.OEI35LFU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QKYCMDLB.js.map → chunk.QCPV5DEG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.R3AWIPPK.js.map → chunk.QIZBZGYT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2XPAYTK4.js.map → chunk.QKTK5XUE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.R66CYS27.js.map → chunk.QTY25OTN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BSV27GU7.js.map → chunk.QVATEY5S.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SHBDQPPH.js.map → chunk.RONMNRSH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FRTSXX33.js.map → chunk.RSYEG2RW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.A6BIUNPW.js.map → chunk.RXBLU4OJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FBDRM4YN.js.map → chunk.S7KEO2CH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XU3YSZPA.js.map → chunk.SQ3AZAHF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.35MHQH7Z.js.map → chunk.SROEDYPL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PXRGQHWR.js.map → chunk.TQWZDM6T.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6JVMCBCR.js.map → chunk.UKBE2FMZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3L77JY5H.js.map → chunk.W4HANHUO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2W276VOR.js.map → chunk.WMJSYYXQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4AEQ7KVU.js.map → chunk.XTJGWT5F.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YNXWVL4B.js.map → chunk.YPNSK2CK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MPUP6QAP.js.map → chunk.YWJVZVZX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6XLTVIUD.js.map → chunk.ZA7JY3AY.js.map} +0 -0
- /package/dist/esm/{field-next → field}/base/index.js.map +0 -0
- /package/dist/esm/{field-next → field}/index.js.map +0 -0
- /package/esm/{field-next → field}/base/base-field-adapter.d.ts +0 -0
- /package/esm/{field-next → field}/base/base-field-adapter.js +0 -0
- /package/esm/{field-next → field}/base/base-field-constants.d.ts +0 -0
- /package/esm/{field-next → field}/base/base-field-constants.js +0 -0
- /package/esm/{field-next → field}/base/base-field-foundation.d.ts +0 -0
- /package/esm/{field-next → field}/base/base-field.d.ts +0 -0
- /package/esm/{field-next → field}/base/base-field.js +0 -0
- /package/esm/{field-next → field}/base/index.d.ts +0 -0
- /package/esm/{field-next → field}/base/index.js +0 -0
- /package/esm/{field-next → field}/index.d.ts +0 -0
- /package/esm/{field-next → field}/index.js +0 -0
- /package/styles/{field-next → field}/_core.slotted.scss +0 -0
- /package/styles/{field-next → field}/_core.state.scss +0 -0
- /package/styles/{field-next → field}/_token-utils.scss +0 -0
- /package/styles/{field-next → field}/index.scss +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/bottom-sheet/bottom-sheet-constants.ts", "../../src/bottom-sheet/bottom-sheet-adapter.ts", "../../src/bottom-sheet/bottom-sheet-foundation.ts", "../../src/bottom-sheet/bottom-sheet.ts", "../../src/bottom-sheet/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { BACKDROP_CONSTANTS } from '../backdrop';\nimport { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}bottom-sheet`;\n\nconst classes = {\n DRAGGING: 'forge-bottom-sheet--dragging',\n FULLSCREEN: 'forge-bottom-sheet--fullscreen',\n OPEN: 'forge-bottom-sheet--open',\n SCROLLABLE: 'forge-bottom-sheet--scrollable'\n};\n\nconst attributes = {\n BACKDROP_CLOSE: 'backdrop-close',\n ESCAPE_CLOSE: 'escape-close',\n FULLSCREEN: 'fullscreen',\n INITIAL_FOCUS: `${elementName}-focus`,\n OPEN: `${elementName}-open`,\n SHOW_BACKDROP: 'show-backdrop'\n};\n\nconst selectors = {\n BACKDROP: BACKDROP_CONSTANTS.elementName,\n CONTAINER: '.forge-bottom-sheet',\n CONTENT_BODY: '[forge-bottom-sheet-body]',\n INITIAL_FOCUS: `[${attributes.INITIAL_FOCUS}]`,\n HOST: `[${elementName}-host]`\n};\n\nconst events = {\n BEFORE_CLOSE: `forge-bottom-sheet-before-close`,\n CLOSE: `forge-bottom-sheet-close`,\n OPEN: `forge-bottom-sheet-open`,\n READY: `forge-bottom-sheet-ready`,\n DRAG_START: `forge-bottom-sheet-drag-start`,\n DRAGGED: `forge-bottom-sheet-dragged`,\n DRAG_END: `forge-bottom-sheet-drag-end`,\n DRAG_CANCEL: `forge-bottom-sheet-drag-cancel`,\n FULLSCREEN: `forge-bottom-sheet-fullscreen`\n};\n\nexport const BOTTOM_SHEET_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events\n};\n\nexport interface IBottomSheetDragEventData {\n y: number;\n}\n\nexport interface IBottomSheetDragStartEventData extends IBottomSheetDragEventData {}\n\nexport interface IBottomSheetDragContext {\n top: number;\n height: number;\n}\n", "import { getShadowElement, removeElement, deepQuerySelectorAll, toggleClass } from '@tylertech/forge-core';\nimport { BACKDROP_CONSTANTS, IBackdropComponent } from '../backdrop';\nimport { CHECKBOX_CONSTANTS } from '../checkbox';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { ICON_BUTTON_CONSTANTS } from '../icon-button';\nimport { RADIO_CONSTANTS } from '../radio';\nimport { SWITCH_CONSTANTS } from '../switch';\nimport { IBottomSheetComponent } from './bottom-sheet';\nimport { BOTTOM_SHEET_CONSTANTS } from './bottom-sheet-constants';\n\nexport interface IBottomSheetAdapter extends IBaseAdapter {\n initializeAccessibility(): void;\n setVisibility(visible: boolean): void;\n attach(): void;\n detach(): void;\n registerTransitionEndHandler: (handler: (evt: TransitionEvent) => void) => void;\n deregisterTransitionEndHandler: (handler: (evt: TransitionEvent) => void) => void;\n setBodyListener(type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions): void;\n removeBodyListener(type: string, listener: (evt: Event) => void): void;\n setDocumentListener(type: string, listener: (evt: Event) => void): void;\n removeDocumentListener(type: string, listener: (evt: Event) => void): void;\n registerBackdropClickHandler: (handler: (evt: CustomEvent) => void) => void;\n deregisterBackdropClickHandler: (handler: (evt: CustomEvent) => void) => void;\n getOpenBottomSheets: (selector: string) => NodeListOf<HTMLElement>;\n trySetInitialFocus: () => void;\n isScrollable(): boolean;\n isContentChild(el: HTMLElement): boolean;\n initScrollable(): void;\n setDragging(isDragging: boolean): void;\n setBackdropVisibility(value: boolean): void;\n setFullscreen(value: boolean): void;\n tryLayoutChildren(): void;\n setContainerHeight(height: number | null): void;\n getContainerBounds(): DOMRect;\n setDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;\n removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;\n setBodyScrollHandler(listener: (evt: Event) => void): void;\n}\n\n/**\n * Provides facilities for interacting with the internal DOM of `BottomSheetComponent`.\n */\nexport class BottomSheetAdapter extends BaseAdapter<IBottomSheetComponent> implements IBottomSheetAdapter {\n private _backdropElement: IBackdropComponent;\n private _containerElement: HTMLElement;\n\n constructor(component: IBottomSheetComponent) {\n super(component);\n this._backdropElement = getShadowElement(component, BOTTOM_SHEET_CONSTANTS.selectors.BACKDROP) as IBackdropComponent;\n this._containerElement = getShadowElement(component, BOTTOM_SHEET_CONSTANTS.selectors.CONTAINER);\n }\n\n public initializeAccessibility(): void {\n if (!this._component.hasAttribute('role')) {\n this._component.setAttribute('role', 'dialog');\n this._component.setAttribute('aria-modal', 'true');\n }\n }\n\n public setVisibility(visible: boolean): void {\n this.setBackdropVisibility(visible);\n toggleClass(this._containerElement, visible, BOTTOM_SHEET_CONSTANTS.classes.OPEN);\n }\n\n public attach(): void {\n const hostElement = document.querySelector(BOTTOM_SHEET_CONSTANTS.selectors.HOST) || document.body;\n hostElement.appendChild(this._component);\n }\n\n public detach(): void {\n removeElement(this._component);\n }\n\n public registerTransitionEndHandler(handler: (evt: TransitionEvent) => void): void {\n this._containerElement.addEventListener('transitionend', handler);\n }\n\n public deregisterTransitionEndHandler(handler: (evt: TransitionEvent) => void): void {\n this._containerElement.removeEventListener('transitionend', handler);\n }\n\n public setBodyListener(type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions): void {\n document.body.addEventListener(type, listener, options);\n }\n\n public removeBodyListener(type: string, listener: (evt: Event) => void): void {\n document.body.removeEventListener(type, listener);\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('click', handler);\n }\n\n public deregisterBackdropClickHandler(handler: (evt: CustomEvent) => void): void {\n this._backdropElement.removeEventListener('click', handler);\n }\n\n public getOpenBottomSheets(selector: string): NodeListOf<HTMLElement> {\n return document.querySelectorAll(selector);\n }\n\n public trySetInitialFocus(): void {\n const elements = deepQuerySelectorAll(this._component, BOTTOM_SHEET_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._getContentElement();\n return contentElement ? contentElement.scrollHeight > contentElement.offsetHeight : false;\n }\n\n public isContentChild(el: HTMLElement): boolean {\n const contentElement = this._getContentElement();\n return contentElement ? contentElement.contains(el) : false;\n }\n\n public initScrollable(): void {\n const isScrollable = this.isScrollable();\n toggleClass(this._component, isScrollable, BOTTOM_SHEET_CONSTANTS.classes.SCROLLABLE);\n toggleClass(this._containerElement, isScrollable, BOTTOM_SHEET_CONSTANTS.classes.SCROLLABLE);\n }\n\n public setDragging(isDragging: boolean): void {\n toggleClass(this._containerElement, isDragging, BOTTOM_SHEET_CONSTANTS.classes.DRAGGING);\n toggleClass(this._component, isDragging, BOTTOM_SHEET_CONSTANTS.classes.DRAGGING);\n }\n\n public setBackdropVisibility(value: boolean): void {\n window.requestAnimationFrame(() => {\n if (this._component.open) {\n this._backdropElement.fadeIn();\n } else {\n this._backdropElement.fadeOut();\n }\n });\n }\n\n public setFullscreen(value: boolean): void {\n toggleClass(this._containerElement, value, BOTTOM_SHEET_CONSTANTS.classes.FULLSCREEN);\n }\n\n public tryLayoutChildren(): void {\n const layoutChildren = [ICON_BUTTON_CONSTANTS.elementName, SWITCH_CONSTANTS.elementName, CHECKBOX_CONSTANTS.elementName, RADIO_CONSTANTS.elementName];\n const commonLayoutElements = Array.from(this._component.querySelectorAll(layoutChildren.join(','))) as any[];\n commonLayoutElements.filter(el => typeof el.layout === 'function').forEach(el => el.layout());\n }\n\n public setContainerHeight(height: number | null): void {\n if (height != null) {\n const percent = Math.min(100, 100 * height / window.innerHeight);\n this._containerElement.style.maxHeight = `${percent}%`;\n } else {\n this._containerElement.style.removeProperty('max-height');\n }\n }\n\n public getContainerBounds(): DOMRect {\n return this._containerElement.getBoundingClientRect() as DOMRect;\n }\n\n public setDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void {\n this._containerElement.addEventListener(type, listener);\n }\n\n public removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void {\n this._containerElement.removeEventListener(type, listener);\n }\n\n public setBodyScrollHandler(listener: (evt: MouseEvent) => void): void {\n const contentElement = this._getContentElement();\n if (contentElement) {\n contentElement.addEventListener('scroll', listener);\n }\n }\n\n private _getContentElement(): HTMLElement | null {\n const contentElements = Array.from(deepQuerySelectorAll(this._component, BOTTOM_SHEET_CONSTANTS.selectors.CONTENT_BODY, false)) as HTMLElement[];\n return contentElements.length ? contentElements[0] : null;\n }\n}\n", "import { ICustomElementFoundation, getEventPath } from '@tylertech/forge-core';\n\nimport { IBottomSheetAdapter } from './bottom-sheet-adapter';\nimport { BOTTOM_SHEET_CONSTANTS, IBottomSheetDragContext, IBottomSheetDragStartEventData } from './bottom-sheet-constants';\n\nexport interface IBottomSheetFoundation extends ICustomElementFoundation {\n backdropClose: boolean;\n escapeClose: boolean;\n open: boolean;\n fullscreen: boolean;\n showBackdrop: boolean;\n openCallback: () => void | Promise<void>;\n closeCallback: () => void | Promise<void>;\n beforeCloseCallback: () => boolean | Promise<boolean>;\n}\n\nexport class BottomSheetFoundation implements IBottomSheetFoundation {\n private _open = false;\n private _backdropClose = true;\n private _escapeClose = true;\n private _fullscreen = false;\n private _showBackdrop = false;\n private _openCallback: () => void | Promise<void>;\n private _closeCallback: () => void | Promise<void>;\n private _beforeCloseCallback: () => boolean | Promise<boolean>;\n private _openTransitionEndHandler: (evt: TransitionEvent) => void;\n private _closeTransitionEndHandler: (evt: TransitionEvent) => void;\n private _documentKeydownHandler: (evt: KeyboardEvent) => void;\n private _backdropClickHandler: (evt: CustomEvent) => void;\n private _isDragging = false;\n private _dragContext: IBottomSheetDragContext | undefined;\n private _lastPosition: { y: number; clientY: number } | undefined;\n private _bodyScrollHandler = (): void => this._onBodyScroll();\n private _dragStartHandler = ($event: MouseEvent): void => this._onDragStart($event);\n private _dragMoveHandler = ($event: MouseEvent): void => this._onDragMove($event);\n private _dragEndHandler = (): void => this._onDragEnd();\n private _dragCancelHandler = (): void => this._onDragCancel();\n\n constructor(public _adapter: IBottomSheetAdapter) {\n this._openTransitionEndHandler = (_evt: TransitionEvent) => this._onOpenTransitionEnd();\n this._closeTransitionEndHandler = (_evt: TransitionEvent) => this._onCloseTransitionEnd();\n this._documentKeydownHandler = (evt: KeyboardEvent) => this._onDocumentKeydown(evt);\n this._backdropClickHandler = (evt: CustomEvent) => this._onBackdropClick(evt);\n }\n\n public initialize(): void {\n this._adapter.initializeAccessibility();\n }\n\n public destroy(): void {\n if (this._open) {\n this._adapter.deregisterTransitionEndHandler(this._openTransitionEndHandler);\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n }\n\n private _setOpen(open: boolean): void {\n this._open = open;\n if (this._open) {\n this._openBottomSheet();\n } else {\n this._closeBottomSheet();\n }\n this._adapter.toggleHostAttribute(BOTTOM_SHEET_CONSTANTS.attributes.OPEN, this._open);\n }\n\n private _openBottomSheet(): void {\n this._adapter.attach();\n this._adapter.setBodyAttribute(BOTTOM_SHEET_CONSTANTS.attributes.OPEN, 'true');\n this._adapter.registerTransitionEndHandler(this._openTransitionEndHandler);\n this._setDocumentKeydownListener(this._escapeClose);\n this._setBackdropClickListener(this._backdropClose);\n\n // Ensure transitions are triggered properly\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n this._adapter.setVisibility(true);\n this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.OPEN);\n this._adapter.trySetInitialFocus();\n this._adapter.initScrollable();\n });\n });\n }\n\n private _closeBottomSheet(): void {\n this._adapter.deregisterTransitionEndHandler(this._openTransitionEndHandler);\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n this._adapter.registerTransitionEndHandler(this._closeTransitionEndHandler);\n\n this._adapter.setVisibility(false);\n }\n\n private _onCloseTransitionEnd(): void {\n this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.CLOSE);\n this._adapter.detach();\n const openBottomSheets = this._adapter.getOpenBottomSheets(BOTTOM_SHEET_CONSTANTS.elementName);\n if (!openBottomSheets.length) {\n this._adapter.removeBodyAttribute(BOTTOM_SHEET_CONSTANTS.attributes.OPEN);\n }\n }\n\n private _onOpenTransitionEnd(): void {\n if (!this._open) {\n return;\n }\n this._adapter.deregisterTransitionEndHandler(this._openTransitionEndHandler);\n this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.READY);\n this._adapter.tryLayoutChildren();\n if (this._adapter.isScrollable()) {\n this._initScrollableHandlers();\n }\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(BOTTOM_SHEET_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());\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) {\n this._adapter.registerBackdropClickHandler(this._backdropClickHandler);\n } else {\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n }\n\n private _setDocumentKeydownListener(attach: boolean): void {\n if (!this._open) {\n return;\n }\n\n if (attach) {\n this._adapter.addDocumentListener('keydown', this._documentKeydownHandler);\n } else {\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n }\n }\n\n /** Controls whether clicking the backdrop closes the bottom sheet or not. */\n public set backdropClose(value: boolean) {\n value = Boolean(value);\n if (this._backdropClose !== value) {\n this._backdropClose = value;\n this._setBackdropClickListener(this._backdropClose);\n this._adapter.toggleHostAttribute(BOTTOM_SHEET_CONSTANTS.attributes.BACKDROP_CLOSE, this._backdropClose);\n }\n }\n public get backdropClose(): boolean {\n return this._backdropClose;\n }\n\n /** Controls whether pressing the escape key closes the sheet 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 this._adapter.toggleHostAttribute(BOTTOM_SHEET_CONSTANTS.attributes.ESCAPE_CLOSE, this._escapeClose);\n }\n }\n public get escapeClose(): boolean {\n return this._escapeClose;\n }\n\n public get open(): boolean {\n return this._open;\n }\n\n public set open(value: boolean) {\n if (this._open !== value) {\n value = Boolean(value);\n if (value !== this._open) {\n const callback = value ? this._openCallback : this._closeCallback;\n if (callback) {\n Promise.resolve(callback())\n .then(() => {\n this._setOpen(value);\n })\n .catch(() => { });\n } else {\n this._setOpen(value);\n }\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.toggleHostAttribute(BOTTOM_SHEET_CONSTANTS.attributes.FULLSCREEN, this._fullscreen);\n }\n }\n\n public get showBackdrop(): boolean {\n return this._showBackdrop;\n }\n public set showBackdrop(value: boolean) {\n if (this._showBackdrop !== value) {\n this._showBackdrop = value;\n this._adapter.setBackdropVisibility(value);\n this._adapter.toggleHostAttribute(BOTTOM_SHEET_CONSTANTS.attributes.SHOW_BACKDROP, this._showBackdrop);\n }\n }\n\n public get openCallback(): () => void | Promise<void> {\n return this._openCallback;\n }\n public set openCallback(callback: () => void | Promise<void>) {\n this._openCallback = callback;\n }\n\n public get closeCallback(): () => void | Promise<void> {\n return this._closeCallback;\n }\n public set closeCallback(callback: () => void | Promise<void>) {\n this._closeCallback = callback;\n }\n\n public get beforeCloseCallback(): () => boolean | Promise<boolean> {\n return this._beforeCloseCallback;\n }\n public set beforeCloseCallback(callback: () => boolean | Promise<boolean>) {\n this._beforeCloseCallback = callback;\n }\n\n /** If scrollable, allow drag to/from fullscreen, and make fullscreen on scroll. */\n private _initScrollableHandlers(): void {\n if (!this._fullscreen && this._adapter.isScrollable()) {\n this._adapter.setDragTargetHandler('mousedown', this._dragStartHandler);\n this._adapter.setDragTargetHandler('touchstart', this._dragStartHandler);\n this._adapter.setBodyScrollHandler(this._bodyScrollHandler);\n }\n }\n\n private _onBodyScroll(): void {\n if (!this._fullscreen && !this._isDragging) {\n this.fullscreen = true;\n this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.FULLSCREEN, this._fullscreen);\n }\n }\n\n private _onDragStart(evt: MouseEvent | TouchEvent): void {\n if (this._fullscreen) {\n const eventPath = getEventPath(evt);\n const isWithinScrollContainer = this._adapter.isScrollable() && this._adapter.isContentChild(eventPath[0]);\n if (isWithinScrollContainer) {\n // We ignore drag events that originate from within the scrollable content when in full screen mode (to allow for scroll interactions)\n return;\n }\n }\n\n evt.stopPropagation();\n const bounds = this._adapter.getContainerBounds();\n const clientY = evt instanceof MouseEvent ? evt.clientY : evt.touches[0].clientY;\n this._dragContext = {\n top: clientY - bounds.top,\n height: bounds.height\n };\n this._adapter.setBodyListener('mousemove', this._dragMoveHandler, { passive: false });\n this._adapter.setBodyListener('touchmove', this._dragMoveHandler, { passive: false });\n this._adapter.setBodyListener('mouseup', this._dragEndHandler);\n this._adapter.setBodyListener('touchend', this._dragEndHandler);\n this._adapter.setBodyListener('touchcancel', this._dragCancelHandler);\n }\n\n private _onDragMove(evt: MouseEvent | TouchEvent): void {\n evt.stopPropagation();\n evt.preventDefault();\n if (!this._dragContext) {\n return;\n }\n const clientY = evt instanceof MouseEvent ? evt.clientY : evt.touches[0].clientY;\n const height = { y: window.innerHeight - clientY + this._dragContext.top };\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._isDragging) {\n this._isDragging = true;\n const canDrag = this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.DRAG_START, height as IBottomSheetDragStartEventData, true, true);\n if (!canDrag) {\n return;\n }\n this._adapter.setDragging(true);\n }\n\n // If not fullscreen, clamp to minimum of original height.\n const newPosition = this._fullscreen ? height : { y: Math.max(height.y, this._dragContext.height) };\n\n // Only update the position if it actually changed\n if (!this._lastPosition || newPosition.y !== this._lastPosition.y) {\n const canMove = this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.DRAGGED, newPosition as IBottomSheetDragStartEventData, true, true);\n if (canMove) {\n this._lastPosition = { ...newPosition, clientY };\n this._adapter.setContainerHeight(newPosition.y);\n }\n }\n }\n\n private _onDragEnd(): void {\n if (this._lastPosition) {\n const clientY = this._lastPosition.clientY;\n const dragContext = this._dragContext;\n if (dragContext) {\n if (this._fullscreen && clientY > 0) {\n this.fullscreen = false;\n this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.FULLSCREEN, this._fullscreen);\n } else if (!this._fullscreen && clientY < dragContext.height + dragContext.top) {\n this.fullscreen = true;\n this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.FULLSCREEN, this._fullscreen);\n }\n }\n }\n if (this._isDragging) {\n this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.DRAG_END);\n }\n this._dragComplete();\n }\n\n private _onDragCancel(): void {\n if (this._isDragging) {\n this._adapter.emitHostEvent(BOTTOM_SHEET_CONSTANTS.events.DRAG_CANCEL);\n }\n this._dragComplete();\n }\n\n private _dragComplete(): void {\n this._adapter.setDragging(false);\n this._adapter.removeBodyListener('mousemove', this._dragMoveHandler);\n this._adapter.removeBodyListener('touchmove', this._dragMoveHandler);\n this._adapter.removeBodyListener('mouseup', this._dragEndHandler);\n this._adapter.removeBodyListener('touchend', this._dragEndHandler);\n this._adapter.removeBodyListener('touchcancel', this._dragCancelHandler);\n this._adapter.setContainerHeight(null);\n this._lastPosition = undefined;\n this._dragContext = undefined;\n this._isDragging = false;\n }\n}\n", "import { attachShadowTemplate, CustomElement, FoundationProperty, ICustomElement, upgradeProperty, coerceBoolean } from '@tylertech/forge-core';\n\nimport { BackdropComponent } from '../backdrop';\nimport { BottomSheetAdapter } from './bottom-sheet-adapter';\nimport { BOTTOM_SHEET_CONSTANTS, IBottomSheetDragEventData, IBottomSheetDragStartEventData } from './bottom-sheet-constants';\nimport { BottomSheetFoundation } from './bottom-sheet-foundation';\n\nconst template = '<template><forge-backdrop fixed part=\\\"backdrop\\\"></forge-backdrop><div class=\\\"forge-bottom-sheet\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = '.forge-bottom-sheet{background-color:#fff;background-color:var(--mdc-theme-surface,#fff);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);border-radius:4px 4px 0 0;border-radius:var(--forge-bottom-sheet-border-radius,4px 4px 0 0);max-width:50%;max-width:var(--forge-bottom-sheet-desktop-max-width,50%);z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;bottom:0;right:0;left:0;max-height:50%;margin:0 auto;display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,-webkit-transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1);transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,-webkit-transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1);transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1);transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1),-webkit-transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1)}@media (max-width:600px){.forge-bottom-sheet{max-width:100%;width:100%;margin:0;border-radius:0}}.forge-bottom-sheet--open{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transition-duration:var(--forge-bottom-sheet-transition-duration, 250ms);transition-duration:var(--forge-bottom-sheet-transition-duration, 250ms)}.forge-bottom-sheet--fullscreen.forge-bottom-sheet--open{height:100%;max-height:100%;-webkit-transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in;transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in}.forge-bottom-sheet--dragging{-webkit-transition:none!important;transition:none!important}.forge-bottom-sheet--scrollable{height:100%}:host{z-index:8;z-index:var(--forge-z-index-dialog,8);position:fixed}:host([hidden]){display:none}';\n\nexport interface IBottomSheetComponent extends ICustomElement {\n showBackdrop: boolean;\n backdropClose: boolean;\n escapeClose: boolean;\n open: boolean;\n fullscreen: boolean;\n openCallback: () => void | Promise<void>;\n closeCallback: () => void | Promise<void>;\n beforeCloseCallback: () => boolean | Promise<boolean>;\n}\n\ndeclare global {\n // tslint:disable-next-line: interface-name\n interface HTMLElementTagNameMap {\n 'forge-bottom-sheet': IBottomSheetComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-bottom-sheet-open': CustomEvent<void>;\n 'forge-bottom-sheet-close': CustomEvent<void>;\n 'forge-bottom-sheet-before-close': CustomEvent<void>;\n 'forge-bottom-sheet-before-open': CustomEvent<void>;\n 'forge-bottom-sheet-ready': CustomEvent<void>;\n 'forge-bottom-sheet-drag-start': CustomEvent<IBottomSheetDragStartEventData>;\n 'forge-bottom-sheet-dragged': CustomEvent<IBottomSheetDragEventData>;\n 'forge-bottom-sheet-drag-end': CustomEvent<void>;\n 'forge-bottom-sheet-drag-cancel': CustomEvent<void>;\n 'forge-bottom-sheet-fullscreen': CustomEvent<boolean>;\n }\n}\n\n/**\n * The web component class behind the `<forge-bottom-sheet>` custom element.\n * \n * @tag forge-bottom-sheet\n */\n@CustomElement({\n name: BOTTOM_SHEET_CONSTANTS.elementName,\n dependencies: [BackdropComponent]\n})\nexport class BottomSheetComponent extends HTMLElement implements IBottomSheetComponent {\n public static get observedAttributes(): string[] {\n return [\n BOTTOM_SHEET_CONSTANTS.attributes.BACKDROP_CLOSE,\n BOTTOM_SHEET_CONSTANTS.attributes.ESCAPE_CLOSE,\n BOTTOM_SHEET_CONSTANTS.attributes.OPEN,\n BOTTOM_SHEET_CONSTANTS.attributes.FULLSCREEN,\n BOTTOM_SHEET_CONSTANTS.attributes.SHOW_BACKDROP\n ];\n }\n\n private _foundation: BottomSheetFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new BottomSheetFoundation(new BottomSheetAdapter(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 BOTTOM_SHEET_CONSTANTS.attributes.BACKDROP_CLOSE:\n this.backdropClose = coerceBoolean(newValue);\n break;\n case BOTTOM_SHEET_CONSTANTS.attributes.ESCAPE_CLOSE:\n this.escapeClose = coerceBoolean(newValue);\n break;\n case BOTTOM_SHEET_CONSTANTS.attributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n case BOTTOM_SHEET_CONSTANTS.attributes.FULLSCREEN:\n this.fullscreen = coerceBoolean(newValue);\n break;\n case BOTTOM_SHEET_CONSTANTS.attributes.SHOW_BACKDROP:\n this.showBackdrop = coerceBoolean(newValue);\n break;\n }\n }\n\n /** Controls whether clicking the backdrop closes the bottom-sheet or not. Default is true. */\n @FoundationProperty()\n public declare backdropClose: boolean;\n\n /** Controls whether pressing the escape key closes the bottom-sheet or not. Default is true. */\n @FoundationProperty()\n public declare escapeClose: boolean;\n\n /** Controls whether the bottom-sheet is open or not. Default is false. */\n @FoundationProperty()\n public declare open: boolean;\n\n /** Controls whether the bottom-sheet is full screen or not. Default is false. */\n @FoundationProperty()\n public declare fullscreen: boolean;\n\n /** Shows a backdrop to prevent interacting with other content until the bottom sheet is dismissed. Default is false. */\n @FoundationProperty()\n public declare showBackdrop: boolean;\n\n /** The function to call when the bottom-sheet wants to open. */\n @FoundationProperty()\n public declare openCallback: () => void | Promise<void>;\n\n /** the function to call when the bottom-sheet wants to close. */\n @FoundationProperty()\n public declare closeCallback: () => void | Promise<void>;\n\n /** the function to call when the bottom-sheet wants to close. */\n @FoundationProperty()\n public declare beforeCloseCallback: () => boolean | Promise<boolean>;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { BottomSheetComponent } from './bottom-sheet';\n\nexport * from './bottom-sheet-adapter';\nexport * from './bottom-sheet-constants';\nexport * from './bottom-sheet-foundation';\nexport * from './bottom-sheet';\n\nexport function defineBottomSheetComponent(): void {\n defineCustomElement(BottomSheetComponent);\n}\n"],
|
|
5
|
+
"mappings": "2jBAGA,IAAMA,EAA2C,GAAGC,gBAE9CC,EAAU,CACd,SAAU,+BACV,WAAY,iCACZ,KAAM,2BACN,WAAY,gCACd,EAEMC,EAAa,CACjB,eAAgB,iBAChB,aAAc,eACd,WAAY,aACZ,cAAe,GAAGH,UAClB,KAAM,GAAGA,SACT,cAAe,eACjB,EAEMI,EAAY,CAChB,SAAUC,EAAmB,YAC7B,UAAW,sBACX,aAAc,4BACd,cAAe,IAAIF,EAAW,iBAC9B,KAAM,IAAIH,SACZ,EAEMM,EAAS,CACb,aAAc,kCACd,MAAO,2BACP,KAAM,0BACN,MAAO,2BACP,WAAY,gCACZ,QAAS,6BACT,SAAU,8BACV,YAAa,iCACb,WAAY,+BACd,EAEaC,EAAyB,CACpC,YAAAP,EACA,QAAAE,EACA,UAAAE,EACA,WAAAD,EACA,OAAAG,CACF,ECLO,IAAME,EAAN,cAAiCC,CAAkE,CAIx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AAMP,EAAuB,YAC7B,aAAc,CAACQ,CAAiB,CAClC,CAAC,GACYZ,GCzCN,SAASa,IAAmC,CACjDC,EAAoBC,CAAoB,CAC1C",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "attributes", "selectors", "BACKDROP_CONSTANTS", "events", "BOTTOM_SHEET_CONSTANTS", "BottomSheetAdapter", "BaseAdapter", "component", "getShadowElement", "BOTTOM_SHEET_CONSTANTS", "visible", "toggleClass", "removeElement", "handler", "type", "listener", "options", "selector", "elements", "deepQuerySelectorAll", "contentElement", "el", "isScrollable", "isDragging", "value", "layoutChildren", "ICON_BUTTON_CONSTANTS", "SWITCH_CONSTANTS", "CHECKBOX_CONSTANTS", "RADIO_CONSTANTS", "height", "percent", "contentElements", "BottomSheetFoundation", "_adapter", "$event", "_evt", "evt", "open", "BOTTOM_SHEET_CONSTANTS", "err", "attach", "value", "callback", "eventPath", "getEventPath", "bounds", "clientY", "height", "newPosition", "__spreadProps", "__spreadValues", "dragContext", "template", "styles", "BottomSheetComponent", "attachShadowTemplate", "BottomSheetFoundation", "BottomSheetAdapter", "BOTTOM_SHEET_CONSTANTS", "name", "_oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "BackdropComponent", "defineBottomSheetComponent", "defineCustomElement", "BottomSheetComponent"]
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as t,b as p,e as C}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as t,b as p,e as C}from"./chunk.NWVQ5HK2.js";import{a as b}from"./chunk.VRSPT7WX.js";import{a as d,e as c,k as m}from"./chunk.LNTTU2GL.js";import{k as n}from"./chunk.J2M2MXP2.js";import{d as l}from"./chunk.M3QDAYD2.js";var _='<template><div class="forge-chip-set" part="root"><slot></slot></div></template>',f=":host{display:inline-block}:host([hidden]){display:none}.forge-chip-set{--_chip-set-spacing:var(--forge-chip-set-spacing, var(--forge-spacing-xsmall, 8px))}.forge-chip-set{display:-webkit-box;display:flex;flex-wrap:wrap;gap:var(--_chip-set-spacing)}:host([vertical]) .forge-chip-set{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}",r=class extends m{constructor(){super();this._vertical=!1;this._type=p.defaults.TYPE;this._dense=!1;this._disabled=!1;this._invalid=!1;this._theme=p.defaults.THEME;c(this,_,f)}static get observedAttributes(){return Object.values(t.observedAttributes)}connectedCallback(){this.addEventListener(p.events.NAVIGATE,this._onChipNavigate.bind(this))}attributeChangedCallback(e,o,i){switch(e){case t.observedAttributes.VERTICAL:this.vertical=n(i);break;case t.observedAttributes.TYPE:this.type=i;break;case t.observedAttributes.DENSE:this.dense=n(i);break;case t.observedAttributes.DISABLED:this.disabled=n(i);break;case t.observedAttributes.INVALID:this.invalid=n(i);break;case t.observedAttributes.THEME:this.theme=i;break}}_onChipNavigate(e){let o=this._findChipDescendants().filter(h=>!h.disabled),i=o.findIndex(h=>h===e.target),a=e.detail.direction==="previous"?i-1:i+1;a>o.length-1&&(a=0);let s=o.at(a);(s==null?void 0:s.type)==="input"&&e.detail.direction==="previous"?s.focusRemoveButton():s==null||s.focus()}_findChipDescendants(){return Array.from(this.querySelectorAll(p.elementName))}_syncChipsProperty(e,o){this._findChipDescendants().forEach(a=>a[e]=o)}get vertical(){return this._vertical}set vertical(e){e=!!e,this._vertical!==e&&(this._vertical=e,this.toggleAttribute(t.attributes.VERTICAL,this._vertical))}get type(){return this._type}set type(e){this._type!==e&&(this._type=e,this._syncChipsProperty("type",this._type),this.setAttribute(t.attributes.TYPE,this._type))}get dense(){return this._dense}set dense(e){e=!!e,this._dense!==e&&(this._dense=e,this._syncChipsProperty("dense",this._dense),this.toggleAttribute(t.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(e){e=!!e,this._disabled!==e&&(this._disabled=e,this._syncChipsProperty("disabled",this._disabled),this.toggleAttribute(t.attributes.DISABLED,this._disabled))}get invalid(){return this._invalid}set invalid(e){e=!!e,this._invalid!==e&&(this._invalid=e,this._syncChipsProperty("invalid",this._invalid),this.toggleAttribute(t.attributes.INVALID,this._invalid))}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this._syncChipsProperty("theme",this._theme),this.setAttribute(t.attributes.THEME,this._theme))}};r=l([b({name:t.elementName,dependencies:[C]})],r);function H(){d(r)}export{r as a,H as b};
|
|
7
|
+
//# sourceMappingURL=chunk.WMJSYYXQ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{b as t}from"./chunk.VRSPT7WX.js";import{a as o,b as r}from"./chunk.M3QDAYD2.js";var e=`${t}popover`,s={ARROW:"arrow",ANIMATION_TYPE:"animation-type",TRIGGER_TYPE:"trigger-type",LONGPRESS_DELAY:"longpress-delay",PERSISTENT_HOVER:"persistent-hover",HOVER_DELAY:"hover-delay",HOVER_DISMISS_DELAY:"hover-dismiss-delay",PRESET:"preset"},p=r(o({},s),{OPEN:"open",HOST:"forge-popover-host",CONSTRAIN_VIEWPORT_WIDTH:"constrain-viewport-width"}),n={ARROW:"arrow",EXITING:"exiting"},E={SURFACE:".forge-popover",HOST:`:is(forge-dialog,forge-popover,[${p.HOST}])`},i={ARROW:"arrow"},T={BEFORETOGGLE:`${e}-beforetoggle`,TOGGLE:`${e}-toggle`},a={TRIGGER_TYPE:"click",HOVER_DELAY:0,PRESET:"popover"},R={elementName:e,observedAttributes:s,attributes:p,classes:n,selectors:E,parts:i,events:T,defaults:a},P=500;export{R as a,P as b};
|
|
7
|
+
//# sourceMappingURL=chunk.WXVVOFNK.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/popover/popover-constants.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\nimport { OverlayLightDismissReason } from '../overlay';\n\nconst elementName = `${COMPONENT_NAME_PREFIX}popover`;\n\nconst observedAttributes = {\n ARROW: 'arrow',\n ANIMATION_TYPE: 'animation-type',\n TRIGGER_TYPE: 'trigger-type',\n LONGPRESS_DELAY: 'longpress-delay',\n PERSISTENT_HOVER: 'persistent-hover',\n HOVER_DELAY: 'hover-delay',\n HOVER_DISMISS_DELAY: 'hover-dismiss-delay',\n PRESET: 'preset'\n};\n\nconst attributes = {\n ...observedAttributes,\n OPEN: 'open',\n HOST: 'forge-popover-host',\n CONSTRAIN_VIEWPORT_WIDTH: 'constrain-viewport-width'\n};\n\nconst classes = {\n ARROW: 'arrow',\n EXITING: 'exiting'\n};\n\nconst selectors = {\n SURFACE: '.forge-popover',\n HOST: `:is(forge-dialog,forge-popover,[${attributes.HOST}])`\n};\n\nconst parts = {\n ARROW: 'arrow'\n};\n\nconst events = {\n BEFORETOGGLE: `${elementName}-beforetoggle`,\n TOGGLE: `${elementName}-toggle`\n};\n\nconst defaults = {\n TRIGGER_TYPE: 'click' as PopoverTriggerType,\n HOVER_DELAY: 0,\n PRESET: 'popover' as PopoverPreset\n};\n\nexport const POPOVER_CONSTANTS = {\n elementName,\n observedAttributes,\n attributes,\n classes,\n selectors,\n parts,\n events,\n defaults\n};\n\nexport const POPOVER_HOVER_TIMEOUT = 500;\n\nexport type PopoverAnimationType = 'none' | 'zoom' | 'slide' | 'fade';\nexport type PopoverTriggerType = 'click' | 'hover' | 'focus' | 'longpress' | 'doubleclick' | 'contextmenu' | 'manual';\nexport type PopoverDismissReason = OverlayLightDismissReason | PopoverTriggerType | 'destroy';\nexport type PopoverPreset = 'popover' | 'dropdown';\n\nexport interface IPopoverToggleEventData {\n newState: 'closed' | 'open';\n oldState: 'closed' | 'open';\n}\n"],
|
|
5
|
+
"mappings": "uFAGA,IAAMA,EAAc,GAAGC,WAEjBC,EAAqB,CACzB,MAAO,QACP,eAAgB,iBAChB,aAAc,eACd,gBAAiB,kBACjB,iBAAkB,mBAClB,YAAa,cACb,oBAAqB,sBACrB,OAAQ,QACV,EAEMC,EAAaC,EAAAC,EAAA,GACdH,GADc,CAEjB,KAAM,OACN,KAAM,qBACN,yBAA0B,0BAC5B,GAEMI,EAAU,CACd,MAAO,QACP,QAAS,SACX,EAEMC,EAAY,CAChB,QAAS,iBACT,KAAM,mCAAmCJ,EAAW,QACtD,EAEMK,EAAQ,CACZ,MAAO,OACT,EAEMC,EAAS,CACb,aAAc,GAAGT,iBACjB,OAAQ,GAAGA,UACb,EAEMU,EAAW,CACf,aAAc,QACd,YAAa,EACb,OAAQ,SACV,EAEaC,EAAoB,CAC/B,YAAAX,EACA,mBAAAE,EACA,WAAAC,EACA,QAAAG,EACA,UAAAC,EACA,MAAAC,EACA,OAAAC,EACA,SAAAC,CACF,EAEaE,EAAwB",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "observedAttributes", "attributes", "__spreadProps", "__spreadValues", "classes", "selectors", "parts", "events", "defaults", "POPOVER_CONSTANTS", "POPOVER_HOVER_TIMEOUT"]
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as H,b as K,c as U,d as q,e as G}from"./chunk.4AEQ7KVU.js";import{E as z}from"./chunk.MDDX4MJU.js";import{F as B}from"./chunk.MC3UAHWS.js";import{a}from"./chunk.44IUAOBP.js";import{e as S}from"./chunk.G2HRYIIZ.js";import{a as N}from"./chunk.RJC42RNR.js";import{a as O}from"./chunk.SHBDQPPH.js";import{e as g}from"./chunk.UV3WIHCM.js";import{c as w}from"./chunk.SYKZ74SL.js";import{m as A}from"./chunk.RLQB7224.js";import{d as R,l as x}from"./chunk.CIUPY66Y.js";import{e as l}from"./chunk.QG5EYBS3.js";import{b as E}from"./chunk.XIQFHO5R.js";import{a as L}from"./chunk.XU3YSZPA.js";import{a as D}from"./chunk.NVUMRW44.js";import{a as F,b as M}from"./chunk.UQQQSJVM.js";import{a as y,e as P,h as v}from"./chunk.BIQTNLIF.js";import{a as V}from"./chunk.MGLWXAZO.js";import{s as b,u as k}from"./chunk.DCCFF327.js";import{f as I,g as C}from"./chunk.J2M2MXP2.js";import{d as h}from"./chunk.M3QDAYD2.js";var d=`${M}date-range-picker`,_=class u{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new u(this)}},W={FROM:"from",TO:"to",END_VALUE:"end-value"},j={INPUT:"input"},X={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},n={elementName:d,selectors:j,events:X,observedAttributes:W};var m=class extends q{constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(n.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(n.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${n.elementName} requires two inputs`);let t=this._createInputSeparator();this._fromInputElement.insertAdjacentElement("afterend",t)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new B(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new E(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new E(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier))}addInputListener(t,e,i){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:i})}addToInputListener(t,e,i){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:i})}removeInputListener(t,e){var i;(i=this._fromInputElement)==null||i.removeEventListener(t,e)}removeToInputListener(t,e){var i;(i=this._toInputElement)==null||i.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let i=g(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(i)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=g(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=b(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){v(this._fromInputElement,t,e)}emitToInputEvent(t,e){v(this._toInputElement,t,e)}_createToggleElement(){return U("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}_createInputSeparator(){let t=document.createElement("span");return k(t,!0,N.attributes.MULTI_INPUT_SEPARATOR),t.setAttribute("aria-hidden","true"),t.textContent="-",t}};var c=class extends G{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(),this._toInputBlurListener=e=>this._onToInputBlur(e)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let i=this._getTypedValue(t&&t.from||null),o=this._getTypedValue(t&&t.to||null),p=new _({from:i,to:o});return this._adapter.emitHostEvent(n.events.CHANGE,p,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new a({from:this._from||t,to:this._to||void 0}):new a({from:t});this._isDateRangeAcceptable(e)&&(this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t))}_onClear(){this._onDateSelected({date:null,range:new a,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(C(e)&&this._isDateValueAcceptable(e)){let i=this._formatDate(e);i&&this._adapter.setToInputValue(i,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(t){if(!(t!=null&&t.to))return!0;let e=()=>this._isDateValueAcceptable(t.from),i=()=>this._isDateValueAcceptable(t.to),o=()=>t!=null&&t.from&&(t!=null&&t.to)?t.from.getTime()<=t.to.getTime():!0;return e()&&i()&&o()}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let i=this._formatDate(e&&e.from||null),o=this._formatDate(e&&e.to||null);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._adapter.setToInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(o?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeToMask(){if(!this._masked)return;let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,i,o,p)=>this._prepareMaskCallback.call(null,e,i,o,p)),this._adapter.initializeToMask(t)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,e),!l(i,this._from)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(n.events.INPUT,e),!l(i,this._to)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(t){this._masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(t){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(t.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);l(i,this._from)||(this.from=i,this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);l(i,this._to)||(this.to=i,this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){t||(t={from:null,to:null}),t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to}}get from(){let t=this._getTypedValue(this._from);return t?I(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new a({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?I(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new a({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var J="<template><slot></slot></template>",Q=":host{display:block}:host([hidden]){display:none}",s=class extends K{constructor(){super();R.define(A),P(this,J,Q),this._foundation=new c(new m(this))}static get observedAttributes(){return[...Object.values(H.observedAttributes),n.observedAttributes.FROM,n.observedAttributes.TO]}attributeChangedCallback(t,e,i){switch(t){case n.observedAttributes.FROM:this.from=i;return;case n.observedAttributes.TO:this.to=i;return}super.attributeChangedCallback(t,e,i)}};h([D()],s.prototype,"from",2),h([D()],s.prototype,"to",2),s=h([F({name:n.elementName,dependencies:[S,z,w,x]})],s);var $=class extends L{constructor(t){super(t)}_build(){let t=document.createElement(n.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector("input:first-of-type")}get toInput(){return this._textField.querySelector("input:last-of-type")}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(n.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var i,o,p,f,T;this._textField=document.createElement(O.elementName),(i=this._config.options)!=null&&i.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((p=this._config.options)==null?void 0:p.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((f=this._config.options)==null?void 0:f.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((T=this._config.options)==null?void 0:T.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function jt(){y(s)}export{_ as a,n as b,m as c,c as d,s as e,$ as f,jt as g};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as H,b as K,c as U,d as q,e as G}from"./chunk.XTJGWT5F.js";import{E as z}from"./chunk.UPSXYWPD.js";import{a}from"./chunk.44IUAOBP.js";import{F as B}from"./chunk.BV7EAQST.js";import{c as S}from"./chunk.USTVZ6MZ.js";import{a as N}from"./chunk.RFT3BAJ2.js";import{a as O}from"./chunk.RONMNRSH.js";import{e as g}from"./chunk.UV3WIHCM.js";import{d as w}from"./chunk.GIENHEMN.js";import{m as A}from"./chunk.RLQB7224.js";import{d as R,l as x}from"./chunk.T7NWP7DB.js";import{a as L}from"./chunk.SQ3AZAHF.js";import{e as l}from"./chunk.J2Y5KPON.js";import{b as E}from"./chunk.XIQFHO5R.js";import{a as D}from"./chunk.NVUMRW44.js";import{a as F,b as M}from"./chunk.VRSPT7WX.js";import{a as y,e as P,h as v}from"./chunk.LNTTU2GL.js";import{p as b,r as k}from"./chunk.L4QSPQDE.js";import{a as V}from"./chunk.DJSHVUEM.js";import{f as I,g as C}from"./chunk.J2M2MXP2.js";import{d as h}from"./chunk.M3QDAYD2.js";var d=`${M}date-range-picker`,_=class u{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new u(this)}},W={FROM:"from",TO:"to",END_VALUE:"end-value"},j={INPUT:"input"},X={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},n={elementName:d,selectors:j,events:X,observedAttributes:W};var m=class extends q{constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(n.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(n.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${n.elementName} requires two inputs`);let t=this._createInputSeparator();this._fromInputElement.insertAdjacentElement("afterend",t)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new B(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new E(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new E(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier))}addInputListener(t,e,i){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:i})}addToInputListener(t,e,i){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:i})}removeInputListener(t,e){var i;(i=this._fromInputElement)==null||i.removeEventListener(t,e)}removeToInputListener(t,e){var i;(i=this._toInputElement)==null||i.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let i=g(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(i)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=g(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=b(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){v(this._fromInputElement,t,e)}emitToInputEvent(t,e){v(this._toInputElement,t,e)}_createToggleElement(){return U("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}_createInputSeparator(){let t=document.createElement("span");return k(t,!0,N.attributes.MULTI_INPUT_SEPARATOR),t.setAttribute("aria-hidden","true"),t.textContent="-",t}};var c=class extends G{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(),this._toInputBlurListener=e=>this._onToInputBlur(e)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let i=this._getTypedValue(t&&t.from||null),o=this._getTypedValue(t&&t.to||null),p=new _({from:i,to:o});return this._adapter.emitHostEvent(n.events.CHANGE,p,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new a({from:this._from||t,to:this._to||void 0}):new a({from:t});this._isDateRangeAcceptable(e)&&(this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t))}_onClear(){this._onDateSelected({date:null,range:new a,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(C(e)&&this._isDateValueAcceptable(e)){let i=this._formatDate(e);i&&this._adapter.setToInputValue(i,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(t){if(!(t!=null&&t.to))return!0;let e=()=>this._isDateValueAcceptable(t.from),i=()=>this._isDateValueAcceptable(t.to),o=()=>t!=null&&t.from&&(t!=null&&t.to)?t.from.getTime()<=t.to.getTime():!0;return e()&&i()&&o()}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let i=this._formatDate(e&&e.from||null),o=this._formatDate(e&&e.to||null);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._adapter.setToInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(o?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeToMask(){if(!this._masked)return;let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,i,o,p)=>this._prepareMaskCallback.call(null,e,i,o,p)),this._adapter.initializeToMask(t)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,e),!l(i,this._from)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(n.events.INPUT,e),!l(i,this._to)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(t){this._masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(t){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(t.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);l(i,this._from)||(this.from=i,this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);l(i,this._to)||(this.to=i,this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){t||(t={from:null,to:null}),t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to}}get from(){let t=this._getTypedValue(this._from);return t?I(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new a({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?I(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new a({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var J="<template><slot></slot></template>",Q=":host{display:block}:host([hidden]){display:none}",s=class extends K{constructor(){super();R.define(A),P(this,J,Q),this._foundation=new c(new m(this))}static get observedAttributes(){return[...Object.values(H.observedAttributes),n.observedAttributes.FROM,n.observedAttributes.TO]}attributeChangedCallback(t,e,i){switch(t){case n.observedAttributes.FROM:this.from=i;return;case n.observedAttributes.TO:this.to=i;return}super.attributeChangedCallback(t,e,i)}};h([D()],s.prototype,"from",2),h([D()],s.prototype,"to",2),s=h([F({name:n.elementName,dependencies:[S,z,w,x]})],s);var $=class extends L{constructor(t){super(t)}_build(){let t=document.createElement(n.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector("input:first-of-type")}get toInput(){return this._textField.querySelector("input:last-of-type")}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(n.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var i,o,p,f,T;this._textField=document.createElement(O.elementName),(i=this._config.options)!=null&&i.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((p=this._config.options)==null?void 0:p.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((f=this._config.options)==null?void 0:f.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((T=this._config.options)==null?void 0:T.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function jt(){y(s)}export{_ as a,n as b,m as c,c as d,s as e,$ as f,jt as g};
|
|
7
|
+
//# sourceMappingURL=chunk.XATVDHDW.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/date-range-picker/date-range-picker-constants.ts", "../../src/date-range-picker/date-range-picker-adapter.ts", "../../src/date-range-picker/date-range-picker-foundation.ts", "../../src/date-range-picker/date-range-picker.ts", "../../src/date-range-picker/date-range-picker-component-delegate.ts", "../../src/date-range-picker/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}date-range-picker`;\n\nexport class DatePickerRange implements IDatePickerRange {\n public from?: Date | string | null;\n public to?: Date | string | null;\n constructor(range?: IDatePickerRange) {\n if (range) {\n this.from = range.from;\n this.to = range.to;\n }\n }\n\n public copy(): DatePickerRange {\n return new DatePickerRange(this);\n }\n}\n\nexport interface IDatePickerRange {\n from?: Date | string | null;\n to?: Date | string | null;\n}\n\nconst observedAttributes = {\n FROM: 'from',\n TO: 'to',\n END_VALUE: 'end-value'\n};\n\nconst selectors = {\n INPUT: 'input'\n};\n\nconst events = {\n CHANGE: `${elementName}-change`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n INPUT: `${elementName}-input`\n};\n\nexport const DATE_RANGE_PICKER_CONSTANTS = {\n elementName,\n selectors,\n events,\n observedAttributes\n};\n\n\nexport interface IDateRangePickerChangeEventData extends DatePickerRange {}\n", "import { emitEvent, listenOwnProperty, getActiveElement, toggleAttribute } from '@tylertech/forge-core';\nimport { sep } from 'path';\nimport { CalendarDropdown, ICalendarDropdownPopupConfig } from '../calendar/calendar-dropdown';\nimport { DateInputMask, IDateInputMaskOptions } from '../core';\nimport { BaseDatePickerAdapter, IBaseDatePickerAdapter } from '../date-picker/base/base-date-picker-adapter';\nimport { IDatePickerCalendarDropdownConfig } from '../date-picker/base/base-date-picker-constants';\nimport { createToggleElement } from '../date-picker/base/base-date-picker-utils';\nimport { FIELD_CONSTANTS } from '../field';\nimport { DateRangePickerComponent, IDateRangePickerComponent } from './date-range-picker';\nimport { DATE_RANGE_PICKER_CONSTANTS } from './date-range-picker-constants';\n\nexport interface IDateRangePickerAdapter extends IBaseDatePickerAdapter {\n initializeToMask(toOptions: IDateInputMaskOptions): void;\n addToInputListener(type: string, listener: (event: Event) => void): void;\n removeToInputListener(type: string, listener: (event: Event) => void): void;\n setToInputValueChangedListener(context: any, listener: (value: any) => void): void;\n getToInputValue(): string;\n setToInputValue(value: string, emitEvents: boolean): void;\n emitInputEvent(type: string, data?: any): void;\n emitToInputEvent(type: string, data?: any): void;\n tryFocusInput(): void;\n tryBlurInput(): void;\n selectToInputText(): void;\n destroyToMask(): void;\n}\n\nexport class DateRangePickerAdapter extends BaseDatePickerAdapter<IDateRangePickerComponent> implements IDateRangePickerAdapter {\n private _fromInputElement: HTMLInputElement;\n private _toInputElement: HTMLInputElement;\n private _toInputMask: DateInputMask | undefined;\n private _fromInputMask: DateInputMask | undefined;\n private _dropdownIdentifier: string;\n private _toValueChangeListener: (() => void) | undefined;\n\n constructor(component: DateRangePickerComponent) {\n super(component);\n this._dropdownIdentifier = `forge-date-range-picker-${this._identifier}`;\n }\n\n protected _initializeInput(): void {\n this._fromInputElement = this._component.querySelectorAll(DATE_RANGE_PICKER_CONSTANTS.selectors.INPUT)[0] as HTMLInputElement;\n this._toInputElement = this._component.querySelectorAll(DATE_RANGE_PICKER_CONSTANTS.selectors.INPUT)[1] as HTMLInputElement;\n\n if (!this._fromInputElement || !this._fromInputElement) {\n throw new Error(`The ${DATE_RANGE_PICKER_CONSTANTS.elementName} requires two inputs`);\n }\n\n const separator = this._createInputSeparator();\n this._fromInputElement.insertAdjacentElement('afterend', separator);\n }\n\n protected _initializeCalendarDropdown(): void {\n const targetElement = this._getDefaultTargetElement();\n this._calendarDropdown = new CalendarDropdown(targetElement, this._dropdownIdentifier);\n }\n\n public override initializeMask(fromOptions: IDateInputMaskOptions): void {\n this._fromInputMask?.destroy();\n this._fromInputMask = new DateInputMask(this._fromInputElement, fromOptions);\n }\n\n public override destroyMask(): void {\n this._fromInputMask?.destroy();\n this._fromInputMask = undefined;\n }\n\n public initializeToMask(toOptions: IDateInputMaskOptions): void {\n this._toInputMask?.destroy();\n this._toInputMask = new DateInputMask(this._toInputElement, toOptions);\n }\n\n public destroyToMask(): void {\n this._toInputMask?.destroy();\n this._toInputMask = undefined;\n }\n\n public override destroy(): void {\n super.destroy();\n this._destroyToValueChangeListener();\n }\n\n private _destroyToValueChangeListener(): void {\n if (typeof this._toValueChangeListener === 'function') {\n this._toValueChangeListener();\n }\n }\n\n public initializeAccessibility(): void {\n this._applyToInputs(input => input.setAttribute('autocomplete', 'off'));\n this._applyToInputs(input => input.setAttribute('autocorrect', 'off'));\n this._applyToInputs(input => input.setAttribute('autocapitalize', 'off'));\n this._applyToInputs(input => input.setAttribute('spellcheck', 'false'));\n this._applyToInputs(input => input.setAttribute('role', 'combobox'));\n this._applyToInputs(input => input.setAttribute('aria-live', 'assertive'));\n this._applyToInputs(input => input.setAttribute('aria-atomic', 'true'));\n this._applyToInputs(input => input.setAttribute('aria-haspopup', 'true'));\n this._applyToInputs(input => input.setAttribute('aria-expanded', 'false'));\n this._applyToInputs(input => input.setAttribute('aria-owns', this._dropdownIdentifier));\n }\n\n public addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._fromInputElement?.addEventListener(type, listener, { capture });\n }\n\n public addToInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._toInputElement?.addEventListener(type, listener, { capture });\n }\n\n public removeInputListener(type: string, listener: (event: Event) => void): void {\n this._fromInputElement?.removeEventListener(type, listener);\n }\n \n public removeToInputListener(type: string, listener: (event: Event) => void): void {\n this._toInputElement?.removeEventListener(type, listener);\n }\n\n public setInputValueChangedListener(context: any, listener: (value: any) => void): void {\n if (this._valueChangeListeners.length) {\n this.destroyValueChangeListener();\n }\n const destroyListenerCb = listenOwnProperty(context, this._fromInputElement, 'value', listener);\n this._valueChangeListeners.push(destroyListenerCb);\n }\n\n public setToInputValueChangedListener(context: any, listener: (value: any) => void): void {\n this._destroyToValueChangeListener();\n this._toValueChangeListener = listenOwnProperty(context, this._toInputElement, 'value', listener);\n }\n\n public hasInputElement(): boolean {\n return !!this._fromInputElement && !!this._toInputElement;\n }\n\n public override attachCalendar(calendarConfig: IDatePickerCalendarDropdownConfig<Date | null>, dropdownConfig?: ICalendarDropdownPopupConfig): void {\n super.attachCalendar(calendarConfig, dropdownConfig);\n this._fromInputElement.setAttribute('aria-expanded', 'true');\n }\n\n public override detachCalendar(): void {\n super.detachCalendar();\n if (this._fromInputElement) {\n this._fromInputElement.setAttribute('aria-expanded', 'false');\n this._fromInputElement.removeAttribute('aria-activedescendant');\n }\n }\n\n public setActiveDescendant(id: string): void {\n this._fromInputElement.setAttribute('aria-activedescendant', id);\n }\n\n public setInputValue(value: string, emitEvents: boolean): void {\n if (this._fromInputElement.value === value) {\n return;\n }\n\n this._fromInputElement.value = value;\n \n if (this._fromInputMask) {\n this._fromInputMask.updateMask();\n }\n\n if (emitEvents) {\n this._fromInputElement.dispatchEvent(new Event('change'));\n this._fromInputElement.dispatchEvent(new Event('input'));;\n }\n }\n\n public setToInputValue(value: string, emitEvents: boolean): void {\n if (this._toInputElement.value === value) {\n return;\n }\n\n this._toInputElement.value = value;\n \n if (this._toInputMask) {\n this._toInputMask.updateMask();\n }\n \n if (emitEvents) {\n this._toInputElement.dispatchEvent(new Event('change'));\n this._toInputElement.dispatchEvent(new Event('input'));\n }\n }\n\n public isInputDisabled(): boolean {\n return this._fromInputElement.disabled;\n }\n\n public isInputFocused(target?: EventTarget | null): boolean {\n if (target && this._toInputElement === target || this._fromInputElement === target) {\n return true;\n }\n const activeEl = getActiveElement(this._component.ownerDocument);\n return this._toInputElement === activeEl || this._fromInputElement === activeEl;\n }\n\n public getInputValue(): string {\n return this._fromInputElement.value;\n }\n\n public getToInputValue(): string {\n return this._toInputElement.value;\n }\n\n public setDisabled(isDisabled: boolean): void {\n this._fromInputElement.disabled = isDisabled;\n this._toInputElement.disabled = isDisabled;\n\n this._toInputElement.setAttribute('aria-disabled', isDisabled.toString());\n this._fromInputElement.setAttribute('aria-disabled', isDisabled.toString());\n\n if (this._toggleElement) {\n this._toggleElement.setAttribute('aria-disabled', isDisabled.toString());\n if (this._toggleElement.hasOwnProperty('disabled')) {\n (this._toggleElement as HTMLButtonElement).disabled = isDisabled;\n }\n }\n }\n\n public emitInputEvent(type: string, data?: any): void {\n emitEvent(this._fromInputElement, type, data);\n }\n\n public emitToInputEvent(type: string, data?: any): void {\n emitEvent(this._toInputElement, type, data);\n }\n\n protected override _createToggleElement(): HTMLElement {\n return createToggleElement('date_range');\n }\n\n public tryFocusInput(): void {\n this._fromInputElement.focus();\n }\n\n public tryBlurInput(): void {\n this._fromInputElement.blur();\n }\n\n public selectInputText(): void {\n this._fromInputElement.select();\n }\n\n public selectToInputText(): void {\n this._toInputElement.select();\n }\n\n private _applyToInputs(action: (input: HTMLInputElement) => void): void {\n [this._fromInputElement, this._toInputElement].forEach(action);\n }\n\n private _createInputSeparator(): HTMLElement {\n const separator = document.createElement('span');\n toggleAttribute(separator, true, FIELD_CONSTANTS.attributes.MULTI_INPUT_SEPARATOR);\n separator.setAttribute('aria-hidden', 'true');\n separator.textContent = '-';\n return separator;\n }\n}\n", "import { isDate, isValidDate, Platform } from '@tylertech/forge-core';\nimport { CalendarMode, DateRange, ICalendarDateSelectEventData } from '../calendar';\nimport { isSameDate } from '../core/utils/date-utils';\nimport { IDateInputMaskOptions } from '../core/mask/date-input-mask';\nimport { BaseDatePickerFoundation, IBaseDatePickerFoundation } from '../date-picker/base/base-date-picker-foundation';\nimport { IDateRangePickerAdapter } from './date-range-picker-adapter';\nimport { DatePickerRange, DATE_RANGE_PICKER_CONSTANTS, IDatePickerRange, IDateRangePickerChangeEventData } from './date-range-picker-constants';\n\nexport interface IDateRangePickerFoundation extends IBaseDatePickerFoundation<IDatePickerRange> {\n from: Date | string | null | undefined;\n to: Date | string | null | undefined;\n}\n\nexport class DateRangePickerFoundation extends BaseDatePickerFoundation<IDateRangePickerAdapter, IDatePickerRange> implements IDateRangePickerFoundation {\n protected _mode: CalendarMode = 'range';\n private _from?: Date | null = null;\n private _to?: Date | null = null;\n private _toInputListener: (evt: Event) => void;\n private _toInputKeydownListener: (evt: KeyboardEvent) => void;\n private _toInputFocusListener: (evt: FocusEvent) => void;\n private _toInputBlurListener: (evt: FocusEvent) => void;\n private _toInputValueChangedListener: (value: string) => void;\n\n constructor(adapter: IDateRangePickerAdapter) {\n super(adapter);\n this._toInputListener = evt => this._onToInput(evt);\n this._toInputValueChangedListener = value => this._onToInputValueChanged(value);\n this._toInputKeydownListener = evt => this._onInputKeydown(evt);\n this._toInputFocusListener = evt => this._onToInputFocus();\n this._toInputBlurListener = evt => this._onToInputBlur(evt);\n }\n\n public override initialize(): void {\n super.initialize();\n this._setFormattedToInputValue(true);\n }\n\n protected _initializeState(): void {\n this._applyToMask();\n\n if (!this._from) {\n this._from = this._coerceDateValue(this._adapter.getInputValue());\n }\n if (!this._to) {\n this._to = this._coerceDateValue(this._adapter.getToInputValue());\n }\n }\n\n protected override _initializeListeners(): void {\n super._initializeListeners();\n this._adapter.addToInputListener('keydown', this._toInputKeydownListener);\n this._adapter.addToInputListener('focus', this._toInputFocusListener);\n this._adapter.addToInputListener('blur', this._toInputBlurListener);\n }\n\n protected override _initializeValueChangedListeners(): void {\n super._initializeValueChangedListeners();\n this._adapter.setToInputValueChangedListener(this, this._toInputValueChangedListener);\n }\n\n protected override _setInputChangeListeners(): void {\n super._setInputChangeListeners();\n this._adapter.addToInputListener('input', this._toInputListener);\n }\n\n protected override _removeInputChangeListeners(): void {\n super._removeInputChangeListeners();\n this._adapter.removeToInputListener('input', this._toInputListener);\n }\n\n protected override _openCalendar(emitOpenEvent?: boolean): void {\n this._formatToInputValue();\n super._openCalendar(emitOpenEvent);\n\n const currentValue = this._getCurrentValue();\n if (!!currentValue?.to) {\n this._adapter.goToCalendarDate(new Date(currentValue.to));\n } else if (!!currentValue?.from) {\n this._adapter.goToCalendarDate(new Date(currentValue.from));\n }\n }\n\n protected _emitChangeEvent(value: DateRange | null | undefined, force?: boolean): boolean {\n const typedStartValue = this._getTypedValue((value && value.from) || null);\n const typedEndValue = this._getTypedValue((value && value.to) || null);\n const detail: IDateRangePickerChangeEventData = new DatePickerRange({ from: typedStartValue, to: typedEndValue });\n const wasCancelled = !this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.CHANGE, detail, true, !force);\n if (!wasCancelled) {\n this._setValue(this._coerceDateValue((value && value.from) || null));\n this._setToValue(this._coerceDateValue((value && value.to) || null));\n return true;\n }\n return false;\n }\n\n protected _emitOpenEvent(): void {\n this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.OPEN, undefined, false);\n }\n\n protected _emitCloseEvent(): void {\n this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.CLOSE, undefined, false);\n }\n \n protected _onToday(): void {\n const today = new Date();\n const range = this._open ? new DateRange({ from: this._from || today, to: this._to || undefined }) : new DateRange({ from: today });\n if (!this._isDateRangeAcceptable(range)) {\n return;\n }\n this.value = range;\n this._onDateSelected({ date: today, range, selected: true, type: 'date' });\n this._adapter.setCalendarActiveDate(today);\n }\n\n protected _onClear(): void {\n this._onDateSelected({ date: null, range: new DateRange(), selected: false, type: 'date' });\n this._closeCalendar(true);\n }\n\n protected _getCurrentValue(): IDatePickerRange | null | undefined {\n return this._value;\n }\n\n private _applyToMask(): void {\n if (this._masked) {\n this._initializeToMask();\n } else {\n this._adapter.destroyToMask();\n this._formatToInputValue();\n }\n }\n\n private _formatToInputValue(): void {\n const inputValue = this._adapter.getToInputValue();\n if (inputValue) {\n const parsedDate = this._parseDateString(inputValue);\n if (isValidDate(parsedDate) && this._isDateValueAcceptable(parsedDate)) {\n const formattedDate = this._formatDate(parsedDate);\n if (formattedDate) {\n this._adapter.setToInputValue(formattedDate, this._notifyInputValueChanges);\n }\n } else {\n if (!this._allowInvalidDate) {\n this._adapter.setToInputValue('', this._notifyInputValueChanges);\n }\n }\n }\n }\n\n protected _setFormattedInputValue(suppressValueChanges?: boolean): void {\n let formattedDate = this._formatDate(this._from);\n if (!formattedDate && !this._allowInvalidDate) {\n formattedDate = '';\n }\n this._adapter.setInputValue(formattedDate, suppressValueChanges ? false : this._notifyInputValueChanges);\n }\n\n private _setFormattedToInputValue(suppressValueChanges?: boolean): void {\n let formattedDate = this._formatDate(this._to);\n if (!formattedDate && !this._allowInvalidDate) {\n formattedDate = '';\n }\n this._adapter.setToInputValue(formattedDate, suppressValueChanges ? false : this._notifyInputValueChanges);\n }\n\n protected _isDateRangeAcceptable(value?: DateRange | null | undefined): boolean {\n if (!value?.to) {\n return true;\n }\n\n const passesMinDate = (): boolean => this._isDateValueAcceptable(value.from);\n const passesMaxDate = (): boolean => this._isDateValueAcceptable(value.to);\n const passesDateRange = (): boolean => value?.from && value?.to ? value.from.getTime() <= value.to.getTime() : true;\n\n return passesMinDate() && passesMaxDate() && passesDateRange();\n }\n\n protected _setValue(value: Date | null | undefined): void {\n if (this._isDateValueAcceptable(value)) {\n this._from = value || null;\n if (!this._value) {\n this._value = { from: this._from, to: this._to };\n } else {\n this._value.from = this._from;\n }\n }\n }\n\n private _setToValue(value: Date | null | undefined): void {\n if (this._isDateValueAcceptable(value)) {\n this._to = value || null;\n if (!this._value) {\n this._value = { from: this._from, to: this._to };\n } else {\n this._value.to = this._to;\n }\n }\n }\n\n protected _onDateSelected(event: ICalendarDateSelectEventData): void {\n const value = event.range;\n\n if (event.rangeSelectionState === 'to') {\n this._closeCalendar(true);\n }\n\n if (!this._emitChangeEvent(value ?? null)) {\n return;\n }\n\n const formattedFromValue = this._formatDate((value && value.from) || null);\n const formattedToValue = this._formatDate((value && value.to) || null);\n this._adapter.setInputValue(formattedFromValue, this._notifyInputValueChanges);\n this._adapter.setToInputValue(formattedToValue, this._notifyInputValueChanges);\n this._formatInputValue();\n this._formatToInputValue();\n\n this._from = (value && value.from) || null;\n this._to = (value && value.to) || null;\n\n if (!Platform.isMobile) {\n if (formattedToValue) {\n this._adapter.selectToInputText();\n } else {\n this._adapter.selectInputText();\n }\n }\n }\n\n protected override _applyMin(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(new DateRange({ to: this._to || undefined }), true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined }), true);\n this._setFormattedToInputValue();\n }\n super._applyMin();\n }\n\n protected override _applyMax(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(new DateRange({ to: this._to || undefined }), true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined }), true);\n this._setFormattedToInputValue();\n }\n super._applyMax();\n }\n\n protected _initializeToMask(): void {\n if (!this._masked) {\n return;\n }\n\n const options: IDateInputMaskOptions = {\n showMaskFormat: this._showMaskFormat && this._adapter.isInputFocused(),\n pattern: this._maskFormat,\n onChange: (value: string) => this._handleToInput(value)\n };\n\n if (this._prepareMaskCallback) {\n options.prepareCallback = (value, masked, flags, maskInstance) => {\n return this._prepareMaskCallback.call(null, value, masked, flags, maskInstance);\n };\n }\n\n this._adapter.initializeToMask(options);\n }\n\n protected _applyDisabledDates(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(new DateRange({ to: this._to || undefined }), true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined }), true);\n this._setFormattedToInputValue();\n }\n }\n\n protected _applyDisabledDaysOfWeek(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(null, true);\n this._setFormattedToInputValue();\n }\n }\n\n private _onToInput(evt: Event): void {\n this._handleInput(this._adapter.getInputValue());\n }\n\n protected _handleInput(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (this._masked) {\n this._adapter.emitInputEvent(DATE_RANGE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);\n }\n if (!isSameDate(date, this._from) && this._isDateValueAcceptable(date)) {\n this._emitChangeEvent(new DateRange({ from: date || undefined, to: this._to || undefined }));\n }\n }\n\n private _handleToInput(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (this._masked) {\n this._adapter.emitToInputEvent(DATE_RANGE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);\n }\n if (!isSameDate(date, this._to) && this._isDateValueAcceptable(date)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined, to: date || undefined }));\n }\n }\n\n private _onToInputFocus(): void {\n if (this.masked && this._showMaskFormat) {\n this._initializeMask();\n this._initializeToMask();\n }\n this._adapter.selectToInputText();\n }\n\n private _onToInputBlur(evt: FocusEvent): void {\n if (this._masked && !this._adapter.isInputFocused(evt.relatedTarget)) {\n this._initializeMask();\n this._initializeToMask();\n }\n\n this._formatToInputValue();\n\n if (this._open) {\n this._closeCalendar(true);\n }\n }\n\n protected override _onInputFocus(evt: FocusEvent): void {\n if (this.masked && this._showMaskFormat) {\n this._initializeMask();\n this._initializeToMask();\n }\n this._adapter.selectInputText();\n }\n\n protected override _onInputBlur(evt: FocusEvent): void {\n if (this.masked && !this._adapter.isInputFocused(evt.relatedTarget)) {\n this._initializeMask();\n this._initializeToMask();\n }\n\n this._formatInputValue();\n\n if (this._open && !this._adapter.isInputFocused(evt.relatedTarget)) {\n this._closeCalendar(true);\n }\n }\n\n protected _onInputValueChanged(value: string): void {\n if (this._masked) {\n return;\n }\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (!isSameDate(date, this._from)) {\n this.from = date;\n this._emitChangeEvent(new DateRange({ from: date || undefined, to: this._to || undefined }));\n }\n }\n\n private _onToInputValueChanged(value: string): void {\n if (this._masked) {\n return;\n }\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (!isSameDate(date, this._to)) {\n this.to = date;\n this._emitChangeEvent(new DateRange({ from: this._from || undefined, to: date || undefined }));\n }\n }\n\n public get value(): IDatePickerRange | null | undefined {\n return { from: this.from, to: this.to };\n }\n public set value(value: IDatePickerRange | null | undefined) {\n if (!value) {\n value = { from: null, to: null };\n }\n\n if (value.from === undefined) {\n value.from = null;\n }\n\n if (value.to === undefined) {\n value.to = null;\n }\n\n this.from = value.from;\n this.to = value.to;\n\n this._value = { from: this.from, to: this.to };\n }\n\n public get from(): Date | string | null | undefined {\n const date = this._getTypedValue(this._from);\n\n if (!date) {\n return null;\n }\n\n if (isDate(date)) {\n return new Date(date.getTime());\n }\n\n return date;\n }\n public set from(value: Date | string | null | undefined) {\n if (this._from !== value) {\n this._setValue(this._coerceDateValue(value));\n if (this._isInitialized) {\n this._setFormattedInputValue();\n if (this._open) {\n this._adapter.setCalendarValue(new DateRange({ from: this._coerceDateValue(value) || undefined, to: this._coerceDateValue(this._to) || undefined }));\n }\n }\n }\n }\n\n public get to(): Date | string | null | undefined {\n const date = this._getTypedValue(this._to);\n\n if (!date) {\n return null;\n }\n\n if (isDate(date)) {\n return new Date(date.getTime());\n }\n\n return date;\n }\n public set to(value: Date | string | null | undefined) {\n if (this._to !== value) {\n this._setToValue(this._coerceDateValue(value));\n if (this._isInitialized) {\n this._setFormattedToInputValue();\n if (this._open) {\n this._adapter.setCalendarValue(new DateRange({ to: this._coerceDateValue(value) || undefined, from: this._coerceDateValue(this._from) || undefined }));\n }\n }\n }\n }\n}\n", "import { attachShadowTemplate, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconDateRange } from '@tylertech/tyler-icons/standard';\nimport { CalendarComponent } from '../calendar';\nimport { BaseDatePickerComponent, IBaseDatePickerComponent } from '../date-picker/base/base-date-picker';\nimport { BASE_DATE_PICKER_CONSTANTS } from '../date-picker/base/base-date-picker-constants';\nimport { IconComponent, IconRegistry } from '../icon';\nimport { IconButtonComponent } from '../icon-button';\nimport { PopoverComponent } from '../popover';\nimport { DateRangePickerAdapter } from './date-range-picker-adapter';\nimport { DATE_RANGE_PICKER_CONSTANTS, IDatePickerRange, IDateRangePickerChangeEventData } from './date-range-picker-constants';\nimport { DateRangePickerFoundation } from './date-range-picker-foundation';\n\nconst template = '<template><slot></slot></template>';\nconst styles = ':host{display:block}:host([hidden]){display:none}';\n\nexport interface IDateRangePickerComponent extends IBaseDatePickerComponent<IDatePickerRange> {\n from: Date | string | null | undefined;\n to: Date | string | null | undefined;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-date-range-picker': IDateRangePickerComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-date-range-picker-change': CustomEvent<IDateRangePickerChangeEventData>;\n 'forge-date-range-picker-open': CustomEvent<void>;\n 'forge-date-range-picker-close': CustomEvent<void>;\n 'forge-date-range-picker-input': CustomEvent<string>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-date-range-picker>` element.\n * \n * @tag forge-date-range-picker\n */\n@CustomElement({\n name: DATE_RANGE_PICKER_CONSTANTS.elementName,\n dependencies: [\n PopoverComponent,\n CalendarComponent,\n IconButtonComponent,\n IconComponent\n ]\n})\nexport class DateRangePickerComponent extends BaseDatePickerComponent<IDatePickerRange, IDatePickerRange, DateRangePickerFoundation> implements IDateRangePickerComponent {\n public static get observedAttributes(): string[] {\n return [\n ...Object.values(BASE_DATE_PICKER_CONSTANTS.observedAttributes),\n DATE_RANGE_PICKER_CONSTANTS.observedAttributes.FROM,\n DATE_RANGE_PICKER_CONSTANTS.observedAttributes.TO\n ];\n }\n\n constructor() {\n super();\n IconRegistry.define(tylIconDateRange);\n attachShadowTemplate(this, template, styles);\n this._foundation = new DateRangePickerFoundation(new DateRangePickerAdapter(this));\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case DATE_RANGE_PICKER_CONSTANTS.observedAttributes.FROM:\n this.from = newValue;\n return;\n case DATE_RANGE_PICKER_CONSTANTS.observedAttributes.TO:\n this.to = newValue;\n return;\n }\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n\n /** Gets/sets the \"from\" date range value. */\n @FoundationProperty()\n public declare from: Date | string | null | undefined;\n\n /** Gets/sets the \"to\" date range value. */\n @FoundationProperty()\n public declare to: Date | string | null | undefined;\n}\n", "import { FormFieldComponentDelegate, IBaseComponentDelegateConfig, IFormFieldComponentDelegateOptions } from '../core/delegates';\nimport { FieldDensity } from '../field';\nimport { ITextFieldComponent, TEXT_FIELD_CONSTANTS } from '../text-field';\nimport { IDateRangePickerComponent } from './date-range-picker';\nimport { DATE_RANGE_PICKER_CONSTANTS, IDateRangePickerChangeEventData } from './date-range-picker-constants';\n\nexport type DateRangePickerComponentDelegateProps = Partial<IDateRangePickerComponent>;\nexport interface IDateRangePickerComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n useDropdownIcon?: boolean;\n fromPlaceholder?: string;\n toPlaceholder?: string;\n label?: string;\n required?: boolean;\n density?: FieldDensity;\n}\nexport interface IDateRangePickerComponentDelegateConfig extends IBaseComponentDelegateConfig<IDateRangePickerComponent, IDateRangePickerComponentDelegateOptions> {}\n\nexport class DateRangeComponentDelegate extends FormFieldComponentDelegate<IDateRangePickerComponent, IDateRangePickerComponentDelegateOptions> {\n private _textField: ITextFieldComponent;\n private _fromInput: HTMLInputElement;\n private _toInput: HTMLInputElement;\n\n constructor(config?: IDateRangePickerComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IDateRangePickerComponent {\n const dateRangePicker = document.createElement(DATE_RANGE_PICKER_CONSTANTS.elementName) as IDateRangePickerComponent;\n this._attachTextField(dateRangePicker);\n return dateRangePicker;\n }\n\n public get fromInput(): HTMLInputElement {\n return this._textField.querySelector('input:first-of-type') as HTMLInputElement;\n }\n\n public get toInput(): HTMLInputElement {\n return this._textField.querySelector('input:last-of-type') as HTMLInputElement;\n }\n\n public get textField(): ITextFieldComponent {\n return this._textField;\n }\n\n public get value(): any {\n return this._element.value;\n }\n public set value(value: any) {\n this._element.value = value;\n }\n\n public get disabled(): boolean {\n return this._element.disabled;\n }\n public set disabled(value: boolean) {\n this._element.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._textField.invalid || false;\n }\n public set invalid(value: boolean) {\n this._textField.invalid = value;\n }\n\n public onChange(listener: (value: IDateRangePickerChangeEventData) => void): void {\n this._element.addEventListener(DATE_RANGE_PICKER_CONSTANTS.events.CHANGE, (evt: CustomEvent<IDateRangePickerChangeEventData>) => listener(evt.detail));\n }\n\n public onFocus(listener: (evt: FocusEvent) => void): void {\n this._element.addEventListener('focusin', (evt: FocusEvent) => {\n const isFocusWithin = !this._element.contains(evt.relatedTarget as Node);\n if (isFocusWithin) {\n listener(evt);\n }\n });\n }\n\n public onBlur(listener: (evt: FocusEvent) => void): void {\n this._element.addEventListener('focusout', (evt: FocusEvent) => {\n const isFocusOutside = !this._element.contains(evt.relatedTarget as Node);\n if (isFocusOutside) {\n listener(evt);\n }\n });\n }\n\n private _attachTextField(dateRangePicker: IDateRangePickerComponent): void {\n this._textField = document.createElement(TEXT_FIELD_CONSTANTS.elementName);\n\n if (this._config.options?.required) {\n this._textField.required = true;\n }\n if (this._config.options?.density) {\n this._textField.density = this._config.options.density;\n }\n\n this._fromInput = document.createElement('input');\n this._fromInput.type = 'text';\n this._fromInput.placeholder = this._config.options?.fromPlaceholder || 'From';\n this._textField.appendChild(this._fromInput);\n\n this._toInput = document.createElement('input');\n this._toInput.type = 'text';\n this._toInput.placeholder = this._config.options?.toPlaceholder || 'To';\n this._textField.appendChild(this._toInput);\n\n const label = document.createElement('label');\n label.textContent = this._config.options?.label || 'Choose date range';\n this._textField.appendChild(label);\n\n dateRangePicker.appendChild(this._textField);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { DateRangePickerComponent } from './date-range-picker';\n\nexport * from './date-range-picker';\nexport * from './date-range-picker-adapter';\nexport * from './date-range-picker-constants';\nexport * from './date-range-picker-foundation';\nexport * from './date-range-picker-component-delegate';\n\nexport function defineDateRangePickerComponent(): void {\n defineCustomElement(DateRangePickerComponent);\n}\n"],
|
|
5
|
+
"mappings": "y4BAEA,IAAMA,EAA2C,GAAGC,qBAEvCC,EAAN,MAAMC,CAA4C,CAGvD,YAAYC,EAA0B,CAChCA,IACF,KAAK,KAAOA,EAAM,KAClB,KAAK,GAAKA,EAAM,GAEpB,CAEO,MAAwB,CAC7B,OAAO,IAAID,EAAgB,IAAI,CACjC,CACF,EAOME,EAAqB,CACzB,KAAM,OACN,GAAI,KACJ,UAAW,WACb,EAEMC,EAAY,CAChB,MAAO,OACT,EAEMC,EAAS,CACb,OAAQ,GAAGP,WACX,KAAM,GAAGA,SACT,MAAO,GAAGA,UACV,MAAO,GAAGA,SACZ,EAEaQ,EAA8B,CACzC,YAAAR,EACA,UAAAM,EACA,OAAAC,EACA,mBAAAF,CACF,ECpBO,IAAMI,EAAN,cAAqCC,CAAoF,CAQ9H,YAAYC,EAAqC,CAC/C,MAAMA,CAAS,EACf,KAAK,oBAAsB,2BAA2B,KAAK,aAC7D,CAEU,kBAAyB,CAIjC,GAHA,KAAK,kBAAoB,KAAK,WAAW,iBAAiBC,EAA4B,UAAU,KAAK,EAAE,CAAC,EACxG,KAAK,gBAAkB,KAAK,WAAW,iBAAi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UACxB,KAAK,WAAW,QAAU,KAAK,QAAQ,QAAQ,SAGjD,KAAK,WAAa,SAAS,cAAc,OAAO,EAChD,KAAK,WAAW,KAAO,OACvB,KAAK,WAAW,cAAcC,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,kBAAmB,OACvE,KAAK,WAAW,YAAY,KAAK,UAAU,EAE3C,KAAK,SAAW,SAAS,cAAc,OAAO,EAC9C,KAAK,SAAS,KAAO,OACrB,KAAK,SAAS,cAAcC,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,gBAAiB,KACnE,KAAK,WAAW,YAAY,KAAK,QAAQ,EAEzC,IAAMG,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,cAAcF,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,QAAS,oBACnD,KAAK,WAAW,YAAYE,CAAK,EAEjCX,EAAgB,YAAY,KAAK,UAAU,CAC7C,CACF,ECxGO,SAASY,IAAuC,CACrDC,EAAoBC,CAAwB,CAC9C",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "DatePickerRange", "_DatePickerRange", "range", "observedAttributes", "selectors", "events", "DATE_RANGE_PICKER_CONSTANTS", "DateRangePickerAdapter", "BaseDatePickerAdapter", "component", "DATE_RANGE_PICKER_CONSTANTS", "separator", "targetElement", "CalendarDropdown", "fromOptions", "_a", "DateInputMask", "toOptions", "input", "type", "listener", "capture", "context", "destroyListenerCb", "listenOwnProperty", "calendarConfig", "dropdownConfig", "id", "value", "emitEvents", "target", "activeEl", "getActiveElement", "isDisabled", "data", "emitEvent", "createToggleElement", "action", "toggleAttribute", "FIELD_CONSTANTS", "DateRangePickerFoundation", "BaseDatePickerFoundation", "adapter", "evt", "value", "emitOpenEvent", "currentValue", "force", "typedStartValue", "typedEndValue", "detail", "DatePickerRange", "DATE_RANGE_PICKER_CONSTANTS", "today", "range", "DateRange", "inputValue", "parsedDate", "isValidDate", "formattedDate", "suppressValueChanges", "passesMinDate", "passesMaxDate", "passesDateRange", "event", "formattedFromValue", "formattedToValue", "Platform", "options", "masked", "flags", "maskInstance", "sanitizedValue", "date", "isSameDate", "isDate", "template", "styles", "DateRangePickerComponent", "BaseDatePickerComponent", "IconRegistry", "tylIconDateRange", "attachShadowTemplate", "DateRangePickerFoundation", "DateRangePickerAdapter", "BASE_DATE_PICKER_CONSTANTS", "DATE_RANGE_PICKER_CONSTANTS", "name", "oldValue", "newValue", "__decorateClass", "FoundationProperty", "CustomElement", "PopoverComponent", "CalendarComponent", "IconButtonComponent", "IconComponent", "DateRangeComponentDelegate", "FormFieldComponentDelegate", "config", "dateRangePicker", "DATE_RANGE_PICKER_CONSTANTS", "value", "listener", "evt", "_a", "_b", "_c", "_d", "_e", "TEXT_FIELD_CONSTANTS", "label", "defineDateRangePickerComponent", "defineCustomElement", "DateRangePickerComponent"]
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as b}from"./chunk.MC3UAHWS.js";import{a as I}from"./chunk.SHBDQPPH.js";import{a as y}from"./chunk.WAMFFIMP.js";import{c as f,d as C}from"./chunk.QG5EYBS3.js";import{a as k}from"./chunk.XIQFHO5R.js";import{a as m}from"./chunk.6GSVB5NB.js";import{a as l}from"./chunk.NVUMRW44.js";import{k as v}from"./chunk.BIQTNLIF.js";import{a as g}from"./chunk.MGLWXAZO.js";import{m as D}from"./chunk.DCCFF327.js";import{a as h,g as u,k as d,m as _}from"./chunk.J2M2MXP2.js";import{d as r}from"./chunk.M3QDAYD2.js";var L={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",VALUE_MODE:"value-mode",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale"},P={TOGGLE:"forge-date-picker-toggle"},O={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},s={observedAttributes:L,attributes:P,selectors:O};var n=class extends v{constructor(){super()}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():D(this,s.selectors.INPUT).then(()=>{this._foundation.initialize()})}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,a,i){switch(t){case s.observedAttributes.MIN:this.min=i;break;case s.observedAttributes.MAX:this.max=i;break;case s.observedAttributes.OPEN:this.open=d(i);break;case s.observedAttributes.POPUP_CLASSES:this.popupClasses=i;break;case s.observedAttributes.DISABLED:this.disabled=d(i);break;case s.observedAttributes.MASKED:this.masked=d(i);break;case s.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=d(i);break;case s.observedAttributes.MASK_FORMAT:this.maskFormat=i;break;case s.observedAttributes.VALUE_MODE:this.valueMode=i;break;case s.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=d(i);break;case s.observedAttributes.SHOW_TODAY:this.showToday=d(i);break;case s.observedAttributes.SHOW_CLEAR:this.showClear=d(i);break;case s.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=_(i);break;case s.observedAttributes.YEAR_RANGE:this.yearRange=i;break;case s.observedAttributes.LOCALE:this.locale=i;break}}};r([l()],n.prototype,"value",2),r([l()],n.prototype,"min",2),r([l()],n.prototype,"max",2),r([l()],n.prototype,"disabledDates",2),r([l()],n.prototype,"open",2),r([l()],n.prototype,"popupClasses",2),r([l()],n.prototype,"disabled",2),r([l()],n.prototype,"masked",2),r([l()],n.prototype,"maskFormat",2),r([l()],n.prototype,"showMaskFormat",2),r([l()],n.prototype,"valueMode",2),r([l()],n.prototype,"notifyInputValueChanges",2),r([l()],n.prototype,"allowInvalidDate",2),r([l()],n.prototype,"showToday",2),r([l()],n.prototype,"showClear",2),r([l()],n.prototype,"parseCallback",2),r([l()],n.prototype,"formatCallback",2),r([l()],n.prototype,"prepareMaskCallback",2),r([l()],n.prototype,"disabledDaysOfWeek",2),r([l()],n.prototype,"disableDayCallback",2),r([l()],n.prototype,"yearRange",2),r([l()],n.prototype,"locale",2);function E(p){let e=document.createElement("forge-icon-button");e.type="button",e.tabIndex=-1,e.setAttribute("aria-label","Toggle calendar"),e.slot="end",e.density="medium";let t=document.createElement("forge-icon");return t.name=p,e.appendChild(t),e}var M=class extends m{constructor(t){super(t);this._valueChangeListeners=[];this._identifier=h()}initialize(){this._initializeInput()}destroy(){var t;(t=this._calendarDropdown)==null||t.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(t=>t())}addToggleListener(t,a){var i;(i=this._toggleElement)==null||i.addEventListener(t,a)}removeToggleListener(t,a){var i;(i=this._toggleElement)==null||i.removeEventListener(t,a)}attachCalendar(t,a){var i,o,c;if((i=this._calendarDropdown)==null||i.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");a&&Object.assign(this._calendarDropdown,a),this._calendarDropdown.open(t),(o=this._calendarDropdown.dropdownElement)==null||o.style.setProperty("--forge-calendar-width","320px"),(c=this._calendarDropdown.calendar)==null||c.style.setProperty("margin","8px")}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.goToDate(t,!0)}addDateSelectListener(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.addEventListener(b.events.DATE_SELECT,t)}removeDateSelectListener(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.removeEventListener(b.events.DATE_SELECT,t)}setCalendarValue(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.value=t)}setCalendarMinDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.min=t)}setCalendarMaxDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.max=t)}setCalendarDisabledDates(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDates=t)}setCalendarDisabledDaysOfWeek(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=t)}setCalendarDisableDayCallback(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=t)}setCalendarActiveDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.setActiveDate(t)}getCalendarActiveDate(){var t,a;return(a=(t=this._calendarDropdown)==null?void 0:t.calendar)==null?void 0:a.activeDate}setCalendarYearRange(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)!=null&&i.yearRange&&(this._calendarDropdown.calendar.yearRange=t)}setCalendarLocale(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.locale=t)}propagateCalendarKey(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.handleKey(t)}tryCreateToggle(){let t=this._component.querySelector("forge-text-field"),a=this._component.querySelector(s.selectors.TOGGLE);if(t){let i=t.querySelector(`${y.elementName}[slot=end]`);if(i||a){this._toggleElement=i||a;return}let o=this._createToggleElement();t.appendChild(o),this._toggleElement=o}else a&&(this._toggleElement=a)}_createToggleElement(){return E("insert_invitation")}_getDefaultTargetElement(){let t=this._component.querySelector(I.elementName);return t!=null&&t.popoverTargetElement?t.popoverTargetElement:this._component.querySelector("input")||this._component}};var w=class{constructor(e){this._adapter=e;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=k;this._showMaskFormat=!1;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._isInitialized=!1;this._inputListener=t=>this._onInput(t),this._inputKeydownListener=t=>this._onInputKeydown(t),this._inputFocusListener=t=>this._onInputFocus(t),this._inputBlurListener=t=>this._onInputBlur(t),this._inputValueChangedListener=t=>this._onInputValueChanged(t),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=t=>this._onToggleMousedown(t),this._dateSelectListener=t=>this._onDateSelected(t.detail),this._activeChangeListener=t=>this._onActiveDescendantChanged(t),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var e;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(e=this._initializeState)==null||e.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(e){this._handleInput(this._adapter.getInputValue())}_onInputFocus(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(e=!1){this._formatInputValue();let t={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener},i=new Date().getTime();this._min&&this._max&&this._max.getTime()<i&&(t.year=this._min.getFullYear(),t.month=this._min.getMonth()),this._adapter.attachCalendar(t,a),this._adapter.addDateSelectListener(this._dateSelectListener),this._open=!0,this._adapter.setHostAttribute(s.observedAttributes.OPEN),e&&this._emitOpenEvent()}_closeCalendar(e=!1){this._open=!1,this._adapter.removeHostAttribute(s.observedAttributes.OPEN),this._adapter.removeDateSelectListener(this._dateSelectListener),this._adapter.detachCalendar(),e&&this._emitCloseEvent()}_onInputKeydown(e){if(e.shiftKey)switch(e.key){case"Delete":case"Backspace":e.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){e.preventDefault(),this._adapter.propagateCalendarKey(e);return}break}switch(e.key){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":e.preventDefault(),this._open?this._adapter.propagateCalendarKey(e):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){e.key==="Enter"&&e.stopPropagation(),e.preventDefault();let t=["ArrowLeft","ArrowRight"].includes(e.key);this._masked&&t&&e.stopImmediatePropagation(),this._adapter.propagateCalendarKey(e)}break;case"n":case"t":e.preventDefault(),this._onToday(),this._open&&this._closeCalendar(!0);break;case"PageUp":case"PageDown":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"Tab":if(this._open){let t=this._adapter.getCalendarActiveDate();t&&this._onDateSelected({date:t,selected:!0,type:"date"})}break}}_getSanitizedDateString(e){return e.replace(/_|[a-z]|[A-Z]/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(e){this._disabled||(e.stopPropagation(),!this._adapter.isInputDisabled()&&(e.preventDefault(),this._open?this._closeCalendar(!0):(g.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onActiveDescendantChanged(e){this._adapter.setActiveDescendant(e)}_formatInputValue(){let e=this._adapter.getInputValue();if(e){let t=this._parseDateString(e);if(u(t)&&this._isDateValueAcceptable(t)){let a=this._formatDate(t);a&&a!==e&&this._adapter.setInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(e){return u(e)?typeof this._formatCallback=="function"?this._formatCallback(e):C(e):""}_parseDateString(e){if(e=e.replace(/_|\s/g,""),!e||!e.length)return null;let t=typeof this._parseCallback=="function"?this._parseCallback(e):f(e);return u(t)?t:null}_coerceDateValue(e){return typeof e=="string"?this._parseDateString(e):e}_getTypedValue(e){switch(this._valueMode){case"object":return e;case"string":return this._formatDate(e);case"iso-string":return e&&e.setHours(0,0,0,0),e?e.toISOString():null;default:return e}}_isDateValueAcceptable(e){if(!e||this._allowInvalidDate)return!0;let t=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=e.getTime():!0,a=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=e.getTime():!0,i=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],o=()=>!i().some(T=>T.getTime()===e.getTime()),c=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(e.getDay())),A=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(e);return t()&&a()&&o()&&c()&&A()}_initializeMask(){let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:t=>this._handleInput(t)};this._prepareMaskCallback&&(e.prepareCallback=(t,a,i,o)=>this._prepareMaskCallback.call(null,t,a,i,o)),this._adapter.initializeMask(e)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(e){if(this._valueMode!==e){if(!["object","string","iso-string"].includes(e))return;this._valueMode=e,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(s.observedAttributes.VALUE_MODE,this._valueMode)}}get min(){return this._min?new Date(this._min.getTime()):null}set min(e){if(this._min!==e){let t=this._coerceDateValue(e);this._min=t?new Date(t.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(e){this._max!==e&&(this._max=this._coerceDateValue(e),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(e){this._open!==e&&this._isInitialized&&(this._open=e,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(e=>new Date(e.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(e){e?Array.isArray(e)?this._disabledDates=e.map(t=>new Date(t.getTime())):this._disabledDates=new Date(e.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(e){Array.isArray(e)?this._popupClasses=[...e]:this._popupClasses=e}get masked(){return this._masked}set masked(e){this._masked!==e&&(this._masked=e,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):(this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue())))}get maskFormat(){return this._maskFormat}set maskFormat(e){this._maskFormat!==e&&(this._maskFormat=e,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(e){this._showMaskFormat!==e&&(this._showMaskFormat=e)}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(e){this._notifyInputValueChanges=e}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(e){this._allowInvalidDate!==e&&(this._allowInvalidDate=e,this._adapter.toggleHostAttribute(s.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(e){this._disabledDaysOfWeek!==e&&(this._disabledDaysOfWeek=e,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(e){e!==this._disableDayCallback&&(this._disableDayCallback=e,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(e){this._parseCallback=e,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(e){this._formatCallback=e,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(e){this._prepareMaskCallback=e,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(e){this._showToday=e}get showClear(){return this._showClear}set showClear(e){this._showClear=e}get yearRange(){return this._yearRange}set yearRange(e){this._yearRange!==e&&(this._yearRange=e,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(e){this._locale!==e&&(this._locale=e,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}};export{s as a,n as b,E as c,M as d,w as e};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as b}from"./chunk.BV7EAQST.js";import{a as I}from"./chunk.RONMNRSH.js";import{a as y}from"./chunk.GIENHEMN.js";import{c as f,d as C}from"./chunk.J2Y5KPON.js";import{a as k}from"./chunk.XIQFHO5R.js";import{a as l}from"./chunk.NVUMRW44.js";import{a as m}from"./chunk.OLFOVKQG.js";import{k as v}from"./chunk.LNTTU2GL.js";import{k as D}from"./chunk.L4QSPQDE.js";import{a as g}from"./chunk.DJSHVUEM.js";import{a as h,g as u,k as d,m as _}from"./chunk.J2M2MXP2.js";import{d as r}from"./chunk.M3QDAYD2.js";var L={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",VALUE_MODE:"value-mode",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale"},P={TOGGLE:"forge-date-picker-toggle"},O={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},s={observedAttributes:L,attributes:P,selectors:O};var n=class extends v{constructor(){super()}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():D(this,s.selectors.INPUT).then(()=>{this._foundation.initialize()})}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,a,i){switch(t){case s.observedAttributes.MIN:this.min=i;break;case s.observedAttributes.MAX:this.max=i;break;case s.observedAttributes.OPEN:this.open=d(i);break;case s.observedAttributes.POPUP_CLASSES:this.popupClasses=i;break;case s.observedAttributes.DISABLED:this.disabled=d(i);break;case s.observedAttributes.MASKED:this.masked=d(i);break;case s.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=d(i);break;case s.observedAttributes.MASK_FORMAT:this.maskFormat=i;break;case s.observedAttributes.VALUE_MODE:this.valueMode=i;break;case s.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=d(i);break;case s.observedAttributes.SHOW_TODAY:this.showToday=d(i);break;case s.observedAttributes.SHOW_CLEAR:this.showClear=d(i);break;case s.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=_(i);break;case s.observedAttributes.YEAR_RANGE:this.yearRange=i;break;case s.observedAttributes.LOCALE:this.locale=i;break}}};r([l()],n.prototype,"value",2),r([l()],n.prototype,"min",2),r([l()],n.prototype,"max",2),r([l()],n.prototype,"disabledDates",2),r([l()],n.prototype,"open",2),r([l()],n.prototype,"popupClasses",2),r([l()],n.prototype,"disabled",2),r([l()],n.prototype,"masked",2),r([l()],n.prototype,"maskFormat",2),r([l()],n.prototype,"showMaskFormat",2),r([l()],n.prototype,"valueMode",2),r([l()],n.prototype,"notifyInputValueChanges",2),r([l()],n.prototype,"allowInvalidDate",2),r([l()],n.prototype,"showToday",2),r([l()],n.prototype,"showClear",2),r([l()],n.prototype,"parseCallback",2),r([l()],n.prototype,"formatCallback",2),r([l()],n.prototype,"prepareMaskCallback",2),r([l()],n.prototype,"disabledDaysOfWeek",2),r([l()],n.prototype,"disableDayCallback",2),r([l()],n.prototype,"yearRange",2),r([l()],n.prototype,"locale",2);function E(p){let e=document.createElement("forge-icon-button");e.type="button",e.tabIndex=-1,e.setAttribute("aria-label","Toggle calendar"),e.slot="end",e.density="medium";let t=document.createElement("forge-icon");return t.name=p,e.appendChild(t),e}var M=class extends m{constructor(t){super(t);this._valueChangeListeners=[];this._identifier=h()}initialize(){this._initializeInput()}destroy(){var t;(t=this._calendarDropdown)==null||t.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(t=>t())}addToggleListener(t,a){var i;(i=this._toggleElement)==null||i.addEventListener(t,a)}removeToggleListener(t,a){var i;(i=this._toggleElement)==null||i.removeEventListener(t,a)}attachCalendar(t,a){var i,o,c;if((i=this._calendarDropdown)==null||i.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");a&&Object.assign(this._calendarDropdown,a),this._calendarDropdown.open(t),(o=this._calendarDropdown.dropdownElement)==null||o.style.setProperty("--forge-calendar-width","320px"),(c=this._calendarDropdown.calendar)==null||c.style.setProperty("margin","8px")}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.goToDate(t,!0)}addDateSelectListener(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.addEventListener(b.events.DATE_SELECT,t)}removeDateSelectListener(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.removeEventListener(b.events.DATE_SELECT,t)}setCalendarValue(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.value=t)}setCalendarMinDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.min=t)}setCalendarMaxDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.max=t)}setCalendarDisabledDates(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDates=t)}setCalendarDisabledDaysOfWeek(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=t)}setCalendarDisableDayCallback(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=t)}setCalendarActiveDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.setActiveDate(t)}getCalendarActiveDate(){var t,a;return(a=(t=this._calendarDropdown)==null?void 0:t.calendar)==null?void 0:a.activeDate}setCalendarYearRange(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)!=null&&i.yearRange&&(this._calendarDropdown.calendar.yearRange=t)}setCalendarLocale(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.locale=t)}propagateCalendarKey(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.handleKey(t)}tryCreateToggle(){let t=this._component.querySelector("forge-text-field"),a=this._component.querySelector(s.selectors.TOGGLE);if(t){let i=t.querySelector(`${y.elementName}[slot=end]`);if(i||a){this._toggleElement=i||a;return}let o=this._createToggleElement();t.appendChild(o),this._toggleElement=o}else a&&(this._toggleElement=a)}_createToggleElement(){return E("insert_invitation")}_getDefaultTargetElement(){let t=this._component.querySelector(I.elementName);return t!=null&&t.popoverTargetElement?t.popoverTargetElement:this._component.querySelector("input")||this._component}};var w=class{constructor(e){this._adapter=e;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=k;this._showMaskFormat=!1;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._isInitialized=!1;this._inputListener=t=>this._onInput(t),this._inputKeydownListener=t=>this._onInputKeydown(t),this._inputFocusListener=t=>this._onInputFocus(t),this._inputBlurListener=t=>this._onInputBlur(t),this._inputValueChangedListener=t=>this._onInputValueChanged(t),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=t=>this._onToggleMousedown(t),this._dateSelectListener=t=>this._onDateSelected(t.detail),this._activeChangeListener=t=>this._onActiveDescendantChanged(t),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var e;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(e=this._initializeState)==null||e.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(e){this._handleInput(this._adapter.getInputValue())}_onInputFocus(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(e=!1){this._formatInputValue();let t={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener},i=new Date().getTime();this._min&&this._max&&this._max.getTime()<i&&(t.year=this._min.getFullYear(),t.month=this._min.getMonth()),this._adapter.attachCalendar(t,a),this._adapter.addDateSelectListener(this._dateSelectListener),this._open=!0,this._adapter.setHostAttribute(s.observedAttributes.OPEN),e&&this._emitOpenEvent()}_closeCalendar(e=!1){this._open=!1,this._adapter.removeHostAttribute(s.observedAttributes.OPEN),this._adapter.removeDateSelectListener(this._dateSelectListener),this._adapter.detachCalendar(),e&&this._emitCloseEvent()}_onInputKeydown(e){if(e.shiftKey)switch(e.key){case"Delete":case"Backspace":e.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){e.preventDefault(),this._adapter.propagateCalendarKey(e);return}break}switch(e.key){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":e.preventDefault(),this._open?this._adapter.propagateCalendarKey(e):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){e.key==="Enter"&&e.stopPropagation(),e.preventDefault();let t=["ArrowLeft","ArrowRight"].includes(e.key);this._masked&&t&&e.stopImmediatePropagation(),this._adapter.propagateCalendarKey(e)}break;case"n":case"t":e.preventDefault(),this._onToday(),this._open&&this._closeCalendar(!0);break;case"PageUp":case"PageDown":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"Tab":if(this._open){let t=this._adapter.getCalendarActiveDate();t&&this._onDateSelected({date:t,selected:!0,type:"date"})}break}}_getSanitizedDateString(e){return e.replace(/_|[a-z]|[A-Z]/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(e){this._disabled||(e.stopPropagation(),!this._adapter.isInputDisabled()&&(e.preventDefault(),this._open?this._closeCalendar(!0):(g.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onActiveDescendantChanged(e){this._adapter.setActiveDescendant(e)}_formatInputValue(){let e=this._adapter.getInputValue();if(e){let t=this._parseDateString(e);if(u(t)&&this._isDateValueAcceptable(t)){let a=this._formatDate(t);a&&a!==e&&this._adapter.setInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(e){return u(e)?typeof this._formatCallback=="function"?this._formatCallback(e):C(e):""}_parseDateString(e){if(e=e.replace(/_|\s/g,""),!e||!e.length)return null;let t=typeof this._parseCallback=="function"?this._parseCallback(e):f(e);return u(t)?t:null}_coerceDateValue(e){return typeof e=="string"?this._parseDateString(e):e}_getTypedValue(e){switch(this._valueMode){case"object":return e;case"string":return this._formatDate(e);case"iso-string":return e&&e.setHours(0,0,0,0),e?e.toISOString():null;default:return e}}_isDateValueAcceptable(e){if(!e||this._allowInvalidDate)return!0;let t=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=e.getTime():!0,a=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=e.getTime():!0,i=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],o=()=>!i().some(T=>T.getTime()===e.getTime()),c=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(e.getDay())),A=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(e);return t()&&a()&&o()&&c()&&A()}_initializeMask(){let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:t=>this._handleInput(t)};this._prepareMaskCallback&&(e.prepareCallback=(t,a,i,o)=>this._prepareMaskCallback.call(null,t,a,i,o)),this._adapter.initializeMask(e)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(e){if(this._valueMode!==e){if(!["object","string","iso-string"].includes(e))return;this._valueMode=e,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(s.observedAttributes.VALUE_MODE,this._valueMode)}}get min(){return this._min?new Date(this._min.getTime()):null}set min(e){if(this._min!==e){let t=this._coerceDateValue(e);this._min=t?new Date(t.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(e){this._max!==e&&(this._max=this._coerceDateValue(e),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(e){this._open!==e&&this._isInitialized&&(this._open=e,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(e=>new Date(e.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(e){e?Array.isArray(e)?this._disabledDates=e.map(t=>new Date(t.getTime())):this._disabledDates=new Date(e.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(e){Array.isArray(e)?this._popupClasses=[...e]:this._popupClasses=e}get masked(){return this._masked}set masked(e){this._masked!==e&&(this._masked=e,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):(this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue())))}get maskFormat(){return this._maskFormat}set maskFormat(e){this._maskFormat!==e&&(this._maskFormat=e,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(e){this._showMaskFormat!==e&&(this._showMaskFormat=e)}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(e){this._notifyInputValueChanges=e}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(e){this._allowInvalidDate!==e&&(this._allowInvalidDate=e,this._adapter.toggleHostAttribute(s.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(e){this._disabledDaysOfWeek!==e&&(this._disabledDaysOfWeek=e,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(e){e!==this._disableDayCallback&&(this._disableDayCallback=e,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(e){this._parseCallback=e,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(e){this._formatCallback=e,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(e){this._prepareMaskCallback=e,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(e){this._showToday=e}get showClear(){return this._showClear}set showClear(e){this._showClear=e}get yearRange(){return this._yearRange}set yearRange(e){this._yearRange!==e&&(this._yearRange=e,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(e){this._locale!==e&&(this._locale=e,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}};export{s as a,n as b,E as c,M as d,w as e};
|
|
7
|
+
//# sourceMappingURL=chunk.XTJGWT5F.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as N}from"./chunk.AGLI4WR4.js";import{e as F,h as V,j as B}from"./chunk.7AAICE77.js";import{c as x}from"./chunk.2GUWHBUU.js";import{a as P,b as m}from"./chunk.O5WAQQNR.js";import{c as k}from"./chunk.USTVZ6MZ.js";import{d as w}from"./chunk.RLQB7224.js";import{d as A}from"./chunk.T7NWP7DB.js";import{a as p}from"./chunk.NVUMRW44.js";import{a as D}from"./chunk.OLFOVKQG.js";import{a as y,b as T,d as S}from"./chunk.VRSPT7WX.js";import{a as L,e as C}from"./chunk.LNTTU2GL.js";import{k as M}from"./chunk.L4QSPQDE.js";import{a as g,b as O,i as I,k as _}from"./chunk.J2M2MXP2.js";import{a as c,b,d as a}from"./chunk.M3QDAYD2.js";var l=`${T}menu`,H={POPUP:"forge-menu__popup",MENU:"mdc-menu"},K={TOGGLE:`.${l}__toggle,[${l}-toggle],forge-button,forge-icon-button,forge-fab,button,[type=button],[role=button],a,[tabindex]:not([tabindex^="-"])`,MENU_LIST:"forge-list"},G={OPEN:"open",PLACEMENT:"placement",SELECTED_INDEX:"selected-index",SELECTED_VALUE:"selected-value",DENSE:"dense",ICON_CLASS:"icon-class",PERSIST_SELECTION:"persist-selection",MODE:"mode",SYNC_POPUP_WIDTH:"sync-popup-width",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},U={SELECT:`${l}-select`,OPEN:`${l}-open`,CLOSE:`${l}-close`,ACTIVE_CHANGE:`${l}-active-change`},R={CHILD_MOUSE_LEAVE_TIMEOUT:300,POPUP_MOUSE_LEAVE_TIMEOUT:500},i={elementName:l,classes:H,selectors:K,attributes:G,events:U,numbers:R};var u=class extends D{constructor(e){super(e);this._childMenus=new Map}getDropdownElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}hasTargetElement(){return!!this._targetElement}initializeTarget(){this._targetElement=this._component.querySelector(i.selectors.TOGGLE),this._targetElement||(this._targetElement=this._component.firstElementChild)}initializeAccessibility(e){this._targetElement&&(this._targetElement.setAttribute("aria-atomic","true"),this._targetElement.setAttribute("aria-live","assertive"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.hasAttribute("aria-label")||this._targetElement.setAttribute("aria-label",this._targetElement.textContent||""))}addTargetListener(e,t,n=!1){this._targetElement&&this._targetElement.addEventListener(e,t,n)}removeTargetListener(e,t){this._targetElement&&this._targetElement.removeEventListener(e,t)}attachMenu(e){this._listDropdown||!this._targetElement||(this._listDropdown=new V(this._targetElement,e),this._listDropdown.open(),this._targetElement.setAttribute("aria-expanded","true"),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`))}setOptions(e){this._listDropdown&&this._listDropdown.setOptions(e)}destroyListDropdown(){this._listDropdown&&(this._listDropdown.destroy(),this._listDropdown=void 0)}async detachMenu(){this._targetElement&&(this._targetElement.removeAttribute("aria-activedescendant"),this._targetElement.removeAttribute("aria-expanded"),this._targetElement.removeAttribute("aria-controls")),this._listDropdown&&(await this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}setCascadeTargetInactive(){let e=this._targetElement;e!=null&&e.active&&(e.active=!1)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}focusTarget(){this._targetElement&&this._targetElement.focus()}isTargetFocused(){return document.activeElement===this._targetElement}updateActiveDescendant(e){this._targetElement&&(e?this._targetElement.setAttribute("aria-activedescendant",e):this._targetElement.removeAttribute("aria-activedescendant"))}addDropdownListener(e,t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(e,t)}isOwnElement(e){return!this._targetElement||!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._targetElement.contains(e)||!!this._listDropdown.dropdownElement.contains(e)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}proxyKeyboardEventToChild(e,t){if(!this.getDropdownElement())return;let n=this._getOpenChildMenu(t);n&&n.propagateKeyEvent(e)}toggleChildMenu(e,t){let r=this._getListItems()[e].parentElement;r&&r.tagName.toLowerCase()===i.elementName&&(t===void 0?r.open=!r.open:r.open=t,r.activateFirstOption())}createChildMenu(e,t,n,o,r){let d=document.createElement("forge-menu");return d.style.display="block",d.addEventListener(i.events.OPEN,()=>{this._childMenus.set(e,d),n(e)}),d.addEventListener(i.events.CLOSE,()=>{this._childMenus.delete(e),o(e)}),d.addEventListener(i.events.SELECT,E=>{E.stopPropagation(),r(b(c({},E.detail),{parentValue:t}))}),d}closeOtherChildMenus(e){let t=[];this._childMenus.forEach((n,o)=>{o!==e&&(n.open=!1,t.push(o))}),t.forEach(n=>this._childMenus.delete(n))}setSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}_getOpenChildMenu(e){if(!this.getDropdownElement())return null;let t=this._getOwnList(e);return t?t.querySelector(`${i.elementName}[${i.attributes.OPEN}]`):null}_getOwnList(e){let t=this.getDropdownElement();return t?t.querySelector(`${m.elementName}[id="list-dropdown-list-${e}"]`):null}_getListItems(){let e=this.getDropdownElement();if(!e)return[];let t=e.querySelector(m.elementName);return t?Array.from(t.querySelectorAll(P.elementName)):[]}};var h=class extends B{constructor(e){super({popupTimeout:i.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,targetTimeout:i.numbers.CHILD_MOUSE_LEAVE_TIMEOUT});this._adapter=e;this._placement="bottom-start";this._fallbackPlacements=[];this._dense=!1;this._iconClass=S;this._persistSelection=!1;this._mode="click";this._identifier=g(),this._clickListener=t=>this._onTargetClick(t),this._blurListener=t=>this._onTargetBlur(t),this._selectListener=t=>this._handleSelectEvent(t),this._keydownListener=t=>this.onKeydown(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t)}initialize(){this._adapter.initializeTarget(),this._adapter.initializeAccessibility(this._identifier),this._initializeInteractionListeners()}disconnect(){this._closeMenu({destroy:!0}),this._destroyInteractionListeners()}activateFirstOption(){this._adapter.activateFirstOption()}_applyMode(){this._adapter.hasTargetElement()&&(this._mode!=="cascade"?this._adapter.addTargetListener("click",this._clickListener):this._attachCascadingListeners())}_initializeInteractionListeners(){this._adapter.hasTargetElement()&&(this._applyMode(),this._adapter.addTargetListener("keydown",this._keydownListener,!0),this._adapter.addTargetListener("focusout",this._blurListener))}_destroyInteractionListeners(){this._adapter.hasTargetElement()&&(this._adapter.removeTargetListener("keydown",this._clickListener),this._adapter.removeTargetListener("focusout",this._blurListener),this._adapter.removeTargetListener("click",this._clickListener),this._detachCascadingListeners())}_attachCascadingListeners(){this._adapter.addTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.addTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener)}_detachCascadingListeners(){this._adapter.removeTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.removeTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener)}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}get _flatOptions(){return this._flattenOptions(this._options)}_flattenOptions(e){return F(e,1)?e.reduce((t,n)=>n.options?t.concat(n.options):t,[]):e}_onTargetClick(e){if(this._open){this._closeDropdown();return}this.open=!this._open,this._open&&this._adapter.focusTarget()}_onTargetBlur(e){this._open&&this._closeDropdown()}_onActiveOptionChanged(e){let t={id:e},n=this._adapter.emitHostEvent(i.events.ACTIVE_CHANGE,t,!0,!0);this._mode!=="cascade"&&n&&this._adapter.updateActiveDescendant(e)}onKeydown(e){if(this._childOpen){this._adapter.proxyKeyboardEventToChild(e,this._identifier);return}switch(e.code){case"Tab":this._open&&this._selectActiveOption();break;case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Space":e.preventDefault(),this._open?this._closeDropdown():this._openDropdown({fromKeyboard:!0});break;case"Home":case"End":this._open&&(e.preventDefault(),this._adapter.propagateKey(e.code));break;case"Enter":if(e.preventDefault(),!this._open){e.preventDefault(),this._openDropdown({fromKeyboard:!0});return}e.stopImmediatePropagation(),this._adapter.propagateKey(e.code);let t=this._adapter.getActiveOptionIndex(),n=this._nonDividerOptions[t];n&&n.options&&n.options.length&&this._adapter.toggleChildMenu(t);break;case"ArrowUp":case"ArrowDown":if(this._open&&e.stopImmediatePropagation(),e.preventDefault(),!this._open&&e.code==="ArrowDown"){this._openDropdown({fromKeyboard:!0}),this._adapter.activateFirstOption();return}this._adapter.propagateKey(e.code);break;case"ArrowLeft":this._open&&e.stopImmediatePropagation(),this._mode==="cascade"&&this._open&&this._closeDropdown();break;case"ArrowRight":if(this._open&&e.stopImmediatePropagation(),!this._open)return;let o=this._adapter.getActiveOptionIndex(),r=this._nonDividerOptions[o];if(r&&r.options){this._adapter.toggleChildMenu(o,e.code==="ArrowRight");return}break}}async _openMenu({fromKeyboard:e}={}){this._open=!0;let t=[];if(typeof this._optionsFactory=="function")this._loadOptionsAsync(),this._options=[];else{if(!this._options||!this._options.length)return;t=this._options}this._persistSelection||t.forEach(r=>r.selected=!1),this._mapIconToLeadingIcon();let n=this._persistSelection?this._getSelectedValues():[],o={id:this._identifier,type:"menu",options:this._options,selectedValues:n,iconClass:this._iconClass,dense:this._dense,multiple:!1,popupStatic:!0,allowBusy:!0,asyncStyle:"spinner",optionBuilder:this._optionBuilder,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._placement,popupFallbackPlacements:this._fallbackPlacements,activeStartIndex:e?0:void 0,popupClasses:[i.classes.POPUP,i.classes.MENU,...this._popupClasses],syncWidth:this._syncPopupWidth,activeChangeCallback:this._activeChangeListener,selectCallback:this._selectListener,popupOffset:this._popupOffset,cascadingElementFactory:r=>this._createCascadingElement(r)};this._adapter.setHostAttribute(i.attributes.OPEN,""),this._adapter.attachMenu(o),this._mode==="cascade"&&(this._adapter.addDropdownListener("mouseenter",this._childPopupMouseEnterListener),this._adapter.addDropdownListener("mouseleave",this._childPopupMouseLeaveListener)),this._adapter.addDropdownListener(i.events.ACTIVE_CHANGE,r=>{this._onActiveOptionChanged(r.detail.id)}),this._adapter.emitHostEvent(i.events.OPEN)}_closeMenu({destroy:e=!1}={}){this._open=!1,this._childOpen=!1,e?this._adapter.destroyListDropdown():this._adapter.detachMenu(),this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout),this._adapter.removeHostAttribute(i.attributes.OPEN),this._adapter.emitHostEvent(i.events.CLOSE)}_loadOptionsAsync(){return this._optionsFactory?Promise.resolve(this._optionsFactory()).then(e=>{if(this._persistSelection||this._flattenOptions(e).filter(n=>n.selected).forEach(n=>n.selected=!1),this._open)if(e&&I(e)&&e.length){this._options=e,this._mapIconToLeadingIcon(),this._adapter.setOptions(e);let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}else this._open&&this._closeDropdown()}).catch(e=>{console.error("An unexpected error ocurred while opening the menu:",e),this._open&&this._closeDropdown()}):(this._open&&this._closeMenu(),Promise.resolve())}_handleSelectEvent(e){let t=this._nonDividerOptions.findIndex(n=>n.value===e);t<0||this._selectOptionByIndex(t)}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._selectOptionByIndex(e)}_selectOptionByIndex(e){let{options:t,value:n}=this._nonDividerOptions[e];if(t){this._adapter.setActiveOption(e);return}this._closeDropdown();let o={index:e,value:n};!this._adapter.emitHostEvent(i.events.SELECT,o,!0,!0)||(this._selectedValue=this._persistSelection?n:void 0)}_getSelectedValues(){let e=this._flatOptions.filter(t=>t.selected).map(t=>t.value);return this._selectedValue!==void 0&&e.push(this._selectedValue),e}_onCascadingOptionSelected(e){this._persistSelection&&(this._selectedValue=e.value),this._adapter.emitHostEvent(i.events.SELECT,e),this._closeDropdown()}_onCascadingChildOpen(e){super._clearMouseLeaveTimeout(),this._adapter.closeOtherChildMenus(e),this._childOpen=!0,this._adapter.setActiveOption(e)}_onCascadingChildClose(e){this._childOpen=!1}_closeDropdown(){this._closeMenu()}_openDropdown({fromKeyboard:e}={}){this._openMenu({fromKeyboard:e})}_setCascadeTargetInactive(){this._adapter.setCascadeTargetInactive()}_isOwnElement(e){return this._adapter.isOwnElement(e)}_createCascadingElement({index:e,options:t,parentValue:n}){let o=this._adapter.createChildMenu(e,n,this._onCascadingChildOpen.bind(this),this._onCascadingChildClose.bind(this),this._onCascadingOptionSelected.bind(this));return o.mode="cascade",o.popupOffset={mainAxis:0,crossAxis:-8},o.dense=this._dense,o.placement="right-start",o.fallbackPlacements=["left-start","right-start"],o.persistSelection=this._persistSelection,this._persistSelection&&(o.selectedValue=this._selectedValue),o.options=t,o.optionBuilder=this._optionBuilder,o.iconClass=this._iconClass,o}_mapIconToLeadingIcon(){this._flatOptions.filter(e=>e.icon).forEach(e=>e.leadingIcon=e.icon)}get open(){return this._open}set open(e){e=!!e,this._open!==e&&(this._open=e,e?this._openDropdown():this._closeDropdown())}set options(e){if(typeof e=="function")this.optionsFactory=e;else if(this.optionsFactory=void 0,this._options=e.map(t=>c({},t)),this._open&&(this._mapIconToLeadingIcon(),this._adapter.setOptions(this._options),this._persistSelection)){let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}}get options(){return this._options?this._flatOptions.map(e=>c({},e)):[]}set optionsFactory(e){this._optionsFactory=e}set selectedIndex(e){let t=this._nonDividerOptions[e];t&&t.value!==this._selectedValue&&(this.selectedValue=t.value)}get selectedIndex(){return this._selectedValue!==void 0?this._nonDividerOptions.findIndex(e=>e.value===this._selectedValue):-1}set selectedValue(e){this._selectedValue!==e&&(this._selectedValue=e,this._adapter.setSelectedValues(this._selectedValue))}get selectedValue(){return this._selectedValue}get placement(){return this._placement}set placement(e){this._placement!==e&&(this._placement=e||"bottom-start",this._adapter.setHostAttribute(i.attributes.PLACEMENT,this._placement))}get fallbackPlacements(){return this._fallbackPlacements}set fallbackPlacements(e){this._fallbackPlacements=Array.isArray(e)?e:[]}get dense(){return this._dense}set dense(e){this._dense=e}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass=e}get persistSelection(){return this._persistSelection}set persistSelection(e){this._persistSelection!==e&&(this._persistSelection=e,this._adapter.toggleHostAttribute(i.attributes.PERSIST_SELECTION,this._persistSelection),this._persistSelection||(this._flatOptions.forEach(t=>t.selected=!1),this._selectedValue=void 0))}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._destroyInteractionListeners(),this._applyMode(),this._adapter.setHostAttribute(i.attributes.MODE,this._mode))}get popupOffset(){return this._popupOffset}set popupOffset(e){this._popupOffset=e}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get popupElement(){return this._adapter.getDropdownElement()}};var $="<template><slot></slot></template>",z=":host{display:-webkit-inline-box;display:inline-flex}:host([hidden]){display:none}",s=class extends N{constructor(){super();A.define(w),this._foundation=new h(new u(this)),C(this,$,z)}static get observedAttributes(){return[i.attributes.OPEN,i.attributes.PLACEMENT,i.attributes.SELECTED_INDEX,i.attributes.SELECTED_VALUE,i.attributes.DENSE,i.attributes.ICON_CLASS,i.attributes.PERSIST_SELECTION,i.attributes.MODE,i.attributes.SYNC_POPUP_WIDTH,i.attributes.POPUP_CLASSES,i.attributes.OPTION_LIMIT,i.attributes.OBSERVE_SCROLL,i.attributes.OBSERVE_SCROLL_THRESHOLD]}connectedCallback(){this.querySelector(i.selectors.TOGGLE)?this._foundation.initialize():M(this,i.selectors.TOGGLE).then(()=>this._foundation.initialize())}attributeChangedCallback(e,t,n){switch(super.attributeChangedCallback(e,t,n),e){case i.attributes.OPEN:this._foundation.open=O(n);break;case i.attributes.PLACEMENT:this._foundation.placement=n;break;case i.attributes.SELECTED_INDEX:this._foundation.selectedIndex=Number(n);break;case i.attributes.SELECTED_VALUE:this._foundation.selectedValue=n;break;case i.attributes.DENSE:this._foundation.dense=_(n);break;case i.attributes.ICON_CLASS:this._foundation.iconClass=n;break;case i.attributes.PERSIST_SELECTION:this.persistSelection=_(n);break;case i.attributes.MODE:this.mode=n;break}}disconnectedCallback(){this._foundation.disconnect()}propagateKeyEvent(e){this._foundation.onKeydown(e)}activateFirstOption(){this._foundation.activateFirstOption()}};a([p()],s.prototype,"open",2),a([p()],s.prototype,"options",2),a([p()],s.prototype,"selectedIndex",2),a([p()],s.prototype,"selectedValue",2),a([p()],s.prototype,"placement",2),a([p()],s.prototype,"fallbackPlacements",2),a([p()],s.prototype,"dense",2),a([p()],s.prototype,"iconClass",2),a([p()],s.prototype,"persistSelection",2),a([p()],s.prototype,"mode",2),a([p()],s.prototype,"popupOffset",2),a([p()],s.prototype,"optionBuilder",2),a([p({set:!1})],s.prototype,"popupElement",2),s=a([y({name:i.elementName,dependencies:[k,x]})],s);function We(){L(s)}export{i as a,u as b,h as c,s as d,We as e};
|
|
7
|
+
//# sourceMappingURL=chunk.YNCTSMT6.js.map
|