@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
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{b as x,d as k}from"./chunk.FLF5RTYO.js";import{a as T,p as w}from"./chunk.ASLHRT3N.js";import{l as v}from"./chunk.SB2LOK2R.js";import{a as n}from"./chunk.NVUMRW44.js";import{a as y}from"./chunk.OLFOVKQG.js";import{a as I,b as m}from"./chunk.VRSPT7WX.js";import{a as A,e as L,f as p}from"./chunk.LNTTU2GL.js";import{r as E}from"./chunk.L4QSPQDE.js";import{k as l,n as u}from"./chunk.J2M2MXP2.js";import{a as h,d as a}from"./chunk.M3QDAYD2.js";var C=`${m}list`,O={ROLE:"role",STATIC:"static",NON_INTERACTIVE:"non-interactive",DISABLED:"disabled",DENSE:"dense",PROPAGATE_CLICK:"propagate-click",SELECTED_VALUE:"selected-value",INDENTED:"indented",TWO_LINE:"two-line",THREE_LINE:"three-line",WRAP:"wrap"},H=h({},O),z={SCOPE_TEST:`${C}-item-scope-test`},d={elementName:C,attributes:H,events:z},N={list:"listitem",listbox:"option",menu:"menuitem"};var S=`${m}list-item`,D={HREF:"href",TARGET:"target",DOWNLOAD:"download",REL:"rel",STATIC:"static",NON_INTERACTIVE:"non-interactive",DISABLED:"disabled",SELECTED:"selected",ACTIVE:"active",VALUE:"value",DENSE:"dense",PROPAGATE_CLICK:"propagate-click",INDENTED:"indented",TWO_LINE:"two-line",THREE_LINE:"three-line",WRAP:"wrap"},P=h({},D),R={ROOT:"forge-list-item"},M={ROOT:`.${R.ROOT}`,CHECKBOX_RADIO_SELECTOR:":is(input[type=checkbox],input[type=radio],forge-checkbox,forge-radio):not(:disabled):not([forge-ignore])",SWITCH_SELECTOR:"forge-switch:not([disabled]):not([forge-ignore])",IGNORE:"[forge-ignore],[data-forge-ignore]"},F={SELECT:`${S}-select`},i={elementName:S,observedAttributes:D,attributes:P,classes:R,selectors:M,events:F};var g=class extends y{constructor(t){super(t);this._rootElement=p(t,i.selectors.ROOT),this._focusIndicatorElement=p(t,x.elementName),this._stateLayerElement=p(t,T.elementName)}initialize(){let t=this._getParentList();t&&this._inheritParentListProps(t),this._rootElement.tabIndex=this._component.nonInteractive||this._component.disabled?-1:0,this._component.hasAttribute("role")||this._setRole(t)}setHref(t){if(t){if(this._rootElement.tagName!=="A"){let s=this._createAnchorRootElement();this._rootElement=v(this._rootElement,s)}this._rootElement.href=t}else if(this._rootElement.tagName==="A"){let s=this._createDefaultRootElement();this._rootElement=v(this._rootElement,s)}}setAnchorTarget(t){this._rootElement.tagName==="A"&&(this._rootElement.target=t)}setAnchorDownload(t){this._rootElement.tagName==="A"&&(this._rootElement.download=t)}setAnchorRel(t){this._rootElement.tagName==="A"&&(this._rootElement.rel=t)}setNonInteractive(t){this._rootElement.tabIndex=t?-1:0,t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setDisabled(t){this._rootElement.tabIndex=t?-1:0,E(this._component,t,"aria-disabled","true"),t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setActive(t){this._focusIndicatorElement.active=t}trySelect(t){let s=this._getParentList();if((s==null?void 0:s.selectedValue)===void 0)return null;let c=(Array.isArray(s.selectedValue)?s.selectedValue:[s.selectedValue]).some(_=>u(_,t));return this.tryToggleSelectionControl(c),c}tryToggleSelectionControl(t){let s=this._component.querySelector(i.selectors.CHECKBOX_RADIO_SELECTOR);if(s){let o=typeof t=="boolean",c=s.checked;s.checked=o?t:!s.checked,(!o||c!==t)&&s.dispatchEvent(new Event("change",{bubbles:!0}))}else{let o=this._component.querySelector(i.selectors.SWITCH_SELECTOR);if(!o)return;let c=typeof t=="boolean",_=o.on;o.on=c?t:!o.on,(!c||_!==t)&&o.dispatchEvent(new CustomEvent("forge-switch-change",{bubbles:!0,detail:o.on}))}}isFocused(){return this._component.matches(":focus")}setFocus(){this._rootElement.focus({preventScroll:!0})}animateStateLayer(){this._stateLayerElement.playAnimation()}clickAnchor(){this._rootElement.tagName==="A"&&this._rootElement.click()}clickHost(){HTMLElement.prototype.click.call(this._component)}_createAnchorRootElement(){let t=document.createElement("a");return t.classList.add(i.classes.ROOT),t.setAttribute("part","root"),this._component.href&&(t.href=this._component.href),this._component.target&&(t.target=this._component.target),this._component.download&&(t.download=this._component.download),this._component.rel&&(t.rel=this._component.rel),t}_createDefaultRootElement(){let t=document.createElement("div");return t.classList.add(i.classes.ROOT),t.setAttribute("part","root"),t.tabIndex=this._component.nonInteractive||this._component.disabled?-1:0,t}_getParentList(){return this._component.closest(d.elementName)}_inheritParentListProps(t){(t.hasAttribute(d.attributes.NON_INTERACTIVE)||t.hasAttribute(d.attributes.STATIC))&&(this._component.nonInteractive=!0),t.hasAttribute(d.attributes.DISABLED)&&(this._component.disabled=!0),t.hasAttribute(d.attributes.DENSE)&&(this._component.dense=!0),t.getAttribute(d.attributes.PROPAGATE_CLICK)==="false"&&(this._component.propagateClick=!1),t.hasAttribute(d.attributes.INDENTED)&&(this._component.indented=!0),t.hasAttribute(d.attributes.TWO_LINE)&&(this._component.twoLine=!0),t.hasAttribute(d.attributes.THREE_LINE)&&(this._component.threeLine=!0)}_setRole(t){var c;let s=t==null?void 0:t.getAttribute("role"),o=(c=N[s])!=null?c:"listitem";this._component.setAttribute("role",o)}};var b=class{constructor(e){this._adapter=e;this._target="";this._download="";this._rel="";this._nonInteractive=!1;this._disabled=!1;this._selected=!1;this._active=!1;this._dense=!1;this._propagateClick=!0;this._indented=!1;this._twoLine=!1;this._threeLine=!1;this._wrap=!1;this._clickListener=this._onClick.bind(this),this._pointerDownListener=this._onPointerDown.bind(this),this._keydownListener=this._onKeydown.bind(this)}initialize(){this._adapter.initialize(),!this._nonInteractive&&!this._disabled&&(this._adapter.addHostListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keydownListener),this._propagateClick||this._adapter.addHostListener("pointerdown",this._pointerDownListener))}disconnect(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeHostListener("pointerdown",this._pointerDownListener),this._adapter.removeHostListener("keydown",this._keydownListener)}setFocus(){this._adapter.setFocus()}click(){this._href?this._adapter.clickAnchor():this._adapter.clickHost()}_onPointerDown(e){this._adapter.isFocused()&&e.preventDefault()}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&(!this._href&&e.key===" "&&e.preventDefault(),this._adapter.animateStateLayer(),this._select(e.target))}_onClick(e){this._select(e.target)}_select(e){let t=e==null?void 0:e.matches(i.selectors.IGNORE);if(this._nonInteractive||this._disabled||t)return;!this._adapter.isFocused()&&this._propagateClick&&this.setFocus(),e.matches(i.selectors.CHECKBOX_RADIO_SELECTOR)||this._adapter.tryToggleSelectionControl();let s={value:this._value,listItem:this._adapter.hostElement};this._adapter.emitHostEvent(i.events.SELECT,s)}get href(){return this._href}set href(e){this._href!==e&&(this._href=e,this._adapter.setHref(this._href),this._adapter.toggleHostAttribute(i.attributes.HREF,!!this._href,this._href))}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this._href&&this._adapter.setAnchorTarget(this._target),this._adapter.toggleHostAttribute(i.attributes.TARGET,!!this._target,this._target))}get download(){return this._download}set download(e){this._download!==e&&(this._download=e,this._adapter.setAnchorDownload(this._download),this._adapter.toggleHostAttribute(i.attributes.DOWNLOAD,!!this._download,this._download))}get rel(){return this._rel}set rel(e){this._rel!==e&&(this._rel=e,this._adapter.setAnchorRel(this._rel),this._adapter.toggleHostAttribute(i.attributes.REL,!!this._rel,this._rel))}get static(){return this.nonInteractive}set static(e){this.nonInteractive=e}get nonInteractive(){return this._nonInteractive}set nonInteractive(e){this._nonInteractive!==e&&(this._nonInteractive=e,this._nonInteractive?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener),this._adapter.setNonInteractive(this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.STATIC,this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.NON_INTERACTIVE,this._nonInteractive))}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._disabled?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener),this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get selected(){return this._selected}set selected(e){this._selected!==e&&(this._selected=e,this._adapter.tryToggleSelectionControl(this._selected),this._adapter.toggleHostAttribute(i.attributes.SELECTED,this._selected))}get active(){return this._active}set active(e){this._active!==e&&(this._active=e,this._adapter.setActive(this._active),this._adapter.toggleHostAttribute(i.attributes.ACTIVE,this._active))}get value(){return this._value}set value(e){this._value=e;let t=this._adapter.trySelect(this._value);t!==null&&t!==this._selected&&(this.selected=t)}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.toggleHostAttribute(i.attributes.DENSE,this._dense))}get propagateClick(){return this._propagateClick}set propagateClick(e){this._propagateClick!==e&&(this._propagateClick=e,this._propagateClick?this._adapter.removeHostListener("pointerdown",this._pointerDownListener):this._adapter.addHostListener("pointerdown",this._pointerDownListener),this._adapter.setHostAttribute(i.attributes.PROPAGATE_CLICK,this._propagateClick?"true":"false"))}get indented(){return this._indented}set indented(e){this._indented!==e&&(this._indented=e,this._adapter.toggleHostAttribute(i.attributes.INDENTED,this._indented))}get twoLine(){return this._twoLine}set twoLine(e){this._twoLine!==e&&(this._twoLine=e,this._adapter.toggleHostAttribute(i.attributes.TWO_LINE,this._twoLine))}get threeLine(){return this._threeLine}set threeLine(e){this._threeLine!==e&&(this._threeLine=e,this._adapter.toggleHostAttribute(i.attributes.THREE_LINE,this._threeLine))}get wrap(){return this._wrap}set wrap(e){this._wrap!==e&&(this._wrap=e,this._adapter.toggleHostAttribute(i.attributes.WRAP,this._wrap))}};var W='<template><div class="forge-list-item" tabindex="0" part="root"><slot name="leading"></slot><slot name="avatar"></slot><div class="text-container" part="text-container"><slot></slot><slot name="title"></slot><slot name="primary-text"></slot><slot name="subtitle"></slot><slot name="secondary-text"></slot><slot name="tertiary-text"></slot><slot name="tertiary-title"></slot></div><slot name="trailing"></slot><forge-state-layer exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator part="focus-indicator" inward></forge-focus-indicator></div></template>',B=':host{--_list-item-indent:var(--forge-list-item-indent, 56px);--_list-item-dense-indent:var(--forge-list-item-dense-indent, var(--forge-spacing-xxlarge, 48px))}:host{display:block;outline:0}:host([hidden]){display:none}.forge-list-item{--_list-item-background-color:var(--forge-list-item-background-color, transparent);--_list-item-shape:var(--forge-list-item-shape, 0);--_list-item-padding:var(--forge-list-item-padding, 0 var(--forge-spacing-medium, 16px));--_list-item-margin:var(--forge-list-item-margin, 0);--_list-item-height:var(--forge-list-item-height, 48px);--_list-item-dense-height:var(--forge-list-item-dense-height, 32px);--_list-item-cursor:var(--forge-list-item-cursor, pointer);--_list-item-gap:var(--forge-list-item-gap, var(--forge-spacing-xlarge, 32px));--_list-item-supporting-text-color:var(--forge-list-item-supporting-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-supporting-text-font-size:var(--forge-list-item-supporting-text-font-size, var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1))));--_list-item-supporting-text-font-weight:var(--forge-list-item-supporting-text-font-weight, var(--forge-typography-body2-font-weight, 400));--_list-item-supporting-text-line-height:var(--forge-list-item-supporting-text-line-height, 1.5rem);--_list-item-selected-color:var(--forge-list-item-selected-color, var(--forge-theme-primary, #3f51b5));--_list-item-selected-opacity:var(--forge-list-item-selected-opacity, 0.08);--_list-item-selected-leading-color:var(--forge-list-item-selected-leading-color, var(--_list-item-selected-color));--_list-item-selected-trailing-color:var(--forge-list-item-selected-trailing-color, var(--_list-item-selected-color));--_list-item-selected-supporting-text-color:var(--forge-list-item-selected-supporting-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-disabled-opacity:var(--forge-list-item-disabled-opacity, 0.38);--_list-item-disabled-cursor:var(--forge-list-item-disabled-cursor, not-allowed);--_list-item-one-line-height:var(--forge-list-item-one-line-height, var(--_list-item-height));--_list-item-two-line-height:var(--forge-list-item-two-line-height, var(--forge-list-item-height, 72px));--_list-item-three-line-height:var(--forge-list-item-three-line-height, var(--forge-list-item-height, 88px));--_list-item-dense-one-line-height:var(--forge-list-item-dense-one-line-height, var(--_list-item-dense-height));--_list-item-dense-two-line-height:var(--forge-list-item-dense-two-line-height, var(--forge-list-item-dense-height, 56px));--_list-item-dense-three-line-height:var(--forge-list-item-dense-three-line-height, var(--forge-list-item-dense-height, 72px));--_list-item-dense-font-size:var(--forge-list-item-dense-font-size, 0.875rem);--_list-item-dense-gap:var(--forge-list-item-dense-gap, var(--forge-spacing-xsmall, 8px));--_list-item-leading-selected-color:var(--forge-list-item-leading-selected-color, var(--_list-item-selected-color));--_list-item-trailing-selected-color:var(--forge-list-item-trailing-selected-color, var(--_list-item-selected-color));--_list-item-avatar-background-color:var(--forge-list-item-avatar-background-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-avatar-color:var(--forge-list-item-avatar-color, var(--forge-theme-on-primary, #ffffff));--_list-item-avatar-shape:var(--forge-list-item-avatar-shape, var(--forge-shape-round, 50%));--_list-item-avatar-size:var(--forge-list-item-avatar-size, 40px);--_list-item-wrap-padding:var(--forge-list-item-wrap-padding, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-medium, 16px))}.forge-list-item{position:relative;display:-webkit-box;display:flex;gap:var(--_list-item-gap);-webkit-box-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;text-decoration:none;background-color:var(--_list-item-background-color);border-radius:var(--_list-item-shape);-webkit-tap-highlight-color:transparent;height:var(--_list-item-height);min-height:var(--_list-item-height);padding:var(--_list-item-padding);margin:var(--_list-item-margin);cursor:var(--_list-item-cursor)}:host([non-interactive]) .forge-list-item{cursor:initial}:host([disabled]) .forge-list-item{cursor:var(--_list-item-disabled-cursor);opacity:var(--_list-item-disabled-opacity)}:host([two-line]) .forge-list-item{height:var(--_list-item-two-line-height);min-height:var(--_list-item-two-line-height)}:host([three-line]) .forge-list-item{height:var(--_list-item-three-line-height);min-height:var(--_list-item-three-line-height)}:host([dense]) .forge-list-item{--_list-item-gap:var(--_list-item-dense-gap);height:var(--_list-item-dense-one-line-height);min-height:var(--_list-item-dense-one-line-height)}:host([dense]) .text-container{font-size:var(--_list-item-dense-font-size)}:host([dense][indented]){-webkit-margin-start:var(--_list-item-dense-indent);margin-inline-start:var(--_list-item-dense-indent)}:host([dense][two-line]) .forge-list-item{height:var(--_list-item-dense-two-line-height);min-height:var(--_list-item-dense-two-line-height)}:host([dense][three-line]) .forge-list-item{height:var(--_list-item-dense-three-line-height);min-height:var(--_list-item-dense-three-line-height)}:host([selected]) .forge-list-item{color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item::before{content:"";position:absolute;inset:0;border-radius:inherit;opacity:var(--_list-item-selected-opacity);background-color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=leading]),:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=leading]){color:var(--_list-item-leading-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-trailing-selected-color)}:host([selected]) .text-container{color:var(--_list-item-selected-color)}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_list-item-selected-color)}:host([indented]){-webkit-margin-start:var(--_list-item-indent);margin-inline-start:var(--_list-item-indent)}a.forge-list-item{color:inherit}.text-container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body2-text-decoration,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:var(--_list-item-supporting-text-font-size);font-weight:var(--_list-item-supporting-text-font-weight);line-height:var(--_list-item-supporting-text-line-height);-webkit-box-flex:1;flex:1}slot[name=secondary-text]::slotted(*),slot[name=subtitle]::slotted(*),slot[name=tertiary-text]::slotted(*),slot[name=tertiary-title]::slotted(*){-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);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--_list-item-supporting-text-color);display:block}:host([selected]) slot[name=secondary-text]::slotted(*),:host([selected]) slot[name=subtitle]::slotted(*),:host([selected]) slot[name=tertiary-text]::slotted(*),:host([selected]) slot[name=tertiary-title]::slotted(*){color:var(--_list-item-selected-supporting-text-color)}::slotted([slot=avatar]){background-color:var(--_list-item-avatar-background-color);color:var(--_list-item-avatar-color);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor;-webkit-margin-end:calc((var(--_list-item-gap)/ 2) * -1);margin-inline-end:calc((var(--_list-item-gap)/ 2) * -1);min-width:var(--_list-item-avatar-size);min-height:var(--_list-item-avatar-size);border-radius:var(--_list-item-avatar-shape)}::slotted([slot=leading]),::slotted([slot=trailing]){color:var(--_list-item-supporting-text-color);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor}:host([selected]) ::slotted([slot=leading]){color:var(--_list-item-leading-selected-color)}:host([selected]) ::slotted([slot=trailing]){color:var(--_list-item-trailing-selected-color)}:host([wrap]) .forge-list-item{--_list-item-padding:var(--_list-item-wrap-padding);height:auto}:host([wrap]) .text-container{white-space:normal;overflow:visible;text-overflow:clip;line-height:normal}:host([wrap]) slot[name=secondary-text]::slotted(*),:host([wrap]) slot[name=subtitle]::slotted(*),:host([wrap]) slot[name=tertiary-text]::slotted(*),:host([wrap]) slot[name=tertiary-title]::slotted(*){white-space:normal;overflow:visible;text-overflow:clip;line-height:normal}forge-focus-indicator{z-index:1;--forge-focus-indicator-shape:var(--forge-shape-medium, 4px)}forge-state-layer{border-radius:inherit}',r=class extends HTMLElement{constructor(){super();L(this,W,B),this._foundation=new b(new g(this))}static get observedAttributes(){return[i.observedAttributes.HREF,i.observedAttributes.TARGET,i.observedAttributes.DOWNLOAD,i.observedAttributes.REL,i.observedAttributes.STATIC,i.observedAttributes.NON_INTERACTIVE,i.observedAttributes.DISABLED,i.observedAttributes.SELECTED,i.observedAttributes.ACTIVE,i.observedAttributes.VALUE,i.observedAttributes.DENSE,i.observedAttributes.PROPAGATE_CLICK,i.observedAttributes.INDENTED,i.observedAttributes.TWO_LINE,i.observedAttributes.THREE_LINE,i.observedAttributes.WRAP]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,s,o){switch(t){case i.observedAttributes.HREF:this.href=o;break;case i.observedAttributes.TARGET:this.target=o;break;case i.observedAttributes.DOWNLOAD:this.download=o;break;case i.observedAttributes.REL:this.rel=o;break;case i.observedAttributes.NON_INTERACTIVE:case i.observedAttributes.STATIC:this.nonInteractive=l(o);break;case i.observedAttributes.DISABLED:this.disabled=l(o);break;case i.observedAttributes.SELECTED:this.selected=l(o);break;case i.observedAttributes.ACTIVE:this.active=l(o);break;case i.observedAttributes.VALUE:this.value=o;break;case i.observedAttributes.DENSE:this.dense=l(o);break;case i.observedAttributes.PROPAGATE_CLICK:this.propagateClick=l(o);break;case i.observedAttributes.INDENTED:this.indented=l(o);break;case i.observedAttributes.TWO_LINE:this.twoLine=l(o);break;case i.observedAttributes.THREE_LINE:this.threeLine=l(o);break;case i.observedAttributes.WRAP:this.wrap=l(o);break}}focus(){this._foundation.setFocus()}click(){this._foundation.click()}};a([n()],r.prototype,"href",2),a([n()],r.prototype,"target",2),a([n()],r.prototype,"download",2),a([n()],r.prototype,"rel",2),a([n()],r.prototype,"static",2),a([n()],r.prototype,"nonInteractive",2),a([n()],r.prototype,"disabled",2),a([n()],r.prototype,"selected",2),a([n()],r.prototype,"active",2),a([n()],r.prototype,"value",2),a([n()],r.prototype,"dense",2),a([n()],r.prototype,"propagateClick",2),a([n()],r.prototype,"indented",2),a([n()],r.prototype,"twoLine",2),a([n()],r.prototype,"threeLine",2),a([n()],r.prototype,"wrap",2),r=a([I({name:i.elementName,dependencies:[w,k]})],r);function Et(){A(r)}export{i as a,d as b,N as c,g as d,b as e,r as f,Et as g};
|
|
7
|
-
//# sourceMappingURL=chunk.O5WAQQNR.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/list/list/list-constants.ts", "../../src/list/list-item/list-item-constants.ts", "../../src/list/list-item/list-item-adapter.ts", "../../src/list/list-item/list-item-foundation.ts", "../../src/list/list-item/list-item.ts", "../../src/list/list-item/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName = `${COMPONENT_NAME_PREFIX}list`;\n\nconst observedAttributes = {\n ROLE: 'role',\n STATIC: 'static',\n NON_INTERACTIVE: 'non-interactive',\n DISABLED: 'disabled',\n DENSE: 'dense',\n PROPAGATE_CLICK: 'propagate-click',\n SELECTED_VALUE: 'selected-value',\n INDENTED: 'indented',\n TWO_LINE: 'two-line',\n THREE_LINE: 'three-line',\n WRAP: 'wrap'\n};\n\nconst attributes = {\n ...observedAttributes\n};\n\nconst events = {\n SCOPE_TEST: `${elementName}-item-scope-test`\n} as const;\n\nexport const LIST_CONSTANTS = {\n elementName,\n attributes,\n events\n};\n\nexport const ListComponentItemRole = {\n list: 'listitem',\n listbox: 'option',\n menu: 'menuitem'\n};\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\nimport { IListItemComponent } from './list-item';\n\nconst elementName = `${COMPONENT_NAME_PREFIX}list-item`;\n\nconst observedAttributes = {\n HREF: 'href',\n TARGET: 'target',\n DOWNLOAD: 'download',\n REL: 'rel',\n STATIC: 'static',\n NON_INTERACTIVE: 'non-interactive',\n DISABLED: 'disabled',\n SELECTED: 'selected',\n ACTIVE: 'active',\n VALUE: 'value',\n DENSE: 'dense',\n PROPAGATE_CLICK: 'propagate-click',\n INDENTED: 'indented',\n TWO_LINE: 'two-line',\n THREE_LINE: 'three-line',\n WRAP: 'wrap'\n};\n\nconst attributes = {\n ...observedAttributes\n};\n\nconst classes = {\n ROOT: 'forge-list-item'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n CHECKBOX_RADIO_SELECTOR: ':is(input[type=checkbox],input[type=radio],forge-checkbox,forge-radio):not(:disabled):not([forge-ignore])',\n SWITCH_SELECTOR: 'forge-switch:not([disabled]):not([forge-ignore])',\n IGNORE: '[forge-ignore],[data-forge-ignore]'\n};\n\nconst events = {\n SELECT: `${elementName}-select`\n};\n\nexport const LIST_ITEM_CONSTANTS = {\n elementName,\n observedAttributes,\n attributes,\n classes,\n selectors,\n events\n};\n\nexport interface IListItemSelectEventData<T = unknown> {\n value: T;\n listItem: IListItemComponent;\n}\n", "import { getShadowElement, isDeepEqual, toggleAttribute } from '@tylertech/forge-core';\nimport { replaceElement } from '../../core/utils/utils';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { FOCUS_INDICATOR_CONSTANTS, IFocusIndicatorComponent } from '../../focus-indicator';\nimport { IStateLayerComponent, STATE_LAYER_CONSTANTS } from '../../state-layer';\nimport { IListComponent } from '../list/list';\nimport { ListComponentItemRole, LIST_CONSTANTS } from '../list/list-constants';\nimport { IListItemComponent } from './list-item';\nimport { LIST_ITEM_CONSTANTS } from './list-item-constants';\nimport { ISwitchComponent } from '../../switch';\n\nexport interface IListItemAdapter extends IBaseAdapter<IListItemComponent> {\n initialize(): void;\n setHref(href: string): void;\n setAnchorTarget(target: string): void;\n setAnchorDownload(download: string): void;\n setAnchorRel(rel: string): void;\n setNonInteractive(value: boolean): void;\n setDisabled(value: boolean): void;\n setActive(value: boolean): void;\n trySelect(value: unknown): boolean | null;\n tryToggleSelectionControl(value?: boolean): void;\n isFocused(): boolean;\n setFocus(): void;\n animateStateLayer(): void;\n clickAnchor(): void;\n clickHost(): void;\n}\n\nexport class ListItemAdapter extends BaseAdapter<IListItemComponent> implements IListItemAdapter {\n private _rootElement: HTMLElement | HTMLAnchorElement;\n private _focusIndicatorElement: IFocusIndicatorComponent;\n private _stateLayerElement: IStateLayerComponent;\n\n constructor(component: IListItemComponent) {\n super(component);\n this._rootElement = getShadowElement(component, LIST_ITEM_CONSTANTS.selectors.ROOT);\n this._focusIndicatorElement = getShadowElement(component, FOCUS_INDICATOR_CONSTANTS.elementName) as IFocusIndicatorComponent;\n this._stateLayerElement = getShadowElement(component, STATE_LAYER_CONSTANTS.elementName) as IStateLayerComponent;\n }\n\n public initialize(): void {\n // Attempt to inherit state for corresponding properties from our parent list\n const list = this._getParentList();\n if (list) {\n this._inheritParentListProps(list);\n }\n\n this._rootElement.tabIndex = this._component.nonInteractive || this._component.disabled ? -1 : 0;\n\n if (!this._component.hasAttribute('role')) {\n this._setRole(list);\n }\n }\n\n public setHref(href: string): void {\n if (href) {\n if (this._rootElement.tagName !== 'A') {\n const anchor = this._createAnchorRootElement();\n this._rootElement = replaceElement(this._rootElement, anchor);\n }\n (this._rootElement as HTMLAnchorElement).href = href;\n } else if (this._rootElement.tagName === 'A') {\n const defaultEl = this._createDefaultRootElement();\n this._rootElement = replaceElement(this._rootElement, defaultEl);\n }\n }\n\n public setAnchorTarget(target: string): void {\n if (this._rootElement.tagName === 'A') {\n (this._rootElement as HTMLAnchorElement).target = target;\n }\n }\n\n public setAnchorDownload(download: string): void {\n if (this._rootElement.tagName === 'A') {\n (this._rootElement as HTMLAnchorElement).download = download;\n }\n }\n\n public setAnchorRel(rel: string): void {\n if (this._rootElement.tagName === 'A') {\n (this._rootElement as HTMLAnchorElement).rel = rel;\n }\n }\n\n public setNonInteractive(value: boolean): void {\n this._rootElement.tabIndex = value ? -1 : 0;\n\n if (value) {\n this._focusIndicatorElement.remove();\n this._stateLayerElement.remove();\n } else {\n this._rootElement.append(this._focusIndicatorElement, this._stateLayerElement);\n }\n }\n\n public setDisabled(value: boolean): void {\n this._rootElement.tabIndex = value ? -1 : 0;\n toggleAttribute(this._component, value, 'aria-disabled', 'true');\n\n if (value) {\n this._focusIndicatorElement.remove();\n this._stateLayerElement.remove();\n } else {\n this._rootElement.append(this._focusIndicatorElement, this._stateLayerElement);\n }\n }\n\n public setActive(value: boolean): void {\n this._focusIndicatorElement.active = value;\n }\n\n /**\n * Attempts to set the selected state of the list item element and it's visual indicators\n * @param value The value to compare to the parent list element's selected value\n * @returns Returns whether the list item is selected, or null otherwise.\n */\n public trySelect(value: unknown): boolean | null {\n const list = this._getParentList();\n if (list?.selectedValue === undefined) {\n return null;\n }\n\n const listValues = Array.isArray(list.selectedValue) ? list.selectedValue : [list.selectedValue];\n const isSelected = listValues.some(v => isDeepEqual(v, value));\n\n this.tryToggleSelectionControl(isSelected);\n return isSelected;\n }\n\n /**\n * Attempts to toggle a checkbox radio button, or switch within the list item if it can find one.\n */\n public tryToggleSelectionControl(value?: boolean): void {\n const checkable = this._component.querySelector(LIST_ITEM_CONSTANTS.selectors.CHECKBOX_RADIO_SELECTOR) as HTMLInputElement;\n if (checkable) {\n const force = typeof value === 'boolean';\n const currentState = checkable.checked;\n \n // Check if we are just toggling or forcing to a specific checked state\n checkable.checked = force ? value as boolean : !checkable.checked;\n\n // TODO: This seems weird... Should we be dispatching events on slotted elements when changes are made programmatically?\n if (!force || currentState !== value) {\n checkable.dispatchEvent(new Event('change', { bubbles: true }));\n }\n } else {\n // Special case handling for the Forge switch element since it doesn't have a checked property\n const switchEl = this._component.querySelector(LIST_ITEM_CONSTANTS.selectors.SWITCH_SELECTOR) as ISwitchComponent;\n if (!switchEl) {\n return;\n }\n \n const force = typeof value === 'boolean';\n const currentState = switchEl.on;\n\n // Check if we are just toggling or forcing to a specific checked state\n switchEl.on = force ? value as boolean : !switchEl.on;\n\n // TODO: This seems weird... Should we be dispatching events on slotted elements when changes are made programmatically?\n if (!force || currentState !== value) {\n switchEl.dispatchEvent(new CustomEvent('forge-switch-change', { bubbles: true, detail: switchEl.on }));\n }\n }\n }\n\n public isFocused(): boolean {\n return this._component.matches(':focus');\n }\n\n public setFocus(): void {\n this._rootElement.focus({ preventScroll: true });\n }\n\n public animateStateLayer(): void {\n this._stateLayerElement.playAnimation();\n }\n\n public clickAnchor(): void {\n if (this._rootElement.tagName === 'A') {\n (this._rootElement as HTMLAnchorElement).click();\n }\n }\n\n public clickHost(): void {\n // Calling click() on the prototype ensures we don't end up in an infinite\n // recursion since the host overrides the HTMLElement.click() method\n HTMLElement.prototype.click.call(this._component);\n }\n\n private _createAnchorRootElement(): HTMLAnchorElement {\n const a = document.createElement('a');\n a.classList.add(LIST_ITEM_CONSTANTS.classes.ROOT);\n a.setAttribute('part', 'root');\n if (this._component.href) {\n a.href = this._component.href;\n }\n if (this._component.target) {\n a.target = this._component.target;\n }\n if (this._component.download) {\n a.download = this._component.download;\n }\n if (this._component.rel) {\n a.rel = this._component.rel;\n }\n return a;\n }\n\n private _createDefaultRootElement(): HTMLElement {\n const div = document.createElement('div');\n div.classList.add(LIST_ITEM_CONSTANTS.classes.ROOT);\n div.setAttribute('part', 'root');\n div.tabIndex = this._component.nonInteractive || this._component.disabled ? -1 : 0;\n return div;\n }\n\n private _getParentList(): IListComponent | null {\n return this._component.closest(LIST_CONSTANTS.elementName);\n }\n\n private _inheritParentListProps(list: IListComponent): void {\n if (list.hasAttribute(LIST_CONSTANTS.attributes.NON_INTERACTIVE) || list.hasAttribute(LIST_CONSTANTS.attributes.STATIC)) {\n this._component.nonInteractive = true;\n }\n if (list.hasAttribute(LIST_CONSTANTS.attributes.DISABLED)) {\n this._component.disabled = true;\n }\n if (list.hasAttribute(LIST_CONSTANTS.attributes.DENSE)) {\n this._component.dense = true;\n }\n if (list.getAttribute(LIST_CONSTANTS.attributes.PROPAGATE_CLICK) === 'false') {\n this._component.propagateClick = false;\n }\n if (list.hasAttribute(LIST_CONSTANTS.attributes.INDENTED)) {\n this._component.indented = true;\n }\n if (list.hasAttribute(LIST_CONSTANTS.attributes.TWO_LINE)) {\n this._component.twoLine = true;\n }\n if (list.hasAttribute(LIST_CONSTANTS.attributes.THREE_LINE)) {\n this._component.threeLine = true;\n }\n }\n\n private _setRole(list: IListComponent | null): void {\n const listRole = list?.getAttribute('role');\n const role = ListComponentItemRole[listRole as string] ?? 'listitem';\n this._component.setAttribute('role', role);\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { IListItemAdapter } from './list-item-adapter';\nimport { IListItemSelectEventData, LIST_ITEM_CONSTANTS } from './list-item-constants';\n\nexport interface IListItemFoundation extends ICustomElementFoundation {\n href: string;\n target: string;\n download: string;\n rel: string;\n static: boolean;\n nonInteractive: boolean;\n disabled: boolean;\n selected: boolean;\n active: boolean;\n value: unknown;\n dense: boolean;\n propagateClick: boolean;\n indented: boolean;\n twoLine: boolean;\n threeLine: boolean;\n wrap: boolean;\n setFocus(): void;\n}\n\nexport class ListItemFoundation implements IListItemFoundation {\n private _href: string;\n private _target = '';\n private _download = '';\n private _rel = '';\n private _nonInteractive = false;\n private _disabled = false;\n private _selected = false;\n private _active = false;\n private _value: unknown;\n private _dense = false;\n private _propagateClick = true;\n private _indented = false;\n private _twoLine = false;\n private _threeLine = false;\n private _wrap = false;\n\n private _clickListener: EventListener;\n private _pointerDownListener: EventListener;\n private _keydownListener: EventListener;\n\n constructor(private _adapter: IListItemAdapter) {\n this._clickListener = this._onClick.bind(this);\n this._pointerDownListener = this._onPointerDown.bind(this);\n this._keydownListener = this._onKeydown.bind(this);\n }\n\n public initialize(): void {\n this._adapter.initialize();\n\n if (!this._nonInteractive && !this._disabled) {\n this._adapter.addHostListener('click', this._clickListener);\n this._adapter.addHostListener('keydown', this._keydownListener);\n\n if (!this._propagateClick) {\n this._adapter.addHostListener('pointerdown', this._pointerDownListener);\n }\n }\n }\n\n public disconnect(): void {\n this._adapter.removeHostListener('click', this._clickListener);\n this._adapter.removeHostListener('pointerdown', this._pointerDownListener);\n this._adapter.removeHostListener('keydown', this._keydownListener);\n }\n\n public setFocus(): void {\n this._adapter.setFocus();\n }\n\n public click(): void {\n if (this._href) {\n this._adapter.clickAnchor();\n } else {\n this._adapter.clickHost();\n }\n }\n\n private _onPointerDown(evt: MouseEvent): void {\n if (this._adapter.isFocused()) {\n evt.preventDefault();\n }\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n if (evt.key === 'Enter' || evt.key === ' ') {\n if (!this._href && evt.key === ' ') {\n evt.preventDefault();\n }\n this._adapter.animateStateLayer();\n this._select(evt.target as HTMLElement);\n }\n }\n\n private _onClick(event: MouseEvent): void {\n this._select(event.target as HTMLElement);\n }\n\n private _select(targetElement: HTMLElement): void {\n const ignoreElement = targetElement?.matches(LIST_ITEM_CONSTANTS.selectors.IGNORE);\n if (this._nonInteractive || this._disabled || ignoreElement) {\n return;\n }\n\n if (!this._adapter.isFocused() && this._propagateClick) {\n this.setFocus();\n }\n\n // If the target was not a checkbox or radio button, attempt to find one and toggle its checked state\n if (!targetElement.matches(LIST_ITEM_CONSTANTS.selectors.CHECKBOX_RADIO_SELECTOR)) {\n this._adapter.tryToggleSelectionControl();\n }\n\n const data: IListItemSelectEventData = {\n value: this._value,\n listItem: this._adapter.hostElement\n };\n this._adapter.emitHostEvent(LIST_ITEM_CONSTANTS.events.SELECT, data);\n }\n\n public get href(): string {\n return this._href;\n }\n public set href(value: string) {\n if (this._href !== value) {\n this._href = value;\n this._adapter.setHref(this._href);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.HREF, !!this._href, this._href);\n }\n }\n\n public get target(): string {\n return this._target;\n }\n public set target(value: string) {\n if (this._target !== value) {\n this._target = value;\n if (this._href) {\n this._adapter.setAnchorTarget(this._target);\n }\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.TARGET, !!this._target, this._target);\n }\n }\n\n public get download(): string {\n return this._download;\n }\n public set download(value: string) {\n if (this._download !== value) {\n this._download = value;\n this._adapter.setAnchorDownload(this._download);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.DOWNLOAD, !!this._download, this._download);\n }\n }\n\n public get rel(): string {\n return this._rel;\n }\n public set rel(value: string) {\n if (this._rel !== value) {\n this._rel = value;\n this._adapter.setAnchorRel(this._rel);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.REL, !!this._rel, this._rel);\n }\n }\n\n public get static(): boolean {\n return this.nonInteractive;\n }\n public set static(value: boolean) {\n this.nonInteractive = value;\n }\n\n public get nonInteractive(): boolean {\n return this._nonInteractive;\n }\n public set nonInteractive(value: boolean) {\n if (this._nonInteractive !== value) {\n this._nonInteractive = value;\n if (this._nonInteractive) {\n this._adapter.removeHostListener('click', this._clickListener);\n } else {\n this._adapter.addHostListener('click', this._clickListener);\n }\n this._adapter.setNonInteractive(this._nonInteractive);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.STATIC, this._nonInteractive);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.NON_INTERACTIVE, this._nonInteractive);\n }\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n if (this._disabled) {\n this._adapter.removeHostListener('click', this._clickListener);\n } else {\n this._adapter.addHostListener('click', this._clickListener);\n }\n this._adapter.setDisabled(this._disabled);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(value: boolean) {\n if (this._selected !== value) {\n this._selected = value;\n this._adapter.tryToggleSelectionControl(this._selected);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.SELECTED, this._selected);\n }\n }\n\n public get active(): boolean {\n return this._active;\n }\n public set active(value: boolean) {\n if (this._active !== value) {\n this._active = value;\n this._adapter.setActive(this._active);\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.ACTIVE, this._active);\n }\n }\n\n public get value(): unknown {\n return this._value;\n }\n public set value(value: unknown) {\n this._value = value;\n const isSelected = this._adapter.trySelect(this._value);\n if (isSelected !== null && isSelected !== this._selected) {\n this.selected = isSelected;\n }\n }\n\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n if (this._dense !== value) {\n this._dense = value;\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.DENSE, this._dense);\n }\n }\n\n public get propagateClick(): boolean {\n return this._propagateClick;\n }\n public set propagateClick(value: boolean) {\n if (this._propagateClick !== value) {\n this._propagateClick = value;\n\n if (this._propagateClick) {\n this._adapter.removeHostListener('pointerdown', this._pointerDownListener);\n } else {\n this._adapter.addHostListener('pointerdown', this._pointerDownListener);\n }\n\n this._adapter.setHostAttribute(LIST_ITEM_CONSTANTS.attributes.PROPAGATE_CLICK, this._propagateClick ? 'true' : 'false');\n }\n }\n\n public get indented(): boolean {\n return this._indented;\n }\n public set indented(value: boolean) {\n if (this._indented !== value) {\n this._indented = value;\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.INDENTED, this._indented);\n }\n }\n\n public get twoLine(): boolean {\n return this._twoLine;\n }\n public set twoLine(value: boolean) {\n if (this._twoLine !== value) {\n this._twoLine = value;\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.TWO_LINE, this._twoLine);\n }\n }\n\n public get threeLine(): boolean {\n return this._threeLine;\n }\n public set threeLine(value: boolean) {\n if (this._threeLine !== value) {\n this._threeLine = value;\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.THREE_LINE, this._threeLine);\n }\n }\n\n public get wrap(): boolean {\n return this._wrap;\n }\n public set wrap(value: boolean) {\n if (this._wrap !== value) {\n this._wrap = value;\n this._adapter.toggleHostAttribute(LIST_ITEM_CONSTANTS.attributes.WRAP, this._wrap);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, ICustomElement, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { ListItemAdapter } from './list-item-adapter';\nimport { ListItemFoundation } from './list-item-foundation';\nimport { IListItemSelectEventData, LIST_ITEM_CONSTANTS } from './list-item-constants';\nimport { StateLayerComponent } from '../../state-layer';\nimport { FocusIndicatorComponent } from '../../focus-indicator';\n\nconst template = '<template><div class=\\\"forge-list-item\\\" tabindex=\\\"0\\\" part=\\\"root\\\"><slot name=\\\"leading\\\"></slot><slot name=\\\"avatar\\\"></slot><div class=\\\"text-container\\\" part=\\\"text-container\\\"><slot></slot><slot name=\\\"title\\\"></slot><slot name=\\\"primary-text\\\"></slot><slot name=\\\"subtitle\\\"></slot><slot name=\\\"secondary-text\\\"></slot><slot name=\\\"tertiary-text\\\"></slot><slot name=\\\"tertiary-title\\\"></slot></div><slot name=\\\"trailing\\\"></slot><forge-state-layer exportparts=\\\"surface:state-layer\\\"></forge-state-layer><forge-focus-indicator part=\\\"focus-indicator\\\" inward></forge-focus-indicator></div></template>';\nconst styles = ':host{--_list-item-indent:var(--forge-list-item-indent, 56px);--_list-item-dense-indent:var(--forge-list-item-dense-indent, var(--forge-spacing-xxlarge, 48px))}:host{display:block;outline:0}:host([hidden]){display:none}.forge-list-item{--_list-item-background-color:var(--forge-list-item-background-color, transparent);--_list-item-shape:var(--forge-list-item-shape, 0);--_list-item-padding:var(--forge-list-item-padding, 0 var(--forge-spacing-medium, 16px));--_list-item-margin:var(--forge-list-item-margin, 0);--_list-item-height:var(--forge-list-item-height, 48px);--_list-item-dense-height:var(--forge-list-item-dense-height, 32px);--_list-item-cursor:var(--forge-list-item-cursor, pointer);--_list-item-gap:var(--forge-list-item-gap, var(--forge-spacing-xlarge, 32px));--_list-item-supporting-text-color:var(--forge-list-item-supporting-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-supporting-text-font-size:var(--forge-list-item-supporting-text-font-size, var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1))));--_list-item-supporting-text-font-weight:var(--forge-list-item-supporting-text-font-weight, var(--forge-typography-body2-font-weight, 400));--_list-item-supporting-text-line-height:var(--forge-list-item-supporting-text-line-height, 1.5rem);--_list-item-selected-color:var(--forge-list-item-selected-color, var(--forge-theme-primary, #3f51b5));--_list-item-selected-opacity:var(--forge-list-item-selected-opacity, 0.08);--_list-item-selected-leading-color:var(--forge-list-item-selected-leading-color, var(--_list-item-selected-color));--_list-item-selected-trailing-color:var(--forge-list-item-selected-trailing-color, var(--_list-item-selected-color));--_list-item-selected-supporting-text-color:var(--forge-list-item-selected-supporting-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-disabled-opacity:var(--forge-list-item-disabled-opacity, 0.38);--_list-item-disabled-cursor:var(--forge-list-item-disabled-cursor, not-allowed);--_list-item-one-line-height:var(--forge-list-item-one-line-height, var(--_list-item-height));--_list-item-two-line-height:var(--forge-list-item-two-line-height, var(--forge-list-item-height, 72px));--_list-item-three-line-height:var(--forge-list-item-three-line-height, var(--forge-list-item-height, 88px));--_list-item-dense-one-line-height:var(--forge-list-item-dense-one-line-height, var(--_list-item-dense-height));--_list-item-dense-two-line-height:var(--forge-list-item-dense-two-line-height, var(--forge-list-item-dense-height, 56px));--_list-item-dense-three-line-height:var(--forge-list-item-dense-three-line-height, var(--forge-list-item-dense-height, 72px));--_list-item-dense-font-size:var(--forge-list-item-dense-font-size, 0.875rem);--_list-item-dense-gap:var(--forge-list-item-dense-gap, var(--forge-spacing-xsmall, 8px));--_list-item-leading-selected-color:var(--forge-list-item-leading-selected-color, var(--_list-item-selected-color));--_list-item-trailing-selected-color:var(--forge-list-item-trailing-selected-color, var(--_list-item-selected-color));--_list-item-avatar-background-color:var(--forge-list-item-avatar-background-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-avatar-color:var(--forge-list-item-avatar-color, var(--forge-theme-on-primary, #ffffff));--_list-item-avatar-shape:var(--forge-list-item-avatar-shape, var(--forge-shape-round, 50%));--_list-item-avatar-size:var(--forge-list-item-avatar-size, 40px);--_list-item-wrap-padding:var(--forge-list-item-wrap-padding, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-medium, 16px))}.forge-list-item{position:relative;display:-webkit-box;display:flex;gap:var(--_list-item-gap);-webkit-box-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;text-decoration:none;background-color:var(--_list-item-background-color);border-radius:var(--_list-item-shape);-webkit-tap-highlight-color:transparent;height:var(--_list-item-height);min-height:var(--_list-item-height);padding:var(--_list-item-padding);margin:var(--_list-item-margin);cursor:var(--_list-item-cursor)}:host([non-interactive]) .forge-list-item{cursor:initial}:host([disabled]) .forge-list-item{cursor:var(--_list-item-disabled-cursor);opacity:var(--_list-item-disabled-opacity)}:host([two-line]) .forge-list-item{height:var(--_list-item-two-line-height);min-height:var(--_list-item-two-line-height)}:host([three-line]) .forge-list-item{height:var(--_list-item-three-line-height);min-height:var(--_list-item-three-line-height)}:host([dense]) .forge-list-item{--_list-item-gap:var(--_list-item-dense-gap);height:var(--_list-item-dense-one-line-height);min-height:var(--_list-item-dense-one-line-height)}:host([dense]) .text-container{font-size:var(--_list-item-dense-font-size)}:host([dense][indented]){-webkit-margin-start:var(--_list-item-dense-indent);margin-inline-start:var(--_list-item-dense-indent)}:host([dense][two-line]) .forge-list-item{height:var(--_list-item-dense-two-line-height);min-height:var(--_list-item-dense-two-line-height)}:host([dense][three-line]) .forge-list-item{height:var(--_list-item-dense-three-line-height);min-height:var(--_list-item-dense-three-line-height)}:host([selected]) .forge-list-item{color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item::before{content:\\\"\\\";position:absolute;inset:0;border-radius:inherit;opacity:var(--_list-item-selected-opacity);background-color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=leading]),:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=leading]){color:var(--_list-item-leading-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-trailing-selected-color)}:host([selected]) .text-container{color:var(--_list-item-selected-color)}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_list-item-selected-color)}:host([indented]){-webkit-margin-start:var(--_list-item-indent);margin-inline-start:var(--_list-item-indent)}a.forge-list-item{color:inherit}.text-container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, \\\"Roboto\\\", sans-serif));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body2-text-decoration,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:var(--_list-item-supporting-text-font-size);font-weight:var(--_list-item-supporting-text-font-weight);line-height:var(--_list-item-supporting-text-line-height);-webkit-box-flex:1;flex:1}slot[name=secondary-text]::slotted(*),slot[name=subtitle]::slotted(*),slot[name=tertiary-text]::slotted(*),slot[name=tertiary-title]::slotted(*){-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);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--_list-item-supporting-text-color);display:block}:host([selected]) slot[name=secondary-text]::slotted(*),:host([selected]) slot[name=subtitle]::slotted(*),:host([selected]) slot[name=tertiary-text]::slotted(*),:host([selected]) slot[name=tertiary-title]::slotted(*){color:var(--_list-item-selected-supporting-text-color)}::slotted([slot=avatar]){background-color:var(--_list-item-avatar-background-color);color:var(--_list-item-avatar-color);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor;-webkit-margin-end:calc((var(--_list-item-gap)/ 2) * -1);margin-inline-end:calc((var(--_list-item-gap)/ 2) * -1);min-width:var(--_list-item-avatar-size);min-height:var(--_list-item-avatar-size);border-radius:var(--_list-item-avatar-shape)}::slotted([slot=leading]),::slotted([slot=trailing]){color:var(--_list-item-supporting-text-color);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor}:host([selected]) ::slotted([slot=leading]){color:var(--_list-item-leading-selected-color)}:host([selected]) ::slotted([slot=trailing]){color:var(--_list-item-trailing-selected-color)}:host([wrap]) .forge-list-item{--_list-item-padding:var(--_list-item-wrap-padding);height:auto}:host([wrap]) .text-container{white-space:normal;overflow:visible;text-overflow:clip;line-height:normal}:host([wrap]) slot[name=secondary-text]::slotted(*),:host([wrap]) slot[name=subtitle]::slotted(*),:host([wrap]) slot[name=tertiary-text]::slotted(*),:host([wrap]) slot[name=tertiary-title]::slotted(*){white-space:normal;overflow:visible;text-overflow:clip;line-height:normal}forge-focus-indicator{z-index:1;--forge-focus-indicator-shape:var(--forge-shape-medium, 4px)}forge-state-layer{border-radius:inherit}';\n\nexport interface IListItemComponent<T = unknown> extends ICustomElement {\n href: string;\n target: string;\n download: string;\n rel: string;\n /** @deprecated Use nonInteractive instead. */\n static: boolean;\n nonInteractive: boolean;\n disabled: boolean;\n selected: boolean;\n active: boolean;\n value: T;\n dense: boolean;\n propagateClick: boolean;\n indented: boolean;\n twoLine: boolean;\n threeLine: boolean;\n wrap: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-list-item': IListItemComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-list-item-select': CustomEvent<IListItemSelectEventData>;\n }\n}\n\n/**\n * @tag forge-list-item\n * \n * @summary List items are individual rows of content inside of a list.\n * \n * @property {string} href - The href of the anchor. This forces the list item to render as an anchor element.\n * @property {string} target - The target of the anchor when an `href` is set. Defaults to `'_blank'`.\n * @property {boolean} download - The anchor download attribute.\n * @property {boolean} rel - The anchor rel attribute.\n * @property {string} target - The target of the list item when an `href` is set. Defaults to `'_blank'`.\n * @property {boolean} nonInteractive - If true, the list item will not be interactive.\n * @property {boolean} static - If true, the list item will not be interactive. Deprecated use `nonInteractive` instead.\n * @property {boolean} disabled - Disables the list item.\n * @property {boolean} selected - Applies the selected state to the list item.\n * @property {boolean} active - Applies the active state to the list item by emulating its focused state.\n * @property {unknown} value - The unique value of the list item.\n * @property {boolean} dense - Applies the dense state to the list item.\n * @property {boolean} propagateClick - If true, the list item will not propagate click events to itself and therefore cannot receive focus.\n * @property {boolean} indented - Applies the indented state by adding margin to the start of the list item.\n * @property {boolean} twoLine - Sets the list item height to support at least two lines of text.\n * @property {boolean} threeLine - Sets the list item height to support at least three lines of text.\n * @property {boolean} wrap - Sets the list item to wrap its text content.\n * \n * @attribute {string} href - The href of the anchor This forces the list item to render as an anchor element.\n * @attribute {string} target - The target of the anchor when an `href` is set. Defaults to `'_blank'`.\n * @attribute {boolean} download - The anchor download attribute.\n * @attribute {boolean} rel - The anchor rel attribute.\n * @attribute {string} target - The target of the list item when an `href` is set. Defaults to `'_blank'`.\n * @attribute {boolean} non-interactive - If true, the list item will not be interactive.\n * @attribute {boolean} static - If true, the list item will not be interactive. Deprecated use `non-interactive` instead.\n * @attribute {boolean} disabled - Disables the list item.\n * @attribute {boolean} selected - Applies the selected state to the list item.\n * @attribute {boolean} active - Applies the active state to the list item by emulating its focused state.\n * @attribute {unknown} value - The unique value of the list item.\n * @attribute {boolean} dense - Applies the dense state to the list item.\n * @attribute {boolean} propagate-click - If applied, the list item will not propagate click events to itself and therefore cannot receive focus.\n * @attribute {boolean} indented - Applies the indented state by adding margin to the start of the list item.\n * @attribute {boolean} two-line - Sets the list item height to support at least two lines of text.\n * @attribute {boolean} three-line - Sets the list item height to support at least three lines of text.\n * @attribute {boolean} wrap - Sets the list item to wrap its text content.\n * \n * @event {CustomEvent<IListItemSelectEventData>} forge-list-item-select - Fires when the list item is selected.\n * \n * @slot - The primary text.\n * @slot primary-text - The primary text. A named alias for the default slot.\n * @slot secondary-text - The secondary text.\n * @slot tertiary-text - The tertiary text.\n * @slot title - The title element. An alias for the primary-text slot for backwards compatibility.\n * @slot subtitle - The subtitle element. An alias for the secondary-text slot for backwards compatibility.\n * @slot tertiary-title - The tertiary title element. An alias for the tertiary-text slot for backwards compatibility.\n * @slot leading - The leading content.\n * @slot trailing - The trailing element.\n * @slot avatar - The avatar content.\n * \n * @csspart root - The root container element.\n * @csspart text-container - The container for the text content.\n * @csspart focus-indicator - The forwarded focus indicator's internal indicator element.\n * @csspart state-layer - The forwarded state layer's internal surface element.\n * \n * @cssproperty --forge-list-item-background-color - The background color.\n * @cssproperty --forge-list-item-shape - The shape of the list item.\n * @cssproperty --forge-list-item-padding - The padding inside of the container element.\n * @cssproperty --forge-list-item-wrap-padding - The padding inside of the container element when `wrap` is enabled.\n * @cssproperty --forge-list-item-margin - The margin around the host element.\n * @cssproperty --forge-list-item-height - The height of the container.\n * @cssproperty --forge-list-item-dense-height - The height when in the dense state.\n * @cssproperty --forge-list-item-indent - The margin inline state when in the indented state.\n * @cssproperty --forge-list-item-cursor - The cursor when interactive.\n * @cssproperty --forge-list-item-gap - The gap between the slotted content.\n * @cssproperty --forge-list-item-supporting-text-color - The text color of the supporting text.\n * @cssproperty --forge-list-item-supporting-line-height - The line height of the supporting text.\n * @cssproperty --forge-list-item-selected-color - The color when in the selected state.\n * @cssproperty --forge-list-item-opacity - The opacity of the background color when in the disabled state.\n * @cssproperty --forge-list-item-selected-leading-color - The color of the leading content when in the selected state.\n * @cssproperty --forge-list-item-selected-trailing-color - The color of the trailing content when in the selected state.\n * @cssproperty --forge-list-item-selected-supporting-text-color - The color of the supporting text when in the selected state.\n * @cssproperty --forge-list-item-disabled-opacity - The opacity of the element when in the disabled state.\n * @cssproperty --forge-list-item-disabled-cursor - The cursor when in the disabled state.\n * @cssproperty --forge-list-item-one-line-height - The line height when in the one/single line state.\n * @cssproperty --forge-list-item-two-line-height - The line height when in the two line state.\n * @cssproperty --forge-list-item-three-line-height - The line height when in the three line state.\n * @cssproperty --forge-list-item-dense-one-line-height - The line height when in the dense one/single line state.\n * @cssproperty --forge-list-item-dense-two-line-height - The line height when in the dense two line state.\n * @cssproperty --forge-list-item-dense-three-line-height - The line height when in the dense three line state.\n * @cssproperty --forge-list-item-dense-font-size - The font size when in the dense state.\n * @cssproperty --forge-list-item-dense-indent - The margin inline state when in the dense indented state.\n * @cssproperty --forge-list-item-dense-gap - The gap between the slotted content when in the dense state.\n * @cssproperty --forge-list-item-leading-selected-color - The color of the leading content when in the selected state.\n * @cssproperty --forge-list-item-trailing-selected-color - The color of the trailing content when in the selected state.\n * @cssproperty --forge-list-item-avatar-background-color - The background color of the avatar container.\n * @cssproperty --forge-list-item-avatar-color - The foreground color of the avatar container.\n * @cssproperty --forge-list-item-avatar-shape - The shape of the avatar container.\n * @cssproperty --forge-list-item-avatar-size - The height & width of the avatar container.\n */\n@CustomElement({\n name: LIST_ITEM_CONSTANTS.elementName,\n dependencies: [\n StateLayerComponent,\n FocusIndicatorComponent\n ]\n})\nexport class ListItemComponent extends HTMLElement implements IListItemComponent {\n public static get observedAttributes(): string[] {\n return [\n LIST_ITEM_CONSTANTS.observedAttributes.HREF,\n LIST_ITEM_CONSTANTS.observedAttributes.TARGET,\n LIST_ITEM_CONSTANTS.observedAttributes.DOWNLOAD,\n LIST_ITEM_CONSTANTS.observedAttributes.REL,\n LIST_ITEM_CONSTANTS.observedAttributes.STATIC,\n LIST_ITEM_CONSTANTS.observedAttributes.NON_INTERACTIVE,\n LIST_ITEM_CONSTANTS.observedAttributes.DISABLED,\n LIST_ITEM_CONSTANTS.observedAttributes.SELECTED,\n LIST_ITEM_CONSTANTS.observedAttributes.ACTIVE,\n LIST_ITEM_CONSTANTS.observedAttributes.VALUE,\n LIST_ITEM_CONSTANTS.observedAttributes.DENSE,\n LIST_ITEM_CONSTANTS.observedAttributes.PROPAGATE_CLICK,\n LIST_ITEM_CONSTANTS.observedAttributes.INDENTED,\n LIST_ITEM_CONSTANTS.observedAttributes.TWO_LINE,\n LIST_ITEM_CONSTANTS.observedAttributes.THREE_LINE,\n LIST_ITEM_CONSTANTS.observedAttributes.WRAP\n ];\n }\n\n private _foundation: ListItemFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new ListItemFoundation(new ListItemAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case LIST_ITEM_CONSTANTS.observedAttributes.HREF:\n this.href = newValue;\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.TARGET:\n this.target = newValue;\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.DOWNLOAD:\n this.download = newValue;\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.REL:\n this.rel = newValue;\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.NON_INTERACTIVE:\n case LIST_ITEM_CONSTANTS.observedAttributes.STATIC:\n this.nonInteractive = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.SELECTED:\n this.selected = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.ACTIVE:\n this.active = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.VALUE:\n this.value = newValue;\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.PROPAGATE_CLICK:\n this.propagateClick = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.INDENTED:\n this.indented = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.TWO_LINE:\n this.twoLine = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.THREE_LINE:\n this.threeLine = coerceBoolean(newValue);\n break;\n case LIST_ITEM_CONSTANTS.observedAttributes.WRAP:\n this.wrap = coerceBoolean(newValue);\n break;\n }\n }\n\n public override focus(): void {\n this._foundation.setFocus();\n }\n\n @FoundationProperty()\n public declare href: string;\n\n @FoundationProperty()\n public declare target: string;\n\n @FoundationProperty()\n public declare download: string;\n\n @FoundationProperty()\n public declare rel: string;\n\n /** @deprecated Use nonInteractive instead. */\n @FoundationProperty()\n public declare static: boolean;\n\n @FoundationProperty()\n public declare nonInteractive: boolean;\n\n @FoundationProperty()\n public declare disabled: boolean;\n\n @FoundationProperty()\n public declare selected: boolean;\n\n @FoundationProperty()\n public declare active: boolean;\n\n @FoundationProperty()\n public declare value: unknown;\n\n @FoundationProperty()\n public declare dense: boolean;\n\n @FoundationProperty()\n public declare propagateClick: boolean;\n\n @FoundationProperty()\n public declare indented: boolean;\n\n @FoundationProperty()\n public declare twoLine: boolean;\n\n @FoundationProperty()\n public declare threeLine: boolean;\n\n @FoundationProperty()\n public declare wrap: boolean;\n\n public override click(): void {\n this._foundation.click();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { ListItemComponent } from './list-item';\n\nexport * from './list-item-adapter';\nexport * from './list-item-constants';\nexport * from './list-item-foundation';\nexport * from './list-item';\n\nexport function defineListItemComponent(): void {\n defineCustomElement(ListItemComponent);\n}\n"],
|
|
5
|
-
"mappings": "icAEA,IAAMA,EAAc,GAAGC,QAEjBC,EAAqB,CACzB,KAAM,OACN,OAAQ,SACR,gBAAiB,kBACjB,SAA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I,qBAGAS,EAAA,CADdC,EAAmB,GA5HTV,EA6HI,qBAGAS,EAAA,CADdC,EAAmB,GA/HTV,EAgII,8BAGAS,EAAA,CADdC,EAAmB,GAlITV,EAmII,wBAGAS,EAAA,CADdC,EAAmB,GArITV,EAsII,uBAGAS,EAAA,CADdC,EAAmB,GAxITV,EAyII,yBAGAS,EAAA,CADdC,EAAmB,GA3ITV,EA4II,oBA5IJA,EAANS,EAAA,CAPNE,EAAc,CACb,KAAMP,EAAoB,YAC1B,aAAc,CACZQ,EACAC,CACF,CACF,CAAC,GACYb,GCrIN,SAASc,IAAgC,CAC9CC,EAAoBC,CAAiB,CACvC",
|
|
6
|
-
"names": ["elementName", "COMPONENT_NAME_PREFIX", "observedAttributes", "attributes", "__spreadValues", "events", "LIST_CONSTANTS", "ListComponentItemRole", "elementName", "COMPONENT_NAME_PREFIX", "observedAttributes", "attributes", "__spreadValues", "classes", "selectors", "events", "LIST_ITEM_CONSTANTS", "ListItemAdapter", "BaseAdapter", "component", "getShadowElement", "LIST_ITEM_CONSTANTS", "FOCUS_INDICATOR_CONSTANTS", "STATE_LAYER_CONSTANTS", "list", "href", "anchor", "replaceElement", "defaultEl", "target", "download", "rel", "value", "toggleAttribute", "isSelected", "v", "isDeepEqual", "checkable", "force", "currentState", "switchEl", "a", "div", "LIST_CONSTANTS", "_a", "listRole", "role", "ListComponentItemRole", "ListItemFoundation", "_adapter", "evt", "event", "targetElement", "ignoreElement", "LIST_ITEM_CONSTANTS", "data", "value", "isSelected", "template", "styles", "ListItemComponent", "attachShadowTemplate", "ListItemFoundation", "ListItemAdapter", "LIST_ITEM_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "StateLayerComponent", "FocusIndicatorComponent", "defineListItemComponent", "defineCustomElement", "ListItemComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as C}from"./chunk.XZ23XHFE.js";import{b as ne}from"./chunk.QUXMLWBJ.js";import{a as J}from"./chunk.AGLI4WR4.js";import{h as ie,i as oe}from"./chunk.7AAICE77.js";import{c as Q}from"./chunk.2GUWHBUU.js";import{f as j}from"./chunk.O5WAQQNR.js";import{b as ee}from"./chunk.GG7IQL46.js";import{c as Z}from"./chunk.USTVZ6MZ.js";import{a as L}from"./chunk.WXVVOFNK.js";import{b as te}from"./chunk.5MB6CTBA.js";import{c as re}from"./chunk.OQHDHS2C.js";import{a as se,b as le}from"./chunk.SZOZIJZI.js";import{c as V,g as W,h as K}from"./chunk.RLQB7224.js";import{a as X}from"./chunk.37B332ZK.js";import{d as $,l as Y}from"./chunk.T7NWP7DB.js";import{a as q}from"./chunk.SQ3AZAHF.js";import{a as z}from"./chunk.SB2LOK2R.js";import{a}from"./chunk.NVUMRW44.js";import{a as H}from"./chunk.OLFOVKQG.js";import{a as U,b as R,c as G}from"./chunk.VRSPT7WX.js";import{a as k,e as N}from"./chunk.LNTTU2GL.js";import{k as P,o as B,p as M,r as A}from"./chunk.L4QSPQDE.js";import{a as D}from"./chunk.DJSHVUEM.js";import{a as F,b as h,c as y,j as T,k as f,l as x,n as w,o as S}from"./chunk.J2M2MXP2.js";import{a as E,d as p}from"./chunk.M3QDAYD2.js";var g=`${R}autocomplete`,he={MODE:"mode",MULTIPLE:"multiple",DEBOUNCE:"debounce",FILTER_ON_FOCUS:"filter-on-focus",FILTER_FOCUS_FIRST:"filter-focus-first",ALLOW_UNMATCHED:"allow-unmatched",POPUP_TARGET:"popup-target",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",OPEN:"open",MATCH_KEY:"match-key",FILTER_TEXT:"filter-text",DROPDOWN_ICON_OPEN:"data-forge-dropdown-icon-open"},_e={INPUT:"input",DROPDOWN_ICON:"[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",CLEAR_BUTTON:"[data-forge-autocomplete-clear],[forge-autocomplete-clear]"},me={DEFAULT_DEBOUNCE_TIME:G,NUM_SKELETON_ITEMS:3},fe={CHANGE:`${g}-change`,SELECT:`${g}-select`,SCROLLED_BOTTOM:`${g}-scrolled-bottom`},o={elementName:g,attributes:he,selectors:_e,numbers:me,events:fe},pe=(e=>(e.Default="default",e.Stateless="stateless",e))(pe||{});var O=class extends H{constructor(e){super(e);this.setInputElement()}setInputElement(){let e=B(this._component,o.selectors.INPUT,!1);return e.length&&(this._inputElement=e[0]),this._inputElement}setInputAttribute(e,t){this._inputElement.setAttribute(e,t)}addInputListener(e,t){this._inputElement.addEventListener(e,t)}removeInputListener(e,t){this._inputElement.removeEventListener(e,t)}initializeInputAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","polite"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-autocomplete","list")}isWrappingChipField(){return!!this._component.querySelector(C.elementName)}show(e,t){this._targetElement=this._getTargetElement(t),this._targetElement&&(this._listDropdown=new ie(this._targetElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-expanded","true"),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`),this._tryToggleDropdownIconRotation(!0))}async hide(e,{destroy:t=!1}={}){var n,s,u;if(this.setBusyVisibility(!1),this._tryToggleDropdownIconRotation(!1),(n=this._inputElement)==null||n.removeAttribute("aria-activedescendant"),(s=this._inputElement)==null||s.removeAttribute("aria-controls"),(u=this._inputElement)==null||u.setAttribute("aria-expanded","false"),!this._listDropdown)return;let{anchorElement:i}=this._listDropdown.dropdownElement;i&&i instanceof HTMLElement&&(i==null||i.removeEventListener(L.events.TOGGLE,e)),t?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0}setBusyVisibility(e){var t;(t=this._listDropdown)==null||t.setBusyVisibility(e)}setDismissListener(e){if(!this._listDropdown||!this._listDropdown.dropdownElement)return;let t=this._listDropdown.dropdownElement;t.anchorElement&&t.anchorElement instanceof HTMLElement&&t.anchorElement.addEventListener(L.events.TOGGLE,e)}focus(){window.requestAnimationFrame(()=>this._inputElement.focus())}setOptions(e){var t;(t=this._listDropdown)==null||t.setOptions(e)}appendOptions(e){var t;(t=this._listDropdown)==null||t.appendOptions(e)}setSelectedText(e){this._inputElement.value=e}getInputValue(){return this._inputElement.value}setInputValue(e){this._inputElement.value=e}selectInputValue(){window.requestAnimationFrame(()=>this._inputElement.select())}isFocusWithinPopup(e){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(e)}hasFocus(){let e=M(this._component.ownerDocument);return e===this._inputElement||this.isFocusWithinPopup(e)}hasInputElement(){return!!this._inputElement}setDropdownIconListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.addEventListener(e,t)})}removeDropdownIconListener(e,t){let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.removeEventListener(e,t)}setClearButtonListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.addEventListener(e,t)})}removeClearButtonListener(e,t){let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.removeEventListener(e,t)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}updateActiveDescendant(e){this._targetElement&&A(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._targetElement||(this._targetElement=this._getTargetElement(e)),this._targetElement.getBoundingClientRect().width}getPopupElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}activateSelectedOption(){var e;(e=this._listDropdown)==null||e.activateSelectedOption()}activateOptionByIndex(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:null}clearActiveOption(){var e;(e=this._listDropdown)==null||e.clearActiveOption()}setSelectedOptions(e){if(this._listDropdown){let t=e.map(i=>i.value);this._listDropdown.setSelectedValues(t)}}queueDropdownPositionUpdate(){this.getPopupElement()&&window.requestAnimationFrame(()=>{let e=this.getPopupElement();e==null||e.position()})}_getTargetElement(e){return e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement()}_getDefaultTargetElement(){let e=[se.elementName,C.elementName],t=this._component.querySelector(`:is(${e.join(",")})`);return t!=null&&t.popoverTargetElement?t.popoverTargetElement:this._component.querySelector("input")||this._component}_tryToggleDropdownIconRotation(e){let t=this._component.querySelector(o.selectors.DROPDOWN_ICON);t&&A(t,e,o.attributes.DROPDOWN_ICON_OPEN)}};var ae=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(ae||{});function v(d,c){let e=d.some(i=>h(i)&&T(i)&&i.hasOwnProperty("options")&&(i.hasOwnProperty("text")||i.hasOwnProperty("builder"))),t=d.some(i=>h(i)&&T(i)&&i.hasOwnProperty("label")&&i.hasOwnProperty("value"));return e&&c===1||t&&c===0}function ue(d,c){return d.find(e=>e.value===c)}function b(d,c,e=null){return e?!(e in d.value)||!(e in c)?!1:w(d.value[e],c[e]):w(d.value,c)}var I=class extends oe{constructor(e){super();this._adapter=e;this._isInitialized=!1;this._isDropdownOpen=!1;this._mode="default";this._multiple=!1;this._debounce=o.numbers.DEFAULT_DEBOUNCE_TIME;this._allowUnmatched=!1;this._filterOnFocus=!0;this._filterFocusFirst=!0;this._options=[];this._filterText="";this._selectedOptions=[];this._values=[];this._pendingFilterPromises=[];this._matchKey=null;this._clickListener=t=>this._onClick(t),this._focusListener=()=>this._onFocus(),this._blurListener=t=>this._onBlur(t),this._keydownListener=t=>this._onKeydown(t),this._dropdownIconClickListener=t=>this._onDropdownIconClick(t),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dropdownIconMouseDownListener=t=>this._onDropdownIconMouseDown(t),this._clearButtonListener=t=>this._onClear(t),this._dismissListener=()=>this._onDismiss(),this._activeChangeListener=t=>this._adapter.updateActiveDescendant(t),this._targetWidthCallback=()=>this._adapter.getTargetElementWidth(this._popupTarget),this._identifier=F()}async initialize(){if(!this._adapter.hasInputElement()&&!this._adapter.setInputElement())throw new Error("An input element is required as a child of the autocomplete component.");if(this._setInputListener(),this._setFilterCallback(),this._attachListeners(),this._initializeAccessibility(),this._values.length){if(!this._selectedOptions.length){try{await this._executeFilter()}catch(e){console.error(e)}this._updateSelectedOptions(this._values)}this._adapter.setSelectedText(this._getSelectedText())}this._isInitialized=!0}disconnect(){this._isInitialized&&(this._detachListeners(),this._isInitialized=!1),this._closeDropdown({destroy:!0})}async forceFilter({preserveValue:e}){this._options=[],await this._executeFilter(!0,!0),e&&this._options.push(...this._selectedOptions),this._applyValue(this._values)}_attachListeners(){this._adapter.addInputListener("click",this._clickListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.addInputListener("input",this._inputListener),this._adapter.addInputListener("keydown",this._keydownListener),this._adapter.setDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.setDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.setClearButtonListener("click",this._clearButtonListener)}_detachListeners(){this._adapter.removeInputListener("click",this._clickListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("keydown",this._keydownListener),this._adapter.removeDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.removeDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.removeClearButtonListener("click",this._clearButtonListener)}_setInputListener(){this._inputListener=e=>this._onInput(e)}_setFilterCallback(){this._filterFn=h(this._debounce)&&this._debounce>0?S(this._debounceFilter,this._debounce,!1):this._debounceFilter}_initializeAccessibility(){this._adapter.initializeInputAccessibility(this._identifier)}get _flatOptions(){return v(this._options,1)?this._options.reduce((e,t)=>e.concat(t.options),[]):this._options}_onClick(e){!this._isDropdownOpen&&this._filterOnFocus&&this._showDropdown()}_onDropdownIconMouseDown(e){e.preventDefault()}_onDropdownIconClick(e){this._isDropdownOpen?this._closeDropdown():(this._adapter.focus(),window.requestAnimationFrame(()=>this._showDropdown()))}_onClear(e){this._filterText="",this._clearValue(),this._adapter.setSelectedText(this._getSelectedText())}_onDropdownScrollEnd(){this._adapter.emitHostEvent(o.events.SCROLLED_BOTTOM)}_onFocus(){!this._isDropdownOpen&&this._adapter.getInputValue()&&!D.isMobile&&this._adapter.selectInputValue()}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._applyBlur()}_applyBlur(){this._isDropdownOpen&&this._closeDropdown(),this._mode!=="stateless"&&(this._selectedOptions.length?this._adapter.setSelectedText(this._getSelectedText()):this._allowUnmatched||(this._filterText="",this._adapter.setSelectedText("")))}_onInput(e){this._selectedOptions.length&&!this._multiple&&(!this._adapter.getInputValue()||this._allowUnmatched)&&!this._adapter.isWrappingChipField()&&(this._selectedOptions=[],this._values=[],this._emitChangeEvent()),this._filterText=this._adapter.getInputValue(),this._filterFn()}async _debounceFilter({checkFocus:e=!0}={}){if(!e&&!this._adapter.hasFocus()){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}let t=this._filterText,i=this._executeFilter();this._pendingFilterPromises.push(i),this._isDropdownOpen?this._adapter.setBusyVisibility(!0):this._showDropdown({filter:!1});try{await i}catch(n){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}if(t===this._filterText)this._pendingFilterPromises=[],this._onFilterComplete();else{let n=this._pendingFilterPromises.indexOf(i);n!==-1&&this._pendingFilterPromises.splice(n,1)}}_onKeydown(e){switch(e.key){case"Tab":this._isDropdownOpen&&!this._multiple&&this._selectActiveOption(!1);break;case"Esc":case"Escape":this._isDropdownOpen&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Down":case"ArrowDown":e.preventDefault(),this._isDropdownOpen?this._adapter.propagateKey(e.key):this._showDropdown({activateFirst:!0,activateSelected:!0});break;case"Up":case"ArrowUp":e.preventDefault(),this._isDropdownOpen&&this._adapter.propagateKey(e.key);break;case"Enter":case"Home":case"End":this._isDropdownOpen&&(e.key==="Enter"&&e.stopPropagation(),e.preventDefault(),this._adapter.propagateKey(e.key));break;case"Backspace":case"Delete":let t=e.target,i=this._adapter.getInputValue(),n=t.value.substring(t.selectionStart,t.selectionEnd)===t.value,s=i.length===1&&t.selectionEnd===1,u=i.length===1&&t.selectionEnd===0,_=!i||n||s||u;!this._adapter.isWrappingChipField()&&_&&!this._multiple&&this._values.length&&this._clearValue();break}}_executeFilter(e=!0,t=!1){if(!this._filter||typeof this._filter!="function")throw new Error('A filter callback must be provided. Did you set the "filter" property?');let i=this._filter,n=e?this._filterText:"",s=t?this._getValue():null;return new Promise((u,_)=>Promise.resolve(i(n,s)).then(l=>{this._options=l,u(this._options)}).catch(l=>_(`An unexpected error occurred while filtering: ${l}`)))}_onFilterComplete(){if(!this._adapter.hasFocus()){this._isDropdownOpen&&this._closeDropdown();return}if(this._options.length){let e=this._allowUnmatched&&!this._selectedOptions.length;this._dropdownReady({userTriggered:e}),this._filterFocusFirst&&this._filterText&&this._adapter.activateFirstOption()}else this._closeDropdown()}_clearValue(){this._selectedOptions=[],this._values=[],this._isDropdownOpen&&(this._adapter.setSelectedOptions([]),this._adapter.clearActiveOption()),this._emitChangeEvent()}async _showDropdown({filter:e=!0,userTriggered:t=!0,activateFirst:i=!1,activateSelected:n=!1}={}){let s=this._allowUnmatched&&!this._selectedOptions.length;this._isDropdownOpen=!0;let u;if(this._optionBuilder){let l=this._optionBuilder;u=(m,ce)=>l(m,this._filterText,ce)}let _={options:this._options,multiple:this._multiple,selectedValues:[...this._values],id:`forge-autocomplete-${this._identifier}`,asyncStyle:"skeleton",optionLimit:this._optionLimit,popupClasses:this._popupClasses,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,transform:l=>{if(this._filterText){let m=z(l,this._filterText);if(m)return m}return l},allowBusy:!0,optionBuilder:u,syncWidth:this._syncPopupWidth,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,selectCallback:l=>this._onSelect(l),closeCallback:()=>this._closeDropdown()};if(this._adapter.show(_,this._popupTarget),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen),e){this._options.length&&this._adapter.setBusyVisibility(!0);try{await this._executeFilter(s)}catch(l){console.error(l)}this._updateSelectedOptions(this._values)}this._pendingFilterPromises.length||this._dropdownReady({userTriggered:t,activateFirst:i,activateSelected:n})}_dropdownReady({userTriggered:e=!0,activateFirst:t=!1,activateSelected:i=!1}={}){if(!this._isDropdownOpen||!this._options.length||e&&!this._adapter.hasFocus()){this._closeDropdown();return}this._sortSelectedOptions(),this._adapter.setBusyVisibility(!1),this._adapter.setOptions(this._options),this._adapter.setSelectedOptions(this._selectedOptions),this._adapter.setDismissListener(this._dismissListener),i&&this._selectedOptions.length?this._adapter.activateSelectedOption():t&&this._adapter.activateFirstOption()}_closeDropdown({destroy:e=!1}={}){this._multiple&&(this._filterText=""),this._isDropdownOpen=!1,this._adapter.hide(this._dismissListener,{destroy:e}),this._sortSelectedOptions(),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen)}_sortSelectedOptions(){if(this._multiple&&this._selectedOptions.length&&v(this._options,0)){let e=[],t=[];this._options.forEach(i=>{this._selectedOptions.find(n=>b(n,i.value,this._matchKey))?e.push(i):t.push(i)}),this._options=[...e,...t]}}async _onSelect(e,t=!0){if(this._valueChanging)return;if(this._mode==="stateless"){let n={value:e};this._adapter.emitHostEvent(o.events.SELECT,n,!0,!0)&&(this._filterText="",this._multiple||this._closeDropdown());return}let i=()=>{let s=this._flatOptions.find(l=>b(l,e,this._matchKey)),u=s?s.value:"",_=s?s.label:"";if(this._multiple){let l=ue(this._selectedOptions,u);if(l){let m=this._selectedOptions.indexOf(l);this._selectedOptions.splice(m,1)}else this._selectedOptions.push(s)}else h(u)?(this._selectedOptions[0]=s,this._filterText=_):(this._selectedOptions=[],this._filterText="");this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions),this._values=this._selectedOptions.map(l=>l.value),this._adapter.setSelectedText(this._getSelectedText()),!D.isMobile&&t&&this._adapter.selectInputValue(),this._emitChangeEvent(),this._tryUpdateDropdownPosition()};this._isDropdownOpen&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"?(this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,e,this._matchKey)),await this._valueChanging?i():this._tryUpdateDropdownPosition(),this._valueChanging=void 0):i()}_selectActiveOption(e=!0){let t=this._adapter.getActiveOptionIndex();if(typeof t=="number"&&t>=0){let i=this._flatOptions[t];i&&this._onSelect(i.value,e)}}_emitChangeEvent(){this._adapter.emitHostEvent(o.events.CHANGE,this._getValue(),!0)}_tryUpdateDropdownPosition(){this._isDropdownOpen&&this._adapter.queueDropdownPositionUpdate()}_getValue(){return this._values?this._values.length?this._multiple?[...this._values]:this._values[0]:this._multiple?[]:null:null}_getSelectedText(){var e,t;return this._adapter.isWrappingChipField()?"":this._selectedTextBuilder?this._selectedTextBuilder(this._selectedOptions):this._multiple?this._values.length?this._values.length===1?(t=(e=this._selectedOptions[0])==null?void 0:e.label)!=null?t:"":`${this._values.length} options selected`:"":this._selectedOptions.filter(i=>i&&i.label).map(i=>i.label).join(" ").trim()}_onDismiss(){this._closeDropdown()}async _applyValue(e){let t=[];this._selectedOptions=[],Array.isArray(e)?t=e:t=h(e)?[e]:[],!this._multiple&&t.length>1&&(t=[t[0]]),v(t,0)?(this._values=t.map(n=>n.value),this._selectedOptions=t):this._values=t;let i=this._flatOptions;if(t.length&&i.length&&this._updateSelectedOptions(t),this._values.length&&!this._selectedOptions.length&&this._filter&&this._isInitialized){try{await this._executeFilter(!1,!0)}catch(n){console.error(n)}this._updateSelectedOptions(this._values)}this._multiple?this._filterText="":this._filterText=this._selectedOptions.length?this._selectedOptions[0].label:"",this._isInitialized&&this._adapter.setSelectedText(this._getSelectedText()),this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions)}_updateSelectedOptions(e){let t=[...this._flatOptions,...this._selectedOptions];if(this._selectedOptions.length&&(this._selectedOptions=[]),v(e,0))for(let i of e){let n=t.find(s=>b(s,i.value,this._matchKey));n?this._selectedOptions.push(n):this._selectedOptions.push(i)}else for(let i of e){let n=t.find(s=>b(s,i,this._matchKey));n?this._selectedOptions.push(n):this._allowUnmatched&&this._selectedOptions.push({label:i,value:i})}}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._mode==="stateless"&&(this._selectedOptions=[],this._isDropdownOpen&&this._closeDropdown()),this._adapter.setHostAttribute(o.attributes.MODE,this._mode))}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._adapter.setHostAttribute(o.attributes.MULTIPLE,h(this._multiple)?this._multiple.toString():""))}get value(){return this._getValue()}set value(e){let t=[];e==null?t=[]:Array.isArray(e)?t=structuredClone(e):y(e)?t=[e]:t=[structuredClone(e)],(t.length!==this._values.length||t.some(n=>!this._values.includes(n)))&&this._applyValue(e)}get filterOnFocus(){return this._filterOnFocus}set filterOnFocus(e){this._filterOnFocus!==e&&(this._filterOnFocus=e,this._adapter.setHostAttribute(o.attributes.FILTER_ON_FOCUS,h(this._filterOnFocus)?this._filterOnFocus.toString():""))}get filterFocusFirst(){return this._filterFocusFirst}set filterFocusFirst(e){this._filterFocusFirst!==e&&(this._filterFocusFirst=e,this._adapter.toggleHostAttribute(o.attributes.FILTER_FOCUS_FIRST,this._filterFocusFirst))}get allowUnmatched(){return this._allowUnmatched}set allowUnmatched(e){this._allowUnmatched!==e&&(this._allowUnmatched=e,h(this._allowUnmatched)&&this._adapter.setHostAttribute(o.attributes.ALLOW_UNMATCHED,this._allowUnmatched.toString()))}get matchKey(){return this._matchKey}set matchKey(e){this._matchKey!==e&&(this._matchKey=e)}get popupTarget(){return this._popupTarget}set popupTarget(e){this._popupTarget!==e&&(this._popupTarget=e)}get filterText(){return this._filterText}set filterText(e){this._filterText!==e&&(this._filterText=this._allowUnmatched?e:"",this._isInitialized&&this._allowUnmatched&&(this._adapter.setInputValue(this._filterText),this._isDropdownOpen&&this._debounceFilter({checkFocus:!1})))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:[this._popupClasses]}set popupClasses(e){this._popupClasses!==e&&(this._popupClasses=Array.isArray(e)?[...e]:[e])}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}set popupFooterBuilder(e){this._popupFooterBuilder=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth!==e&&(this._syncPopupWidth=e)}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit!==e&&(this._optionLimit=e)}get debounce(){return this._debounce}set debounce(e){this._debounce!==e&&(this._debounce=e,this._isInitialized&&this._setFilterCallback(),this._adapter.setHostAttribute(o.attributes.DEBOUNCE,h(this._debounce)?this._debounce.toString():""))}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get filter(){return this._filter}set filter(e){this._filter!==e&&(this._filter=e,this._isInitialized&&this._values.length&&!this._flatOptions.length&&this._filter&&this._executeFilter().then(()=>{this._updateSelectedOptions(this._values),this._adapter.setSelectedText(this._getSelectedText())}))}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e,this._selectedOptions.length&&this._adapter.setSelectedText(this._getSelectedText())}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}appendOptions(e){this._isDropdownOpen&&(this._options=[...this._options,...e],this._adapter.appendOptions(e))}get isInitialized(){return this._isInitialized}get open(){return this._isDropdownOpen}set open(e){this._isDropdownOpen!==e&&(e?this._showDropdown({userTriggered:!1}):this._closeDropdown())}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){e!==this._beforeValueChange&&(this._beforeValueChange=e)}get popupElement(){return this._adapter.getPopupElement()}};var ve="<template><slot></slot></template>",be=":host{display:block}:host([hidden]){display:none}",r=class extends J{constructor(){super();$.define([V,K,W]),N(this,ve,be),this._foundation=new I(new O(this))}static get observedAttributes(){return[o.attributes.MODE,o.attributes.MULTIPLE,o.attributes.DEBOUNCE,o.attributes.FILTER_ON_FOCUS,o.attributes.FILTER_FOCUS_FIRST,o.attributes.ALLOW_UNMATCHED,o.attributes.POPUP_TARGET,o.attributes.POPUP_CLASSES,o.attributes.OBSERVE_SCROLL,o.attributes.OBSERVE_SCROLL_THRESHOLD,o.attributes.OPTION_LIMIT,o.attributes.SYNC_POPUP_WIDTH,o.attributes.OPEN,o.attributes.MATCH_KEY,o.attributes.FILTER_TEXT]}connectedCallback(){this.querySelector(o.selectors.INPUT)?this._foundation.initialize():P(this,o.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,t,i){switch(super.attributeChangedCallback(e,t,i),e){case o.attributes.MODE:this.mode=i;break;case o.attributes.MULTIPLE:this.multiple=f(i);break;case o.attributes.DEBOUNCE:this.debounce=x(i);break;case o.attributes.FILTER_ON_FOCUS:this.filterOnFocus=f(i);break;case o.attributes.FILTER_FOCUS_FIRST:this.filterFocusFirst=f(i);break;case o.attributes.ALLOW_UNMATCHED:this.allowUnmatched=f(i);break;case o.attributes.POPUP_TARGET:this.popupTarget=i;break;case o.attributes.OPEN:this.open=f(i);break;case o.attributes.MATCH_KEY:this.matchKey=i;break;case o.attributes.FILTER_TEXT:this.filterText=i;break}}appendOptions(e){this._foundation.appendOptions(e)}openDropdown(){this.open=!0}closeDropdown(){this.open=!1}forceFilter(e={preserveValue:!1}){this._foundation.forceFilter(e)}};p([a()],r.prototype,"mode",2),p([a()],r.prototype,"multiple",2),p([a()],r.prototype,"value",2),p([a()],r.prototype,"debounce",2),p([a()],r.prototype,"filterOnFocus",2),p([a()],r.prototype,"filterFocusFirst",2),p([a()],r.prototype,"allowUnmatched",2),p([a()],r.prototype,"popupTarget",2),p([a()],r.prototype,"filterText",2),p([a()],r.prototype,"optionBuilder",2),p([a()],r.prototype,"filter",2),p([a()],r.prototype,"selectedTextBuilder",2),p([a()],r.prototype,"open",2),p([a()],r.prototype,"matchKey",2),p([a({set:!1})],r.prototype,"isInitialized",2),p([a({set:!1})],r.prototype,"popupElement",2),p([a()],r.prototype,"beforeValueChange",2),r=p([U({name:o.elementName,dependencies:[re,Z,Q,j,ne,te,ee,Y]})],r);var de=class extends q{constructor(e){super(e)}_build(){let e=document.createElement(o.elementName);return this._attachTextField(e),e}get textFieldDelegate(){return this._textFieldDelegate}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(e){this._textFieldDelegate.inputElement.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(o.events.CHANGE,t=>e(t.detail))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",t=>e(t))}_attachTextField(e){var i,n,s,u,_,l;let t={props:E({},(n=(i=this._config.options)==null?void 0:i.textFieldDelegateConfig)==null?void 0:n.props),options:E({},(u=(s=this._config.options)==null?void 0:s.textFieldDelegateConfig)==null?void 0:u.options)};t.options||(t.options={}),((_=this._config.options)==null?void 0:_.useDropdownIcon)!==!1&&!((l=t.options)!=null&&l.trailingElement)&&(t.options.trailingElement=this._createDropdownIconElement()),this._textFieldDelegate=new le(t),e.appendChild(this._textFieldDelegate.element)}_createDropdownIconElement(){let e={props:{slot:"trailing",name:"arrow_drop_down"},options:{attributes:{"forge-dropdown-icon":""}}};return new X(e).element}};function Rt(){k(r)}export{o as a,pe as b,O as c,ae as d,v as e,ue as f,b as g,I as h,r as i,de as j,Rt as k};
|
|
7
|
-
//# sourceMappingURL=chunk.OJ7JO4O6.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as d,d as B}from"./chunk.MFS7AVW6.js";import{a as S,b as M,c as O,d as N}from"./chunk.72BKSMAZ.js";import{a as i}from"./chunk.SZOZIJZI.js";import{e as L}from"./chunk.UV3WIHCM.js";import{c as x}from"./chunk.GBAVJILM.js";import{d as y}from"./chunk.GIENHEMN.js";import{j as A}from"./chunk.RLQB7224.js";import{d as I}from"./chunk.T7NWP7DB.js";import{a as F}from"./chunk.NVUMRW44.js";import{a as C}from"./chunk.VRSPT7WX.js";import{a as f,e as T,f as u}from"./chunk.LNTTU2GL.js";import{r as g}from"./chunk.L4QSPQDE.js";import{a as _,k as v}from"./chunk.J2M2MXP2.js";import{d as h}from"./chunk.M3QDAYD2.js";var m=class extends O{constructor(e){super(e);this._inputElements=[];this._destroyValueChangerListeners=[];this._fieldElement=u(e,i.selectors.FIELD),this._clearButtonSlotElement=u(e,i.selectors.CLEAR_BUTTON_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(d.parts).join(", ")),this._clearButtonSlotElement.remove()}get hasValue(){return this._inputElements.some(e=>!!e.value)}get hasPlaceholder(){return this._inputElements.some(e=>!!e.placeholder)}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=u(this._fieldElement,d.selectors.POPOVER_TARGET)),this._popoverTargetElement}addRootListener(e,t){this._fieldElement.addEventListener(e,t)}removeRootListener(e,t){this._fieldElement.removeEventListener(e,t)}disableInput(e){this._inputElements.forEach(t=>t.disabled=e)}inputIsDisabled(){return this._inputElements.some(e=>e.disabled)}click(){var e;(e=this._inputElements[0])==null||e.focus()}applyLabel(e){this._inputElements.forEach(t=>{g(t,!!e,"aria-label",e!=null?e:"")})}handleDefaultSlotChange(e,t){var a;(a=this._inputMutationObserver)==null||a.disconnect();let n=e.assignedElements();n.length&&(this._inputElements=n.filter(o=>o.matches(i.selectors.INPUT)),this._fieldElement.multiline=this._inputElements.some(o=>o.tagName===i.tagNames.TEXTAREA),this._inputMutationObserver=new MutationObserver(o=>{o.forEach(l=>{if(l.attributeName){let r=l.target.getAttribute(l.attributeName),H=l.attributeName;t(H,r)}})}),this._inputElements.forEach(o=>{var l;(l=this._inputMutationObserver)==null||l.observe(o,{attributes:!0,attributeFilter:i.observedInputAttributes}),this._component.disabled&&(o.disabled=!0),Object.values(i.observedInputAttributes).forEach(p=>{let r=p;t(r,o.getAttribute(r))})}))}tryAddValueChangeListener(e,t){this._destroyValueChangerListeners.forEach(n=>n()),this._destroyValueChangerListeners=this._inputElements.map(n=>L(e,n,"value",t))}removeValueChangeListener(){this._destroyValueChangerListeners.forEach(e=>e())}tryFloatLabel(e){if(e!==void 0){this._fieldElement.floatLabel=e;return}this._fieldElement.floatLabel=this.hasValue||this.hasPlaceholder}tryConnectSlottedLabel(e){var p;if(this._inputElements.length!==1||(p=this._inputElements[0].labels)!=null&&p.length)return;let t=this._inputElements[0],n=e.assignedElements({flatten:!0}),a=n.find(r=>r.matches(i.selectors.FORGE_LABEL));if(a){a.forElement=this._component,a.clickTarget=t;return}let o=n.find(r=>r.tagName===i.tagNames.LABEL);if(!o||o.control)return;let l=t.id||`forge-input-${_()}`;t.id=l,o.htmlFor=l}connectClearButton(e){this._clearButtonSlotElement.addEventListener("click",e)}disconnectClearButton(e){this._clearButtonSlotElement.removeEventListener("click",e)}toggleClearButtonVisibility(e){e?this._fieldElement.append(this._clearButtonSlotElement):this._clearButtonSlotElement.remove()}clearInput(){this._inputElements.length&&(this._inputElements.forEach(e=>e.value=""),this._inputElements[0].focus())}};var b=class extends N{constructor(e){super(e);this._adapter=e;this._showClear=!1;this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onValueChange.bind(this);this._clearButtonClickListener=e=>this._onClearButtonClick(e)}initialize(){this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener)}disconnect(){this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeValueChangeListener()}get popoverTargetElement(){return this._adapter.popoverTargetElement}_onSlotChange(e){let t=e.target;switch(t.name){case"label":this._adapter.tryConnectSlottedLabel(t);break;case"":this._adapter.handleDefaultSlotChange(t,this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,t){switch(e){case"disabled":this.disabled=t!==null;break;case"placeholder":this._tryFloatLabel();break}}_onClearButtonClick(e){let t=new CustomEvent(i.events.CLEAR,{bubbles:!0,cancelable:!0,composed:!0});this._adapter.dispatchHostEvent(t),t.defaultPrevented||this._adapter.clearInput()}_onValueChange(){this._tryFloatLabel(),this._toggleClearButtonVisibility()}_toggleClearButtonVisibility(){this._adapter.toggleClearButtonVisibility(this._showClear&&this._hasValue&&!this.disabled)}get showClear(){return this._showClear}set showClear(e){this._showClear!==e&&(this._showClear=e,this._adapter.toggleHostAttribute(i.attributes.SHOW_CLEAR,e),e?this._adapter.connectClearButton(this._clearButtonClickListener):this._adapter.disconnectClearButton(this._clearButtonClickListener),this._toggleClearButtonVisibility())}get disabled(){return super.disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._adapter.toggleHostAttribute(d.attributes.DISABLED,e),this._adapter.setFieldProperty("disabled",e),this._adapter.disableInput(e),this._toggleClearButtonVisibility())}get labelPosition(){return super.labelPosition}set labelPosition(e){this._labelPosition!==e&&(this._labelPosition=e,this._adapter.toggleHostAttribute(d.attributes.LABEL_POSITION,!0,e),this._adapter.setFieldProperty("labelPosition",e),this._tryFloatLabel())}};var V='<template><forge-field id="field"><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><slot></slot><slot slot="end" name="end"></slot><slot slot="end" name="clear-button"><forge-icon-button tabindex="-1" dense><forge-icon name="clear"></forge-icon></forge-icon-button><forge-tooltip type="label"><slot name="clear-button-tooltip">Clear</slot></forge-tooltip></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text-start" name="support-text-start"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text-start" name="helper-text"></slot></forge-field></template>',k=":host{display:block}:host([hidden]){display:none}forge-field{display:contents}",s=class extends M{constructor(){super();T(this,V,k),this._foundation=new b(new m(this)),I.define(A)}static get observedAttributes(){return[...Object.values(S.observedAttributes),...Object.values(i.observedAttributes)]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(e,t,n){switch(super.attributeChangedCallback(e,t,n),e){case i.attributes.SHOW_CLEAR:this.showClear=v(n);break}}get popoverTargetElement(){return this._foundation.popoverTargetElement}};h([F()],s.prototype,"showClear",2),s=h([C({name:i.elementName,dependencies:[B,y,x]})],s);function Ee(){f(s)}export{m as a,b,s as c,Ee as d};
|
|
7
|
-
//# sourceMappingURL=chunk.OQHDHS2C.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/text-field/text-field-adapter.ts", "../../src/text-field/text-field-foundation.ts", "../../src/text-field/text-field.ts", "../../src/text-field/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { getShadowElement, listenOwnProperty, randomChars, toggleAttribute } from '@tylertech/forge-core';\nimport { BASE_FIELD_CONSTANTS, FIELD_CONSTANTS, IFieldComponent } from '../field';\nimport { BaseFieldAdapter, IBaseFieldAdapter } from '../field/base/base-field-adapter';\nimport { LabelComponent } from '../label';\nimport { ITextFieldComponent } from './text-field';\nimport { TextFieldInputAttributeObserver, TextFieldValueChangeListener, TEXT_FIELD_CONSTANTS } from './text-field-constants';\n\nexport interface ITextFieldAdapter extends IBaseFieldAdapter {\n readonly popoverTargetElement: HTMLElement;\n addRootListener(name: keyof HTMLElementEventMap, listener: EventListener): void;\n removeRootListener(name: keyof HTMLElementEventMap, listener: EventListener): void;\n disableInput(disabled: boolean): void;\n handleDefaultSlotChange(slot: HTMLSlotElement, listener: TextFieldInputAttributeObserver): void;\n tryAddValueChangeListener(context: unknown, listener: TextFieldValueChangeListener): void;\n removeValueChangeListener(): void;\n tryFloatLabel(force?: boolean): void;\n tryConnectSlottedLabel(slot: HTMLSlotElement): void;\n connectClearButton(listener: EventListener): void;\n disconnectClearButton(listener: EventListener): void;\n toggleClearButtonVisibility(visible: boolean): void;\n clearInput(): void;\n}\n\nexport class TextFieldAdapter extends BaseFieldAdapter implements ITextFieldAdapter {\n protected readonly _fieldElement: IFieldComponent;\n private readonly _clearButtonSlotElement: HTMLSlotElement;\n private _popoverTargetElement: HTMLElement;\n private _inputElements: (HTMLInputElement | HTMLTextAreaElement)[] = [];\n private _inputMutationObserver?: MutationObserver;\n private _destroyValueChangerListeners: (() => void)[] = [];\n\n public get hasValue(): boolean {\n return this._inputElements.some(el => !!el.value);\n }\n\n public get hasPlaceholder(): boolean {\n return this._inputElements.some(el => !!el.placeholder);\n }\n\n public get popoverTargetElement(): HTMLElement {\n if (!this._popoverTargetElement) {\n this._popoverTargetElement = getShadowElement(this._fieldElement, FIELD_CONSTANTS.selectors.POPOVER_TARGET) as HTMLElement;\n }\n return this._popoverTargetElement;\n }\n\n constructor(component: ITextFieldComponent) {\n super(component);\n this._fieldElement = getShadowElement(component, TEXT_FIELD_CONSTANTS.selectors.FIELD) as IFieldComponent;\n this._clearButtonSlotElement = getShadowElement(component, TEXT_FIELD_CONSTANTS.selectors.CLEAR_BUTTON_SLOT) as HTMLSlotElement;\n this._fieldElement.setAttribute('exportparts', Object.values(FIELD_CONSTANTS.parts).join(', '));\n this._clearButtonSlotElement.remove();\n }\n\n public addRootListener(name: keyof HTMLElementEventMap, listener: EventListener): void {\n this._fieldElement.addEventListener(name, listener);\n }\n\n public removeRootListener(name: keyof HTMLElementEventMap, listener: EventListener): void {\n this._fieldElement.removeEventListener(name, listener);\n }\n\n public disableInput(disabled: boolean): void {\n this._inputElements.forEach(el => el.disabled = disabled);\n }\n\n public inputIsDisabled(): boolean {\n return this._inputElements.some(el => el.disabled);\n }\n\n public click(): void {\n this._inputElements[0]?.focus();\n }\n\n public applyLabel(value: string | null): void {\n this._inputElements.forEach((inputElement) => {\n toggleAttribute(inputElement, !!value, 'aria-label', value ?? '');\n });\n }\n\n public handleDefaultSlotChange(slot: HTMLSlotElement, listener: TextFieldInputAttributeObserver): void {\n // Destroy the mutation observer if it exists\n this._inputMutationObserver?.disconnect();\n\n // If there are no assigned elements, return\n const assignedElements = slot.assignedElements();\n if (!assignedElements.length) {\n return;\n }\n\n // Get all the slotted inputs and textfields, if a textfield is slotted the field is multiline\n this._inputElements = assignedElements.filter(el => el.matches(TEXT_FIELD_CONSTANTS.selectors.INPUT)) as (HTMLInputElement | HTMLTextAreaElement)[];\n this._fieldElement.multiline = this._inputElements.some(el => el.tagName === TEXT_FIELD_CONSTANTS.tagNames.TEXTAREA);\n\n // Create a new mutation observer and observe each input\n this._inputMutationObserver = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.attributeName) {\n const element = mutation.target as HTMLElement;\n const attribute = element.getAttribute(mutation.attributeName);\n const attributeName = mutation.attributeName as keyof typeof TEXT_FIELD_CONSTANTS.observedInputAttributes;\n listener(attributeName, attribute);\n }\n });\n });\n this._inputElements.forEach(el => {\n this._inputMutationObserver?.observe(el, { attributes: true, attributeFilter: TEXT_FIELD_CONSTANTS.observedInputAttributes });\n\n if (this._component.disabled) {\n el.disabled = true;\n }\n\n // Call the listener with each observed attribute to capture the initial state\n Object.values(TEXT_FIELD_CONSTANTS.observedInputAttributes).forEach(value => {\n const attributeName = value as keyof typeof TEXT_FIELD_CONSTANTS.observedInputAttributes;\n listener(attributeName, el.getAttribute(attributeName as string));\n });\n });\n }\n\n public tryAddValueChangeListener(context: unknown, listener: TextFieldValueChangeListener): void {\n // Destroy the previous value change listeners\n this._destroyValueChangerListeners.forEach(callback => callback());\n\n // Add a new value change listener to each input\n this._destroyValueChangerListeners = this._inputElements.map(el => {\n return listenOwnProperty(context, el, 'value', listener);\n });\n }\n\n public removeValueChangeListener(): void {\n this._destroyValueChangerListeners.forEach(callback => callback());\n }\n\n public tryFloatLabel(force?: boolean): void {\n // Force the label to float if specified\n if (force !== undefined) {\n this._fieldElement.floatLabel = force;\n return;\n }\n\n // Float the label if no input has a value or a placeholder\n this._fieldElement.floatLabel = this.hasValue || this.hasPlaceholder;\n }\n\n public tryConnectSlottedLabel(slot: HTMLSlotElement): void {\n // Only one input can be automatically connected to a label, return if there are no or more\n // than one inputs or if the input is already labelled\n if (this._inputElements.length !== 1 || this._inputElements[0].labels?.length) {\n return;\n }\n\n const inputElement = this._inputElements[0];\n const elements = slot.assignedElements({ flatten: true });\n\n // Attempt to find and connect a `<forge-label>` element\n const forgeLabel = elements.find(el => el.matches(TEXT_FIELD_CONSTANTS.selectors.FORGE_LABEL)) as LabelComponent | undefined;\n if (forgeLabel) {\n forgeLabel.forElement = this._component;\n forgeLabel.clickTarget = inputElement;\n return;\n }\n \n // Attempt to find and connect a `<label>` element\n const label = elements.find(el => el.tagName === TEXT_FIELD_CONSTANTS.tagNames.LABEL) as HTMLLabelElement | undefined;\n if (!label || label.control) {\n return;\n }\n\n const id = inputElement.id || `forge-input-${randomChars()}`;\n inputElement.id = id;\n label.htmlFor = id;\n }\n\n public connectClearButton(listener: EventListener): void {\n this._clearButtonSlotElement.addEventListener('click', listener);\n }\n\n public disconnectClearButton(listener: EventListener): void {\n this._clearButtonSlotElement.removeEventListener('click', listener);\n }\n\n public toggleClearButtonVisibility(visible: boolean): void {\n if (visible) {\n this._fieldElement.append(this._clearButtonSlotElement);\n } else {\n this._clearButtonSlotElement.remove();\n }\n }\n\n public clearInput(): void {\n if (!this._inputElements.length) {\n return;\n }\n this._inputElements.forEach(el => el.value = '');\n this._inputElements[0].focus();\n }\n}\n", "import { FieldLabelPosition, FIELD_CONSTANTS } from '../field';\nimport { BaseFieldFoundation, IBaseFieldFoundation } from '../field/base/base-field-foundation';\nimport { ITextFieldAdapter, TextFieldAdapter } from './text-field-adapter';\nimport { TextFieldInputAttributeObserver, TextFieldValueChangeListener, TEXT_FIELD_CONSTANTS } from './text-field-constants';\n\nexport interface ITextFieldFoundation extends IBaseFieldFoundation {\n readonly popoverTargetElement: HTMLElement;\n showClear: boolean;\n}\n\nexport class TextFieldFoundation extends BaseFieldFoundation<ITextFieldAdapter> implements ITextFieldFoundation {\n private _showClear = false;\n private _slotChangeListener: EventListener = this._onSlotChange.bind(this);\n private _inputAttributeListener: TextFieldInputAttributeObserver = this._onInputAttributeChange.bind(this);\n private _valueChangeListener: TextFieldValueChangeListener = this._onValueChange.bind(this);\n private _inputListener: EventListener = this._onValueChange.bind(this);\n private _clearButtonClickListener: EventListener = (evt: PointerEvent) => this._onClearButtonClick(evt);\n \n constructor(protected _adapter: TextFieldAdapter) {\n super(_adapter);\n }\n\n public initialize(): void {\n this._adapter.addRootListener('slotchange', this._slotChangeListener);\n this._adapter.addRootListener('input', this._inputListener);\n }\n\n public disconnect(): void {\n this._adapter.removeRootListener('slotchange', this._slotChangeListener);\n this._adapter.removeRootListener('input', this._inputListener);\n this._adapter.removeValueChangeListener();\n }\n\n public get popoverTargetElement(): HTMLElement {\n return this._adapter.popoverTargetElement;\n }\n\n private _onSlotChange(evt: Event): void {\n const target = evt.target as HTMLSlotElement;\n switch (target.name) {\n case 'label':\n this._adapter.tryConnectSlottedLabel(target);\n break;\n case '':\n this._adapter.handleDefaultSlotChange(target, this._inputAttributeListener);\n this._adapter.tryAddValueChangeListener(this, this._valueChangeListener);\n this._tryFloatLabel();\n break;\n }\n }\n\n private _onInputAttributeChange(name: keyof typeof TEXT_FIELD_CONSTANTS.observedInputAttributes, value: string | null): void {\n switch (name) {\n case 'disabled':\n this.disabled = value !== null;\n break;\n case 'placeholder':\n this._tryFloatLabel();\n break;\n }\n }\n\n private _onClearButtonClick(evt: Event): void {\n const event = new CustomEvent(TEXT_FIELD_CONSTANTS.events.CLEAR, { bubbles: true, cancelable: true, composed: true });\n this._adapter.dispatchHostEvent(event);\n if (!event.defaultPrevented) {\n this._adapter.clearInput();\n }\n };\n\n private _onValueChange(): void {\n this._tryFloatLabel();\n this._toggleClearButtonVisibility();\n }\n\n private _toggleClearButtonVisibility(): void {\n this._adapter.toggleClearButtonVisibility(this._showClear && this._hasValue && !this.disabled);\n }\n\n public get showClear(): boolean {\n return this._showClear;\n }\n public set showClear(value: boolean) {\n if (this._showClear !== value) {\n this._showClear = value;\n this._adapter.toggleHostAttribute(TEXT_FIELD_CONSTANTS.attributes.SHOW_CLEAR, value);\n\n if (value) {\n this._adapter.connectClearButton(this._clearButtonClickListener);\n } else {\n this._adapter.disconnectClearButton(this._clearButtonClickListener);\n }\n this._toggleClearButtonVisibility();\n }\n }\n\n public override get disabled(): boolean {\n return super.disabled;\n }\n public override set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.toggleHostAttribute(FIELD_CONSTANTS.attributes.DISABLED, value);\n this._adapter.setFieldProperty('disabled', value);\n this._adapter.disableInput(value);\n this._toggleClearButtonVisibility();\n }\n }\n\n public override get labelPosition(): FieldLabelPosition {\n return super.labelPosition;\n }\n public override set labelPosition(value: FieldLabelPosition) {\n if (this._labelPosition !== value) {\n this._labelPosition = value;\n this._adapter.toggleHostAttribute(FIELD_CONSTANTS.attributes.LABEL_POSITION, true, value);\n this._adapter.setFieldProperty('labelPosition', value);\n this._tryFloatLabel();\n }\n }\n}\n", "import { attachShadowTemplate, coerceBoolean, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconClear } from '@tylertech/tyler-icons/standard';\nimport { BASE_FIELD_CONSTANTS, FieldComponent } from '../field';\nimport { BaseField, IBaseField } from '../field/base/base-field';\nimport { IconRegistry } from '../icon';\nimport { IconButtonComponent } from '../icon-button';\nimport { TooltipComponent } from '../tooltip';\nimport { TextFieldAdapter } from './text-field-adapter';\nimport { TEXT_FIELD_CONSTANTS } from './text-field-constants';\nimport { TextFieldFoundation } from './text-field-foundation';\n\nconst template = '<template><forge-field id=\\\"field\\\"><slot slot=\\\"label\\\" name=\\\"label\\\"></slot><slot slot=\\\"start\\\" name=\\\"start\\\"></slot><slot></slot><slot slot=\\\"end\\\" name=\\\"end\\\"></slot><slot slot=\\\"end\\\" name=\\\"clear-button\\\"><forge-icon-button tabindex=\\\"-1\\\" dense><forge-icon name=\\\"clear\\\"></forge-icon></forge-icon-button><forge-tooltip type=\\\"label\\\"><slot name=\\\"clear-button-tooltip\\\">Clear</slot></forge-tooltip></slot><slot slot=\\\"accessory\\\" name=\\\"accessory\\\"></slot><slot slot=\\\"support-text-start\\\" name=\\\"support-text-start\\\"></slot><slot slot=\\\"support-text-end\\\" name=\\\"support-text-end\\\"></slot><slot slot=\\\"start\\\" name=\\\"leading\\\"></slot><slot slot=\\\"end\\\" name=\\\"trailing\\\"></slot><slot slot=\\\"accessory\\\" name=\\\"addon-end\\\"></slot><slot slot=\\\"support-text-start\\\" name=\\\"helper-text\\\"></slot></forge-field></template>';\nconst styles = ':host{display:block}:host([hidden]){display:none}forge-field{display:contents}';\n\nexport interface ITextFieldComponent extends IBaseField {\n showClear: boolean;\n readonly popoverTargetElement: HTMLElement;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-text-field': ITextFieldComponent;\n }\n}\n\n/**\n * @tag forge-text-field\n * \n * @summary The Forge Text Field component wraps and styles an input or textarea element.\n * \n * @property {boolean} showClear - Whether the clear button appears when text has been entered.\n * @property {HTMLElement} popoverTargetElement - Gets a reference to the element that the popover should target for best alignment.\n * \n * @attribute {boolean} show-clear - Whether the clear button appears when text has been entered.\n * \n * @event {CustomEvent<null>} forge-text-field-clear - Dispatches when the clear button is clicked.\n * \n * @csspart root - The root container element.\n * @csspart label - The label element.\n * @csspart container - The container element surrounding the input.\n * @csspart input - The element containing te input slot.\n * @csspart start - The element containing the start slot.\n * @csspart end - The element containing the end slot.\n * @csspart popover-icon - The popover icon element.\n * @csspart accessory - The element containing the accessory slot.\n * @csspart support-text - The support text element.\n * @csspart support-text-start - The element containing the support text start slot.\n * @csspart support-text-end - The element containing the support text end slot.\n * @csspart focus-indicator - The focus indicator element.\n * \n * @slot - The default/unnamed slot for the field's input.\n * @slot label - Renders its content as a positioned label.\n * @slot start - Typically reserved for content/icons that render logically before the default slot content.\n * @slot end - Typically reserved content/icons that render logically after the default slot content.\n * @slot clear-button - Content slotted here replaces the default clear button.\n * @slot clear-button-tooltip - Sets the text content of the clear button's tooltip and accessible label.\n * @slot accessory - Used for content such as a button that is logically connected to the field but should appear distinct from the input.\n * @slot support-text-start - Used for content that provides additional information about the field. Aligns to the inline start of the field.\n * @slot support-text-end - Used for content that provides additional information about the field. Aligns to the inline end of the field.\n */\n\n@CustomElement({\n name: TEXT_FIELD_CONSTANTS.elementName,\n dependencies: [\n FieldComponent,\n IconButtonComponent,\n TooltipComponent\n ]\n})\nexport class TextFieldComponent extends BaseField<TextFieldFoundation> implements ITextFieldComponent {\n public static get observedAttributes(): string[] {\n return [\n ...Object.values(BASE_FIELD_CONSTANTS.observedAttributes),\n ...Object.values(TEXT_FIELD_CONSTANTS.observedAttributes)\n ];\n }\n\n protected readonly _foundation: TextFieldFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new TextFieldFoundation(new TextFieldAdapter(this));\n IconRegistry.define(tylIconClear);\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n super.attributeChangedCallback(name, oldValue, newValue);\n switch (name) {\n case TEXT_FIELD_CONSTANTS.attributes.SHOW_CLEAR:\n this.showClear = coerceBoolean(newValue);\n break;\n }\n }\n\n public get popoverTargetElement(): HTMLElement {\n return this._foundation.popoverTargetElement;\n }\n\n @FoundationProperty()\n public declare showClear: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { TextFieldComponent } from './text-field';\n\nexport * from './text-field';\nexport * from './text-field-adapter';\nexport * from './text-field-constants';\nexport * from './text-field-foundation';\nexport * from './text-field-component-delegate';\n\nexport function defineTextFieldComponent(): void {\n defineCustomElement(TextFieldComponent);\n}\n"],
|
|
5
|
-
"mappings": "imBAuBO,IAAMA,EAAN,cAA+BC,CAA8C,CAuBlF,YAAYC,EAAgC,CAC1C,MAAMA,CAAS,EApBjB,KAAQ,eAA6D,CAAC,EAEtE,KAAQ,8BAAgD,CAAC,EAmBvD,KAAK,cAAgBC,EAAiBD,EAAWE,EAAqB,UAAU,KAAK,EACrF,KAAK,wBAA0BD,EAAiBD,EAAWE,EAAqB,UAAU,iBAAiB,EAC3G,KAAK,cAAc,aAAa,cAAe,OAAO,OAAOC,EAAgB,KAAK,EAAE,KAAK,IAAI,CAAC,EAC9F,KAAK,wBAAwB,OAAO,CACtC,CArBA,IAAW,UAAoB,CAC7B,OAAO,KAAK,eAAe,KAAKC,GAAM,CAAC,CAACA,EAAG,KAAK,CAClD,CAEA,IAAW,gBAA0B,CACnC,OAAO,KAAK,eAAe,KAAKA,GAAM,CAAC,CAACA,EAAG,WAAW,CACxD,CAEA,IAAW,sBAAoC,CAC7C,OAAK,KAAK,wBACR,KAAK,sBAAwBH,EAAiB,KAAK,cAAeE,EAAgB,UAAU,cAAc,GAErG,KAAK,qBACd,CAUO,gBAAgBE,EAAiCC,EAA+B,CACrF,KAAK,cAAc,iBAAiBD,EAAMC,CAAQ,CACpD,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,cAAiCC,CAA8D,CAUpG,aAAc,CACZ,MAAM,EACNC,EAAqB,KAAMJ,EAAUC,CAAM,EAC3C,KAAK,YAAc,IAAII,EAAoB,IAAIC,EAAiB,IAAI,CAAC,EACrEC,EAAa,OAAOC,CAAY,CAClC,CAdA,WAAkB,oBAA+B,CAC/C,MAAO,CACL,GAAG,OAAO,OAAOC,EAAqB,kBAAkB,EACxD,GAAG,OAAO,OAAOC,EAAqB,kBAAkB,CAC1D,CACF,CAWO,mBAA0B,CAC/B,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CAEtF,OADA,MAAM,yBAAyBF,EAAMC,EAAUC,CAAQ,EAC/CF,EAAM,CACZ,KAAKD,EAAqB,WAAW,WACnC,KAAK,UAAYI,EAAcD,CAAQ,EACvC,KACJ,CACF,CAEA,IAAW,sBAAoC,CAC7C,OAAO,KAAK,YAAY,oBAC1B,CAIF,EADiBE,EAAA,CADdC,EAAmB,GAlCTd,EAmCI,yBAnCJA,EAANa,EAAA,CARNE,EAAc,CACb,KAAMP,EAAqB,YAC3B,aAAc,CACZQ,EACAC,EACAC,CACF,CACF,CAAC,GACYlB,GC5DN,SAASmB,IAAiC,CAC/CC,EAAoBC,CAAkB,CACxC",
|
|
6
|
-
"names": ["TextFieldAdapter", "BaseFieldAdapter", "component", "getShadowElement", "TEXT_FIELD_CONSTANTS", "FIELD_CONSTANTS", "el", "name", "listener", "disabled", "_a", "value", "inputElement", "toggleAttribute", "slot", "assignedElements", "mutations", "mutation", "attribute", "attributeName", "context", "callback", "listenOwnProperty", "force", "elements", "forgeLabel", "label", "id", "randomChars", "visible", "TextFieldFoundation", "BaseFieldFoundation", "_adapter", "evt", "target", "name", "value", "event", "TEXT_FIELD_CONSTANTS", "FIELD_CONSTANTS", "template", "styles", "TextFieldComponent", "BaseField", "attachShadowTemplate", "TextFieldFoundation", "TextFieldAdapter", "IconRegistry", "tylIconClear", "BASE_FIELD_CONSTANTS", "TEXT_FIELD_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "FieldComponent", "IconButtonComponent", "TooltipComponent", "defineTextFieldComponent", "defineCustomElement", "TextFieldComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{b as S}from"./chunk.SZOZIJZI.js";import{d as N,e as F}from"./chunk.GIENHEMN.js";import{A as m,l as d}from"./chunk.RLQB7224.js";import{d as h}from"./chunk.T7NWP7DB.js";import{a as A}from"./chunk.SQ3AZAHF.js";import{a as E}from"./chunk.NVUMRW44.js";import{a as C}from"./chunk.OLFOVKQG.js";import{a as B,b as L}from"./chunk.VRSPT7WX.js";import{a as I,e as T,f as c,k as D}from"./chunk.LNTTU2GL.js";import{k as f}from"./chunk.J2M2MXP2.js";import{a as _,b as x,d as p}from"./chunk.M3QDAYD2.js";var R=`${L}quantity-field`,q={INVALID:"invalid",REQUIRED:"required",DISABLED:"disabled"},O={ROOT:"forge-quantity-field",INVALID:"forge-quantity-field--invalid",REQUIRED:"forge-quantity-field--required"},a={INCREMENT_BUTTON:"increment-button",DECREMENT_BUTTON:"decrement-button",LABEL:"label",HELPER_TEXT:"helper-text"},w={ROOT:`.${O.ROOT}`,INCREMENT_BUTTON_SLOT:`slot[name=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON_SLOT:`slot[name=${a.DECREMENT_BUTTON}]`,INCREMENT_BUTTON:`[slot=${a.INCREMENT_BUTTON}], button[slot=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON:`[slot=${a.DECREMENT_BUTTON}], button[slot=${a.DECREMENT_BUTTON}]`,TEXT_FIELD:"forge-text-field",INPUT:"input[type=number]",LABEL:`[slot=${a.LABEL}]`,HELPER_TEXT:`[slot=${a.HELPER_TEXT}]`},i={elementName:R,classes:O,slots:a,selectors:w,attributes:q};var v=class extends C{constructor(t){super(t);this._rootElement=c(t,i.selectors.ROOT),this._incrementButtonSlot=c(this._component,i.selectors.INCREMENT_BUTTON_SLOT),this._decrementButtonSlot=c(this._component,i.selectors.DECREMENT_BUTTON_SLOT)}initializeButtons(){this._incrementButton&&!this._incrementButton.hasAttribute("tabindex")&&(this._incrementButton.tabIndex=-1),this._decrementButton&&!this._decrementButton.hasAttribute("tabindex")&&(this._decrementButton.tabIndex=-1)}addRootClass(t){this._rootElement.classList.add(t)}removeRootClass(t){this._rootElement.classList.remove(t)}inputHasAttribute(t){return this.inputElement?this.inputElement.hasAttribute(t):!1}addIncrementButtonSlotListener(t){this._incrementButtonSlot.addEventListener("slotchange",t)}removeIncrementButtonSlotListener(t){this._incrementButtonSlot&&this._incrementButtonSlot.removeEventListener("slotchange",t)}addDecrementButtonSlotListener(t){this._decrementButtonSlot.addEventListener("slotchange",t)}removeDecrementButtonSlotListener(t){this._decrementButtonSlot&&this._decrementButtonSlot.removeEventListener("slotchange",t)}addTextFieldAttribute(t,e=""){this._textFieldComponent&&this._textFieldComponent.setAttribute(t,e)}removeTextFieldAttribute(t){this._textFieldComponent&&this._textFieldComponent.removeAttribute(t)}addIncrementEventListener(t,e){this._incrementButtonElement.addEventListener(t,e)}removeIncrementEventListener(t,e){this._incrementButtonElement&&this._incrementButtonElement.removeEventListener(t,e)}addDecrementEventListener(t,e){this._decrementButtonElement.addEventListener(t,e)}removeDecrementEventListener(t,e){this._decrementButtonElement&&this._decrementButtonElement.removeEventListener(t,e)}addIncrementButtonAttribute(t,e=""){this._incrementButtonElement.setAttribute(t,e)}removeIncrementButtonAttribute(t){this._incrementButtonElement.removeAttribute(t)}addDecrementButtonAttribute(t,e=""){this._decrementButtonElement.setAttribute(t,e)}removeDecrementButtonAttribute(t){this._decrementButtonElement.removeAttribute(t)}increment(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e+this._inputStep).toFixed(n));this._inputMax&&this._inputMax<o&&(o=this._inputMax),this._setInputValue(o)}decrement(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e-this._inputStep).toFixed(n));this._inputMin&&this._inputMin>o&&(o=this._inputMin),this._setInputValue(o)}addInputDisabledAttributeChangeListener(t){this._setupInputDisabledAttributeMutationObserver(t)}removeInputDisabledAttributeChangeListener(){this._cleanupInputDisabledAttributeMutationObserver()}_setInputValue(t){this.inputElement&&(this.inputElement.value=`${t}`,this.inputElement.dispatchEvent(new Event("input")),this.inputElement.dispatchEvent(new Event("change")))}_isNullOrUndefinedOrEmpty(t){return t==null||t===""}_setupInputDisabledAttributeMutationObserver(t){if(!this.inputElement)return;this._cleanupInputDisabledAttributeMutationObserver();let e=o=>this._inputDisabledAttributeMutationCallback(o,t);this._inputAttributeMutationObserver=new MutationObserver(e);let n={attributes:!0,attributeOldValue:!0,attributeFilter:[i.attributes.DISABLED]};this._inputAttributeMutationObserver.observe(this.inputElement,n)}_cleanupInputDisabledAttributeMutationObserver(){this._inputAttributeMutationObserver&&(this._inputAttributeMutationObserver.disconnect(),delete this._inputAttributeMutationObserver)}_inputDisabledAttributeMutationCallback(t,e){for(let n of t)n.type!=="attributes"||!n.attributeName||n.attributeName!==i.attributes.DISABLED||n.target[n.attributeName]===n.oldValue||e()}get _incrementButtonElement(){return this._incrementButton||(this._incrementButton=this._component.querySelector(i.selectors.INCREMENT_BUTTON)),this._incrementButton}get _decrementButtonElement(){return this._decrementButton||(this._decrementButton=this._component.querySelector(i.selectors.DECREMENT_BUTTON)),this._decrementButton}get _textFieldComponent(){return this._textField||(this._textField=this._component.querySelector(i.selectors.TEXT_FIELD)),this._textField}get inputElement(){return this._inputElement||(this._inputElement=this._component.querySelector(i.selectors.INPUT)),this._inputElement}get _inputStep(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.step)?1:+t.step}get _inputMax(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.max)?null:+t.max}get _inputMin(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.min)?null:+t.min}_calcPrecision(t){let e=String(t);return e.includes(".")?e.split(".")[1].length:0}};var b=class{constructor(r){this._adapter=r;this._incrementValue=()=>this._adapter.increment(),this._decrementValue=()=>this._adapter.decrement(),this._incrementButtonSlotChanged=()=>this._onIncrementButtonSlotChanged(),this._decrementButtonSlotChanged=()=>this._onDecrementButtonSlotChanged(),this._adapter.addIncrementButtonSlotListener(this._incrementButtonSlotChanged),this._adapter.addDecrementButtonSlotListener(this._decrementButtonSlotChanged)}connect(){this._adapter.addInputDisabledAttributeChangeListener(()=>this._syncDisabledStateOfButtons()),this._syncDisabledStateOfButtons(),this._adapter.initializeButtons()}disconnect(){this._removeIncrementEventListener(),this._removeDecrementEventListener(),this._removeIncrementButtonSlotListener(),this._removeDecrementButtonSlotListener(),this._adapter.removeInputDisabledAttributeChangeListener()}_onIncrementButtonSlotChanged(){this._addIncrementEventListener()}_onDecrementButtonSlotChanged(){this._addDecrementEventListener()}_addIncrementEventListener(){this._adapter.addIncrementEventListener("click",this._incrementValue)}_addDecrementEventListener(){this._adapter.addDecrementEventListener("click",this._decrementValue)}_removeIncrementEventListener(){this._adapter.removeIncrementEventListener("click",this._incrementValue)}_removeDecrementEventListener(){this._adapter.removeDecrementEventListener("click",this._decrementValue)}_removeIncrementButtonSlotListener(){this._adapter.removeIncrementButtonSlotListener(this._incrementButtonSlotChanged)}_removeDecrementButtonSlotListener(){this._adapter.removeDecrementButtonSlotListener(this._decrementButtonSlotChanged)}_syncDisabledStateOfButtons(){this._adapter.inputHasAttribute(i.attributes.DISABLED)?(this._adapter.addDecrementButtonAttribute(i.attributes.DISABLED),this._adapter.addIncrementButtonAttribute(i.attributes.DISABLED)):(this._adapter.removeIncrementButtonAttribute(i.attributes.DISABLED),this._adapter.removeDecrementButtonAttribute(i.attributes.DISABLED))}get required(){return this._required}set required(r){this._required!==r&&(this._required=r,this._required?(this._adapter.setHostAttribute(i.attributes.REQUIRED),this._adapter.addRootClass(i.classes.REQUIRED)):(this._adapter.removeHostAttribute(i.attributes.REQUIRED),this._adapter.removeRootClass(i.classes.REQUIRED)))}get invalid(){return this._invalid}set invalid(r){this._invalid!==r&&(this._invalid=r,this._invalid?(this._adapter.setHostAttribute(i.attributes.INVALID),this._adapter.addRootClass(i.classes.INVALID),this._adapter.addTextFieldAttribute(i.attributes.INVALID)):(this._adapter.removeHostAttribute(i.attributes.INVALID),this._adapter.removeRootClass(i.classes.INVALID),this._adapter.removeTextFieldAttribute(i.attributes.INVALID)))}};var U='<template><div class="forge-quantity-field" part="root"><slot name="label"></slot><div class="forge-quantity-field__row" part="row"><slot name="decrement-button"></slot><slot></slot><slot name="increment-button"></slot></div><slot name="helper-text"></slot></div></template>',k='.forge-quantity-field ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.forge-quantity-field__row{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.forge-quantity-field ::slotted(forge-icon-button:first-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-right:4px}.forge-quantity-field ::slotted(forge-icon-button:last-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-left:4px}.forge-quantity-field ::slotted(forge-text-field){--forge-text-field-margin-top:0;--forge-text-field-margin-bottom:0}.forge-quantity-field--required ::slotted([slot=label])::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:"*";margin-right:4px}.forge-quantity-field--invalid ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}:host{display:inline-block}:host([hidden]){display:none}',s=class extends D{constructor(){super();T(this,U,k),this._foundation=new b(new v(this)),h.define([m,d])}static get observedAttributes(){return[i.attributes.INVALID,i.attributes.REQUIRED]}connectedCallback(){this._requiredElementsPresent()?this._foundation.connect():this._ensureElementsPresent().then(()=>{this._foundation.connect()})}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,e,n){switch(t){case i.attributes.INVALID:this.invalid=f(n);break;case i.attributes.REQUIRED:this.required=f(n);break}}_ensureElementsPresent(){return new Promise(t=>{if(this._requiredElementsPresent()){t();return}let e=new MutationObserver(n=>{n.reduce((l,u)=>l+u.addedNodes.length,0)>0&&this._requiredElementsPresent()&&(e.disconnect(),t())});e.observe(this,{childList:!0,subtree:!0})})}_requiredElementsPresent(){let t=this.querySelector(i.selectors.INPUT),e=this.querySelector(i.selectors.DECREMENT_BUTTON),n=this.querySelector(i.selectors.INCREMENT_BUTTON);return!!t&&!!e&&!!n}};p([E()],s.prototype,"invalid",2),p([E()],s.prototype,"required",2),s=p([B({name:i.elementName,dependencies:[N]})],s);var M=class extends A{constructor(t){super(t);h.define([m,d])}_build(){let t=document.createElement(i.elementName);return this._attachButton(t,m.name,"decrement-button"),this._attachTextField(t),this._attachButton(t,d.name,"increment-button"),t}_configure(){var t,e,n,o,l;this.inputElement.value=(e=(t=this._config.options)==null?void 0:t.value)!=null?e:"0",this.inputElement.style.textAlign="center",this.inputElement.style.width="64px",(n=this._config.options)!=null&&n.helperText&&this.setHelperText(this._config.options.helperText),typeof((o=this._config.options)==null?void 0:o.label)=="string"&&this._createLabel(this._config.options.label),((l=this._config.options)==null?void 0:l.step)!==void 0&&(this.inputElement.step=this._config.options.step)}get value(){return this._textFieldDelegate.inputElement.value}set value(t){this._textFieldDelegate.inputElement.value=t}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(t){this._textFieldDelegate.inputElement.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}get inputElement(){return this._textFieldDelegate.inputElement}get labelElement(){return this._labelElement}onChange(t){this._textFieldDelegate.inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var n,o,l,u,y;let e={props:_({},(o=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:o.props),options:x(_({},(u=(l=this._config.options)==null?void 0:l.textFieldDelegateConfig)==null?void 0:u.options),{id:(y=this._config.options)==null?void 0:y.id,type:"number"})};this._textFieldDelegate=new S(e),t.appendChild(this._textFieldDelegate.element)}setLabel(t){t?this._labelElement?this._labelElement.textContent=t:this._createLabel(t):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,this._labelElement.slot="label",(e=this._config.options)!=null&&e.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_attachButton(t,e,n){return new F({options:{iconName:e,parent:t,attributes:{slot:n}}})}};function ft(){I(s)}export{i as a,v as b,b as c,s as d,M as e,ft as f};
|
|
7
|
-
//# sourceMappingURL=chunk.OREDK5MJ.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/quantity-field/quantity-field-constants.ts", "../../src/quantity-field/quantity-field-adapter.ts", "../../src/quantity-field/quantity-field-foundation.ts", "../../src/quantity-field/quantity-field.ts", "../../src/quantity-field/quantity-field-component-delegate.ts", "../../src/quantity-field/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}quantity-field`;\n\nconst attributes = {\n INVALID: 'invalid',\n REQUIRED: 'required',\n DISABLED: 'disabled'\n};\n\nconst classes = {\n ROOT: 'forge-quantity-field',\n INVALID: 'forge-quantity-field--invalid',\n REQUIRED: 'forge-quantity-field--required'\n};\n\nconst slots = {\n INCREMENT_BUTTON: 'increment-button',\n DECREMENT_BUTTON: 'decrement-button',\n LABEL: 'label',\n HELPER_TEXT: 'helper-text'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n INCREMENT_BUTTON_SLOT: `slot[name=${slots.INCREMENT_BUTTON}]`,\n DECREMENT_BUTTON_SLOT: `slot[name=${slots.DECREMENT_BUTTON}]`,\n INCREMENT_BUTTON: `[slot=${slots.INCREMENT_BUTTON}], button[slot=${slots.INCREMENT_BUTTON}]`,\n DECREMENT_BUTTON: `[slot=${slots.DECREMENT_BUTTON}], button[slot=${slots.DECREMENT_BUTTON}]`,\n TEXT_FIELD: 'forge-text-field',\n INPUT: 'input[type=number]',\n LABEL: `[slot=${slots.LABEL}]`,\n HELPER_TEXT: `[slot=${slots.HELPER_TEXT}]`\n};\n\nexport const QUANTITY_FIELD_CONSTANTS = {\n elementName,\n classes,\n slots,\n selectors,\n attributes\n};\n", "import { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IQuantityFieldComponent } from './quantity-field';\nimport { getShadowElement, Platform } from '@tylertech/forge-core';\nimport { QUANTITY_FIELD_CONSTANTS } from './quantity-field-constants';\nimport { TextFieldComponent } from '../text-field';\n\nexport interface IQuantityFieldAdapter extends IBaseAdapter {\n initializeButtons(): void;\n addRootClass(name: string): void;\n removeRootClass(name: string): void;\n inputHasAttribute(name: string): boolean;\n addIncrementButtonSlotListener(listener: () => void): void;\n removeIncrementButtonSlotListener(listener: () => void): void;\n addDecrementButtonSlotListener(listener: (evt: Event) => void): void;\n removeDecrementButtonSlotListener(listener: (evt: Event) => void): void;\n addIncrementEventListener(event: string, callback: (event: Event) => void): void;\n addDecrementEventListener(event: string, callback: (event: Event) => void): void;\n removeIncrementEventListener(event: string, callback: (event: Event) => void): void;\n removeDecrementEventListener(event: string, callback: (event: Event) => void): void;\n addIncrementButtonAttribute(name: string, value?: string): void;\n removeIncrementButtonAttribute(name: string): void;\n addDecrementButtonAttribute(name: string, value?: string): void;\n removeDecrementButtonAttribute(name: string): void;\n addInputDisabledAttributeChangeListener(callback: () => void): void;\n addTextFieldAttribute(name: string, value?: string): void;\n removeTextFieldAttribute(name: string): void;\n removeInputDisabledAttributeChangeListener(): void;\n increment(): void;\n decrement(): void;\n}\n\nexport class QuantityFieldAdapter extends BaseAdapter<IQuantityFieldComponent> implements IQuantityFieldAdapter {\n private _rootElement: HTMLElement;\n private _incrementButtonSlot: HTMLSlotElement;\n private _decrementButtonSlot: HTMLSlotElement;\n private _incrementButton: HTMLButtonElement;\n private _decrementButton: HTMLButtonElement;\n private _textField: TextFieldComponent;\n private _inputElement: HTMLInputElement | null;\n private _inputAttributeMutationObserver: MutationObserver | undefined;\n\n constructor(component: IQuantityFieldComponent) {\n super(component);\n this._rootElement = getShadowElement(component, QUANTITY_FIELD_CONSTANTS.selectors.ROOT);\n this._incrementButtonSlot = getShadowElement(this._component, QUANTITY_FIELD_CONSTANTS.selectors.INCREMENT_BUTTON_SLOT) as HTMLSlotElement;\n this._decrementButtonSlot = getShadowElement(this._component, QUANTITY_FIELD_CONSTANTS.selectors.DECREMENT_BUTTON_SLOT) as HTMLSlotElement;\n }\n\n public initializeButtons(): void {\n if (this._incrementButton && !this._incrementButton.hasAttribute('tabindex')) {\n this._incrementButton.tabIndex = -1;\n }\n if (this._decrementButton && !this._decrementButton.hasAttribute('tabindex')) {\n this._decrementButton.tabIndex = -1;\n }\n }\n\n public addRootClass(name: string): void {\n this._rootElement.classList.add(name);\n }\n\n public removeRootClass(name: string): void {\n this._rootElement.classList.remove(name);\n }\n\n public inputHasAttribute(name: string): boolean {\n if (!this.inputElement) {\n return false;\n }\n\n return this.inputElement.hasAttribute(name);\n }\n\n public addIncrementButtonSlotListener(listener: () => void): void {\n this._incrementButtonSlot.addEventListener('slotchange', listener);\n }\n\n public removeIncrementButtonSlotListener(listener: () => void): void {\n if (this._incrementButtonSlot) {\n this._incrementButtonSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addDecrementButtonSlotListener(listener: (evt: Event) => void): void {\n this._decrementButtonSlot.addEventListener('slotchange', listener);\n }\n\n public removeDecrementButtonSlotListener(listener: (evt: Event) => void): void {\n if (this._decrementButtonSlot) {\n this._decrementButtonSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addTextFieldAttribute(name: string, value = ''): void {\n if (this._textFieldComponent) {\n this._textFieldComponent.setAttribute(name, value);\n }\n }\n\n public removeTextFieldAttribute(name: string): void {\n if (this._textFieldComponent) {\n this._textFieldComponent.removeAttribute(name);\n }\n }\n\n public addIncrementEventListener(event: string, callback: (event: Event) => void): void {\n this._incrementButtonElement.addEventListener(event, callback);\n }\n\n public removeIncrementEventListener(event: string, callback: (event: Event) => void): void {\n if (this._incrementButtonElement) {\n this._incrementButtonElement.removeEventListener(event, callback);\n }\n }\n\n public addDecrementEventListener(event: string, callback: (event: Event) => void): void {\n this._decrementButtonElement.addEventListener(event, callback);\n }\n\n public removeDecrementEventListener(event: string, callback: (event: Event) => void): void {\n if (this._decrementButtonElement) {\n this._decrementButtonElement.removeEventListener(event, callback);\n }\n }\n\n public addIncrementButtonAttribute(name: string, value = ''): void {\n this._incrementButtonElement.setAttribute(name, value);\n }\n\n public removeIncrementButtonAttribute(name: string): void {\n this._incrementButtonElement.removeAttribute(name);\n }\n\n public addDecrementButtonAttribute(name: string, value = ''): void {\n this._decrementButtonElement.setAttribute(name, value);\n }\n\n public removeDecrementButtonAttribute(name: string): void {\n this._decrementButtonElement.removeAttribute(name);\n }\n\n public increment(): void {\n const input = this.inputElement;\n if (!input) {\n return;\n }\n\n const curValue = +input.value;\n const precision = this._calcPrecision(this._inputStep);\n let newValue = parseFloat((curValue + this._inputStep).toFixed(precision));\n if (!!this._inputMax && this._inputMax < newValue) {\n newValue = this._inputMax;\n }\n\n this._setInputValue(newValue);\n }\n\n public decrement(): void {\n const input = this.inputElement;\n if (!input) {\n return;\n }\n\n const curValue = +input.value;\n const precision = this._calcPrecision(this._inputStep);\n let newValue = parseFloat((curValue - this._inputStep).toFixed(precision));\n if (!!this._inputMin && this._inputMin > newValue) {\n newValue = this._inputMin;\n }\n\n this._setInputValue(newValue);\n }\n\n public addInputDisabledAttributeChangeListener(callback: () => void): void {\n this._setupInputDisabledAttributeMutationObserver(callback);\n }\n\n public removeInputDisabledAttributeChangeListener(): void {\n this._cleanupInputDisabledAttributeMutationObserver();\n }\n\n private _setInputValue(value: string | number): void {\n if (!this.inputElement) {\n return;\n }\n\n this.inputElement.value = `${value}`;\n this.inputElement.dispatchEvent(new Event('input'));\n this.inputElement.dispatchEvent(new Event('change'));\n }\n\n private _isNullOrUndefinedOrEmpty(value: any): value is null | undefined {\n return value == null || value === '';\n }\n\n private _setupInputDisabledAttributeMutationObserver(callback: () => void): void {\n if (!this.inputElement) {\n return;\n }\n\n this._cleanupInputDisabledAttributeMutationObserver();\n const mutationCallback = (mutationRecords: MutationRecord[]): void => this._inputDisabledAttributeMutationCallback(mutationRecords, callback);\n this._inputAttributeMutationObserver = new MutationObserver(mutationCallback);\n const mutationOptions: MutationObserverInit = {\n attributes: true,\n attributeOldValue: true,\n attributeFilter: [QUANTITY_FIELD_CONSTANTS.attributes.DISABLED]\n };\n this._inputAttributeMutationObserver.observe(this.inputElement, mutationOptions);\n }\n\n private _cleanupInputDisabledAttributeMutationObserver(): void {\n if (this._inputAttributeMutationObserver) {\n this._inputAttributeMutationObserver.disconnect();\n delete this._inputAttributeMutationObserver;\n }\n }\n\n private _inputDisabledAttributeMutationCallback(mutationRecords: MutationRecord[], callback: () => void): void {\n for (const mutationRecord of mutationRecords) {\n // Skip:\n // - Non-attribute mutations.\n // - Mutations without an attribute name.\n // - Mutations without a matching attribute name.\n // - Mutations that did not change the attribute value.\n if (mutationRecord.type !== 'attributes'\n || !mutationRecord.attributeName\n || mutationRecord.attributeName !== QUANTITY_FIELD_CONSTANTS.attributes.DISABLED\n || mutationRecord.target[mutationRecord.attributeName] === mutationRecord.oldValue) {\n continue;\n }\n\n callback();\n }\n }\n\n private get _incrementButtonElement(): HTMLButtonElement {\n if (!this._incrementButton) {\n this._incrementButton = this._component.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.INCREMENT_BUTTON) as HTMLButtonElement;\n }\n return this._incrementButton;\n }\n\n private get _decrementButtonElement(): HTMLButtonElement {\n if (!this._decrementButton) {\n this._decrementButton = this._component.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.DECREMENT_BUTTON) as HTMLButtonElement;\n }\n return this._decrementButton;\n }\n\n private get _textFieldComponent(): TextFieldComponent {\n if (!this._textField) {\n this._textField = this._component.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.TEXT_FIELD) as TextFieldComponent;\n }\n return this._textField;\n }\n\n public get inputElement(): HTMLInputElement | null {\n if (!this._inputElement) {\n this._inputElement = this._component.querySelector<HTMLInputElement>(QUANTITY_FIELD_CONSTANTS.selectors.INPUT);\n }\n return this._inputElement;\n }\n\n private get _inputStep(): number {\n const input = this.inputElement;\n if (!input || this._isNullOrUndefinedOrEmpty(input.step)) {\n return 1;\n }\n\n return +input.step;\n }\n\n private get _inputMax(): number | null {\n const input = this.inputElement;\n if (!input || this._isNullOrUndefinedOrEmpty(input.max)) {\n return null;\n }\n\n return +input.max;\n }\n\n private get _inputMin(): number | null {\n const input = this.inputElement;\n if (!input || this._isNullOrUndefinedOrEmpty(input.min)) {\n return null;\n }\n\n return +input.min;\n }\n\n private _calcPrecision(value: number): number {\n const strVal = String(value);\n if (strVal.includes('.')) {\n return strVal.split('.')[1].length;\n }\n return 0;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IQuantityFieldAdapter } from './quantity-field-adapter';\nimport { QUANTITY_FIELD_CONSTANTS } from './quantity-field-constants';\n\nexport interface IQuantityFieldFoundation extends ICustomElementFoundation {\n required: boolean;\n invalid: boolean;\n}\n\nexport class QuantityFieldFoundation implements IQuantityFieldFoundation {\n private _required: boolean;\n private _invalid: boolean;\n private _incrementButtonSlotChanged: () => void;\n private _decrementButtonSlotChanged: () => void;\n private _incrementValue: () => void;\n private _decrementValue: () => void;\n\n constructor(private _adapter: IQuantityFieldAdapter) {\n this._incrementValue = () => this._adapter.increment();\n this._decrementValue = () => this._adapter.decrement();\n this._incrementButtonSlotChanged = () => this._onIncrementButtonSlotChanged();\n this._decrementButtonSlotChanged = () => this._onDecrementButtonSlotChanged();\n\n this._adapter.addIncrementButtonSlotListener(this._incrementButtonSlotChanged);\n this._adapter.addDecrementButtonSlotListener(this._decrementButtonSlotChanged);\n }\n\n public connect(): void {\n this._adapter.addInputDisabledAttributeChangeListener(() => this._syncDisabledStateOfButtons());\n this._syncDisabledStateOfButtons();\n this._adapter.initializeButtons();\n }\n\n public disconnect(): void {\n this._removeIncrementEventListener();\n this._removeDecrementEventListener();\n this._removeIncrementButtonSlotListener();\n this._removeDecrementButtonSlotListener();\n this._adapter.removeInputDisabledAttributeChangeListener();\n }\n\n private _onIncrementButtonSlotChanged(): void {\n this._addIncrementEventListener();\n }\n\n private _onDecrementButtonSlotChanged(): void {\n this._addDecrementEventListener();\n }\n\n private _addIncrementEventListener(): void {\n this._adapter.addIncrementEventListener('click', this._incrementValue);\n }\n\n private _addDecrementEventListener(): void {\n this._adapter.addDecrementEventListener('click', this._decrementValue);\n }\n\n private _removeIncrementEventListener(): void {\n this._adapter.removeIncrementEventListener('click', this._incrementValue);\n }\n\n private _removeDecrementEventListener(): void {\n this._adapter.removeDecrementEventListener('click', this._decrementValue);\n }\n\n private _removeIncrementButtonSlotListener(): void {\n this._adapter.removeIncrementButtonSlotListener(this._incrementButtonSlotChanged);\n }\n\n private _removeDecrementButtonSlotListener(): void {\n this._adapter.removeDecrementButtonSlotListener(this._decrementButtonSlotChanged);\n }\n\n private _syncDisabledStateOfButtons(): void {\n const isDisabled = this._adapter.inputHasAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n if (isDisabled) {\n this._adapter.addDecrementButtonAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n this._adapter.addIncrementButtonAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n } else {\n this._adapter.removeIncrementButtonAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n this._adapter.removeDecrementButtonAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n }\n }\n\n public get required(): boolean {\n return this._required;\n }\n public set required(value: boolean) {\n if (this._required === value) {\n return;\n }\n\n this._required = value;\n\n if (this._required) {\n this._adapter.setHostAttribute(QUANTITY_FIELD_CONSTANTS.attributes.REQUIRED);\n this._adapter.addRootClass(QUANTITY_FIELD_CONSTANTS.classes.REQUIRED);\n } else {\n this._adapter.removeHostAttribute(QUANTITY_FIELD_CONSTANTS.attributes.REQUIRED);\n this._adapter.removeRootClass(QUANTITY_FIELD_CONSTANTS.classes.REQUIRED);\n }\n }\n\n public get invalid(): boolean {\n return this._invalid;\n }\n public set invalid(value: boolean) {\n if (this._invalid === value) {\n return;\n }\n\n this._invalid = value;\n\n if (this._invalid) {\n this._adapter.setHostAttribute(QUANTITY_FIELD_CONSTANTS.attributes.INVALID);\n this._adapter.addRootClass(QUANTITY_FIELD_CONSTANTS.classes.INVALID);\n this._adapter.addTextFieldAttribute(QUANTITY_FIELD_CONSTANTS.attributes.INVALID);\n } else {\n this._adapter.removeHostAttribute(QUANTITY_FIELD_CONSTANTS.attributes.INVALID);\n this._adapter.removeRootClass(QUANTITY_FIELD_CONSTANTS.classes.INVALID);\n this._adapter.removeTextFieldAttribute(QUANTITY_FIELD_CONSTANTS.attributes.INVALID);\n }\n }\n\n}\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconRemoveCircleOutline, tylIconControlPoint } from '@tylertech/tyler-icons/standard';\nimport { QuantityFieldAdapter } from './quantity-field-adapter';\nimport { QuantityFieldFoundation } from './quantity-field-foundation';\nimport { QUANTITY_FIELD_CONSTANTS } from './quantity-field-constants';\nimport { IconButtonComponent } from '../icon-button';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-quantity-field\\\" part=\\\"root\\\"><slot name=\\\"label\\\"></slot><div class=\\\"forge-quantity-field__row\\\" part=\\\"row\\\"><slot name=\\\"decrement-button\\\"></slot><slot></slot><slot name=\\\"increment-button\\\"></slot></div><slot name=\\\"helper-text\\\"></slot></div></template>';\nconst styles = '.forge-quantity-field ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:\\\"\\\";vertical-align:0}.forge-quantity-field__row{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.forge-quantity-field ::slotted(forge-icon-button:first-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-right:4px}.forge-quantity-field ::slotted(forge-icon-button:last-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-left:4px}.forge-quantity-field ::slotted(forge-text-field){--forge-text-field-margin-top:0;--forge-text-field-margin-bottom:0}.forge-quantity-field--required ::slotted([slot=label])::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:\\\"*\\\";margin-right:4px}.forge-quantity-field--invalid ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:\\\"\\\";vertical-align:0}:host{display:inline-block}:host([hidden]){display:none}';\nimport { IconRegistry } from '../icon';\n\nexport interface IQuantityFieldComponent extends IBaseComponent {\n invalid: boolean;\n required: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-quantity-field': IQuantityFieldComponent;\n }\n}\n\n/**\n * The web component class behind the `<forge-quantity-field>` custom element.\n * \n * @tag forge-quantity-field\n */\n@CustomElement({\n name: QUANTITY_FIELD_CONSTANTS.elementName,\n dependencies: [\n IconButtonComponent\n ]\n})\nexport class QuantityFieldComponent extends BaseComponent implements IQuantityFieldComponent {\n public static get observedAttributes(): string[] {\n return [\n QUANTITY_FIELD_CONSTANTS.attributes.INVALID,\n QUANTITY_FIELD_CONSTANTS.attributes.REQUIRED\n ];\n }\n\n private _foundation: QuantityFieldFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new QuantityFieldFoundation(new QuantityFieldAdapter(this));\n\n IconRegistry.define([\n tylIconRemoveCircleOutline,\n tylIconControlPoint\n ]);\n }\n\n public connectedCallback(): void {\n if (this._requiredElementsPresent()) {\n this._foundation.connect();\n } else {\n this._ensureElementsPresent().then(() => {\n this._foundation.connect();\n });\n }\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 QUANTITY_FIELD_CONSTANTS.attributes.INVALID:\n this.invalid = coerceBoolean(newValue);\n break;\n case QUANTITY_FIELD_CONSTANTS.attributes.REQUIRED:\n this.required = coerceBoolean(newValue);\n break;\n }\n }\n\n private _ensureElementsPresent(): Promise<void> {\n return new Promise<void>(resolve => {\n if (this._requiredElementsPresent()) {\n resolve();\n return;\n }\n\n const observer = new MutationObserver(changes => {\n const hasAddedNodes = changes.reduce((prev, curr) => prev + curr.addedNodes.length, 0) > 0;\n if (hasAddedNodes) {\n if (this._requiredElementsPresent()) {\n observer.disconnect();\n resolve();\n }\n }\n });\n observer.observe(this, { childList: true, subtree: true });\n });\n }\n\n private _requiredElementsPresent(): boolean {\n const inputElement = this.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.INPUT);\n const decrementElement = this.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.DECREMENT_BUTTON);\n const incrementElement = this.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.INCREMENT_BUTTON);\n return !!inputElement && !!decrementElement && !!incrementElement;\n }\n\n /** Gets/sets the invalid state. */\n @FoundationProperty()\n public declare invalid: boolean;\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\n @FoundationProperty()\n public declare required: boolean;\n}\n", "import { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core/delegates/form-field-component-delegate';\nimport { IconButtonComponentDelegate } from '../icon-button';\nimport { ITextFieldComponentDelegateConfig, TextFieldComponentDelegate } from '../text-field/text-field-component-delegate';\nimport { IQuantityFieldComponent } from './quantity-field';\nimport { QUANTITY_FIELD_CONSTANTS } from './quantity-field-constants';\nimport { tylIconRemoveCircleOutline, tylIconControlPoint } from '@tylertech/tyler-icons/standard';\nimport { IconRegistry } from '../icon';\n\nexport type QuantityFieldComponentDelegateProps = Partial<IQuantityFieldComponent>;\nexport interface IQuantityFieldComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n id?: string;\n label?: string;\n value?: string;\n step?: string;\n helperText?: string;\n textFieldDelegateConfig?: ITextFieldComponentDelegateConfig;\n}\nexport interface IQuantityFieldComponentDelegateConfig extends IBaseComponentDelegateConfig<IQuantityFieldComponent, IQuantityFieldComponentDelegateOptions> {}\n\nexport class QuantityFieldComponentDelegate extends FormFieldComponentDelegate<IQuantityFieldComponent, IQuantityFieldComponentDelegateOptions> {\n private _textFieldDelegate: TextFieldComponentDelegate;\n private _labelElement: HTMLLabelElement | undefined;\n private _helperTextElement: HTMLSpanElement | undefined;\n\n constructor(config?: IQuantityFieldComponentDelegateConfig) {\n super(config);\n IconRegistry.define([tylIconRemoveCircleOutline, tylIconControlPoint]);\n }\n\n protected _build(): IQuantityFieldComponent {\n const quantityField = document.createElement(QUANTITY_FIELD_CONSTANTS.elementName);\n this._attachButton(quantityField, tylIconRemoveCircleOutline.name, 'decrement-button');\n this._attachTextField(quantityField);\n this._attachButton(quantityField, tylIconControlPoint.name, 'increment-button');\n return quantityField;\n }\n\n protected override _configure(): void {\n this.inputElement.value = this._config.options?.value ?? '0';\n this.inputElement.style.textAlign = 'center';\n this.inputElement.style.width = '64px';\n\n if (this._config.options?.helperText) {\n this.setHelperText(this._config.options.helperText);\n }\n if (typeof this._config.options?.label === 'string') {\n this._createLabel(this._config.options.label);\n }\n if (this._config.options?.step !== undefined) {\n this.inputElement.step = this._config.options.step;\n }\n }\n\n public get value(): string {\n return this._textFieldDelegate.inputElement.value;\n }\n public set value(value: string) {\n this._textFieldDelegate.inputElement.value = value;\n }\n\n public get disabled(): boolean {\n return this._textFieldDelegate.inputElement.disabled;\n }\n public set disabled(value: boolean) {\n this._textFieldDelegate.inputElement.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._element.invalid || false;\n }\n public set invalid(value: boolean) {\n this._element.invalid = value;\n }\n\n public get inputElement(): HTMLInputElement {\n return this._textFieldDelegate.inputElement;\n }\n\n public get labelElement(): HTMLLabelElement | undefined {\n return this._labelElement;\n }\n\n public onChange(listener: (value: string) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('input', evt => listener((evt.target as HTMLInputElement).value));\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('blur', evt => listener(evt));\n }\n\n private _attachTextField(quantityField: IQuantityFieldComponent): void {\n const textFieldConfig: ITextFieldComponentDelegateConfig = {\n props: { ...this._config.options?.textFieldDelegateConfig?.props },\n options: {\n ...this._config.options?.textFieldDelegateConfig?.options,\n id: this._config.options?.id,\n type: 'number'\n }\n };\n this._textFieldDelegate = new TextFieldComponentDelegate(textFieldConfig);\n quantityField.appendChild(this._textFieldDelegate.element);\n }\n\n public setLabel(text: string | null): void {\n if (text) {\n if (this._labelElement) {\n this._labelElement.textContent = text;\n } else {\n this._createLabel(text);\n }\n } else if (this._labelElement) {\n this._element.removeChild(this._labelElement);\n this._labelElement = undefined;\n }\n }\n\n public setHelperText(text: string | null): void {\n if (text) {\n if (!this._helperTextElement) {\n this._helperTextElement = document.createElement('span');\n this._helperTextElement.slot = 'helper-text';\n this._element.appendChild(this._helperTextElement);\n }\n this._helperTextElement.textContent = text;\n } else if (this._helperTextElement) {\n this._element.removeChild(this._helperTextElement);\n this._helperTextElement = undefined;\n }\n }\n\n private _createLabel(text: string): void {\n this._labelElement = document.createElement('label');\n this._labelElement.textContent = text;\n this._labelElement.slot = 'label';\n if (this._config.options?.id) {\n this._labelElement.setAttribute('for', this._config.options.id);\n }\n this._element.appendChild(this._labelElement);\n }\n\n private _attachButton(parent: HTMLElement, iconName: string, slot: string): IconButtonComponentDelegate {\n const iconButtonDelegate = new IconButtonComponentDelegate({\n options: {\n iconName,\n parent,\n attributes: { slot }\n }\n });\n return iconButtonDelegate;\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { QuantityFieldComponent } from './quantity-field';\n\nexport * from './quantity-field-adapter';\nexport * from './quantity-field-constants';\nexport * from './quantity-field-foundation';\nexport * from './quantity-field';\nexport * from './quantity-field-component-delegate';\n\nexport function defineQuantityFieldComponent(): void {\n defineCustomElement(QuantityFieldComponent);\n}\n"],
|
|
5
|
-
"mappings": "gfAEA,IAAMA,EAA2C,GAAGC,kBAE9CC,EAAa,CACjB,QAAS,UACT,SAAU,WACV,SAAU,UACZ,EAEMC,EAAU,CACd,KAAM,uBACN,QAAS,gCACT,SAAU,gCACZ,EAEMC,EAAQ,CACZ,iBAAkB,mBAClB,iBAAkB,mBAClB,MAAO,QACP,YAAa,aACf,EAEMC,EAAY,CAChB,KAAM,IAAIF,EAAQ,OA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ACnDC,EAAoBC,CAAsB,CAC5C",
|
|
6
|
-
"names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "classes", "slots", "selectors", "QUANTITY_FIELD_CONSTANTS", "QuantityFieldAdapter", "BaseAdapter", "component", "getShadowElement", "QUANTITY_FIELD_CONSTANTS", "name", "listener", "value", "event", "callback", "input", "curValue", "precision", "newValue", "mutationCallback", "mutationRecords", "mutationOptions", "mutationRecord", "strVal", "QuantityFieldFoundation", "_adapter", "QUANTITY_FIELD_CONSTANTS", "value", "template", "styles", "QuantityFieldComponent", "BaseComponent", "attachShadowTemplate", "QuantityFieldFoundation", "QuantityFieldAdapter", "IconRegistry", "tylIconRemoveCircleOutline", "tylIconControlPoint", "QUANTITY_FIELD_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "resolve", "observer", "changes", "prev", "curr", "inputElement", "decrementElement", "incrementElement", "__decorateClass", "FoundationProperty", "CustomElement", "IconButtonComponent", "QuantityFieldComponentDelegate", "FormFieldComponentDelegate", "config", "IconRegistry", "tylIconRemoveCircleOutline", "tylIconControlPoint", "quantityField", "QUANTITY_FIELD_CONSTANTS", "_a", "_b", "_c", "_d", "_e", "value", "listener", "evt", "textFieldConfig", "__spreadValues", "__spreadProps", "TextFieldComponentDelegate", "text", "parent", "iconName", "slot", "IconButtonComponentDelegate", "defineQuantityFieldComponent", "defineCustomElement", "QuantityFieldComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as A}from"./chunk.3CTKWBV2.js";import{a as s}from"./chunk.NVUMRW44.js";import{a as T}from"./chunk.OLFOVKQG.js";import{a as _,b as x}from"./chunk.VRSPT7WX.js";import{a as v,e as f,f as d,k as b}from"./chunk.LNTTU2GL.js";import{c as h}from"./chunk.L4QSPQDE.js";import{b as p,c,l as u}from"./chunk.J2M2MXP2.js";import{d as n}from"./chunk.M3QDAYD2.js";var E=`${x}avatar`,k={IMAGE_URL:"image-url",TEXT:"text",LETTER_COUNT:"letter-count"},U={DEFAULT_LETTER_COUNT:2},I={ROOT:".forge-avatar",DEFAULT_SLOT:".forge-avatar > slot:not([name])"},L={DEFAULT_COLOR:A.themeColors.tertiary,BACKGROUND_VARNAME:"--forge-avatar-background"},e={elementName:E,attributes:k,numbers:U,selectors:I,strings:L};var g=class extends T{constructor(r){super(r);this._root=d(this._component,e.selectors.ROOT),this._defaultSlot=d(this._component,e.selectors.DEFAULT_SLOT)}async setBackgroundImageUrl(r){return this._root.classList.add("forge-avatar--image"),new Promise(o=>{let a=new Image;a.onload=()=>{this._root.style.backgroundImage=`url(${a.src})`,o(!0)},a.onerror=()=>{this._root.classList.remove("forge-avatar--image"),o(!1)},a.src=r})}removeBackgroundImage(){this._root.style.removeProperty("background-image"),this._root.classList.remove("forge-avatar--image")}setText(r){this._defaultSlot.textContent=r}clearText(){h(this._defaultSlot)}};var l=class{constructor(t){this._adapter=t;this._text="";this._letterCount=e.numbers.DEFAULT_LETTER_COUNT;this._initialized=!1}initialize(){this._render(),this._initialized=!0}disconnect(){this._initialized=!1}_render(){this._setText(),this._setBackgroundImageUrl()}async _setBackgroundImageUrl(){this._imageUrl?await this._adapter.setBackgroundImageUrl(this._imageUrl)&&this._adapter.clearText():this._adapter.removeBackgroundImage()}_setText(){let t=this._getTextContent(this._text,this._letterCount);t?this._adapter.setText(t):this._adapter.clearText()}_getTextContent(t,r){if(!t||!c(t)||r<=0)return"";let o;return r===1?o=t[0].toUpperCase():o=(t.match(/\S+/g)||[]).slice(0,r).reduce((C,y)=>C+=y[0].toUpperCase(),""),o}get text(){return this._text}set text(t){this._text!==t&&(this._text=t||"",this._adapter.setHostAttribute(e.attributes.TEXT,this._text),this._initialized&&this._render())}get letterCount(){return this._letterCount}set letterCount(t){this._letterCount!==t&&(this._letterCount=t,this._adapter.setHostAttribute(e.attributes.LETTER_COUNT,p(this._letterCount)?this._letterCount.toString():""),this._initialized&&this._render())}get imageUrl(){return this._imageUrl}set imageUrl(t){this._imageUrl!==t&&(this._imageUrl=t,this._initialized&&this._render())}};var N='<template><div class="forge-avatar" aria-hidden="true" part="root"><slot></slot></div></template>',O=':host{contain:content;display:inline-block}:host([hidden]){display:none}.forge-avatar{--_avatar-size:var(--forge-avatar-size, 40px);--_avatar-background:var(--forge-avatar-background, var(--forge-theme-tertiary, #3d5afe));--_avatar-color:var(--forge-avatar-color, var(--forge-theme-on-tertiary, #ffffff));--_avatar-transition-duration:var(--forge-avatar-transition-duration, var(--forge-animation-duration-short4, 200ms));--_avatar-transition-timing:var(--forge-avatar-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_avatar-shape:var(--forge-avatar-shape, var(--forge-shape-round, 50%))}.forge-avatar{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;overflow:hidden;-webkit-transition:height var(--_avatar-transition-duration) var(--_avatar-transition-timing),width var(--_avatar-transition-duration) var(--_avatar-transition-timing);transition:height var(--_avatar-transition-duration) var(--_avatar-transition-timing),width var(--_avatar-transition-duration) var(--_avatar-transition-timing);border-radius:var(--_avatar-shape);-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--_avatar-size);height:var(--_avatar-size);background-color:var(--_avatar-background);background-position:center;background-repeat:no-repeat;background-size:cover;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-subheading2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-subheading2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading2-font-size-scale, 1)));font-weight:var(--forge-typography-subheading2-font-weight,400);line-height:var(--forge-typography-subheading2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading2-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-subheading2-letter-spacing, normal);text-transform:var(--forge-typography-subheading2-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-subheading2-text-decoration,inherit);text-decoration:var(--forge-typography-subheading2-text-decoration,inherit);color:var(--_avatar-color)}.forge-avatar--image{background-color:inherit}',i=class extends b{constructor(){super();f(this,N,O),this._foundation=new l(new g(this))}static get observedAttributes(){return[e.attributes.TEXT,e.attributes.LETTER_COUNT,e.attributes.IMAGE_URL]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(r,o,a){switch(r){case e.attributes.TEXT:this.text=a;break;case e.attributes.LETTER_COUNT:this.letterCount=u(a);break;case e.attributes.IMAGE_URL:this.imageUrl=a;break}}};n([s()],i.prototype,"text",2),n([s()],i.prototype,"letterCount",2),n([s()],i.prototype,"imageUrl",2),i=n([_({name:e.elementName})],i);function tt(){v(i)}export{e as a,g as b,l as c,i as d,tt as e};
|
|
7
|
-
//# sourceMappingURL=chunk.QVATEY5S.js.map
|