@tylertech/forge 3.0.0-next.8 → 3.0.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +2080 -487
- package/dist/button/forge-button.css +1 -1
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/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-toggle/button-toggle/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.PPPTT3SM.js → chunk.2VP57RZO.js} +2 -2
- package/dist/esm/chunks/{chunk.PPPTT3SM.js.map → chunk.2VP57RZO.js.map} +2 -2
- package/dist/esm/chunks/{chunk.TXFYS6EU.js → chunk.33EJTOVA.js} +2 -2
- package/dist/esm/chunks/{chunk.OTVT3XM2.js → chunk.3JDFBEF7.js} +2 -2
- package/dist/esm/chunks/chunk.3ME47JIX.js +7 -0
- package/dist/esm/chunks/chunk.3ME47JIX.js.map +7 -0
- package/dist/esm/chunks/{chunk.V6JVHYVW.js → chunk.44UCSD46.js} +2 -2
- package/dist/esm/chunks/{chunk.EUE3OVC7.js → chunk.4WVHON6T.js} +2 -2
- package/dist/esm/chunks/chunk.4WVHON6T.js.map +7 -0
- package/dist/esm/chunks/{chunk.6SBTLXLH.js → chunk.5IQGVS6U.js} +2 -2
- package/dist/esm/chunks/{chunk.6SBTLXLH.js.map → chunk.5IQGVS6U.js.map} +1 -1
- package/dist/esm/chunks/{chunk.7JQHQKXN.js → chunk.6MPXRRMB.js} +2 -2
- package/dist/esm/chunks/{chunk.MXNLCQRB.js → chunk.6VDF54LZ.js} +2 -2
- package/dist/esm/chunks/{chunk.GF2GUVYS.js → chunk.7TGGJGTG.js} +2 -2
- package/dist/esm/chunks/{chunk.GF2GUVYS.js.map → chunk.7TGGJGTG.js.map} +1 -1
- package/dist/esm/chunks/{chunk.4EB5NVCK.js → chunk.AHHNJSZK.js} +2 -2
- package/dist/esm/chunks/chunk.BBKRPL6R.js +7 -0
- package/dist/esm/chunks/chunk.BBKRPL6R.js.map +7 -0
- package/dist/esm/chunks/{chunk.BSTIDYQJ.js → chunk.BBWMSCVG.js} +2 -2
- package/dist/esm/chunks/{chunk.BKCEVPKW.js → chunk.BDCJIRNK.js} +2 -2
- package/dist/esm/chunks/{chunk.IIXLFXHZ.js → chunk.BSVFCJCQ.js} +2 -2
- package/dist/esm/chunks/chunk.CAUWWFF4.js +7 -0
- package/dist/esm/chunks/chunk.CAUWWFF4.js.map +7 -0
- package/dist/esm/chunks/{chunk.SYZB7B4F.js → chunk.CL65KLH7.js} +2 -2
- package/dist/esm/chunks/{chunk.4LVS2EYJ.js → chunk.DFGBVJBE.js} +2 -2
- package/dist/esm/chunks/chunk.DXZ5LVFJ.js +7 -0
- package/dist/esm/chunks/chunk.DXZ5LVFJ.js.map +7 -0
- package/dist/esm/chunks/{chunk.YUAU5IWT.js → chunk.F776DWXU.js} +2 -2
- package/dist/esm/chunks/{chunk.HKJEGD6C.js → chunk.FIBGOPNP.js} +2 -2
- package/dist/esm/chunks/{chunk.HKJEGD6C.js.map → chunk.FIBGOPNP.js.map} +1 -1
- package/dist/esm/chunks/{chunk.CN27IHDN.js → chunk.GEGK55XX.js} +2 -2
- package/dist/esm/chunks/{chunk.CN27IHDN.js.map → chunk.GEGK55XX.js.map} +2 -2
- package/dist/esm/chunks/{chunk.2QFIMTVP.js → chunk.GT3XBPZY.js} +2 -2
- package/dist/esm/chunks/{chunk.5MK5YWCK.js → chunk.HUGRRRQA.js} +2 -2
- package/dist/esm/chunks/{chunk.GJW4WS4I.js → chunk.HXJCTE47.js} +2 -2
- package/dist/esm/chunks/{chunk.RHYRMQS7.js → chunk.IPGZ24EH.js} +2 -2
- package/dist/esm/chunks/{chunk.RHYRMQS7.js.map → chunk.IPGZ24EH.js.map} +1 -1
- package/dist/esm/chunks/chunk.ISC7SZSP.js +7 -0
- package/dist/esm/chunks/chunk.ISC7SZSP.js.map +7 -0
- package/dist/esm/chunks/{chunk.RUSHOL23.js → chunk.JAAJDT5E.js} +2 -2
- package/dist/esm/chunks/{chunk.SIJGKRYS.js → chunk.JCRC2VEI.js} +2 -2
- package/dist/esm/chunks/{chunk.SIJGKRYS.js.map → chunk.JCRC2VEI.js.map} +1 -1
- package/dist/esm/chunks/{chunk.3AF7CJP2.js → chunk.JFKSREWG.js} +2 -2
- package/dist/esm/chunks/{chunk.3AF7CJP2.js.map → chunk.JFKSREWG.js.map} +1 -1
- package/dist/esm/chunks/{chunk.FAANPQES.js → chunk.JL4XB4RI.js} +2 -2
- package/dist/esm/chunks/{chunk.24L5GDD2.js → chunk.JTIPXKV6.js} +2 -2
- package/dist/esm/chunks/{chunk.24L5GDD2.js.map → chunk.JTIPXKV6.js.map} +2 -2
- package/dist/esm/chunks/chunk.KO45GDOA.js +7 -0
- package/dist/esm/chunks/{chunk.2CTK5R37.js.map → chunk.KO45GDOA.js.map} +2 -2
- package/dist/esm/chunks/chunk.KSCUIS5C.js +7 -0
- package/dist/esm/chunks/chunk.KSCUIS5C.js.map +7 -0
- package/dist/esm/chunks/{chunk.2LRDPTHK.js → chunk.M2M47T4L.js} +2 -2
- package/dist/esm/chunks/{chunk.JVW6JGV3.js → chunk.MGWY7YIL.js} +2 -2
- package/dist/esm/chunks/{chunk.JVW6JGV3.js.map → chunk.MGWY7YIL.js.map} +2 -2
- package/dist/esm/chunks/{chunk.3CBVRCKM.js → chunk.MJSLXZBM.js} +2 -2
- package/dist/esm/chunks/{chunk.3CBVRCKM.js.map → chunk.MJSLXZBM.js.map} +1 -1
- package/dist/esm/chunks/{chunk.2YAU7AXH.js → chunk.N7PQ2MUQ.js} +2 -2
- package/dist/esm/chunks/{chunk.2YAU7AXH.js.map → chunk.N7PQ2MUQ.js.map} +1 -1
- package/dist/esm/chunks/{chunk.NDGFQILG.js → chunk.NE4NCRRZ.js} +2 -2
- package/dist/esm/chunks/chunk.NF4J3Q5X.js +7 -0
- package/dist/esm/chunks/chunk.NF4J3Q5X.js.map +7 -0
- package/dist/esm/chunks/chunk.OEYALYRM.js +7 -0
- package/dist/esm/chunks/chunk.OEYALYRM.js.map +7 -0
- package/dist/esm/chunks/{chunk.GHSAKRYH.js → chunk.OKKH7F7M.js} +2 -2
- package/dist/esm/chunks/{chunk.AGMPIMJV.js → chunk.QL45FKVJ.js} +2 -2
- package/dist/esm/chunks/{chunk.AGMPIMJV.js.map → chunk.QL45FKVJ.js.map} +2 -2
- package/dist/esm/chunks/chunk.QU76MOCS.js +12 -0
- package/dist/esm/chunks/chunk.QU76MOCS.js.map +7 -0
- package/dist/esm/chunks/{chunk.5PHLKON3.js → chunk.R5HZFOUK.js} +2 -2
- package/dist/esm/chunks/{chunk.5PHLKON3.js.map → chunk.R5HZFOUK.js.map} +2 -2
- package/dist/esm/chunks/chunk.SAXRW6GB.js +7 -0
- package/dist/esm/chunks/chunk.SAXRW6GB.js.map +7 -0
- package/dist/esm/chunks/{chunk.2IQGDFQS.js → chunk.SEP3L4QL.js} +2 -2
- package/dist/esm/chunks/{chunk.2IQGDFQS.js.map → chunk.SEP3L4QL.js.map} +1 -1
- package/dist/esm/chunks/{chunk.Z5TWWM7I.js → chunk.SN5LPTHH.js} +2 -2
- package/dist/esm/chunks/{chunk.Z5TWWM7I.js.map → chunk.SN5LPTHH.js.map} +1 -1
- package/dist/esm/chunks/{chunk.CNQESSA3.js → chunk.UKFJHDO7.js} +2 -2
- package/dist/esm/chunks/{chunk.IGK3VYZG.js → chunk.VI2GRQO3.js} +2 -2
- package/dist/esm/chunks/{chunk.A5MBSCSQ.js → chunk.VNOJO2PF.js} +2 -2
- package/dist/esm/chunks/chunk.W7PZTNZ4.js +7 -0
- package/dist/esm/chunks/chunk.W7PZTNZ4.js.map +7 -0
- package/dist/esm/chunks/{chunk.2YX7ASSX.js → chunk.WXN4S7CN.js} +2 -2
- package/dist/esm/chunks/{chunk.ER52NFXX.js → chunk.X5BG35YX.js} +2 -2
- package/dist/esm/chunks/{chunk.THPU5KBV.js → chunk.XRESQBNE.js} +2 -2
- package/dist/esm/chunks/{chunk.632OMHHN.js → chunk.YDY2IGBF.js} +2 -2
- package/dist/esm/chunks/{chunk.632OMHHN.js.map → chunk.YDY2IGBF.js.map} +1 -1
- package/dist/esm/chunks/{chunk.QYKO543K.js → chunk.YWCLKUK7.js} +2 -2
- package/dist/esm/chunks/{chunk.QA3NU7EN.js → chunk.Z4J4D5FD.js} +2 -2
- package/dist/esm/chunks/{chunk.QA3NU7EN.js.map → chunk.Z4J4D5FD.js.map} +1 -1
- package/dist/esm/chunks/{chunk.V4RBOYNH.js → chunk.ZTGPXIC2.js} +2 -2
- package/dist/esm/chunks/{chunk.V4RBOYNH.js.map → chunk.ZTGPXIC2.js.map} +1 -1
- package/dist/esm/circular-progress/index.js +1 -1
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/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/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/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/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/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/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/state-layer/index.js +7 -0
- package/dist/esm/state-layer/index.js.map +7 -0
- 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/forge-dark.css +1 -1
- package/dist/forge.css +1 -1
- package/dist/icon-button/forge-icon-button.css +1 -1
- package/dist/table/forge-table.css +1 -1
- package/dist/theme/forge-theme.css +1 -1
- package/esm/app-bar/app-bar.js +1 -1
- package/esm/banner/banner.js +1 -1
- package/esm/bottom-sheet/bottom-sheet.js +1 -1
- package/esm/busy-indicator/busy-indicator.js +1 -1
- package/esm/button/button.d.ts +1 -0
- package/esm/button/button.js +8 -2
- package/esm/button-toggle/button-toggle/button-toggle.js +1 -1
- package/esm/calendar/calendar-menu/calendar-menu.js +1 -1
- package/esm/calendar/calendar.js +1 -1
- package/esm/checkbox/checkbox-adapter.d.ts +1 -0
- package/esm/checkbox/checkbox-adapter.js +9 -2
- package/esm/checkbox/checkbox.js +1 -1
- package/esm/chip-field/chip-field.js +1 -1
- package/esm/chips/chip/chip.js +1 -1
- package/esm/circular-progress/circular-progress.d.ts +3 -3
- package/esm/circular-progress/circular-progress.js +4 -4
- package/esm/color-picker/color-picker.js +1 -1
- package/esm/core/testing/pointer.d.ts +13 -0
- package/esm/core/testing/pointer.js +42 -0
- package/esm/core/utils/utils.d.ts +16 -2
- package/esm/core/utils/utils.js +47 -6
- package/esm/file-picker/file-picker.js +1 -1
- package/esm/focus-indicator/focus-indicator-adapter.d.ts +0 -8
- package/esm/focus-indicator/focus-indicator-adapter.js +2 -22
- package/esm/focus-indicator/focus-indicator-foundation.js +1 -1
- package/esm/focus-indicator/focus-indicator.js +1 -1
- package/esm/icon-button/icon-button.d.ts +1 -0
- package/esm/icon-button/icon-button.js +9 -2
- package/esm/index.d.ts +1 -0
- package/esm/index.js +3 -0
- package/esm/list/list-item/list-item-adapter.d.ts +3 -3
- package/esm/list/list-item/list-item-adapter.js +2 -2
- package/esm/list/list-item/list-item-foundation.d.ts +1 -0
- package/esm/list/list-item/list-item-foundation.js +8 -1
- package/esm/list/list-item/list-item.js +1 -1
- package/esm/paginator/paginator.js +1 -1
- package/esm/profile-card/profile-card.js +1 -1
- package/esm/radio/radio-adapter.d.ts +1 -0
- package/esm/radio/radio-adapter.js +9 -2
- package/esm/select/select/select.js +1 -1
- package/esm/slider/slider-adapter.d.ts +0 -16
- package/esm/slider/slider-adapter.js +11 -71
- package/esm/slider/slider-constants.d.ts +0 -3
- package/esm/slider/slider-constants.js +0 -3
- package/esm/slider/slider-foundation.d.ts +0 -1
- package/esm/slider/slider-foundation.js +0 -6
- package/esm/slider/slider-utils.js +3 -3
- package/esm/slider/slider.d.ts +0 -1
- package/esm/slider/slider.js +5 -6
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/state-layer/index.d.ts +10 -0
- package/esm/state-layer/index.js +14 -0
- package/esm/state-layer/state-layer-adapter.d.ts +41 -0
- package/esm/state-layer/state-layer-adapter.js +101 -0
- package/esm/state-layer/state-layer-constants.d.ts +79 -0
- package/esm/state-layer/state-layer-constants.js +89 -0
- package/esm/state-layer/state-layer-foundation.d.ts +57 -0
- package/esm/state-layer/state-layer-foundation.js +237 -0
- package/esm/state-layer/state-layer-utils.d.ts +26 -0
- package/esm/state-layer/state-layer-utils.js +54 -0
- package/esm/state-layer/state-layer.d.ts +66 -0
- package/esm/state-layer/state-layer.js +96 -0
- package/esm/stepper/step/step.js +1 -1
- package/esm/switch/switch.js +10 -3
- package/esm/tabs/tab/tab-adapter.d.ts +3 -5
- package/esm/tabs/tab/tab-adapter.js +6 -15
- package/esm/tabs/tab/tab-constants.d.ts +0 -1
- package/esm/tabs/tab/tab-constants.js +0 -1
- package/esm/tabs/tab/tab-foundation.d.ts +0 -1
- package/esm/tabs/tab/tab-foundation.js +1 -3
- package/esm/tabs/tab/tab.d.ts +0 -1
- package/esm/tabs/tab/tab.js +5 -6
- package/esm/tabs/tab-bar/tab-bar.d.ts +2 -2
- package/esm/tabs/tab-bar/tab-bar.js +3 -3
- package/esm/text-field/text-field.js +1 -1
- package/esm/toast/toast.js +1 -1
- package/package.json +1 -1
- package/styles/app-bar/_mixins.scss +9 -1
- package/styles/circular-progress/_mixins.scss +3 -10
- package/styles/core/{style-layer → styles}/circular-progress/_core.scss +5 -8
- package/styles/core/styles/focus-indicator/_core.scss +5 -0
- package/styles/core/styles/focus-indicator/_variables.scss +8 -0
- package/styles/core/styles/focus-indicator/index.scss +7 -0
- package/styles/core/{style-layer → styles}/slider/_core.scss +13 -31
- package/styles/core/styles/state-layer/_core.scss +144 -0
- package/styles/core/styles/state-layer/_variables.scss +8 -0
- package/styles/core/{style-layer/tabs/tab → styles/state-layer}/index.scss +0 -4
- package/styles/core/{style-layer → styles}/tabs/tab/_core.scss +36 -40
- package/styles/core/{style-layer → styles}/tabs/tab-bar/_core.scss +2 -2
- package/styles/core/{style-layer → styles}/tabs/tab-bar/_variables.scss +1 -1
- package/styles/core/styles/tabs/tab-bar/index.scss +7 -0
- package/styles/core/styles/tokens/_color-palette.scss +299 -0
- package/styles/core/styles/tokens/circular-progress/_tokens.scss +14 -0
- package/styles/core/styles/tokens/focus-indicator/_tokens.scss +24 -0
- package/styles/core/styles/tokens/index.scss +58 -0
- package/styles/core/styles/tokens/state-layer/_tokens.scss +17 -0
- package/styles/core/styles/tokens/theme/_tokens.scss +185 -0
- package/styles/core/styles/tokens/typography/_tokens.scss +47 -0
- package/styles/core/styles/utils/_elevation.scss +5 -0
- package/styles/focus-indicator/_mixins.scss +4 -13
- package/styles/focus-indicator/_variables.scss +0 -15
- package/styles/linear-progress/_mixins.scss +1 -1
- package/styles/linear-progress/_variables.scss +1 -1
- package/styles/slider/_mixins.scss +8 -1
- package/styles/state-layer/_mixins.scss +23 -0
- package/styles/state-layer/state-layer.scss +20 -0
- package/styles/tabs/tab/_mixins.scss +9 -1
- package/styles/tabs/tab/_variables.scss +2 -0
- package/styles/tabs/tab-bar/_mixins.scss +2 -1
- package/styles/tabs/tab-bar/_variables.scss +2 -2
- package/styles/theme/_theme-dark.scss +5 -3
- package/styles/theme/_theme.scss +3 -36
- package/dist/esm/chunks/chunk.246JM2YT.js +0 -7
- package/dist/esm/chunks/chunk.246JM2YT.js.map +0 -7
- package/dist/esm/chunks/chunk.2CTK5R37.js +0 -7
- package/dist/esm/chunks/chunk.2XFVFZ3P.js +0 -7
- package/dist/esm/chunks/chunk.2XFVFZ3P.js.map +0 -7
- package/dist/esm/chunks/chunk.57XQ4F6F.js +0 -12
- package/dist/esm/chunks/chunk.57XQ4F6F.js.map +0 -7
- package/dist/esm/chunks/chunk.5IVB5L5Z.js +0 -7
- package/dist/esm/chunks/chunk.5IVB5L5Z.js.map +0 -7
- package/dist/esm/chunks/chunk.A5R7KUIP.js +0 -7
- package/dist/esm/chunks/chunk.A5R7KUIP.js.map +0 -7
- package/dist/esm/chunks/chunk.C2LTB7EX.js +0 -7
- package/dist/esm/chunks/chunk.C2LTB7EX.js.map +0 -7
- package/dist/esm/chunks/chunk.EUE3OVC7.js.map +0 -7
- package/dist/esm/chunks/chunk.GUYPITGA.js +0 -7
- package/dist/esm/chunks/chunk.GUYPITGA.js.map +0 -7
- package/dist/esm/chunks/chunk.JQIOVCKI.js +0 -7
- package/dist/esm/chunks/chunk.JQIOVCKI.js.map +0 -7
- package/dist/esm/chunks/chunk.LJYTJ3RV.js +0 -7
- package/dist/esm/chunks/chunk.LJYTJ3RV.js.map +0 -7
- package/dist/esm/chunks/chunk.NVMILGC2.js +0 -7
- package/dist/esm/chunks/chunk.NVMILGC2.js.map +0 -7
- package/esm/slider/slider-handle-ripple.d.ts +0 -18
- package/esm/slider/slider-handle-ripple.js +0 -37
- package/esm/tabs/tab/tab-ripple.d.ts +0 -17
- package/esm/tabs/tab/tab-ripple.js +0 -33
- package/styles/circular-progress/_variables.scss +0 -12
- /package/dist/esm/chunks/{chunk.TXFYS6EU.js.map → chunk.33EJTOVA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OTVT3XM2.js.map → chunk.3JDFBEF7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.V6JVHYVW.js.map → chunk.44UCSD46.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7JQHQKXN.js.map → chunk.6MPXRRMB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MXNLCQRB.js.map → chunk.6VDF54LZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4EB5NVCK.js.map → chunk.AHHNJSZK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BSTIDYQJ.js.map → chunk.BBWMSCVG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BKCEVPKW.js.map → chunk.BDCJIRNK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IIXLFXHZ.js.map → chunk.BSVFCJCQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SYZB7B4F.js.map → chunk.CL65KLH7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4LVS2EYJ.js.map → chunk.DFGBVJBE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YUAU5IWT.js.map → chunk.F776DWXU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2QFIMTVP.js.map → chunk.GT3XBPZY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5MK5YWCK.js.map → chunk.HUGRRRQA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GJW4WS4I.js.map → chunk.HXJCTE47.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RUSHOL23.js.map → chunk.JAAJDT5E.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FAANPQES.js.map → chunk.JL4XB4RI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2LRDPTHK.js.map → chunk.M2M47T4L.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NDGFQILG.js.map → chunk.NE4NCRRZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GHSAKRYH.js.map → chunk.OKKH7F7M.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CNQESSA3.js.map → chunk.UKFJHDO7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IGK3VYZG.js.map → chunk.VI2GRQO3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.A5MBSCSQ.js.map → chunk.VNOJO2PF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2YX7ASSX.js.map → chunk.WXN4S7CN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ER52NFXX.js.map → chunk.X5BG35YX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.THPU5KBV.js.map → chunk.XRESQBNE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QYKO543K.js.map → chunk.YWCLKUK7.js.map} +0 -0
- /package/styles/core/{style-layer → styles}/circular-progress/_animations.scss +0 -0
- /package/styles/core/{style-layer → styles}/circular-progress/_variables.scss +0 -0
- /package/styles/core/{style-layer → styles}/circular-progress/index.scss +0 -0
- /package/styles/core/{style-layer → styles}/core/_config.scss +0 -0
- /package/styles/core/{style-layer → styles}/linear-progress/_animations.scss +0 -0
- /package/styles/core/{style-layer → styles}/linear-progress/_core.scss +0 -0
- /package/styles/core/{style-layer → styles}/linear-progress/_variables.scss +0 -0
- /package/styles/core/{style-layer → styles}/linear-progress/index.scss +0 -0
- /package/styles/core/{style-layer → styles}/slider/_functions.scss +0 -0
- /package/styles/core/{style-layer → styles}/slider/_variables.scss +0 -0
- /package/styles/core/{style-layer → styles}/slider/index.scss +0 -0
- /package/styles/core/{style-layer → styles}/tabs/tab/_variables.scss +0 -0
- /package/styles/core/{style-layer/tabs/tab-bar → styles/tabs/tab}/index.scss +0 -0
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as T}from"./chunk.LEVFMI2Q.js";import{a as h}from"./chunk.NVUMRW44.js";import{a as S}from"./chunk.5V5ABSHI.js";import{a as x,b as M}from"./chunk.DTZFWZPB.js";import{a as L,e as O,f as A}from"./chunk.NK7H3MMM.js";import{b as C,d as k,h as m,x as w}from"./chunk.CFDK4RCW.js";import{b as y,k as E}from"./chunk.J2M2MXP2.js";import{d as u}from"./chunk.M3QDAYD2.js";var v=`${M}calendar-menu`,U={ANIMATION_TYPE:"animation-type",DATA_ANIMATION:"data-animation",DATA_VALUE:"data-value",POPUP_CONTEXT:"forge-popup-context",PREVENT_FOCUS:"prevent-focus"},c={BACKDROP:"forge-calendar-menu__backdrop",CLOSING:"forge-calendar-menu--closing",GRID:"forge-calendar-menu__grid",GRID_ITEM:"forge-calendar-menu__item--grid",GRID_FOUR_COL:"forge-calendar-menu__grid--four-col",GRID_THREE_COL:"forge-calendar-menu__grid--three-col",ITEM:"forge-calendar-menu__item",ITEM_FOCUSED:"forge-calendar-menu__item--focused",ITEM_SELECTED:"forge-calendar-menu__item--selected",LIST:"forge-calendar-menu__list",LIST_ITEM:"forge-calendar-menu__item--list",LIST_WRAPPER:"forge-calendar-menu__list__wrapper",MDC_RIPPLE_UPGRADED_FOCUSED:"mdc-ripple-upgraded--background-focused",OPEN:"forge-calendar-menu--open",REPLACING_VIEW:"forge-calendar-menu--replacing-view",SLIDE_LEFT:"forge-calendar-menu--slide-left",SLIDE_RIGHT:"forge-calendar-menu--slide-right",VIEW:"forge-calendar-menu__view"},I={SCROLL_SPY_BOTTOM:"scroll-spy-bottom",SCROLL_SPY_TOP:"scroll-spy-top"},G={ITEM:"menu-item",ITEM_BUTTON:"menu-item-button",ITEM_CONTENT:"menu-item-content",MENU:"menu"},H={CONTAINER:".forge-calendar-menu",FOCUSED:`.${c.ITEM_FOCUSED}`,GRID:`.${c.GRID}`,ITEM:`.${c.ITEM}`,LIST:`.${c.LIST}`,LIST_WRAPPER:`.${c.LIST_WRAPPER}`,SCROLL_SPY_BOTTOM:`#${I.SCROLL_SPY_BOTTOM}`,SCROLL_SPY_TOP:`#${I.SCROLL_SPY_TOP}`,SELECTED:`.${c.ITEM_SELECTED}`,VIEW:`.${c.VIEW}`},X={FOCUS_CHANGE:`${v}-focus-change`,SELECT:`${v}-select`},z={FOUR_COL:4,LARGE_ITEM_SET:13,LIST_SLICE_SIZE:20,THREE_COL:3},i={elementName:v,attributes:U,classes:c,ids:I,parts:G,selectors:H,events:X,numbers:z};function f(o){let t=document.createElement("div");t.setAttribute("part",i.parts.MENU),t.classList.add(i.classes.VIEW,i.classes.GRID);let e;return o.length>12?(t.classList.add(i.classes.GRID_FOUR_COL),e=F(o)):(t.classList.add(i.classes.GRID_THREE_COL),e=F(o)),e.forEach(r=>t.appendChild(r)),t}function F(o){return o.map(t=>{let e=document.createElement("div");return e.classList.add(i.classes.ITEM,i.classes.GRID_ITEM),e.innerText=t.label,e.setAttribute("role","button"),e.setAttribute("part",i.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute(i.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.add(i.classes.ITEM_SELECTED),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true"),e})}function R(o){let t=document.createElement("div"),e=document.createElement("div");return t.classList.add(i.classes.VIEW,i.classes.LIST_WRAPPER),e.classList.add(i.classes.LIST),e.setAttribute("role","list"),e.appendChild(P(i.ids.SCROLL_SPY_TOP)),_(o).forEach(r=>e.appendChild(r)),e.appendChild(P(i.ids.SCROLL_SPY_BOTTOM)),t.appendChild(e),t}function _(o){return o.map(t=>{let e=document.createElement("div");return e.innerText=t.label,e.classList.add(i.classes.ITEM,i.classes.LIST_ITEM),e.setAttribute("part",i.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute("role","listitem"),e.setAttribute(i.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.toggle(i.classes.ITEM_SELECTED,!0),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true"),e})}function P(o){let t=document.createElement("div");return t.id=o,t.setAttribute("aria-hidden","true"),t}function p(o){for(;o.childNodes.length>1;)o.firstChild&&o.removeChild(o.firstChild)}var g=class extends S{constructor(e){super(e);this.component=e;this._container=A(e,i.selectors.CONTAINER)}registerClickListener(e){this._container.addEventListener("click",e)}unregisterClickListener(e){this._container.removeEventListener("click",e)}registerIntersectionObserver(e){let r=this._container.querySelector(i.selectors.LIST_WRAPPER);if(!r)return;let n={root:r};this._intersectionObserver=new IntersectionObserver(e,n);let a=this._container.querySelector(i.selectors.SCROLL_SPY_BOTTOM),s=this._container.querySelector(i.selectors.SCROLL_SPY_TOP);a&&this._intersectionObserver.observe(a),s&&this._intersectionObserver.observe(s)}unregisterIntersectionObserver(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0)}setAnimationType(e){this._container.setAttribute(i.attributes.DATA_ANIMATION,e)}setClosed(){this._container.classList.remove(i.classes.OPEN),this._container.classList.add(i.classes.CLOSING),m(this._container,i.classes.CLOSING,!0).then(()=>{k(this._container),this.toggleHostAttribute("hidden",!0)})}setOpenAsGrid(e,r,n,a,s){let d=f(e);s&&m(this._container,i.classes.REPLACING_VIEW,!0).then(()=>{p(this._container),this.setFocusAtIndex(r,n,a)}),this._container.appendChild(d),this.toggleHostAttribute("hidden",!1),this._container.classList.add(i.classes.OPEN),s||this.setFocusAtIndex(r,n,a)}setOpenAsList(e,r,n,a,s){let d=R(e);s&&m(this._container,i.classes.REPLACING_VIEW,!0).then(()=>{p(this._container),this.setFocusAtIndex(r,n,a)}),this._container.appendChild(d),this.toggleHostAttribute("hidden",!1),this._container.classList.add(i.classes.OPEN),this._scrollItemIntoView("selected"),s||this.setFocusAtIndex(r,n,a)}appendListItemsToStart(e){let r=this._container.querySelector(i.selectors.LIST_WRAPPER),n=this._container.querySelector(i.selectors.LIST),a=n==null?void 0:n.querySelector(i.selectors.ITEM);if(r&&n&&a){let s=r.scrollTop,d=r.scrollHeight-r.clientHeight;_(e).forEach(D=>{n.insertBefore(D,a)});let N=r.scrollHeight-r.clientHeight;r.scrollTop=s+(N-d)}}appendListItemsToEnd(e){let r=this._container.querySelector(i.selectors.LIST),n=this._container.querySelector(i.selectors.SCROLL_SPY_BOTTOM);r&&n&&_(e).forEach(a=>{r.insertBefore(a,n)})}animateInFromLeft(e,r){m(this._container,i.classes.SLIDE_RIGHT,!0).then(()=>{p(this._container),r&&r()});let n=f(e);this._container.appendChild(n)}animateInFromRight(e,r){m(this._container,i.classes.SLIDE_LEFT,!0).then(()=>{p(this._container),r&&r()});let n=f(e);this._container.appendChild(n)}setFocusAtIndex(e,r,n){var d;let a=this._container.querySelector(i.selectors.FOCUSED);a==null||a.classList.remove(i.classes.ITEM_FOCUSED,i.classes.MDC_RIPPLE_UPGRADED_FOCUSED),a==null||a.setAttribute("tabindex","-1");let s=(d=this._container.querySelectorAll(i.selectors.ITEM))==null?void 0:d[e];s&&(s.classList.add(i.classes.ITEM_FOCUSED),s.setAttribute("tabindex",n?"-1":"0"),r&&!n?s.focus():n&&s.classList.add(i.classes.MDC_RIPPLE_UPGRADED_FOCUSED),this._scrollItemIntoView("focused"))}_scrollItemIntoView(e){let r=this._container.querySelector(i.selectors.LIST),n=r==null?void 0:r.querySelector(e==="selected"?i.selectors.SELECTED:i.selectors.FOCUSED);r&&n&&w(r.parentElement,n,e==="selected"?"auto":"smooth",e==="selected"?"center":"nearest")}};var b=class{constructor(t){this._adapter=t;this._animationType="scale";this._columnCount=3;this._focusedIndex=0;this._list=!1;this._open=!1;this._options=[];this._preventFocus=!1;this._sliceEnd=-1;this._sliceStart=-1;this._clickListener=e=>this._onClick(e),this._intersectionObserverCallback=e=>this._onIntersection(e)}initialize(){this._applyAnimationType(),this._applyPreventFocus(),this._adapter.setHostAttribute("exportparts",Object.values(i.parts).join(", ")),this._adapter.toggleHostAttribute("hidden",!0),this._adapter.registerClickListener(this._clickListener)}disconnect(){this._adapter.unregisterClickListener(this._clickListener),this._adapter.unregisterIntersectionObserver()}openAsGrid(t,e){this._list=!1,this._options=t,this._focusedIndex=0,this._setColumnCount(),this._adapter.setOpenAsGrid(t,this._focusedIndex,e,this._preventFocus,this._open),this._setGridListeners(),this._open=!0,this._emitFocusChangeEvent()}openAsList(t,e){this._list=!0,this._options=t;let r=this._getOptionSliceIncludingSelected();this._focusedIndex=Math.max(t.findIndex(n=>n.selected),this._sliceStart),this._adapter.setOpenAsList(r,this._focusedIndex-this._sliceStart,e,this._preventFocus,this._open),this._setListListeners(),this._open=!0,this._emitFocusChangeEvent()}close(){this._open=!1,this._options=[],this._adapter.setClosed()}animateIn(t,e,r){let n=()=>{this._setFocusFromStoredIndex(r)};e==="left"?this._adapter.animateInFromLeft(t,n):this._adapter.animateInFromRight(t,n),this._options=t,this._setColumnCount()}selectFocusedItem(){var t;this._adapter.emitHostEvent(i.events.SELECT,(t=this._options[this._focusedIndex])==null?void 0:t.value)}moveFocusBackward(){if(this._list)return!0;let t=this._focusedIndex-1,e=t>=0&&t%this._columnCount!==this._columnCount-1;return this._focusedIndexAfterAnimation=e?void 0:t+this._columnCount,this._tryMoveFocus(t,e)}moveFocusDown(){if(this._list){let t=Math.min(this._focusedIndex+=1,this._options.length-1);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex+this._columnCount,e=t<this._options.length;this._focusedIndexAfterAnimation=e?void 0:t%this._columnCount,this._tryMoveFocus(t,e)}}moveFocusForward(){if(this._list)return!0;let t=this._focusedIndex+1,e=t<this._options.length&&t%this._columnCount!==0;return this._focusedIndexAfterAnimation=e?void 0:t-this._columnCount,this._tryMoveFocus(t,e)}moveFocusUp(){if(this._list){let t=Math.max(this._focusedIndex-=1,0);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex-this._columnCount,e=t>=0;this._focusedIndexAfterAnimation=e?void 0:this._options.length+t,this._tryMoveFocus(t,e)}}_tryMoveFocus(t,e){var r;return e&&!((r=this._options[t])!=null&&r.disabled)&&(this._focusedIndex=t,this._adapter.setFocusAtIndex(this._list?this._focusedIndex-this._sliceStart:this._focusedIndex,!0,this._preventFocus),this._emitFocusChangeEvent()),e}_setFocusFromStoredIndex(t){var e,r;this._focusedIndexAfterAnimation!==void 0&&(this._options[this._focusedIndexAfterAnimation]&&!((e=this._options[this._focusedIndexAfterAnimation])!=null&&e.disabled)?this._focusedIndex=this._focusedIndexAfterAnimation:(r=this._options[0])!=null&&r.disabled?this._focusedIndex=this._options.findIndex(n=>!n.disabled):this._focusedIndex=this._options.length-this._options.slice().reverse().findIndex(n=>!n.disabled)-1,this._focusedIndexAfterAnimation=void 0,this._adapter.setFocusAtIndex(this._focusedIndex,t,this._preventFocus),this._emitFocusChangeEvent())}_onClick(t){let e=T(t).find(n=>n.classList&&n.classList.contains(i.classes.ITEM)),r=e==null?void 0:e.getAttribute(i.attributes.DATA_VALUE);y(r)&&this._adapter.emitHostEvent(i.events.SELECT,+r)}_onIntersection(t){this._sliceStart>0&&t.some(e=>e.target.id===i.ids.SCROLL_SPY_TOP&&e.isIntersecting)&&this._adapter.appendListItemsToStart(this._getPreviousOptionsSlice()),this._sliceEnd<this._options.length&&t.some(e=>e.target.id===i.ids.SCROLL_SPY_BOTTOM&&e.isIntersecting)&&this._adapter.appendListItemsToEnd(this._getNextOptionsSlice())}_setColumnCount(){this._columnCount=this._options.length>=i.numbers.LARGE_ITEM_SET?i.numbers.FOUR_COL:i.numbers.THREE_COL}_emitFocusChangeEvent(){var t;this._adapter.emitHostEvent(i.events.FOCUS_CHANGE,(t=this._options[this._focusedIndex])==null?void 0:t.value)}_setGridListeners(){this._adapter.unregisterIntersectionObserver()}_setListListeners(){this._adapter.unregisterIntersectionObserver(),this._adapter.registerIntersectionObserver(this._intersectionObserverCallback)}_getOptionSliceIncludingSelected(){if(this._options.length<=i.numbers.LIST_SLICE_SIZE)return this._sliceStart=0,this._sliceEnd=this._options.length,this._options.slice();let t=Math.max(this._options.findIndex(n=>n.selected),0),e=Math.max(Math.floor(t-i.numbers.LIST_SLICE_SIZE/2),0),r=e+i.numbers.LIST_SLICE_SIZE;return r>this._options.length&&(e=this._options.length-1-i.numbers.LIST_SLICE_SIZE,r=this._options.length),this._sliceStart=e,this._sliceEnd=r,this._options.slice(this._sliceStart,this._sliceEnd)}_getNextOptionsSlice(){let t=Math.min(this._sliceEnd+i.numbers.LIST_SLICE_SIZE,this._options.length),e=this._options.slice(this._sliceEnd,t);return this._sliceEnd=t,e}_getPreviousOptionsSlice(){let t=Math.max(this._sliceStart-i.numbers.LIST_SLICE_SIZE,0),e=this._options.slice(t,this._sliceStart);return this._sliceStart=t,e}_applyAnimationType(){this._adapter.setHostAttribute(i.attributes.ANIMATION_TYPE,this._animationType),this._adapter.setAnimationType(this._animationType)}_applyPreventFocus(){this._adapter.toggleHostAttribute(i.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setFocusAtIndex(this._focusedIndex,!1,this._preventFocus)}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._applyAnimationType())}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._applyPreventFocus())}};var V='<template><div class="forge-calendar-menu" part="root"></div></template>',B='.forge-calendar-menu{background-color:#fff;background-color:var(--mdc-theme-surface,#fff);position:relative;height:100%;width:100%;overflow:hidden}.forge-calendar-menu__view{position:absolute;top:0;left:0;height:100%;width:100%;background-color:inherit}.forge-calendar-menu__grid{max-height:320px;max-height:var(--forge-calendar-menu-max-height,320px);display:grid;gap:16px;justify-items:center;-webkit-box-align:center;align-items:center;padding:8px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-calendar-menu__grid--three-col{grid-template-columns:repeat(3,1fr)}.forge-calendar-menu__grid--four-col{grid-template-columns:repeat(4,1fr)}.forge-calendar-menu__list{position:relative;background-color:inherit}.forge-calendar-menu__list__wrapper{position:relative;height:100%;overflow:auto}.forge-calendar-menu__list__wrapper::-webkit-scrollbar{width:16px;width:var(--forge-scrollbar-width,16px);height:16px;height:var(--forge-scrollbar-height,16px)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-corner{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track:hover{background-color:#ececec;background-color:var(--forge-theme-scrollbar-track-hover,#ececec)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb{background-color:#bdbdbd;background-color:var(--forge-theme-scrollbar-thumb,#bdbdbd);height:32px;height:var(--forge-scrollbar-min-height,32px);width:32px;width:var(--forge-scrollbar-min-width,32px);border-radius:10px;border-radius:var(--forge-scrollbar-border-radius,10px);border-width:3px;border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-clip:content-box}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb:hover{background-color:#9e9e9e;background-color:var(--forge-theme-scrollbar-thumb-hover,#9e9e9e)}.forge-calendar-menu__item--grid{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;width:100%;height:100%;border-radius:4px;overflow:hidden;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar-menu__item--grid:not([disabled]){--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;border:1px solid #e0e0e0;cursor:pointer}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-calendar-menu__item--grid:not([disabled])::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar-menu__item--grid:not([disabled])::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-surface--hover::before,.forge-calendar-menu__item--grid:not([disabled]):hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar-menu__item--grid[disabled]{color:rgba(0,0,0,.12);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected{color:#fff;color:var(--mdc-theme-on-primary,#fff);background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected:hover{opacity:.87}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected.mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected:focus{opacity:.54}.forge-calendar-menu__item--list{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;margin:0 4px;width:calc(100% - 8px);height:48px;border-radius:4px;overflow:hidden;text-align:center;cursor:pointer}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-calendar-menu__item--list::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar-menu__item--list::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar-menu__item--list.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--list.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar-menu__item--list.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar-menu__item--list.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar-menu__item--list.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-calendar-menu__item--list.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-calendar-menu__item--list.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar-menu__item--list.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar-menu__item--list.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar-menu__item--list--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-calendar-menu__item--list--activated::after,.forge-calendar-menu__item--list--activated::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-calendar-menu__item--list--activated.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-calendar-menu__item--list--activated.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-calendar-menu__item--list--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-calendar-menu__item--list--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-calendar-menu__item--list--selected::after,.forge-calendar-menu__item--list--selected::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-calendar-menu__item--list--selected.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-calendar-menu__item--list--selected.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-calendar-menu__item--list--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-calendar-menu__item--list--selected:focus:hover.mdc-ripple-upgraded--background-focused:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.28}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.12}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.16}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{background-color:#000;background-color:var(--mdc-theme-on-surface,#000)}.forge-calendar-menu__item--list--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.24}.forge-calendar-menu__item--list--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.28}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected:hover{opacity:.87}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected.mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--list.forge-calendar-menu__item--selected:focus{opacity:.54}.forge-calendar-menu__item .mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--focused,.forge-calendar-menu__item:focus{outline:0}.forge-calendar-menu--open{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:scale-open;animation-name:scale-open;-webkit-transform-origin:top center;transform-origin:top center}.forge-calendar-menu--open[data-animation=fade]{-webkit-animation-name:fade-in;animation-name:fade-in}.forge-calendar-menu--open[data-animation=none]{-webkit-animation-duration:1ms;animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--open{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--closing{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:scale-closed;animation-name:scale-closed;-webkit-transform-origin:top center;transform-origin:top center}.forge-calendar-menu--closing[data-animation=fade]{-webkit-animation-name:fade-out;animation-name:fade-out}.forge-calendar-menu--closing[data-animation=none]{-webkit-animation-duration:1ms;animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--closing{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-out-to-right;animation-name:slide-out-to-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-in-from-left;animation-name:slide-in-from-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-out-to-left;animation-name:slide-out-to-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-in-from-right;animation-name:slide-in-from-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:fade-out;animation-name:fade-out}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:fade-in;animation-name:fade-in}#scroll-spy-bottom{position:absolute;bottom:0;height:48px;pointer-events:none}#scroll-spy-top{position:absolute;top:0;height:48px;pointer-events:none}@-webkit-keyframes scale-open{from{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scale-open{from{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes scale-closed{from{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}}@keyframes scale-closed{from{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes slide-in-from-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-from-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-from-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-from-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-out-to-left{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slide-out-to-left{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@-webkit-keyframes slide-out-to-right{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slide-out-to-right{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}:host{display:block;position:absolute;top:0;left:0;height:100%;width:100%}:host([hidden]){display:none}:host([forge-popup-context=true]) .forge-calendar-menu{background-color:#fff;background-color:var(--forge-theme-elevated-surface,#fff)}',l=class extends HTMLElement{constructor(){super();O(this,V,B),this._foundation=new b(new g(this))}static get observedAttributes(){return[i.attributes.ANIMATION_TYPE,i.attributes.PREVENT_FOCUS]}connectedCallback(){!this.hasAttribute(i.attributes.POPUP_CONTEXT)&&C(this).some(e=>e.tagName.toLowerCase()==="forge-popup")&&this.setAttribute(i.attributes.POPUP_CONTEXT,"true"),this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,r,n){switch(e){case i.attributes.ANIMATION_TYPE:this.animationType=n;break;case i.attributes.PREVENT_FOCUS:this.preventFocus=E(n);break}}animateIn(e,r,n=!1){this._foundation.animateIn(e,r,n)}close(){this._foundation.close()}moveFocusDown(){this._foundation.moveFocusDown()}moveFocusBackward(){return this._foundation.moveFocusBackward()}moveFocusForward(){return this._foundation.moveFocusForward()}moveFocusUp(){this._foundation.moveFocusUp()}openAsGrid(e,r=!1){this._foundation.openAsGrid(e,r)}openAsList(e,r=!1){this._foundation.openAsList(e,r)}selectFocusedItem(){this._foundation.selectFocusedItem()}};u([h()],l.prototype,"animationType",2),u([h()],l.prototype,"preventFocus",2),l=u([x({name:i.elementName})],l);function Ee(){L(l)}export{i as a,f as b,F as c,R as d,_ as e,P as f,p as g,g as h,b as i,l as j,Ee as k};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as T}from"./chunk.LEVFMI2Q.js";import{a as h}from"./chunk.NVUMRW44.js";import{a as S}from"./chunk.5V5ABSHI.js";import{a as x,b as M}from"./chunk.DTZFWZPB.js";import{a as L,e as O,f as A}from"./chunk.NK7H3MMM.js";import{b as C,d as k,h as m,x as w}from"./chunk.CFDK4RCW.js";import{b as y,k as E}from"./chunk.J2M2MXP2.js";import{d as u}from"./chunk.M3QDAYD2.js";var v=`${M}calendar-menu`,U={ANIMATION_TYPE:"animation-type",DATA_ANIMATION:"data-animation",DATA_VALUE:"data-value",POPUP_CONTEXT:"forge-popup-context",PREVENT_FOCUS:"prevent-focus"},c={BACKDROP:"forge-calendar-menu__backdrop",CLOSING:"forge-calendar-menu--closing",GRID:"forge-calendar-menu__grid",GRID_ITEM:"forge-calendar-menu__item--grid",GRID_FOUR_COL:"forge-calendar-menu__grid--four-col",GRID_THREE_COL:"forge-calendar-menu__grid--three-col",ITEM:"forge-calendar-menu__item",ITEM_FOCUSED:"forge-calendar-menu__item--focused",ITEM_SELECTED:"forge-calendar-menu__item--selected",LIST:"forge-calendar-menu__list",LIST_ITEM:"forge-calendar-menu__item--list",LIST_WRAPPER:"forge-calendar-menu__list__wrapper",MDC_RIPPLE_UPGRADED_FOCUSED:"mdc-ripple-upgraded--background-focused",OPEN:"forge-calendar-menu--open",REPLACING_VIEW:"forge-calendar-menu--replacing-view",SLIDE_LEFT:"forge-calendar-menu--slide-left",SLIDE_RIGHT:"forge-calendar-menu--slide-right",VIEW:"forge-calendar-menu__view"},I={SCROLL_SPY_BOTTOM:"scroll-spy-bottom",SCROLL_SPY_TOP:"scroll-spy-top"},G={ITEM:"menu-item",ITEM_BUTTON:"menu-item-button",ITEM_CONTENT:"menu-item-content",MENU:"menu"},H={CONTAINER:".forge-calendar-menu",FOCUSED:`.${c.ITEM_FOCUSED}`,GRID:`.${c.GRID}`,ITEM:`.${c.ITEM}`,LIST:`.${c.LIST}`,LIST_WRAPPER:`.${c.LIST_WRAPPER}`,SCROLL_SPY_BOTTOM:`#${I.SCROLL_SPY_BOTTOM}`,SCROLL_SPY_TOP:`#${I.SCROLL_SPY_TOP}`,SELECTED:`.${c.ITEM_SELECTED}`,VIEW:`.${c.VIEW}`},X={FOCUS_CHANGE:`${v}-focus-change`,SELECT:`${v}-select`},z={FOUR_COL:4,LARGE_ITEM_SET:13,LIST_SLICE_SIZE:20,THREE_COL:3},i={elementName:v,attributes:U,classes:c,ids:I,parts:G,selectors:H,events:X,numbers:z};function f(o){let t=document.createElement("div");t.setAttribute("part",i.parts.MENU),t.classList.add(i.classes.VIEW,i.classes.GRID);let e;return o.length>12?(t.classList.add(i.classes.GRID_FOUR_COL),e=F(o)):(t.classList.add(i.classes.GRID_THREE_COL),e=F(o)),e.forEach(r=>t.appendChild(r)),t}function F(o){return o.map(t=>{let e=document.createElement("div");return e.classList.add(i.classes.ITEM,i.classes.GRID_ITEM),e.innerText=t.label,e.setAttribute("role","button"),e.setAttribute("part",i.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute(i.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.add(i.classes.ITEM_SELECTED),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true"),e})}function R(o){let t=document.createElement("div"),e=document.createElement("div");return t.classList.add(i.classes.VIEW,i.classes.LIST_WRAPPER),e.classList.add(i.classes.LIST),e.setAttribute("role","list"),e.appendChild(P(i.ids.SCROLL_SPY_TOP)),_(o).forEach(r=>e.appendChild(r)),e.appendChild(P(i.ids.SCROLL_SPY_BOTTOM)),t.appendChild(e),t}function _(o){return o.map(t=>{let e=document.createElement("div");return e.innerText=t.label,e.classList.add(i.classes.ITEM,i.classes.LIST_ITEM),e.setAttribute("part",i.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute("role","listitem"),e.setAttribute(i.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.toggle(i.classes.ITEM_SELECTED,!0),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true"),e})}function P(o){let t=document.createElement("div");return t.id=o,t.setAttribute("aria-hidden","true"),t}function p(o){for(;o.childNodes.length>1;)o.firstChild&&o.removeChild(o.firstChild)}var g=class extends S{constructor(e){super(e);this.component=e;this._container=A(e,i.selectors.CONTAINER)}registerClickListener(e){this._container.addEventListener("click",e)}unregisterClickListener(e){this._container.removeEventListener("click",e)}registerIntersectionObserver(e){let r=this._container.querySelector(i.selectors.LIST_WRAPPER);if(!r)return;let n={root:r};this._intersectionObserver=new IntersectionObserver(e,n);let a=this._container.querySelector(i.selectors.SCROLL_SPY_BOTTOM),s=this._container.querySelector(i.selectors.SCROLL_SPY_TOP);a&&this._intersectionObserver.observe(a),s&&this._intersectionObserver.observe(s)}unregisterIntersectionObserver(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0)}setAnimationType(e){this._container.setAttribute(i.attributes.DATA_ANIMATION,e)}setClosed(){this._container.classList.remove(i.classes.OPEN),this._container.classList.add(i.classes.CLOSING),m(this._container,i.classes.CLOSING,!0).then(()=>{k(this._container),this.toggleHostAttribute("hidden",!0)})}setOpenAsGrid(e,r,n,a,s){let d=f(e);s&&m(this._container,i.classes.REPLACING_VIEW,!0).then(()=>{p(this._container),this.setFocusAtIndex(r,n,a)}),this._container.appendChild(d),this.toggleHostAttribute("hidden",!1),this._container.classList.add(i.classes.OPEN),s||this.setFocusAtIndex(r,n,a)}setOpenAsList(e,r,n,a,s){let d=R(e);s&&m(this._container,i.classes.REPLACING_VIEW,!0).then(()=>{p(this._container),this.setFocusAtIndex(r,n,a)}),this._container.appendChild(d),this.toggleHostAttribute("hidden",!1),this._container.classList.add(i.classes.OPEN),this._scrollItemIntoView("selected"),s||this.setFocusAtIndex(r,n,a)}appendListItemsToStart(e){let r=this._container.querySelector(i.selectors.LIST_WRAPPER),n=this._container.querySelector(i.selectors.LIST),a=n==null?void 0:n.querySelector(i.selectors.ITEM);if(r&&n&&a){let s=r.scrollTop,d=r.scrollHeight-r.clientHeight;_(e).forEach(D=>{n.insertBefore(D,a)});let N=r.scrollHeight-r.clientHeight;r.scrollTop=s+(N-d)}}appendListItemsToEnd(e){let r=this._container.querySelector(i.selectors.LIST),n=this._container.querySelector(i.selectors.SCROLL_SPY_BOTTOM);r&&n&&_(e).forEach(a=>{r.insertBefore(a,n)})}animateInFromLeft(e,r){m(this._container,i.classes.SLIDE_RIGHT,!0).then(()=>{p(this._container),r&&r()});let n=f(e);this._container.appendChild(n)}animateInFromRight(e,r){m(this._container,i.classes.SLIDE_LEFT,!0).then(()=>{p(this._container),r&&r()});let n=f(e);this._container.appendChild(n)}setFocusAtIndex(e,r,n){var d;let a=this._container.querySelector(i.selectors.FOCUSED);a==null||a.classList.remove(i.classes.ITEM_FOCUSED,i.classes.MDC_RIPPLE_UPGRADED_FOCUSED),a==null||a.setAttribute("tabindex","-1");let s=(d=this._container.querySelectorAll(i.selectors.ITEM))==null?void 0:d[e];s&&(s.classList.add(i.classes.ITEM_FOCUSED),s.setAttribute("tabindex",n?"-1":"0"),r&&!n?s.focus():n&&s.classList.add(i.classes.MDC_RIPPLE_UPGRADED_FOCUSED),this._scrollItemIntoView("focused"))}_scrollItemIntoView(e){let r=this._container.querySelector(i.selectors.LIST),n=r==null?void 0:r.querySelector(e==="selected"?i.selectors.SELECTED:i.selectors.FOCUSED);r&&n&&w(r.parentElement,n,e==="selected"?"auto":"smooth",e==="selected"?"center":"nearest")}};var b=class{constructor(t){this._adapter=t;this._animationType="scale";this._columnCount=3;this._focusedIndex=0;this._list=!1;this._open=!1;this._options=[];this._preventFocus=!1;this._sliceEnd=-1;this._sliceStart=-1;this._clickListener=e=>this._onClick(e),this._intersectionObserverCallback=e=>this._onIntersection(e)}initialize(){this._applyAnimationType(),this._applyPreventFocus(),this._adapter.setHostAttribute("exportparts",Object.values(i.parts).join(", ")),this._adapter.toggleHostAttribute("hidden",!0),this._adapter.registerClickListener(this._clickListener)}disconnect(){this._adapter.unregisterClickListener(this._clickListener),this._adapter.unregisterIntersectionObserver()}openAsGrid(t,e){this._list=!1,this._options=t,this._focusedIndex=0,this._setColumnCount(),this._adapter.setOpenAsGrid(t,this._focusedIndex,e,this._preventFocus,this._open),this._setGridListeners(),this._open=!0,this._emitFocusChangeEvent()}openAsList(t,e){this._list=!0,this._options=t;let r=this._getOptionSliceIncludingSelected();this._focusedIndex=Math.max(t.findIndex(n=>n.selected),this._sliceStart),this._adapter.setOpenAsList(r,this._focusedIndex-this._sliceStart,e,this._preventFocus,this._open),this._setListListeners(),this._open=!0,this._emitFocusChangeEvent()}close(){this._open=!1,this._options=[],this._adapter.setClosed()}animateIn(t,e,r){let n=()=>{this._setFocusFromStoredIndex(r)};e==="left"?this._adapter.animateInFromLeft(t,n):this._adapter.animateInFromRight(t,n),this._options=t,this._setColumnCount()}selectFocusedItem(){var t;this._adapter.emitHostEvent(i.events.SELECT,(t=this._options[this._focusedIndex])==null?void 0:t.value)}moveFocusBackward(){if(this._list)return!0;let t=this._focusedIndex-1,e=t>=0&&t%this._columnCount!==this._columnCount-1;return this._focusedIndexAfterAnimation=e?void 0:t+this._columnCount,this._tryMoveFocus(t,e)}moveFocusDown(){if(this._list){let t=Math.min(this._focusedIndex+=1,this._options.length-1);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex+this._columnCount,e=t<this._options.length;this._focusedIndexAfterAnimation=e?void 0:t%this._columnCount,this._tryMoveFocus(t,e)}}moveFocusForward(){if(this._list)return!0;let t=this._focusedIndex+1,e=t<this._options.length&&t%this._columnCount!==0;return this._focusedIndexAfterAnimation=e?void 0:t-this._columnCount,this._tryMoveFocus(t,e)}moveFocusUp(){if(this._list){let t=Math.max(this._focusedIndex-=1,0);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex-this._columnCount,e=t>=0;this._focusedIndexAfterAnimation=e?void 0:this._options.length+t,this._tryMoveFocus(t,e)}}_tryMoveFocus(t,e){var r;return e&&!((r=this._options[t])!=null&&r.disabled)&&(this._focusedIndex=t,this._adapter.setFocusAtIndex(this._list?this._focusedIndex-this._sliceStart:this._focusedIndex,!0,this._preventFocus),this._emitFocusChangeEvent()),e}_setFocusFromStoredIndex(t){var e,r;this._focusedIndexAfterAnimation!==void 0&&(this._options[this._focusedIndexAfterAnimation]&&!((e=this._options[this._focusedIndexAfterAnimation])!=null&&e.disabled)?this._focusedIndex=this._focusedIndexAfterAnimation:(r=this._options[0])!=null&&r.disabled?this._focusedIndex=this._options.findIndex(n=>!n.disabled):this._focusedIndex=this._options.length-this._options.slice().reverse().findIndex(n=>!n.disabled)-1,this._focusedIndexAfterAnimation=void 0,this._adapter.setFocusAtIndex(this._focusedIndex,t,this._preventFocus),this._emitFocusChangeEvent())}_onClick(t){let e=T(t).find(n=>n.classList&&n.classList.contains(i.classes.ITEM)),r=e==null?void 0:e.getAttribute(i.attributes.DATA_VALUE);y(r)&&this._adapter.emitHostEvent(i.events.SELECT,+r)}_onIntersection(t){this._sliceStart>0&&t.some(e=>e.target.id===i.ids.SCROLL_SPY_TOP&&e.isIntersecting)&&this._adapter.appendListItemsToStart(this._getPreviousOptionsSlice()),this._sliceEnd<this._options.length&&t.some(e=>e.target.id===i.ids.SCROLL_SPY_BOTTOM&&e.isIntersecting)&&this._adapter.appendListItemsToEnd(this._getNextOptionsSlice())}_setColumnCount(){this._columnCount=this._options.length>=i.numbers.LARGE_ITEM_SET?i.numbers.FOUR_COL:i.numbers.THREE_COL}_emitFocusChangeEvent(){var t;this._adapter.emitHostEvent(i.events.FOCUS_CHANGE,(t=this._options[this._focusedIndex])==null?void 0:t.value)}_setGridListeners(){this._adapter.unregisterIntersectionObserver()}_setListListeners(){this._adapter.unregisterIntersectionObserver(),this._adapter.registerIntersectionObserver(this._intersectionObserverCallback)}_getOptionSliceIncludingSelected(){if(this._options.length<=i.numbers.LIST_SLICE_SIZE)return this._sliceStart=0,this._sliceEnd=this._options.length,this._options.slice();let t=Math.max(this._options.findIndex(n=>n.selected),0),e=Math.max(Math.floor(t-i.numbers.LIST_SLICE_SIZE/2),0),r=e+i.numbers.LIST_SLICE_SIZE;return r>this._options.length&&(e=this._options.length-1-i.numbers.LIST_SLICE_SIZE,r=this._options.length),this._sliceStart=e,this._sliceEnd=r,this._options.slice(this._sliceStart,this._sliceEnd)}_getNextOptionsSlice(){let t=Math.min(this._sliceEnd+i.numbers.LIST_SLICE_SIZE,this._options.length),e=this._options.slice(this._sliceEnd,t);return this._sliceEnd=t,e}_getPreviousOptionsSlice(){let t=Math.max(this._sliceStart-i.numbers.LIST_SLICE_SIZE,0),e=this._options.slice(t,this._sliceStart);return this._sliceStart=t,e}_applyAnimationType(){this._adapter.setHostAttribute(i.attributes.ANIMATION_TYPE,this._animationType),this._adapter.setAnimationType(this._animationType)}_applyPreventFocus(){this._adapter.toggleHostAttribute(i.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setFocusAtIndex(this._focusedIndex,!1,this._preventFocus)}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._applyAnimationType())}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._applyPreventFocus())}};var V='<template><div class="forge-calendar-menu" part="root"></div></template>',B='.forge-calendar-menu{background-color:#fff;background-color:var(--mdc-theme-surface,#fff);position:relative;height:100%;width:100%;overflow:hidden}.forge-calendar-menu__view{position:absolute;top:0;left:0;height:100%;width:100%;background-color:inherit}.forge-calendar-menu__grid{max-height:320px;max-height:var(--forge-calendar-menu-max-height,320px);display:grid;gap:16px;justify-items:center;-webkit-box-align:center;align-items:center;padding:8px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-calendar-menu__grid--three-col{grid-template-columns:repeat(3,1fr)}.forge-calendar-menu__grid--four-col{grid-template-columns:repeat(4,1fr)}.forge-calendar-menu__list{position:relative;background-color:inherit}.forge-calendar-menu__list__wrapper{position:relative;height:100%;overflow:auto}.forge-calendar-menu__list__wrapper::-webkit-scrollbar{width:16px;width:var(--forge-scrollbar-width,16px);height:16px;height:var(--forge-scrollbar-height,16px)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-corner{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track:hover{background-color:#ececec;background-color:var(--forge-theme-scrollbar-track-hover,#ececec)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb{background-color:#bdbdbd;background-color:var(--forge-theme-scrollbar-thumb,#bdbdbd);height:32px;height:var(--forge-scrollbar-min-height,32px);width:32px;width:var(--forge-scrollbar-min-width,32px);border-radius:10px;border-radius:var(--forge-scrollbar-border-radius,10px);border-width:3px;border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-clip:content-box}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb:hover{background-color:#9e9e9e;background-color:var(--forge-theme-scrollbar-thumb-hover,#9e9e9e)}.forge-calendar-menu__item--grid{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;width:100%;height:100%;border-radius:4px;overflow:hidden;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar-menu__item--grid:not([disabled]){--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;border:1px solid #e0e0e0;cursor:pointer}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-calendar-menu__item--grid:not([disabled])::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar-menu__item--grid:not([disabled])::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-surface--hover::before,.forge-calendar-menu__item--grid:not([disabled]):hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar-menu__item--grid[disabled]{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected{color:#fff;color:var(--mdc-theme-on-primary,#fff);background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee)}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected:hover{opacity:.87}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected.mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected:focus{opacity:.54}.forge-calendar-menu__item--list{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;margin:0 4px;width:calc(100% - 8px);height:48px;border-radius:4px;overflow:hidden;text-align:center;cursor:pointer}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-calendar-menu__item--list::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar-menu__item--list::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar-menu__item--list.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--list.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar-menu__item--list.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar-menu__item--list.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar-menu__item--list.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-calendar-menu__item--list.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-calendar-menu__item--list.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar-menu__item--list.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar-menu__item--list.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar-menu__item--list--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-calendar-menu__item--list--activated::after,.forge-calendar-menu__item--list--activated::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-calendar-menu__item--list--activated.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-calendar-menu__item--list--activated.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-calendar-menu__item--list--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-calendar-menu__item--list--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-calendar-menu__item--list--selected::after,.forge-calendar-menu__item--list--selected::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-calendar-menu__item--list--selected.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-calendar-menu__item--list--selected.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-calendar-menu__item--list--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-calendar-menu__item--list--selected:focus:hover.mdc-ripple-upgraded--background-focused:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.28}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.12}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.16}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{background-color:#000;background-color:var(--mdc-theme-on-surface,#000)}.forge-calendar-menu__item--list--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.24}.forge-calendar-menu__item--list--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.28}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected{background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected:hover{opacity:.87}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected.mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--list.forge-calendar-menu__item--selected:focus{opacity:.54}.forge-calendar-menu__item .mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--focused,.forge-calendar-menu__item:focus{outline:0}.forge-calendar-menu--open{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:scale-open;animation-name:scale-open;-webkit-transform-origin:top center;transform-origin:top center}.forge-calendar-menu--open[data-animation=fade]{-webkit-animation-name:fade-in;animation-name:fade-in}.forge-calendar-menu--open[data-animation=none]{-webkit-animation-duration:1ms;animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--open{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--closing{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:scale-closed;animation-name:scale-closed;-webkit-transform-origin:top center;transform-origin:top center}.forge-calendar-menu--closing[data-animation=fade]{-webkit-animation-name:fade-out;animation-name:fade-out}.forge-calendar-menu--closing[data-animation=none]{-webkit-animation-duration:1ms;animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--closing{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-out-to-right;animation-name:slide-out-to-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-in-from-left;animation-name:slide-in-from-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-out-to-left;animation-name:slide-out-to-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-in-from-right;animation-name:slide-in-from-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:fade-out;animation-name:fade-out}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:fade-in;animation-name:fade-in}#scroll-spy-bottom{position:absolute;bottom:0;height:48px;pointer-events:none}#scroll-spy-top{position:absolute;top:0;height:48px;pointer-events:none}@-webkit-keyframes scale-open{from{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scale-open{from{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes scale-closed{from{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}}@keyframes scale-closed{from{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes slide-in-from-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-from-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-from-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-from-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-out-to-left{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slide-out-to-left{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@-webkit-keyframes slide-out-to-right{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slide-out-to-right{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}:host{display:block;position:absolute;top:0;left:0;height:100%;width:100%}:host([hidden]){display:none}:host([forge-popup-context=true]) .forge-calendar-menu{background-color:#fff;background-color:var(--forge-theme-elevated-surface,#fff)}',l=class extends HTMLElement{constructor(){super();O(this,V,B),this._foundation=new b(new g(this))}static get observedAttributes(){return[i.attributes.ANIMATION_TYPE,i.attributes.PREVENT_FOCUS]}connectedCallback(){!this.hasAttribute(i.attributes.POPUP_CONTEXT)&&C(this).some(e=>e.tagName.toLowerCase()==="forge-popup")&&this.setAttribute(i.attributes.POPUP_CONTEXT,"true"),this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,r,n){switch(e){case i.attributes.ANIMATION_TYPE:this.animationType=n;break;case i.attributes.PREVENT_FOCUS:this.preventFocus=E(n);break}}animateIn(e,r,n=!1){this._foundation.animateIn(e,r,n)}close(){this._foundation.close()}moveFocusDown(){this._foundation.moveFocusDown()}moveFocusBackward(){return this._foundation.moveFocusBackward()}moveFocusForward(){return this._foundation.moveFocusForward()}moveFocusUp(){this._foundation.moveFocusUp()}openAsGrid(e,r=!1){this._foundation.openAsGrid(e,r)}openAsList(e,r=!1){this._foundation.openAsList(e,r)}selectFocusedItem(){this._foundation.selectFocusedItem()}};u([h()],l.prototype,"animationType",2),u([h()],l.prototype,"preventFocus",2),l=u([x({name:i.elementName})],l);function Ee(){L(l)}export{i as a,f as b,F as c,R as d,_ as e,P as f,p as g,g as h,b as i,l as j,Ee as k};
|
|
7
|
+
//# sourceMappingURL=chunk.MJSLXZBM.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/calendar/calendar-menu/calendar-menu-constants.ts", "../../src/calendar/calendar-menu/calendar-menu-utils.ts", "../../src/calendar/calendar-menu/calendar-menu-adapter.ts", "../../src/calendar/calendar-menu/calendar-menu-foundation.ts", "../../src/calendar/calendar-menu/calendar-menu.ts", "../../src/calendar/calendar-menu/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\nimport { IOption } from '../../select';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}calendar-menu`;\n\nconst attributes = {\n ANIMATION_TYPE: 'animation-type',\n DATA_ANIMATION: 'data-animation',\n DATA_VALUE: 'data-value',\n POPUP_CONTEXT: 'forge-popup-context',\n PREVENT_FOCUS: 'prevent-focus'\n};\n\nconst classes = {\n BACKDROP: 'forge-calendar-menu__backdrop',\n CLOSING: 'forge-calendar-menu--closing',\n GRID: 'forge-calendar-menu__grid',\n GRID_ITEM: 'forge-calendar-menu__item--grid',\n GRID_FOUR_COL: 'forge-calendar-menu__grid--four-col',\n GRID_THREE_COL: 'forge-calendar-menu__grid--three-col',\n ITEM: 'forge-calendar-menu__item',\n ITEM_FOCUSED: 'forge-calendar-menu__item--focused',\n ITEM_SELECTED: 'forge-calendar-menu__item--selected',\n LIST: 'forge-calendar-menu__list',\n LIST_ITEM: 'forge-calendar-menu__item--list',\n LIST_WRAPPER: 'forge-calendar-menu__list__wrapper',\n MDC_RIPPLE_UPGRADED_FOCUSED: 'mdc-ripple-upgraded--background-focused',\n OPEN: 'forge-calendar-menu--open',\n REPLACING_VIEW: 'forge-calendar-menu--replacing-view',\n SLIDE_LEFT: 'forge-calendar-menu--slide-left',\n SLIDE_RIGHT: 'forge-calendar-menu--slide-right',\n VIEW: 'forge-calendar-menu__view'\n};\n\nconst ids = {\n SCROLL_SPY_BOTTOM: 'scroll-spy-bottom',\n SCROLL_SPY_TOP: 'scroll-spy-top'\n};\n\nconst parts = {\n ITEM: 'menu-item',\n ITEM_BUTTON: 'menu-item-button',\n ITEM_CONTENT: 'menu-item-content',\n MENU: 'menu'\n};\n\nconst selectors = {\n CONTAINER: '.forge-calendar-menu',\n FOCUSED: `.${classes.ITEM_FOCUSED}`,\n GRID: `.${classes.GRID}`,\n ITEM: `.${classes.ITEM}`,\n LIST: `.${classes.LIST}`,\n LIST_WRAPPER: `.${classes.LIST_WRAPPER}`,\n SCROLL_SPY_BOTTOM: `#${ids.SCROLL_SPY_BOTTOM}`,\n SCROLL_SPY_TOP: `#${ids.SCROLL_SPY_TOP}`,\n SELECTED: `.${classes.ITEM_SELECTED}`,\n VIEW: `.${classes.VIEW}`\n};\n\nconst events = {\n FOCUS_CHANGE: `${elementName}-focus-change`,\n SELECT: `${elementName}-select`\n};\n\nconst numbers = {\n FOUR_COL: 4,\n LARGE_ITEM_SET: 13,\n LIST_SLICE_SIZE: 20,\n THREE_COL: 3\n};\n\nexport const CALENDAR_MENU_CONSTANTS = {\n elementName,\n attributes,\n classes,\n ids,\n parts,\n selectors,\n events,\n numbers\n};\n\nexport interface ICalendarMenuOption extends Omit<IOption, 'value'> {\n selected?: boolean;\n value: number;\n}\n\nexport type CalendarDirection = 'left' | 'right';\nexport type CalendarMenuAnimationType = 'scale' | 'fade' | 'none';\n", "import { CALENDAR_MENU_CONSTANTS, ICalendarMenuOption } from './calendar-menu-constants';\n\nexport function getGrid(options: ICalendarMenuOption[]): HTMLElement {\n const grid = document.createElement('div');\n grid.setAttribute('part', CALENDAR_MENU_CONSTANTS.parts.MENU);\n grid.classList.add(CALENDAR_MENU_CONSTANTS.classes.VIEW, CALENDAR_MENU_CONSTANTS.classes.GRID);\n let gridItems: HTMLElement[];\n if (options.length > 12) {\n grid.classList.add(CALENDAR_MENU_CONSTANTS.classes.GRID_FOUR_COL);\n gridItems = getGridItems(options);\n } else {\n grid.classList.add(CALENDAR_MENU_CONSTANTS.classes.GRID_THREE_COL);\n gridItems = getGridItems(options);\n }\n gridItems.forEach(g => grid.appendChild(g));\n return grid;\n}\n\nexport function getGridItems(options: ICalendarMenuOption[]): HTMLElement[] {\n return options.map(o => {\n const element = document.createElement('div');\n element.classList.add(CALENDAR_MENU_CONSTANTS.classes.ITEM, CALENDAR_MENU_CONSTANTS.classes.GRID_ITEM);\n element.innerText = o.label;\n element.setAttribute('role', 'button');\n element.setAttribute('part', CALENDAR_MENU_CONSTANTS.parts.ITEM);\n element.setAttribute('tabindex', '-1');\n element.setAttribute(CALENDAR_MENU_CONSTANTS.attributes.DATA_VALUE, o.value.toString());\n if (o.selected) {\n element.classList.add(CALENDAR_MENU_CONSTANTS.classes.ITEM_SELECTED);\n element.setAttribute('aria-current', 'true');\n }\n if (o.disabled) {\n element.setAttribute('disabled', 'true');\n }\n return element;\n });\n}\n\nexport function getList(options: ICalendarMenuOption[]): HTMLElement {\n const wrapper = document.createElement('div');\n const list = document.createElement('div');\n wrapper.classList.add(CALENDAR_MENU_CONSTANTS.classes.VIEW, CALENDAR_MENU_CONSTANTS.classes.LIST_WRAPPER);\n list.classList.add(CALENDAR_MENU_CONSTANTS.classes.LIST);\n list.setAttribute('role', 'list');\n list.appendChild(getScrollSpy(CALENDAR_MENU_CONSTANTS.ids.SCROLL_SPY_TOP));\n getListItems(options).forEach(l => list.appendChild(l));\n list.appendChild(getScrollSpy(CALENDAR_MENU_CONSTANTS.ids.SCROLL_SPY_BOTTOM));\n wrapper.appendChild(list);\n return wrapper;\n}\n\nexport function getListItems(options: ICalendarMenuOption[]): HTMLElement[] {\n return options.map(o => {\n const element = document.createElement('div');\n element.innerText = o.label;\n element.classList.add(CALENDAR_MENU_CONSTANTS.classes.ITEM, CALENDAR_MENU_CONSTANTS.classes.LIST_ITEM);\n element.setAttribute('part', CALENDAR_MENU_CONSTANTS.parts.ITEM);\n element.setAttribute('tabindex', '-1');\n element.setAttribute('role', 'listitem');\n element.setAttribute(CALENDAR_MENU_CONSTANTS.attributes.DATA_VALUE, o.value.toString());\n if (o.selected) {\n element.classList.toggle(CALENDAR_MENU_CONSTANTS.classes.ITEM_SELECTED, true);\n element.setAttribute('aria-current', 'true');\n }\n if (o.disabled) {\n element.setAttribute('disabled', 'true');\n }\n return element;\n });\n}\n\nexport function getScrollSpy(id: string): HTMLElement {\n const element = document.createElement('div');\n element.id = id;\n element.setAttribute('aria-hidden', 'true');\n return element;\n}\n\nexport function removeAllExceptLastChild(el: HTMLElement): void {\n while (el.childNodes.length > 1) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n }\n}\n", "import { getShadowElement, playKeyframeAnimation, removeAllChildren, tryScrollIntoView } from '@tylertech/forge-core';\n\nimport { BaseAdapter, IBaseAdapter } from '../../core';\nimport { CalendarMenuAnimationType, CALENDAR_MENU_CONSTANTS, ICalendarMenuOption } from './calendar-menu-constants';\nimport { ICalendarMenuComponent } from './calendar-menu';\nimport { getGrid, getList, getListItems, removeAllExceptLastChild } from './calendar-menu-utils';\n\nexport interface ICalendarMenuAdapter extends IBaseAdapter {\n appendListItemsToEnd(options: ICalendarMenuOption[]): void;\n appendListItemsToStart(options: ICalendarMenuOption[]): void;\n animateInFromLeft(options: ICalendarMenuOption[], callback?: () => void): void;\n animateInFromRight(options: ICalendarMenuOption[], callback?: () => void): void;\n registerClickListener(listener: (evt: Event) => void): void;\n registerIntersectionObserver(callback: IntersectionObserverCallback): void;\n setAnimationType(value: CalendarMenuAnimationType): void;\n setClosed(): void;\n setFocusAtIndex(index: number, setFocus: boolean, preventFocus: boolean): void;\n setOpenAsGrid(options: ICalendarMenuOption[], focusedIndex: number, setFocus: boolean, preventFocus: boolean, replace?: boolean): void;\n setOpenAsList(options: ICalendarMenuOption[], focusedIndex: number, setFocus: boolean, preventFocus: boolean, replace?: boolean): void;\n unregisterClickListener(listener: (evt: Event) => void): void;\n unregisterIntersectionObserver(): void;\n}\n\nexport class CalendarMenuAdapter extends BaseAdapter<ICalendarMenuComponent> implements ICalendarMenuAdapter {\n private _container: HTMLElement;\n private _intersectionObserver: IntersectionObserver | undefined;\n\n constructor(private component: ICalendarMenuComponent) {\n super(component);\n this._container = getShadowElement(component, CALENDAR_MENU_CONSTANTS.selectors.CONTAINER);\n }\n\n public registerClickListener(listener: (evt: Event) => void): void {\n this._container.addEventListener('click', listener);\n }\n\n public unregisterClickListener(listener: (evt: Event) => void): void {\n this._container.removeEventListener('click', listener);\n }\n\n public registerIntersectionObserver(callback: IntersectionObserverCallback): void {\n const root = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST_WRAPPER);\n if (!root) {\n return;\n }\n const options = {\n root\n };\n this._intersectionObserver = new IntersectionObserver(callback, options);\n\n const scrollSpyBottom = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.SCROLL_SPY_BOTTOM);\n const scrollSpyTop = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.SCROLL_SPY_TOP);\n if (scrollSpyBottom) {\n this._intersectionObserver.observe(scrollSpyBottom);\n }\n if (scrollSpyTop) {\n this._intersectionObserver.observe(scrollSpyTop);\n }\n }\n\n public unregisterIntersectionObserver(): void {\n if (this._intersectionObserver) {\n this._intersectionObserver.disconnect();\n this._intersectionObserver = undefined;\n }\n }\n\n public setAnimationType(value: CalendarMenuAnimationType): void {\n this._container.setAttribute(CALENDAR_MENU_CONSTANTS.attributes.DATA_ANIMATION, value);\n }\n\n public setClosed(): void {\n this._container.classList.remove(CALENDAR_MENU_CONSTANTS.classes.OPEN);\n this._container.classList.add(CALENDAR_MENU_CONSTANTS.classes.CLOSING);\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.CLOSING, true).then(() => {\n removeAllChildren(this._container);\n this.toggleHostAttribute('hidden', true);\n });\n }\n\n public setOpenAsGrid(options: ICalendarMenuOption[], focusedIndex: number, setFocus: boolean, preventFocus: boolean, replace?: boolean): void {\n const element = getGrid(options);\n if (replace) {\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.REPLACING_VIEW, true).then(() => {\n removeAllExceptLastChild(this._container);\n this.setFocusAtIndex(focusedIndex, setFocus, preventFocus);\n });\n }\n this._container.appendChild(element);\n this.toggleHostAttribute('hidden', false);\n this._container.classList.add(CALENDAR_MENU_CONSTANTS.classes.OPEN);\n if (!replace) {\n this.setFocusAtIndex(focusedIndex, setFocus, preventFocus);\n }\n }\n\n public setOpenAsList(options: ICalendarMenuOption[], focusedIndex: number, setFocus: boolean, preventFocus: boolean, replace?: boolean): void {\n const element = getList(options);\n if (replace) {\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.REPLACING_VIEW, true).then(() => {\n removeAllExceptLastChild(this._container);\n this.setFocusAtIndex(focusedIndex, setFocus, preventFocus);\n });\n }\n this._container.appendChild(element);\n this.toggleHostAttribute('hidden', false);\n this._container.classList.add(CALENDAR_MENU_CONSTANTS.classes.OPEN);\n this._scrollItemIntoView('selected');\n if (!replace) {\n this.setFocusAtIndex(focusedIndex, setFocus, preventFocus);\n }\n }\n\n public appendListItemsToStart(options: ICalendarMenuOption[]): void {\n const wrapper = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST_WRAPPER);\n const list = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST);\n const firstItem = list?.querySelector(CALENDAR_MENU_CONSTANTS.selectors.ITEM);\n if (wrapper && list && firstItem) {\n const oldScrollTop = wrapper.scrollTop;\n const oldScroll = wrapper.scrollHeight - wrapper.clientHeight;\n\n getListItems(options).forEach(l => {\n list.insertBefore(l, firstItem);\n });\n\n const newScroll = wrapper.scrollHeight - wrapper.clientHeight;\n wrapper.scrollTop = oldScrollTop + (newScroll - oldScroll);\n }\n }\n\n public appendListItemsToEnd(options: ICalendarMenuOption[]): void {\n const list = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST);\n const scrollSpyBottom = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.SCROLL_SPY_BOTTOM);\n if (list && scrollSpyBottom) {\n getListItems(options).forEach(l => {\n list.insertBefore(l, scrollSpyBottom);\n });\n }\n }\n\n public animateInFromLeft(options: ICalendarMenuOption[], callback?: () => void): void {\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.SLIDE_RIGHT, true).then(() => {\n removeAllExceptLastChild(this._container);\n if (callback) {\n callback();\n }\n });\n const element = getGrid(options);\n this._container.appendChild(element);\n }\n\n public animateInFromRight(options: ICalendarMenuOption[], callback?: () => void): void {\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.SLIDE_LEFT, true).then(() => {\n removeAllExceptLastChild(this._container);\n if (callback) {\n callback();\n }\n });\n const element = getGrid(options);\n this._container.appendChild(element);\n }\n\n public setFocusAtIndex(index: number, setFocus: boolean, preventFocus: boolean): void {\n const previouslyFocusedElement = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.FOCUSED);\n previouslyFocusedElement?.classList.remove(CALENDAR_MENU_CONSTANTS.classes.ITEM_FOCUSED, CALENDAR_MENU_CONSTANTS.classes.MDC_RIPPLE_UPGRADED_FOCUSED);\n previouslyFocusedElement?.setAttribute('tabindex', '-1');\n const item = this._container.querySelectorAll(CALENDAR_MENU_CONSTANTS.selectors.ITEM)?.[index];\n if (item) {\n item.classList.add(CALENDAR_MENU_CONSTANTS.classes.ITEM_FOCUSED);\n item.setAttribute('tabindex', preventFocus ? '-1' : '0' );\n if (setFocus && !preventFocus) {\n (item as HTMLElement).focus();\n } else if (preventFocus) {\n item.classList.add(CALENDAR_MENU_CONSTANTS.classes.MDC_RIPPLE_UPGRADED_FOCUSED);\n }\n this._scrollItemIntoView('focused');\n }\n }\n\n private _scrollItemIntoView(type: 'selected' | 'focused'): void {\n const list = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST);\n const item = list?.querySelector(type === 'selected' ? CALENDAR_MENU_CONSTANTS.selectors.SELECTED : CALENDAR_MENU_CONSTANTS.selectors.FOCUSED);\n if (list && item) {\n tryScrollIntoView(list.parentElement as HTMLElement, item as HTMLElement, type === 'selected' ? 'auto' : 'smooth', type === 'selected' ? 'center' : 'nearest');\n }\n }\n\n\n}\n", "import { getEventPath, ICustomElementFoundation, isDefined } from '@tylertech/forge-core';\n\nimport { CalendarDirection, CalendarMenuAnimationType, CALENDAR_MENU_CONSTANTS } from './calendar-menu-constants';\nimport { ICalendarMenuAdapter } from './calendar-menu-adapter';\nimport { ICalendarMenuOption } from './calendar-menu-constants';\n\nexport interface ICalendarMenuFoundation extends ICustomElementFoundation {\n animationType: CalendarMenuAnimationType;\n preventFocus: boolean;\n animateIn(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus: boolean): void;\n close(): void;\n moveFocusBackward(): boolean;\n moveFocusDown(): void;\n moveFocusForward(): boolean;\n moveFocusUp(): void;\n openAsGrid(options: ICalendarMenuOption[], setFocus: boolean): void;\n openAsList(options: ICalendarMenuOption[], setFocus: boolean): void;\n selectFocusedItem(): void;\n}\n\nexport class CalendarMenuFoundation implements ICalendarMenuFoundation {\n private _animationType: CalendarMenuAnimationType = 'scale';\n private _columnCount = 3;\n private _focusedIndex = 0;\n private _focusedIndexAfterAnimation: number | undefined;\n private _list = false; // This will be used to manage focus in a list view\n private _open = false;\n private _options: ICalendarMenuOption[] = [];\n private _preventFocus = false;\n private _sliceEnd = -1;\n private _sliceStart = -1;\n private _clickListener: (evt: Event) => void;\n private _intersectionObserverCallback: IntersectionObserverCallback;\n\n constructor(private _adapter: ICalendarMenuAdapter) {\n this._clickListener = evt => this._onClick(evt);\n this._intersectionObserverCallback = (entries: IntersectionObserverEntry[]) => this._onIntersection(entries);\n }\n\n public initialize(): void {\n this._applyAnimationType();\n this._applyPreventFocus();\n this._adapter.setHostAttribute('exportparts', Object.values(CALENDAR_MENU_CONSTANTS.parts).join(', '));\n this._adapter.toggleHostAttribute('hidden', true);\n this._adapter.registerClickListener(this._clickListener);\n }\n\n public disconnect(): void {\n this._adapter.unregisterClickListener(this._clickListener);\n this._adapter.unregisterIntersectionObserver();\n }\n\n public openAsGrid(options: ICalendarMenuOption[], setFocus: boolean): void {\n this._list = false;\n this._options = options;\n this._focusedIndex = 0;\n this._setColumnCount();\n this._adapter.setOpenAsGrid(options, this._focusedIndex, setFocus, this._preventFocus, this._open);\n this._setGridListeners();\n this._open = true;\n this._emitFocusChangeEvent();\n }\n\n public openAsList(options: ICalendarMenuOption[], setFocus: boolean): void {\n this._list = true;\n this._options = options;\n const currentSlice = this._getOptionSliceIncludingSelected();\n this._focusedIndex = Math.max(options.findIndex(o => o.selected), this._sliceStart);\n this._adapter.setOpenAsList(currentSlice, this._focusedIndex - this._sliceStart, setFocus, this._preventFocus, this._open);\n this._setListListeners();\n this._open = true;\n this._emitFocusChangeEvent();\n }\n\n public close(): void {\n this._open = false;\n this._options = [];\n this._adapter.setClosed();\n }\n\n public animateIn(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus: boolean): void {\n const callback: () => void = () => {\n this._setFocusFromStoredIndex(setFocus);\n };\n if (direction === 'left') {\n this._adapter.animateInFromLeft(options, callback);\n } else {\n this._adapter.animateInFromRight(options, callback);\n }\n this._options = options;\n this._setColumnCount();\n }\n\n public selectFocusedItem(): void {\n this._adapter.emitHostEvent(CALENDAR_MENU_CONSTANTS.events.SELECT, this._options[this._focusedIndex]?.value);\n }\n\n public moveFocusBackward(): boolean {\n if (this._list) {\n return true;\n }\n const index = this._focusedIndex - 1;\n const indexIsInView = index >= 0 && index % this._columnCount !== this._columnCount - 1;\n this._focusedIndexAfterAnimation = indexIsInView ? undefined : index + this._columnCount;\n return this._tryMoveFocus(index, indexIsInView);\n }\n\n public moveFocusDown(): void {\n if (this._list) {\n const index = Math.min(this._focusedIndex += 1, this._options.length - 1);\n this._tryMoveFocus(index, true);\n } else {\n const index = this._focusedIndex + this._columnCount;\n const indexIsInView = index < this._options.length;\n this._focusedIndexAfterAnimation = indexIsInView ? undefined : index % this._columnCount;\n this._tryMoveFocus(index, indexIsInView);\n }\n }\n\n public moveFocusForward(): boolean {\n if (this._list) {\n return true;\n }\n const index = this._focusedIndex + 1;\n const indexIsInView = index < this._options.length && index % this._columnCount !== 0;\n this._focusedIndexAfterAnimation = indexIsInView ? undefined : index - this._columnCount;\n return this._tryMoveFocus(index, indexIsInView);\n }\n\n public moveFocusUp(): void {\n if (this._list) {\n const index = Math.max(this._focusedIndex -= 1, 0);\n this._tryMoveFocus(index, true);\n } else {\n const index = this._focusedIndex - this._columnCount;\n const indexIsInView = index >= 0;\n this._focusedIndexAfterAnimation = indexIsInView ? undefined : this._options.length + index;\n this._tryMoveFocus(index, indexIsInView);\n }\n }\n\n private _tryMoveFocus(index: number, indexIsInView: boolean): boolean {\n if (indexIsInView && !this._options[index]?.disabled) {\n this._focusedIndex = index;\n this._adapter.setFocusAtIndex(this._list ? this._focusedIndex - this._sliceStart : this._focusedIndex, true, this._preventFocus);\n this._emitFocusChangeEvent();\n }\n return indexIsInView;\n }\n\n private _setFocusFromStoredIndex(setFocus: boolean): void {\n if (this._focusedIndexAfterAnimation === undefined) {\n return;\n }\n if (this._options[this._focusedIndexAfterAnimation] && !this._options[this._focusedIndexAfterAnimation]?.disabled) {\n this._focusedIndex = this._focusedIndexAfterAnimation;\n } else if (this._options[0]?.disabled) {\n this._focusedIndex = this._options.findIndex(o => !o.disabled);\n } else {\n this._focusedIndex = this._options.length - this._options.slice().reverse().findIndex(o => !o.disabled) - 1;\n }\n this._focusedIndexAfterAnimation = undefined;\n this._adapter.setFocusAtIndex(this._focusedIndex, setFocus, this._preventFocus);\n this._emitFocusChangeEvent();\n }\n\n private _onClick(evt: Event): void {\n const element = getEventPath(evt).find(p => p.classList && p.classList.contains(CALENDAR_MENU_CONSTANTS.classes.ITEM));\n const value = element?.getAttribute(CALENDAR_MENU_CONSTANTS.attributes.DATA_VALUE);\n if (isDefined(value)) {\n this._adapter.emitHostEvent(CALENDAR_MENU_CONSTANTS.events.SELECT, +(value as string));\n }\n }\n\n private _onIntersection(entries: IntersectionObserverEntry[]): void {\n if (this._sliceStart > 0 && entries.some(e => e.target.id === CALENDAR_MENU_CONSTANTS.ids.SCROLL_SPY_TOP && e.isIntersecting)) {\n this._adapter.appendListItemsToStart(this._getPreviousOptionsSlice());\n }\n if (this._sliceEnd < this._options.length && entries.some(e => e.target.id === CALENDAR_MENU_CONSTANTS.ids.SCROLL_SPY_BOTTOM && e.isIntersecting)) {\n this._adapter.appendListItemsToEnd(this._getNextOptionsSlice());\n }\n }\n\n private _setColumnCount(): void {\n this._columnCount = this._options.length >= CALENDAR_MENU_CONSTANTS.numbers.LARGE_ITEM_SET ? CALENDAR_MENU_CONSTANTS.numbers.FOUR_COL : CALENDAR_MENU_CONSTANTS.numbers.THREE_COL;\n }\n\n private _emitFocusChangeEvent(): void {\n this._adapter.emitHostEvent(CALENDAR_MENU_CONSTANTS.events.FOCUS_CHANGE, this._options[this._focusedIndex]?.value);\n }\n\n private _setGridListeners(): void {\n this._adapter.unregisterIntersectionObserver();\n }\n\n private _setListListeners(): void {\n this._adapter.unregisterIntersectionObserver();\n this._adapter.registerIntersectionObserver(this._intersectionObserverCallback);\n }\n\n private _getOptionSliceIncludingSelected(): ICalendarMenuOption[] {\n if (this._options.length <= CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE) {\n this._sliceStart = 0;\n this._sliceEnd = this._options.length;\n return this._options.slice();\n }\n\n const selectedIndex = Math.max(this._options.findIndex(o => o.selected), 0);\n let start = Math.max(Math.floor(selectedIndex - CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE / 2), 0);\n let end = start + CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE;\n if (end > this._options.length) {\n start = this._options.length - 1 - CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE;\n end = this._options.length;\n }\n this._sliceStart = start;\n this._sliceEnd = end;\n return this._options.slice(this._sliceStart, this._sliceEnd);\n }\n\n private _getNextOptionsSlice(): ICalendarMenuOption[] {\n const newEnd = Math.min(this._sliceEnd + CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE, this._options.length);\n const slice = this._options.slice(this._sliceEnd, newEnd);\n this._sliceEnd = newEnd;\n return slice;\n }\n\n private _getPreviousOptionsSlice(): ICalendarMenuOption[] {\n const newStart = Math.max(this._sliceStart - CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE, 0);\n const slice = this._options.slice(newStart, this._sliceStart);\n this._sliceStart = newStart;\n return slice;\n }\n\n private _applyAnimationType(): void {\n this._adapter.setHostAttribute(CALENDAR_MENU_CONSTANTS.attributes.ANIMATION_TYPE, this._animationType);\n this._adapter.setAnimationType(this._animationType);\n }\n\n private _applyPreventFocus(): void {\n this._adapter.toggleHostAttribute(CALENDAR_MENU_CONSTANTS.attributes.PREVENT_FOCUS, this._preventFocus);\n this._adapter.setFocusAtIndex(this._focusedIndex, false, this._preventFocus);\n }\n\n public get animationType(): CalendarMenuAnimationType {\n return this._animationType;\n }\n public set animationType(value: CalendarMenuAnimationType) {\n if (this._animationType !== value) {\n this._animationType = value;\n this._applyAnimationType();\n }\n }\n\n public get preventFocus(): boolean {\n return this._preventFocus;\n }\n public set preventFocus(value: boolean) {\n if (this._preventFocus !== value) {\n this._preventFocus = value;\n this._applyPreventFocus();\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, ICustomElement, FoundationProperty, coerceBoolean, elementParents } from '@tylertech/forge-core';\n\nimport { CalendarMenuAdapter } from './calendar-menu-adapter';\nimport { CalendarDirection, CalendarMenuAnimationType, CALENDAR_MENU_CONSTANTS, ICalendarMenuOption } from './calendar-menu-constants';\nimport { CalendarMenuFoundation } from './calendar-menu-foundation';\n\nconst template = '<template><div class=\\\"forge-calendar-menu\\\" part=\\\"root\\\"></div></template>';\nconst styles = '.forge-calendar-menu{background-color:#fff;background-color:var(--mdc-theme-surface,#fff);position:relative;height:100%;width:100%;overflow:hidden}.forge-calendar-menu__view{position:absolute;top:0;left:0;height:100%;width:100%;background-color:inherit}.forge-calendar-menu__grid{max-height:320px;max-height:var(--forge-calendar-menu-max-height,320px);display:grid;gap:16px;justify-items:center;-webkit-box-align:center;align-items:center;padding:8px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-calendar-menu__grid--three-col{grid-template-columns:repeat(3,1fr)}.forge-calendar-menu__grid--four-col{grid-template-columns:repeat(4,1fr)}.forge-calendar-menu__list{position:relative;background-color:inherit}.forge-calendar-menu__list__wrapper{position:relative;height:100%;overflow:auto}.forge-calendar-menu__list__wrapper::-webkit-scrollbar{width:16px;width:var(--forge-scrollbar-width,16px);height:16px;height:var(--forge-scrollbar-height,16px)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-corner{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track:hover{background-color:#ececec;background-color:var(--forge-theme-scrollbar-track-hover,#ececec)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb{background-color:#bdbdbd;background-color:var(--forge-theme-scrollbar-thumb,#bdbdbd);height:32px;height:var(--forge-scrollbar-min-height,32px);width:32px;width:var(--forge-scrollbar-min-width,32px);border-radius:10px;border-radius:var(--forge-scrollbar-border-radius,10px);border-width:3px;border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-clip:content-box}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb:hover{background-color:#9e9e9e;background-color:var(--forge-theme-scrollbar-thumb-hover,#9e9e9e)}.forge-calendar-menu__item--grid{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;width:100%;height:100%;border-radius:4px;overflow:hidden;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar-menu__item--grid:not([disabled]){--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;border:1px solid #e0e0e0;cursor:pointer}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-calendar-menu__item--grid:not([disabled])::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar-menu__item--grid:not([disabled])::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-surface--hover::before,.forge-calendar-menu__item--grid:not([disabled]):hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar-menu__item--grid[disabled]{color:rgba(0,0,0,.12);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected{color:#fff;color:var(--mdc-theme-on-primary,#fff);background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected:hover{opacity:.87}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected.mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected:focus{opacity:.54}.forge-calendar-menu__item--list{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;margin:0 4px;width:calc(100% - 8px);height:48px;border-radius:4px;overflow:hidden;text-align:center;cursor:pointer}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-calendar-menu__item--list::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar-menu__item--list::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar-menu__item--list.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--list.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar-menu__item--list.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar-menu__item--list.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar-menu__item--list.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-calendar-menu__item--list.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-calendar-menu__item--list.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar-menu__item--list.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar-menu__item--list.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar-menu__item--list--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-calendar-menu__item--list--activated::after,.forge-calendar-menu__item--list--activated::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-calendar-menu__item--list--activated.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-calendar-menu__item--list--activated.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-calendar-menu__item--list--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-calendar-menu__item--list--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-calendar-menu__item--list--selected::after,.forge-calendar-menu__item--list--selected::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-calendar-menu__item--list--selected.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-calendar-menu__item--list--selected.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-calendar-menu__item--list--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-calendar-menu__item--list--selected:focus:hover.mdc-ripple-upgraded--background-focused:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.28}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.12}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.16}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{background-color:#000;background-color:var(--mdc-theme-on-surface,#000)}.forge-calendar-menu__item--list--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.24}.forge-calendar-menu__item--list--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.28}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected:hover{opacity:.87}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected.mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--list.forge-calendar-menu__item--selected:focus{opacity:.54}.forge-calendar-menu__item .mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--focused,.forge-calendar-menu__item:focus{outline:0}.forge-calendar-menu--open{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:scale-open;animation-name:scale-open;-webkit-transform-origin:top center;transform-origin:top center}.forge-calendar-menu--open[data-animation=fade]{-webkit-animation-name:fade-in;animation-name:fade-in}.forge-calendar-menu--open[data-animation=none]{-webkit-animation-duration:1ms;animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--open{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--closing{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:scale-closed;animation-name:scale-closed;-webkit-transform-origin:top center;transform-origin:top center}.forge-calendar-menu--closing[data-animation=fade]{-webkit-animation-name:fade-out;animation-name:fade-out}.forge-calendar-menu--closing[data-animation=none]{-webkit-animation-duration:1ms;animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--closing{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-out-to-right;animation-name:slide-out-to-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-in-from-left;animation-name:slide-in-from-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-out-to-left;animation-name:slide-out-to-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-in-from-right;animation-name:slide-in-from-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:fade-out;animation-name:fade-out}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:fade-in;animation-name:fade-in}#scroll-spy-bottom{position:absolute;bottom:0;height:48px;pointer-events:none}#scroll-spy-top{position:absolute;top:0;height:48px;pointer-events:none}@-webkit-keyframes scale-open{from{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scale-open{from{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes scale-closed{from{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}}@keyframes scale-closed{from{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes slide-in-from-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-from-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-from-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-from-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-out-to-left{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slide-out-to-left{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@-webkit-keyframes slide-out-to-right{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slide-out-to-right{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}:host{display:block;position:absolute;top:0;left:0;height:100%;width:100%}:host([hidden]){display:none}:host([forge-popup-context=true]) .forge-calendar-menu{background-color:#fff;background-color:var(--forge-theme-elevated-surface,#fff)}';\n\nexport interface ICalendarMenuComponent extends ICustomElement {\n animationType: CalendarMenuAnimationType;\n preventFocus: boolean;\n animateIn(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus?: boolean): void;\n close(): void;\n moveFocusBackward(): boolean;\n moveFocusDown(): void;\n moveFocusForward(): boolean;\n moveFocusUp(): void;\n openAsGrid(options: ICalendarMenuOption[], setFocus?: boolean): void;\n openAsList(options: ICalendarMenuOption[], setFocus?: boolean): void;\n selectFocusedItem(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-calendar-menu': ICalendarMenuComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-calendar-menu-focus-change': CustomEvent<number>;\n 'forge-calendar-menu-select': CustomEvent<number>;\n }\n}\n\n/**\n * The web component class behind the `<forge-calendar-menu>` custom element.\n * \n * @internal\n * @tag forge-calendar-menu\n */\n@CustomElement({\n name: CALENDAR_MENU_CONSTANTS.elementName\n})\nexport class CalendarMenuComponent extends HTMLElement implements ICalendarMenuComponent {\n public static get observedAttributes(): string[] {\n return [\n CALENDAR_MENU_CONSTANTS.attributes.ANIMATION_TYPE,\n CALENDAR_MENU_CONSTANTS.attributes.PREVENT_FOCUS\n ];\n }\n\n private _foundation: CalendarMenuFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new CalendarMenuFoundation(new CalendarMenuAdapter(this));\n }\n\n public connectedCallback(): void {\n // To simulate the :host-context() selector for Firefox until they implement it, we need to determine if the\n // calendar is within a popup for auto-styling the calendar when included within a popup. Check to see if\n // any of the parents of this element are a popup.\n if (!this.hasAttribute(CALENDAR_MENU_CONSTANTS.attributes.POPUP_CONTEXT) && elementParents(this).some(el => el.tagName.toLowerCase() === 'forge-popup')) {\n this.setAttribute(CALENDAR_MENU_CONSTANTS.attributes.POPUP_CONTEXT, 'true');\n }\n\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case CALENDAR_MENU_CONSTANTS.attributes.ANIMATION_TYPE:\n this.animationType = newValue as CalendarMenuAnimationType;\n break;\n case CALENDAR_MENU_CONSTANTS.attributes.PREVENT_FOCUS:\n this.preventFocus = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare animationType: CalendarMenuAnimationType;\n\n @FoundationProperty()\n public declare preventFocus: boolean;\n\n public animateIn(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus = false): void {\n this._foundation.animateIn(options, direction, setFocus);\n }\n\n public close(): void {\n this._foundation.close();\n }\n\n public moveFocusDown(): void {\n this._foundation.moveFocusDown();\n }\n\n public moveFocusBackward(): boolean {\n return this._foundation.moveFocusBackward();\n }\n\n public moveFocusForward(): boolean {\n return this._foundation.moveFocusForward();\n }\n\n public moveFocusUp(): void {\n this._foundation.moveFocusUp();\n }\n\n public openAsGrid(options: ICalendarMenuOption[], setFocus = false): void {\n this._foundation.openAsGrid(options, setFocus);\n }\n\n public openAsList(options: ICalendarMenuOption[], setFocus = false): void {\n this._foundation.openAsList(options, setFocus);\n }\n\n public selectFocusedItem(): void {\n this._foundation.selectFocusedItem();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { CalendarMenuComponent } from './calendar-menu';\n\nexport * from './calendar-menu-adapter';\nexport * from './calendar-menu-constants';\nexport * from './calendar-menu-foundation';\nexport * from './calendar-menu-utils';\nexport * from './calendar-menu';\n\nexport function defineCalendarMenuComponent(): void {\n defineCustomElement(CalendarMenuComponent);\n}\n"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\nimport { IOption } from '../../select';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}calendar-menu`;\n\nconst attributes = {\n ANIMATION_TYPE: 'animation-type',\n DATA_ANIMATION: 'data-animation',\n DATA_VALUE: 'data-value',\n POPUP_CONTEXT: 'forge-popup-context',\n PREVENT_FOCUS: 'prevent-focus'\n};\n\nconst classes = {\n BACKDROP: 'forge-calendar-menu__backdrop',\n CLOSING: 'forge-calendar-menu--closing',\n GRID: 'forge-calendar-menu__grid',\n GRID_ITEM: 'forge-calendar-menu__item--grid',\n GRID_FOUR_COL: 'forge-calendar-menu__grid--four-col',\n GRID_THREE_COL: 'forge-calendar-menu__grid--three-col',\n ITEM: 'forge-calendar-menu__item',\n ITEM_FOCUSED: 'forge-calendar-menu__item--focused',\n ITEM_SELECTED: 'forge-calendar-menu__item--selected',\n LIST: 'forge-calendar-menu__list',\n LIST_ITEM: 'forge-calendar-menu__item--list',\n LIST_WRAPPER: 'forge-calendar-menu__list__wrapper',\n MDC_RIPPLE_UPGRADED_FOCUSED: 'mdc-ripple-upgraded--background-focused',\n OPEN: 'forge-calendar-menu--open',\n REPLACING_VIEW: 'forge-calendar-menu--replacing-view',\n SLIDE_LEFT: 'forge-calendar-menu--slide-left',\n SLIDE_RIGHT: 'forge-calendar-menu--slide-right',\n VIEW: 'forge-calendar-menu__view'\n};\n\nconst ids = {\n SCROLL_SPY_BOTTOM: 'scroll-spy-bottom',\n SCROLL_SPY_TOP: 'scroll-spy-top'\n};\n\nconst parts = {\n ITEM: 'menu-item',\n ITEM_BUTTON: 'menu-item-button',\n ITEM_CONTENT: 'menu-item-content',\n MENU: 'menu'\n};\n\nconst selectors = {\n CONTAINER: '.forge-calendar-menu',\n FOCUSED: `.${classes.ITEM_FOCUSED}`,\n GRID: `.${classes.GRID}`,\n ITEM: `.${classes.ITEM}`,\n LIST: `.${classes.LIST}`,\n LIST_WRAPPER: `.${classes.LIST_WRAPPER}`,\n SCROLL_SPY_BOTTOM: `#${ids.SCROLL_SPY_BOTTOM}`,\n SCROLL_SPY_TOP: `#${ids.SCROLL_SPY_TOP}`,\n SELECTED: `.${classes.ITEM_SELECTED}`,\n VIEW: `.${classes.VIEW}`\n};\n\nconst events = {\n FOCUS_CHANGE: `${elementName}-focus-change`,\n SELECT: `${elementName}-select`\n};\n\nconst numbers = {\n FOUR_COL: 4,\n LARGE_ITEM_SET: 13,\n LIST_SLICE_SIZE: 20,\n THREE_COL: 3\n};\n\nexport const CALENDAR_MENU_CONSTANTS = {\n elementName,\n attributes,\n classes,\n ids,\n parts,\n selectors,\n events,\n numbers\n};\n\nexport interface ICalendarMenuOption extends Omit<IOption, 'value'> {\n selected?: boolean;\n value: number;\n}\n\nexport type CalendarDirection = 'left' | 'right';\nexport type CalendarMenuAnimationType = 'scale' | 'fade' | 'none';\n", "import { CALENDAR_MENU_CONSTANTS, ICalendarMenuOption } from './calendar-menu-constants';\n\nexport function getGrid(options: ICalendarMenuOption[]): HTMLElement {\n const grid = document.createElement('div');\n grid.setAttribute('part', CALENDAR_MENU_CONSTANTS.parts.MENU);\n grid.classList.add(CALENDAR_MENU_CONSTANTS.classes.VIEW, CALENDAR_MENU_CONSTANTS.classes.GRID);\n let gridItems: HTMLElement[];\n if (options.length > 12) {\n grid.classList.add(CALENDAR_MENU_CONSTANTS.classes.GRID_FOUR_COL);\n gridItems = getGridItems(options);\n } else {\n grid.classList.add(CALENDAR_MENU_CONSTANTS.classes.GRID_THREE_COL);\n gridItems = getGridItems(options);\n }\n gridItems.forEach(g => grid.appendChild(g));\n return grid;\n}\n\nexport function getGridItems(options: ICalendarMenuOption[]): HTMLElement[] {\n return options.map(o => {\n const element = document.createElement('div');\n element.classList.add(CALENDAR_MENU_CONSTANTS.classes.ITEM, CALENDAR_MENU_CONSTANTS.classes.GRID_ITEM);\n element.innerText = o.label;\n element.setAttribute('role', 'button');\n element.setAttribute('part', CALENDAR_MENU_CONSTANTS.parts.ITEM);\n element.setAttribute('tabindex', '-1');\n element.setAttribute(CALENDAR_MENU_CONSTANTS.attributes.DATA_VALUE, o.value.toString());\n if (o.selected) {\n element.classList.add(CALENDAR_MENU_CONSTANTS.classes.ITEM_SELECTED);\n element.setAttribute('aria-current', 'true');\n }\n if (o.disabled) {\n element.setAttribute('disabled', 'true');\n }\n return element;\n });\n}\n\nexport function getList(options: ICalendarMenuOption[]): HTMLElement {\n const wrapper = document.createElement('div');\n const list = document.createElement('div');\n wrapper.classList.add(CALENDAR_MENU_CONSTANTS.classes.VIEW, CALENDAR_MENU_CONSTANTS.classes.LIST_WRAPPER);\n list.classList.add(CALENDAR_MENU_CONSTANTS.classes.LIST);\n list.setAttribute('role', 'list');\n list.appendChild(getScrollSpy(CALENDAR_MENU_CONSTANTS.ids.SCROLL_SPY_TOP));\n getListItems(options).forEach(l => list.appendChild(l));\n list.appendChild(getScrollSpy(CALENDAR_MENU_CONSTANTS.ids.SCROLL_SPY_BOTTOM));\n wrapper.appendChild(list);\n return wrapper;\n}\n\nexport function getListItems(options: ICalendarMenuOption[]): HTMLElement[] {\n return options.map(o => {\n const element = document.createElement('div');\n element.innerText = o.label;\n element.classList.add(CALENDAR_MENU_CONSTANTS.classes.ITEM, CALENDAR_MENU_CONSTANTS.classes.LIST_ITEM);\n element.setAttribute('part', CALENDAR_MENU_CONSTANTS.parts.ITEM);\n element.setAttribute('tabindex', '-1');\n element.setAttribute('role', 'listitem');\n element.setAttribute(CALENDAR_MENU_CONSTANTS.attributes.DATA_VALUE, o.value.toString());\n if (o.selected) {\n element.classList.toggle(CALENDAR_MENU_CONSTANTS.classes.ITEM_SELECTED, true);\n element.setAttribute('aria-current', 'true');\n }\n if (o.disabled) {\n element.setAttribute('disabled', 'true');\n }\n return element;\n });\n}\n\nexport function getScrollSpy(id: string): HTMLElement {\n const element = document.createElement('div');\n element.id = id;\n element.setAttribute('aria-hidden', 'true');\n return element;\n}\n\nexport function removeAllExceptLastChild(el: HTMLElement): void {\n while (el.childNodes.length > 1) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n }\n}\n", "import { getShadowElement, playKeyframeAnimation, removeAllChildren, tryScrollIntoView } from '@tylertech/forge-core';\n\nimport { BaseAdapter, IBaseAdapter } from '../../core';\nimport { CalendarMenuAnimationType, CALENDAR_MENU_CONSTANTS, ICalendarMenuOption } from './calendar-menu-constants';\nimport { ICalendarMenuComponent } from './calendar-menu';\nimport { getGrid, getList, getListItems, removeAllExceptLastChild } from './calendar-menu-utils';\n\nexport interface ICalendarMenuAdapter extends IBaseAdapter {\n appendListItemsToEnd(options: ICalendarMenuOption[]): void;\n appendListItemsToStart(options: ICalendarMenuOption[]): void;\n animateInFromLeft(options: ICalendarMenuOption[], callback?: () => void): void;\n animateInFromRight(options: ICalendarMenuOption[], callback?: () => void): void;\n registerClickListener(listener: (evt: Event) => void): void;\n registerIntersectionObserver(callback: IntersectionObserverCallback): void;\n setAnimationType(value: CalendarMenuAnimationType): void;\n setClosed(): void;\n setFocusAtIndex(index: number, setFocus: boolean, preventFocus: boolean): void;\n setOpenAsGrid(options: ICalendarMenuOption[], focusedIndex: number, setFocus: boolean, preventFocus: boolean, replace?: boolean): void;\n setOpenAsList(options: ICalendarMenuOption[], focusedIndex: number, setFocus: boolean, preventFocus: boolean, replace?: boolean): void;\n unregisterClickListener(listener: (evt: Event) => void): void;\n unregisterIntersectionObserver(): void;\n}\n\nexport class CalendarMenuAdapter extends BaseAdapter<ICalendarMenuComponent> implements ICalendarMenuAdapter {\n private _container: HTMLElement;\n private _intersectionObserver: IntersectionObserver | undefined;\n\n constructor(private component: ICalendarMenuComponent) {\n super(component);\n this._container = getShadowElement(component, CALENDAR_MENU_CONSTANTS.selectors.CONTAINER);\n }\n\n public registerClickListener(listener: (evt: Event) => void): void {\n this._container.addEventListener('click', listener);\n }\n\n public unregisterClickListener(listener: (evt: Event) => void): void {\n this._container.removeEventListener('click', listener);\n }\n\n public registerIntersectionObserver(callback: IntersectionObserverCallback): void {\n const root = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST_WRAPPER);\n if (!root) {\n return;\n }\n const options = {\n root\n };\n this._intersectionObserver = new IntersectionObserver(callback, options);\n\n const scrollSpyBottom = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.SCROLL_SPY_BOTTOM);\n const scrollSpyTop = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.SCROLL_SPY_TOP);\n if (scrollSpyBottom) {\n this._intersectionObserver.observe(scrollSpyBottom);\n }\n if (scrollSpyTop) {\n this._intersectionObserver.observe(scrollSpyTop);\n }\n }\n\n public unregisterIntersectionObserver(): void {\n if (this._intersectionObserver) {\n this._intersectionObserver.disconnect();\n this._intersectionObserver = undefined;\n }\n }\n\n public setAnimationType(value: CalendarMenuAnimationType): void {\n this._container.setAttribute(CALENDAR_MENU_CONSTANTS.attributes.DATA_ANIMATION, value);\n }\n\n public setClosed(): void {\n this._container.classList.remove(CALENDAR_MENU_CONSTANTS.classes.OPEN);\n this._container.classList.add(CALENDAR_MENU_CONSTANTS.classes.CLOSING);\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.CLOSING, true).then(() => {\n removeAllChildren(this._container);\n this.toggleHostAttribute('hidden', true);\n });\n }\n\n public setOpenAsGrid(options: ICalendarMenuOption[], focusedIndex: number, setFocus: boolean, preventFocus: boolean, replace?: boolean): void {\n const element = getGrid(options);\n if (replace) {\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.REPLACING_VIEW, true).then(() => {\n removeAllExceptLastChild(this._container);\n this.setFocusAtIndex(focusedIndex, setFocus, preventFocus);\n });\n }\n this._container.appendChild(element);\n this.toggleHostAttribute('hidden', false);\n this._container.classList.add(CALENDAR_MENU_CONSTANTS.classes.OPEN);\n if (!replace) {\n this.setFocusAtIndex(focusedIndex, setFocus, preventFocus);\n }\n }\n\n public setOpenAsList(options: ICalendarMenuOption[], focusedIndex: number, setFocus: boolean, preventFocus: boolean, replace?: boolean): void {\n const element = getList(options);\n if (replace) {\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.REPLACING_VIEW, true).then(() => {\n removeAllExceptLastChild(this._container);\n this.setFocusAtIndex(focusedIndex, setFocus, preventFocus);\n });\n }\n this._container.appendChild(element);\n this.toggleHostAttribute('hidden', false);\n this._container.classList.add(CALENDAR_MENU_CONSTANTS.classes.OPEN);\n this._scrollItemIntoView('selected');\n if (!replace) {\n this.setFocusAtIndex(focusedIndex, setFocus, preventFocus);\n }\n }\n\n public appendListItemsToStart(options: ICalendarMenuOption[]): void {\n const wrapper = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST_WRAPPER);\n const list = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST);\n const firstItem = list?.querySelector(CALENDAR_MENU_CONSTANTS.selectors.ITEM);\n if (wrapper && list && firstItem) {\n const oldScrollTop = wrapper.scrollTop;\n const oldScroll = wrapper.scrollHeight - wrapper.clientHeight;\n\n getListItems(options).forEach(l => {\n list.insertBefore(l, firstItem);\n });\n\n const newScroll = wrapper.scrollHeight - wrapper.clientHeight;\n wrapper.scrollTop = oldScrollTop + (newScroll - oldScroll);\n }\n }\n\n public appendListItemsToEnd(options: ICalendarMenuOption[]): void {\n const list = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST);\n const scrollSpyBottom = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.SCROLL_SPY_BOTTOM);\n if (list && scrollSpyBottom) {\n getListItems(options).forEach(l => {\n list.insertBefore(l, scrollSpyBottom);\n });\n }\n }\n\n public animateInFromLeft(options: ICalendarMenuOption[], callback?: () => void): void {\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.SLIDE_RIGHT, true).then(() => {\n removeAllExceptLastChild(this._container);\n if (callback) {\n callback();\n }\n });\n const element = getGrid(options);\n this._container.appendChild(element);\n }\n\n public animateInFromRight(options: ICalendarMenuOption[], callback?: () => void): void {\n playKeyframeAnimation(this._container, CALENDAR_MENU_CONSTANTS.classes.SLIDE_LEFT, true).then(() => {\n removeAllExceptLastChild(this._container);\n if (callback) {\n callback();\n }\n });\n const element = getGrid(options);\n this._container.appendChild(element);\n }\n\n public setFocusAtIndex(index: number, setFocus: boolean, preventFocus: boolean): void {\n const previouslyFocusedElement = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.FOCUSED);\n previouslyFocusedElement?.classList.remove(CALENDAR_MENU_CONSTANTS.classes.ITEM_FOCUSED, CALENDAR_MENU_CONSTANTS.classes.MDC_RIPPLE_UPGRADED_FOCUSED);\n previouslyFocusedElement?.setAttribute('tabindex', '-1');\n const item = this._container.querySelectorAll(CALENDAR_MENU_CONSTANTS.selectors.ITEM)?.[index];\n if (item) {\n item.classList.add(CALENDAR_MENU_CONSTANTS.classes.ITEM_FOCUSED);\n item.setAttribute('tabindex', preventFocus ? '-1' : '0' );\n if (setFocus && !preventFocus) {\n (item as HTMLElement).focus();\n } else if (preventFocus) {\n item.classList.add(CALENDAR_MENU_CONSTANTS.classes.MDC_RIPPLE_UPGRADED_FOCUSED);\n }\n this._scrollItemIntoView('focused');\n }\n }\n\n private _scrollItemIntoView(type: 'selected' | 'focused'): void {\n const list = this._container.querySelector(CALENDAR_MENU_CONSTANTS.selectors.LIST);\n const item = list?.querySelector(type === 'selected' ? CALENDAR_MENU_CONSTANTS.selectors.SELECTED : CALENDAR_MENU_CONSTANTS.selectors.FOCUSED);\n if (list && item) {\n tryScrollIntoView(list.parentElement as HTMLElement, item as HTMLElement, type === 'selected' ? 'auto' : 'smooth', type === 'selected' ? 'center' : 'nearest');\n }\n }\n\n\n}\n", "import { getEventPath, ICustomElementFoundation, isDefined } from '@tylertech/forge-core';\n\nimport { CalendarDirection, CalendarMenuAnimationType, CALENDAR_MENU_CONSTANTS } from './calendar-menu-constants';\nimport { ICalendarMenuAdapter } from './calendar-menu-adapter';\nimport { ICalendarMenuOption } from './calendar-menu-constants';\n\nexport interface ICalendarMenuFoundation extends ICustomElementFoundation {\n animationType: CalendarMenuAnimationType;\n preventFocus: boolean;\n animateIn(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus: boolean): void;\n close(): void;\n moveFocusBackward(): boolean;\n moveFocusDown(): void;\n moveFocusForward(): boolean;\n moveFocusUp(): void;\n openAsGrid(options: ICalendarMenuOption[], setFocus: boolean): void;\n openAsList(options: ICalendarMenuOption[], setFocus: boolean): void;\n selectFocusedItem(): void;\n}\n\nexport class CalendarMenuFoundation implements ICalendarMenuFoundation {\n private _animationType: CalendarMenuAnimationType = 'scale';\n private _columnCount = 3;\n private _focusedIndex = 0;\n private _focusedIndexAfterAnimation: number | undefined;\n private _list = false; // This will be used to manage focus in a list view\n private _open = false;\n private _options: ICalendarMenuOption[] = [];\n private _preventFocus = false;\n private _sliceEnd = -1;\n private _sliceStart = -1;\n private _clickListener: (evt: Event) => void;\n private _intersectionObserverCallback: IntersectionObserverCallback;\n\n constructor(private _adapter: ICalendarMenuAdapter) {\n this._clickListener = evt => this._onClick(evt);\n this._intersectionObserverCallback = (entries: IntersectionObserverEntry[]) => this._onIntersection(entries);\n }\n\n public initialize(): void {\n this._applyAnimationType();\n this._applyPreventFocus();\n this._adapter.setHostAttribute('exportparts', Object.values(CALENDAR_MENU_CONSTANTS.parts).join(', '));\n this._adapter.toggleHostAttribute('hidden', true);\n this._adapter.registerClickListener(this._clickListener);\n }\n\n public disconnect(): void {\n this._adapter.unregisterClickListener(this._clickListener);\n this._adapter.unregisterIntersectionObserver();\n }\n\n public openAsGrid(options: ICalendarMenuOption[], setFocus: boolean): void {\n this._list = false;\n this._options = options;\n this._focusedIndex = 0;\n this._setColumnCount();\n this._adapter.setOpenAsGrid(options, this._focusedIndex, setFocus, this._preventFocus, this._open);\n this._setGridListeners();\n this._open = true;\n this._emitFocusChangeEvent();\n }\n\n public openAsList(options: ICalendarMenuOption[], setFocus: boolean): void {\n this._list = true;\n this._options = options;\n const currentSlice = this._getOptionSliceIncludingSelected();\n this._focusedIndex = Math.max(options.findIndex(o => o.selected), this._sliceStart);\n this._adapter.setOpenAsList(currentSlice, this._focusedIndex - this._sliceStart, setFocus, this._preventFocus, this._open);\n this._setListListeners();\n this._open = true;\n this._emitFocusChangeEvent();\n }\n\n public close(): void {\n this._open = false;\n this._options = [];\n this._adapter.setClosed();\n }\n\n public animateIn(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus: boolean): void {\n const callback: () => void = () => {\n this._setFocusFromStoredIndex(setFocus);\n };\n if (direction === 'left') {\n this._adapter.animateInFromLeft(options, callback);\n } else {\n this._adapter.animateInFromRight(options, callback);\n }\n this._options = options;\n this._setColumnCount();\n }\n\n public selectFocusedItem(): void {\n this._adapter.emitHostEvent(CALENDAR_MENU_CONSTANTS.events.SELECT, this._options[this._focusedIndex]?.value);\n }\n\n public moveFocusBackward(): boolean {\n if (this._list) {\n return true;\n }\n const index = this._focusedIndex - 1;\n const indexIsInView = index >= 0 && index % this._columnCount !== this._columnCount - 1;\n this._focusedIndexAfterAnimation = indexIsInView ? undefined : index + this._columnCount;\n return this._tryMoveFocus(index, indexIsInView);\n }\n\n public moveFocusDown(): void {\n if (this._list) {\n const index = Math.min(this._focusedIndex += 1, this._options.length - 1);\n this._tryMoveFocus(index, true);\n } else {\n const index = this._focusedIndex + this._columnCount;\n const indexIsInView = index < this._options.length;\n this._focusedIndexAfterAnimation = indexIsInView ? undefined : index % this._columnCount;\n this._tryMoveFocus(index, indexIsInView);\n }\n }\n\n public moveFocusForward(): boolean {\n if (this._list) {\n return true;\n }\n const index = this._focusedIndex + 1;\n const indexIsInView = index < this._options.length && index % this._columnCount !== 0;\n this._focusedIndexAfterAnimation = indexIsInView ? undefined : index - this._columnCount;\n return this._tryMoveFocus(index, indexIsInView);\n }\n\n public moveFocusUp(): void {\n if (this._list) {\n const index = Math.max(this._focusedIndex -= 1, 0);\n this._tryMoveFocus(index, true);\n } else {\n const index = this._focusedIndex - this._columnCount;\n const indexIsInView = index >= 0;\n this._focusedIndexAfterAnimation = indexIsInView ? undefined : this._options.length + index;\n this._tryMoveFocus(index, indexIsInView);\n }\n }\n\n private _tryMoveFocus(index: number, indexIsInView: boolean): boolean {\n if (indexIsInView && !this._options[index]?.disabled) {\n this._focusedIndex = index;\n this._adapter.setFocusAtIndex(this._list ? this._focusedIndex - this._sliceStart : this._focusedIndex, true, this._preventFocus);\n this._emitFocusChangeEvent();\n }\n return indexIsInView;\n }\n\n private _setFocusFromStoredIndex(setFocus: boolean): void {\n if (this._focusedIndexAfterAnimation === undefined) {\n return;\n }\n if (this._options[this._focusedIndexAfterAnimation] && !this._options[this._focusedIndexAfterAnimation]?.disabled) {\n this._focusedIndex = this._focusedIndexAfterAnimation;\n } else if (this._options[0]?.disabled) {\n this._focusedIndex = this._options.findIndex(o => !o.disabled);\n } else {\n this._focusedIndex = this._options.length - this._options.slice().reverse().findIndex(o => !o.disabled) - 1;\n }\n this._focusedIndexAfterAnimation = undefined;\n this._adapter.setFocusAtIndex(this._focusedIndex, setFocus, this._preventFocus);\n this._emitFocusChangeEvent();\n }\n\n private _onClick(evt: Event): void {\n const element = getEventPath(evt).find(p => p.classList && p.classList.contains(CALENDAR_MENU_CONSTANTS.classes.ITEM));\n const value = element?.getAttribute(CALENDAR_MENU_CONSTANTS.attributes.DATA_VALUE);\n if (isDefined(value)) {\n this._adapter.emitHostEvent(CALENDAR_MENU_CONSTANTS.events.SELECT, +(value as string));\n }\n }\n\n private _onIntersection(entries: IntersectionObserverEntry[]): void {\n if (this._sliceStart > 0 && entries.some(e => e.target.id === CALENDAR_MENU_CONSTANTS.ids.SCROLL_SPY_TOP && e.isIntersecting)) {\n this._adapter.appendListItemsToStart(this._getPreviousOptionsSlice());\n }\n if (this._sliceEnd < this._options.length && entries.some(e => e.target.id === CALENDAR_MENU_CONSTANTS.ids.SCROLL_SPY_BOTTOM && e.isIntersecting)) {\n this._adapter.appendListItemsToEnd(this._getNextOptionsSlice());\n }\n }\n\n private _setColumnCount(): void {\n this._columnCount = this._options.length >= CALENDAR_MENU_CONSTANTS.numbers.LARGE_ITEM_SET ? CALENDAR_MENU_CONSTANTS.numbers.FOUR_COL : CALENDAR_MENU_CONSTANTS.numbers.THREE_COL;\n }\n\n private _emitFocusChangeEvent(): void {\n this._adapter.emitHostEvent(CALENDAR_MENU_CONSTANTS.events.FOCUS_CHANGE, this._options[this._focusedIndex]?.value);\n }\n\n private _setGridListeners(): void {\n this._adapter.unregisterIntersectionObserver();\n }\n\n private _setListListeners(): void {\n this._adapter.unregisterIntersectionObserver();\n this._adapter.registerIntersectionObserver(this._intersectionObserverCallback);\n }\n\n private _getOptionSliceIncludingSelected(): ICalendarMenuOption[] {\n if (this._options.length <= CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE) {\n this._sliceStart = 0;\n this._sliceEnd = this._options.length;\n return this._options.slice();\n }\n\n const selectedIndex = Math.max(this._options.findIndex(o => o.selected), 0);\n let start = Math.max(Math.floor(selectedIndex - CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE / 2), 0);\n let end = start + CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE;\n if (end > this._options.length) {\n start = this._options.length - 1 - CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE;\n end = this._options.length;\n }\n this._sliceStart = start;\n this._sliceEnd = end;\n return this._options.slice(this._sliceStart, this._sliceEnd);\n }\n\n private _getNextOptionsSlice(): ICalendarMenuOption[] {\n const newEnd = Math.min(this._sliceEnd + CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE, this._options.length);\n const slice = this._options.slice(this._sliceEnd, newEnd);\n this._sliceEnd = newEnd;\n return slice;\n }\n\n private _getPreviousOptionsSlice(): ICalendarMenuOption[] {\n const newStart = Math.max(this._sliceStart - CALENDAR_MENU_CONSTANTS.numbers.LIST_SLICE_SIZE, 0);\n const slice = this._options.slice(newStart, this._sliceStart);\n this._sliceStart = newStart;\n return slice;\n }\n\n private _applyAnimationType(): void {\n this._adapter.setHostAttribute(CALENDAR_MENU_CONSTANTS.attributes.ANIMATION_TYPE, this._animationType);\n this._adapter.setAnimationType(this._animationType);\n }\n\n private _applyPreventFocus(): void {\n this._adapter.toggleHostAttribute(CALENDAR_MENU_CONSTANTS.attributes.PREVENT_FOCUS, this._preventFocus);\n this._adapter.setFocusAtIndex(this._focusedIndex, false, this._preventFocus);\n }\n\n public get animationType(): CalendarMenuAnimationType {\n return this._animationType;\n }\n public set animationType(value: CalendarMenuAnimationType) {\n if (this._animationType !== value) {\n this._animationType = value;\n this._applyAnimationType();\n }\n }\n\n public get preventFocus(): boolean {\n return this._preventFocus;\n }\n public set preventFocus(value: boolean) {\n if (this._preventFocus !== value) {\n this._preventFocus = value;\n this._applyPreventFocus();\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, ICustomElement, FoundationProperty, coerceBoolean, elementParents } from '@tylertech/forge-core';\n\nimport { CalendarMenuAdapter } from './calendar-menu-adapter';\nimport { CalendarDirection, CalendarMenuAnimationType, CALENDAR_MENU_CONSTANTS, ICalendarMenuOption } from './calendar-menu-constants';\nimport { CalendarMenuFoundation } from './calendar-menu-foundation';\n\nconst template = '<template><div class=\\\"forge-calendar-menu\\\" part=\\\"root\\\"></div></template>';\nconst styles = '.forge-calendar-menu{background-color:#fff;background-color:var(--mdc-theme-surface,#fff);position:relative;height:100%;width:100%;overflow:hidden}.forge-calendar-menu__view{position:absolute;top:0;left:0;height:100%;width:100%;background-color:inherit}.forge-calendar-menu__grid{max-height:320px;max-height:var(--forge-calendar-menu-max-height,320px);display:grid;gap:16px;justify-items:center;-webkit-box-align:center;align-items:center;padding:8px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-calendar-menu__grid--three-col{grid-template-columns:repeat(3,1fr)}.forge-calendar-menu__grid--four-col{grid-template-columns:repeat(4,1fr)}.forge-calendar-menu__list{position:relative;background-color:inherit}.forge-calendar-menu__list__wrapper{position:relative;height:100%;overflow:auto}.forge-calendar-menu__list__wrapper::-webkit-scrollbar{width:16px;width:var(--forge-scrollbar-width,16px);height:16px;height:var(--forge-scrollbar-height,16px)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-corner{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track:hover{background-color:#ececec;background-color:var(--forge-theme-scrollbar-track-hover,#ececec)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb{background-color:#bdbdbd;background-color:var(--forge-theme-scrollbar-thumb,#bdbdbd);height:32px;height:var(--forge-scrollbar-min-height,32px);width:32px;width:var(--forge-scrollbar-min-width,32px);border-radius:10px;border-radius:var(--forge-scrollbar-border-radius,10px);border-width:3px;border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-clip:content-box}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb:hover{background-color:#9e9e9e;background-color:var(--forge-theme-scrollbar-thumb-hover,#9e9e9e)}.forge-calendar-menu__item--grid{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;width:100%;height:100%;border-radius:4px;overflow:hidden;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar-menu__item--grid:not([disabled]){--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;border:1px solid #e0e0e0;cursor:pointer}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-calendar-menu__item--grid:not([disabled])::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar-menu__item--grid:not([disabled])::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar-menu__item--grid:not([disabled])::after,.forge-calendar-menu__item--grid:not([disabled])::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-surface--hover::before,.forge-calendar-menu__item--grid:not([disabled]):hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--grid:not([disabled]):not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar-menu__item--grid:not([disabled]).mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar-menu__item--grid[disabled]{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected{color:#fff;color:var(--mdc-theme-on-primary,#fff);background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee)}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected:hover{opacity:.87}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected.mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected:focus{opacity:.54}.forge-calendar-menu__item--list{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;margin:0 4px;width:calc(100% - 8px);height:48px;border-radius:4px;overflow:hidden;text-align:center;cursor:pointer}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-calendar-menu__item--list::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar-menu__item--list::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar-menu__item--list.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--list.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar-menu__item--list.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar-menu__item--list.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar-menu__item--list.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-calendar-menu__item--list.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar-menu__item--list::after,.forge-calendar-menu__item--list::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-calendar-menu__item--list.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar-menu__item--list.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar-menu__item--list.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar-menu__item--list--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-calendar-menu__item--list--activated::after,.forge-calendar-menu__item--list--activated::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-calendar-menu__item--list--activated.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-calendar-menu__item--list--activated.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-calendar-menu__item--list--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-calendar-menu__item--list--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-calendar-menu__item--list--selected::after,.forge-calendar-menu__item--list--selected::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-calendar-menu__item--list--selected.mdc-ripple-surface--hover::before,.forge-calendar-menu__item--list--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-calendar-menu__item--list--selected.mdc-ripple-upgraded--background-focused::before,.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar-menu__item--list--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-calendar-menu__item--list--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-calendar-menu__item--list--selected:focus:hover.mdc-ripple-upgraded--background-focused:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.28}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.12}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.16}.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-calendar-menu__item--list--active:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::after,.forge-calendar-menu__item--list:focus:not(.forge-list-item--selected):not(.forge-list-item--activated):not(.mdc-ripple-upgraded--foreground-activation)::before{background-color:#000;background-color:var(--mdc-theme-on-surface,#000)}.forge-calendar-menu__item--list--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation)::before{opacity:.24}.forge-calendar-menu__item--list--active:focus.forge-list-item--selected.forge-list-item--activated:not(.mdc-ripple-upgraded--foreground-activation):hover::before{opacity:.28}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected{background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected:hover{opacity:.87}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected.mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--list.forge-calendar-menu__item--selected:focus{opacity:.54}.forge-calendar-menu__item .mdc-ripple-upgraded--background-focused,.forge-calendar-menu__item--focused,.forge-calendar-menu__item:focus{outline:0}.forge-calendar-menu--open{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:scale-open;animation-name:scale-open;-webkit-transform-origin:top center;transform-origin:top center}.forge-calendar-menu--open[data-animation=fade]{-webkit-animation-name:fade-in;animation-name:fade-in}.forge-calendar-menu--open[data-animation=none]{-webkit-animation-duration:1ms;animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--open{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--closing{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:scale-closed;animation-name:scale-closed;-webkit-transform-origin:top center;transform-origin:top center}.forge-calendar-menu--closing[data-animation=fade]{-webkit-animation-name:fade-out;animation-name:fade-out}.forge-calendar-menu--closing[data-animation=none]{-webkit-animation-duration:1ms;animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--closing{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-out-to-right;animation-name:slide-out-to-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-in-from-left;animation-name:slide-in-from-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-out-to-left;animation-name:slide-out-to-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{-webkit-animation-name:fade-out;animation-name:fade-out}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:slide-in-from-right;animation-name:slide-in-from-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{-webkit-animation-name:fade-in;animation-name:fade-in}}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:first-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:fade-out;animation-name:fade-out}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:last-child{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-name:fade-in;animation-name:fade-in}#scroll-spy-bottom{position:absolute;bottom:0;height:48px;pointer-events:none}#scroll-spy-top{position:absolute;top:0;height:48px;pointer-events:none}@-webkit-keyframes scale-open{from{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scale-open{from{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes scale-closed{from{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}}@keyframes scale-closed{from{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.4);transform:scale(.4)}}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes slide-in-from-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-from-left{from{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-from-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-from-right{from{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-out-to-left{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slide-out-to-left{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@-webkit-keyframes slide-out-to-right{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slide-out-to-right{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}:host{display:block;position:absolute;top:0;left:0;height:100%;width:100%}:host([hidden]){display:none}:host([forge-popup-context=true]) .forge-calendar-menu{background-color:#fff;background-color:var(--forge-theme-elevated-surface,#fff)}';\n\nexport interface ICalendarMenuComponent extends ICustomElement {\n animationType: CalendarMenuAnimationType;\n preventFocus: boolean;\n animateIn(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus?: boolean): void;\n close(): void;\n moveFocusBackward(): boolean;\n moveFocusDown(): void;\n moveFocusForward(): boolean;\n moveFocusUp(): void;\n openAsGrid(options: ICalendarMenuOption[], setFocus?: boolean): void;\n openAsList(options: ICalendarMenuOption[], setFocus?: boolean): void;\n selectFocusedItem(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-calendar-menu': ICalendarMenuComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-calendar-menu-focus-change': CustomEvent<number>;\n 'forge-calendar-menu-select': CustomEvent<number>;\n }\n}\n\n/**\n * The web component class behind the `<forge-calendar-menu>` custom element.\n * \n * @internal\n * @tag forge-calendar-menu\n */\n@CustomElement({\n name: CALENDAR_MENU_CONSTANTS.elementName\n})\nexport class CalendarMenuComponent extends HTMLElement implements ICalendarMenuComponent {\n public static get observedAttributes(): string[] {\n return [\n CALENDAR_MENU_CONSTANTS.attributes.ANIMATION_TYPE,\n CALENDAR_MENU_CONSTANTS.attributes.PREVENT_FOCUS\n ];\n }\n\n private _foundation: CalendarMenuFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new CalendarMenuFoundation(new CalendarMenuAdapter(this));\n }\n\n public connectedCallback(): void {\n // To simulate the :host-context() selector for Firefox until they implement it, we need to determine if the\n // calendar is within a popup for auto-styling the calendar when included within a popup. Check to see if\n // any of the parents of this element are a popup.\n if (!this.hasAttribute(CALENDAR_MENU_CONSTANTS.attributes.POPUP_CONTEXT) && elementParents(this).some(el => el.tagName.toLowerCase() === 'forge-popup')) {\n this.setAttribute(CALENDAR_MENU_CONSTANTS.attributes.POPUP_CONTEXT, 'true');\n }\n\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case CALENDAR_MENU_CONSTANTS.attributes.ANIMATION_TYPE:\n this.animationType = newValue as CalendarMenuAnimationType;\n break;\n case CALENDAR_MENU_CONSTANTS.attributes.PREVENT_FOCUS:\n this.preventFocus = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare animationType: CalendarMenuAnimationType;\n\n @FoundationProperty()\n public declare preventFocus: boolean;\n\n public animateIn(options: ICalendarMenuOption[], direction: CalendarDirection, setFocus = false): void {\n this._foundation.animateIn(options, direction, setFocus);\n }\n\n public close(): void {\n this._foundation.close();\n }\n\n public moveFocusDown(): void {\n this._foundation.moveFocusDown();\n }\n\n public moveFocusBackward(): boolean {\n return this._foundation.moveFocusBackward();\n }\n\n public moveFocusForward(): boolean {\n return this._foundation.moveFocusForward();\n }\n\n public moveFocusUp(): void {\n this._foundation.moveFocusUp();\n }\n\n public openAsGrid(options: ICalendarMenuOption[], setFocus = false): void {\n this._foundation.openAsGrid(options, setFocus);\n }\n\n public openAsList(options: ICalendarMenuOption[], setFocus = false): void {\n this._foundation.openAsList(options, setFocus);\n }\n\n public selectFocusedItem(): void {\n this._foundation.selectFocusedItem();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { CalendarMenuComponent } from './calendar-menu';\n\nexport * from './calendar-menu-adapter';\nexport * from './calendar-menu-constants';\nexport * from './calendar-menu-foundation';\nexport * from './calendar-menu-utils';\nexport * from './calendar-menu';\n\nexport function defineCalendarMenuComponent(): void {\n defineCustomElement(CalendarMenuComponent);\n}\n"],
|
|
5
5
|
"mappings": "iXAGA,IAAMA,EAA2C,GAAGC,iBAE9CC,EAAa,CACjB,eAAgB,iBAChB,eAAgB,iBAChB,WAAY,aACZ,cAAe,sBACf,cAAe,eACjB,EAEMC,EAAU,CACd,SAAU,gCACV,QAAS,+BACT,KAAM,4BACN,UAAW,kCACX,cAAe,sCACf,eAAgB,uCAChB,KAAM,4BACN,aAAc,qCACd,cAAe,sCACf,KAAM,4BACN,UAAW,kCACX,aAAc,qCACd,4BAA6B,0CAC7B,KAAM,4BACN,eAAgB,sCAChB,WAAY,kCACZ,YAAa,mCACb,KAAM,2BACR,EAEMC,EAAM,CACV,kBAAmB,oBACnB,eAAgB,gBAClB,EAEMC,EAAQ,CACZ,KAAM,YACN,YAAa,mBACb,aAAc,oBACd,KAAM,MACR,EAEMC,EAAY,CAChB,UAAW,uBACX,QAAS,IAAIH,EAAQ,eACrB,KAAM,IAAIA,EAAQ,OAClB,KAAM,IAAIA,EAAQ,OAClB,KAAM,IAAIA,EAAQ,OAClB,aAAc,IAAIA,EAAQ,eAC1B,kBAAmB,IAAIC,EAAI,oBAC3B,eAAgB,IAAIA,EAAI,iBACxB,SAAU,IAAID,EAAQ,gBACtB,KAAM,IAAIA,EAAQ,MACpB,EAEMI,EAAS,CACb,aAAc,GAAGP,iBACjB,OAAQ,GAAGA,UACb,EAEMQ,EAAU,CACd,SAAU,EACV,eAAgB,GAChB,gBAAiB,GACjB,UAAW,CACb,EAEaC,EAA0B,CACrC,YAAAT,EACA,WAAAE,EACA,QAAAC,EACA,IAAAC,EAC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,GAAa,CACxE,KAAK,YAAY,WAAWF,EAASE,CAAQ,CAC/C,CAEO,mBAA0B,CAC/B,KAAK,YAAY,kBAAkB,CACrC,CACF,EAxCiBC,EAAA,CADdC,EAAmB,GA1CTf,EA2CI,6BAGAc,EAAA,CADdC,EAAmB,GA7CTf,EA8CI,4BA9CJA,EAANc,EAAA,CAHNE,EAAc,CACb,KAAMZ,EAAwB,WAChC,CAAC,GACYJ,GCjCN,SAASiB,IAAoC,CAClDC,EAAoBC,CAAqB,CAC3C",
|
|
6
6
|
"names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "classes", "ids", "parts", "selectors", "events", "numbers", "CALENDAR_MENU_CONSTANTS", "getGrid", "options", "grid", "CALENDAR_MENU_CONSTANTS", "gridItems", "getGridItems", "g", "o", "element", "getList", "wrapper", "list", "getScrollSpy", "getListItems", "l", "id", "removeAllExceptLastChild", "el", "CalendarMenuAdapter", "BaseAdapter", "component", "getShadowElement", "CALENDAR_MENU_CONSTANTS", "listener", "callback", "root", "options", "scrollSpyBottom", "scrollSpyTop", "value", "playKeyframeAnimation", "removeAllChildren", "focusedIndex", "setFocus", "preventFocus", "replace", "element", "getGrid", "removeAllExceptLastChild", "getList", "wrapper", "list", "firstItem", "oldScrollTop", "oldScroll", "getListItems", "l", "newScroll", "index", "_a", "previouslyFocusedElement", "item", "type", "tryScrollIntoView", "CalendarMenuFoundation", "_adapter", "evt", "entries", "CALENDAR_MENU_CONSTANTS", "options", "setFocus", "currentSlice", "o", "direction", "callback", "_a", "index", "indexIsInView", "_b", "element", "getEventPath", "p", "value", "isDefined", "selectedIndex", "start", "end", "newEnd", "slice", "newStart", "template", "styles", "CalendarMenuComponent", "attachShadowTemplate", "CalendarMenuFoundation", "CalendarMenuAdapter", "CALENDAR_MENU_CONSTANTS", "elementParents", "el", "name", "oldValue", "newValue", "coerceBoolean", "options", "direction", "setFocus", "__decorateClass", "FoundationProperty", "CustomElement", "defineCalendarMenuComponent", "defineCustomElement", "CalendarMenuComponent"]
|
|
7
7
|
}
|