@tylertech/forge 3.0.0-next.12 → 3.0.0-next.14
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/README.md +1 -6
- package/custom-elements.json +49089 -32080
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/app-bar/index.js +7 -0
- package/dist/esm/app-bar/app-bar/index.js.map +7 -0
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/avatar/index.js +1 -1
- package/dist/esm/backdrop/index.js +1 -1
- package/dist/esm/badge/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/busy-indicator/index.js +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-area/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/card/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.PLNLLKP2.js → chunk.26E4L52W.js} +2 -2
- package/dist/esm/chunks/chunk.2GJ54C3Q.js +7 -0
- package/dist/esm/chunks/chunk.2GJ54C3Q.js.map +7 -0
- package/dist/esm/chunks/chunk.2GYZM6ZG.js +7 -0
- package/dist/esm/chunks/chunk.2GYZM6ZG.js.map +7 -0
- package/dist/esm/chunks/chunk.2YDKRTKP.js +7 -0
- package/dist/esm/chunks/chunk.2YDKRTKP.js.map +7 -0
- package/dist/esm/chunks/chunk.3JCHXLPT.js +7 -0
- package/dist/esm/chunks/chunk.3JCHXLPT.js.map +7 -0
- package/{styles/icon-button/forge-icon-button.scss → dist/esm/chunks/chunk.3PKNBYMG.js} +1 -3
- package/dist/esm/chunks/chunk.3PKNBYMG.js.map +7 -0
- package/dist/esm/chunks/chunk.3RMBFRGC.js +7 -0
- package/dist/esm/chunks/chunk.3RMBFRGC.js.map +7 -0
- package/dist/esm/chunks/{chunk.AY43NTAK.js → chunk.3UO6S3IK.js} +2 -2
- package/dist/esm/chunks/chunk.3ZRQFXQU.js +7 -0
- package/dist/esm/chunks/{chunk.UZPZ6KUN.js.map → chunk.3ZRQFXQU.js.map} +2 -2
- package/dist/esm/chunks/{chunk.IXGXASHQ.js → chunk.4B5IOZAT.js} +2 -2
- package/dist/esm/chunks/{chunk.WK2L7BPJ.js → chunk.4QDN5PM6.js} +2 -2
- package/dist/esm/chunks/{chunk.YIFI5D2X.js → chunk.543K5Y4E.js} +2 -2
- package/dist/esm/chunks/{chunk.YIFI5D2X.js.map → chunk.543K5Y4E.js.map} +3 -3
- package/dist/esm/chunks/{chunk.C5ZUGOOC.js → chunk.57PXXJA6.js} +2 -2
- package/dist/esm/chunks/{chunk.C7VEJINB.js → chunk.5C24LZNU.js} +2 -2
- package/dist/esm/chunks/{chunk.C2MQN7MI.js → chunk.5H4G6BWX.js} +2 -2
- package/dist/esm/chunks/{chunk.CQQSOTZ5.js → chunk.5VHUMZYS.js} +2 -2
- package/dist/esm/chunks/chunk.6DXDNQUR.js +15 -0
- package/dist/esm/chunks/chunk.6DXDNQUR.js.map +7 -0
- package/dist/esm/chunks/chunk.6Q3SV2R2.js +7 -0
- package/dist/esm/chunks/chunk.6Q3SV2R2.js.map +7 -0
- package/dist/esm/chunks/chunk.6Y45DLA6.js +7 -0
- package/dist/esm/chunks/chunk.6Y45DLA6.js.map +7 -0
- package/dist/esm/chunks/{chunk.WJXDDQUK.js → chunk.7ABZUBTT.js} +2 -2
- package/dist/esm/chunks/{chunk.ZREXLSAJ.js → chunk.7BGOH44S.js} +2 -2
- package/dist/esm/chunks/{chunk.2WSXSOYB.js → chunk.7DHDFH5L.js} +2 -2
- package/dist/esm/chunks/{chunk.UVJFHSMF.js → chunk.7PP6QHOM.js} +2 -2
- package/dist/esm/chunks/chunk.7UXLLUTN.js +7 -0
- package/dist/esm/chunks/{chunk.CLD75EBJ.js → chunk.7W2UWAZX.js} +2 -2
- package/dist/esm/chunks/{chunk.CLD75EBJ.js.map → chunk.7W2UWAZX.js.map} +3 -3
- package/dist/esm/chunks/chunk.A72W7RW7.js +7 -0
- package/dist/esm/chunks/chunk.A72W7RW7.js.map +7 -0
- package/dist/esm/chunks/chunk.AEJGC4YG.js +7 -0
- package/dist/esm/chunks/chunk.AEJGC4YG.js.map +7 -0
- package/dist/esm/chunks/{chunk.NDJZYFRT.js → chunk.B46Q3AFP.js} +2 -2
- package/dist/esm/chunks/chunk.BFUGFHEH.js +7 -0
- package/dist/esm/chunks/{chunk.URFSXQKR.js.map → chunk.BFUGFHEH.js.map} +2 -2
- package/dist/esm/chunks/chunk.BLW6QESQ.js +12 -0
- package/dist/esm/chunks/chunk.BLW6QESQ.js.map +7 -0
- package/dist/esm/chunks/chunk.BMQYEYCT.js +7 -0
- package/dist/esm/chunks/chunk.BMQYEYCT.js.map +7 -0
- package/dist/esm/chunks/{chunk.EY37FYZ4.js → chunk.C5IB44HX.js} +2 -2
- package/dist/esm/chunks/chunk.CNRFOWHY.js +7 -0
- package/dist/esm/chunks/{chunk.YXXKPT6P.js.map → chunk.CNRFOWHY.js.map} +2 -2
- package/dist/esm/chunks/{chunk.6VSFLBZF.js → chunk.CTZ3AWDW.js} +2 -2
- package/dist/esm/chunks/{chunk.YA3RDJCV.js → chunk.CZOABXEQ.js} +2 -2
- package/dist/esm/chunks/{chunk.YA3RDJCV.js.map → chunk.CZOABXEQ.js.map} +2 -2
- package/dist/esm/chunks/chunk.DD35U4AA.js +7 -0
- package/dist/esm/chunks/{chunk.JCO4M4PF.js.map → chunk.DD35U4AA.js.map} +3 -3
- package/dist/esm/chunks/{chunk.HBCDD25D.js → chunk.DDXIHZFX.js} +2 -2
- package/dist/esm/chunks/{chunk.VDGJ4UDL.js → chunk.DOEG3DWJ.js} +2 -2
- package/dist/esm/chunks/{chunk.4USQ2AP6.js → chunk.DTKFE7YB.js} +2 -2
- package/dist/esm/chunks/{chunk.IJ2I25V3.js → chunk.E3GVKR4E.js} +2 -2
- package/dist/esm/chunks/chunk.EBSBAFCX.js +7 -0
- package/dist/esm/chunks/chunk.EBSBAFCX.js.map +7 -0
- package/dist/esm/chunks/{chunk.FK6NNHXH.js → chunk.F2EBSV5Z.js} +2 -2
- package/dist/esm/chunks/chunk.F6KM5FO6.js +7 -0
- package/dist/esm/chunks/chunk.F6KM5FO6.js.map +7 -0
- package/dist/esm/chunks/chunk.FB6ZLH6P.js +7 -0
- package/dist/esm/chunks/chunk.FB6ZLH6P.js.map +7 -0
- package/dist/esm/chunks/chunk.FQSL747N.js +7 -0
- package/dist/esm/chunks/chunk.FQSL747N.js.map +7 -0
- package/dist/esm/chunks/{chunk.RNUGVHZF.js → chunk.G2BNY5QQ.js} +2 -2
- package/dist/esm/chunks/{chunk.4JF54GDJ.js → chunk.GS72TBUD.js} +2 -2
- package/dist/esm/chunks/{chunk.AQ7ROWO4.js → chunk.GT3VPSXY.js} +2 -2
- package/dist/esm/chunks/{chunk.DABGA7I6.js → chunk.GWJ4QCSW.js} +2 -2
- package/dist/esm/chunks/chunk.H7GW57Q6.js +7 -0
- package/dist/esm/chunks/chunk.H7GW57Q6.js.map +7 -0
- package/dist/esm/chunks/{chunk.RXLORASN.js → chunk.HHHBS6FB.js} +2 -2
- package/dist/esm/chunks/chunk.I3NHK2S3.js +7 -0
- package/dist/esm/chunks/{chunk.HKSXC5VK.js → chunk.IEB5KRFQ.js} +2 -2
- package/dist/esm/chunks/chunk.IT66AOX7.js +7 -0
- package/dist/esm/chunks/chunk.IT66AOX7.js.map +7 -0
- package/dist/esm/chunks/chunk.IVUK3W34.js +7 -0
- package/dist/esm/chunks/{chunk.TSH7BTC3.js.map → chunk.IVUK3W34.js.map} +2 -2
- package/dist/esm/chunks/chunk.IW7HALLT.js +7 -0
- package/dist/esm/chunks/{chunk.U5XNDTSZ.js.map → chunk.IW7HALLT.js.map} +2 -2
- package/dist/esm/chunks/chunk.J2KHTGSB.js +7 -0
- package/dist/esm/chunks/chunk.J2KHTGSB.js.map +7 -0
- package/dist/esm/chunks/{chunk.OQAD6MFL.js → chunk.J3B5CWKT.js} +2 -2
- package/dist/esm/chunks/chunk.JAWV5Y5T.js +7 -0
- package/dist/esm/chunks/{chunk.I5SFCLDD.js.map → chunk.JAWV5Y5T.js.map} +3 -3
- package/dist/esm/chunks/chunk.JVK64JDZ.js +7 -0
- package/dist/esm/chunks/chunk.JVK64JDZ.js.map +7 -0
- package/dist/esm/chunks/chunk.KFDYMENL.js +7 -0
- package/dist/esm/chunks/chunk.KFDYMENL.js.map +7 -0
- package/dist/esm/chunks/{chunk.QNVVUUNQ.js → chunk.KLPF4CNX.js} +2 -2
- package/dist/esm/chunks/chunk.KTYYBWTN.js +7 -0
- package/dist/esm/chunks/chunk.KTYYBWTN.js.map +7 -0
- package/dist/esm/chunks/{chunk.66X366TV.js → chunk.L4Y4RO5O.js} +2 -2
- package/dist/esm/chunks/chunk.LCNR2RPT.js +7 -0
- package/dist/esm/chunks/chunk.LCNR2RPT.js.map +7 -0
- package/dist/esm/chunks/{chunk.RBFGJH3C.js → chunk.LMIKNDBS.js} +2 -2
- package/dist/esm/chunks/chunk.LOBKFTRM.js +7 -0
- package/dist/esm/chunks/chunk.LOBKFTRM.js.map +7 -0
- package/dist/esm/chunks/chunk.LS7WRRT2.js +7 -0
- package/dist/esm/chunks/chunk.LS7WRRT2.js.map +7 -0
- package/dist/esm/chunks/{chunk.R2KOYHIZ.js → chunk.LSNAGIIH.js} +2 -2
- package/dist/esm/chunks/chunk.LUIKMPQR.js +7 -0
- package/dist/esm/chunks/chunk.LUIKMPQR.js.map +7 -0
- package/dist/esm/chunks/{chunk.7M4HRJYP.js → chunk.LXX3YZYS.js} +2 -2
- package/dist/esm/chunks/chunk.MZZJY5NX.js +7 -0
- package/dist/esm/chunks/chunk.MZZJY5NX.js.map +7 -0
- package/dist/esm/chunks/{chunk.W7H2ZYNR.js → chunk.NG6UZ4OL.js} +2 -2
- package/dist/esm/chunks/chunk.NYYXUH3X.js +7 -0
- package/dist/esm/chunks/{chunk.DQVYB55P.js → chunk.NZKIFXBU.js} +2 -2
- package/dist/esm/chunks/{chunk.AHAARGYM.js → chunk.OED5UCYT.js} +2 -2
- package/dist/esm/chunks/{chunk.5ASOX23Q.js → chunk.OUACQISE.js} +2 -2
- package/dist/esm/chunks/{chunk.5ASOX23Q.js.map → chunk.OUACQISE.js.map} +1 -1
- package/dist/esm/chunks/chunk.OYO5O3NF.js +7 -0
- package/dist/esm/chunks/{chunk.7UJAI6P2.js → chunk.P7LC3YYW.js} +2 -2
- package/dist/esm/chunks/{chunk.Z6AFASMO.js → chunk.PK7R6WDF.js} +2 -2
- package/dist/esm/chunks/chunk.PQQVUUHU.js +7 -0
- package/dist/esm/chunks/{chunk.LNLO36U6.js.map → chunk.PQQVUUHU.js.map} +2 -2
- package/dist/esm/chunks/{chunk.WWTQAN4G.js → chunk.PSTGTQVK.js} +2 -2
- package/dist/esm/chunks/chunk.Q5Z6F3PI.js +7 -0
- package/dist/esm/chunks/chunk.Q5Z6F3PI.js.map +7 -0
- package/dist/esm/chunks/{chunk.OXGOCF4L.js → chunk.QFY23EWU.js} +2 -2
- package/dist/esm/chunks/{chunk.OXGOCF4L.js.map → chunk.QFY23EWU.js.map} +2 -2
- package/dist/esm/chunks/chunk.RCSBJQ4G.js +7 -0
- package/dist/esm/chunks/chunk.RCSBJQ4G.js.map +7 -0
- package/dist/esm/chunks/chunk.RDW7Z4W5.js +7 -0
- package/dist/esm/chunks/chunk.RDW7Z4W5.js.map +7 -0
- package/dist/esm/chunks/chunk.RYNQDXFA.js +7 -0
- package/dist/esm/chunks/{chunk.YP2NHWIW.js.map → chunk.RYNQDXFA.js.map} +2 -2
- package/dist/esm/chunks/{chunk.RWUJGZ3R.js → chunk.RZZBM3AW.js} +2 -2
- package/dist/esm/chunks/{chunk.37JFBP4X.js → chunk.SNF35Y6C.js} +2 -2
- package/dist/esm/chunks/chunk.SOLF23NC.js +7 -0
- package/dist/esm/chunks/chunk.SOLF23NC.js.map +7 -0
- package/dist/esm/chunks/chunk.T34DG7BU.js +7 -0
- package/dist/esm/chunks/chunk.TA3MVDUU.js +7 -0
- package/dist/esm/chunks/chunk.TA3MVDUU.js.map +7 -0
- package/dist/esm/chunks/{chunk.HDO3WRH7.js → chunk.THWSN3X4.js} +2 -2
- package/dist/esm/chunks/chunk.TLFCQSJN.js +7 -0
- package/dist/esm/chunks/chunk.TLFCQSJN.js.map +7 -0
- package/dist/esm/chunks/{chunk.E4TAHUQO.js → chunk.TZFUKJ24.js} +2 -2
- package/dist/esm/chunks/{chunk.SEWAMWO6.js → chunk.U5WMRBSC.js} +2 -2
- package/dist/esm/chunks/chunk.URCJO73M.js +7 -0
- package/dist/esm/chunks/chunk.URCJO73M.js.map +7 -0
- package/dist/esm/chunks/{chunk.PDSOXEMY.js → chunk.UWZWXNTW.js} +2 -2
- package/dist/esm/chunks/chunk.VD5ZL5ZN.js +7 -0
- package/dist/esm/chunks/{chunk.OQ75YGB6.js.map → chunk.VD5ZL5ZN.js.map} +2 -2
- package/dist/esm/chunks/chunk.VDZ7HBKM.js +7 -0
- package/dist/esm/chunks/chunk.VDZ7HBKM.js.map +7 -0
- package/dist/esm/chunks/{chunk.CBIHNCT5.js → chunk.W324TWF2.js} +2 -2
- package/dist/esm/chunks/chunk.WQGPIOL6.js +7 -0
- package/dist/esm/chunks/chunk.WQGPIOL6.js.map +7 -0
- package/dist/esm/chunks/chunk.XDANTL6C.js +7 -0
- package/dist/esm/chunks/chunk.XDANTL6C.js.map +7 -0
- package/dist/esm/chunks/chunk.XNCBGWE4.js +7 -0
- package/dist/esm/chunks/chunk.XNCBGWE4.js.map +7 -0
- package/dist/esm/chunks/{chunk.ZYVXIP42.js → chunk.YKZ25J6B.js} +2 -2
- package/dist/esm/chunks/chunk.Z2RB75TN.js +7 -0
- package/dist/esm/chunks/chunk.Z2RB75TN.js.map +7 -0
- package/dist/esm/chunks/chunk.Z7PBGV4K.js +7 -0
- package/dist/esm/chunks/{chunk.TCFKFKZW.js.map → chunk.Z7PBGV4K.js.map} +4 -4
- package/dist/esm/chunks/{chunk.R6NA7SV2.js → chunk.ZSD7MMVB.js} +2 -2
- package/dist/esm/chunks/chunk.ZSZFWZAI.js +7 -0
- package/dist/esm/chunks/chunk.ZSZFWZAI.js.map +7 -0
- package/dist/esm/chunks/chunk.ZVJMIBUM.js +7 -0
- package/dist/esm/chunks/chunk.ZVJMIBUM.js.map +7 -0
- package/dist/esm/circular-progress/index.js +1 -1
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/base/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/utils/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/divider/index.js +1 -1
- package/dist/esm/drawer/base/index.js +1 -1
- package/dist/esm/drawer/drawer/index.js +1 -1
- package/dist/esm/drawer/index.js +1 -1
- package/dist/esm/drawer/mini-drawer/index.js +1 -1
- package/dist/esm/drawer/modal-drawer/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/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 +7 -0
- package/dist/esm/label/index.js.map +7 -0
- 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/page-state/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/popup/index.js +1 -1
- package/dist/esm/product-icon/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/ripple/index.js +1 -1
- package/dist/esm/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 +7 -0
- package/dist/esm/split-button/index.js.map +7 -0
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stack/index.js +1 -1
- package/dist/esm/state-layer/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/dist/esm/toolbar/index.js +1 -1
- package/dist/esm/tooltip/index.js +1 -1
- package/dist/esm/view-switcher/index.js +1 -1
- package/dist/esm/view-switcher/view/index.js +1 -1
- package/dist/forge-dark.css +1 -1
- 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/app-bar/app-bar-adapter.d.ts +30 -0
- package/esm/app-bar/app-bar/app-bar-adapter.js +71 -0
- package/esm/app-bar/{app-bar-constants.d.ts → app-bar/app-bar-constants.d.ts} +7 -11
- package/esm/app-bar/app-bar/app-bar-constants.js +32 -0
- package/esm/app-bar/{app-bar-foundation.d.ts → app-bar/app-bar-foundation.d.ts} +17 -16
- package/esm/app-bar/app-bar/app-bar-foundation.js +71 -0
- package/esm/app-bar/app-bar/app-bar.d.ts +66 -0
- package/esm/app-bar/app-bar/app-bar.js +107 -0
- package/esm/app-bar/app-bar/index.d.ts +10 -0
- package/esm/app-bar/app-bar/index.js +14 -0
- package/esm/app-bar/help-button/app-bar-help-button-adapter.d.ts +8 -1
- package/esm/app-bar/help-button/app-bar-help-button-adapter.js +22 -1
- package/esm/app-bar/help-button/app-bar-help-button-constants.d.ts +7 -0
- package/esm/app-bar/help-button/app-bar-help-button-constants.js +11 -1
- package/esm/app-bar/help-button/app-bar-help-button-foundation.d.ts +4 -0
- package/esm/app-bar/help-button/app-bar-help-button-foundation.js +16 -0
- package/esm/app-bar/help-button/app-bar-help-button.d.ts +13 -2
- package/esm/app-bar/help-button/app-bar-help-button.js +27 -6
- package/esm/app-bar/index.d.ts +0 -4
- package/esm/app-bar/index.js +0 -8
- package/esm/app-bar/menu-button/app-bar-menu-button-constants.d.ts +7 -0
- package/esm/app-bar/menu-button/app-bar-menu-button-constants.js +9 -1
- package/esm/app-bar/menu-button/app-bar-menu-button.d.ts +19 -2
- package/esm/app-bar/menu-button/app-bar-menu-button.js +57 -8
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.d.ts +6 -2
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.js +17 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-constants.d.ts +1 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-constants.js +3 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.d.ts +4 -4
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +9 -11
- package/esm/app-bar/notification-button/app-bar-notification-button.d.ts +17 -4
- package/esm/app-bar/notification-button/app-bar-notification-button.js +20 -5
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.d.ts +7 -1
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.js +26 -3
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.d.ts +1 -3
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.js +2 -4
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.d.ts +5 -2
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.js +20 -22
- package/esm/app-bar/profile-button/app-bar-profile-button.d.ts +31 -2
- package/esm/app-bar/profile-button/app-bar-profile-button.js +33 -6
- package/esm/autocomplete/autocomplete-foundation.js +2 -2
- package/esm/banner/banner-constants.js +1 -1
- package/esm/banner/banner.js +2 -2
- package/esm/bottom-sheet/bottom-sheet.js +1 -1
- package/esm/busy-indicator/busy-indicator.js +2 -2
- package/esm/button/base/base-button-adapter.d.ts +68 -0
- package/esm/button/base/base-button-adapter.js +238 -0
- package/esm/button/base/base-button-constants.d.ts +44 -0
- package/esm/button/base/base-button-constants.js +32 -0
- package/esm/button/base/base-button-foundation.d.ts +74 -0
- package/esm/button/base/base-button-foundation.js +240 -0
- package/esm/button/base/base-button.d.ts +53 -0
- package/esm/button/base/base-button.js +112 -0
- package/esm/button/button-adapter.d.ts +14 -0
- package/esm/button/button-adapter.js +14 -0
- package/esm/button/button-component-delegate.d.ts +4 -4
- package/esm/button/button-component-delegate.js +13 -17
- package/esm/button/button-constants.d.ts +10 -18
- package/esm/button/button-constants.js +6 -22
- package/esm/button/button-foundation.d.ts +25 -0
- package/esm/button/button-foundation.js +49 -0
- package/esm/button/button.d.ts +126 -30
- package/esm/button/button.js +158 -159
- package/esm/button/index.d.ts +3 -1
- package/esm/button/index.js +3 -1
- package/esm/button-toggle/button-toggle/button-toggle.js +1 -1
- package/esm/calendar/calendar-dom-utils.js +18 -30
- package/esm/calendar/calendar.js +1 -1
- package/esm/checkbox/checkbox-adapter.d.ts +50 -59
- package/esm/checkbox/checkbox-adapter.js +104 -186
- package/esm/checkbox/checkbox-component-delegate.d.ts +18 -9
- package/esm/checkbox/checkbox-component-delegate.js +58 -51
- package/esm/checkbox/checkbox-constants.d.ts +14 -56
- package/esm/checkbox/checkbox-constants.js +17 -50
- package/esm/checkbox/checkbox-foundation.d.ts +48 -18
- package/esm/checkbox/checkbox-foundation.js +139 -139
- package/esm/checkbox/checkbox.d.ts +120 -9
- package/esm/checkbox/checkbox.js +235 -36
- package/esm/checkbox/index.d.ts +1 -1
- package/esm/checkbox/index.js +1 -1
- package/esm/chip-field/chip-field-constants.d.ts +3 -0
- package/esm/chip-field/chip-field-constants.js +4 -0
- package/esm/chip-field/chip-field-foundation.d.ts +5 -0
- package/esm/chip-field/chip-field-foundation.js +20 -1
- package/esm/chip-field/chip-field.d.ts +5 -0
- package/esm/chip-field/chip-field.js +19 -1
- package/esm/chips/chip/chip.js +1 -1
- package/esm/circular-progress/circular-progress-adapter.d.ts +2 -2
- package/esm/circular-progress/circular-progress-adapter.js +15 -6
- package/esm/circular-progress/circular-progress-constants.d.ts +4 -1
- package/esm/circular-progress/circular-progress-constants.js +2 -1
- package/esm/circular-progress/circular-progress-foundation.d.ts +9 -1
- package/esm/circular-progress/circular-progress-foundation.js +21 -2
- package/esm/circular-progress/circular-progress.d.ts +15 -3
- package/esm/circular-progress/circular-progress.js +25 -8
- package/esm/color-picker/color-picker.js +2 -2
- package/esm/constants.d.ts +16 -0
- package/esm/constants.js +4 -0
- package/esm/core/base/base-adapter.d.ts +13 -1
- package/esm/core/base/base-adapter.js +17 -0
- package/esm/core/base/base-component.d.ts +0 -38
- package/esm/core/base/base-component.js +0 -4
- package/esm/core/base/base-focusable-component.d.ts +49 -0
- package/esm/core/base/base-focusable-component.js +90 -0
- package/esm/core/base/base-form-component.d.ts +45 -0
- package/esm/core/base/base-form-component.js +19 -0
- package/esm/core/base/base-nullable-form-component.d.ts +35 -0
- package/esm/core/base/base-nullable-form-component.js +20 -0
- package/esm/core/utils/feature-detection.d.ts +10 -0
- package/esm/core/utils/feature-detection.js +12 -0
- package/esm/core/utils/index.d.ts +2 -1
- package/esm/core/utils/index.js +2 -1
- package/esm/core/utils/reflect-utils.d.ts +107 -0
- package/esm/core/utils/reflect-utils.js +227 -0
- package/esm/core/utils/utils.d.ts +1 -1
- package/esm/date-picker/base/base-date-picker-utils.js +5 -8
- package/esm/field/field-constants.d.ts +8 -0
- package/esm/field/field-constants.js +10 -8
- package/esm/file-picker/file-picker-component-delegate.js +1 -1
- package/esm/file-picker/file-picker.js +1 -1
- package/esm/floating-action-button/floating-action-button-adapter.d.ts +20 -0
- package/esm/floating-action-button/floating-action-button-adapter.js +49 -0
- package/esm/floating-action-button/floating-action-button-component-delegate.d.ts +19 -3
- package/esm/floating-action-button/floating-action-button-component-delegate.js +62 -14
- package/esm/floating-action-button/floating-action-button-constants.d.ts +19 -14
- package/esm/floating-action-button/floating-action-button-constants.js +15 -15
- package/esm/floating-action-button/floating-action-button-foundation.d.ts +27 -0
- package/esm/floating-action-button/floating-action-button-foundation.js +48 -0
- package/esm/floating-action-button/floating-action-button.d.ts +86 -25
- package/esm/floating-action-button/floating-action-button.js +117 -104
- package/esm/floating-action-button/index.d.ts +3 -1
- package/esm/floating-action-button/index.js +5 -3
- package/esm/focus-indicator/focus-indicator-adapter.d.ts +2 -2
- package/esm/focus-indicator/focus-indicator-adapter.js +3 -3
- package/esm/focus-indicator/focus-indicator-foundation.js +3 -2
- package/esm/focus-indicator/focus-indicator.js +2 -2
- package/esm/icon-button/icon-button-adapter.d.ts +12 -0
- package/esm/icon-button/icon-button-adapter.js +11 -0
- package/esm/icon-button/icon-button-component-delegate.d.ts +0 -4
- package/esm/icon-button/icon-button-component-delegate.js +8 -18
- package/esm/icon-button/icon-button-constants.d.ts +26 -17
- package/esm/icon-button/icon-button-constants.js +17 -28
- package/esm/icon-button/icon-button-foundation.d.ts +39 -0
- package/esm/icon-button/icon-button-foundation.js +122 -0
- package/esm/icon-button/icon-button.d.ts +120 -41
- package/esm/icon-button/icon-button.js +156 -213
- package/esm/icon-button/index.d.ts +3 -1
- package/esm/icon-button/index.js +3 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +6 -2
- package/esm/label/index.d.ts +11 -0
- package/esm/label/index.js +15 -0
- package/esm/label/label-adapter.d.ts +51 -0
- package/esm/label/label-adapter.js +102 -0
- package/esm/label/label-aware.d.ts +15 -0
- package/esm/label/label-aware.js +13 -0
- package/esm/label/label-constants.d.ts +17 -0
- package/esm/label/label-constants.js +31 -0
- package/esm/label/label-foundation.d.ts +40 -0
- package/esm/label/label-foundation.js +108 -0
- package/esm/label/label.d.ts +49 -0
- package/esm/label/label.js +80 -0
- package/esm/linear-progress/linear-progress-adapter.d.ts +2 -2
- package/esm/linear-progress/linear-progress-adapter.js +14 -6
- package/esm/linear-progress/linear-progress-constants.d.ts +3 -1
- package/esm/linear-progress/linear-progress-constants.js +1 -1
- package/esm/linear-progress/linear-progress-foundation.d.ts +6 -1
- package/esm/linear-progress/linear-progress-foundation.js +15 -5
- package/esm/linear-progress/linear-progress.d.ts +9 -2
- package/esm/linear-progress/linear-progress.js +16 -7
- package/esm/list/list/list-adapter.js +0 -1
- package/esm/list/list/list.js +1 -1
- package/esm/list/list-item/list-item-adapter.d.ts +12 -4
- package/esm/list/list-item/list-item-adapter.js +36 -5
- package/esm/list/list-item/list-item-constants.d.ts +4 -0
- package/esm/list/list-item/list-item-constants.js +3 -1
- package/esm/list/list-item/list-item-foundation.d.ts +9 -0
- package/esm/list/list-item/list-item-foundation.js +34 -4
- package/esm/list/list-item/list-item.d.ts +15 -4
- package/esm/list/list-item/list-item.js +29 -6
- package/esm/menu/menu-constants.js +1 -1
- package/esm/menu/menu-foundation.js +0 -4
- package/esm/menu/menu.js +1 -1
- package/esm/paginator/paginator-adapter.d.ts +4 -2
- package/esm/paginator/paginator-adapter.js +21 -8
- package/esm/paginator/paginator-constants.js +4 -4
- package/esm/paginator/paginator-foundation.d.ts +2 -0
- package/esm/paginator/paginator-foundation.js +19 -16
- package/esm/paginator/paginator.d.ts +1 -0
- package/esm/paginator/paginator.js +5 -2
- package/esm/profile-card/profile-card-adapter.d.ts +5 -8
- package/esm/profile-card/profile-card-adapter.js +5 -16
- package/esm/profile-card/profile-card-constants.js +3 -3
- package/esm/profile-card/profile-card-foundation.d.ts +4 -1
- package/esm/profile-card/profile-card-foundation.js +24 -13
- package/esm/profile-card/profile-card.d.ts +1 -2
- package/esm/profile-card/profile-card.js +11 -8
- package/esm/quantity-field/quantity-field-constants.js +2 -2
- package/esm/select/core/base-select-foundation.js +3 -1
- package/esm/slider/slider-adapter.d.ts +1 -1
- package/esm/slider/slider-adapter.js +3 -2
- package/esm/slider/slider-constants.js +3 -3
- package/esm/slider/slider.d.ts +6 -11
- package/esm/slider/slider.js +11 -7
- package/esm/split-button/index.d.ts +10 -0
- package/esm/split-button/index.js +14 -0
- package/esm/split-button/split-button-adapter.d.ts +30 -0
- package/esm/split-button/split-button-adapter.js +84 -0
- package/esm/split-button/split-button-constants.d.ts +21 -0
- package/esm/split-button/split-button-constants.js +23 -0
- package/esm/split-button/split-button-foundation.d.ts +37 -0
- package/esm/split-button/split-button-foundation.js +77 -0
- package/esm/split-button/split-button.d.ts +57 -0
- package/esm/split-button/split-button.js +103 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/state-layer/state-layer-adapter.js +1 -0
- package/esm/state-layer/state-layer-foundation.js +10 -1
- package/esm/state-layer/state-layer.js +1 -1
- package/esm/stepper/stepper/stepper-foundation.js +1 -1
- package/esm/switch/index.d.ts +2 -0
- package/esm/switch/index.js +2 -0
- package/esm/switch/switch-adapter.d.ts +30 -4
- package/esm/switch/switch-adapter.js +100 -18
- package/esm/switch/switch-component-delegate.d.ts +22 -7
- package/esm/switch/switch-component-delegate.js +63 -28
- package/esm/switch/switch-constants.d.ts +12 -2
- package/esm/switch/switch-constants.js +22 -11
- package/esm/switch/switch-foundation.d.ts +23 -4
- package/esm/switch/switch-foundation.js +63 -11
- package/esm/switch/switch.d.ts +28 -16
- package/esm/switch/switch.js +65 -36
- package/esm/table/table-foundation.d.ts +2 -0
- package/esm/table/table-foundation.js +17 -6
- package/esm/table/table-utils.js +13 -1
- package/esm/table/types.d.ts +1 -0
- package/esm/tabs/tab/tab.js +2 -2
- package/esm/tabs/tab-bar/tab-bar-adapter.js +17 -20
- package/esm/tabs/tab-bar/tab-bar.js +1 -1
- package/esm/time-picker/time-picker-adapter.js +5 -8
- package/esm/toast/toast-adapter.d.ts +1 -1
- package/esm/toast/toast-adapter.js +1 -1
- package/esm/toast/toast.js +2 -2
- package/esm/toolbar/toolbar.js +1 -1
- package/package.json +1 -3
- package/styles/app-bar/app-bar/_configuration.scss +16 -0
- package/styles/app-bar/app-bar/_core.scss +95 -0
- package/styles/app-bar/app-bar/_token-utils.scss +30 -0
- package/styles/app-bar/app-bar/app-bar.scss +142 -0
- package/styles/app-bar/app-bar/index.scss +8 -0
- package/styles/banner/banner.scss +0 -1
- package/styles/bottom-sheet/bottom-sheet.scss +0 -1
- package/styles/busy-indicator/_mixins.scss +1 -1
- package/styles/busy-indicator/busy-indicator.scss +0 -1
- package/styles/button/_configuration.scss +16 -0
- package/styles/button/_core.scss +183 -0
- package/styles/button/_token-utils.scss +30 -0
- package/styles/button/button.scss +221 -0
- package/styles/button/index.scss +8 -0
- package/styles/button-toggle/button-toggle/_mixins.scss +26 -7
- package/styles/calendar/calendar.scss +0 -4
- package/styles/{button/forge-button.scss → checkbox/_configuration.scss} +4 -3
- package/styles/checkbox/_core.scss +157 -0
- package/styles/checkbox/_token-utils.scss +30 -0
- package/styles/checkbox/checkbox.scss +143 -7
- package/styles/checkbox/index.scss +8 -0
- package/styles/chips/chip/_mixins.scss +21 -7
- package/styles/circular-progress/_configuration.scss +8 -15
- package/styles/circular-progress/_core.scss +21 -19
- package/styles/circular-progress/_token-utils.scss +30 -0
- package/styles/circular-progress/circular-progress.scss +51 -4
- package/styles/circular-progress/index.scss +1 -0
- package/styles/color-picker/color-picker.scss +0 -3
- package/styles/core/styles/_utils.scss +67 -4
- package/styles/core/styles/elevation/index.scss +10 -0
- package/styles/core/styles/spacing/index.scss +8 -1
- package/styles/core/styles/theme/index.scss +2 -0
- package/styles/core/styles/tokens/_token-utils.scss +118 -0
- package/styles/core/styles/tokens/app-bar/app-bar/_tokens.scss +35 -0
- package/styles/core/styles/tokens/button/_tokens.scss +115 -0
- package/styles/core/styles/tokens/checkbox/_tokens.scss +69 -0
- package/styles/core/styles/tokens/circular-progress/_tokens.scss +14 -3
- package/styles/core/styles/tokens/floating-action-button/_tokens.scss +66 -0
- package/styles/core/styles/tokens/focus-indicator/_tokens.scss +8 -5
- package/styles/core/styles/tokens/icon-button/_tokens.scss +106 -0
- package/styles/core/styles/tokens/index.scss +0 -1
- package/styles/core/styles/tokens/linear-progress/_tokens.scss +14 -3
- package/styles/core/styles/tokens/profile-card/_tokens.scss +19 -0
- package/styles/core/styles/tokens/shape/_tokens.scss +6 -0
- package/styles/core/styles/tokens/spacing/_tokens.scss +17 -1
- package/styles/core/styles/tokens/split-button/_tokens.scss +21 -0
- package/styles/core/styles/tokens/switch/_tokens.scss +4 -4
- package/styles/core/styles/tokens/tabs/tab/_tokens.scss +1 -1
- package/styles/core/styles/tokens/tabs/tab-bar/_tokens.scss +2 -2
- package/styles/core/styles/tokens/theme/_token-utils.scss +9 -5
- package/styles/core/styles/tokens/theme/_tokens.brand.scss +22 -0
- package/styles/core/styles/tokens/theme/_tokens.scss +3 -0
- package/styles/core/styles/tokens/typography/_tokens.label.scss +0 -1
- package/styles/core/styles/typography/index.scss +26 -1
- package/styles/file-picker/_mixins.scss +1 -1
- package/styles/floating-action-button/_configuration.scss +16 -0
- package/styles/floating-action-button/_core.scss +103 -0
- package/styles/floating-action-button/_token-utils.scss +30 -0
- package/styles/floating-action-button/floating-action-button.scss +129 -0
- package/styles/floating-action-button/index.scss +8 -0
- package/styles/focus-indicator/_animations.scss +6 -4
- package/styles/focus-indicator/_configuration.scss +2 -15
- package/styles/focus-indicator/_core.scss +20 -25
- package/styles/focus-indicator/_token-utils.scss +31 -0
- package/styles/focus-indicator/focus-indicator.scss +26 -21
- package/styles/focus-indicator/index.scss +1 -0
- package/styles/forge.scss +0 -3
- package/styles/icon-button/_configuration.scss +16 -0
- package/styles/icon-button/_core.scss +141 -0
- package/styles/icon-button/_token-utils.scss +30 -0
- package/styles/icon-button/icon-button.scss +349 -0
- package/styles/icon-button/index.scss +8 -0
- package/styles/label/_core.scss +17 -0
- package/styles/label/index.scss +6 -0
- package/styles/label/label.scss +18 -0
- package/styles/linear-progress/_animations.scss +3 -1
- package/styles/linear-progress/_configuration.scss +15 -16
- package/styles/linear-progress/_core.scss +17 -19
- package/styles/linear-progress/_token-utils.scss +31 -0
- package/styles/linear-progress/index.scss +1 -0
- package/styles/linear-progress/linear-progress.scss +42 -6
- package/styles/list/list/_configuration.scss +2 -4
- package/styles/list/list/_core.scss +3 -8
- package/styles/list/list/_token-utils.scss +30 -0
- package/styles/list/list/index.scss +1 -0
- package/styles/list/list/list.scss +11 -0
- package/styles/list/list-item/_configuration.scss +5 -61
- package/styles/list/list-item/_core.scss +51 -56
- package/styles/list/list-item/_token-utils.scss +30 -0
- package/styles/list/list-item/index.scss +1 -0
- package/styles/list/list-item/list-item.scss +12 -3
- package/styles/menu/menu.scss +1 -1
- package/styles/paginator/paginator.scss +0 -1
- package/styles/profile-card/_configuration.scss +10 -0
- package/styles/profile-card/_core.scss +58 -0
- package/styles/profile-card/_token-utils.scss +30 -0
- package/styles/profile-card/index.scss +8 -0
- package/styles/profile-card/profile-card.scss +55 -7
- package/styles/slider/_configuration.scss +5 -50
- package/styles/slider/_core.scss +58 -63
- package/styles/slider/_token-utils.scss +30 -0
- package/styles/slider/index.scss +1 -0
- package/styles/slider/slider.scss +26 -3
- package/styles/split-button/_configuration.scss +12 -0
- package/styles/split-button/_token-utils.scss +30 -0
- package/styles/split-button/index.scss +7 -0
- package/styles/split-button/split-button.scss +97 -0
- package/styles/state-layer/_configuration.scss +2 -9
- package/styles/state-layer/_core.scss +11 -16
- package/styles/state-layer/_token-utils.scss +31 -0
- package/styles/state-layer/index.scss +1 -0
- package/styles/state-layer/state-layer.scss +7 -0
- package/styles/switch/_configuration.scss +2 -87
- package/styles/switch/_core.scss +83 -86
- package/styles/switch/_token-utils.scss +30 -0
- package/styles/switch/index.scss +1 -0
- package/styles/switch/switch.scss +118 -84
- package/styles/table/_mixins.scss +20 -2
- package/styles/tabs/tab/_configuration.scss +7 -49
- package/styles/tabs/tab/_core.scss +27 -32
- package/styles/tabs/tab/_token-utils.scss +30 -0
- package/styles/tabs/tab/index.scss +1 -0
- package/styles/tabs/tab/tab.scss +87 -44
- package/styles/tabs/tab-bar/_configuration.scss +2 -5
- package/styles/tabs/tab-bar/_core.scss +26 -9
- package/styles/tabs/tab-bar/_token-utils.scss +30 -0
- package/styles/tabs/tab-bar/index.scss +2 -1
- package/styles/tabs/tab-bar/tab-bar.scss +68 -34
- package/styles/theme/_theme-dark.scss +0 -3
- package/styles/toast/_mixins.scss +1 -1
- package/styles/toast/toast.scss +0 -2
- package/styles/toolbar/_mixins.scss +0 -1
- package/styles/typography/forge-typography.scss +5 -2
- package/dist/button/forge-button.css +0 -6
- package/dist/esm/chunks/chunk.2LIWNFQK.js +0 -7
- package/dist/esm/chunks/chunk.3X4N4ZPY.js +0 -7
- package/dist/esm/chunks/chunk.3X4N4ZPY.js.map +0 -7
- package/dist/esm/chunks/chunk.436MTO6R.js +0 -7
- package/dist/esm/chunks/chunk.436MTO6R.js.map +0 -7
- package/dist/esm/chunks/chunk.4CXLGEJO.js +0 -7
- package/dist/esm/chunks/chunk.4CXLGEJO.js.map +0 -7
- package/dist/esm/chunks/chunk.4XJYS5WH.js +0 -7
- package/dist/esm/chunks/chunk.4XJYS5WH.js.map +0 -7
- package/dist/esm/chunks/chunk.7L66GZDN.js +0 -7
- package/dist/esm/chunks/chunk.7PPBXNAD.js +0 -7
- package/dist/esm/chunks/chunk.7PPBXNAD.js.map +0 -7
- package/dist/esm/chunks/chunk.A3ZDCBLA.js +0 -7
- package/dist/esm/chunks/chunk.A3ZDCBLA.js.map +0 -7
- package/dist/esm/chunks/chunk.CMRVP4EA.js +0 -7
- package/dist/esm/chunks/chunk.CZEF72BG.js +0 -12
- package/dist/esm/chunks/chunk.CZEF72BG.js.map +0 -7
- package/dist/esm/chunks/chunk.D5ZHKPCL.js +0 -7
- package/dist/esm/chunks/chunk.D5ZHKPCL.js.map +0 -7
- package/dist/esm/chunks/chunk.DH76CMUT.js +0 -7
- package/dist/esm/chunks/chunk.DH76CMUT.js.map +0 -7
- package/dist/esm/chunks/chunk.DLQSINSS.js +0 -7
- package/dist/esm/chunks/chunk.DLQSINSS.js.map +0 -7
- package/dist/esm/chunks/chunk.G6JWSERI.js +0 -7
- package/dist/esm/chunks/chunk.G6JWSERI.js.map +0 -7
- package/dist/esm/chunks/chunk.GO5A4GKZ.js +0 -7
- package/dist/esm/chunks/chunk.GO5A4GKZ.js.map +0 -7
- package/dist/esm/chunks/chunk.GWIXDVIA.js +0 -7
- package/dist/esm/chunks/chunk.GWIXDVIA.js.map +0 -7
- package/dist/esm/chunks/chunk.HGH6SSHZ.js +0 -7
- package/dist/esm/chunks/chunk.HGH6SSHZ.js.map +0 -7
- package/dist/esm/chunks/chunk.HJ23XQDJ.js +0 -7
- package/dist/esm/chunks/chunk.HJ23XQDJ.js.map +0 -7
- package/dist/esm/chunks/chunk.I5SFCLDD.js +0 -7
- package/dist/esm/chunks/chunk.IURDWGLD.js +0 -7
- package/dist/esm/chunks/chunk.IURDWGLD.js.map +0 -7
- package/dist/esm/chunks/chunk.JCO4M4PF.js +0 -7
- package/dist/esm/chunks/chunk.LNLO36U6.js +0 -7
- package/dist/esm/chunks/chunk.LV7XF22P.js +0 -7
- package/dist/esm/chunks/chunk.LV7XF22P.js.map +0 -7
- package/dist/esm/chunks/chunk.MHU452GM.js +0 -7
- package/dist/esm/chunks/chunk.MHU452GM.js.map +0 -7
- package/dist/esm/chunks/chunk.MLTEGJH6.js +0 -7
- package/dist/esm/chunks/chunk.MWWY5TX5.js +0 -7
- package/dist/esm/chunks/chunk.MWWY5TX5.js.map +0 -7
- package/dist/esm/chunks/chunk.O5GE3FFV.js +0 -7
- package/dist/esm/chunks/chunk.O5GE3FFV.js.map +0 -7
- package/dist/esm/chunks/chunk.OQ75YGB6.js +0 -7
- package/dist/esm/chunks/chunk.PCOOIP2H.js +0 -7
- package/dist/esm/chunks/chunk.PCOOIP2H.js.map +0 -7
- package/dist/esm/chunks/chunk.PDICDA2V.js +0 -7
- package/dist/esm/chunks/chunk.PDICDA2V.js.map +0 -7
- package/dist/esm/chunks/chunk.Q7BWJCT5.js +0 -7
- package/dist/esm/chunks/chunk.Q7BWJCT5.js.map +0 -7
- package/dist/esm/chunks/chunk.TCFKFKZW.js +0 -7
- package/dist/esm/chunks/chunk.TGVLYX5F.js +0 -7
- package/dist/esm/chunks/chunk.TGVLYX5F.js.map +0 -7
- package/dist/esm/chunks/chunk.TSH7BTC3.js +0 -7
- package/dist/esm/chunks/chunk.U5XNDTSZ.js +0 -7
- package/dist/esm/chunks/chunk.UAKQY7QB.js +0 -7
- package/dist/esm/chunks/chunk.UAKQY7QB.js.map +0 -7
- package/dist/esm/chunks/chunk.UAVC4YLD.js +0 -7
- package/dist/esm/chunks/chunk.UAVC4YLD.js.map +0 -7
- package/dist/esm/chunks/chunk.URFSXQKR.js +0 -7
- package/dist/esm/chunks/chunk.UZPZ6KUN.js +0 -7
- package/dist/esm/chunks/chunk.V6443MP3.js +0 -7
- package/dist/esm/chunks/chunk.V6443MP3.js.map +0 -7
- package/dist/esm/chunks/chunk.VAAID3SH.js +0 -7
- package/dist/esm/chunks/chunk.VAAID3SH.js.map +0 -7
- package/dist/esm/chunks/chunk.VPNDAKM3.js +0 -7
- package/dist/esm/chunks/chunk.VPNDAKM3.js.map +0 -7
- package/dist/esm/chunks/chunk.WCTSXMGU.js +0 -7
- package/dist/esm/chunks/chunk.WCTSXMGU.js.map +0 -7
- package/dist/esm/chunks/chunk.WOMYKBUG.js +0 -12
- package/dist/esm/chunks/chunk.WOMYKBUG.js.map +0 -7
- package/dist/esm/chunks/chunk.WVGIT7F7.js +0 -7
- package/dist/esm/chunks/chunk.WVGIT7F7.js.map +0 -7
- package/dist/esm/chunks/chunk.YOXZOPAC.js +0 -7
- package/dist/esm/chunks/chunk.YOXZOPAC.js.map +0 -7
- package/dist/esm/chunks/chunk.YP2NHWIW.js +0 -7
- package/dist/esm/chunks/chunk.YPA27RX7.js +0 -7
- package/dist/esm/chunks/chunk.YXXKPT6P.js +0 -7
- package/dist/esm/chunks/chunk.ZMUDT5UK.js +0 -7
- package/dist/esm/chunks/chunk.ZMUDT5UK.js.map +0 -7
- package/dist/floating-action-button/forge-floating-action-button.css +0 -6
- package/dist/icon-button/forge-icon-button.css +0 -6
- package/esm/app-bar/app-bar-adapter.d.ts +0 -43
- package/esm/app-bar/app-bar-adapter.js +0 -60
- package/esm/app-bar/app-bar-constants.js +0 -37
- package/esm/app-bar/app-bar-foundation.js +0 -70
- package/esm/app-bar/app-bar.d.ts +0 -38
- package/esm/app-bar/app-bar.js +0 -75
- package/esm/core/utils/a11y-utils.d.ts +0 -32
- package/esm/core/utils/a11y-utils.js +0 -111
- package/styles/app-bar/_mixins.scss +0 -249
- package/styles/app-bar/_variables.scss +0 -34
- package/styles/app-bar/app-bar.scss +0 -22
- package/styles/button/_button-base.scss +0 -183
- package/styles/button/_button-filled-theme.scss +0 -60
- package/styles/button/_button-filled.scss +0 -71
- package/styles/button/_button-outlined-theme.scss +0 -175
- package/styles/button/_button-outlined.scss +0 -76
- package/styles/button/_button-protected-theme.scss +0 -60
- package/styles/button/_button-protected.scss +0 -88
- package/styles/button/_button-ripple.scss +0 -69
- package/styles/button/_button-shared-theme.scss +0 -447
- package/styles/button/_button-text-theme.scss +0 -60
- package/styles/button/_button-text.scss +0 -57
- package/styles/button/_button.mixins.scss +0 -148
- package/styles/button/_mixins.scss +0 -183
- package/styles/checkbox/_checkbox-custom-properties.scss +0 -11
- package/styles/checkbox/_checkbox-theme.scss +0 -577
- package/styles/checkbox/_checkbox.mixins.scss +0 -595
- package/styles/floating-action-button/_extended-fab-theme.scss +0 -238
- package/styles/floating-action-button/_fab-custom-properties.scss +0 -29
- package/styles/floating-action-button/_fab-theme.scss +0 -541
- package/styles/floating-action-button/_fab.mixins.scss +0 -351
- package/styles/floating-action-button/forge-floating-action-button.scss +0 -16
- package/styles/icon-button/_mixins.scss +0 -345
- package/styles/icon-button/_variables.scss +0 -42
- package/styles/profile-card/_mixins.scss +0 -83
- /package/dist/esm/chunks/{chunk.PLNLLKP2.js.map → chunk.26E4L52W.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AY43NTAK.js.map → chunk.3UO6S3IK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IXGXASHQ.js.map → chunk.4B5IOZAT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WK2L7BPJ.js.map → chunk.4QDN5PM6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.C5ZUGOOC.js.map → chunk.57PXXJA6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.C7VEJINB.js.map → chunk.5C24LZNU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.C2MQN7MI.js.map → chunk.5H4G6BWX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CQQSOTZ5.js.map → chunk.5VHUMZYS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WJXDDQUK.js.map → chunk.7ABZUBTT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZREXLSAJ.js.map → chunk.7BGOH44S.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2WSXSOYB.js.map → chunk.7DHDFH5L.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UVJFHSMF.js.map → chunk.7PP6QHOM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7L66GZDN.js.map → chunk.7UXLLUTN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NDJZYFRT.js.map → chunk.B46Q3AFP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EY37FYZ4.js.map → chunk.C5IB44HX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6VSFLBZF.js.map → chunk.CTZ3AWDW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HBCDD25D.js.map → chunk.DDXIHZFX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VDGJ4UDL.js.map → chunk.DOEG3DWJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4USQ2AP6.js.map → chunk.DTKFE7YB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IJ2I25V3.js.map → chunk.E3GVKR4E.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FK6NNHXH.js.map → chunk.F2EBSV5Z.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RNUGVHZF.js.map → chunk.G2BNY5QQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4JF54GDJ.js.map → chunk.GS72TBUD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AQ7ROWO4.js.map → chunk.GT3VPSXY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DABGA7I6.js.map → chunk.GWJ4QCSW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RXLORASN.js.map → chunk.HHHBS6FB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MLTEGJH6.js.map → chunk.I3NHK2S3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HKSXC5VK.js.map → chunk.IEB5KRFQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OQAD6MFL.js.map → chunk.J3B5CWKT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QNVVUUNQ.js.map → chunk.KLPF4CNX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.66X366TV.js.map → chunk.L4Y4RO5O.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RBFGJH3C.js.map → chunk.LMIKNDBS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.R2KOYHIZ.js.map → chunk.LSNAGIIH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7M4HRJYP.js.map → chunk.LXX3YZYS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W7H2ZYNR.js.map → chunk.NG6UZ4OL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CMRVP4EA.js.map → chunk.NYYXUH3X.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DQVYB55P.js.map → chunk.NZKIFXBU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AHAARGYM.js.map → chunk.OED5UCYT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2LIWNFQK.js.map → chunk.OYO5O3NF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7UJAI6P2.js.map → chunk.P7LC3YYW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Z6AFASMO.js.map → chunk.PK7R6WDF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WWTQAN4G.js.map → chunk.PSTGTQVK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RWUJGZ3R.js.map → chunk.RZZBM3AW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.37JFBP4X.js.map → chunk.SNF35Y6C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YPA27RX7.js.map → chunk.T34DG7BU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HDO3WRH7.js.map → chunk.THWSN3X4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.E4TAHUQO.js.map → chunk.TZFUKJ24.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SEWAMWO6.js.map → chunk.U5WMRBSC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PDSOXEMY.js.map → chunk.UWZWXNTW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CBIHNCT5.js.map → chunk.W324TWF2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZYVXIP42.js.map → chunk.YKZ25J6B.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.R6NA7SV2.js.map → chunk.ZSD7MMVB.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/circular-progress/circular-progress-constants.ts", "../../src/circular-progress/circular-progress-adapter.ts", "../../src/circular-progress/circular-progress-foundation.ts", "../../src/circular-progress/circular-progress.ts", "../../src/circular-progress/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX, Theme } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}circular-progress`;\n\nconst attributes = {\n DETERMINATE: 'determinate',\n PROGRESS: 'progress',\n THEME: 'theme',\n TRACK: 'track'\n};\n\nconst classes = {\n INDETERMINATE: 'forge-circular-progress--indeterminate'\n};\n\nconst selectors = {\n ROOT: '.forge-circular-progress',\n DETERMINATE_PROGRESS_CIRCLE: '.progress',\n TEMPLATES: 'svg, .spinner'\n};\n\nexport const CIRCULAR_PROGRESS_CONSTANTS = {\n elementName,\n attributes,\n classes,\n selectors\n};\n\nexport type CircularProgressTheme = Theme;\n", "import { getShadowElement } from '@tylertech/forge-core';\n\nimport { ICircularProgressComponent } from './circular-progress';\nimport { CIRCULAR_PROGRESS_CONSTANTS } from './circular-progress-constants';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\n\nconst indeterminateTemplate = '<svg viewBox=\\\"0 0 4800 4800\\\"><circle class=\\\"track-background\\\" pathLength=\\\"100\\\"></circle></svg><div class=\\\"spinner\\\"><div class=\\\"left\\\"><div class=\\\"circle\\\"></div></div><div class=\\\"right\\\"><div class=\\\"circle\\\"></div></div></div>';\nconst determinateTemplate = '<svg viewBox=\\\"0 0 4800 4800\\\"><circle class=\\\"track-background\\\" pathLength=\\\"100\\\"></circle><circle class=\\\"track\\\" pathLength=\\\"100\\\"></circle><circle class=\\\"progress\\\" pathLength=\\\"100\\\" stroke-dashoffset=\\\"100\\\"></circle></svg>';\n\nexport interface ICircularProgressAdapter extends IBaseAdapter {\n initialize(): void;\n setDeterminate(value: boolean): void;\n setProgress(value: number): void;\n}\n\nexport class CircularProgressAdapter extends BaseAdapter<ICircularProgressComponent> implements ICircularProgressAdapter {\n private readonly _rootElement: HTMLElement;\n private _determinateProgressCircleElement: HTMLElement | undefined;\n\n constructor(component: ICircularProgressComponent) {\n super(component);\n this._rootElement = getShadowElement(this._component, CIRCULAR_PROGRESS_CONSTANTS.selectors.ROOT);\n }\n\n public initialize(): void {\n // TODO: Replace with ARIA mixin\n if (!this._component.hasAttribute('role')) {\n this._component.setAttribute('role', 'progressbar');\n }\n if (!this._component.hasAttribute('aria-valuemin')) {\n this._component.setAttribute('aria-valuemin', '0');\n }\n if (!this._component.hasAttribute('aria-valuemax')) {\n this._component.setAttribute('aria-valuemax', '1');\n }\n }\n\n public setDeterminate(value: boolean): void {\n this._tryResetTemplate();\n this._rootElement.classList.toggle(CIRCULAR_PROGRESS_CONSTANTS.classes.INDETERMINATE, !value);\n \n if (value) {\n this._rootElement.insertAdjacentHTML('beforeend', determinateTemplate);\n this._determinateProgressCircleElement = getShadowElement(this._component, CIRCULAR_PROGRESS_CONSTANTS.selectors.DETERMINATE_PROGRESS_CIRCLE);\n } else {\n this._rootElement.insertAdjacentHTML('beforeend', indeterminateTemplate);\n this._component.removeAttribute('aria-valuenow');\n this._determinateProgressCircleElement = undefined;\n }\n }\n\n public setProgress(value: number): void {\n this._component.setAttribute('aria-valuenow', `${value}`);\n this._determinateProgressCircleElement?.setAttribute('stroke-dashoffset', `${(1 - value) * 100}`);\n }\n\n private _tryResetTemplate(): void {\n const elements = this._component.shadowRoot?.querySelectorAll(CIRCULAR_PROGRESS_CONSTANTS.selectors.TEMPLATES);\n elements?.forEach(el => el.remove());\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { ICircularProgressAdapter } from './circular-progress-adapter';\nimport { CircularProgressTheme, CIRCULAR_PROGRESS_CONSTANTS } from './circular-progress-constants';\n\nexport interface ICircularProgressFoundation extends ICustomElementFoundation {\n determinate: boolean;\n progress: number;\n theme: CircularProgressTheme;\n track: boolean;\n}\n\nexport class CircularProgressFoundation implements ICircularProgressFoundation {\n private _determinate = false;\n private _progress = 0;\n private _theme: CircularProgressTheme = 'primary';\n private _track = false;\n\n constructor(private _adapter: ICircularProgressAdapter) {}\n\n public initialize(): void {\n this._adapter.initialize();\n this._applyDeterminate();\n }\n\n private _applyDeterminate(): void {\n this._adapter.setDeterminate(this._determinate);\n\n if (this._determinate) {\n this._adapter.setProgress(this._progress);\n }\n }\n\n public get determinate(): boolean {\n return this._determinate;\n }\n public set determinate(value: boolean) {\n value = Boolean(value);\n if (this._determinate !== value) {\n this._determinate = value;\n this._applyDeterminate();\n this._adapter.toggleHostAttribute(CIRCULAR_PROGRESS_CONSTANTS.attributes.DETERMINATE, this._determinate);\n }\n }\n\n public get progress(): number {\n return this._progress;\n }\n public set progress(value: number) {\n if (this._progress !== value) {\n this._progress = value;\n if (this._determinate) {\n this._adapter.setProgress(this._progress);\n }\n this._adapter.setHostAttribute(CIRCULAR_PROGRESS_CONSTANTS.attributes.PROGRESS, `${this._progress}`);\n }\n }\n\n public get theme(): CircularProgressTheme {\n return this._theme;\n }\n public set theme(value: CircularProgressTheme) {\n if (this._theme !== value) {\n this._theme = value;\n this._adapter.toggleHostAttribute(CIRCULAR_PROGRESS_CONSTANTS.attributes.THEME, !!this._theme, this._theme);\n }\n }\n\n public get track(): boolean {\n return this._track;\n }\n public set track(value: boolean) {\n value = Boolean(value);\n if (this._track !== value) {\n this._track = value;\n this._adapter.toggleHostAttribute(CIRCULAR_PROGRESS_CONSTANTS.attributes.TRACK, this._track);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean, coerceNumber } from '@tylertech/forge-core';\n\nimport { CircularProgressAdapter } from './circular-progress-adapter';\nimport { CircularProgressFoundation } from './circular-progress-foundation';\nimport { CircularProgressTheme, CIRCULAR_PROGRESS_CONSTANTS } from './circular-progress-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-circular-progress\\\" part=\\\"progressbar\\\"><slot class=\\\"center-content\\\"></slot></div></template>';\nconst styles = ':host{--_circular-progress-size:var(--forge-circular-progress-size, 48px)}:host{display:-webkit-inline-box;display:inline-flex;vertical-align:middle;min-block-size:var(--_circular-progress-size);min-inline-size:var(--_circular-progress-size);position:relative;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);contain:strict;content-visibility:auto}:host([hidden]){display:none}.forge-circular-progress{--_circular-progress-padding:var(--forge-circular-progress-padding, 0);--_circular-progress-track-width:var(--forge-circular-progress-track-width, 12);--_circular-progress-track-color:var(--forge-circular-progress-track-color, transparent);--_circular-progress-track-fill-color:var(--forge-circular-progress-track-fill-color, var(--forge-theme-tertiary-container, #d0d7ff));--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_circular-progress-arc-duration:var(--forge-circular-progress-arc-duration, 1333ms);--_circular-progress-theme-transition-duration:var(--forge-circular-progress-theme-transition-duration, var(--forge-animation-duration-short3, 150ms));--_circular-progress-theme-transition-timing:var(--forge-circular-progress-theme-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-circular-progress{-webkit-box-flex:1;flex:1;align-self:stretch;margin:var(--_circular-progress-padding)}.forge-circular-progress--indeterminate{will-change:transform;-webkit-animation:linear infinite linear-rotate;animation:linear infinite linear-rotate;-webkit-animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306);animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306)}.circle,.forge-circular-progress,.left,.right,.spinner,svg{position:absolute;inset:0}.center-content{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;width:100%;height:100%}.left{overflow:hidden;inset:0 50% 0 0}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.right .circle{rotate:100deg;inset:0 0 0 -100%;-webkit-animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s;animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s}.circle{-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:50%;border:solid calc(var(--_circular-progress-size) * var(--_circular-progress-track-width)/ 100);border-color:var(--_circular-progress-indicator-color) var(--_circular-progress-indicator-color) transparent transparent;-webkit-transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);will-change:transform;-webkit-animation:expand-arc;animation:expand-arc;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}svg{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}svg circle{cx:50%;cy:50%;r:calc(50% * (1 - var(--_circular-progress-track-width)/ 100));stroke-width:calc(var(--_circular-progress-track-width) * 1%);stroke-dasharray:100;fill:transparent}.progress{-webkit-transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-indicator-color)}.track{stroke:transparent}.track-background{-webkit-transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-track-color)}.spinner{will-change:transform;-webkit-animation:infinite both rotate-arc;animation:infinite both rotate-arc;-webkit-animation-duration:calc(4 * var(--_circular-progress-arc-duration));animation-duration:calc(4 * var(--_circular-progress-arc-duration));-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}:host([theme=primary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-primary, #3f51b5));--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-secondary, #ffc107));--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-secondary-container, #fff0c3))}:host([theme=success]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-success, #2e7d32));--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=error]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-error, #b00020));--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=warning]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-warning, #d14900));--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-warning-container, #f4d3c2))}:host([theme=info]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-info, #1565c0));--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-info-container, #c7daf0))}:host([track]) .forge-circular-progress{--_circular-progress-track-color:var(--_circular-progress-track-fill-color)}@media screen and (forced-colors:active){.progress{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@-webkit-keyframes expand-arc{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}100%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@keyframes expand-arc{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}100%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@-webkit-keyframes rotate-arc{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}100%{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@keyframes rotate-arc{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}100%{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@-webkit-keyframes linear-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes linear-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}';\n\nexport interface ICircularProgressComponent extends IBaseComponent {\n determinate: boolean;\n progress: number;\n theme: CircularProgressTheme;\n track: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-circular-progress': ICircularProgressComponent;\n }\n}\n\n/**\n * @tag forge-circular-progress\n * \n * @summary\n * Circular progress indicators display progress by animating along a circular track in a clockwise direction.\n * \n * @description\n * Progress indicators inform users about the status of ongoing processes.\n * - Determinate indicators display how long a process will take.\n * - Indeterminate indicators express an unspecified amount of wait time.\n *\n * @property {boolean} determinate - Controls the determinate state.\n * @property {boolean} progress - Controls the progress while in a determinate state. Accepts values from `0` to `1`.\n * @property {CircularProgressTheme} theme - Controls the theme of the progress indicator.\n * @property {boolean} track - Controls the visibility of the track background.\n * \n * @attribute {boolean} determinate - Controls the determinate state.\n * @attribute {boolean} progress - Controls the progress while in a determinate state. Accepts values from `0` to `1`.\n * @attribute {CircularProgressTheme} theme - Controls the theme of the progress indicator.\n * @attribute {boolean} track - Controls the visibility of the track background.\n * \n * @slot - The is the default/unnamed slot. Renders content at the center of the progress indicator.\n * \n * @cssproperty --forge-circular-progress-size - The height and width of the indicator container.\n * @cssproperty --forge-circular-progress-padding - The padding inside the bounding box of the container.\n * @cssproperty --forge-circular-progress-track-width - The track indicator width.\n * @cssproperty --forge-circular-progress-track-color - The track background color.\n * @cssproperty --forge-circular-progress-indicator-color - The track indicator color.\n * @cssproperty --forge-circular-progress-arc-duration - The duration of the arc animation.\n * @cssproperty --forge-circular-progress-theme-transition-duration - The duration of the theme transition.\n * @cssproperty --forge-circular-progress-theme-transition-timing - The easing function to use for the theme transition.\n * \n * @csspart progressbar - Styles the progress bar container element\n */\n@CustomElement({\n name: CIRCULAR_PROGRESS_CONSTANTS.elementName\n})\nexport class CircularProgressComponent extends BaseComponent implements ICircularProgressComponent {\n public static get observedAttributes(): string[] {\n return [\n CIRCULAR_PROGRESS_CONSTANTS.attributes.DETERMINATE,\n CIRCULAR_PROGRESS_CONSTANTS.attributes.PROGRESS,\n CIRCULAR_PROGRESS_CONSTANTS.attributes.THEME,\n CIRCULAR_PROGRESS_CONSTANTS.attributes.TRACK\n ];\n }\n\n private _foundation: CircularProgressFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new CircularProgressFoundation(new CircularProgressAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case CIRCULAR_PROGRESS_CONSTANTS.attributes.DETERMINATE:\n this.determinate = coerceBoolean(newValue);\n break;\n case CIRCULAR_PROGRESS_CONSTANTS.attributes.PROGRESS:\n this.progress = coerceNumber(newValue);\n break;\n case CIRCULAR_PROGRESS_CONSTANTS.attributes.THEME:\n this.theme = newValue as CircularProgressTheme;\n break;\n case CIRCULAR_PROGRESS_CONSTANTS.attributes.TRACK:\n this.track = coerceBoolean(newValue);\n break;\n }\n }\n \n @FoundationProperty()\n public declare determinate: boolean;\n\n @FoundationProperty()\n public declare progress: number;\n\n @FoundationProperty()\n public declare theme: CircularProgressTheme;\n\n @FoundationProperty()\n public declare track: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { CircularProgressComponent } from './circular-progress';\n\nexport * from './circular-progress-adapter';\nexport * from './circular-progress-constants';\nexport * from './circular-progress-foundation';\nexport * from './circular-progress';\n\nexport function defineCircularProgressComponent(): void {\n defineCustomElement(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,EAA4B,WAAW,MAAO,KAAK,MAAM,EAE/F,CACF,ECvEA,IAAMC,EAAW,0HACXC,EAAS,4gRAoDFC,EAAN,cAAwCC,CAAoD,CAYjG,aAAc,CACZ,MAAM,EACNC,EAAqB,KAAMJ,EAAUC,CAAM,EAC3C,KAAK,YAAc,IAAII,EAA2B,IAAIC,EAAwB,IAAI,CAAC,CACrF,CAfA,WAAkB,oBAA+B,CAC/C,MAAO,CACLC,EAA4B,WAAW,YACvCA,EAA4B,WAAW,SACvCA,EAA4B,WAAW,MACvCA,EAA4B,WAAW,KACzC,CACF,CAUO,mBAA0B,CAC/B,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKD,EAA4B,WAAW,YAC1C,KAAK,YAAcI,EAAcD,CAAQ,EACzC,MACF,KAAKH,EAA4B,WAAW,SAC1C,KAAK,SAAWK,EAAaF,CAAQ,EACrC,MACF,KAAKH,EAA4B,WAAW,MAC1C,KAAK,MAAQG,EACb,MACF,KAAKH,EAA4B,WAAW,MAC1C,KAAK,MAAQI,EAAcD,CAAQ,EACnC,KACJ,CACF,CAaF,EAViBG,EAAA,CADdC,EAAmB,GAvCTZ,EAwCI,2BAGAW,EAAA,CADdC,EAAmB,GA1CTZ,EA2CI,wBAGAW,EAAA,CADdC,EAAmB,GA7CTZ,EA8CI,qBAGAW,EAAA,CADdC,EAAmB,GAhDTZ,EAiDI,qBAjDJA,EAANW,EAAA,CAHNE,EAAc,CACb,KAAMR,EAA4B,WACpC,CAAC,GACYL,GCnDN,SAASc,GAAwC,CACtDC,EAAoBC,CAAyB,CAC/C",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "classes", "selectors", "CIRCULAR_PROGRESS_CONSTANTS", "indeterminateTemplate", "determinateTemplate", "CircularProgressAdapter", "BaseAdapter", "component", "getShadowElement", "CIRCULAR_PROGRESS_CONSTANTS", "value", "_a", "elements", "el", "CircularProgressFoundation", "_adapter", "value", "CIRCULAR_PROGRESS_CONSTANTS", "template", "styles", "CircularProgressComponent", "BaseComponent", "attachShadowTemplate", "CircularProgressFoundation", "CircularProgressAdapter", "CIRCULAR_PROGRESS_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumber", "__decorateClass", "FoundationProperty", "CustomElement", "defineCircularProgressComponent", "defineCustomElement", "CircularProgressComponent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as L,b as i,c as g,f as v}from"./chunk.KTYYBWTN.js";import{a as f}from"./chunk.LS7WRRT2.js";import{a as r}from"./chunk.NVUMRW44.js";import{a as _}from"./chunk.IT66AOX7.js";import{a as h,e as m,k as I}from"./chunk.JAWV5Y5T.js";import{k as l,n as b}from"./chunk.J2M2MXP2.js";import{d as a}from"./chunk.M3QDAYD2.js";var d=class extends f{constructor(t){super(t)}initialize(){this._component.hasAttribute("role")||this._component.setAttribute("role","list")}focusNextListItem(){let t=this._getFocusableListItems();if(t.length){let e=t.findIndex(s=>s.matches(":focus")),n=e<t.length-1?e+1:0;n<=t.length-1&&t[n].focus({preventScroll:!0})}}focusPreviousListItem(){let t=this._getFocusableListItems();if(t.length){let e=t.findIndex(s=>s.matches(":focus")),n=e>0?e-1:t.length-1;n>=0&&t[n].focus({preventScroll:!0})}}focusFirstListItem(){let t=this._getFocusableListItems();t.length&&t[0].focus({preventScroll:!0})}focusLastListItem(){let t=this._getFocusableListItems();t.length&&t[t.length-1].focus({preventScroll:!0})}setSelectedListItems(t){let e=this._getListItems();if(e.length){let n=Array.isArray(t)?t:[t];for(let s of e)s.selected=n.some(c=>b(c,s.value))}}updateListItems(t){this._getListItems().forEach(t)}updateListItemRole(){var e;let t=(e=g[this._component.getAttribute("role")])!=null?e:"listitem";this.updateListItems(n=>n.role=t)}_getListItems(){return Array.from(this._component.querySelectorAll(L.elementName)).filter(e=>e.closest(i.elementName)===this._component)}_getFocusableListItems(){return this._getListItems().filter(t=>!t.disabled&&!t.nonInteractive&&!t.hidden)}};var p=class{constructor(t){this._adapter=t;this._nonInteractive=!1;this._disabled=!1;this._dense=!1;this._propagateClick=!0;this._indented=!1;this._twoLine=!1;this._threeLine=!1;this._wrap=!1;this._keydownListener=this._onKeydown.bind(this)}initialize(){this._adapter.initialize(),this._nonInteractive||this._adapter.addHostListener("keydown",this._keydownListener),this._selectedValue!==void 0&&this._selectedValue!==null&&this._adapter.setSelectedListItems(this._selectedValue)}_onKeydown(t){let{key:e,altKey:n,ctrlKey:s,shiftKey:c,metaKey:E}=t;n||s||c||E||(e==="Home"?(t.preventDefault(),this._adapter.focusFirstListItem()):e==="End"?(t.preventDefault(),this._adapter.focusLastListItem()):e==="ArrowUp"?(t.preventDefault(),this._adapter.focusPreviousListItem()):e==="ArrowDown"&&(t.preventDefault(),this._adapter.focusNextListItem()))}updateRole(){this._adapter.updateListItemRole()}get static(){return this.nonInteractive}set static(t){this.nonInteractive=t}get nonInteractive(){return this._nonInteractive}set nonInteractive(t){this._nonInteractive!==t&&(this._nonInteractive=t,this._adapter.toggleHostListener("keydown",this._keydownListener,!this._nonInteractive),this._adapter.updateListItems(e=>e.nonInteractive=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(t){this._disabled!==t&&(this._disabled=t,this._adapter.updateListItems(e=>e.disabled=this._disabled),this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.updateListItems(e=>e.dense=this._dense),this._adapter.toggleHostAttribute(i.attributes.DENSE,this._dense))}get propagateClick(){return this._propagateClick}set propagateClick(t){this._propagateClick!==t&&(this._propagateClick=t,this._adapter.updateListItems(e=>e.propagateClick=this._propagateClick),this._adapter.setHostAttribute(i.attributes.PROPAGATE_CLICK,this._propagateClick?"true":"false"))}get indented(){return this._indented}set indented(t){this._indented!==t&&(this._indented=t,this._adapter.updateListItems(e=>e.indented=this._indented),this._adapter.toggleHostAttribute(i.attributes.INDENTED,this._indented))}get selectedValue(){return this._selectedValue}set selectedValue(t){this._selectedValue!==t&&(this._selectedValue=t,this._adapter.setSelectedListItems(this._selectedValue))}get twoLine(){return this._twoLine}set twoLine(t){this._twoLine!==t&&(this._twoLine=t,this._adapter.updateListItems(e=>e.twoLine=this._twoLine),this._adapter.toggleHostAttribute(i.attributes.TWO_LINE,this._twoLine))}get threeLine(){return this._threeLine}set threeLine(t){this._threeLine!==t&&(this._threeLine=t,this._adapter.updateListItems(e=>e.threeLine=this._threeLine),this._adapter.toggleHostAttribute(i.attributes.THREE_LINE,this._threeLine))}get wrap(){return this._wrap}set wrap(t){this._wrap!==t&&(this._wrap=t,this._adapter.updateListItems(e=>e.wrap=this._wrap),this._adapter.toggleHostAttribute(i.attributes.WRAP,this._wrap))}};var k='<template><div class="forge-list" part="root"><slot></slot></div></template>',A=":host{display:block}:host([hidden]){display:none}:host([navlist]){--forge-list-item-height:40px;--forge-list-item-margin:4px 8px;--forge-list-item-shape:4px;--forge-list-item-supporting-text-font-size:0.875rem;--forge-list-item-supporting-text-font-weight:500}.forge-list{--_list-container-color:var(--forge-list-container-color, transparent);--_list-block-padding:var(--forge-list-block-padding, 8px);--_list-inline-padding:var(--forge-list-inline-padding, 0)}.forge-list{display:block;outline:0;background-color:var(--_list-container-color);padding:var(--_list-block-padding) var(--_list-inline-padding);margin:0;border-radius:inherit;min-width:inherit}",o=class extends I{constructor(){super();m(this,k,A),this._foundation=new p(new d(this))}static get observedAttributes(){return[i.attributes.ROLE,i.attributes.STATIC,i.attributes.NON_INTERACTIVE,i.attributes.DISABLED,i.attributes.DENSE,i.attributes.PROPAGATE_CLICK,i.attributes.SELECTED_VALUE,i.attributes.INDENTED,i.attributes.TWO_LINE,i.attributes.THREE_LINE,i.attributes.WRAP]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(e,n,s){switch(e){case i.attributes.ROLE:this._foundation.updateRole();break;case i.attributes.STATIC:case i.attributes.NON_INTERACTIVE:this.nonInteractive=l(s);break;case i.attributes.DISABLED:this.disabled=l(s);break;case i.attributes.DENSE:this.dense=l(s);break;case i.attributes.PROPAGATE_CLICK:this.propagateClick=l(s);break;case i.attributes.INDENTED:this.indented=l(s);break;case i.attributes.SELECTED_VALUE:this.selectedValue=s;break;case i.attributes.TWO_LINE:this.twoLine=l(s);break;case i.attributes.THREE_LINE:this.threeLine=l(s);break;case i.attributes.WRAP:this.wrap=l(s);break}}};a([r()],o.prototype,"static",2),a([r()],o.prototype,"nonInteractive",2),a([r()],o.prototype,"disabled",2),a([r()],o.prototype,"dense",2),a([r()],o.prototype,"propagateClick",2),a([r()],o.prototype,"indented",2),a([r()],o.prototype,"selectedValue",2),a([r()],o.prototype,"twoLine",2),a([r()],o.prototype,"threeLine",2),a([r()],o.prototype,"wrap",2),o=a([_({name:i.elementName,dependencies:[v]})],o);function G(){h(o)}export{d as a,p as b,o as c,G as d};
|
|
7
|
+
//# sourceMappingURL=chunk.2GYZM6ZG.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/list/list/list-adapter.ts", "../../src/list/list/list-foundation.ts", "../../src/list/list/list.ts", "../../src/list/list/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { isDeepEqual } from '@tylertech/forge-core';\nimport { BaseAdapter } from '../../core/base/base-adapter';\nimport { IListComponent } from './list';\nimport { LIST_ITEM_CONSTANTS } from '../list-item/list-item-constants';\nimport { IListItemComponent } from '../list-item/list-item';\nimport { ListComponentItemRole, LIST_CONSTANTS } from './list-constants';\n\nexport interface IListAdapter extends BaseAdapter<IListComponent> {\n initialize(): void;\n focusNextListItem(): void;\n focusPreviousListItem(): void;\n focusFirstListItem(): void;\n focusLastListItem(): void;\n setSelectedListItems(values: unknown | unknown[]): void;\n updateListItems(cb: (li: IListItemComponent) => void): void;\n updateListItemRole(): void;\n}\n\nexport class ListAdapter extends BaseAdapter<IListComponent> implements IListAdapter {\n constructor(component: IListComponent) {\n super(component);\n }\n\n public initialize(): void {\n if (!this._component.hasAttribute('role')) {\n this._component.setAttribute('role', 'list');\n }\n }\n\n /** Sets focus to the next item in the list. */\n public focusNextListItem(): void {\n const listItems = this._getFocusableListItems();\n if (listItems.length) {\n const focusedListItemIndex = listItems.findIndex(item => item.matches(':focus'));\n const nextIndex = focusedListItemIndex < listItems.length - 1 ? focusedListItemIndex + 1 : 0;\n if (nextIndex <= listItems.length - 1) {\n listItems[nextIndex].focus({ preventScroll: true});\n }\n }\n }\n\n /** Sets focus to the previous item in the list. */\n public focusPreviousListItem(): void {\n const listItems = this._getFocusableListItems();\n if (listItems.length) {\n const focusedListItemIndex = listItems.findIndex(item => item.matches(':focus'));\n const nextIndex = focusedListItemIndex > 0 ? focusedListItemIndex - 1 : listItems.length - 1;\n if (nextIndex >= 0) {\n listItems[nextIndex].focus({ preventScroll: true});\n }\n }\n }\n\n /** Sets focus to the first item in the list. */\n public focusFirstListItem(): void {\n const listItems = this._getFocusableListItems();\n if (listItems.length) {\n listItems[0].focus({ preventScroll: true});\n }\n }\n\n /** Sets focus to the last item in the list. */\n public focusLastListItem(): void {\n const listItems = this._getFocusableListItems();\n if (listItems.length) {\n listItems[listItems.length - 1].focus({ preventScroll: true});\n }\n }\n\n /** Select all list items that match values in the provided array of values. */\n public setSelectedListItems(value: unknown | unknown[]): void {\n const listItems = this._getListItems();\n if (listItems.length) {\n const values = Array.isArray(value) ? value : [value];\n for (const item of listItems) {\n item.selected = values.some(val => isDeepEqual(val, item.value));\n }\n }\n }\n\n /** Calls the provided callback on all list items to apply an updated property to each list item. */\n public updateListItems(cb: (li: IListItemComponent) => void): void {\n this._getListItems().forEach(cb);\n }\n\n public updateListItemRole(): void {\n const role = ListComponentItemRole[this._component.getAttribute('role') as string] ?? 'listitem';\n this.updateListItems(li => li.role = role);\n }\n\n private _getListItems(): IListItemComponent[] {\n const listItems = Array.from(this._component.querySelectorAll(LIST_ITEM_CONSTANTS.elementName));\n return listItems.filter(item => item.closest(LIST_CONSTANTS.elementName) === this._component) as IListItemComponent[];\n }\n\n private _getFocusableListItems(): IListItemComponent[] {\n return this._getListItems().filter(li => !li.disabled && !li.nonInteractive && !li.hidden);\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { IListAdapter } from './list-adapter';\nimport { LIST_CONSTANTS } from './list-constants';\n\nexport interface IListFoundation extends ICustomElementFoundation {\n static: boolean;\n nonInteractive: boolean;\n disabled: boolean;\n dense: boolean;\n propagateClick: boolean;\n indented: boolean;\n selectedValue: unknown | unknown[];\n twoLine: boolean;\n threeLine: boolean;\n wrap: boolean;\n}\n\nexport class ListFoundation implements IListFoundation {\n private _nonInteractive = false;\n private _disabled = false;\n private _dense = false;\n private _propagateClick = true;\n private _indented = false;\n private _selectedValue: unknown | unknown[];\n private _twoLine = false;\n private _threeLine = false;\n private _wrap = false;\n private _keydownListener: EventListener;\n\n constructor(private _adapter: IListAdapter) {\n this._keydownListener = this._onKeydown.bind(this);\n }\n\n public initialize(): void {\n this._adapter.initialize();\n\n if (!this._nonInteractive) {\n this._adapter.addHostListener('keydown', this._keydownListener);\n }\n\n if (this._selectedValue !== undefined && this._selectedValue !== null) {\n this._adapter.setSelectedListItems(this._selectedValue);\n }\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n const { key, altKey, ctrlKey, shiftKey, metaKey } = evt;\n\n if (altKey || ctrlKey || shiftKey || metaKey) {\n return;\n }\n\n if (key === 'Home') {\n evt.preventDefault();\n this._adapter.focusFirstListItem();\n } else if (key === 'End') {\n evt.preventDefault();\n this._adapter.focusLastListItem();\n } else if (key === 'ArrowUp') {\n evt.preventDefault();\n this._adapter.focusPreviousListItem();\n } else if (key === 'ArrowDown') {\n evt.preventDefault();\n this._adapter.focusNextListItem();\n }\n }\n\n public updateRole(): void {\n this._adapter.updateListItemRole();\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 this._adapter.toggleHostListener('keydown', this._keydownListener, !this._nonInteractive);\n this._adapter.updateListItems(li => li.nonInteractive = this._nonInteractive);\n this._adapter.toggleHostAttribute(LIST_CONSTANTS.attributes.STATIC, this._nonInteractive);\n this._adapter.toggleHostAttribute(LIST_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 this._adapter.updateListItems(li => li.disabled = this._disabled);\n this._adapter.toggleHostAttribute(LIST_CONSTANTS.attributes.DISABLED, this._disabled);\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.updateListItems(li => li.dense = this._dense);\n this._adapter.toggleHostAttribute(LIST_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 this._adapter.updateListItems(li => li.propagateClick = this._propagateClick);\n this._adapter.setHostAttribute(LIST_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.updateListItems(li => li.indented = this._indented);\n this._adapter.toggleHostAttribute(LIST_CONSTANTS.attributes.INDENTED, this._indented);\n }\n }\n\n public get selectedValue(): unknown | unknown[] {\n return this._selectedValue;\n }\n public set selectedValue(value: unknown | unknown[]) {\n if (this._selectedValue !== value) {\n this._selectedValue = value;\n this._adapter.setSelectedListItems(this._selectedValue);\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.updateListItems(li => li.twoLine = this._twoLine);\n this._adapter.toggleHostAttribute(LIST_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.updateListItems(li => li.threeLine = this._threeLine);\n this._adapter.toggleHostAttribute(LIST_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.updateListItems(li => li.wrap = this._wrap);\n this._adapter.toggleHostAttribute(LIST_CONSTANTS.attributes.WRAP, this._wrap);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { ListAdapter } from './list-adapter';\nimport { ListFoundation } from './list-foundation';\nimport { LIST_CONSTANTS } from './list-constants';\n\nconst template = '<template><div class=\\\"forge-list\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = ':host{display:block}:host([hidden]){display:none}:host([navlist]){--forge-list-item-height:40px;--forge-list-item-margin:4px 8px;--forge-list-item-shape:4px;--forge-list-item-supporting-text-font-size:0.875rem;--forge-list-item-supporting-text-font-weight:500}.forge-list{--_list-container-color:var(--forge-list-container-color, transparent);--_list-block-padding:var(--forge-list-block-padding, 8px);--_list-inline-padding:var(--forge-list-inline-padding, 0)}.forge-list{display:block;outline:0;background-color:var(--_list-container-color);padding:var(--_list-block-padding) var(--_list-inline-padding);margin:0;border-radius:inherit;min-width:inherit}';\nimport { ListItemComponent } from '../list-item';\n\nexport interface IListComponent extends IBaseComponent {\n /** @deprecated Use nonInteractive instead. */\n static: boolean;\n nonInteractive: boolean;\n disabled: boolean;\n dense: boolean;\n propagateClick: boolean;\n indented: boolean;\n selectedValue: any;\n twoLine: boolean;\n threeLine: boolean;\n wrap: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-list': IListComponent;\n }\n}\n\n/**\n * @tag forge-list\n * \n * @summary Lists are vertical groupings of related content.\n * \n * @csspart root - The component's root container element.\n * \n * @slot - The default/unnamed slot for child list items.\n *\n * @cssproperty --forge-list-container-color - The background color of the list surface,\n * @cssproperty --forge-list-block-padding - The block padding of the list before and after the list items.\n * @cssproperty --forge-list-inline-padding - The inline padding of the list next to the list items.\n * \n * @property {string} role - The role of the list. Default is 'list'. Valid values are 'list', 'listbox', and 'menu'.\n * @property {boolean} static - Whether the list has all static items or not.\n * @property {boolean} nonInteractive - Whether the list has all non-interactive items or not.\n * @property {boolean} disabled - Whether the list items are disabled or not.\n * @property {boolean} dense - Whether the list has all dense items or not.\n * @property {boolean} propagateClick - Whether the list items propagate click events or not.\n * @property {boolean} indented - Whether the list items within this list are indented. Default is false.\n * @property {unknown | unknown[]} selectedValue - The selected list item value(s).\n * @property {boolean} twoLine - Whether the list has all two-line items or not.\n * @property {boolean} threeLine - Whether the list has all three-line items or not.\n * @property {boolean} wrap - Whether the list has all items that wrap their text or not.\n * \n * @attribute {string} role - The role of the list. Default is 'list'. Valid values are 'list', 'listbox', and 'menu'.\n * @attribute {boolean} static - Whether the list has all static items or not.\n * @attribute {boolean} non-interactive - Whether the list has all non-interactive items or not.\n * @attribute {boolean} disabled - Whether the list items are disabled or not.\n * @attribute {boolean} dense - Whether the list has all dense items or not.\n * @attribute {boolean} propagate-click - Whether the list items propagate click events or not.\n * @attribute {string} selected-value - The selected list item value(s).\n * @attribute {boolean} indented - Whether the list items within this list are indented. Default is false.\n * @attribute {boolean} two-line - Whether the list has all two-line items or not.\n * @attribute {boolean} three-line - Whether the list has all three-line items or not.\n * @attribute {boolean} wrap - Whether the list has all items that wrap their text or not.\n * @attribute {boolean} navlist - Controls whether the list is styled a navigation list or not.\n */\n@CustomElement({\n name: LIST_CONSTANTS.elementName,\n dependencies: [\n ListItemComponent\n ]\n})\nexport class ListComponent extends BaseComponent implements IListComponent {\n public static get observedAttributes(): string[] {\n return [\n LIST_CONSTANTS.attributes.ROLE,\n LIST_CONSTANTS.attributes.STATIC,\n LIST_CONSTANTS.attributes.NON_INTERACTIVE,\n LIST_CONSTANTS.attributes.DISABLED,\n LIST_CONSTANTS.attributes.DENSE,\n LIST_CONSTANTS.attributes.PROPAGATE_CLICK,\n LIST_CONSTANTS.attributes.SELECTED_VALUE,\n LIST_CONSTANTS.attributes.INDENTED,\n LIST_CONSTANTS.attributes.TWO_LINE,\n LIST_CONSTANTS.attributes.THREE_LINE,\n LIST_CONSTANTS.attributes.WRAP\n ];\n }\n\n private _foundation: ListFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new ListFoundation(new ListAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case LIST_CONSTANTS.attributes.ROLE:\n this._foundation.updateRole();\n break;\n case LIST_CONSTANTS.attributes.STATIC:\n case LIST_CONSTANTS.attributes.NON_INTERACTIVE:\n this.nonInteractive = coerceBoolean(newValue);\n break;\n case LIST_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case LIST_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n case LIST_CONSTANTS.attributes.PROPAGATE_CLICK:\n this.propagateClick = coerceBoolean(newValue);\n break;\n case LIST_CONSTANTS.attributes.INDENTED:\n this.indented = coerceBoolean(newValue);\n break;\n case LIST_CONSTANTS.attributes.SELECTED_VALUE:\n this.selectedValue = newValue;\n break;\n case LIST_CONSTANTS.attributes.TWO_LINE:\n this.twoLine = coerceBoolean(newValue);\n break;\n case LIST_CONSTANTS.attributes.THREE_LINE:\n this.threeLine = coerceBoolean(newValue);\n break;\n case LIST_CONSTANTS.attributes.WRAP:\n this.wrap = coerceBoolean(newValue);\n break;\n }\n }\n\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 dense: boolean;\n\n @FoundationProperty()\n public declare propagateClick: boolean;\n\n @FoundationProperty()\n public declare indented: boolean;\n\n @FoundationProperty()\n public declare selectedValue: any;\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", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { ListComponent } from './list';\n\nexport * from './list-adapter';\nexport * from './list-constants';\nexport * from './list-foundation';\nexport * from './list';\n\nexport function defineListComponent(): void {\n defineCustomElement(ListComponent);\n}\n"],
|
|
5
|
+
"mappings": "kUAkBO,IAAMA,EAAN,cAA0BC,CAAoD,CACnF,YAAYC,EAA2B,CACrC,MAAMA,CAAS,CACjB,CAEO,YAAmB,CACnB,KAAK,WAAW,aAAa,MAAM,GACtC,KAAK,WAAW,aAAa,OAAQ,MAAM,CAE/C,CAGO,mBAA0B,CAC/B,IAAMC,EAAY,KAAK,uBAAuB,EAC9C,GAAIA,EAAU,OAAQ,CACpB,IAAMC,EAAuBD,EAAU,UAAUE,GAAQA,EAAK,QAAQ,QAAQ,CAAC,EACzEC,EAAYF,EAAuBD,EAAU,OAAS,EAAIC,EAAuB,EAAI,EACvFE,GAAaH,EAAU,OAAS,GAClCA,EAAUG,CAAS,EAAE,MAAM,CAAE,cAAe,EAAI,CAAC,EAGvD,CAGO,uBAA8B,CACnC,IAAMH,EAAY,KAAK,uBAAuB,E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YACrB,aAAc,CACZQ,CACF,CACF,CAAC,GACYb,GClEN,SAASc,GAA4B,CAC1CC,EAAoBC,CAAa,CACnC",
|
|
6
|
+
"names": ["ListAdapter", "BaseAdapter", "component", "listItems", "focusedListItemIndex", "item", "nextIndex", "value", "values", "val", "isDeepEqual", "cb", "_a", "role", "ListComponentItemRole", "li", "LIST_ITEM_CONSTANTS", "LIST_CONSTANTS", "ListFoundation", "_adapter", "evt", "key", "altKey", "ctrlKey", "shiftKey", "metaKey", "value", "li", "LIST_CONSTANTS", "template", "styles", "ListComponent", "BaseComponent", "attachShadowTemplate", "ListFoundation", "ListAdapter", "LIST_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "ListItemComponent", "defineListComponent", "defineCustomElement", "ListComponent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as z}from"./chunk.3RMBFRGC.js";import{d as T}from"./chunk.A72W7RW7.js";import{j as I,k as L,n as x,o as S,p as O,q as C,r as A}from"./chunk.LUIKMPQR.js";import{a as k}from"./chunk.KVCDAZ6B.js";import{p as V}from"./chunk.FQSL747N.js";import{a as y}from"./chunk.LS7WRRT2.js";import{a as l}from"./chunk.NVUMRW44.js";import{a as m,b as E,f as n}from"./chunk.IT66AOX7.js";import{a as w,e as g,f as h}from"./chunk.JAWV5Y5T.js";import{t as p,u as d}from"./chunk.K7FPXAFS.js";import{b as u,c as f,k as c}from"./chunk.J2M2MXP2.js";import{d as s}from"./chunk.M3QDAYD2.js";var N=`${E}switch`,P={HIDDEN:"hidden"},F={ON:"on",SELECTED:"selected",DEFAULT_ON:"default-on",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",ICON:"icon",LABEL_POSITION:"label-position"},H={ROOT:".forge-switch",INPUT:"#input",LABEL:"#label",ICON_ON:"#icon-on",ICON_OFF:"#icon-off",INPUT_SLOT:"slot[name=input]",STATE_LAYER:"forge-state-layer",SLOTTED_INPUT:"input[type=checkbox]"},M={CHANGE:`${N}-change`},R={ON:"on",OFF:"off"},B=[...I],i={classes:P,selectors:H,attributes:F,elementName:N,events:M,state:R,forwardedAttributes:B};var b=class extends y{constructor(t){super(t);this._rootElement=h(t,i.selectors.ROOT),this._inputElement=h(t,i.selectors.INPUT),this._labelElement=h(t,i.selectors.LABEL),this._iconOnElement=h(t,i.selectors.ICON_ON),this._iconOffElement=h(t,i.selectors.ICON_OFF),this._stateLayerElement=h(t,i.selectors.STATE_LAYER),this._inputAdapter=new A}get _activeInputElement(){var t;return(t=this._inputAdapter.el)!=null?t:this._inputElement}initialize(){let t=this._component.querySelector(i.selectors.SLOTTED_INPUT);t?(t.slot="input",this._switchInput(t,this._inputElement)):this._initializeForwardObserver(this._inputElement),this._observeInput(t!=null?t:this._inputElement)}setOn(t){this._activeInputElement.checked=t}setDefaultOn(t){this._activeInputElement.toggleAttribute("checked",t)}setValue(t){this._activeInputElement.value=t}setDisabled(t){this._activeInputElement.disabled=t,this._stateLayerElement.disabled=t}setRequired(t){this._activeInputElement.required=t}setReadonly(t){this._activeInputElement.readOnly=t,d(this._activeInputElement,t,"aria-readonly",t.toString()),this._stateLayerElement.disabled=t}setIconVisibility(t){let o=t==="none"||t==="off",a=t==="none"||t==="on";p(this._iconOnElement,o,i.classes.HIDDEN),p(this._iconOffElement,a,i.classes.HIDDEN)}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}addRootListener(t,o){this._rootElement.addEventListener(t,o)}addInputSlotListener(t){this._inputElement.addEventListener("slotchange",t)}detectInputElement(){let t=this._inputSlotElement.assignedElements()[0];t?this._inputAdapter.attachElement(t):this._inputAdapter.attachElement(this._inputElement)}proxyClick(){this._activeInputElement.click(),this._activeInputElement.focus()}proxyLabel(t){this._labelElementText=t!=null?t:void 0,this._setAriaLabel()}syncValue(t){if(t===null){this._component[n].setFormValue(null,i.state.OFF);return}let o=new FormData;o.append(this._component.name,t),this._component[n].setFormValue(o,i.state.ON)}syncValidity(t){t?this._activeInputElement.setCustomValidity(this._component[n].validationMessage):this._activeInputElement.setCustomValidity(""),this._component[n].setValidity(this._activeInputElement.validity,this._activeInputElement.validationMessage,this._activeInputElement)}setValidity(t,o){this._component[n].setValidity(t,o,this._activeInputElement)}_initializeInput(){var t;(t=this._forwardObserver)==null||t.disconnect(),this._initializeForwardObserver(this._activeInputElement)}_initializeForwardObserver(t){this._forwardObserver=x(this._component,i.forwardedAttributes,(o,a)=>{if(o==="aria-label"){this._forwardedAriaLabel=a!=null?a:void 0,this._setAriaLabel();return}d(t,!!a,o,a!=null?a:void 0)})}_setAriaLabel(){var o;let t=!!this._forwardedAriaLabel||!!this._labelElementText;d(this._activeInputElement,t,"aria-label",(o=this._forwardedAriaLabel)!=null?o:this._labelElementText)}_switchInput(t,o){S(o,t,["type","role","checked","aria-readonly"]),O(o,t,L),C(o,t)}_observeInput(t=this._inputElement){this._inputAdapter.initialize(t,(o,a)=>{this._switchInput(o,a),this._initializeInput()})}};var v=class{constructor(e){this._adapter=e;this._on=!1;this._defaultOn=!1;this._value="on";this._dense=!1;this._disabled=!1;this._required=!1;this._readonly=!1;this._icon="on";this._labelPosition="end";this._changeListener=t=>this._handleChange(t),this._inputSlotListener=()=>this._handleInputSlotChange()}get _submittedValue(){return this._on?this._value:null}initialize(){this._adapter.initialize(),this._adapter.addRootListener("change",this._changeListener),this._adapter.addInputSlotListener(this._inputSlotListener),this._adapter.setIconVisibility(this._icon),this._adapter.syncValue(this._submittedValue)}proxyClick(){this._adapter.proxyClick()}proxyLabel(e){this._adapter.proxyLabel(e)}syncValidity(e){this._adapter.syncValidity(e)}setValidity(e,t){this._adapter.setValidity(e,t)}_handleChange(e){if(this._readonly){this._adapter.setOn(this._on);return}let o=e.target.checked,a=this._on;if(this._on=o,!this._adapter.emitHostEvent(i.events.CHANGE,o,!0,!0)){this._on=a,this._adapter.setOn(this._on);return}this._adapter.syncValue(this._submittedValue),this._setOnAttribute()}_handleInputSlotChange(){this._adapter.detectInputElement()}_setOnAttribute(){this._adapter.toggleHostAttribute(i.attributes.ON,this._on),this._adapter.toggleHostAttribute(i.attributes.SELECTED,this._on)}get on(){return this._on}set on(e){this._on!==e&&(this._on=e,this._adapter.setOn(this._on),this._adapter.syncValue(this._submittedValue),this._setOnAttribute())}get defaultOn(){return this._defaultOn}set defaultOn(e){this._defaultOn!==e&&(this._defaultOn=e,this._adapter.setDefaultOn(this._defaultOn),this._adapter.toggleHostAttribute(i.attributes.DEFAULT_ON,this._defaultOn))}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._adapter.setValue(this._value),this._adapter.syncValue(this._submittedValue),this._adapter.toggleHostAttribute(i.attributes.VALUE,!0,this._value))}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.toggleHostAttribute(i.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get required(){return this._required}set required(e){this._required!==e&&(this._required=e,this._adapter.setRequired(this._required),this._adapter.toggleHostAttribute(i.attributes.REQUIRED,this._required))}get readonly(){return this._readonly}set readonly(e){this._readonly!==e&&(this._readonly=e,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(i.attributes.READONLY,this._readonly))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._adapter.setIconVisibility(this._icon),this._adapter.setHostAttribute(i.attributes.ICON,this._icon))}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition!==e&&(this._labelPosition=e,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(i.attributes.LABEL_POSITION,this._labelPosition))}};var q='<template><div class="forge-switch" part="switch"><div id="container" class="container"><slot name="input"><input id="input" class="input" type="checkbox" role="switch"></slot><div class="track" part="track"></div><div class="handle" part="handle"><div id="icon-off" class="icon icon__off" part="icon-off"><slot name="icon-off"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M20 13H4v-2h16v2z"/></svg></slot></div><div id="icon-on" class="icon icon__on" part="icon-on"><slot name="icon-on"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"/></svg></slot></div><forge-state-layer target="container" exportparts="surface:state-layer"></forge-state-layer></div><forge-focus-indicator target="container" part="focus-indicator"></forge-focus-indicator></div><label id="label" for="input" class="label" part="label"><slot></slot></label></div></template>',U=':host{display:inline-block}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-handle-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, var(--forge-shape-round, 50%));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, var(--forge-shape-full, 9999px));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, space-between);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-state-layer-state-layer-off-color, var(--_state-layer-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.38);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:var(--_switch-direction);flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:var(--_switch-justify);justify-content:var(--_switch-justify);gap:var(--_switch-gap);display:-webkit-box;display:flex;--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;-webkit-box-align:center;align-items:center;display:-webkit-box;display:flex;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{-webkit-transition-property:background-color,border-color,border-width;transition-property:background-color,border-color,border-width;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);-webkit-box-sizing:border-box;box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;display:-webkit-box;display:flex;-webkit-transition-property:translate;transition-property:translate;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:"";position:relative;display:block;scale:var(--_switch-handle-off-scale);-webkit-transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);-webkit-box-shadow:var(--_switch-handle-off-elevation);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;display:-webkit-box;display:flex;-webkit-transition-property:opacity,scale;transition-property:opacity,scale;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label-font-weight,400);line-height:var(--forge-typography-label-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-label-text-decoration,inherit);text-decoration:var(--forge-typography-label-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([on]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([on]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([on]) .handle::before{scale:var(--_switch-handle-on-scale);-webkit-box-shadow:var(--_switch-handle-on-elevation);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([on]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([on]) .handle .icon__off{opacity:0;scale:0.4}:host([on]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);-webkit-box-shadow:var(--_switch-handle-active-off-elevation);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);-webkit-box-shadow:var(--_switch-handle-active-on-elevation);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch{opacity:var(--_switch-disabled-opacity)}:host([disabled]) .forge-switch .container{cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{-webkit-box-shadow:none;box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}',r=class extends z{constructor(){super();g(this,q,U,!0),this[n]=this.attachInternals(),this._foundation=new v(new b(this))}static get observedAttributes(){return[i.attributes.ON,i.attributes.SELECTED,i.attributes.DEFAULT_ON,i.attributes.VALUE,i.attributes.DENSE,i.attributes.DISABLED,i.attributes.REQUIRED,i.attributes.READONLY,i.attributes.ICON,i.attributes.LABEL_POSITION]}get form(){return this[n].form}get labels(){return this[n].labels}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}set name(t){d(this,!!t,"name",t!=null?t:"")}get validity(){return this._foundation.syncValidity(this._hasCustomValidityError),this[n].validity}get validationMessage(){return this._foundation.syncValidity(this._hasCustomValidityError),this[n].validationMessage}get willValidate(){return this[n].willValidate}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(t,o,a){switch(t){case i.attributes.ON:case i.attributes.SELECTED:this.on=c(a);break;case i.attributes.DEFAULT_ON:this.defaultOn=c(a);break;case i.attributes.VALUE:this.value=a;break;case i.attributes.DENSE:this.dense=c(a);break;case i.attributes.DISABLED:this.disabled=c(a);break;case i.attributes.REQUIRED:this.required=c(a);break;case i.attributes.READONLY:this.readonly=c(a);break;case i.attributes.ICON:this.icon=a;break;case i.attributes.LABEL_POSITION:this.labelPosition=a;break}}setFormValue(t,o){if(this[n].setFormValue(t,o),o){let a=f(o)?o:o[this.name];this.on=a===i.state.ON;return}f(t)?this.on=!!t:t!=null&&t[this.name]?this.on=!!t[this.name]:this.on=!1}checkValidity(){return this._foundation.syncValidity(this._hasCustomValidityError),this[n].checkValidity()}reportValidity(){return this._foundation.syncValidity(this._hasCustomValidityError),this[n].reportValidity()}setCustomValidity(t){this._hasCustomValidityError=!!t,this._foundation.setValidity({customError:!!t},t)}formResetCallback(){this.on=this.defaultOn}formStateRestoreCallback(t){this.on=t===i.state.ON}formDisabledCallback(t){this.disabled=t}labelClickedCallback(){this._foundation.proxyClick()}labelChangedCallback(t){this._foundation.proxyLabel(t)}toggle(t){u(t)?this._foundation.on=t:this._foundation.on=!this._foundation.on}};n,s([l()],r.prototype,"on",2),s([l({name:"on"})],r.prototype,"selected",2),s([l()],r.prototype,"defaultOn",2),s([l()],r.prototype,"value",2),s([l()],r.prototype,"dense",2),s([l()],r.prototype,"disabled",2),s([l()],r.prototype,"required",2),s([l()],r.prototype,"readonly",2),s([l()],r.prototype,"icon",2),s([l()],r.prototype,"labelPosition",2),r=s([m({name:i.elementName,dependencies:[T,V]})],r);var D=class extends k{constructor(e){super(e)}get value(){return this._element.value}set value(e){this._element.value=e}get on(){return this._element.on}set on(e){this._element.on=e}get selected(){return this._element.selected}set selected(e){this._element.selected=e}get defaultOn(){return this._element.defaultOn}set defaultOn(e){this._element.defaultOn=e}get icon(){return this._element.icon}set icon(e){this._element.icon=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get dense(){return this._element.dense}set dense(e){this._element.dense=e}get required(){return this._element.required}set required(e){this._element.required=e}get readonly(){return this._element.readonly}set readonly(e){this._element.readonly=e}get name(){return this._element.name}set name(e){this._element.name=e}get labelPosition(){return this._element.labelPosition}set labelPosition(e){this._element.labelPosition=e}onChange(e){this._element.addEventListener("forge-switch-change",({detail:t})=>e(t))}onFocus(e){this._element.addEventListener("focus",t=>e(t))}onBlur(e){this._element.addEventListener("blur",t=>e(t))}setLabel(e){this._element.innerText=e!=null?e:""}toggle(e){this._element.toggle(e)}_build(){return document.createElement(i.elementName)}_configure(){var e,t;(e=this._config.options)!=null&&e.id&&(this._element.id=this._config.options.id),(t=this._config.options)!=null&&t.label&&(this._element.innerText=this._config.options.label)}};function St(){w(r)}export{i as a,b,v as c,r as d,D as e,St as f};
|
|
7
|
+
//# sourceMappingURL=chunk.2YDKRTKP.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/switch/switch-constants.ts", "../../src/switch/switch-adapter.ts", "../../src/switch/switch-foundation.ts", "../../src/switch/switch.ts", "../../src/switch/switch-component-delegate.ts", "../../src/switch/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\nimport { INPUT_ARIA_ATTRIBUTES } from '../core';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}switch`;\n\nconst classes = {\n HIDDEN: 'hidden'\n};\n\nconst attributes = {\n ON: 'on',\n SELECTED: 'selected',\n DEFAULT_ON: 'default-on',\n VALUE: 'value',\n DENSE: 'dense',\n DISABLED: 'disabled',\n REQUIRED: 'required',\n READONLY: 'readonly',\n ICON: 'icon',\n LABEL_POSITION: 'label-position'\n};\n\nconst selectors = {\n ROOT: '.forge-switch',\n INPUT: '#input',\n LABEL: '#label',\n ICON_ON: '#icon-on',\n ICON_OFF: '#icon-off',\n INPUT_SLOT: 'slot[name=input]',\n STATE_LAYER: 'forge-state-layer',\n SLOTTED_INPUT: 'input[type=checkbox]'\n};\n\nconst events = {\n CHANGE: `${elementName}-change`\n};\n\nconst state = {\n ON: 'on',\n OFF: 'off'\n};\n\nconst forwardedAttributes = [...INPUT_ARIA_ATTRIBUTES];\n\nexport const SWITCH_CONSTANTS = {\n classes,\n selectors,\n attributes,\n elementName,\n events,\n state,\n forwardedAttributes\n};\n\nexport type SwitchLabelPosition = 'start' | 'end';\nexport type SwitchIconVisibility = 'both' | 'none' | 'off' | 'on';\n", "import { getShadowElement, toggleAttribute, toggleClass } from '@tylertech/forge-core';\nimport { internals } from '../constants';\nimport { BaseAdapter, IBaseAdapter, INPUT_PROPERTIES, SlottedElementAdapter, cloneAttributes, cloneProperties, cloneValidationMessage, forwardAttributes } from '../core';\nimport { StateLayerComponent } from '../state-layer';\nimport { ISwitchComponent } from './switch';\nimport { SWITCH_CONSTANTS, SwitchIconVisibility, SwitchLabelPosition } from './switch-constants';\n\nexport interface ISwitchAdapter extends IBaseAdapter {\n initialize(): void;\n setOn(value: boolean): void;\n setDefaultOn(value: boolean): void;\n setValue(value: string): void;\n setDisabled(value: boolean): void;\n setRequired(value: boolean): void;\n setReadonly(value: boolean): void;\n setIconVisibility(value: SwitchIconVisibility): void;\n setLabelPosition(value: SwitchLabelPosition): void;\n addRootListener(event: string, callback: EventListener): void;\n addInputSlotListener(callback: EventListener): void;\n detectInputElement(): void;\n proxyClick(): void;\n proxyLabel(value: string | null): void;\n syncValue(value: string | null): void;\n syncValidity(hasCustomValidityError: boolean): void;\n setValidity(flags?: ValidityStateFlags | undefined, message?: string | undefined): void;\n}\n\nexport class SwitchAdapter extends BaseAdapter<ISwitchComponent> implements ISwitchAdapter {\n private readonly _rootElement: HTMLElement;\n private readonly _inputElement: HTMLInputElement;\n private readonly _labelElement: HTMLElement;\n private readonly _iconOnElement: HTMLElement;\n private readonly _iconOffElement: HTMLElement;\n private readonly _inputSlotElement: HTMLSlotElement;\n private readonly _stateLayerElement: StateLayerComponent;\n private readonly _inputAdapter: SlottedElementAdapter<HTMLInputElement>;\n private _forwardObserver?: MutationObserver;\n private _forwardedAriaLabel?: string;\n private _labelElementText?: string;\n\n private get _activeInputElement(): HTMLInputElement {\n return this._inputAdapter.el ?? this._inputElement;\n }\n\n constructor(component: ISwitchComponent) {\n super(component);\n \n this._rootElement = getShadowElement(component, SWITCH_CONSTANTS.selectors.ROOT);\n this._inputElement = getShadowElement(component, SWITCH_CONSTANTS.selectors.INPUT) as HTMLInputElement;\n this._labelElement = getShadowElement(component, SWITCH_CONSTANTS.selectors.LABEL);\n this._iconOnElement = getShadowElement(component, SWITCH_CONSTANTS.selectors.ICON_ON);\n this._iconOffElement = getShadowElement(component, SWITCH_CONSTANTS.selectors.ICON_OFF);\n this._stateLayerElement = getShadowElement(component, SWITCH_CONSTANTS.selectors.STATE_LAYER) as StateLayerComponent;\n this._inputAdapter = new SlottedElementAdapter();\n }\n\n public initialize(): void {\n const slottedInput = this._component.querySelector(SWITCH_CONSTANTS.selectors.SLOTTED_INPUT) as HTMLInputElement;\n if (slottedInput) {\n slottedInput.slot = 'input';\n this._switchInput(slottedInput, this._inputElement);\n } else {\n this._initializeForwardObserver(this._inputElement);\n }\n this._observeInput(slottedInput ?? this._inputElement);\n }\n\n public setOn(value: boolean): void {\n this._activeInputElement.checked = value;\n }\n\n public setDefaultOn(value: boolean): void {\n this._activeInputElement.toggleAttribute('checked', value);\n }\n\n public setValue(value: string): void {\n this._activeInputElement.value = value;\n }\n\n public setDisabled(value: boolean): void {\n this._activeInputElement.disabled = value;\n this._stateLayerElement.disabled = value;\n }\n\n public setRequired(value: boolean): void {\n this._activeInputElement.required = value;\n }\n\n public setReadonly(value: boolean): void {\n this._activeInputElement.readOnly = value;\n toggleAttribute(this._activeInputElement, value, 'aria-readonly', value.toString());\n this._stateLayerElement.disabled = value;\n }\n\n public setIconVisibility(value: SwitchIconVisibility): void {\n const hideOn = value === 'none' || value === 'off';\n const hideOff = value === 'none' || value === 'on';\n toggleClass(this._iconOnElement, hideOn, SWITCH_CONSTANTS.classes.HIDDEN);\n toggleClass(this._iconOffElement, hideOff, SWITCH_CONSTANTS.classes.HIDDEN);\n }\n\n public setLabelPosition(value: SwitchLabelPosition): void {\n this._labelElement.remove();\n\n if (value === 'start') {\n this._rootElement.prepend(this._labelElement);\n } else {\n this._rootElement.append(this._labelElement);\n }\n }\n\n public addRootListener(event: string, callback: EventListener): void {\n this._rootElement.addEventListener(event, callback);\n }\n\n public addInputSlotListener(callback: EventListener): void {\n this._inputElement.addEventListener('slotchange', callback);\n }\n\n public detectInputElement(): void {\n const inputElement = this._inputSlotElement.assignedElements()[0] as HTMLInputElement;\n if (inputElement) {\n this._inputAdapter.attachElement(inputElement);\n } else {\n this._inputAdapter.attachElement(this._inputElement);\n }\n }\n\n public proxyClick(): void {\n this._activeInputElement.click();\n // TODO: use `{ focusVisble: false }` when supported.\n this._activeInputElement.focus();\n }\n\n public proxyLabel(value: string | null): void {\n this._labelElementText = value ?? undefined;\n this._setAriaLabel();\n }\n\n public syncValue(value: string | null): void {\n if (value === null) {\n this._component[internals].setFormValue(null, SWITCH_CONSTANTS.state.OFF);\n return;\n }\n\n const data = new FormData();\n data.append(this._component.name, value);\n this._component[internals].setFormValue(data, SWITCH_CONSTANTS.state.ON);\n }\n\n public syncValidity(hasCustomValidityError: boolean): void {\n if (hasCustomValidityError) {\n this._activeInputElement.setCustomValidity(this._component[internals].validationMessage);\n } else {\n this._activeInputElement.setCustomValidity('');\n }\n\n this._component[internals].setValidity(this._activeInputElement.validity, this._activeInputElement.validationMessage, this._activeInputElement);\n }\n\n public setValidity(flags?: ValidityStateFlags | undefined, message?: string | undefined): void {\n this._component[internals].setValidity(flags, message, this._activeInputElement);\n }\n\n private _initializeInput(): void {\n this._forwardObserver?.disconnect();\n this._initializeForwardObserver(this._activeInputElement);\n }\n\n private _initializeForwardObserver(el: HTMLElement): void {\n this._forwardObserver = forwardAttributes(this._component, SWITCH_CONSTANTS.forwardedAttributes, (name, value) => {\n // Use the connected label element as a fallback if aria-label is removed. Store the value so\n // it can be used to determine whether an updated label element should take effect.\n if (name === 'aria-label') {\n this._forwardedAriaLabel = value ?? undefined;\n this._setAriaLabel();\n return;\n }\n // Otherwise forward the attribute to the element.\n toggleAttribute(el, !!value, name, value ?? undefined);\n });\n }\n\n private _setAriaLabel(): void {\n const hasAriaLabel = !!this._forwardedAriaLabel || !!this._labelElementText;\n toggleAttribute(this._activeInputElement, hasAriaLabel, 'aria-label', this._forwardedAriaLabel ?? this._labelElementText);\n }\n \n private _switchInput(newEl: HTMLInputElement, oldEl: HTMLInputElement): void {\n cloneAttributes(oldEl, newEl, ['type', 'role', 'checked', 'aria-readonly']);\n cloneProperties(oldEl, newEl, INPUT_PROPERTIES);\n cloneValidationMessage(oldEl, newEl);\n }\n\n private _observeInput(el: HTMLInputElement = this._inputElement): void {\n this._inputAdapter.initialize(el, (newEl, oldEl) => {\n this._switchInput(newEl, oldEl);\n this._initializeInput();\n });\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { ISwitchAdapter } from './switch-adapter';\nimport { SWITCH_CONSTANTS, SwitchIconVisibility, SwitchLabelPosition } from './switch-constants';\n\nexport interface ISwitchFoundation extends ICustomElementFoundation {\n on: boolean;\n defaultOn: boolean;\n value: string;\n dense: boolean;\n disabled: boolean;\n required: boolean;\n readonly: boolean;\n icon: SwitchIconVisibility;\n labelPosition: SwitchLabelPosition;\n proxyClick(): void;\n proxyLabel(value: string | null): void;\n syncValidity(hasCustomValidityError: boolean): void;\n setValidity(flags?: ValidityStateFlags | undefined, message?: string | undefined): void;\n}\n\nexport class SwitchFoundation implements ISwitchFoundation {\n // State\n private _on = false;\n private _defaultOn = false;\n private _value = 'on';\n private _dense = false;\n private _disabled = false;\n private _required = false;\n private _readonly = false;\n private _icon: SwitchIconVisibility = 'on';\n private _labelPosition: SwitchLabelPosition = 'end';\n\n private get _submittedValue(): string | null {\n return this._on ? this._value : null;\n }\n\n // Listeners\n private readonly _changeListener: EventListener;\n private readonly _inputSlotListener: EventListener;\n\n constructor(private readonly _adapter: ISwitchAdapter) {\n this._changeListener = (evt: Event) => this._handleChange(evt);\n this._inputSlotListener = () => this._handleInputSlotChange();\n }\n\n public initialize(): void {\n this._adapter.initialize();\n this._adapter.addRootListener('change', this._changeListener);\n this._adapter.addInputSlotListener(this._inputSlotListener);\n this._adapter.setIconVisibility(this._icon);\n this._adapter.syncValue(this._submittedValue);\n }\n\n public proxyClick(): void {\n this._adapter.proxyClick();\n }\n\n public proxyLabel(value: string | null): void {\n this._adapter.proxyLabel(value);\n }\n\n public syncValidity(hasCustomValidityError: boolean): void {\n this._adapter.syncValidity(hasCustomValidityError);\n }\n\n public setValidity(flags?: ValidityStateFlags | undefined, message?: string | undefined): void {\n this._adapter.setValidity(flags, message);\n }\n\n private _handleChange(evt: Event): void {\n if (this._readonly) {\n this._adapter.setOn(this._on);\n return;\n }\n\n const target = evt.target as HTMLInputElement;\n const newValue = target.checked;\n const oldValue = this._on;\n\n this._on = newValue;\n\n const isCancelled = !this._adapter.emitHostEvent(SWITCH_CONSTANTS.events.CHANGE, newValue, true, true);\n if (isCancelled) {\n this._on = oldValue;\n this._adapter.setOn(this._on);\n return;\n }\n\n this._adapter.syncValue(this._submittedValue);\n this._setOnAttribute();\n }\n\n private _handleInputSlotChange(): void {\n this._adapter.detectInputElement();\n }\n\n private _setOnAttribute(): void {\n this._adapter.toggleHostAttribute(SWITCH_CONSTANTS.attributes.ON, this._on);\n // Also set selected for backwards compatibility\n this._adapter.toggleHostAttribute(SWITCH_CONSTANTS.attributes.SELECTED, this._on);\n }\n\n public get on(): boolean {\n return this._on;\n }\n public set on(value: boolean) {\n if (this._on !== value) {\n this._on = value;\n this._adapter.setOn(this._on);\n this._adapter.syncValue(this._submittedValue);\n this._setOnAttribute();\n }\n }\n\n public get defaultOn(): boolean {\n return this._defaultOn;\n }\n public set defaultOn(value: boolean) {\n if (this._defaultOn !== value) {\n this._defaultOn = value;\n this._adapter.setDefaultOn(this._defaultOn);\n this._adapter.toggleHostAttribute(SWITCH_CONSTANTS.attributes.DEFAULT_ON, this._defaultOn);\n }\n }\n\n public get value(): string {\n return this._value;\n }\n public set value(value: string) {\n if (this._value !== value) {\n this._value = value;\n this._adapter.setValue(this._value);\n this._adapter.syncValue(this._submittedValue);\n this._adapter.toggleHostAttribute(SWITCH_CONSTANTS.attributes.VALUE, true, this._value);\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(SWITCH_CONSTANTS.attributes.DENSE, this._dense);\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 this._adapter.setDisabled(this._disabled);\n this._adapter.toggleHostAttribute(SWITCH_CONSTANTS.attributes.DISABLED, this._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 this._required = value;\n this._adapter.setRequired(this._required);\n this._adapter.toggleHostAttribute(SWITCH_CONSTANTS.attributes.REQUIRED, this._required);\n }\n }\n\n public get readonly(): boolean {\n return this._readonly;\n }\n public set readonly(value: boolean) {\n if (this._readonly !== value) {\n this._readonly = value;\n this._adapter.setReadonly(this._readonly);\n this._adapter.toggleHostAttribute(SWITCH_CONSTANTS.attributes.READONLY, this._readonly);\n }\n }\n\n public get icon(): SwitchIconVisibility {\n return this._icon;\n }\n public set icon(value: SwitchIconVisibility) {\n if (this._icon !== value) {\n this._icon = value;\n this._adapter.setIconVisibility(this._icon);\n this._adapter.setHostAttribute(SWITCH_CONSTANTS.attributes.ICON, this._icon);\n }\n }\n\n public get labelPosition(): SwitchLabelPosition {\n return this._labelPosition;\n }\n public set labelPosition(value: SwitchLabelPosition) {\n if (this._labelPosition !== value) {\n this._labelPosition = value;\n this._adapter.setLabelPosition(this._labelPosition);\n this._adapter.setHostAttribute(SWITCH_CONSTANTS.attributes.LABEL_POSITION, this._labelPosition);\n }\n }\n}\n", "import { CustomElement, FoundationProperty, attachShadowTemplate, coerceBoolean, isDefined, isString, toggleAttribute } from '@tylertech/forge-core';\nimport { BaseNullableFormComponent, IBaseNullableFormComponent } from '../core/base/base-nullable-form-component';\nimport { FocusIndicatorComponent } from '../focus-indicator/focus-indicator';\nimport { StateLayerComponent } from '../state-layer/state-layer';\nimport { SwitchAdapter } from './switch-adapter';\nimport { SWITCH_CONSTANTS, SwitchIconVisibility, SwitchLabelPosition } from './switch-constants';\nimport { SwitchFoundation } from './switch-foundation';\nimport { ILabelAware } from '../label/label-aware';\nimport { internals } from '../constants';\n\nconst template = '<template><div class=\\\"forge-switch\\\" part=\\\"switch\\\"><div id=\\\"container\\\" class=\\\"container\\\"><slot name=\\\"input\\\"><input id=\\\"input\\\" class=\\\"input\\\" type=\\\"checkbox\\\" role=\\\"switch\\\"></slot><div class=\\\"track\\\" part=\\\"track\\\"></div><div class=\\\"handle\\\" part=\\\"handle\\\"><div id=\\\"icon-off\\\" class=\\\"icon icon__off\\\" part=\\\"icon-off\\\"><slot name=\\\"icon-off\\\"><svg aria-hidden=\\\"true\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M20 13H4v-2h16v2z\\\"/></svg></slot></div><div id=\\\"icon-on\\\" class=\\\"icon icon__on\\\" part=\\\"icon-on\\\"><slot name=\\\"icon-on\\\"><svg aria-hidden=\\\"true\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\\\"/></svg></slot></div><forge-state-layer target=\\\"container\\\" exportparts=\\\"surface:state-layer\\\"></forge-state-layer></div><forge-focus-indicator target=\\\"container\\\" part=\\\"focus-indicator\\\"></forge-focus-indicator></div><label id=\\\"label\\\" for=\\\"input\\\" class=\\\"label\\\" part=\\\"label\\\"><slot></slot></label></div></template>';\nconst styles = ':host{display:inline-block}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-handle-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, var(--forge-shape-round, 50%));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, var(--forge-shape-full, 9999px));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, space-between);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-state-layer-state-layer-off-color, var(--_state-layer-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.38);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:var(--_switch-direction);flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:var(--_switch-justify);justify-content:var(--_switch-justify);gap:var(--_switch-gap);display:-webkit-box;display:flex;--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;-webkit-box-align:center;align-items:center;display:-webkit-box;display:flex;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{-webkit-transition-property:background-color,border-color,border-width;transition-property:background-color,border-color,border-width;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);-webkit-box-sizing:border-box;box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;display:-webkit-box;display:flex;-webkit-transition-property:translate;transition-property:translate;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:\\\"\\\";position:relative;display:block;scale:var(--_switch-handle-off-scale);-webkit-transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing),-webkit-box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing);-webkit-box-shadow:var(--_switch-handle-off-elevation);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;display:-webkit-box;display:flex;-webkit-transition-property:opacity,scale;transition-property:opacity,scale;-webkit-transition-duration:var(--_switch-animation-duration);transition-duration:var(--_switch-animation-duration);-webkit-transition-timing-function:var(--_switch-animation-timing);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label-font-family, var(--forge-typography-font-family, \\\"Roboto\\\", sans-serif));font-size:var(--forge-typography-label-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label-font-weight,400);line-height:var(--forge-typography-label-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-label-text-decoration,inherit);text-decoration:var(--forge-typography-label-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([on]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([on]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([on]) .handle::before{scale:var(--_switch-handle-on-scale);-webkit-box-shadow:var(--_switch-handle-on-elevation);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([on]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([on]) .handle .icon__off{opacity:0;scale:0.4}:host([on]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);-webkit-box-shadow:var(--_switch-handle-active-off-elevation);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);-webkit-box-shadow:var(--_switch-handle-active-on-elevation);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch{opacity:var(--_switch-disabled-opacity)}:host([disabled]) .forge-switch .container{cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{-webkit-box-shadow:none;box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}';\n\nexport interface ISwitchComponent extends IBaseNullableFormComponent, ILabelAware {\n on: boolean;\n /**\n * @deprecated use `on` instead\n */\n selected: boolean;\n defaultOn: boolean;\n dense: boolean;\n icon: SwitchIconVisibility;\n labelPosition: SwitchLabelPosition;\n toggle(force?: boolean): void;\n setFormValue(value: string | File | FormData | null, state?: string | File | FormData | null | undefined): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-switch': ISwitchComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-switch-change': CustomEvent<boolean>;\n }\n}\n\n/**\n * @tag forge-switch\n * \n * @summary Switches toggle the state of a single setting on or off.\n * \n * @description\n * Use switches to:\n * - Toggle a single item on or off, on mobile and tablet\n * - Immediately activate or deactivate something\n * \n * @property {boolean} on - Whether the switch is on the on or off state.\n * @property {boolean} selected - Deprecated. Alias for `on`.\n * @property {boolean} defaultOn - Whether the switch is on or off by default.\n * @property {string} value - The value of the switch.\n * @property {boolean} dense - The density state.\n * @property {boolean} disabled - Controls if the switch is disabled.\n * @property {boolean} required = Controls if the switch is required.\n * @property {boolean} readonly - Controls if the switch is readonly.\n * @property {SwitchIconVisibility} icon - Controls the presence of the off and on icons.\n * @property {SwitchLabelPosition} labelPosition - Whether the label appears before or after the switch.\n * \n * @attribute {string} on - Controls whether the switch is in the on or off state.\n * @attribute {string} selected - Deprecated. Alias for `on`.\n * @attribute {string} default-on - Controls whether the switch is in the on or off state by default.\n * @attribute {string} value - The value of the switch.\n * @attribute {string} dense - Sets the density state.\n * @attribute {string} disabled - Controls if the switch is disabled.\n * @attribute {string} required - Controls if the switch is required.\n * @attribute {string} readonly - Controls if the switch is readonly.\n * @attribute {string} icon - Controls the presence of the off and on icons.\n * @attribute {string} label-position - Sets whether the label appears before or after the switch.\n * \n * @method {(force?: boolean) => void} toggle - Toggles whether the switch is selected or forces a selected state.\n * \n * @event {CustomEvent} forge-switch-change - Dispatches when the switch's value changes.\n * \n * @cssproperty --forge-theme-primary - The primary color of the switch.\n * @cssproperty --forge-theme-on-primary - The color of elements placed on top of the primary color (the handle icons for example).\n * @cssproperty --forge-switch-handle-on-color - The color of the handle in the switch's on state.\n * @cssproperty --forge-switch-handle-off-color - The color of the handle in the switch's off state.\n * @cssproperty --forge-switch-handle-active-on-color - The color of the handle when the switch is active (pressed) in its on state.\n * @cssproperty --forge-switch-handle-active-off-color - The color of the handle when the switch is active (pressed) in its off state.\n * @cssproperty --forge-switch-handle-size - The inline and block size of the handle.\n * @cssproperty --forge-switch-handle-width - The inline size of the handle.\n * @cssproperty --forge-switch-handle-height - The block size of the handle.\n * @cssproperty --forge-switch-handle-scale - The scale transformation applied to the handle.\n * @cssproperty --forge-switch-handle-on-scale - The scale transformation applied to the handle in the switch's on state.\n * @cssproperty --forge-switch-handle-off-scale - The scale transformation applied to the handle in the switch's off state.\n * @cssproperty --forge-switch-handle-active-scale - The scale transformation applied to the handle when the switch is active (pressed).\n * @cssproperty --forge-switch-handle-active-on-scale - The scale transformation applied to the handle when the switch is active (pressed) in its on state.\n * @cssproperty --forge-switch-handle-active-off-scale - The scale transformation applied to the handle when the switch is active (pressed) in its off state.\n * @cssproperty --forge-switch-handle-shape - The shape of the handle.\n * @cssproperty --forge-switch-handle-elevation - The handle's shadow.\n * @cssproperty --forge-switch-handle-on-elevation - The handle's shadow in the switch's on state.\n * @cssproperty --forge-switch-handle-off-elevation - The handle's shadow in the switch's off state.\n * @cssproperty --forge-switch-handle-active-elevation - The handle's shadow when the switch is active (pressed).\n * @cssproperty --forge-switch-handle-active-on-elevation - The handle's shadow when the switch is active (pressed) in its on state.\n * @cssproperty --forge-switch-handle-active-off-elevation - The handle's shadow when the switch is active (pressed) in its off state.\n * @cssproperty --forge-switch-track-on-color - The color of the track in the switch's on state.\n * @cssproperty --forge-switch-track-off-color - The color fo the track in the switch's off state.\n * @cssproperty --forge-switch-track-active-on-color - The color of the track when the switch is active (pressed) in its on state.\n * @cssproperty --forge-switch-track-active-off-color - The color fo the track when the switch is active (pressed) in its off state.\n * @cssproperty --forge-switch-track-width - The inline size of the track.\n * @cssproperty --forge-switch-track-height - The block size of the track.\n * @cssproperty --forge-switch-track-shape - The shape of the track.\n * @cssproperty --forge-switch-track-border-width - The width of the track border.\n * @cssproperty --forge-switch-track-on-border-width - The width of the track border in the switch's on state.\n * @cssproperty --forge-switch-track-off-border-width - The width of the track border in the switch's off state.\n * @cssproperty --forge-switch-track-active-on-border-width - The width of the track border when the switch is active (pressed) in its on state.\n * @cssproperty --forge-switch-track-active-off-border-width - The width of the track border when the switch is active (pressed) in its off state.\n * @cssproperty --forge-switch-track-border-color - The color of the track border.\n * @cssproperty --forge-switch-track-on-border-color - The color of the track border in the switch's on state.\n * @cssproperty --forge-switch-track-off-border-color - The color of the track border in the switch's off state.\n * @cssproperty --forge-switch-track-active-on-border-color - The color of the track border when the switch is active (pressed) in its on state.\n * @cssproperty --forge-switch-track-active-off-border-color - The color of the track border when the switch is active (pressed) in its off state.\n * @cssproperty --forge-switch-icon-color - The color of the handle icons.\n * @cssproperty --forge-switch-icon-on-color - The color of the handle icon in the switch's on state.\n * @cssproperty --forge-switch-icon-off-color - The color of the handle icon in the switch's off state.\n * @cssproperty --forge-switch-icon-active-on-color - The color of the handle icon when the switch is active (pressed) in its on state.\n * @cssproperty --forge-switch-icon-active-off-color - The color of the handle icon when the switch is active (pressed) in its off state.\n * @cssproperty --forge-switch-icon-size - The size of the handle icon.\n * @cssproperty --forge-switch-icon-on-size - The size of the handle icon in the switch's on state.\n * @cssproperty --forge-switch-icon-off-size - The size of the handle icon in the switch's off state.\n * @cssproperty --forge-switch-icon-scale - The scale transformation applied to the handle icons.\n * @cssproperty --forge-switch-icon-on-scale - The scale transformation applied to the handle icons in the switch's on state.\n * @cssproperty --forge-switch-icon-off-scale - The scale transformation applied to the handle icons in the switch's off state.\n * @cssproperty --forge-switch-icon-active-on-scale - The scale transformation applied to the handle icons when the switch is active (pressed) in its on state.\n * @cssproperty --forge-switch-icon-active-off-scale - The scale transformation applied to the handle icons when the switch is active (pressed) in its off state.\n * @cssproperty --forge-switch-gap - The space between the switch and label.\n * @cssproperty --forge-switch-justify - How the switch and label are distributed along their main axis.\n * @cssproperty --forge-switch-direction - Whether the switch and label are arranged along the inline or block axis.\n * @cssproperty --forge-switch-state-layer-size - The inline and block size of the handle's state layer.\n * @cssproperty --forge-switch-state-layer-width - The inline size of the handle's state layer.\n * @cssproperty --forge-switch-state-layer-height - The block size of the handle's state layer.\n * @cssproperty --forge-switch-state-layer-on-color - The color of the handle's state layer when the switch is in its on state.\n * @cssproperty --forge-switch-state-layer-off-color - The color of the handle's state layer when the switch is in its off state.\n * @cssproperty --forge-switch-state-layer-dense-size - The inline and block size of the handle's state layer when the dense switch is used.\n * @cssproperty --forge-switch-state-layer-dense-width - The inline size of the handle's state layer when the dense switch is used.\n * @cssproperty --forge-switch-state-layer-dense-height - The block size of the handle's state layer when the dense switch is used.\n * @cssproperty --forge-switch-disabled-opacity - The opacity of the switch when disabled.\n * @cssproperty --forge-switch-animation-duration - The duration of animations.\n * @cssproperty --forge-switch-animation-timing - The timing function used in most animations.\n * @cssproperty --forge-switch-active-animation-timing - The timing function used in active state animations.\n * \n * @csspart switch - Styles the switch container element.\n * @csspart track - Styles the track element.\n * @csspart handle - Styles the handle element.\n * @csspart icon-on - Styles the on icon element.\n * @csspart icon-off - Styles the off icon element.\n * @csspart label - Styles the label element.\n * @csspart state-layer - Styles the state layer root element.\n * @csspart focus-indicator - Styles the focus indicator root element.\n */\n@CustomElement({\n name: SWITCH_CONSTANTS.elementName,\n dependencies: [\n FocusIndicatorComponent,\n StateLayerComponent\n ]\n})\nexport class SwitchComponent extends BaseNullableFormComponent implements ISwitchComponent {\n public static get observedAttributes(): string[] {\n return [\n SWITCH_CONSTANTS.attributes.ON,\n SWITCH_CONSTANTS.attributes.SELECTED,\n SWITCH_CONSTANTS.attributes.DEFAULT_ON,\n SWITCH_CONSTANTS.attributes.VALUE,\n SWITCH_CONSTANTS.attributes.DENSE,\n SWITCH_CONSTANTS.attributes.DISABLED,\n SWITCH_CONSTANTS.attributes.REQUIRED,\n SWITCH_CONSTANTS.attributes.READONLY,\n SWITCH_CONSTANTS.attributes.ICON,\n SWITCH_CONSTANTS.attributes.LABEL_POSITION\n ];\n }\n\n public get form(): HTMLFormElement | null {\n return this[internals].form;\n }\n\n public get labels(): NodeList {\n return this[internals].labels;\n }\n\n public get name(): string {\n return this.getAttribute('name') ?? '';\n }\n public set name(value: string) {\n toggleAttribute(this, !!value, 'name', value ?? '');\n }\n\n public get validity(): ValidityState {\n this._foundation.syncValidity(this._hasCustomValidityError);\n return this[internals].validity;\n }\n\n public get validationMessage(): string {\n this._foundation.syncValidity(this._hasCustomValidityError);\n return this[internals].validationMessage;\n }\n\n public get willValidate(): boolean {\n return this[internals].willValidate;\n }\n\n public readonly [internals]: ElementInternals;\n private readonly _foundation: SwitchFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles, true);\n this[internals] = this.attachInternals();\n this._foundation = new SwitchFoundation(new SwitchAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case SWITCH_CONSTANTS.attributes.ON:\n case SWITCH_CONSTANTS.attributes.SELECTED:\n this.on = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.DEFAULT_ON:\n this.defaultOn = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.VALUE:\n this.value = newValue;\n break;\n case SWITCH_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.REQUIRED:\n this.required = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.READONLY:\n this.readonly = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.ICON:\n this.icon = newValue as SwitchIconVisibility;\n break;\n case SWITCH_CONSTANTS.attributes.LABEL_POSITION:\n this.labelPosition = newValue as SwitchLabelPosition;\n break;\n }\n }\n\n public setFormValue(value: string | File | FormData | null, state?: string | File | FormData | null | undefined): void {\n this[internals].setFormValue(value, state);\n\n if (state) {\n const stateValue = isString(state) ? state : state[this.name];\n this.on = stateValue === SWITCH_CONSTANTS.state.ON;\n return;\n }\n\n if (isString(value)) {\n this.on = !!value;\n } else if (value?.[this.name]) {\n this.on = !!value[this.name];\n } else {\n this.on = false;\n }\n }\n\n public checkValidity(): boolean {\n this._foundation.syncValidity(this._hasCustomValidityError);\n return this[internals].checkValidity();\n }\n\n public reportValidity(): boolean {\n this._foundation.syncValidity(this._hasCustomValidityError);\n return this[internals].reportValidity();\n }\n\n public setCustomValidity(error: string): void {\n this._hasCustomValidityError = !!error;\n this._foundation.setValidity({ customError: !!error }, error);\n }\n\n public formResetCallback(): void {\n this.on = this.defaultOn;\n }\n\n public formStateRestoreCallback(state: string): void {\n this.on = state === SWITCH_CONSTANTS.state.ON;\n }\n\n public formDisabledCallback(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n public labelClickedCallback(): void {\n this._foundation.proxyClick();\n }\n\n public labelChangedCallback(value: string | null): void {\n this._foundation.proxyLabel(value);\n }\n\n @FoundationProperty()\n public declare on: boolean;\n\n /**\n * @deprecated use `on` instead\n */\n @FoundationProperty({ name: 'on' })\n public declare selected: boolean;\n\n @FoundationProperty()\n public declare defaultOn: boolean;\n\n @FoundationProperty()\n public declare value: string;\n\n @FoundationProperty()\n public declare dense: boolean;\n\n @FoundationProperty()\n public declare disabled: boolean;\n\n @FoundationProperty()\n public declare required: boolean;\n\n @FoundationProperty()\n public declare readonly: boolean;\n\n @FoundationProperty()\n public declare icon: SwitchIconVisibility;\n\n @FoundationProperty()\n public declare labelPosition: SwitchLabelPosition;\n\n /**\n * Toggles the switch on or off.\n * @param force Whether to set the switch on or off.\n */\n public toggle(force?: boolean): void {\n if (isDefined(force)) {\n this._foundation.on = force as boolean;\n } else {\n this._foundation.on = !this._foundation.on;\n }\n }\n}\n", "import { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core';\nimport { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { ISwitchComponent } from './switch';\nimport { SWITCH_CONSTANTS, SwitchIconVisibility, SwitchLabelPosition } from './switch-constants';\n\nexport type SwitchComponentDelegateProps = Partial<ISwitchComponent>;\nexport interface ISwitchComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n id?: string;\n label?: string;\n}\nexport interface ISwitchComponentDelegateConfig extends IBaseComponentDelegateConfig<ISwitchComponent, ISwitchComponentDelegateOptions> {}\n\nexport class SwitchComponentDelegate extends FormFieldComponentDelegate<ISwitchComponent, ISwitchComponentDelegateOptions> {\n constructor(config?: ISwitchComponentDelegateConfig) {\n super(config);\n }\n\n public get value(): string {\n return this._element.value;\n }\n public set value(value: string) {\n this._element.value = value;\n }\n\n public get on(): boolean {\n return this._element.on;\n }\n public set on(value: boolean) {\n this._element.on = value;\n }\n\n public get selected(): boolean {\n return this._element.selected;\n }\n public set selected(value: boolean) {\n this._element.selected = value;\n }\n\n public get defaultOn(): boolean {\n return this._element.defaultOn;\n }\n public set defaultOn(value: boolean) {\n this._element.defaultOn = value;\n }\n\n public get icon(): SwitchIconVisibility {\n return this._element.icon;\n }\n public set icon(value: SwitchIconVisibility) {\n this._element.icon = value;\n }\n\n public get disabled(): boolean {\n return this._element.disabled;\n }\n public set disabled(value: boolean) {\n this._element.disabled = value;\n }\n\n public get dense(): boolean {\n return this._element.dense;\n }\n public set dense(value: boolean) {\n this._element.dense = value;\n }\n\n public get required(): boolean {\n return this._element.required;\n }\n public set required(value: boolean) {\n this._element.required = value;\n }\n\n public get readonly(): boolean {\n return this._element.readonly;\n }\n public set readonly(value: boolean) {\n this._element.readonly = value;\n }\n\n public get name(): string {\n return this._element.name;\n }\n public set name(value: string) {\n this._element.name = value;\n }\n\n public get labelPosition(): SwitchLabelPosition {\n return this._element.labelPosition;\n }\n public set labelPosition(value: SwitchLabelPosition) {\n this._element.labelPosition = value;\n }\n\n public onChange(listener: (value: boolean) => void): void {\n this._element.addEventListener('forge-switch-change', ({ detail }: CustomEvent<boolean>) => listener(detail));\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._element.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._element.addEventListener('blur', evt => listener(evt));\n }\n\n public setLabel(text: string | null): void {\n this._element.innerText = text ?? '';\n }\n\n public toggle(force?: boolean): void {\n this._element.toggle(force);\n }\n\n protected _build(): ISwitchComponent {\n return document.createElement(SWITCH_CONSTANTS.elementName);\n }\n\n protected override _configure(): void {\n if (this._config.options?.id) {\n this._element.id = this._config.options.id;\n }\n if (this._config.options?.label) {\n this._element.innerText = this._config.options.label;\n }\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { SwitchComponent } from './switch';\n\nexport * from './switch-adapter';\nexport * from './switch-constants';\nexport * from './switch-foundation';\nexport * from './switch';\nexport * from './switch-component-delegate';\n\nexport function defineSwitchComponent(): void {\n defineCustomElement(SwitchComponent);\n}\n"],
|
|
5
|
+
"mappings": "2jBAGA,IAAMA,EAA2C,GAAGC,UAE9CC,EAAU,CACd,OAAQ,QACV,EAEMC,EAAa,CACjB,GAAI,KACJ,SAAU,WACV,WAAY,aACZ,MAAO,QACP,MAAO,QACP,SAAU,WACV,SAAU,WACV,SAAU,WACV,KAAM,OACN,eAAgB,gBAClB,EAEMC,EAAY,CAChB,KAAM,gBACN,MAAO,SACP,MAAO,SACP,QAAS,WACT,SAAU,YACV,WAAY,mBACZ,YAAa,oBACb,cAAe,sBACjB,EAEMC,EAAS,CACb,OAAQ,GAAGL,UACb,EAEMM,EAAQ,CACZ,GAAI,KACJ,IAAK,KACP,EAEMC,EAAsB,CAAC,GAAGC,CAAqB,EAExCC,EAAmB,CAC9B,QAAAP,EACA,UAAAE,EACA,WAAAD,EACA,YAAAH,EACA,OAAAK,EACA,MAAAC,EACA,oBAAAC,CACF,ECzBO,IAAMG,EAAN,cAA4BC,CAAwD,CAiBzF,YAAYC,EAA6B,CACvC,MAAMA,CAAS,EAEf,KAAK,aAAeC,EAAiBD,EAAWE,EAAiB,UAAU,IAAI,EAC/E,KAAK,cAAgBD,EAAiBD,EAAWE,EAAiB,UAAU,KAAK,EACjF,KAAK,cAAgBD,EAAiBD,EAAWE,EAAiB,UAAU,KAAK,EACjF,KAAK,eAAiBD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W,MAAe,CACxB,OAAO,KAAK,SAAS,IACvB,CACA,IAAW,KAAKA,EAAe,CAC7B,KAAK,SAAS,KAAOA,CACvB,CAEA,IAAW,eAAqC,CAC9C,OAAO,KAAK,SAAS,aACvB,CACA,IAAW,cAAcA,EAA4B,CACnD,KAAK,SAAS,cAAgBA,CAChC,CAEO,SAASC,EAA0C,CACxD,KAAK,SAAS,iBAAiB,sBAAuB,CAAC,CAAE,OAAAC,CAAO,IAA4BD,EAASC,CAAM,CAAC,CAC9G,CAEO,QAAQD,EAAsC,CACnD,KAAK,SAAS,iBAAiB,QAASE,GAAOF,EAASE,CAAG,CAAC,CAC9D,CAEO,OAAOF,EAAsC,CAClD,KAAK,SAAS,iBAAiB,OAAQE,GAAOF,EAASE,CAAG,CAAC,CAC7D,CAEO,SAASC,EAA2B,CACzC,KAAK,SAAS,UAAYA,GAAA,KAAAA,EAAQ,EACpC,CAEO,OAAOC,EAAuB,CACnC,KAAK,SAAS,OAAOA,CAAK,CAC5B,CAEU,QAA2B,CACnC,OAAO,SAAS,cAAcC,EAAiB,WAAW,CAC5D,CAEmB,YAAmB,CAtHxC,IAAAC,EAAAC,GAuHQD,EAAA,KAAK,QAAQ,UAAb,MAAAA,EAAsB,KACxB,KAAK,SAAS,GAAK,KAAK,QAAQ,QAAQ,KAEtCC,EAAA,KAAK,QAAQ,UAAb,MAAAA,EAAsB,QACxB,KAAK,SAAS,UAAY,KAAK,QAAQ,QAAQ,MAEnD,CACF,ECpHO,SAASC,IAA8B,CAC5CC,EAAoBC,CAAe,CACrC",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "attributes", "selectors", "events", "state", "forwardedAttributes", "INPUT_ARIA_ATTRIBUTES", "SWITCH_CONSTANTS", "SwitchAdapter", "BaseAdapter", "component", "getShadowElement", "SWITCH_CONSTANTS", "SlottedElementAdapter", "_a", "slottedInput", "value", "toggleAttribute", "hideOn", "hideOff", "toggleClass", "event", "callback", "inputElement", "internals", "data", "hasCustomValidityError", "flags", "message", "el", "forwardAttributes", "name", "hasAriaLabel", "newEl", "oldEl", "cloneAttributes", "cloneProperties", "INPUT_PROPERTIES", "cloneValidationMessage", "SwitchFoundation", "_adapter", "evt", "value", "hasCustomValidityError", "flags", "message", "newValue", "oldValue", "SWITCH_CONSTANTS", "template", "styles", "SwitchComponent", "BaseNullableFormComponent", "attachShadowTemplate", "internals", "SwitchFoundation", "SwitchAdapter", "SWITCH_CONSTANTS", "_a", "value", "toggleAttribute", "name", "oldValue", "newValue", "coerceBoolean", "state", "stateValue", "isString", "error", "isDisabled", "force", "isDefined", "__decorateClass", "FoundationProperty", "CustomElement", "FocusIndicatorComponent", "StateLayerComponent", "SwitchComponentDelegate", "FormFieldComponentDelegate", "config", "value", "listener", "detail", "evt", "text", "force", "SWITCH_CONSTANTS", "_a", "_b", "defineSwitchComponent", "defineCustomElement", "SwitchComponent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as E}from"./chunk.F6KM5FO6.js";import{a as T}from"./chunk.2YDKRTKP.js";import{b as L}from"./chunk.LOBKFTRM.js";import{a as v}from"./chunk.KFDYMENL.js";import{a as g}from"./chunk.LS7WRRT2.js";import{a as s}from"./chunk.NVUMRW44.js";import{a as b,b as _}from"./chunk.IT66AOX7.js";import{a as p,e as u,f as h,k as f}from"./chunk.JAWV5Y5T.js";import{k as m}from"./chunk.J2M2MXP2.js";import{d as l}from"./chunk.M3QDAYD2.js";var C=r=>typeof r.labelClickedCallback=="function"&&typeof r.labelChangedCallback=="function";var y=`${_}label`,k={FOR:"for",DYNAMIC:"dynamic"},M={ROOT:".forge-label",SLOT:"slot"},A=[E.elementName,T.elementName,L.elementName,v.elementName],n={elementName:y,selectors:M,attributes:k,labelableChildSelectors:A};var d=class extends g{constructor(e){super(e);this._targetElement=null;this._slotElement=h(e,n.selectors.SLOT)}destroy(){var e;(e=this._targetElement)==null||e.labelChangedCallback(null),this._targetElement=null}hasTargetElement(){return!!this._targetElement}getTargetElement(){return this._targetElement}setTargetElement(e){if(e&&this._checkLabelAwareness(e)){this._targetElement=e;return}this._targetElement=null}trySetTarget(e){this._targetElement=this._locateTargetElement(e)}clickTarget(){var e;(e=this._targetElement)==null||e.labelClickedCallback()}updateTargetLabel(){var a;let e=this._component.innerText.trim();(a=this._targetElement)==null||a.labelChangedCallback(e)}addSlotChangeListener(e){this._slotElement.addEventListener("slotchange",e)}addMutationObserver(e){this._mutationObserver=new MutationObserver(e),this._mutationObserver.observe(this._component,{subtree:!0,characterData:!0,childList:!0}),e([],this._mutationObserver)}removeMutationObserver(){var e;(e=this._mutationObserver)==null||e.disconnect(),this._mutationObserver=void 0}_checkLabelAwareness(e){return C(e)?!0:(console.warn("Label target element is not label aware.",e),!1)}_locateTargetElement(e){let a;if(e)a=this._component.getRootNode().querySelector(`#${e}`);else{let o=n.labelableChildSelectors.join(",");a=this._component.querySelector(o)}return a&&!this._checkLabelAwareness(a)?null:a}};var c=class{constructor(t){this._adapter=t;this._dynamic=!1;this._isConnected=!1;this._clickListener=e=>this._handleClick(e),this._slotChangeListener=()=>this._handleSlotChange(),this._mutationCallback=()=>this._handleMutation()}initialize(){var t;this._adapter.addSlotChangeListener(this._slotChangeListener),this._adapter.trySetTarget((t=this._for)!=null?t:null),this._adapter.hasTargetElement()&&this._connect()}disconnect(){this._disconnect(),this._adapter.destroy()}update(){this._adapter.updateTargetLabel()}_handleClick(t){let e=this._adapter.getTargetElement();t.target===e||e!=null&&e.contains(t.target)||this._adapter.clickTarget()}_handleSlotChange(){!this._for&&!this._forElement&&(this._adapter.trySetTarget(null),this._tryConnect())}_handleMutation(){this._adapter.updateTargetLabel()}_connect(){this._adapter.addHostListener("click",this._clickListener),this._adapter.updateTargetLabel(),this._dynamic&&this._adapter.addMutationObserver(this._mutationCallback),this._isConnected=!0}_disconnect(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeMutationObserver(),this._isConnected=!1}_tryConnect(){this._adapter.hasTargetElement()?this._isConnected||this._connect():this._disconnect()}get for(){return this._for}set for(t){var e,a;this._for!==t&&(this._for=t,this._adapter.toggleHostAttribute(n.attributes.FOR,!!this.for,(e=this.for)!=null?e:void 0),this._adapter.trySetTarget((a=this._for)!=null?a:null),this._tryConnect())}get forElement(){return this._forElement}set forElement(t){var e;this._forElement!==t&&(this._forElement=t,this._adapter.setTargetElement((e=this._forElement)!=null?e:null),this._tryConnect())}get dynamic(){return this._dynamic}set dynamic(t){this._dynamic!==t&&(this._dynamic=t,this._adapter.toggleHostAttribute(n.attributes.DYNAMIC,this._dynamic),this._dynamic?this._adapter.hasTargetElement()&&this._adapter.addMutationObserver(this._mutationCallback):this._adapter.removeMutationObserver())}};var N='<template><span class="forge-label" part="label"><slot></slot></span></template>',O=':host{display:inline-block}:host([hidden]){display:none}.forge-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label-font-weight,400);line-height:var(--forge-typography-label-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-label-text-decoration,inherit);text-decoration:var(--forge-typography-label-text-decoration,inherit);display:contents;cursor:default}',i=class extends f{constructor(){super();u(this,N,O),this._foundation=new c(new d(this))}static get observedAttributes(){return[n.attributes.FOR,n.attributes.DYNAMIC]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,a,o){switch(e){case n.attributes.FOR:this.for=o;break;case n.attributes.DYNAMIC:this.dynamic=m(o);break}}update(){this._foundation.update()}};l([s()],i.prototype,"for",2),l([s()],i.prototype,"forElement",2),l([s()],i.prototype,"dynamic",2),i=l([b({name:n.elementName})],i);function ae(){p(i)}export{C as a,n as b,d as c,c as d,i as e,ae as f};
|
|
7
|
+
//# sourceMappingURL=chunk.3JCHXLPT.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/label/label-aware.ts", "../../src/label/label-constants.ts", "../../src/label/label-adapter.ts", "../../src/label/label-foundation.ts", "../../src/label/label.ts", "../../src/label/index.ts"],
|
|
4
|
+
"sourcesContent": ["export interface ILabelAware {\n labelClickedCallback(): void;\n labelChangedCallback(value: string | null): void;\n}\n\n/**\n * Determines if an object is label aware.\n * @param obj - The object to check.\n * @returns True if the object is label aware, false otherwise.\n */\nexport const isLabelAware = (obj: any): obj is ILabelAware => {\n return typeof obj.labelClickedCallback === 'function' && typeof obj.labelChangedCallback === 'function';\n};\n", "import { BUTTON_CONSTANTS } from '../button';\nimport { CHECKBOX_CONSTANTS } from '../checkbox';\nimport { COMPONENT_NAME_PREFIX } from '../constants';\nimport { ICON_BUTTON_CONSTANTS } from '../icon-button';\nimport { SWITCH_CONSTANTS } from '../switch';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}label`;\n\nconst attributes = {\n FOR: 'for',\n DYNAMIC: 'dynamic'\n};\n\nconst selectors = {\n ROOT: '.forge-label',\n SLOT: 'slot'\n};\n\nconst labelableChildSelectors = [\n CHECKBOX_CONSTANTS.elementName,\n SWITCH_CONSTANTS.elementName,\n BUTTON_CONSTANTS.elementName,\n ICON_BUTTON_CONSTANTS.elementName\n];\n\nexport const LABEL_CONSTANTS = {\n elementName,\n selectors,\n attributes,\n labelableChildSelectors\n};\n", "import { getShadowElement } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core';\nimport { ILabelComponent } from './label';\nimport { ILabelAware, isLabelAware } from './label-aware';\nimport { LABEL_CONSTANTS } from './label-constants';\n\nexport interface ILabelAdapter extends IBaseAdapter {\n destroy(): void;\n hasTargetElement(): boolean;\n getTargetElement(): HTMLElement | null;\n setTargetElement(el: HTMLElement | null): void;\n trySetTarget(value: string | null): void;\n clickTarget(): void;\n updateTargetLabel(): void;\n addSlotChangeListener(callback: EventListener): void;\n addMutationObserver(callback: MutationCallback): void;\n removeMutationObserver(): void;\n}\n\nexport class LabelAdapter extends BaseAdapter<ILabelComponent> implements ILabelAdapter {\n private _slotElement: HTMLElement;\n private _targetElement: ILabelAware & HTMLElement | null = null;\n private _mutationObserver?: MutationObserver;\n\n constructor(component: ILabelComponent) {\n super(component);\n this._slotElement = getShadowElement(component, LABEL_CONSTANTS.selectors.SLOT);\n }\n\n public destroy(): void {\n this._targetElement?.labelChangedCallback(null);\n this._targetElement = null;\n }\n\n public hasTargetElement(): boolean {\n return !!this._targetElement;\n }\n\n public getTargetElement(): HTMLElement | null {\n return this._targetElement;\n }\n\n public setTargetElement(el: HTMLElement | null): void {\n if (el && this._checkLabelAwareness(el)) {\n this._targetElement = el;\n return;\n }\n this._targetElement = null;\n }\n\n public trySetTarget(value: string | null): void {\n this._targetElement = this._locateTargetElement(value);\n }\n\n /**\n * Calls the target's `labelClickedCallback`.\n */\n public clickTarget(): void {\n this._targetElement?.labelClickedCallback();\n }\n\n /**\n * Computes the text content of the label then passes it to the target's `labelChangedCallback`.\n */\n public updateTargetLabel(): void {\n const value = this._component.innerText.trim();\n this._targetElement?.labelChangedCallback(value);\n }\n\n public addSlotChangeListener(callback: EventListener): void {\n this._slotElement.addEventListener('slotchange', callback);\n }\n\n public addMutationObserver(callback: MutationCallback): void {\n this._mutationObserver = new MutationObserver(callback);\n this._mutationObserver.observe(this._component, {\n subtree: true,\n characterData: true,\n childList: true\n });\n\n // Run the callback once to capture the current state of the label\n callback([], this._mutationObserver);\n };\n\n public removeMutationObserver(): void {\n this._mutationObserver?.disconnect();\n this._mutationObserver = undefined;\n }\n\n /**\n * Returns `true` if the provided element is label aware, `false` otherwise. If `false` a warning\n * is logged to the console.\n */\n private _checkLabelAwareness(el: HTMLElement): el is (ILabelAware & HTMLElement) {\n if (!isLabelAware(el)) {\n console.warn('Label target element is not label aware.', el);\n return false;\n }\n return true;\n }\n\n /**\n * Returns a label aware element queried from the provided id or a child element of the\n * component or `null` if none exists.\n */\n private _locateTargetElement(id: string | null): ILabelAware & HTMLElement | null {\n let targetEl: HTMLElement | null;\n\n if (id) {\n const rootNode = this._component.getRootNode() as Document | ShadowRoot;\n targetEl = rootNode.querySelector(`#${id}`);\n } else {\n // Used for nested elements within the label component\n const selector = LABEL_CONSTANTS.labelableChildSelectors.join(',');\n targetEl = this._component.querySelector(selector);\n }\n\n if (targetEl && !this._checkLabelAwareness(targetEl)) {\n return null;\n }\n\n return targetEl;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { ILabelAdapter } from './label-adapter';\nimport { LABEL_CONSTANTS } from './label-constants';\n\nexport interface ILabelFoundation extends ICustomElementFoundation {\n for: string | null | undefined;\n forElement: HTMLElement | null | undefined;\n dynamic: boolean;\n disconnect(): void;\n update(): void;\n}\n\nexport class LabelFoundation implements ILabelFoundation {\n // State\n private _for: string | null | undefined;\n private _forElement: HTMLElement | null | undefined;\n private _dynamic = false;\n private _isConnected = false;\n\n // Listeners\n private readonly _clickListener: EventListener;\n private readonly _slotChangeListener: EventListener;\n private readonly _mutationCallback: MutationCallback;\n\n constructor(private _adapter: ILabelAdapter) {\n this._clickListener = (evt: PointerEvent) => this._handleClick(evt);\n this._slotChangeListener = () => this._handleSlotChange();\n this._mutationCallback = () => this._handleMutation();\n }\n\n public initialize(): void {\n this._adapter.addSlotChangeListener(this._slotChangeListener);\n this._adapter.trySetTarget(this._for ?? null);\n if (this._adapter.hasTargetElement()) {\n this._connect();\n }\n }\n\n public disconnect(): void {\n this._disconnect();\n this._adapter.destroy();\n }\n\n public update(): void {\n this._adapter.updateTargetLabel();\n }\n\n private _handleClick(evt: PointerEvent): void {\n // Prevent duplicate clicks from a nested target element or if the event originates\n // from within the target element\n const targetEl = this._adapter.getTargetElement();\n if (evt.target === targetEl || targetEl?.contains(evt.target as Node)) {\n return;\n }\n this._adapter.clickTarget();\n }\n\n private _handleSlotChange(): void {\n if (!this._for && !this._forElement) {\n this._adapter.trySetTarget(null);\n this._tryConnect();\n }\n }\n\n private _handleMutation(): void {\n this._adapter.updateTargetLabel();\n }\n\n private _connect(): void {\n this._adapter.addHostListener('click', this._clickListener);\n this._adapter.updateTargetLabel();\n if (this._dynamic) {\n this._adapter.addMutationObserver(this._mutationCallback);\n }\n this._isConnected = true;\n }\n\n private _disconnect(): void {\n this._adapter.removeHostListener('click', this._clickListener);\n this._adapter.removeMutationObserver();\n this._isConnected = false;\n }\n\n private _tryConnect(): void {\n if (!this._adapter.hasTargetElement()) {\n this._disconnect();\n } else if (!this._isConnected) {\n this._connect();\n }\n }\n\n public get for(): string | null | undefined {\n return this._for;\n }\n public set for(value: string | null | undefined) {\n if (this._for !== value) {\n this._for = value;\n this._adapter.toggleHostAttribute(LABEL_CONSTANTS.attributes.FOR, !!this.for, this.for ?? undefined);\n this._adapter.trySetTarget(this._for ?? null);\n this._tryConnect();\n }\n }\n\n public get forElement(): HTMLElement | null | undefined {\n return this._forElement;\n }\n public set forElement(value: HTMLElement | null | undefined) {\n if (this._forElement !== value) {\n this._forElement = value;\n this._adapter.setTargetElement(this._forElement ?? null);\n this._tryConnect();\n }\n }\n\n public get dynamic(): boolean {\n return this._dynamic;\n }\n public set dynamic(value: boolean) {\n if (this._dynamic !== value) {\n this._dynamic = value;\n this._adapter.toggleHostAttribute(LABEL_CONSTANTS.attributes.DYNAMIC, this._dynamic);\n\n if (!this._dynamic) {\n this._adapter.removeMutationObserver();\n } else if (this._adapter.hasTargetElement()) {\n this._adapter.addMutationObserver(this._mutationCallback);\n }\n }\n }\n}\n", "import { CustomElement, FoundationProperty, attachShadowTemplate, coerceBoolean } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../core';\nimport { LabelAdapter } from './label-adapter';\nimport { LABEL_CONSTANTS } from './label-constants';\nimport { LabelFoundation } from './label-foundation';\n\nconst template = '<template><span class=\\\"forge-label\\\" part=\\\"label\\\"><slot></slot></span></template>';\nconst style = ':host{display:inline-block}:host([hidden]){display:none}.forge-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label-font-family, var(--forge-typography-font-family, \\\"Roboto\\\", sans-serif));font-size:var(--forge-typography-label-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label-font-weight,400);line-height:var(--forge-typography-label-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-label-text-decoration,inherit);text-decoration:var(--forge-typography-label-text-decoration,inherit);display:contents;cursor:default}';\n\nexport interface ILabelComponent extends IBaseComponent {\n for: string | null | undefined;\n forElement: HTMLElement | null | undefined;\n dynamic: boolean;\n update(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-label': ILabelComponent;\n }\n}\n\n/**\n * @tag forge-label\n * \n * @summary The Forge Label component is used to associate a text label with a compatible Forge\n * component.\n * \n * @property {string | null | undefined} for - The id of the associated element.\n * @property {HTMLElement | null | undefined} forElement - The associated element.\n * @property {boolean} dynamic - Propagates changes in the label's text content to the associated element.\n * \n * @attribute {string} for - The id of the associated form component.\n * @attribute {boolean} dynamic - Propagates changes in the label's text content to the associated element.\n * \n * @method update - Updates the targetted element with the label's current text content.\n * \n * @csspart label - Styles the label's root element.\n */\n@CustomElement({\n name: LABEL_CONSTANTS.elementName\n})\nexport class LabelComponent extends BaseComponent implements ILabelComponent {\n public static get observedAttributes(): string[] {\n return [\n LABEL_CONSTANTS.attributes.FOR,\n LABEL_CONSTANTS.attributes.DYNAMIC\n ];\n }\n\n private _foundation: LabelFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, style);\n this._foundation = new LabelFoundation(new LabelAdapter(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 LABEL_CONSTANTS.attributes.FOR:\n this.for = newValue;\n break;\n case LABEL_CONSTANTS.attributes.DYNAMIC:\n this.dynamic = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public for: string | null | undefined;\n\n @FoundationProperty()\n public forElement: HTMLElement | null | undefined;\n\n @FoundationProperty()\n public dynamic: boolean;\n\n /**\n * Updates the targetted element with the label's current text content.\n */\n public update(): void {\n this._foundation.update();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { LabelComponent } from './label';\n\nexport * from './label-adapter';\nexport * from './label-constants';\nexport * from './label-foundation';\nexport * from './label';\nexport * from './label-aware';\n\nexport function defineLabelComponent(): void {\n defineCustomElement(LabelComponent);\n}\n"],
|
|
5
|
+
"mappings": "4aAUO,IAAMA,EAAgBC,GACpB,OAAOA,EAAI,sBAAyB,YAAc,OAAOA,EAAI,sBAAyB,WCL/F,IAAMC,EAA2C,GAAGC,SAE9CC,EAAa,CACjB,IAAK,MACL,QAAS,SACX,EAEMC,EAAY,CAChB,KAAM,eACN,KAAM,MACR,EAEMC,EAA0B,CAC9BC,EAAmB,YACnBC,EAAiB,YACjBC,EAAiB,YACjBC,EAAsB,WACxB,EAEaC,EAAkB,CAC7B,YAAAT,EACA,UAAAG,EACA,WAAAD,EACA,wBAAAE,CACF,ECXO,IAAMM,EAAN,cAA2BC,CAAsD,CAKtF,YAAYC,EAA4B,CACtC,MAAMA,CAAS,EAJjB,KAAQ,eAAmD,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IAC3BA,EAAgB,WAAW,OAC7B,CACF,CAUO,mBAA0B,CAC/B,KAAK,YAAY,WAAW,CAC9B,CAEO,sBAA6B,CAClC,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKD,EAAgB,WAAW,IAC9B,KAAK,IAAMG,EACX,MACF,KAAKH,EAAgB,WAAW,QAC9B,KAAK,QAAUI,EAAcD,CAAQ,EACrC,KACJ,CACF,CAcO,QAAe,CACpB,KAAK,YAAY,OAAO,CAC1B,CACF,EAdSE,EAAA,CADNC,EAAmB,GAnCTX,EAoCJ,mBAGAU,EAAA,CADNC,EAAmB,GAtCTX,EAuCJ,0BAGAU,EAAA,CADNC,EAAmB,GAzCTX,EA0CJ,uBA1CIA,EAANU,EAAA,CAHNE,EAAc,CACb,KAAMP,EAAgB,WACxB,CAAC,GACYL,GChCN,SAASa,IAA6B,CAC3CC,EAAoBC,CAAc,CACpC",
|
|
6
|
+
"names": ["isLabelAware", "obj", "elementName", "COMPONENT_NAME_PREFIX", "attributes", "selectors", "labelableChildSelectors", "CHECKBOX_CONSTANTS", "SWITCH_CONSTANTS", "BUTTON_CONSTANTS", "ICON_BUTTON_CONSTANTS", "LABEL_CONSTANTS", "LabelAdapter", "BaseAdapter", "component", "getShadowElement", "LABEL_CONSTANTS", "_a", "el", "value", "callback", "isLabelAware", "id", "targetEl", "selector", "LabelFoundation", "_adapter", "evt", "_a", "targetEl", "value", "_b", "LABEL_CONSTANTS", "template", "style", "LabelComponent", "BaseComponent", "attachShadowTemplate", "LabelFoundation", "LabelAdapter", "LABEL_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "defineLabelComponent", "defineCustomElement", "LabelComponent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as t}from"./chunk.RCSBJQ4G.js";import{a as e}from"./chunk.6DXDNQUR.js";var a=class extends t{constructor(){super(...arguments);this._hasCustomValidityError=!1}},o=class extends e(t){};export{a};
|
|
7
|
+
//# sourceMappingURL=chunk.3RMBFRGC.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/core/base/base-nullable-form-component.ts"],
|
|
4
|
+
"sourcesContent": ["import { IBaseFocusableComponent, WithFocusable } from './base-focusable-component';\nimport { BaseFormComponent, IBaseFormComponent } from './base-form-component';\n\nexport interface IBaseNullableFormComponent<T = string> extends IBaseFormComponent<T> {\n required: boolean;\n\n readonly validity: ValidityState;\n readonly validationMessage: string;\n readonly willValidate: boolean;\n\n checkValidity(): boolean;\n reportValidity(): boolean;\n setCustomValidity(error: string): void;\n}\n\nexport abstract class BaseNullableFormComponent<T = string> extends BaseFormComponent<T> {\n public abstract required: boolean;\n\n public abstract get validity(): ValidityState;\n public abstract get validationMessage(): string;\n public abstract get willValidate(): boolean;\n\n // Needed for Safari, see https://bugs.webkit.org/show_bug.cgi?id=261432\n // Replace with this.internals.validity.customError when resolved.\n protected _hasCustomValidityError = false;\n\n public abstract checkValidity(): boolean;\n public abstract reportValidity(): boolean;\n public abstract setCustomValidity(error: string): void;\n}\n\nexport interface IBaseFocusableNullableFormComponent<T = string> extends IBaseFormComponent<T>, IBaseFocusableComponent {}\n\n/**\n * Any form associated Custom HTML element that focus on the host element.\n */\nexport abstract class BaseFocusableNullableFormComponent<T = string> extends WithFocusable(BaseFormComponent)<T> implements IBaseFocusableNullableFormComponent<T> {}\n"],
|
|
5
|
+
"mappings": "gFAeO,IAAeA,EAAf,cAA6DC,CAAqB,CAAlF,kCASL,KAAU,wBAA0B,GAKtC,EAOsBC,EAAf,cAAsEC,EAAcF,CAAiB,CAAuD,CAAC",
|
|
6
|
+
"names": ["BaseNullableFormComponent", "BaseFormComponent", "BaseFocusableNullableFormComponent", "WithFocusable"]
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{q as g,r as u}from"./chunk.FYWPZFLJ.js";import{a as h,d as C,l as T}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{q as g,r as u}from"./chunk.FYWPZFLJ.js";import{a as h,d as C,l as T}from"./chunk.Z7PBGV4K.js";import{a as _}from"./chunk.LS7WRRT2.js";import{a as p}from"./chunk.NVUMRW44.js";import{a as f,b}from"./chunk.IT66AOX7.js";import{a as O,e as d,f as s,k as N}from"./chunk.JAWV5Y5T.js";import{t as I}from"./chunk.K7FPXAFS.js";import{k as l}from"./chunk.J2M2MXP2.js";import{d as i}from"./chunk.M3QDAYD2.js";var E=`${b}open-icon`,A={ICON:"forge-open-icon",ICON_OPEN:"forge-open-icon--open"},x={OPEN:"open",ORIENTATION:"orientation"},S={ORIENTATION_VERTICAL:"vertical",ORIENTATION_HORIZONTAL:"horizontal"},e={elementName:E,classes:A,attributes:x,strings:S};var r=class{constructor(o){this._adapter=o;this._open=!1;this._orientation=e.strings.ORIENTATION_VERTICAL}initialize(){this._adapter.setOrientation(this._orientation),this._adapter.setOpenState(this._open)}get open(){return this._open}set open(o){o=!!o,this._open!==o&&(this._open=o,this._adapter.setOpenState(this._open))}get orientation(){return this._orientation}set orientation(o){this._orientation=o,this._adapter.setOrientation(this._orientation)}};var a=class extends _{constructor(t){super(t);this._openIcon=s(t,`.${e.classes.ICON}`),this._iconElement=s(t,h.elementName)}setOrientation(t){t===e.strings.ORIENTATION_HORIZONTAL?this._iconElement.name="keyboard_arrow_right":this._iconElement.name="keyboard_arrow_down"}setOpenState(t){I(this._openIcon,t,e.classes.ICON_OPEN)}};var w='<template><span class="forge-open-icon" part="root"><forge-icon class="icon" part="icon"></forge-icon></span></template>',v=".forge-open-icon{color:#757575;color:var(--forge-theme-icon-color,#757575)}.forge-open-icon .icon{-webkit-transition:-webkit-transform .4s;transition:-webkit-transform .4s;transition:transform .4s;transition:transform .4s,-webkit-transform .4s}.forge-open-icon.forge-open-icon--open .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host{line-height:.5}:host([hidden]){display:none}",n=class extends N{constructor(){super();C.define([u,g]),d(this,w,v),this._foundation=new r(new a(this))}static get observedAttributes(){return[e.attributes.OPEN,e.attributes.ORIENTATION]}initializedCallback(){this._foundation.initialize()}attributeChangedCallback(t,R,m){switch(t){case e.attributes.OPEN:this.open=l(m);break;case e.attributes.ORIENTATION:this.orientation=m;break}}};i([p()],n.prototype,"open",2),i([p()],n.prototype,"orientation",2),n=i([f({name:e.elementName,dependencies:[T]})],n);function ee(){O(n)}export{e as a,r as b,a as c,n as d,ee as e};
|
|
7
|
+
//# sourceMappingURL=chunk.3UO6S3IK.js.map
|