@tylertech/forge 3.0.0-next.23 → 3.0.0-next.24
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 +28789 -33252
- 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/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.AOVXNX7P.js → chunk.24L6GVJK.js} +2 -2
- package/dist/esm/chunks/{chunk.WMJSYYXQ.js → chunk.27YQZWEJ.js} +2 -2
- package/dist/esm/chunks/{chunk.AG6IRMLZ.js → chunk.2CP5CIRB.js} +2 -2
- package/dist/esm/chunks/chunk.2FF7EQQ3.js +7 -0
- package/dist/esm/chunks/chunk.2FF7EQQ3.js.map +7 -0
- package/dist/esm/chunks/{chunk.USTVZ6MZ.js → chunk.345JBXIL.js} +2 -2
- package/dist/esm/chunks/{chunk.USTVZ6MZ.js.map → chunk.345JBXIL.js.map} +2 -2
- package/dist/esm/chunks/chunk.3B573FQF.js +7 -0
- package/dist/esm/chunks/chunk.3B573FQF.js.map +7 -0
- package/dist/esm/chunks/{chunk.H4VQXV2H.js → chunk.3CXCYRCE.js} +2 -2
- package/dist/esm/chunks/{chunk.MTIPIEXA.js → chunk.3LNZRQAL.js} +2 -2
- package/dist/esm/chunks/{chunk.BQ52JYLA.js → chunk.3LUG3LPU.js} +2 -2
- package/dist/esm/chunks/{chunk.IL4S57WO.js → chunk.3ODT27TD.js} +2 -2
- package/dist/esm/chunks/chunk.3S3NH5P4.js +7 -0
- package/dist/esm/chunks/chunk.3S3NH5P4.js.map +7 -0
- package/dist/esm/chunks/{chunk.XZ23XHFE.js → chunk.45N7ZZVL.js} +2 -2
- package/dist/esm/chunks/{chunk.YWJVZVZX.js → chunk.4GFUXXXH.js} +2 -2
- package/dist/esm/chunks/chunk.4UMFAYZH.js +7 -0
- package/dist/esm/chunks/chunk.4UMFAYZH.js.map +7 -0
- package/dist/esm/chunks/{chunk.ZA7JY3AY.js → chunk.5DDR6QSF.js} +2 -2
- package/dist/esm/chunks/{chunk.3KAKJGUS.js → chunk.5NEWFXFX.js} +2 -2
- package/dist/esm/chunks/{chunk.VRSPT7WX.js → chunk.5OT53ZJM.js} +2 -2
- package/dist/esm/chunks/{chunk.VL5RWSAV.js → chunk.6DWRGYKV.js} +2 -2
- package/dist/esm/chunks/{chunk.IEABOPNB.js → chunk.6T7KPDCD.js} +2 -2
- package/dist/esm/chunks/chunk.6TQDZAMD.js +7 -0
- package/dist/esm/chunks/chunk.6TQDZAMD.js.map +7 -0
- package/dist/esm/chunks/chunk.6V6VLKIK.js +7 -0
- package/dist/esm/chunks/chunk.6V6VLKIK.js.map +7 -0
- package/dist/esm/chunks/{chunk.SROEDYPL.js → chunk.7JO5MB55.js} +2 -2
- package/dist/esm/chunks/{chunk.CLYGTLXN.js → chunk.7TE74NJZ.js} +2 -2
- package/dist/esm/chunks/{chunk.AGLI4WR4.js → chunk.AJLS5C7O.js} +2 -2
- package/dist/esm/chunks/{chunk.TSSZQPLE.js → chunk.BURDWL57.js} +2 -2
- package/dist/esm/chunks/chunk.BYSMPFWQ.js +7 -0
- package/dist/esm/chunks/chunk.BYSMPFWQ.js.map +7 -0
- package/dist/esm/chunks/{chunk.BHE6Z5Y2.js → chunk.CQ4XBOX5.js} +2 -2
- package/dist/esm/chunks/{chunk.NEQX2QVX.js → chunk.DJQXJO3T.js} +2 -2
- package/dist/esm/chunks/chunk.DN6Y3VXC.js +7 -0
- package/dist/esm/chunks/{chunk.RLQB7224.js.map → chunk.DN6Y3VXC.js.map} +2 -2
- package/dist/esm/chunks/{chunk.VJZ7VDG5.js → chunk.DPJJB67L.js} +2 -2
- package/dist/esm/chunks/{chunk.7Y3BUR7Q.js → chunk.EBRMG6N3.js} +2 -2
- package/dist/esm/chunks/{chunk.7Y3BUR7Q.js.map → chunk.EBRMG6N3.js.map} +2 -2
- package/dist/esm/chunks/chunk.EPMDEQF7.js +7 -0
- package/dist/esm/chunks/chunk.EPMDEQF7.js.map +7 -0
- package/dist/esm/chunks/{chunk.OOAJHLW4.js → chunk.EZIABLIR.js} +2 -2
- package/dist/esm/chunks/{chunk.ZG6YF2HI.js → chunk.F53DSRUO.js} +2 -2
- package/dist/esm/chunks/{chunk.7AAICE77.js → chunk.FIO22U2C.js} +2 -2
- package/dist/esm/chunks/{chunk.U6J4VHU6.js → chunk.FKMTIOBA.js} +2 -2
- package/dist/esm/chunks/chunk.FMDUCGOU.js +7 -0
- package/dist/esm/chunks/{chunk.OJ7JO4O6.js.map → chunk.FMDUCGOU.js.map} +1 -1
- package/dist/esm/chunks/{chunk.W4HANHUO.js → chunk.FMGBPF7B.js} +2 -2
- package/dist/esm/chunks/{chunk.5MB6CTBA.js → chunk.FVFPDWA4.js} +2 -2
- package/dist/esm/chunks/{chunk.ENUKGA2U.js → chunk.FYPIHFXD.js} +2 -2
- package/dist/esm/chunks/chunk.GNQ24XWK.js +7 -0
- package/dist/esm/chunks/chunk.GNQ24XWK.js.map +7 -0
- package/dist/esm/chunks/chunk.GP6LHJDA.js +7 -0
- package/dist/esm/chunks/chunk.GP6LHJDA.js.map +7 -0
- package/dist/esm/chunks/{chunk.CE35CVDV.js → chunk.GQ33JZVE.js} +2 -2
- package/dist/esm/chunks/{chunk.2W23MOPP.js → chunk.GUBLRHCG.js} +2 -2
- package/dist/esm/chunks/{chunk.473WRJ5G.js → chunk.HJUXBSFZ.js} +2 -2
- package/dist/esm/chunks/chunk.HJUXBSFZ.js.map +7 -0
- package/dist/esm/chunks/{chunk.37B332ZK.js → chunk.HSNVTV7K.js} +2 -2
- package/dist/esm/chunks/{chunk.PC6TW5XE.js → chunk.HXNNWUI3.js} +2 -2
- package/dist/esm/chunks/{chunk.QCPV5DEG.js → chunk.IOGCI64X.js} +2 -2
- package/dist/esm/chunks/chunk.JB2F2HQE.js +7 -0
- package/dist/esm/chunks/chunk.JB2F2HQE.js.map +7 -0
- package/dist/esm/chunks/chunk.JGPWKCAU.js +7 -0
- package/dist/esm/chunks/chunk.JGPWKCAU.js.map +7 -0
- package/dist/esm/chunks/chunk.JU76GN6C.js +7 -0
- package/dist/esm/chunks/{chunk.KLU54MDQ.js.map → chunk.JU76GN6C.js.map} +2 -2
- package/dist/esm/chunks/chunk.K7I5FWBT.js +7 -0
- package/dist/esm/chunks/chunk.K7I5FWBT.js.map +7 -0
- package/dist/esm/chunks/{chunk.5UOX22ML.js → chunk.KKVQNKMV.js} +2 -2
- package/dist/esm/chunks/{chunk.YPNSK2CK.js → chunk.KW5A2U5U.js} +2 -2
- package/dist/esm/chunks/chunk.L6L3CPBH.js +7 -0
- package/dist/esm/chunks/chunk.L6L3CPBH.js.map +7 -0
- package/dist/esm/chunks/{chunk.KO6ODCZC.js → chunk.LIJE4T3D.js} +2 -2
- package/dist/esm/chunks/{chunk.KEOLH7G3.js → chunk.LQN5U4QH.js} +2 -2
- package/dist/esm/chunks/{chunk.5QIWLZG3.js → chunk.LSUIJDFO.js} +2 -2
- package/dist/esm/chunks/{chunk.77C7S7ZS.js → chunk.N65CAIE5.js} +2 -2
- package/dist/esm/chunks/{chunk.UKBE2FMZ.js → chunk.NNLZKMFX.js} +2 -2
- package/dist/esm/chunks/{chunk.EO3GP6DP.js → chunk.ON6FFHRE.js} +2 -2
- package/dist/esm/chunks/{chunk.OVXEOEJF.js → chunk.ONFZ3H7M.js} +2 -2
- package/dist/esm/chunks/{chunk.32APLNN2.js → chunk.OVVBXM6K.js} +2 -2
- package/dist/esm/chunks/{chunk.FLBYVCQ6.js → chunk.P3Q3IVVX.js} +2 -2
- package/dist/esm/chunks/{chunk.FLBYVCQ6.js.map → chunk.P3Q3IVVX.js.map} +2 -2
- package/dist/esm/chunks/{chunk.DKERDHXH.js → chunk.P74RZEWP.js} +2 -2
- package/dist/esm/chunks/{chunk.QLGJS37N.js → chunk.PBORL6KX.js} +2 -2
- package/dist/esm/chunks/chunk.PDJ2H5ZG.js +7 -0
- package/dist/esm/chunks/{chunk.UPSXYWPD.js.map → chunk.PDJ2H5ZG.js.map} +3 -3
- package/dist/esm/chunks/{chunk.JGURMVW7.js → chunk.PGMOAILY.js} +2 -2
- package/dist/esm/chunks/{chunk.OEI35LFU.js → chunk.PKCMTSWR.js} +2 -2
- package/dist/esm/chunks/{chunk.QUXMLWBJ.js → chunk.Q3Z6VZUD.js} +2 -2
- package/dist/esm/chunks/{chunk.TQWZDM6T.js → chunk.QBHJFCLL.js} +2 -2
- package/dist/esm/chunks/{chunk.WXVVOFNK.js → chunk.QDG6TP2Z.js} +2 -2
- package/dist/esm/chunks/{chunk.H5RW3A4M.js → chunk.QH27OIAK.js} +2 -2
- package/dist/esm/chunks/chunk.QKCPE4LW.js +7 -0
- package/dist/esm/chunks/{chunk.2GUWHBUU.js → chunk.QM32CJAX.js} +2 -2
- package/dist/esm/chunks/{chunk.2GUWHBUU.js.map → chunk.QM32CJAX.js.map} +2 -2
- package/dist/esm/chunks/{chunk.FLF5RTYO.js → chunk.R2CJMM2F.js} +2 -2
- package/dist/esm/chunks/{chunk.IQYOLMPG.js → chunk.RGDLRUSM.js} +2 -2
- package/dist/esm/chunks/{chunk.QIZBZGYT.js → chunk.RKPWFEFJ.js} +2 -2
- package/dist/esm/chunks/{chunk.RXBLU4OJ.js → chunk.S5EU72NR.js} +2 -2
- package/dist/esm/chunks/chunk.SJYEDGBN.js +7 -0
- package/dist/esm/chunks/chunk.SJYEDGBN.js.map +7 -0
- package/dist/esm/chunks/{chunk.T7NWP7DB.js → chunk.SW6JDC2Y.js} +2 -2
- package/dist/esm/chunks/{chunk.7IPAW4D2.js → chunk.TAQRHBGS.js} +2 -2
- package/dist/esm/chunks/{chunk.MFQRXVKO.js → chunk.TEZFEC5B.js} +2 -2
- package/dist/esm/chunks/{chunk.MX4JX4GT.js → chunk.THIUQ2AU.js} +2 -2
- package/dist/esm/chunks/{chunk.LY2Z2Z7S.js → chunk.TQMT7BIZ.js} +2 -2
- package/dist/esm/chunks/{chunk.GIENHEMN.js → chunk.TR45SGWL.js} +2 -2
- package/dist/esm/chunks/chunk.TZHVZMOB.js +12 -0
- package/dist/esm/chunks/chunk.TZHVZMOB.js.map +7 -0
- package/dist/esm/chunks/{chunk.CFAI4K3E.js → chunk.UBVWYWO7.js} +2 -2
- package/dist/esm/chunks/{chunk.NWVQ5HK2.js → chunk.UHPODZWA.js} +2 -2
- package/dist/esm/chunks/{chunk.3PMONORO.js → chunk.V4R7FCZ2.js} +2 -2
- package/dist/esm/chunks/chunk.V5YGDB7V.js +7 -0
- package/dist/esm/chunks/{chunk.3II7OT2I.js.map → chunk.V5YGDB7V.js.map} +2 -2
- package/dist/esm/chunks/chunk.VAE5IFEM.js +7 -0
- package/dist/esm/chunks/{chunk.GBAVJILM.js.map → chunk.VAE5IFEM.js.map} +4 -4
- package/dist/esm/chunks/{chunk.QTY25OTN.js → chunk.VCASLYVR.js} +2 -2
- package/dist/esm/chunks/{chunk.QTY25OTN.js.map → chunk.VCASLYVR.js.map} +2 -2
- package/dist/esm/chunks/chunk.W4CL56G7.js +7 -0
- package/dist/esm/chunks/{chunk.BQZKOIAW.js.map → chunk.W4CL56G7.js.map} +2 -2
- package/dist/esm/chunks/{chunk.BEFAXPXJ.js → chunk.WNX3GGYT.js} +2 -2
- package/dist/esm/chunks/chunk.X4NHJE7S.js +7 -0
- package/dist/esm/chunks/chunk.X4NHJE7S.js.map +7 -0
- package/dist/esm/chunks/{chunk.I7YON2TC.js → chunk.X5MI5OFS.js} +2 -2
- package/dist/esm/chunks/{chunk.QKTK5XUE.js → chunk.XHRBFPZ2.js} +2 -2
- package/dist/esm/chunks/{chunk.ASLHRT3N.js → chunk.XT6RPXTM.js} +2 -2
- package/dist/esm/chunks/{chunk.VGIRVTBJ.js → chunk.XWVFJVBN.js} +2 -2
- package/dist/esm/chunks/{chunk.YNCTSMT6.js → chunk.YXFGOJ5Z.js} +2 -2
- package/dist/esm/chunks/chunk.YZ26YDCO.js +7 -0
- package/dist/esm/chunks/{chunk.A7BCLPP4.js.map → chunk.YZ26YDCO.js.map} +2 -2
- package/dist/esm/chunks/chunk.Z6G2RUC2.js +7 -0
- package/dist/esm/chunks/chunk.Z6G2RUC2.js.map +7 -0
- package/dist/esm/chunks/{chunk.K6GJNDTY.js → chunk.Z7IUKJHZ.js} +2 -2
- package/dist/esm/chunks/{chunk.K6GJNDTY.js.map → chunk.Z7IUKJHZ.js.map} +1 -1
- package/dist/esm/chunks/{chunk.GG7IQL46.js → chunk.ZPH3TMNA.js} +2 -2
- package/dist/esm/chunks/chunk.ZSHPKAXP.js +7 -0
- package/dist/esm/chunks/chunk.ZSHPKAXP.js.map +7 -0
- package/dist/esm/chunks/{chunk.CEGBMUSR.js → chunk.ZWELGTD7.js} +2 -2
- package/dist/esm/circular-progress/index.js +1 -1
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/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/icon-button/index.js +7 -0
- 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/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/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-action-button/index.js +1 -1
- package/dist/esm/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/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/utils/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-dark.css +1 -1
- package/dist/forge-tokens.css +6 -0
- package/dist/forge.css +1 -1
- package/dist/table/forge-table.css +1 -1
- package/dist/theme/forge-theme.css +1 -1
- package/dist/typography/forge-typography.css +1 -1
- package/esm/app-bar/search/app-bar-search.d.ts +3 -3
- package/esm/app-bar/search/app-bar-search.js +3 -3
- package/esm/avatar/avatar-constants.d.ts +0 -1
- package/esm/avatar/avatar-constants.js +0 -2
- package/esm/bottom-sheet/bottom-sheet-adapter.d.ts +26 -42
- package/esm/bottom-sheet/bottom-sheet-adapter.js +46 -85
- package/esm/bottom-sheet/bottom-sheet-constants.d.ts +16 -13
- package/esm/bottom-sheet/bottom-sheet-constants.js +24 -27
- package/esm/bottom-sheet/bottom-sheet-foundation.d.ts +17 -43
- package/esm/bottom-sheet/bottom-sheet-foundation.js +106 -213
- package/esm/bottom-sheet/bottom-sheet.d.ts +42 -29
- package/esm/bottom-sheet/bottom-sheet.js +52 -41
- package/esm/calendar/calendar-constants.d.ts +0 -1
- package/esm/calendar/calendar-constants.js +0 -1
- package/esm/calendar/calendar-dom-utils.js +10 -4
- package/esm/calendar/calendar-menu/calendar-menu-adapter.js +9 -2
- package/esm/calendar/calendar-menu/calendar-menu-constants.d.ts +0 -1
- package/esm/calendar/calendar-menu/calendar-menu-constants.js +0 -1
- package/esm/calendar/calendar-menu/calendar-menu-utils.js +10 -0
- package/esm/calendar/calendar-menu/calendar-menu.js +8 -2
- package/esm/calendar/calendar.js +6 -2
- package/esm/checkbox/checkbox-foundation.js +9 -9
- package/esm/color-picker/color-picker.js +1 -1
- package/esm/deprecated/icon-button/deprecated-icon-button-component-delegate.d.ts +38 -0
- package/esm/deprecated/icon-button/deprecated-icon-button-component-delegate.js +93 -0
- package/esm/deprecated/icon-button/deprecated-icon-button-constants.d.ts +28 -0
- package/esm/deprecated/icon-button/deprecated-icon-button-constants.js +28 -0
- package/esm/deprecated/icon-button/deprecated-icon-button.d.ts +62 -0
- package/esm/deprecated/icon-button/deprecated-icon-button.js +208 -0
- package/esm/deprecated/icon-button/index.d.ts +12 -0
- package/esm/deprecated/icon-button/index.js +16 -0
- package/esm/dialog/dialog.js +1 -1
- package/esm/drawer/drawer/drawer.js +1 -1
- package/esm/drawer/mini-drawer/mini-drawer.js +1 -1
- package/esm/drawer/modal-drawer/modal-drawer.js +1 -1
- package/esm/field/field.js +1 -1
- package/esm/index.d.ts +1 -3
- package/esm/index.js +4 -8
- package/esm/list/list/list.js +1 -1
- package/esm/list/list-item/list-item-adapter.js +4 -0
- package/esm/list/list-item/list-item.d.ts +6 -4
- package/esm/list/list-item/list-item.js +7 -5
- package/esm/open-icon/index.d.ts +0 -2
- package/esm/open-icon/index.js +0 -2
- package/esm/open-icon/open-icon-constants.d.ts +10 -6
- package/esm/open-icon/open-icon-constants.js +9 -11
- package/esm/open-icon/open-icon.d.ts +37 -12
- package/esm/open-icon/open-icon.js +67 -22
- package/esm/paginator/paginator-adapter.d.ts +19 -52
- package/esm/paginator/paginator-adapter.js +25 -106
- package/esm/paginator/paginator-constants.d.ts +22 -35
- package/esm/paginator/paginator-constants.js +17 -40
- package/esm/paginator/paginator-foundation.d.ts +10 -12
- package/esm/paginator/paginator-foundation.js +39 -51
- package/esm/paginator/paginator.d.ts +4 -7
- package/esm/paginator/paginator.js +24 -45
- package/esm/popover/popover.js +1 -1
- package/esm/profile-card/profile-card.js +1 -1
- package/esm/radio/radio/radio-foundation.js +2 -2
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/stepper/step/step.js +1 -1
- package/esm/switch/switch-foundation.js +6 -6
- package/esm/table/table-constants.d.ts +1 -0
- package/esm/table/table-constants.js +4 -3
- package/esm/table/table-foundation.js +2 -2
- package/esm/table/table-utils.js +31 -14
- package/esm/tooltip/tooltip.js +1 -1
- package/esm/utils/color-utils.d.ts +0 -4
- package/esm/utils/color-utils.js +0 -19
- package/esm/view-switcher/view-switcher.js +1 -1
- package/package.json +1 -12
- package/styles/bottom-sheet/_core.scss +19 -0
- package/styles/bottom-sheet/_token-utils.scss +30 -0
- package/styles/bottom-sheet/bottom-sheet.scss +59 -3
- package/styles/{color-picker/_variables.scss → bottom-sheet/index.scss} +1 -1
- package/styles/calendar/_mixins.scss +33 -56
- package/styles/calendar/_variables.scss +39 -39
- package/styles/calendar/calendar-menu/_mixins.scss +25 -84
- package/styles/color-picker/_mixins.scss +15 -21
- package/styles/color-picker/color-picker.scss +0 -1
- package/styles/core/styles/animation/index.scss +22 -0
- package/styles/core/styles/border/index.scss +10 -1
- package/styles/core/styles/elevation/index.scss +19 -26
- package/styles/core/styles/shape/index.scss +9 -0
- package/styles/core/styles/spacing/index.scss +9 -0
- package/styles/core/styles/theme/index.scss +2 -13
- package/styles/core/styles/tokens/bottom-sheet/_tokens.scss +21 -0
- package/styles/core/styles/tokens/elevation/_tokens.scss +35 -84
- package/styles/core/styles/tokens/list/list/_tokens.scss +14 -1
- package/styles/core/styles/tokens/list/list-item/_tokens.scss +6 -6
- package/styles/core/styles/tokens/open-icon/_tokens.scss +25 -0
- package/styles/core/styles/tokens/popover/_tokens.scss +1 -1
- package/styles/core/styles/tokens/theme/_tokens.core.scss +60 -30
- package/styles/core/styles/tokens/theme/_tokens.scss +1 -48
- package/styles/core/styles/tokens/theme/_tokens.status.scss +78 -32
- package/styles/core/styles/tokens/theme/_tokens.surface.scss +33 -51
- package/styles/core/styles/tokens/theme/_tokens.text.scss +20 -26
- package/styles/core/styles/tokens/theme/_tokens.utilities.scss +13 -23
- package/styles/core/styles/tokens/tooltip/_tokens.scss +1 -1
- package/styles/deprecated/icon-button/deprecated-icon-button.scss +114 -0
- package/styles/dialog/_core.scss +3 -1
- package/styles/dialog/dialog.scss +1 -1
- package/styles/drawer/base/_mixins.scss +11 -10
- package/styles/drawer/base/_variables.scss +6 -5
- package/styles/drawer/drawer/_variables.scss +6 -5
- package/styles/drawer/mini-drawer/_mixins.scss +11 -14
- package/styles/drawer/modal-drawer/_mixins.scss +4 -9
- package/styles/field/_core.variant.scss +0 -1
- package/styles/forge-tokens.scss +40 -0
- package/styles/forge.scss +1 -10
- package/styles/linear-progress/_core.scss +0 -1
- package/styles/list/list/list.scss +23 -7
- package/styles/list/list-item/_core.scss +10 -10
- package/styles/list/list-item/list-item.scss +4 -4
- package/styles/open-icon/_core.scss +26 -0
- package/styles/open-icon/_token-utils.scss +30 -0
- package/styles/{paginator/_variables.scss → open-icon/index.scss} +1 -1
- package/styles/open-icon/open-icon.scss +75 -3
- package/styles/paginator/_core.scss +42 -0
- package/styles/{typography/_index.scss → paginator/index.scss} +1 -2
- package/styles/paginator/paginator.scss +49 -5
- package/styles/profile-card/profile-card.scss +0 -1
- package/styles/split-view/split-view/_mixins.scss +0 -2
- package/styles/split-view/split-view-panel/_mixins.scss +12 -16
- package/styles/split-view/split-view-panel/_variables.scss +0 -1
- package/styles/table/_core.scss +333 -0
- package/styles/table/_variables.scss +22 -37
- package/styles/table/forge-table.scss +217 -3
- package/styles/{theme/_index.scss → table/index.scss} +1 -2
- package/styles/theme/_theme-dark.scss +0 -5
- package/styles/theme/forge-theme.scss +0 -7
- package/styles/typography/forge-typography.scss +0 -3
- package/styles/view-switcher/_mixins.scss +8 -8
- package/dist/busy-indicator/forge-busy-indicator.css +0 -6
- package/dist/esm/busy-indicator/index.js +0 -7
- package/dist/esm/chunks/chunk.3CTKWBV2.js +0 -7
- package/dist/esm/chunks/chunk.3CTKWBV2.js.map +0 -7
- package/dist/esm/chunks/chunk.3II7OT2I.js +0 -7
- package/dist/esm/chunks/chunk.6VS3LYAF.js +0 -7
- package/dist/esm/chunks/chunk.6VS3LYAF.js.map +0 -7
- package/dist/esm/chunks/chunk.7RLY2O3H.js +0 -7
- package/dist/esm/chunks/chunk.7RLY2O3H.js.map +0 -7
- package/dist/esm/chunks/chunk.A7BCLPP4.js +0 -7
- package/dist/esm/chunks/chunk.AFWWND2C.js +0 -7
- package/dist/esm/chunks/chunk.AFWWND2C.js.map +0 -7
- package/dist/esm/chunks/chunk.AIJK3CTV.js +0 -12
- package/dist/esm/chunks/chunk.AIJK3CTV.js.map +0 -7
- package/dist/esm/chunks/chunk.BQZKOIAW.js +0 -7
- package/dist/esm/chunks/chunk.BV7EAQST.js +0 -7
- package/dist/esm/chunks/chunk.BV7EAQST.js.map +0 -7
- package/dist/esm/chunks/chunk.CGFSMACZ.js +0 -7
- package/dist/esm/chunks/chunk.CGFSMACZ.js.map +0 -7
- package/dist/esm/chunks/chunk.GBAVJILM.js +0 -7
- package/dist/esm/chunks/chunk.GRYO5XP2.js +0 -7
- package/dist/esm/chunks/chunk.GRYO5XP2.js.map +0 -7
- package/dist/esm/chunks/chunk.HD2SLIL2.js +0 -7
- package/dist/esm/chunks/chunk.HD2SLIL2.js.map +0 -7
- package/dist/esm/chunks/chunk.HG4IDRAC.js +0 -7
- package/dist/esm/chunks/chunk.HG4IDRAC.js.map +0 -7
- package/dist/esm/chunks/chunk.KCCW4AMU.js +0 -7
- package/dist/esm/chunks/chunk.KCCW4AMU.js.map +0 -7
- package/dist/esm/chunks/chunk.KLU54MDQ.js +0 -7
- package/dist/esm/chunks/chunk.MFS7AVW6.js +0 -7
- package/dist/esm/chunks/chunk.MFS7AVW6.js.map +0 -7
- package/dist/esm/chunks/chunk.O5WAQQNR.js +0 -7
- package/dist/esm/chunks/chunk.O5WAQQNR.js.map +0 -7
- package/dist/esm/chunks/chunk.OJ7JO4O6.js +0 -7
- package/dist/esm/chunks/chunk.OQHDHS2C.js +0 -7
- package/dist/esm/chunks/chunk.OQHDHS2C.js.map +0 -7
- package/dist/esm/chunks/chunk.OREDK5MJ.js +0 -7
- package/dist/esm/chunks/chunk.OREDK5MJ.js.map +0 -7
- package/dist/esm/chunks/chunk.QVATEY5S.js +0 -7
- package/dist/esm/chunks/chunk.QVATEY5S.js.map +0 -7
- package/dist/esm/chunks/chunk.RKIJTSSL.js +0 -7
- package/dist/esm/chunks/chunk.RKIJTSSL.js.map +0 -7
- package/dist/esm/chunks/chunk.RLQB7224.js +0 -7
- package/dist/esm/chunks/chunk.RSYEG2RW.js +0 -7
- package/dist/esm/chunks/chunk.RSYEG2RW.js.map +0 -7
- package/dist/esm/chunks/chunk.SZOZIJZI.js +0 -7
- package/dist/esm/chunks/chunk.SZOZIJZI.js.map +0 -7
- package/dist/esm/chunks/chunk.UPSXYWPD.js +0 -7
- package/dist/esm/chunks/chunk.V6KUOCAR.js +0 -7
- package/dist/esm/chunks/chunk.V6KUOCAR.js.map +0 -7
- package/dist/esm/chunks/chunk.X77NKT6Z.js +0 -7
- package/dist/esm/chunks/chunk.X77NKT6Z.js.map +0 -7
- package/dist/esm/chunks/chunk.YRAEFQJW.js +0 -7
- package/dist/esm/chunks/chunk.YRAEFQJW.js.map +0 -7
- package/dist/esm/quantity-field/index.js +0 -7
- package/dist/esm/quantity-field/index.js.map +0 -7
- package/dist/esm/theme/index.js +0 -7
- package/dist/esm/theme/index.js.map +0 -7
- package/dist/quantity-field/forge-quantity-field.css +0 -6
- package/dist/typography/forge-typography-legacy.css +0 -6
- package/dist/utils/forge-utils.css +0 -6
- package/esm/busy-indicator/busy-indicator-adapter.d.ts +0 -155
- package/esm/busy-indicator/busy-indicator-adapter.js +0 -203
- package/esm/busy-indicator/busy-indicator-constants.d.ts +0 -49
- package/esm/busy-indicator/busy-indicator-constants.js +0 -58
- package/esm/busy-indicator/busy-indicator-foundation.d.ts +0 -97
- package/esm/busy-indicator/busy-indicator-foundation.js +0 -268
- package/esm/busy-indicator/busy-indicator.d.ts +0 -77
- package/esm/busy-indicator/busy-indicator.js +0 -115
- package/esm/busy-indicator/index.d.ts +0 -10
- package/esm/busy-indicator/index.js +0 -14
- package/esm/open-icon/open-icon-adapter.d.ts +0 -18
- package/esm/open-icon/open-icon-adapter.js +0 -27
- package/esm/open-icon/open-icon-foundation.d.ts +0 -22
- package/esm/open-icon/open-icon-foundation.js +0 -35
- package/esm/quantity-field/index.d.ts +0 -11
- package/esm/quantity-field/index.js +0 -15
- package/esm/quantity-field/quantity-field-adapter.d.ts +0 -77
- package/esm/quantity-field/quantity-field-adapter.js +0 -221
- package/esm/quantity-field/quantity-field-component-delegate.d.ts +0 -44
- package/esm/quantity-field/quantity-field-component-delegate.js +0 -129
- package/esm/quantity-field/quantity-field-constants.d.ts +0 -35
- package/esm/quantity-field/quantity-field-constants.js +0 -41
- package/esm/quantity-field/quantity-field-foundation.d.ts +0 -36
- package/esm/quantity-field/quantity-field-foundation.js +0 -100
- package/esm/quantity-field/quantity-field.d.ts +0 -34
- package/esm/quantity-field/quantity-field.js +0 -100
- package/esm/theme/color-constants.d.ts +0 -313
- package/esm/theme/color-constants.js +0 -363
- package/esm/theme/index.d.ts +0 -7
- package/esm/theme/index.js +0 -7
- package/esm/theme/theme-utils.d.ts +0 -9
- package/esm/theme/theme-utils.js +0 -68
- package/styles/bottom-sheet/_mixins.scss +0 -93
- package/styles/bottom-sheet/_variables.scss +0 -7
- package/styles/busy-indicator/_mixins.scss +0 -185
- package/styles/busy-indicator/_variables.scss +0 -9
- package/styles/busy-indicator/busy-indicator.scss +0 -22
- package/styles/busy-indicator/forge-busy-indicator.scss +0 -8
- package/styles/open-icon/_mixins.scss +0 -39
- package/styles/open-icon/_variables.scss +0 -8
- package/styles/paginator/_mixins.scss +0 -136
- package/styles/quantity-field/_mixins.scss +0 -116
- package/styles/quantity-field/forge-quantity-field.scss +0 -18
- package/styles/quantity-field/quantity-field.scss +0 -16
- package/styles/table/_mixins.scss +0 -547
- package/styles/theme/_custom-properties.scss +0 -311
- package/styles/theme/_keys.scss +0 -477
- package/styles/theme/_theme-utils.scss +0 -23
- package/styles/theme/_theme-values.scss +0 -246
- package/styles/theme/_theme.scss +0 -279
- package/styles/typography/_mixins.scss +0 -73
- package/styles/typography/_variables.scss +0 -100
- package/styles/typography/forge-typography-legacy.scss +0 -8
- package/styles/utils/forge-utils.scss +0 -45
- /package/dist/esm/chunks/{chunk.AOVXNX7P.js.map → chunk.24L6GVJK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WMJSYYXQ.js.map → chunk.27YQZWEJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AG6IRMLZ.js.map → chunk.2CP5CIRB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.H4VQXV2H.js.map → chunk.3CXCYRCE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MTIPIEXA.js.map → chunk.3LNZRQAL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BQ52JYLA.js.map → chunk.3LUG3LPU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IL4S57WO.js.map → chunk.3ODT27TD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XZ23XHFE.js.map → chunk.45N7ZZVL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YWJVZVZX.js.map → chunk.4GFUXXXH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZA7JY3AY.js.map → chunk.5DDR6QSF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3KAKJGUS.js.map → chunk.5NEWFXFX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VRSPT7WX.js.map → chunk.5OT53ZJM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VL5RWSAV.js.map → chunk.6DWRGYKV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IEABOPNB.js.map → chunk.6T7KPDCD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SROEDYPL.js.map → chunk.7JO5MB55.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CLYGTLXN.js.map → chunk.7TE74NJZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AGLI4WR4.js.map → chunk.AJLS5C7O.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TSSZQPLE.js.map → chunk.BURDWL57.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BHE6Z5Y2.js.map → chunk.CQ4XBOX5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NEQX2QVX.js.map → chunk.DJQXJO3T.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VJZ7VDG5.js.map → chunk.DPJJB67L.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OOAJHLW4.js.map → chunk.EZIABLIR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZG6YF2HI.js.map → chunk.F53DSRUO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7AAICE77.js.map → chunk.FIO22U2C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.U6J4VHU6.js.map → chunk.FKMTIOBA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W4HANHUO.js.map → chunk.FMGBPF7B.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5MB6CTBA.js.map → chunk.FVFPDWA4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ENUKGA2U.js.map → chunk.FYPIHFXD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CE35CVDV.js.map → chunk.GQ33JZVE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2W23MOPP.js.map → chunk.GUBLRHCG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.37B332ZK.js.map → chunk.HSNVTV7K.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PC6TW5XE.js.map → chunk.HXNNWUI3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.77C7S7ZS.js.map → chunk.IOGCI64X.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5UOX22ML.js.map → chunk.KKVQNKMV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YPNSK2CK.js.map → chunk.KW5A2U5U.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KO6ODCZC.js.map → chunk.LIJE4T3D.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KEOLH7G3.js.map → chunk.LQN5U4QH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5QIWLZG3.js.map → chunk.LSUIJDFO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QCPV5DEG.js.map → chunk.N65CAIE5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UKBE2FMZ.js.map → chunk.NNLZKMFX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EO3GP6DP.js.map → chunk.ON6FFHRE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OVXEOEJF.js.map → chunk.ONFZ3H7M.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.32APLNN2.js.map → chunk.OVVBXM6K.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DKERDHXH.js.map → chunk.P74RZEWP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QLGJS37N.js.map → chunk.PBORL6KX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JGURMVW7.js.map → chunk.PGMOAILY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OEI35LFU.js.map → chunk.PKCMTSWR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QUXMLWBJ.js.map → chunk.Q3Z6VZUD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TQWZDM6T.js.map → chunk.QBHJFCLL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WXVVOFNK.js.map → chunk.QDG6TP2Z.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.H5RW3A4M.js.map → chunk.QH27OIAK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.473WRJ5G.js.map → chunk.QKCPE4LW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FLF5RTYO.js.map → chunk.R2CJMM2F.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IQYOLMPG.js.map → chunk.RGDLRUSM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QIZBZGYT.js.map → chunk.RKPWFEFJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RXBLU4OJ.js.map → chunk.S5EU72NR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.T7NWP7DB.js.map → chunk.SW6JDC2Y.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7IPAW4D2.js.map → chunk.TAQRHBGS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MFQRXVKO.js.map → chunk.TEZFEC5B.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MX4JX4GT.js.map → chunk.THIUQ2AU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LY2Z2Z7S.js.map → chunk.TQMT7BIZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GIENHEMN.js.map → chunk.TR45SGWL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CFAI4K3E.js.map → chunk.UBVWYWO7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NWVQ5HK2.js.map → chunk.UHPODZWA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3PMONORO.js.map → chunk.V4R7FCZ2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BEFAXPXJ.js.map → chunk.WNX3GGYT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.I7YON2TC.js.map → chunk.X5MI5OFS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QKTK5XUE.js.map → chunk.XHRBFPZ2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ASLHRT3N.js.map → chunk.XT6RPXTM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VGIRVTBJ.js.map → chunk.XWVFJVBN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YNCTSMT6.js.map → chunk.YXFGOJ5Z.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GG7IQL46.js.map → chunk.ZPH3TMNA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CEGBMUSR.js.map → chunk.ZWELGTD7.js.map} +0 -0
- /package/dist/esm/{busy-indicator → deprecated/icon-button}/index.js.map +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as e}from"./chunk.QH27OIAK.js";import{a as H}from"./chunk.5DDR6QSF.js";import{b as l,h as I}from"./chunk.3CXCYRCE.js";import{a as x,b as S}from"./chunk.3LUG3LPU.js";import{b as P,c as g}from"./chunk.5SUJNEC7.js";import{k,m as b}from"./chunk.SB2LOK2R.js";import{a}from"./chunk.NVUMRW44.js";import{a as w}from"./chunk.OLFOVKQG.js";import{a as L,f as m,n as _}from"./chunk.5OT53ZJM.js";import{e as T,f as c,k as A}from"./chunk.LNTTU2GL.js";import{a as y,k as E,l as d}from"./chunk.J2M2MXP2.js";import{d as n}from"./chunk.M3QDAYD2.js";var p=class extends w{constructor(t){super(t);this._anchorElement=null;this._overlayElement=null;this._contentElement=c(this._component,e.selectors.CONTENT),this._arrowElement=c(this._component,e.selectors.ARROW)}get anchorElement(){return this._anchorElement}syncAria(){let t=this._component.type==="description"?"tooltip":null;if(this._component[_]({role:t}),this._component[_]({ariaHidden:"true"},{setAttribute:!this._component.hasAttribute("aria-hidden")}),this._anchorElement){if(this._component.type==="label"&&this._anchorElement.hasAttribute("aria-labelledby")||this._component.type==="description"&&this._anchorElement.hasAttribute("aria-describedby"))return;switch(!this._component.hasAttribute("id")&&this._component.type!=="presentation"&&(this._component.id=`forge-tooltip-${y()}`),this._component.type){case"description":this._anchorElement.setAttribute("aria-describedby",this._component.id);break;case"label":this._anchorElement.setAttribute("aria-labelledby",this._component.id);break}}}detachAria(){var t,o,i,s;this._component.type==="description"&&((t=this._anchorElement)==null?void 0:t.getAttribute("aria-describedby"))===this._component.id&&((o=this._anchorElement)==null||o.removeAttribute("aria-describedby")),this._component.type==="label"&&((i=this._anchorElement)==null?void 0:i.getAttribute("aria-labelledby"))===this._component.id&&((s=this._anchorElement)==null||s.removeAttribute("aria-labelledby"))}setAnchorElement(t){this._anchorElement=t}tryLocateAnchorElement(t){this._anchorElement=this._tryFindAnchorElement(t)}addAnchorListener(t,o,i){var s;(s=this._anchorElement)==null||s.addEventListener(t,o,i)}removeAnchorListener(t,o){var i;(i=this._anchorElement)==null||i.removeEventListener(t,o)}addLightDismissListener(t){var o;(o=this._overlayElement)==null||o.addEventListener(l.events.LIGHT_DISMISS,t)}removeLightDismissListener(t){var o;(o=this._overlayElement)==null||o.removeEventListener(l.events.LIGHT_DISMISS,t)}show(){var t;if(this._overlayElement||(this._overlayElement=document.createElement(l.elementName),this._overlayElement.setAttribute("part","root:overlay")),this._overlayElement.placement=this._component.placement,this._overlayElement.anchorElement=this._anchorElement,this._overlayElement.arrowElement=this._arrowElement,this._overlayElement.offset={mainAxis:this._component.offset},this._overlayElement.flip=this._component.flip,this._component.fallbackPlacements&&(this._overlayElement.fallbackPlacements=this._component.fallbackPlacements),this._component.boundaryElement)this._overlayElement.boundaryElement=this._component.boundaryElement;else if(this._component.boundary){let o=k(this._component,this._component.boundary);this._overlayElement.boundaryElement=o}else this._overlayElement.boundaryElement=null;(t=this._component.shadowRoot)==null||t.appendChild(this._overlayElement),this._overlayElement.appendChild(this._contentElement),this._overlayElement.open=!0}hide(){var t,o;this._overlayElement&&(this._overlayElement.open=!1),(t=this._component.shadowRoot)==null||t.appendChild(this._contentElement),(o=this._overlayElement)==null||o.remove()}_tryFindAnchorElement(t){var o,i;if(t){let s=this._component.getRootNode(),u=(o=s.getElementById(t))!=null?o:s.querySelector(t);if(u)return u}return(i=this._component.previousElementSibling)!=null?i:this._component.parentElement}};var O=H(),h=class extends O{constructor(t){super();this._adapter=t;this._open=!1;this._type=e.defaults.TYPE;this._delay=e.defaults.DELAY;this._placement=e.defaults.PLACEMENT;this._offset=e.defaults.OFFSET;this._flip=e.defaults.FLIP;this._boundary=null;this._boundaryElement=null;this._fallbackPlacements=null;this._triggerTypes=e.defaults.TRIGGER_TYPES;this._hoverStartListener=this._onHoverStart.bind(this);this._hoverEndListener=this._onHoverEnd.bind(this);this._focusListener=this._onFocus.bind(this);this._blurListener=this._onBlur.bind(this);this._scrollListener=this._onTryHide.bind(this);this._mouseDownListener=this._onTryHide.bind(this);this._dragListener=this._onTryHide.bind(this);this._lightDismissListener=this._onTryHide.bind(this)}initialize(){this._adapter.anchorElement||this._adapter.tryLocateAnchorElement(this._anchor),this._adapter.syncAria(),this._attachAnchorListeners(),this._open&&this._show()}destroy(){this._open&&this._hide(),this._adapter.detachAria(),this._detachAnchorListeners()}syncTooltipAria(){this._adapter.syncAria()}_attachAnchorListeners(){if(!this._adapter.anchorElement)return;let t=[...this._triggerTypes];m||(t.splice(t.indexOf("hover"),1),t.push("longpress"));let o={hover:()=>this._adapter.addAnchorListener("mouseenter",this._hoverStartListener),longpress:()=>this._startLongpressListener(this._adapter.anchorElement),focus:()=>this._adapter.addAnchorListener("focusin",this._focusListener)};t.forEach(i=>o[i]())}_detachAnchorListeners(){if(!this._adapter.anchorElement)return;let t=[...this._triggerTypes];m||t.push("longpress");let o={hover:()=>{this._adapter.removeAnchorListener("mouseenter",this._hoverStartListener),this._adapter.removeAnchorListener("mousedown",this._hoverEndListener),this._adapter.removeAnchorListener("mouseleave",this._hoverEndListener)},longpress:()=>this._stopLongpressListener(this._adapter.anchorElement),focus:()=>{this._adapter.removeAnchorListener("focusin",this._focusListener),this._adapter.removeAnchorListener("focusout",this._blurListener)}};t.forEach(i=>o[i]())}_show(){this._open=!0,this._adapter.show(),g.instance.add(this._adapter.hostElement),this._attachDismissListeners(),this._adapter.toggleHostAttribute(e.attributes.OPEN,this._open)}_hide(){window.clearTimeout(this._hoverTimeout),window.clearTimeout(this._longpressVisibilityTimeout),this._open=!1,this._adapter.hide(),g.instance.remove(this._adapter.hostElement),this._detachDismissListeners(),this._adapter.toggleHostAttribute(e.attributes.OPEN,this._open)}_attachDismissListeners(){this._adapter.addAnchorListener("mousedown",this._mouseDownListener),this._adapter.addAnchorListener("dragstart",this._dragListener),this._adapter.addDocumentListener("scroll",this._scrollListener),this._adapter.addDocumentListener("wheel",this._scrollListener),this._adapter.addLightDismissListener(this._lightDismissListener)}_detachDismissListeners(){this._adapter.removeAnchorListener("mousedown",this._mouseDownListener),this._adapter.removeAnchorListener("dragstart",this._dragListener),this._adapter.removeDocumentListener("scroll",this._scrollListener),this._adapter.removeDocumentListener("wheel",this._scrollListener),this._adapter.removeLightDismissListener(this._lightDismissListener)}_onHoverStart(t){this._open||(this._adapter.addAnchorListener("mousedown",this._hoverEndListener),this._adapter.addAnchorListener("mouseleave",this._hoverEndListener),this._delay?this._hoverTimeout=window.setTimeout(()=>{this._onTryShow()},this._delay):this._onTryShow())}_onHoverEnd(t){this._adapter.removeAnchorListener("mousedown",this._hoverEndListener),this._adapter.removeAnchorListener("mouseleave",this._hoverEndListener),window.clearTimeout(this._hoverTimeout),this._onTryHide()}_onFocus(t){this._open||(this._adapter.addAnchorListener("focusout",this._blurListener),this._onTryShow())}_onBlur(t){this._adapter.removeAnchorListener("focusout",this._blurListener),this._onTryHide()}_onLongpress(){this._onTryShow()}_onLongpressEnd(t){super._onLongpressEnd(t),this._longpressVisibilityTimeout=window.setTimeout(()=>{this._onTryHide()},e.numbers.LONGPRESS_VISIBILITY_DURATION)}_onTryShow(){this._open||this._show()}_onTryHide(){this._open&&this._hide()}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._adapter.isConnected?this._open?this._hide():this._show():this._open=t)}get type(){return this._type}set type(t){t!=null||(t=e.defaults.TYPE),this._type!==t&&(this._type=t,this._adapter.isConnected&&this._adapter.syncAria(),this._adapter.toggleHostAttribute(e.attributes.TYPE,this._type!==e.defaults.TYPE,this._type))}get anchor(){return this._anchor}set anchor(t){this._anchor!==t&&(this._anchor=t,this._adapter.isConnected&&(this._detachAnchorListeners(),this._adapter.detachAria(),this._adapter.tryLocateAnchorElement(this._anchor),this._adapter.syncAria(),this._attachAnchorListeners()),this._adapter.toggleHostAttribute(e.attributes.ANCHOR,!!this._anchor,this._anchor))}get anchorElement(){return this._adapter.anchorElement}set anchorElement(t){this._adapter.anchorElement!==t&&(this._adapter.isConnected&&(this._detachAnchorListeners(),this._adapter.detachAria()),this._adapter.setAnchorElement(t),this._adapter.isConnected&&(this._adapter.syncAria(),this._attachAnchorListeners()))}get delay(){return this._delay}set delay(t){this._delay!==t&&(this._delay=t,this._adapter.setHostAttribute(e.attributes.DELAY,String(this._delay)))}get placement(){return this._placement}set placement(t){t!=null||(t=e.defaults.PLACEMENT),this._placement!==t&&(this._placement=t,this._adapter.setHostAttribute(e.attributes.PLACEMENT,String(this._placement)))}get offset(){return this._offset}set offset(t){t!=null||(t=e.defaults.OFFSET),this._offset!==t&&(this._offset=t,this._adapter.toggleHostAttribute(e.attributes.OFFSET,this._offset!==e.defaults.OFFSET,String(this._offset)))}get flip(){return this._flip}set flip(t){t!=null||(t=e.defaults.FLIP),this._flip!==t&&(this._flip=t,this._adapter.toggleHostAttribute(e.attributes.FLIP,this._flip!==e.defaults.FLIP,String(this._flip)))}get boundary(){return this._boundary}set boundary(t){this._boundary!==t&&(this._boundary=t,this._adapter.toggleHostAttribute(e.attributes.BOUNDARY,!!this._boundary,this._boundary))}get boundaryElement(){return this._boundaryElement}set boundaryElement(t){var o;this._boundaryElement!==t&&(this._boundaryElement=t,this._adapter.toggleHostAttribute(e.attributes.BOUNDARY,!!this._boundaryElement,(o=this._boundaryElement)==null?void 0:o.id))}get fallbackPlacements(){return this._fallbackPlacements}set fallbackPlacements(t){this._fallbackPlacements!==t&&(this._fallbackPlacements=t)}get triggerType(){return this._triggerTypes.length===1?this._triggerTypes[0]:this._triggerTypes}set triggerType(t){this._triggerTypes!==t&&(this._adapter.isConnected&&this._detachAnchorListeners(),this._triggerTypes=Array.isArray(t)?t:[t],this._triggerTypes=this._triggerTypes.filter(o=>!!o),this._triggerTypes.length||(this._triggerTypes=e.defaults.TRIGGER_TYPES),this._adapter.isConnected&&this._attachAnchorListeners())}};var D='<template><div class="forge-tooltip" part="surface"><slot></slot><div class="arrow" part="arrow"></div></div></template>',F='@-webkit-keyframes slidein{from{opacity:0;-webkit-transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y));transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y))}to{opacity:1;-webkit-transform:translateX(0) translateY(0);transform:translateX(0) translateY(0)}}@keyframes slidein{from{opacity:0;-webkit-transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y));transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y))}to{opacity:1;-webkit-transform:translateX(0) translateY(0);transform:translateX(0) translateY(0)}}:host{display:contents;pointer-events:none}:host([hidden]){display:none}.forge-tooltip{--_tooltip-background:var(--forge-tooltip-background, var(--forge-theme-surface-inverse, #333333));--_tooltip-color:var(--forge-tooltip-color, var(--forge-theme-on-surface-inverse, #ffffff));--_tooltip-shape:var(--forge-tooltip-shape, var(--forge-shape-medium, 4px));--_tooltip-padding:var(--forge-tooltip-padding, var(--forge-spacing-xsmall, 8px));--_tooltip-padding-block:var(--forge-tooltip-padding-block, var(--_tooltip-padding));--_tooltip-padding-inline:var(--forge-tooltip-padding-inline, var(--_tooltip-padding));--_tooltip-width:var(--forge-tooltip-width, max-content);--_tooltip-max-width:var(--forge-tooltip-max-width, 320px);--_tooltip-elevation:var(--forge-tooltip-elevation, var(--forge-theme-surface-bright-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)));--_tooltip-content-align:var(--forge-tooltip-content-align, center);--_tooltip-border-width:var(--forge-tooltip-border-width, 0);--_tooltip-border-style:var(--forge-tooltip-border-style, solid);--_tooltip-border-color:var(--forge-tooltip-border-color, var(--forge-theme-outline, #e0e0e0));--_tooltip-animation-timing:var(--forge-tooltip-animation-timing, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_tooltip-animation-duration:var(--forge-tooltip-animation-duration, var(--forge-animation-duration-short3, 150ms));--_tooltip-animation-offset:var(--forge-tooltip-animation-offset, 24px);--_tooltip-arrow-size:var(--forge-tooltip-arrow-size, 8px);--_tooltip-arrow-height:var(--forge-tooltip-arrow-height, var(--_tooltip-arrow-size));--_tooltip-arrow-width:var(--forge-tooltip-arrow-width, var(--_tooltip-arrow-size));--_tooltip-arrow-shape:var(--forge-tooltip-arrow-shape, var(--forge-shape-small, 2px));--_tooltip-arrow-rotation:var(--forge-tooltip-arrow-rotation, 0deg);--_tooltip-arrow-top-rotation:var(--forge-tooltip-arrow-top-rotation, 315deg);--_tooltip-arrow-right-rotation:var(--forge-tooltip-arrow-right-rotation, 45deg);--_tooltip-arrow-bottom-rotation:var(--forge-tooltip-arrow-bottom-rotation, 135deg);--_tooltip-arrow-left-rotation:var(--forge-tooltip-arrow-left-rotation, 225deg)}.forge-tooltip{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body1-text-decoration,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);position:relative;background:var(--_tooltip-background);color:var(--_tooltip-color);border-radius:var(--_tooltip-shape);border-width:var(--_tooltip-border-width);border-style:var(--_tooltip-border-style);border-color:var(--_tooltip-border-color);padding-block:var(--_tooltip-padding-block);padding-inline:var(--_tooltip-padding-inline);-webkit-box-shadow:var(--_tooltip-elevation);box-shadow:var(--_tooltip-elevation);width:var(--_tooltip-width);max-width:var(--_tooltip-max-width);pointer-events:none;text-align:var(--_tooltip-content-align);line-height:normal;white-space:normal;-webkit-animation-duration:var(--_tooltip-animation-duration);animation-duration:var(--_tooltip-animation-duration);-webkit-animation-timing-function:var(--_tooltip-animation-timing);animation-timing-function:var(--_tooltip-animation-timing);-webkit-animation-name:slidein;animation-name:slidein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(:not([open])) .forge-tooltip{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}.arrow{position:absolute;contain:strict;background-color:inherit;height:var(--_tooltip-arrow-height);width:var(--_tooltip-arrow-width);-webkit-box-shadow:inherit;box-shadow:inherit;border:inherit;border-end-start-radius:var(--_tooltip-arrow-shape);rotate:var(--_tooltip-arrow-rotation);-webkit-clip-path:var(--_tooltip-arrow-clip-path);clip-path:var(--_tooltip-arrow-clip-path);--_tooltip-arrow-translate-x:0;--_tooltip-arrow-translate-y:0;--_tooltip-arrow-clip-path:polygon(0 0, 0 100%, 100% 100%)}.forge-tooltip{--_tooltip-slidein-x:0;--_tooltip-slidein-y:0}forge-overlay[open][position-placement^=top] .forge-tooltip{--_tooltip-slidein-y:var(--forge-tooltip-slidein-y, var(--_tooltip-animation-offset))}forge-overlay[open][position-placement^=top] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-top-rotation);-webkit-margin-after:var(--_tooltip-border-width);margin-block-end:var(--_tooltip-border-width)}forge-overlay[open][position-placement^=right] .forge-tooltip{--_tooltip-slidein-x:var(--forge-tooltip-slidein-x, calc(var(--_tooltip-animation-offset) * -1))}forge-overlay[open][position-placement^=right] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-right-rotation);-webkit-margin-start:var(--_tooltip-border-width);margin-inline-start:var(--_tooltip-border-width)}forge-overlay[open][position-placement^=bottom] .forge-tooltip{--_tooltip-slidein-y:var(--forge-tooltip-slidein-y, calc(var(--_tooltip-animation-offset) * -1))}forge-overlay[open][position-placement^=bottom] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-bottom-rotation);-webkit-margin-before:var(--_tooltip-border-width);margin-block-start:var(--_tooltip-border-width)}forge-overlay[open][position-placement^=left] .forge-tooltip{--_tooltip-slidein-x:var(--forge-tooltip-slidein-x, var(--_tooltip-animation-offset))}forge-overlay[open][position-placement^=left] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-left-rotation);-webkit-margin-end:var(--_tooltip-border-width);margin-inline-end:var(--_tooltip-border-width)}',M=S(x(A)),r=class extends M{constructor(){super();T(this,D,F),this._foundation=new h(new p(this))}static get observedAttributes(){return Object.values(e.observedAttributes)}[P](t){return!0}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(t,o,i){switch(t){case e.observedAttributes.ID:this._foundation.syncTooltipAria();break;case e.observedAttributes.OPEN:this.open=E(i);break;case e.observedAttributes.TYPE:this.type=i!=null&&i.trim()?i:e.defaults.TYPE;break;case e.observedAttributes.TARGET:case e.observedAttributes.ANCHOR:this.anchor=i;break;case e.observedAttributes.DELAY:this.delay=d(i);break;case e.observedAttributes.POSITION:case e.observedAttributes.PLACEMENT:this.placement=i;break;case e.observedAttributes.OFFSET:this.offset=d(i);break;case e.observedAttributes.FLIP:this.flip=i;break;case e.observedAttributes.BOUNDARY:this.boundary=i;break;case e.observedAttributes.FALLBACK_PLACEMENTS:this.fallbackPlacements=i!=null&&i.trim()?b(i):null;break;case e.observedAttributes.TRIGGER_TYPE:this.triggerType=i!=null&&i.trim()?b(i):e.defaults.TRIGGER_TYPES;break}}};n([a()],r.prototype,"open",2),n([a()],r.prototype,"type",2),n([a()],r.prototype,"anchor",2),n([a()],r.prototype,"anchorElement",2),n([a({name:"anchor"})],r.prototype,"target",2),n([a()],r.prototype,"placement",2),n([a({name:"placement"})],r.prototype,"position",2),n([a()],r.prototype,"delay",2),n([a()],r.prototype,"offset",2),n([a()],r.prototype,"flip",2),n([a()],r.prototype,"boundary",2),n([a()],r.prototype,"boundaryElement",2),n([a()],r.prototype,"fallbackPlacements",2),n([a()],r.prototype,"triggerType",2),r=n([L({name:e.elementName,dependencies:[I]})],r);export{p as a,h as b,r as c};
|
|
7
|
+
//# sourceMappingURL=chunk.VAE5IFEM.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/tooltip/tooltip-adapter.ts", "../../src/tooltip/tooltip-foundation.ts", "../../src/tooltip/tooltip.ts"
|
|
4
|
-
"sourcesContent": ["import { getShadowElement, randomChars } from '@tylertech/forge-core';\nimport { setDefaultAria } from '../constants';\nimport { locateElementById } from '../core/utils/utils';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IOverlayComponent, OVERLAY_CONSTANTS } from '../overlay';\nimport { ITooltipComponent } from './tooltip';\nimport { TOOLTIP_CONSTANTS } from './tooltip-constants';\n\nexport interface ITooltipAdapter extends IBaseAdapter {\n readonly hostElement: ITooltipComponent;\n readonly anchorElement: HTMLElement | null;\n syncAria(): void;\n detachAria(): void;\n setAnchorElement(element: HTMLElement | null): void;\n tryLocateAnchorElement(id: string): void;\n addAnchorListener(type: string, listener: EventListener, opts?: AddEventListenerOptions): void;\n removeAnchorListener(type: string, listener: EventListener): void;\n addLightDismissListener(listener: EventListener): void;\n removeLightDismissListener(listener: EventListener): void;\n show(): void;\n hide(): void;\n}\n\nexport class TooltipAdapter extends BaseAdapter<ITooltipComponent> implements ITooltipAdapter {\n private _contentElement: HTMLElement;\n private _arrowElement: HTMLElement;\n private _anchorElement: HTMLElement | null = null;\n private _overlayElement: IOverlayComponent | null = null;\n\n constructor(component: ITooltipComponent) {\n super(component);\n this._contentElement = getShadowElement(this._component, TOOLTIP_CONSTANTS.selectors.CONTENT);\n this._arrowElement = getShadowElement(this._component, TOOLTIP_CONSTANTS.selectors.ARROW);\n }\n\n public get anchorElement(): HTMLElement | null {\n return this._anchorElement;\n }\n\n public syncAria(): void {\n const role = this._component.type === 'description' ? 'tooltip' : null;\n this._component[setDefaultAria]({ role });\n this._component[setDefaultAria]({ ariaHidden: 'true' }, { setAttribute: !this._component.hasAttribute('aria-hidden') });\n\n if (this._anchorElement) {\n if (this._component.type === 'label' && this._anchorElement.hasAttribute('aria-labelledby')) {\n return;\n }\n if (this._component.type === 'description' && this._anchorElement.hasAttribute('aria-describedby')) {\n return;\n }\n\n if (!this._component.hasAttribute('id') && this._component.type !== 'presentation') {\n this._component.id = `forge-tooltip-${randomChars()}`;\n }\n\n switch (this._component.type) {\n case 'description':\n this._anchorElement.setAttribute('aria-describedby', this._component.id);\n break;\n case 'label':\n this._anchorElement.setAttribute('aria-labelledby', this._component.id);\n break;\n }\n }\n }\n\n public detachAria(): void {\n if (this._component.type === 'description' && this._anchorElement?.getAttribute('aria-describedby') === this._component.id) {\n this._anchorElement?.removeAttribute('aria-describedby');\n }\n\n if (this._component.type === 'label' && this._anchorElement?.getAttribute('aria-labelledby') === this._component.id) {\n this._anchorElement?.removeAttribute('aria-labelledby');\n }\n }\n\n public setAnchorElement(element: HTMLElement | null): void {\n this._anchorElement = element;\n }\n\n public tryLocateAnchorElement(id: string): void {\n this._anchorElement = this._tryFindAnchorElement(id);\n }\n\n public addAnchorListener(type: string, listener: EventListener, opts?: AddEventListenerOptions): void {\n this._anchorElement?.addEventListener(type, listener, opts);\n }\n\n public removeAnchorListener(type: string, listener: EventListener): void {\n this._anchorElement?.removeEventListener(type, listener);\n }\n\n public addLightDismissListener(listener: EventListener): void {\n this._overlayElement?.addEventListener(OVERLAY_CONSTANTS.events.LIGHT_DISMISS, listener);\n }\n\n public removeLightDismissListener(listener: EventListener): void {\n this._overlayElement?.removeEventListener(OVERLAY_CONSTANTS.events.LIGHT_DISMISS, listener);\n }\n\n public show(): void {\n // Tooltips are shown above all content via <forge-overlay>\n // We do this by dynamically creating an overlay element and appending it to the shadow root\n // then we move the tooltip content into the overlay element so that it can be presented.\n if (!this._overlayElement) {\n this._overlayElement = document.createElement(OVERLAY_CONSTANTS.elementName);\n this._overlayElement.setAttribute('part', 'root:overlay');\n }\n\n this._overlayElement.placement = this._component.placement;\n this._overlayElement.anchorElement = this._anchorElement;\n this._overlayElement.arrowElement = this._arrowElement;\n this._overlayElement.offset = { mainAxis: this._component.offset };\n this._overlayElement.flip = this._component.flip;\n\n if (this._component.fallbackPlacements) {\n this._overlayElement.fallbackPlacements = this._component.fallbackPlacements;\n }\n\n if (this._component.boundaryElement) {\n this._overlayElement.boundaryElement = this._component.boundaryElement;\n } else if (this._component.boundary) {\n const boundaryEl = locateElementById(this._component, this._component.boundary);\n this._overlayElement.boundaryElement = boundaryEl;\n } else {\n this._overlayElement.boundaryElement = null;\n }\n\n this._component.shadowRoot?.appendChild(this._overlayElement);\n this._overlayElement.appendChild(this._contentElement);\n\n this._overlayElement.open = true;\n }\n\n public hide(): void {\n // Move the tooltip content back into the component, and remove the overlay element to hide the tooltip visually\n // Tooltips are still accessible when hidden, so we don't need to do anything else.\n if (this._overlayElement) {\n this._overlayElement.open = false;\n }\n this._component.shadowRoot?.appendChild(this._contentElement);\n this._overlayElement?.remove();\n }\n\n /**\n * Attempts to find an element with the given id. If no element is found, the previous sibling or parent element is returned.\n * \n * For backwards compatibility we allow for `id` to be a selector string, so that is evaluated if no element is found for the id.\n */\n private _tryFindAnchorElement(id: string): HTMLElement | null {\n if (id) {\n const rootNode = this._component.getRootNode() as Document | ShadowRoot;\n const targetEl = rootNode.getElementById(id) ?? rootNode.querySelector<HTMLElement>(id);\n if (targetEl) {\n return targetEl;\n }\n }\n return (this._component.previousElementSibling ?? this._component.parentElement) as HTMLElement;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { ITooltipAdapter } from './tooltip-adapter';\nimport { TOOLTIP_CONSTANTS, TooltipPlacement, TooltipTriggerType, TooltipType } from './tooltip-constants';\nimport { WithLongpressListener } from '../core/mixins/interactions/longpress/with-longpress-listener';\nimport { canUserHoverElements } from '../constants';\nimport { OverlayFlipState } from '../overlay/overlay-constants';\nimport { PositionPlacement } from '../core/utils/position-utils';\nimport { DismissibleStack } from '../core/utils/dismissible-stack';\n\nexport interface ITooltipFoundation extends ICustomElementFoundation {\n open: boolean;\n type: TooltipType;\n placement: `${TooltipPlacement}`;\n delay: number;\n anchor: string;\n anchorElement: HTMLElement | null;\n offset: number;\n flip: OverlayFlipState;\n boundary: string | null;\n boundaryElement: HTMLElement | null;\n fallbackPlacements: PositionPlacement[] | null;\n triggerType: TooltipTriggerType | TooltipTriggerType[];\n syncTooltipAria(): void;\n}\n\nconst BaseClass = WithLongpressListener();\n\nexport class TooltipFoundation extends BaseClass implements ITooltipFoundation {\n private _open = false;\n private _type: TooltipType = TOOLTIP_CONSTANTS.defaults.TYPE;\n private _anchor: string;\n private _delay = TOOLTIP_CONSTANTS.defaults.DELAY;\n private _placement: TooltipPlacement = TOOLTIP_CONSTANTS.defaults.PLACEMENT;\n private _offset = TOOLTIP_CONSTANTS.defaults.OFFSET;\n private _flip: OverlayFlipState = TOOLTIP_CONSTANTS.defaults.FLIP;\n private _boundary: string | null = null;\n private _boundaryElement: HTMLElement | null = null;\n private _fallbackPlacements: PositionPlacement[] | null = null;\n private _triggerTypes: TooltipTriggerType[] = TOOLTIP_CONSTANTS.defaults.TRIGGER_TYPES;\n \n // Hover trigger type\n private _hoverStartListener: (evt: MouseEvent) => void = this._onHoverStart.bind(this);\n private _hoverEndListener: (evt: MouseEvent) => void = this._onHoverEnd.bind(this);\n private _hoverTimeout: number | undefined;\n\n // Focus trigger type\n private _focusListener: (evt: FocusEvent) => void = this._onFocus.bind(this);\n private _blurListener: (evt: FocusEvent) => void = this._onBlur.bind(this);\n\n // Longpress trigger type\n private _longpressVisibilityTimeout: number | undefined;\n\n // Dismiss/hide triggers\n private _scrollListener: (evt: Event) => void = this._onTryHide.bind(this);\n private _mouseDownListener: (evt: MouseEvent) => void = this._onTryHide.bind(this);\n private _dragListener: (evt: DragEvent) => void = this._onTryHide.bind(this);\n private _lightDismissListener: (evt: Event) => void = this._onTryHide.bind(this);\n \n constructor(private _adapter: ITooltipAdapter) {\n super();\n }\n\n public initialize(): void {\n if (!this._adapter.anchorElement) {\n this._adapter.tryLocateAnchorElement(this._anchor);\n }\n\n this._adapter.syncAria();\n this._attachAnchorListeners();\n\n if (this._open) {\n this._show();\n }\n }\n\n public destroy(): void {\n if (this._open) {\n this._hide();\n }\n this._adapter.detachAria();\n this._detachAnchorListeners();\n }\n\n public syncTooltipAria(): void {\n this._adapter.syncAria();\n }\n\n private _attachAnchorListeners(): void {\n if (!this._adapter.anchorElement) {\n return;\n }\n\n const triggerTypes = [...this._triggerTypes];\n\n // If the users input mechanism doesn't support hover, then we need to force longpress as their alternative\n /* c8 ignore next 4 */\n if (!canUserHoverElements) {\n triggerTypes.splice(triggerTypes.indexOf('hover'), 1);\n triggerTypes.push('longpress');\n }\n\n const triggerInitializers: Record<TooltipTriggerType, () => void> = {\n 'hover': () => this._adapter.addAnchorListener('mouseenter', this._hoverStartListener),\n 'longpress': () => this._startLongpressListener(this._adapter.anchorElement as HTMLElement),\n 'focus': () => this._adapter.addAnchorListener('focusin', this._focusListener)\n };\n triggerTypes.forEach(triggerType => triggerInitializers[triggerType]());\n }\n\n private _detachAnchorListeners(): void {\n if (!this._adapter.anchorElement) {\n return;\n }\n\n const triggerTypes = [...this._triggerTypes];\n\n /* c8 ignore next 3 */\n if (!canUserHoverElements) {\n triggerTypes.push('longpress');\n }\n\n const triggerRemovers: Record<TooltipTriggerType, () => void> = {\n 'hover': () => {\n this._adapter.removeAnchorListener('mouseenter', this._hoverStartListener);\n this._adapter.removeAnchorListener('mousedown', this._hoverEndListener);\n this._adapter.removeAnchorListener('mouseleave', this._hoverEndListener);\n },\n 'longpress': () => this._stopLongpressListener(this._adapter.anchorElement as HTMLElement),\n 'focus': () => {\n this._adapter.removeAnchorListener('focusin', this._focusListener);\n this._adapter.removeAnchorListener('focusout', this._blurListener);\n }\n };\n triggerTypes.forEach(triggerType => triggerRemovers[triggerType]());\n }\n\n private _show(): void {\n this._open = true;\n this._adapter.show();\n DismissibleStack.instance.add(this._adapter.hostElement);\n this._attachDismissListeners();\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.OPEN, this._open);\n }\n\n private _hide(): void {\n window.clearTimeout(this._hoverTimeout);\n window.clearTimeout(this._longpressVisibilityTimeout);\n\n this._open = false;\n this._adapter.hide();\n DismissibleStack.instance.remove(this._adapter.hostElement);\n this._detachDismissListeners();\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.OPEN, this._open);\n }\n\n private _attachDismissListeners(): void {\n this._adapter.addAnchorListener('mousedown', this._mouseDownListener);\n this._adapter.addAnchorListener('dragstart', this._dragListener);\n this._adapter.addDocumentListener('scroll', this._scrollListener);\n this._adapter.addDocumentListener('wheel', this._scrollListener);\n this._adapter.addLightDismissListener(this._lightDismissListener);\n }\n \n private _detachDismissListeners(): void {\n this._adapter.removeAnchorListener('mousedown', this._mouseDownListener);\n this._adapter.removeAnchorListener('dragstart', this._dragListener);\n this._adapter.removeDocumentListener('scroll', this._scrollListener);\n this._adapter.removeDocumentListener('wheel', this._scrollListener);\n this._adapter.removeLightDismissListener(this._lightDismissListener);\n }\n\n private _onHoverStart(_evt: MouseEvent): void {\n /* c8 ignore next 3 */\n if (this._open) {\n return;\n }\n\n this._adapter.addAnchorListener('mousedown', this._hoverEndListener);\n this._adapter.addAnchorListener('mouseleave', this._hoverEndListener);\n \n if (this._delay) {\n this._hoverTimeout = window.setTimeout(() => {\n this._onTryShow();\n }, this._delay);\n } else {\n this._onTryShow();\n }\n }\n\n private _onHoverEnd(_evt: MouseEvent): void {\n this._adapter.removeAnchorListener('mousedown', this._hoverEndListener);\n this._adapter.removeAnchorListener('mouseleave', this._hoverEndListener);\n window.clearTimeout(this._hoverTimeout);\n this._onTryHide();\n }\n\n private _onFocus(_evt: FocusEvent): void {\n /* c8 ignore next 3 */\n if (this._open) {\n return;\n }\n this._adapter.addAnchorListener('focusout', this._blurListener);\n this._onTryShow();\n }\n\n private _onBlur(_evt: FocusEvent): void {\n this._adapter.removeAnchorListener('focusout', this._blurListener);\n this._onTryHide();\n }\n\n protected _onLongpress(): void {\n this._onTryShow();\n }\n\n protected override _onLongpressEnd(evt: PointerEvent | TouchEvent): void {\n super._onLongpressEnd(evt);\n\n // We only start the timeout to hide the tooltip after the user lifts the pointer\n this._longpressVisibilityTimeout = window.setTimeout(() => {\n this._onTryHide();\n }, TOOLTIP_CONSTANTS.numbers.LONGPRESS_VISIBILITY_DURATION);\n }\n\n private _onTryShow(): void {\n if (!this._open) {\n this._show();\n }\n }\n\n private _onTryHide(): void {\n if (this._open) {\n this._hide();\n }\n }\n \n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n value = Boolean(value);\n if (this._open !== value) {\n if (this._adapter.isConnected) {\n if (!this._open) {\n this._show();\n } else {\n this._hide();\n }\n } else {\n this._open = value;\n }\n }\n }\n\n public get type(): TooltipType {\n return this._type;\n }\n public set type(value: TooltipType) {\n value ??= TOOLTIP_CONSTANTS.defaults.TYPE;\n if (this._type !== value) {\n this._type = value;\n if (this._adapter.isConnected) {\n this._adapter.syncAria();\n }\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.TYPE, this._type !== TOOLTIP_CONSTANTS.defaults.TYPE, this._type);\n }\n }\n\n public get anchor(): string {\n return this._anchor;\n }\n public set anchor(value: string) {\n if (this._anchor !== value) {\n this._anchor = value;\n\n if (this._adapter.isConnected) {\n this._detachAnchorListeners();\n this._adapter.detachAria();\n this._adapter.tryLocateAnchorElement(this._anchor);\n this._adapter.syncAria();\n this._attachAnchorListeners();\n }\n\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.ANCHOR, !!this._anchor, this._anchor);\n }\n }\n\n public get anchorElement(): HTMLElement | null {\n return this._adapter.anchorElement;\n }\n public set anchorElement(element: HTMLElement | null) {\n if (this._adapter.anchorElement !== element) {\n if (this._adapter.isConnected) {\n this._detachAnchorListeners();\n this._adapter.detachAria();\n }\n\n this._adapter.setAnchorElement(element);\n \n if (this._adapter.isConnected) {\n this._adapter.syncAria();\n this._attachAnchorListeners();\n }\n }\n }\n\n public get delay(): number {\n return this._delay;\n }\n public set delay(value: number) {\n if (this._delay !== value) {\n this._delay = value;\n this._adapter.setHostAttribute(TOOLTIP_CONSTANTS.attributes.DELAY, String(this._delay));\n }\n }\n\n public get placement(): TooltipPlacement {\n return this._placement;\n }\n public set placement(value: TooltipPlacement) {\n value ??= TOOLTIP_CONSTANTS.defaults.PLACEMENT;\n if (this._placement !== value) {\n this._placement = value;\n this._adapter.setHostAttribute(TOOLTIP_CONSTANTS.attributes.PLACEMENT, String(this._placement));\n }\n }\n\n public get offset(): number {\n return this._offset;\n }\n public set offset(value: number) {\n value ??= TOOLTIP_CONSTANTS.defaults.OFFSET;\n if (this._offset !== value) {\n this._offset = value;\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.OFFSET, this._offset !== TOOLTIP_CONSTANTS.defaults.OFFSET, String(this._offset));\n }\n }\n\n public get flip(): OverlayFlipState {\n return this._flip;\n }\n public set flip(value: OverlayFlipState) {\n value ??= TOOLTIP_CONSTANTS.defaults.FLIP;\n if (this._flip !== value) {\n this._flip = value;\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.FLIP, this._flip !== TOOLTIP_CONSTANTS.defaults.FLIP, String(this._flip));\n }\n }\n\n public get boundary(): string | null {\n return this._boundary;\n }\n public set boundary(value: string | null) {\n if (this._boundary !== value) {\n this._boundary = value;\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.BOUNDARY, !!this._boundary, this._boundary as string);\n }\n }\n\n public get boundaryElement(): HTMLElement | null {\n return this._boundaryElement;\n }\n public set boundaryElement(element: HTMLElement | null) {\n if (this._boundaryElement !== element) {\n this._boundaryElement = element;\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.BOUNDARY, !!this._boundaryElement, this._boundaryElement?.id);\n }\n }\n\n public get fallbackPlacements(): PositionPlacement[] | null {\n return this._fallbackPlacements;\n }\n public set fallbackPlacements(value: PositionPlacement[] | null) {\n if (this._fallbackPlacements !== value) {\n this._fallbackPlacements = value;\n }\n }\n\n public get triggerType(): TooltipTriggerType | TooltipTriggerType[] {\n return this._triggerTypes.length === 1 ? this._triggerTypes[0] : this._triggerTypes;\n }\n public set triggerType(value: TooltipTriggerType | TooltipTriggerType[]) {\n if (this._triggerTypes !== value) {\n if (this._adapter.isConnected) {\n this._detachAnchorListeners();\n }\n\n this._triggerTypes = Array.isArray(value) ? value : [value];\n this._triggerTypes = this._triggerTypes.filter(type => !!type);\n\n if (!this._triggerTypes.length) {\n this._triggerTypes = TOOLTIP_CONSTANTS.defaults.TRIGGER_TYPES;\n }\n\n if (this._adapter.isConnected) {\n this._attachAnchorListeners();\n }\n }\n }\n}\n", "import { CustomElement, coerceNumber, FoundationProperty, coerceBoolean, attachShadowTemplate } from '@tylertech/forge-core';\nimport { TooltipAdapter } from './tooltip-adapter';\nimport { TooltipFoundation } from './tooltip-foundation';\nimport { TooltipPlacement, TooltipTriggerType, TooltipType, TOOLTIP_CONSTANTS } from './tooltip-constants';\nimport { BaseComponent } from '../core/base/base-component';\nimport { OverlayComponent } from '../overlay/overlay';\nimport { coerceStringToArray } from '../core/utils/utils';\nimport { IWithDefaultAria, WithDefaultAria } from '../core/mixins/internals/with-default-aria';\nimport { IWithElementInternals, WithElementInternals } from '../core/mixins/internals/with-element-internals';\nimport { OverlayFlipState } from '../overlay/overlay-constants';\nimport { PositionPlacement } from '../core/utils/position-utils';\nimport { IDismissible, IDismissibleStackState, tryDismiss } from '../core/utils/dismissible-stack';\n\nconst template = '<template><div class=\\\"forge-tooltip\\\" part=\\\"surface\\\"><slot></slot><div class=\\\"arrow\\\" part=\\\"arrow\\\"></div></div></template>';\nconst styles = '@-webkit-keyframes slidein{from{opacity:0;-webkit-transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y));transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y))}to{opacity:1;-webkit-transform:translateX(0) translateY(0);transform:translateX(0) translateY(0)}}@keyframes slidein{from{opacity:0;-webkit-transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y));transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y))}to{opacity:1;-webkit-transform:translateX(0) translateY(0);transform:translateX(0) translateY(0)}}:host{display:contents;pointer-events:none}:host([hidden]){display:none}.forge-tooltip{--_tooltip-background:var(--forge-tooltip-background, var(--forge-theme-surface-inverse, #333333));--_tooltip-color:var(--forge-tooltip-color, var(--forge-theme-on-surface-inverse, #ffffff));--_tooltip-shape:var(--forge-tooltip-shape, var(--forge-shape-medium, 4px));--_tooltip-padding:var(--forge-tooltip-padding, var(--forge-spacing-xsmall, 8px));--_tooltip-padding-block:var(--forge-tooltip-padding-block, var(--_tooltip-padding));--_tooltip-padding-inline:var(--forge-tooltip-padding-inline, var(--_tooltip-padding));--_tooltip-width:var(--forge-tooltip-width, max-content);--_tooltip-max-width:var(--forge-tooltip-max-width, 320px);--_tooltip-elevation:var(--forge-tooltip-elevation, var(--forge-theme-popup-elevation, var(--forge-theme-surface-bright-shadow)));--_tooltip-content-align:var(--forge-tooltip-content-align, center);--_tooltip-border-width:var(--forge-tooltip-border-width, 0);--_tooltip-border-style:var(--forge-tooltip-border-style, solid);--_tooltip-border-color:var(--forge-tooltip-border-color, var(--forge-theme-outline, #e0e0e0));--_tooltip-animation-timing:var(--forge-tooltip-animation-timing, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_tooltip-animation-duration:var(--forge-tooltip-animation-duration, var(--forge-animation-duration-short3, 150ms));--_tooltip-animation-offset:var(--forge-tooltip-animation-offset, 24px);--_tooltip-arrow-size:var(--forge-tooltip-arrow-size, 8px);--_tooltip-arrow-height:var(--forge-tooltip-arrow-height, var(--_tooltip-arrow-size));--_tooltip-arrow-width:var(--forge-tooltip-arrow-width, var(--_tooltip-arrow-size));--_tooltip-arrow-shape:var(--forge-tooltip-arrow-shape, var(--forge-shape-small, 2px));--_tooltip-arrow-rotation:var(--forge-tooltip-arrow-rotation, 0deg);--_tooltip-arrow-top-rotation:var(--forge-tooltip-arrow-top-rotation, 315deg);--_tooltip-arrow-right-rotation:var(--forge-tooltip-arrow-right-rotation, 45deg);--_tooltip-arrow-bottom-rotation:var(--forge-tooltip-arrow-bottom-rotation, 135deg);--_tooltip-arrow-left-rotation:var(--forge-tooltip-arrow-left-rotation, 225deg)}.forge-tooltip{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, \\\"Roboto\\\", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body1-text-decoration,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);position:relative;background:var(--_tooltip-background);color:var(--_tooltip-color);border-radius:var(--_tooltip-shape);border-width:var(--_tooltip-border-width);border-style:var(--_tooltip-border-style);border-color:var(--_tooltip-border-color);padding-block:var(--_tooltip-padding-block);padding-inline:var(--_tooltip-padding-inline);-webkit-box-shadow:var(--_tooltip-elevation);box-shadow:var(--_tooltip-elevation);width:var(--_tooltip-width);max-width:var(--_tooltip-max-width);pointer-events:none;text-align:var(--_tooltip-content-align);line-height:normal;white-space:normal;-webkit-animation-duration:var(--_tooltip-animation-duration);animation-duration:var(--_tooltip-animation-duration);-webkit-animation-timing-function:var(--_tooltip-animation-timing);animation-timing-function:var(--_tooltip-animation-timing);-webkit-animation-name:slidein;animation-name:slidein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(:not([open])) .forge-tooltip{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}.arrow{position:absolute;contain:strict;background-color:inherit;height:var(--_tooltip-arrow-height);width:var(--_tooltip-arrow-width);-webkit-box-shadow:inherit;box-shadow:inherit;border:inherit;border-end-start-radius:var(--_tooltip-arrow-shape);rotate:var(--_tooltip-arrow-rotation);-webkit-clip-path:var(--_tooltip-arrow-clip-path);clip-path:var(--_tooltip-arrow-clip-path);--_tooltip-arrow-translate-x:0;--_tooltip-arrow-translate-y:0;--_tooltip-arrow-clip-path:polygon(0 0, 0 100%, 100% 100%)}.forge-tooltip{--_tooltip-slidein-x:0;--_tooltip-slidein-y:0}forge-overlay[open][position-placement^=top] .forge-tooltip{--_tooltip-slidein-y:var(--forge-tooltip-slidein-y, var(--_tooltip-animation-offset))}forge-overlay[open][position-placement^=top] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-top-rotation);-webkit-margin-after:var(--_tooltip-border-width);margin-block-end:var(--_tooltip-border-width)}forge-overlay[open][position-placement^=right] .forge-tooltip{--_tooltip-slidein-x:var(--forge-tooltip-slidein-x, calc(var(--_tooltip-animation-offset) * -1))}forge-overlay[open][position-placement^=right] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-right-rotation);-webkit-margin-start:var(--_tooltip-border-width);margin-inline-start:var(--_tooltip-border-width)}forge-overlay[open][position-placement^=bottom] .forge-tooltip{--_tooltip-slidein-y:var(--forge-tooltip-slidein-y, calc(var(--_tooltip-animation-offset) * -1))}forge-overlay[open][position-placement^=bottom] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-bottom-rotation);-webkit-margin-before:var(--_tooltip-border-width);margin-block-start:var(--_tooltip-border-width)}forge-overlay[open][position-placement^=left] .forge-tooltip{--_tooltip-slidein-x:var(--forge-tooltip-slidein-x, var(--_tooltip-animation-offset))}forge-overlay[open][position-placement^=left] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-left-rotation);-webkit-margin-end:var(--_tooltip-border-width);margin-inline-end:var(--_tooltip-border-width)}';\n\nexport interface ITooltipComponent extends IWithDefaultAria, IWithElementInternals, IDismissible {\n open: boolean;\n type: TooltipType;\n anchor: string;\n anchorElement: HTMLElement | null;\n /** @deprecated use `anchor` instead */\n target: string;\n placement: `${TooltipPlacement}`;\n /** @deprecated use `placement` instead */\n position: `${TooltipPlacement}`;\n delay: number;\n offset: number;\n flip: OverlayFlipState;\n boundary: string | null;\n boundaryElement: HTMLElement | null;\n fallbackPlacements: PositionPlacement[] | null;\n triggerType: TooltipTriggerType | TooltipTriggerType[];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-tooltip': ITooltipComponent;\n }\n}\n\nconst BaseClass = WithDefaultAria(WithElementInternals(BaseComponent));\n\n/**\n * @tag forge-tooltip\n * \n * @summary Tooltips display information related to an element when the user hovers over an element.\n *\n * @property {boolean} open - Whether or not the tooltip is open.\n * @property {TooltipType} type - The type of tooltip. Valid values are `presentation` (default), `label`, and `description`.\n * @property {string} anchor - The id of the element that the tooltip is anchored to.\n * @property {TooltipPlacement} placement - The placement of the tooltip relative to the anchor element.\n * @property {number} delay - The delay in milliseconds before the tooltip is shown.\n * @property {number} offset - The offset in pixels between the tooltip and the anchor element.\n * @property {OverlayFlipState} - flip - How the tooltip should place itself if there is not enough space at the desired placement.\n * @property {string | null} boundary - The id of the element that the tooltip should be constrained to.\n * @property {HTMLElement | null} boundaryElement - The element that the tooltip should be constrained to.\n * @property {PositionPlacement[] | null} fallbackPlacements - The fallback placements of the tooltip relative to the anchor element.\n * @property {TooltipTriggerType | TooltipTriggerType[]} triggerType - The trigger type(s) that will open the tooltip. Valid values are `hover` (default), `longpress`, and `focus`.\n * \n * @attribute {boolean} open - Whether or not the tooltip is open.\n * @attribute {TooltipType} type - The type of tooltip. Valid values are `presentation` (default), `label`, and `description`.\n * @attribute {string} anchor - The id of the element that the tooltip is anchored to.\n * @attribute {TooltipPlacement} placement - The placement of the tooltip relative to the anchor element.\n * @attribute {number} delay - The delay in milliseconds before the tooltip is shown.\n * @attribute {number} offset - The offset in pixels between the tooltip and the anchor element.\n * @attribute {OverlayFlipState} flip - How the tooltip should place itself if there is not enough space at the desired placement.\n * @attribute {string | null} boundary - The id of the element that the tooltip should be constrained to.\n * @attribute {PositionPlacement[]} fallbackPlacements - The fallback placements of the tooltip relative to the anchor element.\n * \n * @cssproperty --forge-tooltip-background - The background color of the tooltip surface.\n * @cssproperty --forge-tooltip-color - The text color of the tooltip surface.\n * @cssproperty --forge-tooltip-shape - The shape of the tooltip surface.\n * @cssproperty --forge-tooltip-padding - The padding of the tooltip surface.\n * @cssproperty --forge-tooltip-padding-block - The block padding of the tooltip surface.\n * @cssproperty --forge-tooltip-padding-inline - The inline padding of the tooltip surface.\n * @cssproperty --forge-tooltip-max-width - The maximum width of the tooltip surface.\n * @cssproperty --forge-tooltip-elevation - The elevation of the tooltip surface.\n * @cssproperty --forge-tooltip-border-width - The border width of the tooltip surface.\n * @cssproperty --forge-tooltip-border-style - The border style of the tooltip surface.\n * @cssproperty --forge-tooltip-border-color - The border color of the tooltip surface.\n * @cssproperty --forge-tooltip-animation-timing - The animation timing function of the tooltip surface.\n * @cssproperty --forge-tooltip-animation-duration - The animation duration of the tooltip surface.\n * @cssproperty --forge-tooltip-animation-offset - The animation offset of the tooltip surface.\n * @cssproperty --forge-tooltip-arrow-size - The size of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-height - The height of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-width - The width of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-shape - The shape of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-clip-path - The clip path of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-rotation - The rotation of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-top-rotation - The rotation of the tooltip arrow when the tooltip is placed on top.\n * @cssproperty --forge-tooltip-arrow-right-rotation - The rotation of the tooltip arrow when the tooltip is placed on the right.\n * @cssproperty --forge-tooltip-arrow-bottom-rotation - The rotation of the tooltip arrow when the tooltip is placed on the bottom.\n * @cssproperty --forge-tooltip-arrow-left-rotation- The rotation of the tooltip arrow when the tooltip is placed on the left.\n * \n * @slot - The content to display in the tooltip.\n * \n * @csspart surface - The tooltip surface.\n * @csspart arrow - The tooltip arrow.\n * @csspart overlay - The overlay surface.\n */\n@CustomElement({\n name: TOOLTIP_CONSTANTS.elementName,\n dependencies: [\n OverlayComponent\n ]\n})\nexport class TooltipComponent extends BaseClass implements ITooltipComponent {\n public static get observedAttributes(): string[] {\n return Object.values(TOOLTIP_CONSTANTS.observedAttributes);\n }\n\n private _foundation: TooltipFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new TooltipFoundation(new TooltipAdapter(this));\n }\n\n public [tryDismiss](state?: IDismissibleStackState<string> | undefined): boolean {\n return true;\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 TOOLTIP_CONSTANTS.observedAttributes.ID:\n this._foundation.syncTooltipAria();\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.TYPE:\n this.type = newValue?.trim() ? newValue as TooltipType : TOOLTIP_CONSTANTS.defaults.TYPE;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.TARGET:\n case TOOLTIP_CONSTANTS.observedAttributes.ANCHOR:\n this.anchor = newValue;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.DELAY:\n this.delay = coerceNumber(newValue);\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.POSITION:\n case TOOLTIP_CONSTANTS.observedAttributes.PLACEMENT:\n this.placement = newValue as TooltipPlacement;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.OFFSET:\n this.offset = coerceNumber(newValue);\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.FLIP:\n this.flip = newValue as OverlayFlipState;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.BOUNDARY:\n this.boundary = newValue;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.FALLBACK_PLACEMENTS:\n this.fallbackPlacements = newValue?.trim() ? coerceStringToArray<PositionPlacement>(newValue) : null;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.TRIGGER_TYPE:\n this.triggerType = newValue?.trim() ? coerceStringToArray<TooltipTriggerType>(newValue) : TOOLTIP_CONSTANTS.defaults.TRIGGER_TYPES;\n break;\n }\n }\n\n @FoundationProperty()\n public declare open: boolean;\n\n @FoundationProperty()\n public declare type: TooltipType;\n\n @FoundationProperty()\n public declare anchor: string;\n\n @FoundationProperty()\n public declare anchorElement: HTMLElement | null;\n\n /** @deprecated use `anchor` instead */\n @FoundationProperty({ name: 'anchor' })\n public declare target: string;\n\n @FoundationProperty()\n public declare placement: `${TooltipPlacement}`;\n\n /** @deprecated use `placement` instead */\n @FoundationProperty({ name: 'placement' })\n public declare position: `${TooltipPlacement}`;\n\n @FoundationProperty()\n public declare delay: number;\n\n @FoundationProperty()\n public declare offset: number;\n\n @FoundationProperty()\n public declare flip: OverlayFlipState;\n\n @FoundationProperty()\n public declare boundary: string | null;\n\n @FoundationProperty()\n public declare boundaryElement: HTMLElement | null;\n\n @FoundationProperty()\n public declare fallbackPlacements: PositionPlacement[] | null;\n\n @FoundationProperty()\n public declare triggerType: TooltipTriggerType | TooltipTriggerType[];\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { TooltipComponent } from './tooltip';\n\nexport * from './tooltip-adapter';\nexport * from './tooltip-constants';\nexport * from './tooltip-foundation';\nexport * from './tooltip';\n\nexport function defineTooltipComponent(): void {\n defineCustomElement(TooltipComponent);\n}\n"],
|
|
5
|
-
"mappings": "wiBAuBO,IAAMA,EAAN,cAA6BC,CAA0D,CAM5F,YAAYC,EAA8B,CACxC,MAAMA,CAAS,EAJjB,KAAQ,eAAqC,KAC7C,KAAQ,gBAA4C,KAIlD,KAAK,gBAAkBC,EAAiB,KAAK,WAAYC,EAAkB,UAAU,OAAO,EAC5F,KAAK,cAAgBD,EAAiB,KAAK,WAAYC,EAAkB,UAAU,KAAK,CAC1F,CAEA,IAAW,eAAoC,CAC7C,OAAO,KAAK,cACd,CAEO,UAAiB,CACtB,IAAMC,EAAO,KAAK,WAAW,OAAS,cAAgB,UAAY,KAIlE,GAHA,KAAK,WAAWC,CAAc,EAAE,CAAE,KAAAD,CAAK,CAAC,EACxC,KAAK,WAAWC,CAAc,EAAE,CAAE,WAAY,MAAO,EAAG,CAAE,aAAc,CAAC,KAAK,WAAW,aAAa,aAAa,CAAE,CAAC,EAElH,KAAK,eA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GAa,EAAA,CADdC,EAAmB,GAjFTd,EAkFI,yBAIAa,EAAA,CADdC,EAAmB,CAAE,KAAM,WAAY,CAAC,GArF9Bd,EAsFI,wBAGAa,EAAA,CADdC,EAAmB,GAxFTd,EAyFI,qBAGAa,EAAA,CADdC,EAAmB,GA3FTd,EA4FI,sBAGAa,EAAA,CADdC,EAAmB,GA9FTd,EA+FI,oBAGAa,EAAA,CADdC,EAAmB,GAjGTd,EAkGI,wBAGAa,EAAA,CADdC,EAAmB,GApGTd,EAqGI,+BAGAa,EAAA,CADdC,EAAmB,GAvGTd,EAwGI,kCAGAa,EAAA,CADdC,EAAmB,GA1GTd,EA2GI,2BA3GJA,EAANa,EAAA,CANNE,EAAc,CACb,KAAMX,EAAkB,YACxB,aAAc,CACZY,CACF,CACF,CAAC,GACYhB,GClGN,SAASiB,IAA+B,CAC7CC,EAAoBC,CAAgB,CACtC",
|
|
6
|
-
"names": ["TooltipAdapter", "BaseAdapter", "component", "getShadowElement", "TOOLTIP_CONSTANTS", "role", "setDefaultAria", "randomChars", "_a", "_b", "_c", "_d", "element", "id", "type", "listener", "opts", "OVERLAY_CONSTANTS", "boundaryEl", "locateElementById", "rootNode", "targetEl", "BaseClass", "WithLongpressListener", "TooltipFoundation", "_adapter", "TOOLTIP_CONSTANTS", "triggerTypes", "canUserHoverElements", "triggerInitializers", "triggerType", "triggerRemovers", "DismissibleStack", "_evt", "evt", "value", "element", "_a", "type", "template", "styles", "BaseClass", "WithDefaultAria", "WithElementInternals", "BaseComponent", "TooltipComponent", "attachShadowTemplate", "TooltipFoundation", "TooltipAdapter", "TOOLTIP_CONSTANTS", "tryDismiss", "state", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumber", "coerceStringToArray", "__decorateClass", "FoundationProperty", "CustomElement", "OverlayComponent"
|
|
3
|
+
"sources": ["../../src/tooltip/tooltip-adapter.ts", "../../src/tooltip/tooltip-foundation.ts", "../../src/tooltip/tooltip.ts"],
|
|
4
|
+
"sourcesContent": ["import { getShadowElement, randomChars } from '@tylertech/forge-core';\nimport { setDefaultAria } from '../constants';\nimport { locateElementById } from '../core/utils/utils';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IOverlayComponent, OVERLAY_CONSTANTS } from '../overlay';\nimport { ITooltipComponent } from './tooltip';\nimport { TOOLTIP_CONSTANTS } from './tooltip-constants';\n\nexport interface ITooltipAdapter extends IBaseAdapter {\n readonly hostElement: ITooltipComponent;\n readonly anchorElement: HTMLElement | null;\n syncAria(): void;\n detachAria(): void;\n setAnchorElement(element: HTMLElement | null): void;\n tryLocateAnchorElement(id: string): void;\n addAnchorListener(type: string, listener: EventListener, opts?: AddEventListenerOptions): void;\n removeAnchorListener(type: string, listener: EventListener): void;\n addLightDismissListener(listener: EventListener): void;\n removeLightDismissListener(listener: EventListener): void;\n show(): void;\n hide(): void;\n}\n\nexport class TooltipAdapter extends BaseAdapter<ITooltipComponent> implements ITooltipAdapter {\n private _contentElement: HTMLElement;\n private _arrowElement: HTMLElement;\n private _anchorElement: HTMLElement | null = null;\n private _overlayElement: IOverlayComponent | null = null;\n\n constructor(component: ITooltipComponent) {\n super(component);\n this._contentElement = getShadowElement(this._component, TOOLTIP_CONSTANTS.selectors.CONTENT);\n this._arrowElement = getShadowElement(this._component, TOOLTIP_CONSTANTS.selectors.ARROW);\n }\n\n public get anchorElement(): HTMLElement | null {\n return this._anchorElement;\n }\n\n public syncAria(): void {\n const role = this._component.type === 'description' ? 'tooltip' : null;\n this._component[setDefaultAria]({ role });\n this._component[setDefaultAria]({ ariaHidden: 'true' }, { setAttribute: !this._component.hasAttribute('aria-hidden') });\n\n if (this._anchorElement) {\n if (this._component.type === 'label' && this._anchorElement.hasAttribute('aria-labelledby')) {\n return;\n }\n if (this._component.type === 'description' && this._anchorElement.hasAttribute('aria-describedby')) {\n return;\n }\n\n if (!this._component.hasAttribute('id') && this._component.type !== 'presentation') {\n this._component.id = `forge-tooltip-${randomChars()}`;\n }\n\n switch (this._component.type) {\n case 'description':\n this._anchorElement.setAttribute('aria-describedby', this._component.id);\n break;\n case 'label':\n this._anchorElement.setAttribute('aria-labelledby', this._component.id);\n break;\n }\n }\n }\n\n public detachAria(): void {\n if (this._component.type === 'description' && this._anchorElement?.getAttribute('aria-describedby') === this._component.id) {\n this._anchorElement?.removeAttribute('aria-describedby');\n }\n\n if (this._component.type === 'label' && this._anchorElement?.getAttribute('aria-labelledby') === this._component.id) {\n this._anchorElement?.removeAttribute('aria-labelledby');\n }\n }\n\n public setAnchorElement(element: HTMLElement | null): void {\n this._anchorElement = element;\n }\n\n public tryLocateAnchorElement(id: string): void {\n this._anchorElement = this._tryFindAnchorElement(id);\n }\n\n public addAnchorListener(type: string, listener: EventListener, opts?: AddEventListenerOptions): void {\n this._anchorElement?.addEventListener(type, listener, opts);\n }\n\n public removeAnchorListener(type: string, listener: EventListener): void {\n this._anchorElement?.removeEventListener(type, listener);\n }\n\n public addLightDismissListener(listener: EventListener): void {\n this._overlayElement?.addEventListener(OVERLAY_CONSTANTS.events.LIGHT_DISMISS, listener);\n }\n\n public removeLightDismissListener(listener: EventListener): void {\n this._overlayElement?.removeEventListener(OVERLAY_CONSTANTS.events.LIGHT_DISMISS, listener);\n }\n\n public show(): void {\n // Tooltips are shown above all content via <forge-overlay>\n // We do this by dynamically creating an overlay element and appending it to the shadow root\n // then we move the tooltip content into the overlay element so that it can be presented.\n if (!this._overlayElement) {\n this._overlayElement = document.createElement(OVERLAY_CONSTANTS.elementName);\n this._overlayElement.setAttribute('part', 'root:overlay');\n }\n\n this._overlayElement.placement = this._component.placement;\n this._overlayElement.anchorElement = this._anchorElement;\n this._overlayElement.arrowElement = this._arrowElement;\n this._overlayElement.offset = { mainAxis: this._component.offset };\n this._overlayElement.flip = this._component.flip;\n\n if (this._component.fallbackPlacements) {\n this._overlayElement.fallbackPlacements = this._component.fallbackPlacements;\n }\n\n if (this._component.boundaryElement) {\n this._overlayElement.boundaryElement = this._component.boundaryElement;\n } else if (this._component.boundary) {\n const boundaryEl = locateElementById(this._component, this._component.boundary);\n this._overlayElement.boundaryElement = boundaryEl;\n } else {\n this._overlayElement.boundaryElement = null;\n }\n\n this._component.shadowRoot?.appendChild(this._overlayElement);\n this._overlayElement.appendChild(this._contentElement);\n\n this._overlayElement.open = true;\n }\n\n public hide(): void {\n // Move the tooltip content back into the component, and remove the overlay element to hide the tooltip visually\n // Tooltips are still accessible when hidden, so we don't need to do anything else.\n if (this._overlayElement) {\n this._overlayElement.open = false;\n }\n this._component.shadowRoot?.appendChild(this._contentElement);\n this._overlayElement?.remove();\n }\n\n /**\n * Attempts to find an element with the given id. If no element is found, the previous sibling or parent element is returned.\n * \n * For backwards compatibility we allow for `id` to be a selector string, so that is evaluated if no element is found for the id.\n */\n private _tryFindAnchorElement(id: string): HTMLElement | null {\n if (id) {\n const rootNode = this._component.getRootNode() as Document | ShadowRoot;\n const targetEl = rootNode.getElementById(id) ?? rootNode.querySelector<HTMLElement>(id);\n if (targetEl) {\n return targetEl;\n }\n }\n return (this._component.previousElementSibling ?? this._component.parentElement) as HTMLElement;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { ITooltipAdapter } from './tooltip-adapter';\nimport { TOOLTIP_CONSTANTS, TooltipPlacement, TooltipTriggerType, TooltipType } from './tooltip-constants';\nimport { WithLongpressListener } from '../core/mixins/interactions/longpress/with-longpress-listener';\nimport { canUserHoverElements } from '../constants';\nimport { OverlayFlipState } from '../overlay/overlay-constants';\nimport { PositionPlacement } from '../core/utils/position-utils';\nimport { DismissibleStack } from '../core/utils/dismissible-stack';\n\nexport interface ITooltipFoundation extends ICustomElementFoundation {\n open: boolean;\n type: TooltipType;\n placement: `${TooltipPlacement}`;\n delay: number;\n anchor: string;\n anchorElement: HTMLElement | null;\n offset: number;\n flip: OverlayFlipState;\n boundary: string | null;\n boundaryElement: HTMLElement | null;\n fallbackPlacements: PositionPlacement[] | null;\n triggerType: TooltipTriggerType | TooltipTriggerType[];\n syncTooltipAria(): void;\n}\n\nconst BaseClass = WithLongpressListener();\n\nexport class TooltipFoundation extends BaseClass implements ITooltipFoundation {\n private _open = false;\n private _type: TooltipType = TOOLTIP_CONSTANTS.defaults.TYPE;\n private _anchor: string;\n private _delay = TOOLTIP_CONSTANTS.defaults.DELAY;\n private _placement: TooltipPlacement = TOOLTIP_CONSTANTS.defaults.PLACEMENT;\n private _offset = TOOLTIP_CONSTANTS.defaults.OFFSET;\n private _flip: OverlayFlipState = TOOLTIP_CONSTANTS.defaults.FLIP;\n private _boundary: string | null = null;\n private _boundaryElement: HTMLElement | null = null;\n private _fallbackPlacements: PositionPlacement[] | null = null;\n private _triggerTypes: TooltipTriggerType[] = TOOLTIP_CONSTANTS.defaults.TRIGGER_TYPES;\n \n // Hover trigger type\n private _hoverStartListener: (evt: MouseEvent) => void = this._onHoverStart.bind(this);\n private _hoverEndListener: (evt: MouseEvent) => void = this._onHoverEnd.bind(this);\n private _hoverTimeout: number | undefined;\n\n // Focus trigger type\n private _focusListener: (evt: FocusEvent) => void = this._onFocus.bind(this);\n private _blurListener: (evt: FocusEvent) => void = this._onBlur.bind(this);\n\n // Longpress trigger type\n private _longpressVisibilityTimeout: number | undefined;\n\n // Dismiss/hide triggers\n private _scrollListener: (evt: Event) => void = this._onTryHide.bind(this);\n private _mouseDownListener: (evt: MouseEvent) => void = this._onTryHide.bind(this);\n private _dragListener: (evt: DragEvent) => void = this._onTryHide.bind(this);\n private _lightDismissListener: (evt: Event) => void = this._onTryHide.bind(this);\n \n constructor(private _adapter: ITooltipAdapter) {\n super();\n }\n\n public initialize(): void {\n if (!this._adapter.anchorElement) {\n this._adapter.tryLocateAnchorElement(this._anchor);\n }\n\n this._adapter.syncAria();\n this._attachAnchorListeners();\n\n if (this._open) {\n this._show();\n }\n }\n\n public destroy(): void {\n if (this._open) {\n this._hide();\n }\n this._adapter.detachAria();\n this._detachAnchorListeners();\n }\n\n public syncTooltipAria(): void {\n this._adapter.syncAria();\n }\n\n private _attachAnchorListeners(): void {\n if (!this._adapter.anchorElement) {\n return;\n }\n\n const triggerTypes = [...this._triggerTypes];\n\n // If the users input mechanism doesn't support hover, then we need to force longpress as their alternative\n /* c8 ignore next 4 */\n if (!canUserHoverElements) {\n triggerTypes.splice(triggerTypes.indexOf('hover'), 1);\n triggerTypes.push('longpress');\n }\n\n const triggerInitializers: Record<TooltipTriggerType, () => void> = {\n 'hover': () => this._adapter.addAnchorListener('mouseenter', this._hoverStartListener),\n 'longpress': () => this._startLongpressListener(this._adapter.anchorElement as HTMLElement),\n 'focus': () => this._adapter.addAnchorListener('focusin', this._focusListener)\n };\n triggerTypes.forEach(triggerType => triggerInitializers[triggerType]());\n }\n\n private _detachAnchorListeners(): void {\n if (!this._adapter.anchorElement) {\n return;\n }\n\n const triggerTypes = [...this._triggerTypes];\n\n /* c8 ignore next 3 */\n if (!canUserHoverElements) {\n triggerTypes.push('longpress');\n }\n\n const triggerRemovers: Record<TooltipTriggerType, () => void> = {\n 'hover': () => {\n this._adapter.removeAnchorListener('mouseenter', this._hoverStartListener);\n this._adapter.removeAnchorListener('mousedown', this._hoverEndListener);\n this._adapter.removeAnchorListener('mouseleave', this._hoverEndListener);\n },\n 'longpress': () => this._stopLongpressListener(this._adapter.anchorElement as HTMLElement),\n 'focus': () => {\n this._adapter.removeAnchorListener('focusin', this._focusListener);\n this._adapter.removeAnchorListener('focusout', this._blurListener);\n }\n };\n triggerTypes.forEach(triggerType => triggerRemovers[triggerType]());\n }\n\n private _show(): void {\n this._open = true;\n this._adapter.show();\n DismissibleStack.instance.add(this._adapter.hostElement);\n this._attachDismissListeners();\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.OPEN, this._open);\n }\n\n private _hide(): void {\n window.clearTimeout(this._hoverTimeout);\n window.clearTimeout(this._longpressVisibilityTimeout);\n\n this._open = false;\n this._adapter.hide();\n DismissibleStack.instance.remove(this._adapter.hostElement);\n this._detachDismissListeners();\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.OPEN, this._open);\n }\n\n private _attachDismissListeners(): void {\n this._adapter.addAnchorListener('mousedown', this._mouseDownListener);\n this._adapter.addAnchorListener('dragstart', this._dragListener);\n this._adapter.addDocumentListener('scroll', this._scrollListener);\n this._adapter.addDocumentListener('wheel', this._scrollListener);\n this._adapter.addLightDismissListener(this._lightDismissListener);\n }\n \n private _detachDismissListeners(): void {\n this._adapter.removeAnchorListener('mousedown', this._mouseDownListener);\n this._adapter.removeAnchorListener('dragstart', this._dragListener);\n this._adapter.removeDocumentListener('scroll', this._scrollListener);\n this._adapter.removeDocumentListener('wheel', this._scrollListener);\n this._adapter.removeLightDismissListener(this._lightDismissListener);\n }\n\n private _onHoverStart(_evt: MouseEvent): void {\n /* c8 ignore next 3 */\n if (this._open) {\n return;\n }\n\n this._adapter.addAnchorListener('mousedown', this._hoverEndListener);\n this._adapter.addAnchorListener('mouseleave', this._hoverEndListener);\n \n if (this._delay) {\n this._hoverTimeout = window.setTimeout(() => {\n this._onTryShow();\n }, this._delay);\n } else {\n this._onTryShow();\n }\n }\n\n private _onHoverEnd(_evt: MouseEvent): void {\n this._adapter.removeAnchorListener('mousedown', this._hoverEndListener);\n this._adapter.removeAnchorListener('mouseleave', this._hoverEndListener);\n window.clearTimeout(this._hoverTimeout);\n this._onTryHide();\n }\n\n private _onFocus(_evt: FocusEvent): void {\n /* c8 ignore next 3 */\n if (this._open) {\n return;\n }\n this._adapter.addAnchorListener('focusout', this._blurListener);\n this._onTryShow();\n }\n\n private _onBlur(_evt: FocusEvent): void {\n this._adapter.removeAnchorListener('focusout', this._blurListener);\n this._onTryHide();\n }\n\n protected _onLongpress(): void {\n this._onTryShow();\n }\n\n protected override _onLongpressEnd(evt: PointerEvent | TouchEvent): void {\n super._onLongpressEnd(evt);\n\n // We only start the timeout to hide the tooltip after the user lifts the pointer\n this._longpressVisibilityTimeout = window.setTimeout(() => {\n this._onTryHide();\n }, TOOLTIP_CONSTANTS.numbers.LONGPRESS_VISIBILITY_DURATION);\n }\n\n private _onTryShow(): void {\n if (!this._open) {\n this._show();\n }\n }\n\n private _onTryHide(): void {\n if (this._open) {\n this._hide();\n }\n }\n \n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n value = Boolean(value);\n if (this._open !== value) {\n if (this._adapter.isConnected) {\n if (!this._open) {\n this._show();\n } else {\n this._hide();\n }\n } else {\n this._open = value;\n }\n }\n }\n\n public get type(): TooltipType {\n return this._type;\n }\n public set type(value: TooltipType) {\n value ??= TOOLTIP_CONSTANTS.defaults.TYPE;\n if (this._type !== value) {\n this._type = value;\n if (this._adapter.isConnected) {\n this._adapter.syncAria();\n }\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.TYPE, this._type !== TOOLTIP_CONSTANTS.defaults.TYPE, this._type);\n }\n }\n\n public get anchor(): string {\n return this._anchor;\n }\n public set anchor(value: string) {\n if (this._anchor !== value) {\n this._anchor = value;\n\n if (this._adapter.isConnected) {\n this._detachAnchorListeners();\n this._adapter.detachAria();\n this._adapter.tryLocateAnchorElement(this._anchor);\n this._adapter.syncAria();\n this._attachAnchorListeners();\n }\n\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.ANCHOR, !!this._anchor, this._anchor);\n }\n }\n\n public get anchorElement(): HTMLElement | null {\n return this._adapter.anchorElement;\n }\n public set anchorElement(element: HTMLElement | null) {\n if (this._adapter.anchorElement !== element) {\n if (this._adapter.isConnected) {\n this._detachAnchorListeners();\n this._adapter.detachAria();\n }\n\n this._adapter.setAnchorElement(element);\n \n if (this._adapter.isConnected) {\n this._adapter.syncAria();\n this._attachAnchorListeners();\n }\n }\n }\n\n public get delay(): number {\n return this._delay;\n }\n public set delay(value: number) {\n if (this._delay !== value) {\n this._delay = value;\n this._adapter.setHostAttribute(TOOLTIP_CONSTANTS.attributes.DELAY, String(this._delay));\n }\n }\n\n public get placement(): TooltipPlacement {\n return this._placement;\n }\n public set placement(value: TooltipPlacement) {\n value ??= TOOLTIP_CONSTANTS.defaults.PLACEMENT;\n if (this._placement !== value) {\n this._placement = value;\n this._adapter.setHostAttribute(TOOLTIP_CONSTANTS.attributes.PLACEMENT, String(this._placement));\n }\n }\n\n public get offset(): number {\n return this._offset;\n }\n public set offset(value: number) {\n value ??= TOOLTIP_CONSTANTS.defaults.OFFSET;\n if (this._offset !== value) {\n this._offset = value;\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.OFFSET, this._offset !== TOOLTIP_CONSTANTS.defaults.OFFSET, String(this._offset));\n }\n }\n\n public get flip(): OverlayFlipState {\n return this._flip;\n }\n public set flip(value: OverlayFlipState) {\n value ??= TOOLTIP_CONSTANTS.defaults.FLIP;\n if (this._flip !== value) {\n this._flip = value;\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.FLIP, this._flip !== TOOLTIP_CONSTANTS.defaults.FLIP, String(this._flip));\n }\n }\n\n public get boundary(): string | null {\n return this._boundary;\n }\n public set boundary(value: string | null) {\n if (this._boundary !== value) {\n this._boundary = value;\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.BOUNDARY, !!this._boundary, this._boundary as string);\n }\n }\n\n public get boundaryElement(): HTMLElement | null {\n return this._boundaryElement;\n }\n public set boundaryElement(element: HTMLElement | null) {\n if (this._boundaryElement !== element) {\n this._boundaryElement = element;\n this._adapter.toggleHostAttribute(TOOLTIP_CONSTANTS.attributes.BOUNDARY, !!this._boundaryElement, this._boundaryElement?.id);\n }\n }\n\n public get fallbackPlacements(): PositionPlacement[] | null {\n return this._fallbackPlacements;\n }\n public set fallbackPlacements(value: PositionPlacement[] | null) {\n if (this._fallbackPlacements !== value) {\n this._fallbackPlacements = value;\n }\n }\n\n public get triggerType(): TooltipTriggerType | TooltipTriggerType[] {\n return this._triggerTypes.length === 1 ? this._triggerTypes[0] : this._triggerTypes;\n }\n public set triggerType(value: TooltipTriggerType | TooltipTriggerType[]) {\n if (this._triggerTypes !== value) {\n if (this._adapter.isConnected) {\n this._detachAnchorListeners();\n }\n\n this._triggerTypes = Array.isArray(value) ? value : [value];\n this._triggerTypes = this._triggerTypes.filter(type => !!type);\n\n if (!this._triggerTypes.length) {\n this._triggerTypes = TOOLTIP_CONSTANTS.defaults.TRIGGER_TYPES;\n }\n\n if (this._adapter.isConnected) {\n this._attachAnchorListeners();\n }\n }\n }\n}\n", "import { CustomElement, coerceNumber, FoundationProperty, coerceBoolean, attachShadowTemplate } from '@tylertech/forge-core';\nimport { TooltipAdapter } from './tooltip-adapter';\nimport { TooltipFoundation } from './tooltip-foundation';\nimport { TooltipPlacement, TooltipTriggerType, TooltipType, TOOLTIP_CONSTANTS } from './tooltip-constants';\nimport { BaseComponent } from '../core/base/base-component';\nimport { OverlayComponent } from '../overlay/overlay';\nimport { coerceStringToArray } from '../core/utils/utils';\nimport { IWithDefaultAria, WithDefaultAria } from '../core/mixins/internals/with-default-aria';\nimport { IWithElementInternals, WithElementInternals } from '../core/mixins/internals/with-element-internals';\nimport { OverlayFlipState } from '../overlay/overlay-constants';\nimport { PositionPlacement } from '../core/utils/position-utils';\nimport { IDismissible, IDismissibleStackState, tryDismiss } from '../core/utils/dismissible-stack';\n\nconst template = '<template><div class=\\\"forge-tooltip\\\" part=\\\"surface\\\"><slot></slot><div class=\\\"arrow\\\" part=\\\"arrow\\\"></div></div></template>';\nconst styles = '@-webkit-keyframes slidein{from{opacity:0;-webkit-transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y));transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y))}to{opacity:1;-webkit-transform:translateX(0) translateY(0);transform:translateX(0) translateY(0)}}@keyframes slidein{from{opacity:0;-webkit-transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y));transform:translateX(var(--_tooltip-slidein-x)) translateY(var(--_tooltip-slidein-y))}to{opacity:1;-webkit-transform:translateX(0) translateY(0);transform:translateX(0) translateY(0)}}:host{display:contents;pointer-events:none}:host([hidden]){display:none}.forge-tooltip{--_tooltip-background:var(--forge-tooltip-background, var(--forge-theme-surface-inverse, #333333));--_tooltip-color:var(--forge-tooltip-color, var(--forge-theme-on-surface-inverse, #ffffff));--_tooltip-shape:var(--forge-tooltip-shape, var(--forge-shape-medium, 4px));--_tooltip-padding:var(--forge-tooltip-padding, var(--forge-spacing-xsmall, 8px));--_tooltip-padding-block:var(--forge-tooltip-padding-block, var(--_tooltip-padding));--_tooltip-padding-inline:var(--forge-tooltip-padding-inline, var(--_tooltip-padding));--_tooltip-width:var(--forge-tooltip-width, max-content);--_tooltip-max-width:var(--forge-tooltip-max-width, 320px);--_tooltip-elevation:var(--forge-tooltip-elevation, var(--forge-theme-surface-bright-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)));--_tooltip-content-align:var(--forge-tooltip-content-align, center);--_tooltip-border-width:var(--forge-tooltip-border-width, 0);--_tooltip-border-style:var(--forge-tooltip-border-style, solid);--_tooltip-border-color:var(--forge-tooltip-border-color, var(--forge-theme-outline, #e0e0e0));--_tooltip-animation-timing:var(--forge-tooltip-animation-timing, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_tooltip-animation-duration:var(--forge-tooltip-animation-duration, var(--forge-animation-duration-short3, 150ms));--_tooltip-animation-offset:var(--forge-tooltip-animation-offset, 24px);--_tooltip-arrow-size:var(--forge-tooltip-arrow-size, 8px);--_tooltip-arrow-height:var(--forge-tooltip-arrow-height, var(--_tooltip-arrow-size));--_tooltip-arrow-width:var(--forge-tooltip-arrow-width, var(--_tooltip-arrow-size));--_tooltip-arrow-shape:var(--forge-tooltip-arrow-shape, var(--forge-shape-small, 2px));--_tooltip-arrow-rotation:var(--forge-tooltip-arrow-rotation, 0deg);--_tooltip-arrow-top-rotation:var(--forge-tooltip-arrow-top-rotation, 315deg);--_tooltip-arrow-right-rotation:var(--forge-tooltip-arrow-right-rotation, 45deg);--_tooltip-arrow-bottom-rotation:var(--forge-tooltip-arrow-bottom-rotation, 135deg);--_tooltip-arrow-left-rotation:var(--forge-tooltip-arrow-left-rotation, 225deg)}.forge-tooltip{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, \\\"Roboto\\\", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body1-text-decoration,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);position:relative;background:var(--_tooltip-background);color:var(--_tooltip-color);border-radius:var(--_tooltip-shape);border-width:var(--_tooltip-border-width);border-style:var(--_tooltip-border-style);border-color:var(--_tooltip-border-color);padding-block:var(--_tooltip-padding-block);padding-inline:var(--_tooltip-padding-inline);-webkit-box-shadow:var(--_tooltip-elevation);box-shadow:var(--_tooltip-elevation);width:var(--_tooltip-width);max-width:var(--_tooltip-max-width);pointer-events:none;text-align:var(--_tooltip-content-align);line-height:normal;white-space:normal;-webkit-animation-duration:var(--_tooltip-animation-duration);animation-duration:var(--_tooltip-animation-duration);-webkit-animation-timing-function:var(--_tooltip-animation-timing);animation-timing-function:var(--_tooltip-animation-timing);-webkit-animation-name:slidein;animation-name:slidein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(:not([open])) .forge-tooltip{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}.arrow{position:absolute;contain:strict;background-color:inherit;height:var(--_tooltip-arrow-height);width:var(--_tooltip-arrow-width);-webkit-box-shadow:inherit;box-shadow:inherit;border:inherit;border-end-start-radius:var(--_tooltip-arrow-shape);rotate:var(--_tooltip-arrow-rotation);-webkit-clip-path:var(--_tooltip-arrow-clip-path);clip-path:var(--_tooltip-arrow-clip-path);--_tooltip-arrow-translate-x:0;--_tooltip-arrow-translate-y:0;--_tooltip-arrow-clip-path:polygon(0 0, 0 100%, 100% 100%)}.forge-tooltip{--_tooltip-slidein-x:0;--_tooltip-slidein-y:0}forge-overlay[open][position-placement^=top] .forge-tooltip{--_tooltip-slidein-y:var(--forge-tooltip-slidein-y, var(--_tooltip-animation-offset))}forge-overlay[open][position-placement^=top] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-top-rotation);-webkit-margin-after:var(--_tooltip-border-width);margin-block-end:var(--_tooltip-border-width)}forge-overlay[open][position-placement^=right] .forge-tooltip{--_tooltip-slidein-x:var(--forge-tooltip-slidein-x, calc(var(--_tooltip-animation-offset) * -1))}forge-overlay[open][position-placement^=right] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-right-rotation);-webkit-margin-start:var(--_tooltip-border-width);margin-inline-start:var(--_tooltip-border-width)}forge-overlay[open][position-placement^=bottom] .forge-tooltip{--_tooltip-slidein-y:var(--forge-tooltip-slidein-y, calc(var(--_tooltip-animation-offset) * -1))}forge-overlay[open][position-placement^=bottom] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-bottom-rotation);-webkit-margin-before:var(--_tooltip-border-width);margin-block-start:var(--_tooltip-border-width)}forge-overlay[open][position-placement^=left] .forge-tooltip{--_tooltip-slidein-x:var(--forge-tooltip-slidein-x, var(--_tooltip-animation-offset))}forge-overlay[open][position-placement^=left] .arrow{--_tooltip-arrow-rotation:var(--_tooltip-arrow-left-rotation);-webkit-margin-end:var(--_tooltip-border-width);margin-inline-end:var(--_tooltip-border-width)}';\n\nexport interface ITooltipComponent extends IWithDefaultAria, IWithElementInternals, IDismissible {\n open: boolean;\n type: TooltipType;\n anchor: string;\n anchorElement: HTMLElement | null;\n /** @deprecated use `anchor` instead */\n target: string;\n placement: `${TooltipPlacement}`;\n /** @deprecated use `placement` instead */\n position: `${TooltipPlacement}`;\n delay: number;\n offset: number;\n flip: OverlayFlipState;\n boundary: string | null;\n boundaryElement: HTMLElement | null;\n fallbackPlacements: PositionPlacement[] | null;\n triggerType: TooltipTriggerType | TooltipTriggerType[];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-tooltip': ITooltipComponent;\n }\n}\n\nconst BaseClass = WithDefaultAria(WithElementInternals(BaseComponent));\n\n/**\n * @tag forge-tooltip\n * \n * @summary Tooltips display information related to an element when the user hovers over an element.\n *\n * @property {boolean} open - Whether or not the tooltip is open.\n * @property {TooltipType} type - The type of tooltip. Valid values are `presentation` (default), `label`, and `description`.\n * @property {string} anchor - The id of the element that the tooltip is anchored to.\n * @property {TooltipPlacement} placement - The placement of the tooltip relative to the anchor element.\n * @property {number} delay - The delay in milliseconds before the tooltip is shown.\n * @property {number} offset - The offset in pixels between the tooltip and the anchor element.\n * @property {OverlayFlipState} - flip - How the tooltip should place itself if there is not enough space at the desired placement.\n * @property {string | null} boundary - The id of the element that the tooltip should be constrained to.\n * @property {HTMLElement | null} boundaryElement - The element that the tooltip should be constrained to.\n * @property {PositionPlacement[] | null} fallbackPlacements - The fallback placements of the tooltip relative to the anchor element.\n * @property {TooltipTriggerType | TooltipTriggerType[]} triggerType - The trigger type(s) that will open the tooltip. Valid values are `hover` (default), `longpress`, and `focus`.\n * \n * @attribute {boolean} open - Whether or not the tooltip is open.\n * @attribute {TooltipType} type - The type of tooltip. Valid values are `presentation` (default), `label`, and `description`.\n * @attribute {string} anchor - The id of the element that the tooltip is anchored to.\n * @attribute {TooltipPlacement} placement - The placement of the tooltip relative to the anchor element.\n * @attribute {number} delay - The delay in milliseconds before the tooltip is shown.\n * @attribute {number} offset - The offset in pixels between the tooltip and the anchor element.\n * @attribute {OverlayFlipState} flip - How the tooltip should place itself if there is not enough space at the desired placement.\n * @attribute {string | null} boundary - The id of the element that the tooltip should be constrained to.\n * @attribute {PositionPlacement[]} fallbackPlacements - The fallback placements of the tooltip relative to the anchor element.\n * \n * @cssproperty --forge-tooltip-background - The background color of the tooltip surface.\n * @cssproperty --forge-tooltip-color - The text color of the tooltip surface.\n * @cssproperty --forge-tooltip-shape - The shape of the tooltip surface.\n * @cssproperty --forge-tooltip-padding - The padding of the tooltip surface.\n * @cssproperty --forge-tooltip-padding-block - The block padding of the tooltip surface.\n * @cssproperty --forge-tooltip-padding-inline - The inline padding of the tooltip surface.\n * @cssproperty --forge-tooltip-max-width - The maximum width of the tooltip surface.\n * @cssproperty --forge-tooltip-elevation - The elevation of the tooltip surface.\n * @cssproperty --forge-tooltip-border-width - The border width of the tooltip surface.\n * @cssproperty --forge-tooltip-border-style - The border style of the tooltip surface.\n * @cssproperty --forge-tooltip-border-color - The border color of the tooltip surface.\n * @cssproperty --forge-tooltip-animation-timing - The animation timing function of the tooltip surface.\n * @cssproperty --forge-tooltip-animation-duration - The animation duration of the tooltip surface.\n * @cssproperty --forge-tooltip-animation-offset - The animation offset of the tooltip surface.\n * @cssproperty --forge-tooltip-arrow-size - The size of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-height - The height of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-width - The width of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-shape - The shape of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-clip-path - The clip path of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-rotation - The rotation of the tooltip arrow.\n * @cssproperty --forge-tooltip-arrow-top-rotation - The rotation of the tooltip arrow when the tooltip is placed on top.\n * @cssproperty --forge-tooltip-arrow-right-rotation - The rotation of the tooltip arrow when the tooltip is placed on the right.\n * @cssproperty --forge-tooltip-arrow-bottom-rotation - The rotation of the tooltip arrow when the tooltip is placed on the bottom.\n * @cssproperty --forge-tooltip-arrow-left-rotation- The rotation of the tooltip arrow when the tooltip is placed on the left.\n * \n * @slot - The content to display in the tooltip.\n * \n * @csspart surface - The tooltip surface.\n * @csspart arrow - The tooltip arrow.\n * @csspart overlay - The overlay surface.\n */\n@CustomElement({\n name: TOOLTIP_CONSTANTS.elementName,\n dependencies: [\n OverlayComponent\n ]\n})\nexport class TooltipComponent extends BaseClass implements ITooltipComponent {\n public static get observedAttributes(): string[] {\n return Object.values(TOOLTIP_CONSTANTS.observedAttributes);\n }\n\n private _foundation: TooltipFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new TooltipFoundation(new TooltipAdapter(this));\n }\n\n public [tryDismiss](state?: IDismissibleStackState<string> | undefined): boolean {\n return true;\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 TOOLTIP_CONSTANTS.observedAttributes.ID:\n this._foundation.syncTooltipAria();\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.TYPE:\n this.type = newValue?.trim() ? newValue as TooltipType : TOOLTIP_CONSTANTS.defaults.TYPE;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.TARGET:\n case TOOLTIP_CONSTANTS.observedAttributes.ANCHOR:\n this.anchor = newValue;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.DELAY:\n this.delay = coerceNumber(newValue);\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.POSITION:\n case TOOLTIP_CONSTANTS.observedAttributes.PLACEMENT:\n this.placement = newValue as TooltipPlacement;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.OFFSET:\n this.offset = coerceNumber(newValue);\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.FLIP:\n this.flip = newValue as OverlayFlipState;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.BOUNDARY:\n this.boundary = newValue;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.FALLBACK_PLACEMENTS:\n this.fallbackPlacements = newValue?.trim() ? coerceStringToArray<PositionPlacement>(newValue) : null;\n break;\n case TOOLTIP_CONSTANTS.observedAttributes.TRIGGER_TYPE:\n this.triggerType = newValue?.trim() ? coerceStringToArray<TooltipTriggerType>(newValue) : TOOLTIP_CONSTANTS.defaults.TRIGGER_TYPES;\n break;\n }\n }\n\n @FoundationProperty()\n public declare open: boolean;\n\n @FoundationProperty()\n public declare type: TooltipType;\n\n @FoundationProperty()\n public declare anchor: string;\n\n @FoundationProperty()\n public declare anchorElement: HTMLElement | null;\n\n /** @deprecated use `anchor` instead */\n @FoundationProperty({ name: 'anchor' })\n public declare target: string;\n\n @FoundationProperty()\n public declare placement: `${TooltipPlacement}`;\n\n /** @deprecated use `placement` instead */\n @FoundationProperty({ name: 'placement' })\n public declare position: `${TooltipPlacement}`;\n\n @FoundationProperty()\n public declare delay: number;\n\n @FoundationProperty()\n public declare offset: number;\n\n @FoundationProperty()\n public declare flip: OverlayFlipState;\n\n @FoundationProperty()\n public declare boundary: string | null;\n\n @FoundationProperty()\n public declare boundaryElement: HTMLElement | null;\n\n @FoundationProperty()\n public declare fallbackPlacements: PositionPlacement[] | null;\n\n @FoundationProperty()\n public declare triggerType: TooltipTriggerType | TooltipTriggerType[];\n}\n"],
|
|
5
|
+
"mappings": "4hBAuBO,IAAMA,EAAN,cAA6BC,CAA0D,CAM5F,YAAYC,EAA8B,CACxC,MAAMA,CAAS,EAJjB,KAAQ,eAAqC,KAC7C,KAAQ,gBAA4C,KAIlD,KAAK,gBAAkBC,EAAiB,KAAK,WAAYC,EAAkB,UAAU,OAAO,EAC5F,KAAK,cAAgBD,EAAiB,KAAK,WAAYC,EAAkB,UAAU,KAAK,CAC1F,CAEA,IAAW,eAAoC,CAC7C,OAAO,KAAK,cACd,CAEO,UAAiB,CACtB,IAAMC,EAAO,KAAK,WAAW,OAAS,cAAgB,UAAY,KAIlE,GAHA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mB,GApETd,EAqEI,oBAGAa,EAAA,CADdC,EAAmB,GAvETd,EAwEI,sBAGAa,EAAA,CADdC,EAAmB,GA1ETd,EA2EI,6BAIAa,EAAA,CADdC,EAAmB,CAAE,KAAM,QAAS,CAAC,GA9E3Bd,EA+EI,sBAGAa,EAAA,CADdC,EAAmB,GAjFTd,EAkFI,yBAIAa,EAAA,CADdC,EAAmB,CAAE,KAAM,WAAY,CAAC,GArF9Bd,EAsFI,wBAGAa,EAAA,CADdC,EAAmB,GAxFTd,EAyFI,qBAGAa,EAAA,CADdC,EAAmB,GA3FTd,EA4FI,sBAGAa,EAAA,CADdC,EAAmB,GA9FTd,EA+FI,oBAGAa,EAAA,CADdC,EAAmB,GAjGTd,EAkGI,wBAGAa,EAAA,CADdC,EAAmB,GApGTd,EAqGI,+BAGAa,EAAA,CADdC,EAAmB,GAvGTd,EAwGI,kCAGAa,EAAA,CADdC,EAAmB,GA1GTd,EA2GI,2BA3GJA,EAANa,EAAA,CANNE,EAAc,CACb,KAAMX,EAAkB,YACxB,aAAc,CACZY,CACF,CACF,CAAC,GACYhB",
|
|
6
|
+
"names": ["TooltipAdapter", "BaseAdapter", "component", "getShadowElement", "TOOLTIP_CONSTANTS", "role", "setDefaultAria", "randomChars", "_a", "_b", "_c", "_d", "element", "id", "type", "listener", "opts", "OVERLAY_CONSTANTS", "boundaryEl", "locateElementById", "rootNode", "targetEl", "BaseClass", "WithLongpressListener", "TooltipFoundation", "_adapter", "TOOLTIP_CONSTANTS", "triggerTypes", "canUserHoverElements", "triggerInitializers", "triggerType", "triggerRemovers", "DismissibleStack", "_evt", "evt", "value", "element", "_a", "type", "template", "styles", "BaseClass", "WithDefaultAria", "WithElementInternals", "BaseComponent", "TooltipComponent", "attachShadowTemplate", "TooltipFoundation", "TooltipAdapter", "TOOLTIP_CONSTANTS", "tryDismiss", "state", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumber", "coerceStringToArray", "__decorateClass", "FoundationProperty", "CustomElement", "OverlayComponent"]
|
|
7
7
|
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{b as H}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{b as H}from"./chunk.PKCMTSWR.js";import{a as v}from"./chunk.NVUMRW44.js";import{a as x}from"./chunk.OLFOVKQG.js";import{a as S,b as C}from"./chunk.5OT53ZJM.js";import{a as I,e as V,f as w,k as A}from"./chunk.LNTTU2GL.js";import{f as y}from"./chunk.L4QSPQDE.js";import{b as E,l as g}from"./chunk.J2M2MXP2.js";import{d as l}from"./chunk.M3QDAYD2.js";var D=`${C}view-switcher`,u={ROOT:"forge-view-switcher",VIEW_HIDDEN:"forge-view-switcher__view--hidden",VIEW_SWITCHER_SLIDE:"forge-view-switcher--slide",VIEW_SWITCHER_FADE:"forge-view-switcher--fade"},O={ROOT:`.${u.ROOT}`,DEFAULT_SLOT:"slot:not([name])",VIEW_HIDDEN:`.${u.VIEW_HIDDEN}`},W={INDEX:"index",ANIMATION_TYPE:"animation-type"},F={DEFAULT_TRANSITION_DURATION:500},s={elementName:D,attributes:W,classes:u,selectors:O,numbers:F},_=(e=>(e.Left="left",e.Right="right",e))(_||{}),b=(t=>(t.None="none",t.Slide="slide",t.Fade="fade",t))(b||{});var c=class extends x{constructor(e){super(e);this._rootElement=w(e,s.selectors.ROOT),this._slotElement=w(e,s.selectors.DEFAULT_SLOT)}getViewCount(){return this._getViews().length}startViewObserver(e){this._viewObserver=new MutationObserver(e),this._viewObserver.observe(this._component,{childList:!0})}stopViewObserver(){this._viewObserver&&this._viewObserver.disconnect()}initializeSlideViews(e){let t=this._getViews();t.forEach((i,o)=>{if(i.style.removeProperty("opacity"),i.style.removeProperty("display"),o===e){t[e].classList.remove(s.classes.VIEW_HIDDEN),i.style.removeProperty("visibility");return}i.style.transition="none",i.classList.add(s.classes.VIEW_HIDDEN),i.style.visibility="hidden",o>e?i.style.transform="translate3d(100%, 0, 0)":i.style.transform="translate3d(-100%, 0, 0)"}),window.requestAnimationFrame(()=>{t=this._getViews(),t.forEach((i,o)=>{o!==e&&i.style.removeProperty("transition")})})}initializeFadeViews(e){let t=this._getViews();t.forEach((i,o)=>{if(i.style.removeProperty("transform"),i.style.removeProperty("display"),o===e){i.classList.remove(s.classes.VIEW_HIDDEN),i.style.removeProperty("visibility");return}i.classList.add(s.classes.VIEW_HIDDEN),i.style.visibility="hidden"}),t[e]&&(t[e].style.opacity="1")}setActiveView(e){let t=this._getViews();t.forEach((i,o)=>{o!==e&&(i.classList.add(s.classes.VIEW_HIDDEN),i.style.display="none")}),t[e]&&(t[e].classList.remove(s.classes.VIEW_HIDDEN),t[e].style.removeProperty("display"))}hideInactiveViews(e){this._getViews().forEach((i,o)=>{if(i.style.removeProperty("opacity"),i.style.removeProperty("transform"),i.style.removeProperty("visibility"),o===e){i.classList.remove(s.classes.VIEW_HIDDEN);return}i.classList.add(s.classes.VIEW_HIDDEN),i.style.display="none"})}async transitionToView(e,t,i,o){let m=this._getViews(),r=m[e],d=m[t];return new Promise(N=>{d.style.removeProperty("visibility"),window.requestAnimationFrame(()=>{let p;switch(i){case"slide":this._slideToView(r,d,o),p="transform";break;case"fade":this._fadeToView(r,d),p="opacity";break;default:return}this._animateHeight(r,d),r?r.addEventListener("transitionend",T):d.classList.remove(s.classes.VIEW_HIDDEN);function T(L){L.propertyName===p&&(r.removeEventListener("transitionend",T),d.classList.remove(s.classes.VIEW_HIDDEN),N())}})})}_slideToView(e,t,i){i==="left"?(e&&(e.style.transform="translate3d(-100%, 0, 0)"),t.style.transform="translate3d(0, 0, 0)"):(e&&(e.style.transform="translate3d(100%, 0, 0)"),t.style.transform="translate3d(0, 0, 0)")}_fadeToView(e,t){e&&(e.style.opacity="0"),t.style.opacity="1"}_animateHeight(e,t){let i=e?this._getViewHeight(e):0,o=this._getViewHeight(t);i!==o&&(this._rootElement.addEventListener("transitionend",this._onRootTransitionEnd.bind(this)),this._setHeight(i),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._setHeight(o)})}))}_onRootTransitionEnd(e){e.propertyName==="height"&&(this._rootElement.removeEventListener("transitionend",this._onRootTransitionEnd),this._rootElement.style.removeProperty("height"))}setAnimationType(e){switch(y([s.classes.VIEW_SWITCHER_SLIDE,s.classes.VIEW_SWITCHER_FADE],this._component),e){case"slide":this._component.classList.add(s.classes.VIEW_SWITCHER_SLIDE);break;case"fade":this._component.classList.add(s.classes.VIEW_SWITCHER_FADE);break}}_getViews(){return this._slotElement.assignedNodes().filter(e=>e.nodeType===1)}_setHeight(e){this._rootElement.style.height=`${e}px`}_getViewHeight(e){let t=0,i=e.children.length?Array.from(e.children):[e];for(let o of i){let m=window.getComputedStyle(o),r=parseFloat(m.marginTop)+parseFloat(m.marginBottom);t+=Math.ceil(o.offsetHeight+r)}return t}};var h=class{constructor(n){this._adapter=n;this._viewCount=0;this._viewIndex=0;this._animationType="none";this._viewsChangedListener=()=>this._onViewsChanged()}initialize(){this._viewCount=this._adapter.getViewCount(),this._adapter.startViewObserver(this._viewsChangedListener),this._adapter.setAnimationType(this._animationType),this._viewCount&&this._initializeAnimationType()}disconnect(){this._adapter.stopViewObserver()}_initializeAnimationType(){switch(this._animationType){case"slide":this._adapter.initializeSlideViews(this._viewIndex);break;case"fade":this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.hideInactiveViews(this._viewIndex);break}}_onViewsChanged(){if(this._viewCount=this._adapter.getViewCount(),this._viewCount===0&&(this._viewIndex=0),this._viewCount&&this._initializeAnimationType(),this._viewCount>0&&this._viewIndex>=this._viewCount){let n=this._viewIndex;this._viewIndex=this._viewCount>0?this._viewCount-1:0,this._goToView(n,this._viewCount)}}async _goToView(n,e){if(this._viewCount=E(e)?e:this._adapter.getViewCount(),!(!(this._viewIndex>=0&&this._viewIndex<=this._viewCount-1)||n===this._clampedViewIndex(this._viewIndex,this._viewCount)))switch(this._animationType){case"slide":let i=this._viewIndex>n?"left":"right";await this._adapter.transitionToView(n,this._viewIndex,"slide",i),this._adapter.initializeSlideViews(this._viewIndex);break;case"fade":await this._adapter.transitionToView(n,this._viewIndex,"fade"),this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.setActiveView(this._viewIndex);break}}_clampedViewIndex(n,e){return n<0?n=0:n>e-1&&(n=e>0?e-1:0),n}next(){this.index++}previous(){this.index--}goToStart(){this.index=0}goToEnd(){this.index=this._viewCount-1}get index(){return this._viewIndex}set index(n){if(this._viewIndex!==n){let e=this._viewIndex;this._viewIndex=n,this._goToView(e),this._adapter.setHostAttribute(s.attributes.INDEX,this._viewIndex.toString())}}get animationType(){return this._animationType}set animationType(n){this._animationType!==n&&(this._animationType=n,this._initializeAnimationType(),this._adapter.setAnimationType(this._animationType),this._adapter.setHostAttribute(s.attributes.ANIMATION_TYPE,this._animationType))}};var M='<template><div class="forge-view-switcher" part="root"><slot></slot></div></template>',P=".forge-view-switcher{height:var(--forge-view-switcher-height,auto);width:var(--forge-view-switcher-width,auto);position:relative;overflow:hidden;-webkit-transition:height var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:height var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1)}.forge-view-switcher ::slotted(.forge-view-switcher__view--hidden){position:absolute;top:0;right:0;bottom:0;left:0}:host{height:var(--forge-view-switcher-height,auto);width:var(--forge-view-switcher-width,auto);display:block}:host([hidden]){display:none}:host(.forge-view-switcher--slide) ::slotted(forge-view){-webkit-transition:-webkit-transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:-webkit-transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1),-webkit-transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);will-change:transform}:host(.forge-view-switcher--fade) ::slotted(forge-view){-webkit-transition:opacity var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:opacity var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);will-change:opacity}:host(.forge-view-switcher--fade) ::slotted(.forge-view-switcher__view--hidden){opacity:0}",a=class extends A{constructor(){super();V(this,M,P),this._foundation=new h(new c(this))}static get observedAttributes(){return[s.attributes.INDEX,s.attributes.ANIMATION_TYPE]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,t,i){switch(e){case s.attributes.INDEX:this.index=g(i);break;case s.attributes.ANIMATION_TYPE:this.animationType=i;break}}next(){this._foundation.next()}previous(){this._foundation.previous()}goToStart(){this._foundation.goToStart()}goToEnd(){this._foundation.goToEnd()}};l([v()],a.prototype,"index",2),l([v()],a.prototype,"animationType",2),a=l([S({name:s.elementName,dependencies:[H]})],a);function le(){I(a)}export{s as a,_ as b,b as c,c as d,h as e,a as f,le as g};
|
|
7
|
+
//# sourceMappingURL=chunk.VCASLYVR.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/view-switcher/view-switcher-constants.ts", "../../src/view-switcher/view-switcher-adapter.ts", "../../src/view-switcher/view-switcher-foundation.ts", "../../src/view-switcher/view-switcher.ts", "../../src/view-switcher/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}view-switcher`;\n\nconst classes = {\n ROOT: 'forge-view-switcher',\n VIEW_HIDDEN: 'forge-view-switcher__view--hidden',\n VIEW_SWITCHER_SLIDE: 'forge-view-switcher--slide',\n VIEW_SWITCHER_FADE: 'forge-view-switcher--fade'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n DEFAULT_SLOT: 'slot:not([name])',\n VIEW_HIDDEN: `.${classes.VIEW_HIDDEN}`\n};\n\nconst attributes = {\n INDEX: 'index',\n ANIMATION_TYPE: 'animation-type'\n};\n\nconst numbers = {\n DEFAULT_TRANSITION_DURATION: 500\n};\n\nexport const VIEW_SWITCHER_CONSTANTS = {\n elementName,\n attributes,\n classes,\n selectors,\n numbers\n};\n\nexport interface IViewSwitcherView {\n element: HTMLElement;\n}\n\nexport enum ViewAnimationDirection {\n Left = 'left',\n Right = 'right'\n}\n\nexport enum ViewSwitcherAnimationType {\n None = 'none',\n Slide = 'slide',\n Fade = 'fade'\n}\n", "import { getShadowElement, removeClass } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IViewSwitcherComponent } from './view-switcher';\nimport { ViewAnimationDirection, ViewSwitcherAnimationType, VIEW_SWITCHER_CONSTANTS } from './view-switcher-constants';\n\nexport interface IViewSwitcherAdapter extends IBaseAdapter {\n getViewCount(): number;\n startViewObserver(callback: MutationCallback): void;\n stopViewObserver(): void;\n initializeSlideViews(index: number): void;\n initializeFadeViews(index: number): void;\n setActiveView(index: number): void;\n hideInactiveViews(index: number): void;\n transitionToView(fromIndex: number, toIndex: number, animationType: ViewSwitcherAnimationType, direction?: ViewAnimationDirection): Promise<void>;\n setAnimationType(type: ViewSwitcherAnimationType): void;\n}\n\nexport class ViewSwitcherAdapter extends BaseAdapter<IViewSwitcherComponent> implements IViewSwitcherAdapter {\n private _rootElement: HTMLElement;\n private _slotElement: HTMLSlotElement;\n private _viewObserver: MutationObserver;\n\n constructor(component: IViewSwitcherComponent) {\n super(component);\n this._rootElement = getShadowElement(component, VIEW_SWITCHER_CONSTANTS.selectors.ROOT);\n this._slotElement = getShadowElement(component, VIEW_SWITCHER_CONSTANTS.selectors.DEFAULT_SLOT) as HTMLSlotElement;\n }\n\n public getViewCount(): number {\n return this._getViews().length;\n }\n\n public startViewObserver(callback: MutationCallback): void {\n this._viewObserver = new MutationObserver(callback);\n this._viewObserver.observe(this._component, { childList: true });\n }\n\n public stopViewObserver(): void {\n if (this._viewObserver) {\n this._viewObserver.disconnect();\n }\n }\n\n /**\n * Initializes the views with styles for a slide transition.\n * @param index The active view index.\n */\n public initializeSlideViews(index: number): void {\n let views = this._getViews();\n views.forEach((view, i) => {\n // Make sure that we remove properties if they were set from another animation type\n view.style.removeProperty('opacity');\n view.style.removeProperty('display');\n\n // Ensure that the currently active view is visible\n if (i === index) {\n views[index].classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.removeProperty('visibility');\n return;\n }\n\n // We disable the transition when resetting the hidden views so that the animation doesn't occur\n view.style.transition = 'none';\n\n // Ensure the view is hidden\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.visibility = 'hidden';\n\n // Reset the position of the view to the left or right of the switcher\n if (i > index) {\n view.style.transform = 'translate3d(100%, 0, 0)';\n } else {\n view.style.transform = 'translate3d(-100%, 0, 0)';\n }\n });\n\n // Wait a frame for the views to reposition, then re-enable the transition for all hidden views\n window.requestAnimationFrame(() => {\n views = this._getViews();\n views.forEach((v, i) => {\n if (i === index) {\n return;\n }\n v.style.removeProperty('transition');\n });\n });\n }\n\n /**\n * Initializes the view styles when using a fade transition.\n * @param index The active view index.\n */\n public initializeFadeViews(index: number): void {\n const views = this._getViews();\n views.forEach((view, i) => {\n // Make sure that we remove properties if they were set from another animation type\n view.style.removeProperty('transform');\n view.style.removeProperty('display');\n\n // Ensure that the visible view doesn't have the hidden class\n if (i === index) {\n view.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.removeProperty('visibility');\n return;\n }\n\n // Ensure the hidden views have the proper class\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.visibility = 'hidden';\n });\n\n // Ensure that the visible view has the proper opacity\n if (views[index]) {\n views[index].style.opacity = '1';\n }\n }\n\n /**\n * This is used when no animation type is set to allow for snapping the view into place.\n * @param index The currently active view index.\n */\n public setActiveView(index: number): void {\n const views = this._getViews();\n\n views.forEach((view, i) => {\n if (i === index) {\n return;\n }\n // Hide all non-visible views\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.display = 'none';\n });\n\n // Ensure that the active view is visible\n if (views[index]) {\n views[index].classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n views[index].style.removeProperty('display');\n }\n }\n\n /**\n * This is used when no animation type is specific to hide all non-visible views.\n * @param index The currently active view index.\n */\n public hideInactiveViews(index: number): void {\n const views = this._getViews();\n views.forEach((view, i) => {\n // Make sure that we remove properties if they were set from another animation type\n view.style.removeProperty('opacity');\n view.style.removeProperty('transform');\n view.style.removeProperty('visibility');\n\n // Ensure the active view is visible\n if (i === index) {\n view.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n return;\n }\n\n // Ensure all non-active views are hidden\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.display = 'none';\n });\n }\n\n /**\n * Initiates a slide transition from one view to another.\n * @param fromIndex The view index to transition from.\n * @param toIndex The view index to transition to.\n * @param direction The transition animation direction.\n */\n public async transitionToView(fromIndex: number, toIndex: number, animationType: ViewSwitcherAnimationType, direction?: ViewAnimationDirection): Promise<void> {\n const views = this._getViews();\n const fromView = views[fromIndex];\n const toView = views[toIndex];\n\n return new Promise<void>(resolve => {\n // Show the view so we can calculate the height and start the transition in the next frame\n toView.style.removeProperty('visibility');\n\n window.requestAnimationFrame(() => {\n let transitionProp: string;\n switch (animationType) {\n case ViewSwitcherAnimationType.Slide:\n this._slideToView(fromView, toView, direction as ViewAnimationDirection);\n transitionProp = 'transform';\n break;\n case ViewSwitcherAnimationType.Fade:\n this._fadeToView(fromView, toView);\n transitionProp = 'opacity';\n break;\n default:\n return;\n }\n\n // Start the height transition (this will not animate if the height doesn't change)\n this._animateHeight(fromView, toView);\n\n if (fromView) {\n // Wait for the transform transition to complete before resolving and completing transition\n fromView.addEventListener('transitionend', transitionEndHandler);\n } else {\n toView.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n }\n\n function transitionEndHandler(evt: TransitionEvent): void {\n if (evt.propertyName === transitionProp) {\n fromView.removeEventListener('transitionend', transitionEndHandler);\n toView.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n resolve();\n }\n }\n });\n });\n }\n\n /**\n * Initiates a slide transition from one view to another.\n * @param fromIndex The view index to transition from.\n * @param toIndex The view index to transition to.\n * @param direction The transition animation direction.\n */\n private _slideToView(fromView: HTMLElement | null, toView: HTMLElement, direction: ViewAnimationDirection): void {\n // Use a CSS transform on the view to slide it in the requested direction\n if (direction === ViewAnimationDirection.Left) {\n if (fromView) {\n fromView.style.transform = 'translate3d(-100%, 0, 0)';\n }\n toView.style.transform = 'translate3d(0, 0, 0)';\n } else {\n if (fromView) {\n fromView.style.transform = 'translate3d(100%, 0, 0)';\n }\n toView.style.transform = 'translate3d(0, 0, 0)';\n }\n }\n\n private _fadeToView(fromView: HTMLElement | null, toView: HTMLElement): void {\n if (fromView) {\n fromView.style.opacity = '0';\n }\n toView.style.opacity = '1';\n }\n\n /**\n * Attempts to animate the height of our container element to match that of the next view.\n * @param fromIndex The view index we are transitioning from.\n * @param toIndex The view index we are transitioning to.\n */\n private _animateHeight(fromView: HTMLElement | null, toView: HTMLElement): void {\n const fromViewHeight = fromView ? this._getViewHeight(fromView) : 0;\n const toViewHeight = this._getViewHeight(toView);\n\n // We only animate the height if it is different...\n if (fromViewHeight !== toViewHeight) {\n this._rootElement.addEventListener('transitionend', this._onRootTransitionEnd.bind(this));\n\n // Set to the height of the current view so we can animate the height from something static\n this._setHeight(fromViewHeight);\n\n // We need to wait two frames before animating to the new height due to event loop\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n // Start the transition to the new view height\n this._setHeight(toViewHeight);\n });\n });\n }\n }\n\n /**\n * Handles the root container transitionend event.\n * @param evt The transition event.\n */\n private _onRootTransitionEnd(evt: TransitionEvent): void {\n if (evt.propertyName === 'height') {\n this._rootElement.removeEventListener('transitionend', this._onRootTransitionEnd);\n // Removes the static height from the root element so that it can grow with content\n this._rootElement.style.removeProperty('height');\n }\n }\n\n /**\n * Resets the animation type on the root element.\n * @param type The animation type.\n */\n public setAnimationType(type: ViewSwitcherAnimationType): void {\n removeClass([VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_SLIDE, VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_FADE], this._component);\n\n switch (type) {\n case ViewSwitcherAnimationType.Slide:\n this._component.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_SLIDE);\n break;\n case ViewSwitcherAnimationType.Fade:\n this._component.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_FADE);\n break;\n }\n }\n\n /**\n * Get all view elements.\n */\n private _getViews(): HTMLElement[] {\n return this._slotElement.assignedNodes().filter(n => n.nodeType === 1) as HTMLElement[];\n }\n\n /**\n * Sets the height on the root container element.\n * @param viewHeight The new height.\n */\n private _setHeight(viewHeight: number): void {\n this._rootElement.style.height = `${viewHeight}px`;\n }\n\n /**\n * Calculate the absolute height of a view.\n * @param view The view to calculate height from.\n */\n private _getViewHeight(view: HTMLElement): number {\n let height = 0;\n const elements = view.children.length ? (Array.from(view.children) as HTMLElement[]) : [view];\n\n for (const element of elements) {\n const styles = window.getComputedStyle(element);\n const margin = parseFloat(styles.marginTop as string) + parseFloat(styles.marginBottom as string);\n height += Math.ceil(element.offsetHeight + margin);\n }\n\n return height;\n }\n}\n", "import { ICustomElementFoundation, Platform, isDefined } from '@tylertech/forge-core';\n\nimport { IViewSwitcherAdapter } from './view-switcher-adapter';\nimport { VIEW_SWITCHER_CONSTANTS, ViewAnimationDirection, ViewSwitcherAnimationType } from './view-switcher-constants';\n\nexport interface IViewSwitcherFoundation extends ICustomElementFoundation {\n index: number;\n animationType: ViewSwitcherAnimationType;\n next(): void;\n previous(): void;\n goToStart(): void;\n goToEnd(): void;\n}\n\nexport class ViewSwitcherFoundation implements IViewSwitcherFoundation {\n private _viewCount = 0;\n private _viewIndex = 0;\n private _animationType = ViewSwitcherAnimationType.None;\n private _viewsChangedListener: () => void;\n\n constructor(private _adapter: IViewSwitcherAdapter) {\n this._viewsChangedListener = () => this._onViewsChanged();\n }\n\n public initialize(): void {\n this._viewCount = this._adapter.getViewCount();\n this._adapter.startViewObserver(this._viewsChangedListener);\n this._adapter.setAnimationType(this._animationType);\n\n if (this._viewCount) {\n this._initializeAnimationType();\n }\n }\n\n public disconnect(): void {\n this._adapter.stopViewObserver();\n }\n\n private _initializeAnimationType(): void {\n switch (this._animationType) {\n case ViewSwitcherAnimationType.Slide:\n this._adapter.initializeSlideViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.Fade:\n this._adapter.initializeFadeViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.None:\n default:\n this._adapter.hideInactiveViews(this._viewIndex);\n break;\n }\n }\n\n private _onViewsChanged(): void {\n this._viewCount = this._adapter.getViewCount();\n\n if (this._viewCount === 0) {\n this._viewIndex = 0;\n }\n\n if (this._viewCount) {\n this._initializeAnimationType();\n }\n\n // If the view index is higher than the number of views then we need to reset it\n if (this._viewCount > 0 && this._viewIndex >= this._viewCount) {\n const currIndex = this._viewIndex;\n this._viewIndex = this._viewCount > 0 ? this._viewCount - 1 : 0;\n this._goToView(currIndex, this._viewCount);\n }\n }\n\n private async _goToView(fromIndex: number, viewCount?: number): Promise<void> {\n this._viewCount = !isDefined(viewCount) ? this._adapter.getViewCount() : viewCount as number;\n \n // If the index that we're trying to transition to is out of range, or is the same index, then we ignore the transition\n const isValidIndex = this._viewIndex >= 0 && this._viewIndex <= this._viewCount - 1;\n if (!isValidIndex || fromIndex === this._clampedViewIndex(this._viewIndex, this._viewCount)) {\n return;\n }\n\n switch (this._animationType) {\n case ViewSwitcherAnimationType.Slide:\n const animationDirection = this._viewIndex > fromIndex ? ViewAnimationDirection.Left : ViewAnimationDirection.Right;\n await this._adapter.transitionToView(fromIndex, this._viewIndex, ViewSwitcherAnimationType.Slide, animationDirection);\n this._adapter.initializeSlideViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.Fade:\n await this._adapter.transitionToView(fromIndex, this._viewIndex, ViewSwitcherAnimationType.Fade);\n this._adapter.initializeFadeViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.None:\n default:\n this._adapter.setActiveView(this._viewIndex);\n break;\n }\n }\n\n private _clampedViewIndex(viewIndex: number, viewCount: number): number {\n if (viewIndex < 0) {\n viewIndex = 0;\n } else if (viewIndex > viewCount - 1) {\n viewIndex = viewCount > 0 ? viewCount - 1 : 0;\n }\n return viewIndex;\n }\n\n public next(): void {\n this.index++;\n }\n\n public previous(): void {\n this.index--;\n }\n\n public goToStart(): void {\n this.index = 0;\n }\n\n public goToEnd(): void {\n this.index = this._viewCount - 1;\n }\n\n public get index(): number {\n return this._viewIndex;\n }\n public set index(value: number) {\n if (this._viewIndex !== value) {\n const currIndex = this._viewIndex;\n this._viewIndex = value;\n this._goToView(currIndex);\n this._adapter.setHostAttribute(VIEW_SWITCHER_CONSTANTS.attributes.INDEX, this._viewIndex.toString());\n }\n }\n\n public get animationType(): ViewSwitcherAnimationType {\n return this._animationType;\n }\n public set animationType(value: ViewSwitcherAnimationType) {\n if (this._animationType !== value) {\n this._animationType = value;\n this._initializeAnimationType();\n this._adapter.setAnimationType(this._animationType);\n this._adapter.setHostAttribute(VIEW_SWITCHER_CONSTANTS.attributes.ANIMATION_TYPE, this._animationType);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, coerceNumber, FoundationProperty, upgradeProperty } from '@tylertech/forge-core';\nimport { ViewSwitcherAdapter } from './view-switcher-adapter';\nimport { ViewSwitcherFoundation } from './view-switcher-foundation';\nimport { VIEW_SWITCHER_CONSTANTS, ViewSwitcherAnimationType } from './view-switcher-constants';\nimport { ViewComponent } from './view/view';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-view-switcher\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = '.forge-view-switcher{height:auto;height:var(--forge-view-switcher-height,auto);width:auto;width:var(--forge-view-switcher-width,auto);position:relative;overflow:hidden;-webkit-transition:height var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:height var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1)}.forge-view-switcher ::slotted(.forge-view-switcher__view--hidden){position:absolute;top:0;right:0;bottom:0;left:0}:host{height:auto;height:var(--forge-view-switcher-height,auto);width:auto;width:var(--forge-view-switcher-width,auto);display:block}:host([hidden]){display:none}:host(.forge-view-switcher--slide) ::slotted(forge-view){-webkit-transition:-webkit-transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:-webkit-transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1),-webkit-transform var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);will-change:transform}:host(.forge-view-switcher--fade) ::slotted(forge-view){-webkit-transition:opacity var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);transition:opacity var(--forge-view-switcher-animation-duration, 500ms) cubic-bezier(.35, 0, .25, 1);will-change:opacity}:host(.forge-view-switcher--fade) ::slotted(.forge-view-switcher__view--hidden){opacity:0}';\n\nexport interface IViewSwitcherComponent extends IBaseComponent {\n index: number;\n animationType: `${ViewSwitcherAnimationType}`;\n next(): void;\n previous(): void;\n goToStart(): void;\n goToEnd(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-view-switcher': IViewSwitcherComponent;\n }\n}\n\n/**\n * The web component class behind the `<forge-view-switcher>` custom element.\n * \n * @tag forge-view-switcher\n */\n@CustomElement({\n name: VIEW_SWITCHER_CONSTANTS.elementName,\n dependencies: [ViewComponent]\n})\nexport class ViewSwitcherComponent extends BaseComponent implements IViewSwitcherComponent {\n public static get observedAttributes(): string[] {\n return [\n VIEW_SWITCHER_CONSTANTS.attributes.INDEX,\n VIEW_SWITCHER_CONSTANTS.attributes.ANIMATION_TYPE\n ];\n }\n\n private _foundation: ViewSwitcherFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new ViewSwitcherFoundation(new ViewSwitcherAdapter(this));\n }\n\n public connectedCallback(): void {\n // upgradeProperty(this, 'index');\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case VIEW_SWITCHER_CONSTANTS.attributes.INDEX:\n this.index = coerceNumber(newValue);\n break;\n case VIEW_SWITCHER_CONSTANTS.attributes.ANIMATION_TYPE:\n this.animationType = newValue as ViewSwitcherAnimationType;\n break;\n }\n }\n\n /** Gets/sets the currently visible view index. */\n @FoundationProperty()\n public declare index: number;\n \n /** Gets/sets the animation type. */\n @FoundationProperty()\n public declare animationType: `${ViewSwitcherAnimationType}`;\n\n /** Transitions to the next view. */\n public next(): void {\n this._foundation.next();\n }\n\n /** Transitions to the previous view. */\n public previous(): void {\n this._foundation.previous();\n }\n\n /** Transitions to the first view. */\n public goToStart(): void {\n this._foundation.goToStart();\n }\n\n /** Transitions to the last view. */\n public goToEnd(): void {\n this._foundation.goToEnd();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { ViewSwitcherComponent } from './view-switcher';\n\nexport * from './view-switcher-adapter';\nexport * from './view-switcher-constants';\nexport * from './view-switcher-foundation';\nexport * from './view-switcher';\nexport * from './view';\n\nexport function defineViewSwitcherComponent(): void {\n defineCustomElement(ViewSwitcherComponent);\n}\n"],
|
|
5
|
-
"mappings": "mWAEA,IAAMA,EAA2C,GAAGC,iBAE9CC,EAAU,CACd,KAAM,sBACN,YAAa,oCACb,oBAAqB,6BACrB,mBAAoB,2BACtB,EAEMC,EAAY,CAChB,KAAM,IAAID,EAAQ,OAClB,aAAc,mBACd,YAAa,IAAIA,EAAQ,aAC3B,EAEME,EAAa,CACjB,MAAO,QACP,eAAgB,gBAClB,EAEMC,EAAU,CACd,4BAA6B,GAC/B,EAEaC,EAA0B,CACrC,YAAAN,EACA,WAAAI,EACA,QAAAF,EACA,UAAAC,EACA,QAAAE,CACF,EAMYE,OACVA,EAAA,KAAO,OACPA,EAAA,MAAQ,QAFEA,OAAA,IAKAC,OACVA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,KAAO,OAHGA,OAAA,IC1BL,IAAMC,EAAN,cAAkCC,CAAoE,CAK3G,YAAYC,EAAmC,CAC7C,MAAMA,CAAS,EACf,KAAK,aAAeC,EAAiBD,EAAWE,EAAwB,UAAU,IAAI,EACtF,KAAK,aAAeD,EAAiBD,EAAWE,EAAwB,UAAU,YAAY,CAChG,CAEO,cAAuB,CAC5B,OAAO,KAAK,UAAU,EAAE,MAC1B,CAEO,kBAAkBC,EAAkC,CACzD,KAAK,cAAgB,IAAI,iBAAiBA,CAAQ,EAClD,KAAK,cAAc,QAAQ,KAAK,WAAY,CAAE,UAAW,EAAK,CAAC,CACjE,CAEO,kBAAyB,CAC1B,KAAK,eACP,KAAK,cAAc,WAAW,CAElC,CAMO,qBAAqBC,EAAqB,CAC/C,IAAIC,EAAQ,KAAK,UAAU,EAC3BA,EAAM,QAAQ,CAACC,EAAMC,IAAM,CAMzB,GAJAD,EAAK,MAAM,eAAe,SAAS,EACnCA,EAAK,MAAM,eAAe,SAAS,EAG/BC,IAAMH,EAAO,CACfC,EAAMD,CAAK,EAAE,U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iBAAiBA,EAAW,KAAK,mBAA6CG,CAAkB,EACpH,KAAK,SAAS,qBAAqB,KAAK,UAAU,EAClD,MACF,WACE,MAAM,KAAK,SAAS,iBAAiBH,EAAW,KAAK,iBAA0C,EAC/F,KAAK,SAAS,oBAAoB,KAAK,UAAU,EACjD,MACF,WACA,QACE,KAAK,SAAS,cAAc,KAAK,UAAU,EAC3C,KACJ,CACF,CAEQ,kBAAkBI,EAAmBH,EAA2B,CACtE,OAAIG,EAAY,EACdA,EAAY,EACHA,EAAYH,EAAY,IACjCG,EAAYH,EAAY,EAAIA,EAAY,EAAI,GAEvCG,CACT,CAEO,MAAa,CAClB,KAAK,OACP,CAEO,UAAiB,CACtB,KAAK,OACP,CAEO,WAAkB,CACvB,KAAK,MAAQ,CACf,CAEO,SAAgB,CACrB,KAAK,MAAQ,KAAK,WAAa,CACjC,CAEA,IAAW,OAAgB,CACzB,OAAO,KAAK,UACd,CACA,IAAW,MAAMC,EAAe,CAC9B,GAAI,KAAK,aAAeA,EAAO,CAC7B,IAAMN,EAAY,KAAK,WACvB,KAAK,WAAaM,EAClB,KAAK,UAAUN,CAAS,EACxB,KAAK,SAAS,iBAAiBO,EAAwB,WAAW,MAAO,KAAK,WAAW,SAAS,CAAC,EAEvG,CAEA,IAAW,eAA2C,CACpD,OAAO,KAAK,cACd,CACA,IAAW,cAAcD,EAAkC,CACrD,KAAK,iBAAmBA,IAC1B,KAAK,eAAiBA,EACtB,KAAK,yBAAyB,EAC9B,KAAK,SAAS,iBAAiB,KAAK,cAAc,EAClD,KAAK,SAAS,iBAAiBC,EAAwB,WAAW,eAAgB,KAAK,cAAc,EAEzG,CACF,EC3IA,IAAMC,EAAW,wFACXC,EAAS
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}view-switcher`;\n\nconst classes = {\n ROOT: 'forge-view-switcher',\n VIEW_HIDDEN: 'forge-view-switcher__view--hidden',\n VIEW_SWITCHER_SLIDE: 'forge-view-switcher--slide',\n VIEW_SWITCHER_FADE: 'forge-view-switcher--fade'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n DEFAULT_SLOT: 'slot:not([name])',\n VIEW_HIDDEN: `.${classes.VIEW_HIDDEN}`\n};\n\nconst attributes = {\n INDEX: 'index',\n ANIMATION_TYPE: 'animation-type'\n};\n\nconst numbers = {\n DEFAULT_TRANSITION_DURATION: 500\n};\n\nexport const VIEW_SWITCHER_CONSTANTS = {\n elementName,\n attributes,\n classes,\n selectors,\n numbers\n};\n\nexport interface IViewSwitcherView {\n element: HTMLElement;\n}\n\nexport enum ViewAnimationDirection {\n Left = 'left',\n Right = 'right'\n}\n\nexport enum ViewSwitcherAnimationType {\n None = 'none',\n Slide = 'slide',\n Fade = 'fade'\n}\n", "import { getShadowElement, removeClass } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IViewSwitcherComponent } from './view-switcher';\nimport { ViewAnimationDirection, ViewSwitcherAnimationType, VIEW_SWITCHER_CONSTANTS } from './view-switcher-constants';\n\nexport interface IViewSwitcherAdapter extends IBaseAdapter {\n getViewCount(): number;\n startViewObserver(callback: MutationCallback): void;\n stopViewObserver(): void;\n initializeSlideViews(index: number): void;\n initializeFadeViews(index: number): void;\n setActiveView(index: number): void;\n hideInactiveViews(index: number): void;\n transitionToView(fromIndex: number, toIndex: number, animationType: ViewSwitcherAnimationType, direction?: ViewAnimationDirection): Promise<void>;\n setAnimationType(type: ViewSwitcherAnimationType): void;\n}\n\nexport class ViewSwitcherAdapter extends BaseAdapter<IViewSwitcherComponent> implements IViewSwitcherAdapter {\n private _rootElement: HTMLElement;\n private _slotElement: HTMLSlotElement;\n private _viewObserver: MutationObserver;\n\n constructor(component: IViewSwitcherComponent) {\n super(component);\n this._rootElement = getShadowElement(component, VIEW_SWITCHER_CONSTANTS.selectors.ROOT);\n this._slotElement = getShadowElement(component, VIEW_SWITCHER_CONSTANTS.selectors.DEFAULT_SLOT) as HTMLSlotElement;\n }\n\n public getViewCount(): number {\n return this._getViews().length;\n }\n\n public startViewObserver(callback: MutationCallback): void {\n this._viewObserver = new MutationObserver(callback);\n this._viewObserver.observe(this._component, { childList: true });\n }\n\n public stopViewObserver(): void {\n if (this._viewObserver) {\n this._viewObserver.disconnect();\n }\n }\n\n /**\n * Initializes the views with styles for a slide transition.\n * @param index The active view index.\n */\n public initializeSlideViews(index: number): void {\n let views = this._getViews();\n views.forEach((view, i) => {\n // Make sure that we remove properties if they were set from another animation type\n view.style.removeProperty('opacity');\n view.style.removeProperty('display');\n\n // Ensure that the currently active view is visible\n if (i === index) {\n views[index].classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.removeProperty('visibility');\n return;\n }\n\n // We disable the transition when resetting the hidden views so that the animation doesn't occur\n view.style.transition = 'none';\n\n // Ensure the view is hidden\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.visibility = 'hidden';\n\n // Reset the position of the view to the left or right of the switcher\n if (i > index) {\n view.style.transform = 'translate3d(100%, 0, 0)';\n } else {\n view.style.transform = 'translate3d(-100%, 0, 0)';\n }\n });\n\n // Wait a frame for the views to reposition, then re-enable the transition for all hidden views\n window.requestAnimationFrame(() => {\n views = this._getViews();\n views.forEach((v, i) => {\n if (i === index) {\n return;\n }\n v.style.removeProperty('transition');\n });\n });\n }\n\n /**\n * Initializes the view styles when using a fade transition.\n * @param index The active view index.\n */\n public initializeFadeViews(index: number): void {\n const views = this._getViews();\n views.forEach((view, i) => {\n // Make sure that we remove properties if they were set from another animation type\n view.style.removeProperty('transform');\n view.style.removeProperty('display');\n\n // Ensure that the visible view doesn't have the hidden class\n if (i === index) {\n view.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.removeProperty('visibility');\n return;\n }\n\n // Ensure the hidden views have the proper class\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.visibility = 'hidden';\n });\n\n // Ensure that the visible view has the proper opacity\n if (views[index]) {\n views[index].style.opacity = '1';\n }\n }\n\n /**\n * This is used when no animation type is set to allow for snapping the view into place.\n * @param index The currently active view index.\n */\n public setActiveView(index: number): void {\n const views = this._getViews();\n\n views.forEach((view, i) => {\n if (i === index) {\n return;\n }\n // Hide all non-visible views\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.display = 'none';\n });\n\n // Ensure that the active view is visible\n if (views[index]) {\n views[index].classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n views[index].style.removeProperty('display');\n }\n }\n\n /**\n * This is used when no animation type is specific to hide all non-visible views.\n * @param index The currently active view index.\n */\n public hideInactiveViews(index: number): void {\n const views = this._getViews();\n views.forEach((view, i) => {\n // Make sure that we remove properties if they were set from another animation type\n view.style.removeProperty('opacity');\n view.style.removeProperty('transform');\n view.style.removeProperty('visibility');\n\n // Ensure the active view is visible\n if (i === index) {\n view.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n return;\n }\n\n // Ensure all non-active views are hidden\n view.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n view.style.display = 'none';\n });\n }\n\n /**\n * Initiates a slide transition from one view to another.\n * @param fromIndex The view index to transition from.\n * @param toIndex The view index to transition to.\n * @param direction The transition animation direction.\n */\n public async transitionToView(fromIndex: number, toIndex: number, animationType: ViewSwitcherAnimationType, direction?: ViewAnimationDirection): Promise<void> {\n const views = this._getViews();\n const fromView = views[fromIndex];\n const toView = views[toIndex];\n\n return new Promise<void>(resolve => {\n // Show the view so we can calculate the height and start the transition in the next frame\n toView.style.removeProperty('visibility');\n\n window.requestAnimationFrame(() => {\n let transitionProp: string;\n switch (animationType) {\n case ViewSwitcherAnimationType.Slide:\n this._slideToView(fromView, toView, direction as ViewAnimationDirection);\n transitionProp = 'transform';\n break;\n case ViewSwitcherAnimationType.Fade:\n this._fadeToView(fromView, toView);\n transitionProp = 'opacity';\n break;\n default:\n return;\n }\n\n // Start the height transition (this will not animate if the height doesn't change)\n this._animateHeight(fromView, toView);\n\n if (fromView) {\n // Wait for the transform transition to complete before resolving and completing transition\n fromView.addEventListener('transitionend', transitionEndHandler);\n } else {\n toView.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n }\n\n function transitionEndHandler(evt: TransitionEvent): void {\n if (evt.propertyName === transitionProp) {\n fromView.removeEventListener('transitionend', transitionEndHandler);\n toView.classList.remove(VIEW_SWITCHER_CONSTANTS.classes.VIEW_HIDDEN);\n resolve();\n }\n }\n });\n });\n }\n\n /**\n * Initiates a slide transition from one view to another.\n * @param fromIndex The view index to transition from.\n * @param toIndex The view index to transition to.\n * @param direction The transition animation direction.\n */\n private _slideToView(fromView: HTMLElement | null, toView: HTMLElement, direction: ViewAnimationDirection): void {\n // Use a CSS transform on the view to slide it in the requested direction\n if (direction === ViewAnimationDirection.Left) {\n if (fromView) {\n fromView.style.transform = 'translate3d(-100%, 0, 0)';\n }\n toView.style.transform = 'translate3d(0, 0, 0)';\n } else {\n if (fromView) {\n fromView.style.transform = 'translate3d(100%, 0, 0)';\n }\n toView.style.transform = 'translate3d(0, 0, 0)';\n }\n }\n\n private _fadeToView(fromView: HTMLElement | null, toView: HTMLElement): void {\n if (fromView) {\n fromView.style.opacity = '0';\n }\n toView.style.opacity = '1';\n }\n\n /**\n * Attempts to animate the height of our container element to match that of the next view.\n * @param fromIndex The view index we are transitioning from.\n * @param toIndex The view index we are transitioning to.\n */\n private _animateHeight(fromView: HTMLElement | null, toView: HTMLElement): void {\n const fromViewHeight = fromView ? this._getViewHeight(fromView) : 0;\n const toViewHeight = this._getViewHeight(toView);\n\n // We only animate the height if it is different...\n if (fromViewHeight !== toViewHeight) {\n this._rootElement.addEventListener('transitionend', this._onRootTransitionEnd.bind(this));\n\n // Set to the height of the current view so we can animate the height from something static\n this._setHeight(fromViewHeight);\n\n // We need to wait two frames before animating to the new height due to event loop\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n // Start the transition to the new view height\n this._setHeight(toViewHeight);\n });\n });\n }\n }\n\n /**\n * Handles the root container transitionend event.\n * @param evt The transition event.\n */\n private _onRootTransitionEnd(evt: TransitionEvent): void {\n if (evt.propertyName === 'height') {\n this._rootElement.removeEventListener('transitionend', this._onRootTransitionEnd);\n // Removes the static height from the root element so that it can grow with content\n this._rootElement.style.removeProperty('height');\n }\n }\n\n /**\n * Resets the animation type on the root element.\n * @param type The animation type.\n */\n public setAnimationType(type: ViewSwitcherAnimationType): void {\n removeClass([VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_SLIDE, VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_FADE], this._component);\n\n switch (type) {\n case ViewSwitcherAnimationType.Slide:\n this._component.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_SLIDE);\n break;\n case ViewSwitcherAnimationType.Fade:\n this._component.classList.add(VIEW_SWITCHER_CONSTANTS.classes.VIEW_SWITCHER_FADE);\n break;\n }\n }\n\n /**\n * Get all view elements.\n */\n private _getViews(): HTMLElement[] {\n return this._slotElement.assignedNodes().filter(n => n.nodeType === 1) as HTMLElement[];\n }\n\n /**\n * Sets the height on the root container element.\n * @param viewHeight The new height.\n */\n private _setHeight(viewHeight: number): void {\n this._rootElement.style.height = `${viewHeight}px`;\n }\n\n /**\n * Calculate the absolute height of a view.\n * @param view The view to calculate height from.\n */\n private _getViewHeight(view: HTMLElement): number {\n let height = 0;\n const elements = view.children.length ? (Array.from(view.children) as HTMLElement[]) : [view];\n\n for (const element of elements) {\n const styles = window.getComputedStyle(element);\n const margin = parseFloat(styles.marginTop as string) + parseFloat(styles.marginBottom as string);\n height += Math.ceil(element.offsetHeight + margin);\n }\n\n return height;\n }\n}\n", "import { ICustomElementFoundation, Platform, isDefined } from '@tylertech/forge-core';\n\nimport { IViewSwitcherAdapter } from './view-switcher-adapter';\nimport { VIEW_SWITCHER_CONSTANTS, ViewAnimationDirection, ViewSwitcherAnimationType } from './view-switcher-constants';\n\nexport interface IViewSwitcherFoundation extends ICustomElementFoundation {\n index: number;\n animationType: ViewSwitcherAnimationType;\n next(): void;\n previous(): void;\n goToStart(): void;\n goToEnd(): void;\n}\n\nexport class ViewSwitcherFoundation implements IViewSwitcherFoundation {\n private _viewCount = 0;\n private _viewIndex = 0;\n private _animationType = ViewSwitcherAnimationType.None;\n private _viewsChangedListener: () => void;\n\n constructor(private _adapter: IViewSwitcherAdapter) {\n this._viewsChangedListener = () => this._onViewsChanged();\n }\n\n public initialize(): void {\n this._viewCount = this._adapter.getViewCount();\n this._adapter.startViewObserver(this._viewsChangedListener);\n this._adapter.setAnimationType(this._animationType);\n\n if (this._viewCount) {\n this._initializeAnimationType();\n }\n }\n\n public disconnect(): void {\n this._adapter.stopViewObserver();\n }\n\n private _initializeAnimationType(): void {\n switch (this._animationType) {\n case ViewSwitcherAnimationType.Slide:\n this._adapter.initializeSlideViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.Fade:\n this._adapter.initializeFadeViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.None:\n default:\n this._adapter.hideInactiveViews(this._viewIndex);\n break;\n }\n }\n\n private _onViewsChanged(): void {\n this._viewCount = this._adapter.getViewCount();\n\n if (this._viewCount === 0) {\n this._viewIndex = 0;\n }\n\n if (this._viewCount) {\n this._initializeAnimationType();\n }\n\n // If the view index is higher than the number of views then we need to reset it\n if (this._viewCount > 0 && this._viewIndex >= this._viewCount) {\n const currIndex = this._viewIndex;\n this._viewIndex = this._viewCount > 0 ? this._viewCount - 1 : 0;\n this._goToView(currIndex, this._viewCount);\n }\n }\n\n private async _goToView(fromIndex: number, viewCount?: number): Promise<void> {\n this._viewCount = !isDefined(viewCount) ? this._adapter.getViewCount() : viewCount as number;\n \n // If the index that we're trying to transition to is out of range, or is the same index, then we ignore the transition\n const isValidIndex = this._viewIndex >= 0 && this._viewIndex <= this._viewCount - 1;\n if (!isValidIndex || fromIndex === this._clampedViewIndex(this._viewIndex, this._viewCount)) {\n return;\n }\n\n switch (this._animationType) {\n case ViewSwitcherAnimationType.Slide:\n const animationDirection = this._viewIndex > fromIndex ? ViewAnimationDirection.Left : ViewAnimationDirection.Right;\n await this._adapter.transitionToView(fromIndex, this._viewIndex, ViewSwitcherAnimationType.Slide, animationDirection);\n this._adapter.initializeSlideViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.Fade:\n await this._adapter.transitionToView(fromIndex, this._viewIndex, ViewSwitcherAnimationType.Fade);\n this._adapter.initializeFadeViews(this._viewIndex);\n break;\n case ViewSwitcherAnimationType.None:\n default:\n this._adapter.setActiveView(this._viewIndex);\n break;\n }\n }\n\n private _clampedViewIndex(viewIndex: number, viewCount: number): number {\n if (viewIndex < 0) {\n viewIndex = 0;\n } else if (viewIndex > viewCount - 1) {\n viewIndex = viewCount > 0 ? viewCount - 1 : 0;\n }\n return viewIndex;\n }\n\n public next(): void {\n this.index++;\n }\n\n public previous(): void {\n this.index--;\n }\n\n public goToStart(): void {\n this.index = 0;\n }\n\n public goToEnd(): void {\n this.index = this._viewCount - 1;\n }\n\n public get index(): number {\n return this._viewIndex;\n }\n public set index(value: number) {\n if (this._viewIndex !== value) {\n const currIndex = this._viewIndex;\n this._viewIndex = value;\n this._goToView(currIndex);\n this._adapter.setHostAttribute(VIEW_SWITCHER_CONSTANTS.attributes.INDEX, this._viewIndex.toString());\n }\n }\n\n public get animationType(): ViewSwitcherAnimationType {\n return this._animationType;\n }\n public set animationType(value: ViewSwitcherAnimationType) {\n if (this._animationType !== value) {\n this._animationType = value;\n this._initializeAnimationType();\n this._adapter.setAnimationType(this._animationType);\n this._adapter.setHostAttribute(VIEW_SWITCHER_CONSTANTS.attributes.ANIMATION_TYPE, this._animationType);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, coerceNumber, FoundationProperty, upgradeProperty } from '@tylertech/forge-core';\nimport { ViewSwitcherAdapter } from './view-switcher-adapter';\nimport { ViewSwitcherFoundation } from './view-switcher-foundation';\nimport { VIEW_SWITCHER_CONSTANTS, ViewSwitcherAnimationType } from './view-switcher-constants';\nimport { ViewComponent } from './view/view';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-view-switcher\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = '.forge-view-switcher{height:var(--forge-view-switcher-height,auto);width:var(--forge-view-switcher-width,auto);position:relative;overflow:hidden;-webkit-transition:height var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:height var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1)}.forge-view-switcher ::slotted(.forge-view-switcher__view--hidden){position:absolute;top:0;right:0;bottom:0;left:0}:host{height:var(--forge-view-switcher-height,auto);width:var(--forge-view-switcher-width,auto);display:block}:host([hidden]){display:none}:host(.forge-view-switcher--slide) ::slotted(forge-view){-webkit-transition:-webkit-transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:-webkit-transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1),-webkit-transform var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);will-change:transform}:host(.forge-view-switcher--fade) ::slotted(forge-view){-webkit-transition:opacity var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);transition:opacity var(--forge-animation-duration-medium2, 300ms) cubic-bezier(.35, 0, .25, 1);will-change:opacity}:host(.forge-view-switcher--fade) ::slotted(.forge-view-switcher__view--hidden){opacity:0}';\n\nexport interface IViewSwitcherComponent extends IBaseComponent {\n index: number;\n animationType: `${ViewSwitcherAnimationType}`;\n next(): void;\n previous(): void;\n goToStart(): void;\n goToEnd(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-view-switcher': IViewSwitcherComponent;\n }\n}\n\n/**\n * The web component class behind the `<forge-view-switcher>` custom element.\n * \n * @tag forge-view-switcher\n */\n@CustomElement({\n name: VIEW_SWITCHER_CONSTANTS.elementName,\n dependencies: [ViewComponent]\n})\nexport class ViewSwitcherComponent extends BaseComponent implements IViewSwitcherComponent {\n public static get observedAttributes(): string[] {\n return [\n VIEW_SWITCHER_CONSTANTS.attributes.INDEX,\n VIEW_SWITCHER_CONSTANTS.attributes.ANIMATION_TYPE\n ];\n }\n\n private _foundation: ViewSwitcherFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new ViewSwitcherFoundation(new ViewSwitcherAdapter(this));\n }\n\n public connectedCallback(): void {\n // upgradeProperty(this, 'index');\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case VIEW_SWITCHER_CONSTANTS.attributes.INDEX:\n this.index = coerceNumber(newValue);\n break;\n case VIEW_SWITCHER_CONSTANTS.attributes.ANIMATION_TYPE:\n this.animationType = newValue as ViewSwitcherAnimationType;\n break;\n }\n }\n\n /** Gets/sets the currently visible view index. */\n @FoundationProperty()\n public declare index: number;\n \n /** Gets/sets the animation type. */\n @FoundationProperty()\n public declare animationType: `${ViewSwitcherAnimationType}`;\n\n /** Transitions to the next view. */\n public next(): void {\n this._foundation.next();\n }\n\n /** Transitions to the previous view. */\n public previous(): void {\n this._foundation.previous();\n }\n\n /** Transitions to the first view. */\n public goToStart(): void {\n this._foundation.goToStart();\n }\n\n /** Transitions to the last view. */\n public goToEnd(): void {\n this._foundation.goToEnd();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { ViewSwitcherComponent } from './view-switcher';\n\nexport * from './view-switcher-adapter';\nexport * from './view-switcher-constants';\nexport * from './view-switcher-foundation';\nexport * from './view-switcher';\nexport * from './view';\n\nexport function defineViewSwitcherComponent(): void {\n defineCustomElement(ViewSwitcherComponent);\n}\n"],
|
|
5
|
+
"mappings": "mWAEA,IAAMA,EAA2C,GAAGC,iBAE9CC,EAAU,CACd,KAAM,sBACN,YAAa,oCACb,oBAAqB,6BACrB,mBAAoB,2BACtB,EAEMC,EAAY,CAChB,KAAM,IAAID,EAAQ,OAClB,aAAc,mBACd,YAAa,IAAIA,EAAQ,aAC3B,EAEME,EAAa,CACjB,MAAO,QACP,eAAgB,gBAClB,EAEMC,EAAU,CACd,4BAA6B,GAC/B,EAEaC,EAA0B,CACrC,YAAAN,EACA,WAAAI,EACA,QAAAF,EACA,UAAAC,EACA,QAAAE,CACF,EAMYE,OACVA,EAAA,KAAO,OACPA,EAAA,MAAQ,QAFEA,OAAA,IAKAC,OACVA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,KAAO,OAHGA,OAAA,IC1BL,IAAMC,EAAN,cAAkCC,CAAoE,CAK3G,YAAYC,EAAmC,CAC7C,MAAMA,CAAS,EACf,KAAK,aAAeC,EAAiBD,EAAWE,EAAwB,UAAU,IAAI,EACtF,KAAK,aAAeD,EAAiBD,EAAWE,EAAwB,UAAU,YAAY,CAChG,CAEO,cAAuB,CAC5B,OAAO,KAAK,UAAU,EAAE,MAC1B,CAEO,kBAAkBC,EAAkC,CACzD,KAAK,cAAgB,IAAI,iBAAiBA,CAAQ,EAClD,KAAK,cAAc,QAAQ,KAAK,WAAY,CAAE,UAAW,EAAK,CAAC,CACjE,CAEO,kBAAyB,CAC1B,KAAK,eACP,KAAK,cAAc,WAAW,CAElC,CAMO,qBAAqBC,EAAqB,CAC/C,IAAIC,EAAQ,KAAK,UAAU,EAC3BA,EAAM,QAAQ,CAACC,EAAMC,IAAM,CAMzB,GAJAD,EAAK,MAAM,eAAe,SAAS,EACnCA,EAAK,MAAM,e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,EAAuB,IAAIC,EAAoB,IAAI,CAAC,CAC7E,CAbA,WAAkB,oBAA+B,CAC/C,MAAO,CACLC,EAAwB,WAAW,MACnCA,EAAwB,WAAW,cACrC,CACF,CAUO,mBAA0B,CAE/B,KAAK,YAAY,WAAW,CAC9B,CAEO,sBAA6B,CAClC,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKD,EAAwB,WAAW,MACtC,KAAK,MAAQI,EAAaD,CAAQ,EAClC,MACF,KAAKH,EAAwB,WAAW,eACtC,KAAK,cAAgBG,EACrB,KACJ,CACF,CAWO,MAAa,CAClB,KAAK,YAAY,KAAK,CACxB,CAGO,UAAiB,CACtB,KAAK,YAAY,SAAS,CAC5B,CAGO,WAAkB,CACvB,KAAK,YAAY,UAAU,CAC7B,CAGO,SAAgB,CACrB,KAAK,YAAY,QAAQ,CAC3B,CACF,EAzBiBE,EAAA,CADdC,EAAmB,GArCTX,EAsCI,qBAIAU,EAAA,CADdC,EAAmB,GAzCTX,EA0CI,6BA1CJA,EAANU,EAAA,CAJNE,EAAc,CACb,KAAMP,EAAwB,YAC9B,aAAc,CAACQ,CAAa,CAC9B,CAAC,GACYb,GCxBN,SAASc,IAAoC,CAClDC,EAAoBC,CAAqB,CAC3C",
|
|
6
6
|
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "numbers", "VIEW_SWITCHER_CONSTANTS", "ViewAnimationDirection", "ViewSwitcherAnimationType", "ViewSwitcherAdapter", "BaseAdapter", "component", "getShadowElement", "VIEW_SWITCHER_CONSTANTS", "callback", "index", "views", "view", "i", "v", "fromIndex", "toIndex", "animationType", "direction", "fromView", "toView", "resolve", "transitionProp", "transitionEndHandler", "evt", "fromViewHeight", "toViewHeight", "type", "removeClass", "n", "viewHeight", "height", "elements", "element", "styles", "margin", "ViewSwitcherFoundation", "_adapter", "currIndex", "fromIndex", "viewCount", "isDefined", "animationDirection", "viewIndex", "value", "VIEW_SWITCHER_CONSTANTS", "template", "styles", "ViewSwitcherComponent", "BaseComponent", "attachShadowTemplate", "ViewSwitcherFoundation", "ViewSwitcherAdapter", "VIEW_SWITCHER_CONSTANTS", "name", "oldValue", "newValue", "coerceNumber", "__decorateClass", "FoundationProperty", "CustomElement", "ViewComponent", "defineViewSwitcherComponent", "defineCustomElement", "ViewSwitcherComponent"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{d as D}from"./chunk.RGDLRUSM.js";import{B as P,e as L,i as A,q as S,x as T}from"./chunk.DN6Y3VXC.js";import{d as O,l as w}from"./chunk.SW6JDC2Y.js";import{d as X}from"./chunk.R2CJMM2F.js";import{a as k,p as R}from"./chunk.XT6RPXTM.js";import{a as s}from"./chunk.NVUMRW44.js";import{a as C}from"./chunk.OLFOVKQG.js";import{a as I,b as N}from"./chunk.5OT53ZJM.js";import{a as m,e as E,f as b,k as y}from"./chunk.LNTTU2GL.js";import{e as c,q as d,r as g}from"./chunk.L4QSPQDE.js";import{k as l,l as x}from"./chunk.J2M2MXP2.js";import{d as a}from"./chunk.M3QDAYD2.js";var h=`${N}step`,p={STEP:"forge-step",STEP_CONTAINER:"container",ERROR:"error",SELECTED:"selected",COMPLETED:"completed",EDITABLE:"editable",ALTERNATIVE:"alternative",ICON_CONTENT:"icon-content",ICON:"icon",LABEL_CONTAINER:"label-container",LABEL:"label",OPTIONAL_LABEL:"optional-label",INDEX:"index",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",EXPANSION_PANEL:"expansion-panel",EXPANSION_ICON:"expanded-icon",EXPANSION_ICON_EXPANDED:"expanded-icon--expanded",EXPANSION_CONTENT:"expansion-content"},M={SELECTED:"selected",INDEX:"index",EDITABLE:"editable",COMPLETED:"completed",ERROR:"error",ALTERNATIVE:"alternative",FIRST:"first",LAST:"last",ARIA_SELECTED:"aria-selected",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",IGNORE_USER_EXPANSION:"ignore-user-expansion"},F={STEP:`.${p.STEP}`,STEP_CONTAINER:`.${p.STEP_CONTAINER}`,INDEX:`.${p.INDEX}`,ICON:`.${p.ICON}`,ICON_CONTENT:`.${p.ICON_CONTENT}`,EXPANSION_SLOT:'slot[name="expansion-content"]',EXPANSION_PANEL:`.${p.EXPANSION_PANEL}`,EXPANSION_ICON:`.${p.EXPANSION_ICON}`},H={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",EXPANSION_CONTENT_SLOT_NAME:"expansion-content"},z={SELECT:`${h}-select`,EXPANDED_CONTENT_FOCUSIN:`${h}-expanded-content-focusin`,EXPANDED_CONTENT_FOCUSOUT:`${h}-expanded-content-focusout`},t={elementName:h,classes:p,selectors:F,attributes:M,events:z,strings:H};var f=class extends C{constructor(e){super(e);this.unbounded=!1;this._buttonElement=b(e,t.selectors.STEP),this._container=b(e,t.selectors.STEP_CONTAINER),this._stateLayerElement=b(this._component,k.elementName)}get root(){return this._buttonElement}get disabled(){return this._buttonElement.disabled}get component(){return this._component}setRootTabIndex(e){this._buttonElement.tabIndex=e}initialize(){this._component.setAttribute("role","tab")}setIndex(e){this._buttonElement.querySelector(t.selectors.INDEX).innerHTML=(e+1||"").toString()}toggleRootClass(e,i){d(this._buttonElement,i,e)}setRootAttribute(e,i){this._buttonElement.setAttribute(e,i)}focusButton(){this._buttonElement.focus()}toggleDisabled(e){d(this._buttonElement,e,t.classes.DISABLED),g(this._buttonElement,e,"aria-disabled"),this._stateLayerElement.disabled=e,this._buttonElement.disabled=e}toggleIcon(e,i){let r=this._buttonElement.querySelector(t.selectors.INDEX),v=this._buttonElement.querySelector(t.selectors.ICON);if(!i){r.style.display="inherit",v.style.display="none";return}r.style.display="none",v.style.display="inherit",v.name=e}slotHasContent(){return this._expansionSlot.assignedElements({flatten:!0}).length>0}setClickListener(e){this._buttonElement.addEventListener("click",e)}removeClickListener(e){this._buttonElement.removeEventListener("click",e)}setSlotListener(e){this._expansionSlot.addEventListener("slotchange",e)}removeSlotListener(e){this._expansionSlot&&this._expansionSlot.removeEventListener("slotchange",e)}setExpanded(e){this._expansionPanel&&(this._expansionPanel.open=e,g(this._expansionPanel,!e,"tabindex","-1")),d(this._buttonElement,e,t.classes.EXPANDED)}setExpansionPanelAnimations(e){this._expansionPanel.animationType=e?"default":"none"}addExpansionPanel(){this._container.querySelector(t.selectors.EXPANSION_PANEL)||(this._expansionPanel=this._container.appendChild(this._createExpansionPanel()),this._expansionSlot=this._expansionPanel.querySelector(t.selectors.EXPANSION_SLOT))}removeExpansionPanel(){let e=this._container.querySelector(t.selectors.EXPANSION_PANEL);e&&this._container.removeChild(e)}addExpansionIcon(){this._buttonElement.querySelector(t.selectors.EXPANSION_ICON)||this._buttonElement.appendChild(this._createExpansionIcon())}removeExpansionIcon(){let e=this._buttonElement.querySelector(t.selectors.EXPANSION_ICON);e&&this._buttonElement.removeChild(e)}addExpansionPanelListener(e,i){this._expansionPanel.addEventListener(e,i)}removeExpansionPanelListener(e,i){this._expansionPanel&&this._expansionPanel.removeEventListener(e,i)}isExpandedContentInFocus(e){return this._expansionSlot.assignedElements().some(i=>i.contains(e||document.activeElement))}_createExpansionPanel(){let e=document.createElement("forge-expansion-panel");e.animationType="none",e.setAttribute("part","expansion-panel"),c(t.classes.EXPANSION_PANEL,e);let i=document.createElement("slot");return i.setAttribute("name","expansion-content"),c(t.classes.EXPANSION_CONTENT,i),e.appendChild(i),e}_createExpansionIcon(){let e=document.createElement("forge-icon");return c(t.classes.EXPANSION_ICON,e),e.name="keyboard_arrow_down",e.setAttribute("part","expanded-icon"),e}};var _=class{constructor(o){this._adapter=o;this._clickListener=()=>this._onClickListener(),this._expansionContentSlotChangeListener=e=>this._onExpansionContentSlotChange(e),this._expansionContentFocusInListener=e=>this._onExpansionContentFocusIn(e),this._expansionContentFocusOutListener=e=>this._onExpansionContentFocusOut(e)}initialize(){this._adapter.initialize(),this._applySelected(),this._toggleIcon(),this._vertical&&(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener),this._adapter.addExpansionPanelListener("focusin",this._expansionContentFocusInListener),this._adapter.addExpansionPanelListener("focusout",this._expansionContentFocusOutListener)),this._initialized=!0}disconnect(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanelListener("focusin",this._onExpansionContentFocusIn),this._adapter.removeExpansionPanelListener("focusout",this._onExpansionContentFocusOut)}get index(){return this._index}set index(o){this._index!==o&&(this._index=o,this._applyIndex(),this._adapter.setHostAttribute(t.attributes.INDEX,o.toString()))}get editable(){return this._editable}set editable(o){this._editable!==o&&(this._editable=o,this._adapter.toggleHostAttribute(t.attributes.EDITABLE,o),this._applyEditable())}get completed(){return this._completed}set completed(o){this._completed!==o&&(this._completed=o,this._adapter.toggleHostAttribute(t.attributes.COMPLETED,o),this._applyCompleted())}get error(){return this._error}set error(o){this._error!==o&&(this._error=o,this._adapter.toggleHostAttribute(t.attributes.ERROR,o),this._applyError())}get selected(){return this._selected}set selected(o){this._selected!==o&&(this._selected=o,this._adapter.toggleHostAttribute(t.attributes.SELECTED,o),this._applySelected())}get alternative(){return this._alternative}set alternative(o){this._alternative!==o&&(this._alternative=o,this._adapter.toggleHostAttribute(t.attributes.ALTERNATIVE,o),this._applyAlternative())}get disabled(){return this._disabled}set disabled(o){this._disabled=o,this._applyDisabled()}get vertical(){return this._vertical}set vertical(o){o!==this._vertical&&(this._vertical=o,this._applyVertical(),this._initialized&&(this._vertical?(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener)):(this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanel(),this._adapter.removeExpansionIcon())))}get expanded(){return this._expanded}set expanded(o){o!==this._expanded&&(this._expanded=o,this._adapter.toggleHostAttribute(t.attributes.EXPANDED,this._expanded),this._initialized&&this._applyExpanded())}get ignoreUserExpansion(){return this._ignoreUserExpansion}set ignoreUserExpansion(o){o!==this._ignoreUserExpansion&&(this._ignoreUserExpansion=o)}setStepTabIndex(o){this._adapter.setRootTabIndex(o)}_applyExpanded(){this._adapter.setExpanded(this._expanded)}_applyVertical(){this._adapter.toggleHostAttribute(t.attributes.VERTICAL,this._vertical),this._adapter.toggleRootClass(t.classes.VERTICAL,this._vertical)}focus(){this._adapter.focusButton()}_applyAlternative(){this._adapter.toggleRootClass(t.classes.ALTERNATIVE,this._alternative)}_applySelected(){this._adapter.toggleRootClass(t.classes.SELECTED,this._selected),this._adapter.setHostAttribute(t.attributes.ARIA_SELECTED,(this._selected||!1).toString()),this._adapter.setRootTabIndex(this._selected?0:-1),this._toggleIcon()}_applyIndex(){this._adapter.setIndex(this._index)}_applyEditable(){this._adapter.toggleRootClass(t.classes.EDITABLE,this._editable),this._toggleIcon()}_applyCompleted(){this._adapter.toggleRootClass(t.classes.COMPLETED,this._completed),this._toggleIcon()}_applyError(){this._adapter.toggleRootClass(t.classes.ERROR,this._error),this._toggleIcon()}_applyDisabled(){this._adapter.toggleDisabled(this._disabled),this._toggleIcon()}_getIconState(){return this._error?"warning":this._completed?this._editable?"mode_edit":"check":this._editable&&this._selected&&!this._disabled?"mode_edit":this._disabled?"block":""}_toggleIcon(){this._iconState=this._getIconState(),this._adapter.toggleIcon(this._iconState,this._iconState!=="")}_toggleExpanded(){this._adapter.slotHasContent()&&(this._expanded=!this._expanded,this._applyExpanded(),this._adapter.toggleHostAttribute(t.attributes.EXPANDED,this._expanded))}_onClickListener(){this._vertical&&!this._ignoreUserExpansion&&this._toggleExpanded()}_onExpansionContentSlotChange(o){let e=this._adapter.slotHasContent();e?(this._adapter.setHostAttribute(t.attributes.EXPANDABLE),this._applyExpanded(),this._adapter.setExpansionPanelAnimations(!0)):(this._adapter.removeHostAttribute(t.attributes.EXPANDABLE),this._adapter.setExpansionPanelAnimations(!1)),this._adapter.toggleRootClass(t.classes.EXPANDABLE,e)}_onExpansionContentFocusIn(o){!this._expandedContentFocused&&this._adapter.isExpandedContentInFocus(o.target)&&(this._adapter.emitHostEvent(t.events.EXPANDED_CONTENT_FOCUSIN,this._adapter.component),this._expandedContentFocused=!0)}_onExpansionContentFocusOut(o){o.relatedTarget&&!this._adapter.isExpandedContentInFocus(o.relatedTarget)&&(this._adapter.emitHostEvent(t.events.EXPANDED_CONTENT_FOCUSOUT,this._adapter.component),this._expandedContentFocused=!1)}};var B='<template><div class="container" part="root"><button class="forge-step" type="button" part="button" id="button"><div class="before" part="before"></div><div class="icon-container" part="icon-container"><div class="icon-content" part="icon-content"><span class="index" part="index"></span><forge-icon class="icon" part="icon"></forge-icon></div></div><div class="text-container" part="text-container"><div class="title" part="title-container"><slot></slot></div><div class="subtitle" part="subtitle-container"><slot name="optional"></slot></div></div><div class="after" part="after"></div><forge-state-layer exportparts="surface:state-layer" target="button"></forge-state-layer><forge-focus-indicator part="focus-indicator" target="button" inward></forge-focus-indicator></button></div></template>',U=':host{--_step-primary-color:var(--forge-step-primary-color, var(--forge-theme-primary, #3f51b5));--_step-text-color:var(--forge-step-text-color, var(--forge-theme-on-primary, #ffffff));--_step-border-radius:var(--forge-step-border-radius, var(--forge-shape-extra-large, 16px));--_step-border-radius-vertical:var(--forge-step-border-radius-vertical, var(--forge-shape-medium, 4px));--_step-disabled-text-color:var(--forge-step-disabled-text-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_step-disabled-color:var(--forge-step-disabled-color, var(--forge-theme-surface-container-minimum, #f5f5f5));--_step-icon-fill:var(--forge-step-icon-fill, unset);--_step-icon-fill-active:var(--forge-step-icon-fill-active, var(--_step-primary-color));--_step-icon-text-color:var(--forge-step-icon-text-color, var(--forge-theme-primary, #3f51b5));--_step-icon-text-color-active:var(--forge-step-icon-text-color-active, var(--forge-theme-on-primary, #ffffff));--_step-icon-content-size:var(--forge-step-icon-content-size, 24px);--_step-icon-size:var(--forge-step-icon-size, calc(var(--forge-typography-font-size, 1rem) * 0.875));--_step-icon-transition-duration:var(--forge-step-icon-transition-duration, var(--forge-animation-duration-medium4, 400ms));--_step-icon-transition-easing:var(--forge-step-icon-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_step-line-color:var(--forge-step-line-color, var(--forge-theme-outline, #e0e0e0));--_step-line-min-width:var(--forge-step-line-min-width, 10px);--_step-line-min-width-clustered:var(--forge-step-line-min-width-clustered, 25px);--_step-label-color:var(--forge-step-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_step-sub-label-color:var(--forge-step-sub-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_step-error-color:var(--forge-step-error-color, var(--forge-theme-error, #b00020));--_step-error-text-color:var(--forge-step-error-text-color, var(--forge-theme-on-error, #ffffff));--_step-expansion-panel-border-left-width:var(--forge-step-expansion-panel-border-left-width, 1px);--_step-expansion-panel-margin-bottom:var(--forge-step-expansion-panel-margin-bottom, 4px);--_step-expansion-panel-margin-left:var(--forge-step-expansion-panel-margin-left, 60px);--_step-expansion-panel-margin-top:var(--forge-step-expansion-panel-margin-top, 4px);--_step-expansion-panel-icon-color:var(--forge-step-expansion-panel-icon-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}:host(:focus){outline:0}:host([error]){--forge-state-layer-color:var(--_step-error-color)}:host(:first-child[alternative])::after{align-self:flex-start;top:22px;margin:0}:host(:last-child[alternative])::before{align-self:flex-start;top:22px;margin:0}:host(:not(:first-child):not(:last-child)[alternative])::after,:host(:not(:first-child):not(:last-child)[alternative])::before{align-self:flex-start;top:22px;min-width:7px;margin:0}:host(:not(:last-child)[alternative]) .after{align-self:flex-start;top:22px;position:absolute;width:calc(50% - 18px);left:calc(50% + 18px);height:0;right:0}:host(:not(:last-child)[alternative]) .after::after{content:"";-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;position:absolute;right:0;left:0;min-width:0;width:100%;border-color:var(--_step-line-color);border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px}:host(:not(:first-child)[alternative]) .before{align-self:flex-start;top:22px;position:absolute;left:0;width:calc(50% - 18px);height:0}:host(:not(:first-child)[alternative]) .before::before{content:"";left:0;min-width:0;width:100%;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;position:absolute;border-color:var(--_step-line-color);border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px}:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::after,:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host(:last-child):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px 0 0}:host(:is(:first-child)):host(:not([vertical]))::after{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;-webkit-box-flex:1;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host([vertical]){-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}:host([vertical])::after{content:none}:host([vertical])::before{content:none}:host([vertical]) .forge-step{--_step-border-radius:var(--_step-border-radius-vertical);width:100%;min-height:52px}:host([vertical]) .forge-step .text-container{white-space:normal}:host([vertical]) .icon-container .icon-content{margin:0 16px 0 0}:host([vertical]) .expansion-panel{display:none}:host([vertical]) .expanded-icon{color:var(--_step-expansion-panel-icon-color);display:none;margin-left:auto}:host([vertical][expandable]) .expansion-panel{display:block}:host([ignore-user-expansion]) .forge-step .expanded-icon{display:none}forge-expansion-panel::part(root){border-color:var(--_step-line-color);margin-left:var(--_step-expansion-panel-margin-left);margin-top:var(--_step-expansion-panel-margin-top);margin-bottom:var(--_step-expansion-panel-margin-bottom);border-left-width:var(--_step-expansion-panel-border-left-width);border-left-style:solid}forge-focus-indicator{--forge-focus-indicator-color:var(--_step-primary-color);--forge-focus-indicator-shape:16px}.container{display:contents}.forge-step{-webkit-tap-highlight-color:transparent;padding:12px 16px;outline:0;background:0 0;border:none;border-radius:var(--_step-border-radius);position:relative;display:-webkit-box;display:flex;overflow:hidden;-webkit-box-align:center;align-items:center;z-index:1;cursor:pointer}.forge-step:focus{outline:0}.forge-step::-moz-focus-inner,.forge-step::-moz-focus-outer{padding:0;border:0}.forge-step.error forge-focus-indicator{--forge-focus-indicator-color:var(--_step-error-color)}.forge-step.vertical forge-focus-indicator{--forge-focus-indicator-shape:4px}.forge-step.selected:not(.disabled){--forge-state-layer-color:var(--_step-primary-color)}.forge-step.selected:not(.disabled)::before{background-color:var(--_step-primary-color);content:"";position:absolute;inset:0;opacity:.08;height:100%;width:100%}.forge-step.selected:not(.disabled).error{--_step-primary-color:var(--_step-error-color)}.forge-step .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body1-text-decoration,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);color:var(--_step-label-color);text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle{text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle ::slotted(*){color:var(--_step-sub-label-color);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-label1-text-decoration,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit)}.forge-step .icon-container .icon-content{color:var(--_step-icon-text-color);background-color:var(--_step-icon-fill);height:var(--_step-icon-content-size);width:var(--_step-icon-content-size);border-style:solid;border-width:2px;border-color:transparent;border-radius:50%;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-transition:background-color var(--_step-icon-transition-duration) var(--_step-icon-transition-easing);transition:background-color var(--_step-icon-transition-duration) var(--_step-icon-transition-easing);margin:0 8px 0 0;-webkit-box-flex:0;flex:none}.forge-step .icon-container .icon-content forge-icon{font-size:var(--_step-icon-size)}.forge-step.disabled{color:var(--_step-disabled-text-color);cursor:not-allowed}.forge-step.disabled.forge-step .icon-container .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .title{color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .subtitle ::slotted(*){color:var(--_step-disabled-text-color)}.forge-step.alternative{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-step.alternative .icon-container .icon-content{margin:0}.forge-step.alternative .text-container{margin-top:8px;place-items:center}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content{border-color:var(--_step-primary-color)}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content .index,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content .index{color:var(--_step-primary-color)}.forge-step.selected.disabled .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.selected:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.selected:not(.disabled) .title{color:var(--_step-primary-color);font-weight:500}.forge-step.selected:not(.disabled) .subtitle ::slotted(*){color:var(--_step-primary-color);font-weight:500}.forge-step.error:not(.disabled) .title{color:var(--_step-error-color)}.forge-step.error:not(.disabled) .subtitle ::slotted(*){color:var(--_step-error-color)}.forge-step.error:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-error-color);--_step-icon-text-color:var(--_step-error-text-color)}.forge-step.completed:not(.disabled):not(.error):not(.editable) .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.completed:not(.disabled):not(.error).editable .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.expandable .expanded-icon{display:inline-block;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.forge-step.expandable.expanded .expanded-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.forge-step.expandable .icon-container .icon-content{margin:0 16px 0 0}.forge-step .text-container{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(:not(:last-child)[clustered])::after{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:last-child[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:not(:first-child):not(:last-child)[clustered])::after,:host(:not(:first-child):not(:last-child)[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}',n=class extends y{constructor(){super();O.define([T,A,P,L,S]),E(this,B,U),this._foundation=new _(new f(this))}static get observedAttributes(){return[t.attributes.COMPLETED,t.attributes.EDITABLE,t.attributes.ERROR,t.attributes.INDEX,t.attributes.SELECTED,t.attributes.ALTERNATIVE,t.attributes.DISABLED,t.attributes.VERTICAL,t.attributes.EXPANDED,t.attributes.IGNORE_USER_EXPANSION]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,r){switch(e){case t.attributes.INDEX:this.index=x(r);break;case t.attributes.COMPLETED:this.completed=l(r);break;case t.attributes.EDITABLE:this.editable=l(r);break;case t.attributes.ERROR:this.error=l(r);break;case t.attributes.SELECTED:this.selected=l(r);break;case t.attributes.ALTERNATIVE:this.alternative=l(r);break;case t.attributes.DISABLED:this.disabled=l(r);break;case t.attributes.VERTICAL:this.vertical=l(r);break;case t.attributes.EXPANDED:this.expanded=l(r);break;case t.attributes.IGNORE_USER_EXPANSION:this.ignoreUserExpansion=l(r);break}}focus(){this._foundation.focus()}setStepTabIndex(e){this._foundation.setStepTabIndex(e)}};a([s()],n.prototype,"alternative",2),a([s()],n.prototype,"index",2),a([s()],n.prototype,"editable",2),a([s()],n.prototype,"completed",2),a([s()],n.prototype,"error",2),a([s()],n.prototype,"selected",2),a([s()],n.prototype,"disabled",2),a([s()],n.prototype,"vertical",2),a([s()],n.prototype,"expanded",2),a([s()],n.prototype,"ignoreUserExpansion",2),n=a([I({name:t.elementName,dependencies:[w,D,R,X]})],n);function ge(){m(n)}export{t as a,f as b,_ as c,n as d,ge as e};
|
|
7
|
+
//# sourceMappingURL=chunk.W4CL56G7.js.map
|