@tylertech/forge 2.13.2 → 2.14.0-dev.0
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 +1079 -233
- 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.24X566SZ.js +7 -0
- package/dist/esm/chunks/chunk.24X566SZ.js.map +7 -0
- package/dist/esm/chunks/{chunk.N24NHF7Y.js → chunk.2D4IBAWP.js} +2 -2
- package/dist/esm/chunks/chunk.323FEQVK.js +7 -0
- package/dist/esm/chunks/chunk.323FEQVK.js.map +7 -0
- package/dist/esm/chunks/{chunk.Y4L7AVUS.js → chunk.3G237L6C.js} +2 -2
- package/dist/esm/chunks/chunk.3UB364WW.js +7 -0
- package/dist/esm/chunks/chunk.3UB364WW.js.map +7 -0
- package/dist/esm/chunks/chunk.4YH3GB4D.js +12 -0
- package/dist/esm/chunks/{chunk.BTI5I25G.js.map → chunk.4YH3GB4D.js.map} +1 -1
- package/dist/esm/chunks/{chunk.HPJ4AQIE.js → chunk.54RF4ZT6.js} +2 -2
- package/dist/esm/chunks/{chunk.ALJ3FDXL.js → chunk.5DKXUTFN.js} +2 -2
- package/dist/esm/chunks/{chunk.ALJ3FDXL.js.map → chunk.5DKXUTFN.js.map} +1 -1
- package/dist/esm/chunks/{chunk.5TVWDATE.js → chunk.5W5IPKAU.js} +2 -2
- package/dist/esm/chunks/{chunk.PBJEZJTY.js → chunk.65G33MJV.js} +2 -2
- package/dist/esm/chunks/{chunk.TLS4ALGU.js → chunk.6NBVXSNZ.js} +2 -2
- package/dist/esm/chunks/{chunk.Z4MN5NB5.js → chunk.73O3BMP2.js} +2 -2
- package/dist/esm/chunks/{chunk.WEUNLYMQ.js → chunk.7LBAA7TC.js} +2 -2
- package/dist/esm/chunks/chunk.AGEBZY4S.js +7 -0
- package/dist/esm/chunks/chunk.AGEBZY4S.js.map +7 -0
- package/dist/esm/chunks/chunk.B5HGV5EZ.js +7 -0
- package/dist/esm/chunks/chunk.B5HGV5EZ.js.map +7 -0
- package/dist/esm/chunks/chunk.C557PTJ5.js +7 -0
- package/dist/esm/chunks/chunk.C557PTJ5.js.map +7 -0
- package/dist/esm/chunks/{chunk.VW4JVRH7.js → chunk.CN7DHS4J.js} +2 -2
- package/dist/esm/chunks/chunk.CUT7V2KN.js +7 -0
- package/dist/esm/chunks/chunk.CUT7V2KN.js.map +7 -0
- package/dist/esm/chunks/chunk.CZIQTYFJ.js +7 -0
- package/dist/esm/chunks/chunk.CZIQTYFJ.js.map +7 -0
- package/dist/esm/chunks/{chunk.BYRJ7577.js → chunk.DRI2NLIB.js} +2 -2
- package/dist/esm/chunks/chunk.EE2LK23T.js +7 -0
- package/dist/esm/chunks/chunk.EE2LK23T.js.map +7 -0
- package/dist/esm/chunks/chunk.EXKBJEFL.js +7 -0
- package/dist/esm/chunks/{chunk.ZPBGKHHM.js.map → chunk.EXKBJEFL.js.map} +2 -2
- package/dist/esm/chunks/{chunk.7MVBJ37L.js → chunk.FBERE7AL.js} +2 -2
- package/dist/esm/chunks/{chunk.OJFI5I6O.js → chunk.FQEETXUQ.js} +2 -2
- package/dist/esm/chunks/{chunk.3STDLL5U.js → chunk.G5JTL66M.js} +2 -2
- package/dist/esm/chunks/chunk.GVZEMIA3.js +7 -0
- package/dist/esm/chunks/chunk.GVZEMIA3.js.map +7 -0
- package/dist/esm/chunks/{chunk.BCP2YATB.js → chunk.GZEWDHFJ.js} +2 -2
- package/dist/esm/chunks/chunk.HQJZRTOH.js +7 -0
- package/dist/esm/chunks/chunk.HQJZRTOH.js.map +7 -0
- package/dist/esm/chunks/{chunk.ZAGCOV55.js → chunk.HUX56BCR.js} +2 -2
- package/dist/esm/chunks/chunk.K5WLIDQK.js +7 -0
- package/dist/esm/chunks/chunk.K5WLIDQK.js.map +7 -0
- package/dist/esm/chunks/chunk.LGECRZFO.js +7 -0
- package/dist/esm/chunks/chunk.LGECRZFO.js.map +7 -0
- package/dist/esm/chunks/{chunk.MBS5VMYY.js → chunk.LYAS4FAN.js} +2 -2
- package/dist/esm/chunks/{chunk.MBS5VMYY.js.map → chunk.LYAS4FAN.js.map} +2 -2
- package/dist/esm/chunks/{chunk.YG2KLPHA.js.map → chunk.MU4FV57Q.js} +7 -7
- package/dist/esm/chunks/chunk.MU4FV57Q.js.map +7 -0
- package/dist/esm/chunks/chunk.N6QJ2RRG.js +7 -0
- package/dist/esm/chunks/chunk.N6QJ2RRG.js.map +7 -0
- package/dist/esm/chunks/{chunk.O5I3ZMDA.js → chunk.NG5EGZ5Y.js} +2 -2
- package/dist/esm/chunks/chunk.NXS7A7PO.js +7 -0
- package/dist/esm/chunks/{chunk.5BDTX7CR.js.map → chunk.NXS7A7PO.js.map} +2 -2
- package/dist/esm/chunks/{chunk.SLSVRMAS.js → chunk.NZTGBDRK.js} +2 -2
- package/dist/esm/chunks/{chunk.OLNFXF3V.js → chunk.O4LGKJY6.js} +2 -2
- package/dist/esm/chunks/{chunk.NV2HNCQH.js → chunk.OGZOXNGT.js} +2 -2
- package/dist/esm/chunks/chunk.OKIRZEUG.js +7 -0
- package/dist/esm/chunks/chunk.OKIRZEUG.js.map +7 -0
- package/dist/esm/chunks/{chunk.36VS7FMU.js → chunk.OTI6WL66.js} +2 -2
- package/dist/esm/chunks/chunk.P45HS252.js +7 -0
- package/dist/esm/chunks/chunk.P45HS252.js.map +7 -0
- package/dist/esm/chunks/{chunk.Y5GQ2BA7.js → chunk.P5GT5YBP.js} +2 -2
- package/dist/esm/chunks/chunk.P6IF3USM.js +7 -0
- package/dist/esm/chunks/chunk.P6IF3USM.js.map +7 -0
- package/dist/esm/chunks/chunk.PBL2N45I.js +7 -0
- package/dist/esm/chunks/chunk.PBL2N45I.js.map +7 -0
- package/dist/esm/chunks/{chunk.HWQEGQDD.js → chunk.PHJPLWFH.js} +2 -2
- package/dist/esm/chunks/chunk.PRO76W5D.js +7 -0
- package/dist/esm/chunks/{chunk.7TDB3VFH.js.map → chunk.PRO76W5D.js.map} +2 -2
- package/dist/esm/chunks/chunk.PV5MABYN.js +7 -0
- package/dist/esm/chunks/chunk.PV5MABYN.js.map +7 -0
- package/dist/esm/chunks/chunk.R2L3S3YD.js +7 -0
- package/dist/esm/chunks/chunk.R2L3S3YD.js.map +7 -0
- package/dist/esm/chunks/{chunk.QH4DLM3R.js → chunk.R4NZYUID.js} +2 -2
- package/dist/esm/chunks/chunk.RH2NL523.js +7 -0
- package/dist/esm/chunks/chunk.RH2NL523.js.map +7 -0
- package/dist/esm/chunks/{chunk.IMZ5PF4C.js → chunk.ROF42KJ3.js} +2 -2
- package/dist/esm/chunks/{chunk.B52LJRGH.js → chunk.RT4C67NK.js} +2 -2
- package/dist/esm/chunks/chunk.T2M2KVP7.js +29 -0
- package/dist/esm/chunks/chunk.T2M2KVP7.js.map +7 -0
- package/dist/esm/chunks/chunk.TMJBIAWC.js +7 -0
- package/dist/esm/chunks/chunk.TMJBIAWC.js.map +7 -0
- package/dist/esm/chunks/{chunk.HHJJJ73Y.js → chunk.UPFJ3PVE.js} +2 -2
- package/dist/esm/chunks/{chunk.HHJJJ73Y.js.map → chunk.UPFJ3PVE.js.map} +1 -1
- package/dist/esm/chunks/{chunk.DB2WESQC.js → chunk.XC76IHG4.js} +2 -2
- package/dist/esm/chunks/chunk.XCUYZZV4.js +7 -0
- package/dist/esm/chunks/chunk.XCUYZZV4.js.map +7 -0
- package/dist/esm/chunks/{chunk.YONRMJU5.js → chunk.XMI5RBZQ.js} +2 -2
- package/dist/esm/chunks/chunk.XMI5RBZQ.js.map +7 -0
- package/dist/esm/chunks/chunk.XY4N4TSH.js +7 -0
- package/dist/esm/chunks/chunk.XY4N4TSH.js.map +7 -0
- package/dist/esm/chunks/{chunk.N46G56GG.js → chunk.YKXCORJE.js} +2 -2
- package/dist/esm/chunks/{chunk.2ZQ3ZDPN.js → chunk.YPMN5U7C.js} +2 -2
- package/dist/esm/chunks/{chunk.X5JLUP7O.js → chunk.YW47QJVY.js} +2 -2
- package/dist/esm/chunks/{chunk.JXY6MTP3.js → chunk.ZAKLVVFO.js} +2 -2
- package/dist/esm/chunks/{chunk.YWRCWMNO.js → chunk.ZQCHS2PS.js} +2 -2
- 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/dialog/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-action-button/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/linear-progress/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/popup/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/ripple/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option-group/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/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/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/dist/esm/toolbar/index.js +1 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.d.ts +3 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.js +5 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-constants.d.ts +1 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-constants.js +2 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.d.ts +4 -0
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +14 -0
- package/esm/app-bar/notification-button/app-bar-notification-button.d.ts +2 -0
- package/esm/app-bar/notification-button/app-bar-notification-button.js +9 -2
- package/esm/autocomplete/autocomplete-adapter.d.ts +9 -10
- package/esm/autocomplete/autocomplete-adapter.js +1 -1
- package/esm/autocomplete/autocomplete-constants.d.ts +10 -12
- package/esm/autocomplete/autocomplete-foundation.d.ts +6 -7
- package/esm/autocomplete/autocomplete-foundation.js +5 -2
- package/esm/autocomplete/autocomplete-utils.d.ts +4 -5
- package/esm/autocomplete/autocomplete.d.ts +3 -4
- package/esm/autocomplete/autocomplete.js +2 -2
- package/esm/button/button-constants.d.ts +1 -0
- package/esm/button/button-constants.js +2 -1
- package/esm/button/button.d.ts +1 -1
- package/esm/button/button.js +6 -7
- package/esm/calendar/calendar-foundation.js +1 -0
- package/esm/checkbox/checkbox-adapter.d.ts +1 -2
- package/esm/checkbox/checkbox-adapter.js +12 -8
- package/esm/checkbox/checkbox-foundation.js +0 -3
- package/esm/chip-field/chip-field-adapter.d.ts +2 -0
- package/esm/chip-field/chip-field-adapter.js +8 -3
- package/esm/chip-field/chip-field-foundation.js +1 -0
- package/esm/chip-field/chip-field.js +1 -1
- package/esm/color-picker/color-picker-foundation.d.ts +1 -0
- package/esm/color-picker/color-picker-foundation.js +19 -8
- package/esm/core/utils/date-utils.js +2 -2
- package/esm/core/utils/utils.d.ts +0 -6
- package/esm/core/utils/utils.js +0 -10
- package/esm/date-picker/base/base-date-picker-foundation.js +2 -1
- package/esm/date-picker/base/base-date-picker.d.ts +2 -2
- package/esm/date-range-picker/date-range-picker-foundation.d.ts +2 -2
- package/esm/date-range-picker/date-range-picker-foundation.js +1 -1
- package/esm/dialog/dialog-adapter.d.ts +0 -2
- package/esm/dialog/dialog-adapter.js +1 -10
- package/esm/dialog/dialog-foundation.js +0 -1
- package/esm/file-picker/file-picker-adapter.js +3 -2
- package/esm/file-picker/file-picker-foundation.d.ts +2 -0
- package/esm/file-picker/file-picker-foundation.js +15 -38
- package/esm/file-picker/file-picker.d.ts +1 -0
- package/esm/file-picker/file-picker.js +3 -0
- package/esm/floating-action-button/floating-action-button-constants.js +1 -1
- package/esm/icon-button/icon-button-constants.js +1 -1
- package/esm/icon-button/icon-button.d.ts +1 -1
- package/esm/icon-button/icon-button.js +6 -6
- package/esm/linear-progress/linear-progress.js +1 -1
- package/esm/list/list-item/list-item-foundation.js +1 -2
- package/esm/list/list-item/list-item.js +1 -1
- package/esm/list-dropdown/cascading-list-dropdown-aware-foundation.d.ts +5 -2
- package/esm/list-dropdown/cascading-list-dropdown-aware-foundation.js +3 -1
- package/esm/list-dropdown/list-dropdown-aware-foundation.d.ts +8 -0
- package/esm/list-dropdown/list-dropdown-aware-foundation.js +14 -0
- package/esm/list-dropdown/list-dropdown-aware.d.ts +11 -2
- package/esm/list-dropdown/list-dropdown-aware.js +12 -0
- package/esm/list-dropdown/list-dropdown-constants.d.ts +9 -3
- package/esm/list-dropdown/list-dropdown-constants.js +2 -0
- package/esm/list-dropdown/list-dropdown-foundation.js +2 -6
- package/esm/list-dropdown/list-dropdown-utils.d.ts +1 -0
- package/esm/list-dropdown/list-dropdown-utils.js +39 -17
- package/esm/menu/menu-adapter.d.ts +2 -0
- package/esm/menu/menu-adapter.js +7 -0
- package/esm/menu/menu-constants.js +1 -1
- package/esm/menu/menu-foundation.d.ts +12 -3
- package/esm/menu/menu-foundation.js +28 -17
- package/esm/menu/menu.d.ts +6 -1
- package/esm/menu/menu.js +9 -3
- package/esm/popup/popup-adapter.js +9 -1
- package/esm/popup/popup-constants.d.ts +1 -0
- package/esm/popup/popup-constants.js +2 -1
- package/esm/popup/popup-foundation.d.ts +4 -0
- package/esm/popup/popup-foundation.js +7 -0
- package/esm/popup/popup.d.ts +2 -0
- package/esm/popup/popup.js +4 -1
- package/esm/quantity-field/quantity-field-adapter.d.ts +2 -0
- package/esm/quantity-field/quantity-field-adapter.js +8 -0
- package/esm/quantity-field/quantity-field-foundation.js +1 -0
- package/esm/quantity-field/quantity-field.js +6 -0
- package/esm/radio/radio-adapter.d.ts +3 -3
- package/esm/radio/radio-adapter.js +17 -15
- package/esm/radio/radio-foundation.js +1 -1
- package/esm/ripple/forge-ripple.d.ts +1 -0
- package/esm/ripple/forge-ripple.js +3 -0
- package/esm/ripple/ripple-constants.d.ts +1 -0
- package/esm/ripple/ripple-constants.js +2 -1
- package/esm/ripple/ripple-foundation.d.ts +4 -0
- package/esm/ripple/ripple-foundation.js +10 -0
- package/esm/ripple/ripple.d.ts +2 -0
- package/esm/ripple/ripple.js +8 -1
- package/esm/select/core/base-select-adapter.js +8 -6
- package/esm/select/core/base-select-constants.d.ts +2 -0
- package/esm/select/core/base-select-constants.js +3 -1
- package/esm/select/core/base-select-foundation.d.ts +0 -9
- package/esm/select/core/base-select-foundation.js +5 -26
- package/esm/select/core/select-utils.js +1 -1
- package/esm/select/option-group/option-group.d.ts +12 -1
- package/esm/select/option-group/option-group.js +7 -0
- package/esm/select/select/select.js +5 -3
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/switch/switch.js +37 -12
- package/esm/table/table-foundation.d.ts +7 -0
- package/esm/table/table-foundation.js +9 -0
- package/esm/table/table-utils.js +6 -3
- package/esm/table/table.d.ts +7 -0
- package/esm/table/table.js +8 -0
- package/esm/table/types.d.ts +8 -4
- package/esm/text-field/text-field.js +1 -1
- package/esm/time-picker/time-picker-foundation.js +1 -0
- package/esm/toolbar/toolbar.js +2 -2
- package/package.json +30 -3
- package/styles/chip-field/_selector.scss +12 -13
- package/styles/chip-field/chip-field.scss +1 -1
- package/styles/field/_base.scss +2 -2
- package/styles/field/_selector.scss +1 -1
- package/styles/list/list-item/_mixins.scss +28 -17
- package/styles/list/list-item/_variables.scss +13 -4
- package/styles/popup/popup.scss +4 -0
- package/styles/toolbar/_mixins.scss +1 -2
- package/styles/toolbar/toolbar.scss +13 -0
- package/dist/esm/chunks/chunk.3MP6OFVU.js +0 -7
- package/dist/esm/chunks/chunk.3MP6OFVU.js.map +0 -7
- package/dist/esm/chunks/chunk.4K3IV4GI.js +0 -7
- package/dist/esm/chunks/chunk.4K3IV4GI.js.map +0 -7
- package/dist/esm/chunks/chunk.5BDTX7CR.js +0 -7
- package/dist/esm/chunks/chunk.6LXDG4W5.js +0 -7
- package/dist/esm/chunks/chunk.6LXDG4W5.js.map +0 -7
- package/dist/esm/chunks/chunk.7R6TYPPS.js +0 -7
- package/dist/esm/chunks/chunk.7R6TYPPS.js.map +0 -7
- package/dist/esm/chunks/chunk.7TDB3VFH.js +0 -7
- package/dist/esm/chunks/chunk.BCD4AAI2.js +0 -7
- package/dist/esm/chunks/chunk.BCD4AAI2.js.map +0 -7
- package/dist/esm/chunks/chunk.BTI5I25G.js +0 -12
- package/dist/esm/chunks/chunk.DLAIQJHL.js +0 -7
- package/dist/esm/chunks/chunk.DLAIQJHL.js.map +0 -7
- package/dist/esm/chunks/chunk.DURRORXO.js +0 -29
- package/dist/esm/chunks/chunk.DURRORXO.js.map +0 -7
- package/dist/esm/chunks/chunk.EDU7RQD7.js +0 -7
- package/dist/esm/chunks/chunk.EDU7RQD7.js.map +0 -7
- package/dist/esm/chunks/chunk.ETIN6DEM.js +0 -7
- package/dist/esm/chunks/chunk.ETIN6DEM.js.map +0 -7
- package/dist/esm/chunks/chunk.F2GXZPID.js +0 -7
- package/dist/esm/chunks/chunk.F2GXZPID.js.map +0 -7
- package/dist/esm/chunks/chunk.F3Q62EMG.js +0 -7
- package/dist/esm/chunks/chunk.F3Q62EMG.js.map +0 -7
- package/dist/esm/chunks/chunk.GEMZPO6Z.js +0 -7
- package/dist/esm/chunks/chunk.GEMZPO6Z.js.map +0 -7
- package/dist/esm/chunks/chunk.JMXJXZTS.js +0 -7
- package/dist/esm/chunks/chunk.JMXJXZTS.js.map +0 -7
- package/dist/esm/chunks/chunk.M4KJNCLO.js +0 -7
- package/dist/esm/chunks/chunk.M4KJNCLO.js.map +0 -7
- package/dist/esm/chunks/chunk.MBWEYW6M.js +0 -7
- package/dist/esm/chunks/chunk.MBWEYW6M.js.map +0 -7
- package/dist/esm/chunks/chunk.O2R6MBT5.js +0 -7
- package/dist/esm/chunks/chunk.O2R6MBT5.js.map +0 -7
- package/dist/esm/chunks/chunk.ON6FJ2D6.js +0 -7
- package/dist/esm/chunks/chunk.ON6FJ2D6.js.map +0 -7
- package/dist/esm/chunks/chunk.PCSCKTFS.js +0 -7
- package/dist/esm/chunks/chunk.PCSCKTFS.js.map +0 -7
- package/dist/esm/chunks/chunk.Q3RRONZQ.js +0 -7
- package/dist/esm/chunks/chunk.Q3RRONZQ.js.map +0 -7
- package/dist/esm/chunks/chunk.QIJHHDYF.js +0 -7
- package/dist/esm/chunks/chunk.QIJHHDYF.js.map +0 -7
- package/dist/esm/chunks/chunk.QMRLSOAB.js +0 -7
- package/dist/esm/chunks/chunk.QMRLSOAB.js.map +0 -7
- package/dist/esm/chunks/chunk.UOWU5VVK.js +0 -7
- package/dist/esm/chunks/chunk.UOWU5VVK.js.map +0 -7
- package/dist/esm/chunks/chunk.WOHCW6KW.js +0 -7
- package/dist/esm/chunks/chunk.WOHCW6KW.js.map +0 -7
- package/dist/esm/chunks/chunk.WU24GAQY.js +0 -7
- package/dist/esm/chunks/chunk.WU24GAQY.js.map +0 -7
- package/dist/esm/chunks/chunk.XSZ4S77A.js +0 -7
- package/dist/esm/chunks/chunk.XSZ4S77A.js.map +0 -7
- package/dist/esm/chunks/chunk.YG2KLPHA.js +0 -7
- package/dist/esm/chunks/chunk.YONRMJU5.js.map +0 -7
- package/dist/esm/chunks/chunk.ZPBGKHHM.js +0 -7
- /package/dist/esm/chunks/{chunk.N24NHF7Y.js.map → chunk.2D4IBAWP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Y4L7AVUS.js.map → chunk.3G237L6C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HPJ4AQIE.js.map → chunk.54RF4ZT6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5TVWDATE.js.map → chunk.5W5IPKAU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PBJEZJTY.js.map → chunk.65G33MJV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TLS4ALGU.js.map → chunk.6NBVXSNZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Z4MN5NB5.js.map → chunk.73O3BMP2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WEUNLYMQ.js.map → chunk.7LBAA7TC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VW4JVRH7.js.map → chunk.CN7DHS4J.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BYRJ7577.js.map → chunk.DRI2NLIB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7MVBJ37L.js.map → chunk.FBERE7AL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OJFI5I6O.js.map → chunk.FQEETXUQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3STDLL5U.js.map → chunk.G5JTL66M.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BCP2YATB.js.map → chunk.GZEWDHFJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZAGCOV55.js.map → chunk.HUX56BCR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.O5I3ZMDA.js.map → chunk.NG5EGZ5Y.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SLSVRMAS.js.map → chunk.NZTGBDRK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OLNFXF3V.js.map → chunk.O4LGKJY6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NV2HNCQH.js.map → chunk.OGZOXNGT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.36VS7FMU.js.map → chunk.OTI6WL66.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Y5GQ2BA7.js.map → chunk.P5GT5YBP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HWQEGQDD.js.map → chunk.PHJPLWFH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QH4DLM3R.js.map → chunk.R4NZYUID.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IMZ5PF4C.js.map → chunk.ROF42KJ3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.B52LJRGH.js.map → chunk.RT4C67NK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DB2WESQC.js.map → chunk.XC76IHG4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.N46G56GG.js.map → chunk.YKXCORJE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2ZQ3ZDPN.js.map → chunk.YPMN5U7C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.X5JLUP7O.js.map → chunk.YW47QJVY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JXY6MTP3.js.map → chunk.ZAKLVVFO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YWRCWMNO.js.map → chunk.ZQCHS2PS.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/quantity-field/quantity-field-constants.ts", "../../src/quantity-field/quantity-field-adapter.ts", "../../src/quantity-field/quantity-field-foundation.ts", "../../src/quantity-field/quantity-field.ts", "../../src/quantity-field/quantity-field-component-delegate.ts", "../../src/quantity-field/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}quantity-field`;\n\nconst attributes = {\n INVALID: 'invalid',\n REQUIRED: 'required',\n DISABLED: 'disabled'\n};\n\nconst classes = {\n ROOT: 'forge-quantity-field',\n INVALID: 'forge-quantity-field--invalid',\n REQUIRED: 'forge-quantity-field--required'\n};\n\nconst slots = {\n INCREMENT_BUTTON: 'increment-button',\n DECREMENT_BUTTON: 'decrement-button',\n LABEL: 'label',\n HELPER_TEXT: 'helper-text'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n INCREMENT_BUTTON_SLOT: `slot[name=${slots.INCREMENT_BUTTON}]`,\n DECREMENT_BUTTON_SLOT: `slot[name=${slots.DECREMENT_BUTTON}]`,\n INCREMENT_BUTTON: `[slot=${slots.INCREMENT_BUTTON}] button, button[slot=${slots.INCREMENT_BUTTON}]`,\n DECREMENT_BUTTON: `[slot=${slots.DECREMENT_BUTTON}] button, button[slot=${slots.DECREMENT_BUTTON}]`,\n TEXT_FIELD: 'forge-text-field',\n INPUT: 'input[type=number]',\n LABEL: `[slot=${slots.LABEL}]`,\n HELPER_TEXT: `[slot=${slots.HELPER_TEXT}]`\n};\n\nexport const QUANTITY_FIELD_CONSTANTS = {\n elementName,\n classes,\n slots,\n selectors,\n attributes\n};\n", "import { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IQuantityFieldComponent } from './quantity-field';\nimport { getShadowElement, Platform } from '@tylertech/forge-core';\nimport { QUANTITY_FIELD_CONSTANTS } from './quantity-field-constants';\nimport { TextFieldComponent } from '../text-field';\n\nexport interface IQuantityFieldAdapter extends IBaseAdapter {\n initializeButtons(): void;\n addRootClass(name: string): void;\n removeRootClass(name: string): void;\n inputHasAttribute(name: string): boolean;\n addIncrementButtonSlotListener(listener: () => void): void;\n removeIncrementButtonSlotListener(listener: () => void): void;\n addDecrementButtonSlotListener(listener: (evt: Event) => void): void;\n removeDecrementButtonSlotListener(listener: (evt: Event) => void): void;\n addIncrementEventListener(event: string, callback: (event: Event) => void): void;\n addDecrementEventListener(event: string, callback: (event: Event) => void): void;\n removeIncrementEventListener(event: string, callback: (event: Event) => void): void;\n removeDecrementEventListener(event: string, callback: (event: Event) => void): void;\n addIncrementButtonAttribute(name: string, value?: string): void;\n removeIncrementButtonAttribute(name: string): void;\n addDecrementButtonAttribute(name: string, value?: string): void;\n removeDecrementButtonAttribute(name: string): void;\n addInputDisabledAttributeChangeListener(callback: () => void): void;\n addTextFieldAttribute(name: string, value?: string): void;\n removeTextFieldAttribute(name: string): void;\n removeInputDisabledAttributeChangeListener(): void;\n increment(): void;\n decrement(): void;\n}\n\nexport class QuantityFieldAdapter extends BaseAdapter<IQuantityFieldComponent> implements IQuantityFieldAdapter {\n private _rootElement: HTMLElement;\n private _incrementButtonSlot: HTMLSlotElement;\n private _decrementButtonSlot: HTMLSlotElement;\n private _incrementButton: HTMLButtonElement;\n private _decrementButton: HTMLButtonElement;\n private _textField: TextFieldComponent;\n private _inputElement: HTMLInputElement | null;\n private _inputAttributeMutationObserver: MutationObserver | undefined;\n\n constructor(component: IQuantityFieldComponent) {\n super(component);\n this._rootElement = getShadowElement(component, QUANTITY_FIELD_CONSTANTS.selectors.ROOT);\n this._incrementButtonSlot = getShadowElement(this._component, QUANTITY_FIELD_CONSTANTS.selectors.INCREMENT_BUTTON_SLOT) as HTMLSlotElement;\n this._decrementButtonSlot = getShadowElement(this._component, QUANTITY_FIELD_CONSTANTS.selectors.DECREMENT_BUTTON_SLOT) as HTMLSlotElement;\n }\n\n public initializeButtons(): void {\n if (this._incrementButton && !this._incrementButton.hasAttribute('tabindex')) {\n this._incrementButton.tabIndex = -1;\n }\n if (this._decrementButton && !this._decrementButton.hasAttribute('tabindex')) {\n this._decrementButton.tabIndex = -1;\n }\n }\n\n public addRootClass(name: string): void {\n this._rootElement.classList.add(name);\n }\n\n public removeRootClass(name: string): void {\n this._rootElement.classList.remove(name);\n }\n\n public inputHasAttribute(name: string): boolean {\n if (!this.inputElement) {\n return false;\n }\n\n return this.inputElement.hasAttribute(name);\n }\n\n public addIncrementButtonSlotListener(listener: () => void): void {\n this._incrementButtonSlot.addEventListener('slotchange', listener);\n }\n\n public removeIncrementButtonSlotListener(listener: () => void): void {\n if (this._incrementButtonSlot) {\n this._incrementButtonSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addDecrementButtonSlotListener(listener: (evt: Event) => void): void {\n this._decrementButtonSlot.addEventListener('slotchange', listener);\n }\n\n public removeDecrementButtonSlotListener(listener: (evt: Event) => void): void {\n if (this._decrementButtonSlot) {\n this._decrementButtonSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addTextFieldAttribute(name: string, value = ''): void {\n if (this._textFieldComponent) {\n this._textFieldComponent.setAttribute(name, value);\n }\n }\n\n public removeTextFieldAttribute(name: string): void {\n if (this._textFieldComponent) {\n this._textFieldComponent.removeAttribute(name);\n }\n }\n\n public addIncrementEventListener(event: string, callback: (event: Event) => void): void {\n this._incrementButtonElement.addEventListener(event, callback);\n }\n\n public removeIncrementEventListener(event: string, callback: (event: Event) => void): void {\n if (this._incrementButtonElement) {\n this._incrementButtonElement.removeEventListener(event, callback);\n }\n }\n\n public addDecrementEventListener(event: string, callback: (event: Event) => void): void {\n this._decrementButtonElement.addEventListener(event, callback);\n }\n\n public removeDecrementEventListener(event: string, callback: (event: Event) => void): void {\n if (this._decrementButtonElement) {\n this._decrementButtonElement.removeEventListener(event, callback);\n }\n }\n\n public addIncrementButtonAttribute(name: string, value = ''): void {\n this._incrementButtonElement.setAttribute(name, value);\n }\n\n public removeIncrementButtonAttribute(name: string): void {\n this._incrementButtonElement.removeAttribute(name);\n }\n\n public addDecrementButtonAttribute(name: string, value = ''): void {\n this._decrementButtonElement.setAttribute(name, value);\n }\n\n public removeDecrementButtonAttribute(name: string): void {\n this._decrementButtonElement.removeAttribute(name);\n }\n\n public increment(): void {\n const input = this.inputElement;\n if (!input) {\n return;\n }\n\n const curValue = +input.value;\n const precision = this._calcPrecision(this._inputStep);\n let newValue = parseFloat((curValue + this._inputStep).toFixed(precision));\n if (!!this._inputMax && this._inputMax < newValue) {\n newValue = this._inputMax;\n }\n\n this._setInputValue(newValue);\n }\n\n public decrement(): void {\n const input = this.inputElement;\n if (!input) {\n return;\n }\n\n const curValue = +input.value;\n const precision = this._calcPrecision(this._inputStep);\n let newValue = parseFloat((curValue - this._inputStep).toFixed(precision));\n if (!!this._inputMin && this._inputMin > newValue) {\n newValue = this._inputMin;\n }\n\n this._setInputValue(newValue);\n }\n\n public addInputDisabledAttributeChangeListener(callback: () => void): void {\n this._setupInputDisabledAttributeMutationObserver(callback);\n }\n\n public removeInputDisabledAttributeChangeListener(): void {\n this._cleanupInputDisabledAttributeMutationObserver();\n }\n\n private _setInputValue(value: string | number): void {\n if (!this.inputElement) {\n return;\n }\n\n this.inputElement.value = `${value}`;\n this.inputElement.dispatchEvent(new Event('input'));\n this.inputElement.dispatchEvent(new Event('change'));\n }\n\n private _isNullOrUndefinedOrEmpty(value: any): value is null | undefined {\n return value == null || value === '';\n }\n\n private _setupInputDisabledAttributeMutationObserver(callback: () => void): void {\n if (!this.inputElement) {\n return;\n }\n\n this._cleanupInputDisabledAttributeMutationObserver();\n const mutationCallback = (mutationRecords: MutationRecord[]): void => this._inputDisabledAttributeMutationCallback(mutationRecords, callback);\n this._inputAttributeMutationObserver = new MutationObserver(mutationCallback);\n const mutationOptions: MutationObserverInit = {\n attributes: true,\n attributeOldValue: true,\n attributeFilter: [QUANTITY_FIELD_CONSTANTS.attributes.DISABLED]\n };\n this._inputAttributeMutationObserver.observe(this.inputElement, mutationOptions);\n }\n\n private _cleanupInputDisabledAttributeMutationObserver(): void {\n if (this._inputAttributeMutationObserver) {\n this._inputAttributeMutationObserver.disconnect();\n delete this._inputAttributeMutationObserver;\n }\n }\n\n private _inputDisabledAttributeMutationCallback(mutationRecords: MutationRecord[], callback: () => void): void {\n for (const mutationRecord of mutationRecords) {\n // Skip:\n // - Non-attribute mutations.\n // - Mutations without an attribute name.\n // - Mutations without a matching attribute name.\n // - Mutations that did not change the attribute value.\n if (mutationRecord.type !== 'attributes'\n || !mutationRecord.attributeName\n || mutationRecord.attributeName !== QUANTITY_FIELD_CONSTANTS.attributes.DISABLED\n || mutationRecord.target[mutationRecord.attributeName] === mutationRecord.oldValue) {\n continue;\n }\n\n callback();\n }\n }\n\n private get _incrementButtonElement(): HTMLButtonElement {\n if (!this._incrementButton) {\n this._incrementButton = this._component.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.INCREMENT_BUTTON) as HTMLButtonElement;\n }\n return this._incrementButton;\n }\n\n private get _decrementButtonElement(): HTMLButtonElement {\n if (!this._decrementButton) {\n this._decrementButton = this._component.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.DECREMENT_BUTTON) as HTMLButtonElement;\n }\n return this._decrementButton;\n }\n\n private get _textFieldComponent(): TextFieldComponent {\n if (!this._textField) {\n this._textField = this._component.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.TEXT_FIELD) as TextFieldComponent;\n }\n return this._textField;\n }\n\n public get inputElement(): HTMLInputElement | null {\n if (!this._inputElement) {\n this._inputElement = this._component.querySelector<HTMLInputElement>(QUANTITY_FIELD_CONSTANTS.selectors.INPUT);\n }\n return this._inputElement;\n }\n\n private get _inputStep(): number {\n const input = this.inputElement;\n if (!input || this._isNullOrUndefinedOrEmpty(input.step)) {\n return 1;\n }\n\n return +input.step;\n }\n\n private get _inputMax(): number | null {\n const input = this.inputElement;\n if (!input || this._isNullOrUndefinedOrEmpty(input.max)) {\n return null;\n }\n\n return +input.max;\n }\n\n private get _inputMin(): number | null {\n const input = this.inputElement;\n if (!input || this._isNullOrUndefinedOrEmpty(input.min)) {\n return null;\n }\n\n return +input.min;\n }\n\n private _calcPrecision(value: number): number {\n const strVal = String(value);\n if (strVal.includes('.')) {\n return strVal.split('.')[1].length;\n }\n return 0;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IQuantityFieldAdapter } from './quantity-field-adapter';\nimport { QUANTITY_FIELD_CONSTANTS } from './quantity-field-constants';\n\nexport interface IQuantityFieldFoundation extends ICustomElementFoundation {\n required: boolean;\n invalid: boolean;\n}\n\nexport class QuantityFieldFoundation implements IQuantityFieldFoundation {\n private _required: boolean;\n private _invalid: boolean;\n private _incrementButtonSlotChanged: () => void;\n private _decrementButtonSlotChanged: () => void;\n private _incrementValue: () => void;\n private _decrementValue: () => void;\n\n constructor(private _adapter: IQuantityFieldAdapter) {\n this._incrementValue = () => this._adapter.increment();\n this._decrementValue = () => this._adapter.decrement();\n this._incrementButtonSlotChanged = () => this._onIncrementButtonSlotChanged();\n this._decrementButtonSlotChanged = () => this._onDecrementButtonSlotChanged();\n\n this._adapter.addIncrementButtonSlotListener(this._incrementButtonSlotChanged);\n this._adapter.addDecrementButtonSlotListener(this._decrementButtonSlotChanged);\n }\n\n public connect(): void {\n this._adapter.addInputDisabledAttributeChangeListener(() => this._syncDisabledStateOfButtons());\n this._syncDisabledStateOfButtons();\n this._adapter.initializeButtons();\n }\n\n public disconnect(): void {\n this._removeIncrementEventListener();\n this._removeDecrementEventListener();\n this._removeIncrementButtonSlotListener();\n this._removeDecrementButtonSlotListener();\n this._adapter.removeInputDisabledAttributeChangeListener();\n }\n\n private _onIncrementButtonSlotChanged(): void {\n this._addIncrementEventListener();\n }\n\n private _onDecrementButtonSlotChanged(): void {\n this._addDecrementEventListener();\n }\n\n private _addIncrementEventListener(): void {\n this._adapter.addIncrementEventListener('click', this._incrementValue);\n }\n\n private _addDecrementEventListener(): void {\n this._adapter.addDecrementEventListener('click', this._decrementValue);\n }\n\n private _removeIncrementEventListener(): void {\n this._adapter.removeIncrementEventListener('click', this._incrementValue);\n }\n\n private _removeDecrementEventListener(): void {\n this._adapter.removeDecrementEventListener('click', this._decrementValue);\n }\n\n private _removeIncrementButtonSlotListener(): void {\n this._adapter.removeIncrementButtonSlotListener(this._incrementButtonSlotChanged);\n }\n\n private _removeDecrementButtonSlotListener(): void {\n this._adapter.removeDecrementButtonSlotListener(this._decrementButtonSlotChanged);\n }\n\n private _syncDisabledStateOfButtons(): void {\n const isDisabled = this._adapter.inputHasAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n if (isDisabled) {\n this._adapter.addDecrementButtonAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n this._adapter.addIncrementButtonAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n } else {\n this._adapter.removeIncrementButtonAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n this._adapter.removeDecrementButtonAttribute(QUANTITY_FIELD_CONSTANTS.attributes.DISABLED);\n }\n }\n\n public get required(): boolean {\n return this._required;\n }\n public set required(value: boolean) {\n if (this._required === value) {\n return;\n }\n\n this._required = value;\n\n if (this._required) {\n this._adapter.setHostAttribute(QUANTITY_FIELD_CONSTANTS.attributes.REQUIRED);\n this._adapter.addRootClass(QUANTITY_FIELD_CONSTANTS.classes.REQUIRED);\n } else {\n this._adapter.removeHostAttribute(QUANTITY_FIELD_CONSTANTS.attributes.REQUIRED);\n this._adapter.removeRootClass(QUANTITY_FIELD_CONSTANTS.classes.REQUIRED);\n }\n }\n\n public get invalid(): boolean {\n return this._invalid;\n }\n public set invalid(value: boolean) {\n if (this._invalid === value) {\n return;\n }\n\n this._invalid = value;\n\n if (this._invalid) {\n this._adapter.setHostAttribute(QUANTITY_FIELD_CONSTANTS.attributes.INVALID);\n this._adapter.addRootClass(QUANTITY_FIELD_CONSTANTS.classes.INVALID);\n this._adapter.addTextFieldAttribute(QUANTITY_FIELD_CONSTANTS.attributes.INVALID);\n } else {\n this._adapter.removeHostAttribute(QUANTITY_FIELD_CONSTANTS.attributes.INVALID);\n this._adapter.removeRootClass(QUANTITY_FIELD_CONSTANTS.classes.INVALID);\n this._adapter.removeTextFieldAttribute(QUANTITY_FIELD_CONSTANTS.attributes.INVALID);\n }\n }\n\n}\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconRemoveCircleOutline, tylIconControlPoint } from '@tylertech/tyler-icons/standard';\nimport { QuantityFieldAdapter } from './quantity-field-adapter';\nimport { QuantityFieldFoundation } from './quantity-field-foundation';\nimport { QUANTITY_FIELD_CONSTANTS } from './quantity-field-constants';\nimport { IconButtonComponent } from '../icon-button';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-quantity-field\\\" part=\\\"root\\\"><slot name=\\\"label\\\"></slot><div class=\\\"forge-quantity-field__row\\\" part=\\\"row\\\"><slot name=\\\"decrement-button\\\"></slot><slot></slot><slot name=\\\"increment-button\\\"></slot></div><slot name=\\\"helper-text\\\"></slot></div></template>';\nconst styles = '.forge-quantity-field ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:\\\"\\\";vertical-align:0}.forge-quantity-field__row{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.forge-quantity-field ::slotted(forge-icon-button:first-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-right:4px}.forge-quantity-field ::slotted(forge-icon-button:last-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-left:4px}.forge-quantity-field ::slotted(forge-text-field){--forge-text-field-margin-top:0;--forge-text-field-margin-bottom:0}.forge-quantity-field--required ::slotted([slot=label])::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:\\\"*\\\";margin-right:4px}.forge-quantity-field--invalid ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:\\\"\\\";vertical-align:0}:host{display:inline-block}:host([hidden]){display:none}';\nimport { IconRegistry } from '../icon';\n\nexport interface IQuantityFieldComponent extends IBaseComponent {\n invalid: boolean;\n required: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-quantity-field': IQuantityFieldComponent;\n }\n}\n\n/**\n * The web component class behind the `<forge-quantity-field>` custom element.\n * \n * @tag forge-quantity-field\n */\n@CustomElement({\n name: QUANTITY_FIELD_CONSTANTS.elementName,\n dependencies: [\n IconButtonComponent\n ]\n})\nexport class QuantityFieldComponent extends BaseComponent implements IQuantityFieldComponent {\n public static get observedAttributes(): string[] {\n return [\n QUANTITY_FIELD_CONSTANTS.attributes.INVALID,\n QUANTITY_FIELD_CONSTANTS.attributes.REQUIRED\n ];\n }\n\n private _foundation: QuantityFieldFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new QuantityFieldFoundation(new QuantityFieldAdapter(this));\n\n IconRegistry.define([\n tylIconRemoveCircleOutline,\n tylIconControlPoint\n ]);\n }\n\n public connectedCallback(): void {\n if (this._requiredElementsPresent()) {\n this._foundation.connect();\n } else {\n this._ensureElementsPresent().then(() => {\n this._foundation.connect();\n });\n }\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case QUANTITY_FIELD_CONSTANTS.attributes.INVALID:\n this.invalid = coerceBoolean(newValue);\n break;\n case QUANTITY_FIELD_CONSTANTS.attributes.REQUIRED:\n this.required = coerceBoolean(newValue);\n break;\n }\n }\n\n private _ensureElementsPresent(): Promise<void> {\n return new Promise<void>(resolve => {\n if (this._requiredElementsPresent()) {\n resolve();\n return;\n }\n\n const observer = new MutationObserver(changes => {\n const hasAddedNodes = changes.reduce((prev, curr) => prev + curr.addedNodes.length, 0) > 0;\n if (hasAddedNodes) {\n if (this._requiredElementsPresent()) {\n observer.disconnect();\n resolve();\n }\n }\n });\n observer.observe(this, { childList: true, subtree: true });\n });\n }\n\n private _requiredElementsPresent(): boolean {\n const inputElement = this.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.INPUT);\n const decrementElement = this.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.DECREMENT_BUTTON);\n const incrementElement = this.querySelector(QUANTITY_FIELD_CONSTANTS.selectors.INCREMENT_BUTTON);\n return !!inputElement && !!decrementElement && !!incrementElement;\n }\n\n /** Gets/sets the invalid state. */\n @FoundationProperty()\n public declare invalid: boolean;\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\n @FoundationProperty()\n public declare required: boolean;\n}\n", "import { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core/delegates/form-field-component-delegate';\nimport { IconButtonComponentDelegate } from '../icon-button';\nimport { ITextFieldComponentDelegateConfig, TextFieldComponentDelegate } from '../text-field/text-field-component-delegate';\nimport { IQuantityFieldComponent } from './quantity-field';\nimport { QUANTITY_FIELD_CONSTANTS } from './quantity-field-constants';\nimport { tylIconRemoveCircleOutline, tylIconControlPoint } from '@tylertech/tyler-icons/standard';\nimport { IconRegistry } from '../icon';\n\nexport type QuantityFieldComponentDelegateProps = Partial<IQuantityFieldComponent>;\nexport interface IQuantityFieldComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n id?: string;\n label?: string;\n value?: string;\n step?: string;\n helperText?: string;\n textFieldDelegateConfig?: ITextFieldComponentDelegateConfig;\n}\nexport interface IQuantityFieldComponentDelegateConfig extends IBaseComponentDelegateConfig<IQuantityFieldComponent, IQuantityFieldComponentDelegateOptions> {}\n\nexport class QuantityFieldComponentDelegate extends FormFieldComponentDelegate<IQuantityFieldComponent, IQuantityFieldComponentDelegateOptions> {\n private _textFieldDelegate: TextFieldComponentDelegate;\n private _labelElement: HTMLLabelElement | undefined;\n private _helperTextElement: HTMLSpanElement | undefined;\n\n constructor(config?: IQuantityFieldComponentDelegateConfig) {\n super(config);\n IconRegistry.define([tylIconRemoveCircleOutline, tylIconControlPoint]);\n }\n\n protected _build(): IQuantityFieldComponent {\n const quantityField = document.createElement(QUANTITY_FIELD_CONSTANTS.elementName);\n this._attachButton(quantityField, tylIconRemoveCircleOutline.name, 'decrement-button');\n this._attachTextField(quantityField);\n this._attachButton(quantityField, tylIconControlPoint.name, 'increment-button');\n return quantityField;\n }\n\n protected override _configure(): void {\n this.inputElement.value = this._config.options?.value ?? '0';\n this.inputElement.style.textAlign = 'center';\n this.inputElement.style.width = '64px';\n\n if (this._config.options?.helperText) {\n this.setHelperText(this._config.options.helperText);\n }\n if (typeof this._config.options?.label === 'string') {\n this._createLabel(this._config.options.label);\n }\n if (this._config.options?.step !== undefined) {\n this.inputElement.step = this._config.options.step;\n }\n }\n\n public get value(): string {\n return this._textFieldDelegate.inputElement.value;\n }\n public set value(value: string) {\n this._textFieldDelegate.inputElement.value = value;\n }\n\n public get disabled(): boolean {\n return this._textFieldDelegate.inputElement.disabled;\n }\n public set disabled(value: boolean) {\n this._textFieldDelegate.inputElement.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._element.invalid || false;\n }\n public set invalid(value: boolean) {\n this._element.invalid = value;\n }\n\n public get inputElement(): HTMLInputElement {\n return this._textFieldDelegate.inputElement;\n }\n\n public get labelElement(): HTMLLabelElement | undefined {\n return this._labelElement;\n }\n\n public onChange(listener: (value: string) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('input', evt => listener((evt.target as HTMLInputElement).value));\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('blur', evt => listener(evt));\n }\n\n private _attachTextField(quantityField: IQuantityFieldComponent): void {\n const textFieldConfig: ITextFieldComponentDelegateConfig = {\n props: { ...this._config.options?.textFieldDelegateConfig?.props },\n options: {\n ...this._config.options?.textFieldDelegateConfig?.options,\n id: this._config.options?.id,\n type: 'number'\n }\n };\n this._textFieldDelegate = new TextFieldComponentDelegate(textFieldConfig);\n quantityField.appendChild(this._textFieldDelegate.element);\n }\n\n public setLabel(text: string | null): void {\n if (text) {\n if (this._labelElement) {\n this._labelElement.textContent = text;\n } else {\n this._createLabel(text);\n }\n } else if (this._labelElement) {\n this._element.removeChild(this._labelElement);\n this._labelElement = undefined;\n }\n }\n\n public setHelperText(text: string | null): void {\n if (text) {\n if (!this._helperTextElement) {\n this._helperTextElement = document.createElement('span');\n this._helperTextElement.slot = 'helper-text';\n this._element.appendChild(this._helperTextElement);\n }\n this._helperTextElement.textContent = text;\n } else if (this._helperTextElement) {\n this._element.removeChild(this._helperTextElement);\n this._helperTextElement = undefined;\n }\n }\n\n private _createLabel(text: string): void {\n this._labelElement = document.createElement('label');\n this._labelElement.textContent = text;\n this._labelElement.slot = 'label';\n if (this._config.options?.id) {\n this._labelElement.setAttribute('for', this._config.options.id);\n }\n this._element.appendChild(this._labelElement);\n }\n\n private _attachButton(parent: HTMLElement, iconName: string, slot: string): IconButtonComponentDelegate {\n const iconButtonDelegate = new IconButtonComponentDelegate({\n options: {\n iconName,\n parent,\n attributes: { slot }\n }\n });\n return iconButtonDelegate;\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { QuantityFieldComponent } from './quantity-field';\n\nexport * from './quantity-field-adapter';\nexport * from './quantity-field-constants';\nexport * from './quantity-field-foundation';\nexport * from './quantity-field';\nexport * from './quantity-field-component-delegate';\n\nexport function defineQuantityFieldComponent(): void {\n defineCustomElement(QuantityFieldComponent);\n}\n"],
|
|
5
|
+
"mappings": "gfAEA,GAAM,GAA2C,GAAG,kBAE9C,EAAa,CACjB,QAAS,UACT,SAAU,WACV,SAAU,UACZ,EAEM,EAAU,CACd,KAAM,uBACN,QAAS,gCACT,SAAU,gCACZ,EAEM,EAAQ,CACZ,iBAAkB,mBAClB,iBA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
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as h,v as i,x as k}from"./chunk.ALJ3FDXL.js";import{a as E}from"./chunk.5PXABBKU.js";import{a as c}from"./chunk.B3IJU6XJ.js";import{a as O}from"./chunk.OOW3UKT4.js";import{a as C,e as y,g as I,l as L}from"./chunk.MMVZJLXE.js";import{k as b,l as S,p as w}from"./chunk.G76HB2FK.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(t,e,l){var o,n;r._targets.has(t)&&((o=r._observer)===null||o===void 0||o.unobserve(t)),r._targets.set(t,e),r._countTargets(),(n=r._observer)===null||n===void 0||n.observe(t,l)}static unobserve(t){var e;r._targets.delete(t),(e=r._observer)===null||e===void 0||e.unobserve(t),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(t=>{var e;(e=r._targets.get(t.target))===null||e===void 0||e(t)})};var v=class extends E{constructor(e){super(e);this._root=I(e,i.selectors.ROOT)}registerSlotListener(e){this._root.addEventListener("slotchange",e)}registerDidOpenListener(e){this._root.addEventListener(h.events.DID_OPEN,e)}registerDidCloseListener(e){this._root.addEventListener(h.events.DID_CLOSE,e)}observeResize(e){r.observe(this._root,e)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let e=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(e)}refitSlottedPanels(e){let l=e==="horizontal"?this._root.clientWidth:this._root.clientHeight,o=this.getSlottedPanels(),n=o.map(p=>{var m;let s=(m=p.shadowRoot)==null?void 0:m.querySelector(h.selectors.ROOT),u=e==="horizontal"?s==null?void 0:s.clientWidth:s==null?void 0:s.clientHeight;return u!=null?u:0}).reduce((p,s)=>p+s,0);if(n<=l)return;let _=n-l;o.slice().reverse().forEach(p=>{if(_<=0)return;let s=p.getContentSize(),u=p.getCollapsibleSize(),m=Math.min(_,u),T=s-m;p.setContentSize(T),_-=m})}};var g=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=w(e=>this._onResize(e),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),l=t.resizable==="start"?1:-1,o=t.resizable==="start"?1:3;e.forEach(n=>{(n===t||o===2)&&(o+=l),n.style.setProperty(i.customCssProperties.ANIMATING_LAYER,o.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(l=>{l.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var P='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',A='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-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))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-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))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--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;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::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)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.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}.mdc-ripple-surface.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))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',a=class extends L{constructor(){super();y(this,P,A),this._foundation=new g(new v(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,l,o){switch(e){case i.attributes.ORIENTATION:this.orientation=o;break;case i.attributes.DISABLED:this.disabled=b(o);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(o);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(o);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=S(o);break}}layerSlottedPanels(e){this._foundation.layerSlottedPanels(e)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(e){this._foundation.update(e)}refit(){this._foundation.refitSlottedPanels()}};d([c()],a.prototype,"orientation",2),d([c()],a.prototype,"disabled",2),d([c()],a.prototype,"allowClose",2),d([c()],a.prototype,"autoClose",2),d([c()],a.prototype,"autoCloseThreshold",2),a=d([O({name:i.elementName,dependencies:[k]})],a);function de(){C(a)}export{v as a,g as b,a as c,de as d};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as h,v as i,x as k}from"./chunk.5DKXUTFN.js";import{a as E}from"./chunk.5PXABBKU.js";import{a as c}from"./chunk.B3IJU6XJ.js";import{a as O}from"./chunk.OOW3UKT4.js";import{a as C,e as y,g as I,l as L}from"./chunk.MMVZJLXE.js";import{k as b,l as S,p as w}from"./chunk.G76HB2FK.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(t,e,l){var o,n;r._targets.has(t)&&((o=r._observer)===null||o===void 0||o.unobserve(t)),r._targets.set(t,e),r._countTargets(),(n=r._observer)===null||n===void 0||n.observe(t,l)}static unobserve(t){var e;r._targets.delete(t),(e=r._observer)===null||e===void 0||e.unobserve(t),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(t=>{var e;(e=r._targets.get(t.target))===null||e===void 0||e(t)})};var v=class extends E{constructor(e){super(e);this._root=I(e,i.selectors.ROOT)}registerSlotListener(e){this._root.addEventListener("slotchange",e)}registerDidOpenListener(e){this._root.addEventListener(h.events.DID_OPEN,e)}registerDidCloseListener(e){this._root.addEventListener(h.events.DID_CLOSE,e)}observeResize(e){r.observe(this._root,e)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let e=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(e)}refitSlottedPanels(e){let l=e==="horizontal"?this._root.clientWidth:this._root.clientHeight,o=this.getSlottedPanels(),n=o.map(p=>{var m;let s=(m=p.shadowRoot)==null?void 0:m.querySelector(h.selectors.ROOT),u=e==="horizontal"?s==null?void 0:s.clientWidth:s==null?void 0:s.clientHeight;return u!=null?u:0}).reduce((p,s)=>p+s,0);if(n<=l)return;let _=n-l;o.slice().reverse().forEach(p=>{if(_<=0)return;let s=p.getContentSize(),u=p.getCollapsibleSize(),m=Math.min(_,u),T=s-m;p.setContentSize(T),_-=m})}};var g=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=w(e=>this._onResize(e),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),l=t.resizable==="start"?1:-1,o=t.resizable==="start"?1:3;e.forEach(n=>{(n===t||o===2)&&(o+=l),n.style.setProperty(i.customCssProperties.ANIMATING_LAYER,o.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(l=>{l.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var P='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',A='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-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))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-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))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--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;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::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)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.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}.mdc-ripple-surface.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))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',a=class extends L{constructor(){super();y(this,P,A),this._foundation=new g(new v(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,l,o){switch(e){case i.attributes.ORIENTATION:this.orientation=o;break;case i.attributes.DISABLED:this.disabled=b(o);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(o);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(o);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=S(o);break}}layerSlottedPanels(e){this._foundation.layerSlottedPanels(e)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(e){this._foundation.update(e)}refit(){this._foundation.refitSlottedPanels()}};d([c()],a.prototype,"orientation",2),d([c()],a.prototype,"disabled",2),d([c()],a.prototype,"allowClose",2),d([c()],a.prototype,"autoClose",2),d([c()],a.prototype,"autoCloseThreshold",2),a=d([O({name:i.elementName,dependencies:[k]})],a);function de(){C(a)}export{v as a,g as b,a as c,de as d};
|
|
7
|
+
//# sourceMappingURL=chunk.GZEWDHFJ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as l,b as p}from"./chunk.OOW3UKT4.js";import{a as i,l as n}from"./chunk.MMVZJLXE.js";import{f as r}from"./chunk.MCIQXNKY.js";var a=`${p}option-group`,m={LABEL:"label"},o={elementName:a,attributes:m};var e=class extends n{constructor(){super()}static get observedAttributes(){return[o.attributes.LABEL]}attributeChangedCallback(t,c,s){switch(t){case o.attributes.LABEL:this.label=s;break}}get label(){return this._label}set label(t){this._label!==t&&(this._label=t||"",this.setAttribute(o.attributes.LABEL,this._label))}get text(){return this._label}set text(t){this.label=t}};e=r([l({name:o.elementName})],e);function E(){i(e)}export{o as a,e as b,E as c};
|
|
7
|
+
//# sourceMappingURL=chunk.HQJZRTOH.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/select/option-group/option-group-constants.ts", "../../src/select/option-group/option-group.ts", "../../src/select/option-group/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}option-group`;\n\nconst attributes = {\n LABEL: 'label'\n};\n\nexport const OPTION_GROUP_CONSTANTS = {\n elementName,\n attributes\n};\n", "import { CustomElement } from '@tylertech/forge-core';\nimport { ListDropdownOptionGroupBuilder } from '../../list-dropdown/list-dropdown-constants';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { ISelectOption, ISelectOptionGroup } from '../core';\nimport { OPTION_GROUP_CONSTANTS } from './option-group-constants';\n\nexport interface IOptionGroupComponent extends Required<ISelectOptionGroup>, IBaseComponent {\n label: string;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-option-group': IOptionGroupComponent;\n }\n}\n\n/**\n * The custom element class behind the `<forge-option-group>` element.\n * \n * @tag forge-option-group\n */\n@CustomElement({\n name: OPTION_GROUP_CONSTANTS.elementName\n})\nexport class OptionGroupComponent extends BaseComponent implements IOptionGroupComponent {\n public static get observedAttributes(): string[] {\n return [\n OPTION_GROUP_CONSTANTS.attributes.LABEL\n ];\n }\n\n private _label: string;\n\n constructor() {\n super();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case OPTION_GROUP_CONSTANTS.attributes.LABEL:\n this.label = newValue;\n break;\n }\n }\n\n /** Gets/sets the label of this option group. */\n public get label(): string {\n return this._label;\n }\n public set label(value: string) {\n if (this._label !== value) {\n this._label = value || '';\n this.setAttribute(OPTION_GROUP_CONSTANTS.attributes.LABEL, this._label);\n }\n }\n\n /** The child options of this group. */\n public declare options: ISelectOption[];\n\n /** The builder function for the group content. */\n public declare builder: ListDropdownOptionGroupBuilder;\n\n /** Gets/sets the optional group value. */\n public declare value: any;\n\n /** The text content for the group. */\n public get text(): string {\n return this._label;\n }\n public set text(value: string) {\n this.label = value;\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { OptionGroupComponent } from './option-group';\n\nexport * from './option-group-constants';\nexport * from './option-group';\n\nexport function defineOptionGroupComponent(): void {\n defineCustomElement(OptionGroupComponent);\n}\n"],
|
|
5
|
+
"mappings": "sIAEA,GAAM,GAA2C,GAAG,gBAE9C,EAAa,CACjB,MAAO,OACT,EAEa,EAAyB,CACpC,cACA,YACF,ECaO,GAAM,GAAN,aAAmC,EAA+C,CASvF,aAAc,CACZ,MAAM,CACR,CAVA,UAAkB,qBAA+B,CAC/C,MAAO,CACL,EAAuB,WAAW,KACpC,CACF,CAQA,AAAO,yBAAyB,EAAc,EAAkB,EAAwB,CACtF,OAAQ,OACD,GAAuB,WAAW,MACrC,KAAK,MAAQ,EACb,MAEN,CAGA,GAAW,QAAgB,CACzB,MAAO,MAAK,MACd,CACA,GAAW,OAAM,EAAe,CAC9B,AAAI,KAAK,SAAW,GAClB,MAAK,OAAS,GAAS,GACvB,KAAK,aAAa,EAAuB,WAAW,MAAO,KAAK,MAAM,EAE1E,CAYA,GAAW,OAAe,CACxB,MAAO,MAAK,MACd,CACA,GAAW,MAAK,EAAe,CAC7B,KAAK,MAAQ,CACf,CACF,EAhDa,EAAN,GAHP,AAAC,EAAc,CACb,KAAM,EAAuB,WAC/B,CAAC,GACY,GCjBN,YAA4C,CACjD,EAAoB,CAAoB,CAC1C",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as i,b as u,e as y}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as i,b as u,e as y}from"./chunk.XY4N4TSH.js";import{a as g}from"./chunk.5PXABBKU.js";import{a as r}from"./chunk.B3IJU6XJ.js";import{a as _}from"./chunk.OOW3UKT4.js";import{a as b,e as I,l as L}from"./chunk.MMVZJLXE.js";import{r as l,s as m}from"./chunk.R4NDFXVA.js";import{b as h,k as d}from"./chunk.G76HB2FK.js";import{f as a}from"./chunk.MCIQXNKY.js";var p=class extends g{constructor(t){super(t)}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","list")}addListener(t,e){this._component.addEventListener(t,e)}removeListener(t,e){this._component.removeEventListener(t,e)}getListItems(){return Array.from(this._component.children).filter(t=>t.tagName===u.elementName.toUpperCase())}focusNextListItem(){let t=l(this._component,i.selectors.FOCUSABLE_LIST_ITEMS,!1);if(t&&t.length>0){let e=t.indexOf(m()),s=e<t.length-1?e+1:0;s<=t.length-1&&t[s].focus()}}focusPreviousListItem(){let t=l(this._component,i.selectors.FOCUSABLE_LIST_ITEMS,!1);if(t&&t.length>0){let e=t.indexOf(m()),s=e>0?e-1:t.length-1;s>=0&&t[s].focus()}}focusFirstListItem(){let t=l(this._component,i.selectors.FOCUSABLE_LIST_ITEMS,!1);t&&t.length>0&&t[0].focus()}focusLastListItem(){let t=l(this._component,i.selectors.FOCUSABLE_LIST_ITEMS,!1);t&&t.length>0&&t[t.length-1].focus()}setSelectedListItems(t){let e=Array.from(this._component.querySelectorAll(u.elementName));if(e&&e.length)for(let s of e)s.selected=t.includes(s.value)}updateListItems(t){this.getListItems().forEach(e=>t(e))}};var C=["input","button","textarea","select"],c=class{constructor(t){this._adapter=t;this._static=!1;this._dense=!1;this._propagateClick=!0;this._indented=!1;this._keydownListener=e=>this._onKeydown(e)}initialize(){this._adapter.initializeAccessibility(),this._static||this._adapter.addListener("keydown",this._keydownListener),this._selectedValue&&this._adapter.setSelectedListItems(this._selectedValue)}_onKeydown(t){let e=t.key==="ArrowDown"||t.keyCode===40,s=t.key==="ArrowUp"||t.keyCode===38,n=t.key==="Home"||t.keyCode===36,E=t.key==="End"||t.keyCode===35,v=t.key==="Tab"||t.keyCode===9;t.altKey||t.ctrlKey||t.shiftKey||t.metaKey||(v||this._preventDefaultEvent(t),n?this._adapter.focusFirstListItem():E?this._adapter.focusLastListItem():e?this._adapter.focusNextListItem():s&&this._adapter.focusPreviousListItem())}_preventDefaultEvent(t){let e=`${t.target.tagName}`.toLowerCase();C.indexOf(e)===-1&&t.preventDefault()}_setSelectedValue(t){let e=t instanceof Array?t:[t];e=e.filter(s=>h(s)),this._adapter.setSelectedListItems(e)}get static(){return this._static}set static(t){this._static!==t&&(this._static=t,this._static?this._adapter.removeListener("keydown",this._keydownListener):this._adapter.addListener("keydown",this._keydownListener),this._adapter.updateListItems(e=>e.static=this._static),this._static?this._adapter.setHostAttribute(i.attributes.STATIC):this._adapter.removeHostAttribute(i.attributes.STATIC))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.updateListItems(e=>e.dense=this._dense),this._dense?this._adapter.setHostAttribute(i.attributes.DENSE):this._adapter.removeHostAttribute(i.attributes.DENSE))}get propagateClick(){return this._propagateClick}set propagateClick(t){this._propagateClick!==t&&(this._propagateClick=t,this._adapter.updateListItems(e=>e.propagateClick=this._propagateClick),this._adapter.setHostAttribute(i.attributes.PROPAGATE_CLICK,""+!!this._propagateClick))}get indented(){return this._indented}set indented(t){this._indented!==t&&(this._indented=t,this._adapter.updateListItems(e=>e.indented=this._indented),this._indented?this._adapter.setHostAttribute(i.attributes.INDENTED):this._adapter.removeHostAttribute(i.attributes.INDENTED))}get selectedValue(){return this._selectedValue}set selectedValue(t){this._selectedValue=t,this._setSelectedValue(t)}};var T='<template><div class="forge-list" part="root"><slot></slot></div></template>',A=".forge-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);line-height:1.5rem;padding-top:8px;padding-top:var(--forge-list-padding,8px);padding-bottom:8px;padding-bottom:var(--forge-list-padding,8px);margin:0;list-style-type:none}.forge-list:focus{outline:0}:host{display:block;contain:content}:host([hidden]){display:none}",o=class extends L{constructor(){super();I(this,T,A),this._foundation=new c(new p(this))}static get observedAttributes(){return[i.attributes.STATIC,i.attributes.DENSE,i.attributes.SELECTED_VALUE,i.attributes.PROPAGATE_CLICK,i.attributes.INDENTED]}initializedCallback(){this._foundation.initialize()}attributeChangedCallback(e,s,n){switch(e){case i.attributes.STATIC:this.static=d(n);break;case i.attributes.DENSE:this.dense=d(n);break;case i.attributes.PROPAGATE_CLICK:this.propagateClick=d(n);break;case i.attributes.INDENTED:this.indented=d(n);break;case i.attributes.SELECTED_VALUE:this.selectedValue=n;break}}};a([r()],o.prototype,"static",2),a([r()],o.prototype,"dense",2),a([r()],o.prototype,"propagateClick",2),a([r()],o.prototype,"indented",2),a([r()],o.prototype,"selectedValue",2),o=a([_({name:i.elementName,dependencies:[y]})],o);function $(){b(o)}export{p as a,c as b,o as c,$ as d};
|
|
7
|
+
//# sourceMappingURL=chunk.HUX56BCR.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as m,d as E}from"./chunk.2CEW64ZM.js";import{b as O}from"./chunk.EE2LK23T.js";import{y as T}from"./chunk.LZMYHIO2.js";import{d as v}from"./chunk.KBMLP7UT.js";import{a as N,d as C,l as A}from"./chunk.ZAKLVVFO.js";import{a as B}from"./chunk.5PXABBKU.js";import{a}from"./chunk.B3IJU6XJ.js";import{a as g,b as I}from"./chunk.OOW3UKT4.js";import{a as h,d as _,h as c,l as f}from"./chunk.MMVZJLXE.js";import{u as l}from"./chunk.R4NDFXVA.js";import{k as d,l as b}from"./chunk.G76HB2FK.js";import{f as n}from"./chunk.MCIQXNKY.js";var r=class extends B{constructor(i){super(i)}setIcon(i){this._iconElement.name=i}initialize(){this._badgeElement=c(this._component,m.elementName),this._iconElement=c(this._component,N.elementName)}setCount(i){this._badgeElement.textContent=i}setBadgeType(i){this._badgeElement.dot=i}setBadgeTheme(i){l(this._badgeElement,!!i,m.attributes.THEME,i)}setBadgeVisible(i){this._badgeElement.open=i}};var x=`${I}app-bar-notification-button`,H={COUNT:"count",DOT:"dot",THEME:"theme",SHOW_BADGE:"show-badge",ICON:"icon"},t={elementName:x,attributes:H};var p=class{constructor(e){this._adapter=e;this._count=0;this._dot=!1;this._showBadge=!1;this._isInitialized=!1;this._icon="notifications"}initialize(){this._adapter.initialize(),this._adapter.setCount(this._count),this._adapter.setBadgeType(this._dot),this._adapter.setBadgeTheme(this._theme),this._adapter.setBadgeVisible(this._showBadge),this._adapter.setIcon(this._icon),this._isInitialized=!0}disconnect(){this._isInitialized=!1}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._isInitialized&&(this._adapter.setIcon(this._icon),this._adapter.setHostAttribute(t.attributes.ICON,this._icon)))}get count(){return this._count}set count(e){this._count!==e&&(this._count=e,this._isInitialized&&(this._adapter.setCount(this._count),this._adapter.setHostAttribute(t.attributes.COUNT,this._count)))}get dot(){return this._dot}set dot(e){this._dot!==e&&(this._dot=e,this._isInitialized&&(this._adapter.setBadgeType(this._dot),this._dot?this._adapter.setHostAttribute(t.attributes.DOT):this._adapter.removeHostAttribute(t.attributes.DOT)))}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this._isInitialized&&(this._adapter.setBadgeTheme(this._theme),this._adapter.setHostAttribute(t.attributes.THEME,this._theme)))}get showBadge(){return this._showBadge}set showBadge(e){this._showBadge!==e&&(this._showBadge=e,this._isInitialized&&(this._adapter.setBadgeVisible(this._showBadge),this._adapter.setHostAttribute(t.attributes.SHOW_BADGE,this._showBadge)))}};var w='<template><forge-icon-button class="forge-icon-button--with-badge"><button type="button" aria-label="Show notifications"><forge-icon></forge-icon></button><forge-tooltip delay="500" position="bottom">Notifications</forge-tooltip><forge-badge positioned app-bar-context></forge-badge></forge-icon-button></template>',o=class extends f{constructor(){super();C.define(T),this._foundation=new p(new r(this))}static get observedAttributes(){return[t.attributes.COUNT,t.attributes.DOT,t.attributes.THEME,t.attributes.SHOW_BADGE,t.attributes.ICON]}initializedCallback(){_(this,w)}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(i,S,s){switch(i){case t.attributes.COUNT:this.count=b(s);break;case t.attributes.DOT:this.dot=d(s);break;case t.attributes.THEME:this.theme=s;break;case t.attributes.ICON:this.icon=s;break;case t.attributes.SHOW_BADGE:this.showBadge=d(s);break}}};n([a()],o.prototype,"count",2),n([a()],o.prototype,"dot",2),n([a()],o.prototype,"theme",2),n([a()],o.prototype,"icon",2),n([a()],o.prototype,"showBadge",2),o=n([g({name:t.elementName,dependencies:[O,v,E,A]})],o);function nt(){h(o)}export{r as a,t as b,p as c,o as d,nt as e};
|
|
7
|
+
//# sourceMappingURL=chunk.K5WLIDQK.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/app-bar/notification-button/app-bar-notification-button-adapter.ts", "../../src/app-bar/notification-button/app-bar-notification-button-constants.ts", "../../src/app-bar/notification-button/app-bar-notification-button-foundation.ts", "../../src/app-bar/notification-button/app-bar-notification-button.ts", "../../src/app-bar/notification-button/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { getLightElement, toggleAttribute } from '@tylertech/forge-core';\nimport { BADGE_CONSTANTS, IBadgeComponent } from '../../badge';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { IAppBarNotificationButtonComponent } from './app-bar-notification-button';\nimport { ICON_CONSTANTS, IIconComponent } from '../../icon';\n\nexport interface IAppBarNotificationButtonAdapter extends IBaseAdapter {\n initialize(): void;\n setIcon(icon: string): void;\n setCount(value: number): void;\n setBadgeType(dot: boolean): void;\n setBadgeTheme(theme: string): void;\n setBadgeVisible(isVisible: boolean): void;\n}\n\nexport class AppBarNotificationButtonAdapter extends BaseAdapter<IAppBarNotificationButtonComponent> implements IAppBarNotificationButtonAdapter {\n private _badgeElement: IBadgeComponent;\n private _iconElement: IIconComponent;\n\n constructor(component: IAppBarNotificationButtonComponent) {\n super(component);\n }\n\n public setIcon(icon: string): void {\n this._iconElement.name = icon;\n }\n\n public initialize(): void {\n this._badgeElement = getLightElement(this._component, BADGE_CONSTANTS.elementName) as IBadgeComponent;\n this._iconElement = getLightElement(this._component, ICON_CONSTANTS.elementName) as IIconComponent;\n }\n\n public setCount(value: number): void {\n this._badgeElement.textContent = value as any;\n }\n\n public setBadgeType(dot: boolean): void {\n this._badgeElement.dot = dot;\n }\n\n public setBadgeTheme(theme: string): void {\n toggleAttribute(this._badgeElement, !!theme, BADGE_CONSTANTS.attributes.THEME, theme);\n }\n\n public setBadgeVisible(isVisible: boolean): void {\n this._badgeElement.open = isVisible;\n }\n}\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}app-bar-notification-button`;\n\nconst attributes = {\n COUNT: 'count',\n DOT: 'dot',\n THEME: 'theme',\n SHOW_BADGE: 'show-badge',\n ICON: 'icon'\n};\n\nexport const APP_BAR_NOTIFICATION_BUTTON_CONSTANTS = {\n elementName,\n attributes\n};\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IAppBarNotificationButtonAdapter } from './app-bar-notification-button-adapter';\nimport { APP_BAR_NOTIFICATION_BUTTON_CONSTANTS } from './app-bar-notification-button-constants';\n\nexport interface IAppBarNotificationButtonFoundation extends ICustomElementFoundation {\n count: number;\n dot: boolean;\n theme: string;\n showBadge: boolean;\n icon: string;\n}\n\nexport class AppBarNotificationButtonFoundation implements IAppBarNotificationButtonFoundation {\n private _count = 0;\n private _dot = false;\n private _theme: string;\n private _showBadge = false;\n private _isInitialized = false;\n private _icon = 'notifications';\n\n constructor(private _adapter: IAppBarNotificationButtonAdapter) {}\n\n public initialize(): void {\n this._adapter.initialize();\n this._adapter.setCount(this._count);\n this._adapter.setBadgeType(this._dot);\n this._adapter.setBadgeTheme(this._theme);\n this._adapter.setBadgeVisible(this._showBadge);\n this._adapter.setIcon(this._icon);\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._isInitialized = false;\n }\n\n public get icon(): string {\n return this._icon;\n }\n public set icon(value: string) {\n if (this._icon !== value) {\n this._icon = value;\n if (this._isInitialized) {\n this._adapter.setIcon(this._icon);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.ICON, this._icon);\n }\n }\n }\n\n public get count(): number {\n return this._count;\n }\n public set count(value: number) {\n if (this._count !== value) {\n this._count = value;\n if (this._isInitialized) {\n this._adapter.setCount(this._count);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT, this._count as any);\n }\n }\n }\n\n public get dot(): boolean {\n return this._dot;\n }\n public set dot(value: boolean) {\n if (this._dot !== value) {\n this._dot = value;\n if (this._isInitialized) {\n this._adapter.setBadgeType(this._dot);\n if (this._dot) {\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT);\n } else {\n this._adapter.removeHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT);\n }\n }\n }\n }\n\n public get theme(): string {\n return this._theme;\n }\n public set theme(value: string) {\n if (this._theme !== value) {\n this._theme = value;\n if (this._isInitialized) {\n this._adapter.setBadgeTheme(this._theme);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.THEME, this._theme);\n }\n }\n }\n\n public get showBadge(): boolean {\n return this._showBadge;\n }\n public set showBadge(value: boolean) {\n if (this._showBadge !== value) {\n this._showBadge = value;\n if (this._isInitialized) {\n this._adapter.setBadgeVisible(this._showBadge);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.SHOW_BADGE, this._showBadge as any);\n }\n }\n }\n}\n", "import { attachLightTemplate, coerceBoolean, coerceNumber, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconNotifications } from '@tylertech/tyler-icons/standard';\nimport { BadgeComponent } from '../../badge';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { IconComponent, IconRegistry } from '../../icon';\nimport { IconButtonComponent } from '../../icon-button';\nimport { TooltipComponent } from '../../tooltip';\nimport { AppBarNotificationButtonAdapter } from './app-bar-notification-button-adapter';\nimport { APP_BAR_NOTIFICATION_BUTTON_CONSTANTS } from './app-bar-notification-button-constants';\nimport { AppBarNotificationButtonFoundation } from './app-bar-notification-button-foundation';\n\nconst template = '<template><forge-icon-button class=\\\"forge-icon-button--with-badge\\\"><button type=\\\"button\\\" aria-label=\\\"Show notifications\\\"><forge-icon></forge-icon></button><forge-tooltip delay=\\\"500\\\" position=\\\"bottom\\\">Notifications</forge-tooltip><forge-badge positioned app-bar-context></forge-badge></forge-icon-button></template>';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-app-bar-notification-button': IAppBarNotificationButtonComponent;\n }\n}\n\nexport interface IAppBarNotificationButtonComponent extends IBaseComponent {\n count: number;\n dot: boolean;\n showBadge: boolean;\n theme: string;\n icon: string;\n}\n/**\n * The web component class behind the `<forge-app-bar-notification-button>` custom element.\n * \n * @tag forge-app-bar-notification-button\n */\n@CustomElement({\n name: APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.elementName,\n dependencies: [\n IconButtonComponent,\n TooltipComponent,\n BadgeComponent,\n IconComponent\n ]\n})\nexport class AppBarNotificationButtonComponent extends BaseComponent implements IAppBarNotificationButtonComponent {\n public static get observedAttributes(): string[] {\n return [\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.THEME,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.SHOW_BADGE,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.ICON\n ];\n }\n\n private _foundation: AppBarNotificationButtonFoundation;\n\n constructor() {\n super();\n IconRegistry.define(tylIconNotifications);\n this._foundation = new AppBarNotificationButtonFoundation(new AppBarNotificationButtonAdapter(this));\n }\n\n public initializedCallback(): void {\n attachLightTemplate(this, template);\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT:\n this.count = coerceNumber(newValue);\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT:\n this.dot = coerceBoolean(newValue);\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.THEME:\n this.theme = newValue;\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.ICON:\n this.icon = newValue;\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.SHOW_BADGE:\n this.showBadge = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare count: number;\n\n @FoundationProperty()\n public declare dot: boolean;\n\n @FoundationProperty()\n public declare theme: string;\n\n @FoundationProperty()\n public declare icon: string;\n\n @FoundationProperty()\n public declare showBadge: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { AppBarNotificationButtonComponent } from './app-bar-notification-button';\n\nexport * from './app-bar-notification-button-adapter';\nexport * from './app-bar-notification-button-constants';\nexport * from './app-bar-notification-button-foundation';\nexport * from './app-bar-notification-button';\n\nexport function defineAppBarNotificationButtonComponent(): void {\n defineCustomElement(AppBarNotificationButtonComponent);\n}\n"],
|
|
5
|
+
"mappings": "mhBAeO,GAAM,GAAN,aAA8C,EAA4F,CAI/I,YAAY,EAA+C,CACzD,MAAM,CAAS,CACjB,CAEA,AAAO,QAAQ,EAAoB,CACjC,KAAK,aAAa,KAAO,CAC3B,CAEA,AAAO,YAAmB,CACxB,KAAK,cAAgB,EAAgB,KAAK,WAAY,EAAgB,WAAW,EACjF,KAAK,aAAe,EAAgB,KAAK,WAAY,EAAe,WAAW,CACjF,CAEA,AAAO,SAAS,EAAqB,CACnC,KAAK,cAAc,YAAc,CACnC,CAEA,AAAO,aAAa,EAAoB,CACtC,KAAK,cAAc,IAAM,CAC3B,CAEA,AAAO,cAAc,EAAqB,CACxC,EAAgB,KAAK,cAAe,CAAC,CAAC,EAAO,EAAgB,WAAW,MAAO,CAAK,CACtF,CAEA,AAAO,gBAAgB,EAA0B,CAC/C,KAAK,cAAc,KAAO,CAC5B,CACF,EC7CA,GAAM,GAA2C,GAAG,+BAE9C,EAAa,CACjB,MAAO,QACP,IAAK,MACL,MAAO,QACP,WAAY,aACZ,KAAM,MACR,EAEa,EAA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,mBAGA,GADf,AAAC,EAAmB,GACL,AAtDJ,EAsDI,qBAGA,GADf,AAAC,EAAmB,GACL,AAzDJ,EAyDI,oBAGA,GADf,AAAC,EAAmB,GACL,AA5DJ,EA4DI,yBA5DJ,EAAN,GATP,AAAC,EAAc,CACb,KAAM,EAAsC,YAC5C,aAAc,CACZ,EACA,EACA,EACA,CACF,CACF,CAAC,GACY,GC/BN,aAAyD,CAC9D,EAAoB,CAAiC,CACvD",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as w,b as k,c as C}from"./chunk.ORF746AF.js";import{e as L}from"./chunk.ZQCHS2PS.js";import{a as E}from"./chunk.24D46RLZ.js";import{a as _,b as y}from"./chunk.OOW3UKT4.js";import{a as v,e as x,g as s}from"./chunk.MMVZJLXE.js";import{s as u}from"./chunk.R4NDFXVA.js";import{f as h}from"./chunk.MCIQXNKY.js";var g=`${y}chip-field`,M={ROOT:"forge-chip-field"},n={LABEL:"label",HELPER_TEXT:"helper-text",MEMBER:"member"},I={ROOT:`.${M.ROOT}`,INPUT_CONTAINER:".forge-field__input-container",INPUT:"input",LABEL:`[slot=${n.LABEL}]`,HELPER_TEXT:`[slot=${n.HELPER_TEXT}]`,MEMBER:`[slot=${n.MEMBER}]`,LABEL_SLOT:`slot[name=${n.LABEL}]`,MEMBER_SLOT:`slot[name=${n.MEMBER}]`},z={MEMBER_ADDED:`${g}-member-added`,MEMBER_REMOVED:`${g}-member-removed`},o={elementName:g,classes:M,slots:n,selectors:I,events:z};var d=class extends w{constructor(e){super(e)}initialize(){super.initialize(o.selectors.ROOT),this._memberSlot=s(this._component,o.selectors.MEMBER_SLOT),this._inputContainerElement=s(this._component,o.selectors.INPUT_CONTAINER)}addRootListener(e,t){this._rootElement.addEventListener(e,t)}removeRootListener(e,t){this._rootElement.removeEventListener(e,t)}addMemberSlotListener(e){this._memberSlot.addEventListener("slotchange",e)}removeMemberSlotListener(e){this._memberSlot&&this._memberSlot.removeEventListener("slotchange",e)}addInputContainerListener(e,t){this._inputContainerElement.addEventListener(e,t)}removeInputContainerListener(e,t){this._inputContainerElement.removeEventListener(e,t)}fieldHasValue(){return!!this._component.querySelector(o.selectors.MEMBER)||super.inputHasValue()}focusInput(){var e;(e=this._inputElement)==null||e.focus()}tryPropagateClick(e){var t;e instanceof HTMLElement&&e.matches(o.selectors.INPUT_CONTAINER)&&((t=this._inputElement)==null||t.dispatchEvent(new MouseEvent("click")))}getSlottedMemberElements(){return this._component.querySelectorAll(o.selectors.MEMBER)}};var a=class extends k{constructor(e){super(e);this._adapter=e;this._memberSlotListener=()=>this._onMemberSlotChanged(),this._inputContainerMouseDownListener=t=>this._onInputContainerMouseDown(t),this._handleRootKeyDown=t=>this._onRootKeyDown(t),this._handleKeyDown=t=>this._onKeyDown(t)}initialize(){super.initialize(),this._adapter.addMemberSlotListener(this._memberSlotListener),this._adapter.addInputContainerListener("mousedown",this._inputContainerMouseDownListener),this._adapter.addRootListener("keydown",this._handleRootKeyDown),this._adapter.addInputListener("keydown",this._handleKeyDown)}disconnect(){super.disconnect(),this._adapter.removeMemberSlotListener(this._memberSlotListener),this._adapter.removeInputContainerListener("mousedown",this._inputContainerMouseDownListener),this._adapter.removeRootListener("keydown",this._handleRootKeyDown),this._adapter.removeInputListener("keydown",this._handleKeyDown)}_onInputContainerMouseDown(e){e.preventDefault(),this._adapter.focusInput(),this._adapter.tryPropagateClick(e.target)}_onBlur(e){let t=e.target;t.value="",super._onBlur(e)}_onRootKeyDown(e){if(!this._adapter.inputHasValue())switch(e.key){case"Right":case"ArrowRight":this._focusNextMember();break;case"Left":case"ArrowLeft":this._focusPreviousMember();break;case"Backspace":case"Delete":case"Del":this._removeMember();break;default:break}}_onKeyDown(e){let t=e.target;switch(e.key){case"Enter":this._addMember(t);break;case"Esc":case"Escape":case"Tab":t.value="";break;default:break}}_focusNextMember(){let e=this._adapter.getSlottedMemberElements();if(!(e.length<1||this._adapter.inputHasFocus()))for(let t=0;t<e.length;t++){let i=e.item(t),r=e.item(t+1);if(this._memberIsActive(i))if(r){r.focus();break}else this._adapter.focusInput()}}_focusPreviousMember(){let e=this._adapter.getSlottedMemberElements();if(!(e.length<1)){if(this._adapter.inputHasFocus()){e[e.length-1].focus();return}for(let t=0;t<e.length;t++){let i=e.item(t-1),r=e.item(t);if(this._memberIsActive(r)&&i){i.focus();break}}}}_memberIsActive(e){return u()===e||e.hasAttribute("focused")}_getActiveMember(){let e=this._adapter.getSlottedMemberElements();for(let t=0;t<e.length;t++){let i=e.item(t);if(this._memberIsActive(i))return i}return null}_addMember(e){let t=e.value.trim();t&&t.length>0&&this._adapter.emitHostEvent(o.events.MEMBER_ADDED,t),e.value=""}_removeMember(){let e=this._getActiveMember();if(!e){let t=this._adapter.getSlottedMemberElements();e=t.item(t.length-1)}!e||(this._focusNextMember(),this._adapter.emitHostEvent(o.events.MEMBER_REMOVED,e))}_onMemberSlotChanged(){this.floatLabel(this._adapter.fieldHasValue()||this._adapter.inputHasFocus()),this._adapter.getSlottedMemberElements().forEach(e=>e.tabIndex=-1)}};var F='<template><div class="forge-chip-field__wrapper" part="root"><div class="forge-chip-field forge-field" part="container"><slot name="leading"></slot><div class="forge-field__label-input-container" part="label-input-container"><slot name="label"></slot><div class="forge-field__input-container" part="input-container"><slot name="member"></slot><slot></slot></div></div><slot name="trailing"></slot><div class="forge-field__addon-end-container" part="addon-end-container"><slot name="addon-end"></slot></div></div><slot name="helper-text"></slot></div></template>',D='.forge-field::before{content:"";display:-webkit-box;display:flex;position:absolute;top:0;right:0;left:0;z-index:-1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;height:100%;pointer-events:none;border-style:solid;border-style:var(--forge-chip-field-border-style,solid);border-width:1px;-webkit-transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);background-color:transparent;background-color:var(--forge-chip-field-theme-background,transparent);text-align:left}.forge-field[dir=rtl]::before,[dir=rtl] .forge-field::before{text-align:right}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused)::before{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused):hover::before{border-color:rgba(0,0,0,.87);border-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled)::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-field--invalid:not(.forge-field--disabled)::before{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.forge-field--invalid:not(.forge-field--disabled):not(.forge-field--focused):hover::before{border-color:#db8a98;border-color:var(--forge-theme-error-hover,#db8a98)}.forge-field--disabled::before{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--shape-rounded){border-radius:4px}.forge-field:not(.forge-field--shape-rounded)::before{border-radius:4px}.forge-field--shape-rounded{border-radius:28px}.forge-field--shape-rounded::before{border-radius:28px}.forge-field--disabled::before{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-field--focused::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);border-width:2px}.forge-field__label-input-container{position:relative;-webkit-box-flex:1;flex:1 1 0.0001px;height:100%;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;min-width:0}.forge-field ::slotted(label){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65));pointer-events:none;right:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);font-size:var(--mdc-typography-subtitle1-font-size, 1rem);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.1rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;-webkit-transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field ::slotted(label[dir=rtl]),[dir=rtl] .forge-field ::slotted(label){right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.forge-field--dense:not(.forge-field--roomy) ::slotted(label){display:none}.forge-field--required ::slotted(label)::after{content:none}.forge-field--required ::slotted(label)::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:"*";margin-right:4px}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){font-size:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){font-size:1rem}.forge-field--disabled ::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){top:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){top:1.285rem}.forge-field:not(.forge-field--shape-rounded):not(.forge-field--leading) ::slotted(label){left:12px!important}.forge-field--shape-rounded:not(.forge-field--leading) ::slotted(label){left:32px!important}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end):not(.forge-field--shape-rounded) ::slotted(label){padding-right:12px}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end).forge-field--shape-rounded ::slotted(label){padding-right:32px}.forge-field ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65))}.forge-field--disabled ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.54rem) scale(.8125);transform:translateY(-.54rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.72rem) scale(.8125);transform:translateY(-.72rem) scale(.8125);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.62rem) scale(1);transform:translateY(-.62rem) scale(1);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.8rem) scale(1);transform:translateY(-.8rem) scale(1);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.62rem) scale(.8125);transform:translateY(-.62rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.8rem) scale(.8125);transform:translateY(-.8rem) scale(.8125);cursor:auto}.forge-field~::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;min-height:1.5rem;line-height:normal;padding-top:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field:not(.forge-field--dense):not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field--roomy:not(.forge-field--dense)~::slotted([slot=helper-text]){font-size:.875rem}.forge-field--dense:not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field~::slotted([slot=helper-text]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled)~::slotted([slot=helper-text]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field:not(.forge-field--shape-rounded)~::slotted([slot=helper-text]){margin-left:12px}.forge-field--shape-rounded~::slotted([slot=helper-text]){margin-left:32px}.forge-field ::slotted([slot=leading]){display:-webkit-box;display:flex;align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=leading]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=leading]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=leading]){margin:0 4px}.forge-field ::slotted([slot=leading]:not(forge-icon-button)){padding:6px}.forge-field ::slotted([slot=trailing]){align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=trailing]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=trailing]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=trailing]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=trailing]){margin:0 4px}.forge-field ::slotted([slot=trailing]:not(forge-icon-button)){padding:6px}.forge-field__addon-end-container{display:none}.forge-field--addon-end .forge-field__addon-end-container{height:100%;width:auto;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;padding:0 4px;border-left-width:1px;border-left-style:solid;-webkit-transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.54);border-left-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container:hover{border-left-color:rgba(0,0,0,.87);border-left-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#3f51b5;border-left-color:var(--mdc-theme-primary,#3f51b5)}.forge-field.forge-field--invalid:not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#b00020;border-left-color:var(--mdc-theme-error,#b00020)}.forge-field.forge-field--invalid:not(.forge-field--focused):not(.forge-field--disabled) .forge-field__addon-end-container:hover{border-left-color:#db8a98;border-left-color:var(--forge-theme-error-hover,#db8a98)}.forge-field.forge-field--disabled .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.12);border-left-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=addon-end]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=addon-end]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=addon-end]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-chip-field{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;z-index:1;z-index:var(--forge-z-index-surface,1);margin-top:0;margin-top:var(--forge-chip-field-margin-top,0);display:grid;grid-template-columns:[leading] -webkit-min-content [input] 1fr [trailing] -webkit-min-content [addon-end] -webkit-min-content [end];grid-template-columns:[leading] min-content [input] 1fr [trailing] min-content [addon-end] min-content [end]}.forge-chip-field.forge-field--disabled{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);cursor:not-allowed}.forge-chip-field:not(.forge-field--dense):not(.forge-field--roomy){height:auto;min-height:46px;min-height:var(--forge-chip-field-height,46px)}.forge-chip-field.forge-field--roomy:not(.forge-field--dense){height:auto;min-height:3.5rem;min-height:var(--forge-chip-field-height,3.5rem)}.forge-chip-field.forge-field--dense:not(.forge-field--roomy){height:auto;min-height:1.5rem;min-height:var(--forge-chip-field-height,1.5rem)}.forge-field__label-input-container{grid-column-start:input;grid-column-end:trailing}.forge-field__input-container{-webkit-box-flex:1;flex:1 1 0.0001px;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:wrap;-webkit-box-align:start;align-items:flex-start;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field__input-container{padding:2px 12px}.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--shape-rounded:not(.forge-field--leading) .forge-field__input-container{padding-left:32px}.forge-field--leading:not(.forge-field--shape-rounded) .forge-field__input-container{padding-left:0}.forge-field--shape-rounded.forge-field--leading .forge-field__input-container{padding-left:0}.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--shape-rounded:not(.forge-field--trailing):not(.forge-field--addon-end) .forge-field__input-container{padding-right:32px}.forge-field--addon-end:not(.forge-field--shape-rounded) .forge-field__input-container,.forge-field--trailing:not(.forge-field--shape-rounded) .forge-field__input-container{padding-right:0}.forge-field--shape-rounded.forge-field--addon-end .forge-field__input-container,.forge-field--shape-rounded.forge-field--trailing .forge-field__input-container{padding-right:0}.forge-field ::slotted([slot=member]){display:block}.forge-field--disabled ::slotted([slot=member]){--mdc-theme-primary:rgba(0, 0, 0, 0.38);--mdc-theme-primary:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38));cursor:not-allowed;pointer-events:none}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 8px 2px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=member]){margin:6px 12px 6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 6px 2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:20px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:16px}.forge-field ::slotted(input){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);border:none;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;line-height:normal;min-width:0}.forge-field ::slotted(input)::-webkit-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-moz-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):invalid{-webkit-box-shadow:none;box-shadow:none}.forge-field ::slotted(input):-webkit-autofill{z-index:auto!important}.forge-field:not(.forge-field--disabled) ::slotted(input){color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--disabled ::slotted(input){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6));cursor:not-allowed}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){font-size:.875rem;font-size:var(--forge-chip-field-font-size, .875rem)}.forge-field ::slotted(input){-webkit-box-flex:1;flex:1 1 0.0001px;min-width:40px;display:block;align-self:flex-start;padding:0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){margin:4px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){margin:6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){margin:2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){height:1.25rem;line-height:1.25rem}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field ::slotted([slot=leading]){grid-column-start:leading;grid-column-end:input;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=leading]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){padding-top:0;padding-bottom:0}.forge-field ::slotted([slot=trailing]){grid-column-start:trailing;grid-column-end:addon-end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=trailing]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){padding-top:0;padding-bottom:0}.forge-field--addon-end .forge-field__addon-end-container{grid-column-start:addon-end;grid-column-end:end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=addon-end]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:0;margin-bottom:0}.forge-field ::slotted(forge-icon-button){display:-webkit-inline-box!important;display:inline-flex!important}:host{display:block;contain:layout}:host([hidden]){display:none}',l=class extends C{constructor(){super(),x(this,F,D),this._foundation=new a(new d(this))}};l=h([_({name:o.elementName,dependencies:[L]})],l);var T=class extends E{constructor(e){super(e)}_build(){var t,i;let e=document.createElement(o.elementName);return this._inputElement=this._buildInputElement(e),(t=this._config.options)!=null&&t.leadingElement&&(this._config.options.leadingElement.slot="leading",e.appendChild(this._config.options.leadingElement)),(i=this._config.options)!=null&&i.trailingElement&&(this._config.options.trailingElement.slot="trailing",e.appendChild(this._config.options.trailingElement)),e.appendChild(this._inputElement),e}_configure(){var e,t;(e=this._config.options)!=null&&e.helperText&&this.setHelperText(this._config.options.helperText),typeof((t=this._config.options)==null?void 0:t.label)=="string"&&this._createLabel(this._config.options.label)}get value(){return this._inputElement.value}set value(e){this._inputElement.value=e}get disabled(){return this._inputElement.disabled}set disabled(e){this._inputElement.disabled=e}get invalid(){return this._element.invalid||!1}set invalid(e){this._element.invalid=e}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(e){this._inputElement.addEventListener("input",t=>e(t.target.value))}onFocus(e){this._inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._inputElement.addEventListener("blur",t=>e(t))}setLabel(e){e?this._labelElement?this._labelElement.textContent=e:this._createLabel(e):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(e){e?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=e):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}floatLabel(e){this._element.floatLabel(e)}_createLabel(e){var t;this._labelElement=document.createElement("label"),this._labelElement.textContent=e,(t=this._config.options)!=null&&t.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_buildInputElement(e){var i,r,p,b,c;let t=document.createElement("input");return t.type=((i=this._config.options)==null?void 0:i.type)||"text",((r=this._config.options)==null?void 0:r.value)!==void 0&&(t.value=this._config.options.value),(p=this._config.options)!=null&&p.id&&(t.id=this._config.options.id),typeof((b=this._config.options)==null?void 0:b.placeholder)=="string"&&(t.placeholder=(c=this._config.options)==null?void 0:c.placeholder),e.appendChild(t),t}};function le(){v(l)}export{o as a,d as b,a as c,l as d,T as e,le as f};
|
|
7
|
+
//# sourceMappingURL=chunk.LGECRZFO.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/chip-field/chip-field-constants.ts", "../../src/chip-field/chip-field-adapter.ts", "../../src/chip-field/chip-field-foundation.ts", "../../src/chip-field/chip-field.ts", "../../src/chip-field/chip-field-component-delegate.ts", "../../src/chip-field/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}chip-field`;\n\nconst classes = {\n ROOT: 'forge-chip-field'\n};\n\nconst slots = {\n LABEL: 'label',\n HELPER_TEXT: 'helper-text',\n MEMBER: 'member'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n INPUT_CONTAINER: '.forge-field__input-container',\n INPUT: 'input',\n LABEL: `[slot=${slots.LABEL}]`,\n HELPER_TEXT: `[slot=${slots.HELPER_TEXT}]`,\n MEMBER: `[slot=${slots.MEMBER}]`,\n LABEL_SLOT: `slot[name=${slots.LABEL}]`,\n MEMBER_SLOT: `slot[name=${slots.MEMBER}]`\n};\n\nconst events = {\n MEMBER_ADDED: `${elementName}-member-added`,\n MEMBER_REMOVED: `${elementName}-member-removed`\n};\n\nexport const CHIP_FIELD_CONSTANTS = {\n elementName,\n classes,\n slots,\n selectors,\n events\n};\n\nexport {\n type FieldDensityType as ChipFieldDensityType,\n type FieldFloatLabelType as ChipFieldFloatLabelType,\n type FieldShapeType as ChipFieldShapeType\n} from '../field/field-constants';\n", "import { IChipFieldComponent } from './chip-field';\nimport { getShadowElement } from '@tylertech/forge-core';\nimport { CHIP_FIELD_CONSTANTS } from './chip-field-constants';\nimport { FieldAdapter, IFieldAdapter } from '../field/field-adapter';\n\nexport interface IChipFieldAdapter extends IFieldAdapter {\n // root\n addRootListener(type: string, callback: (event: Event) => void): void;\n removeRootListener(type: string, callback: (event: Event) => void): void;\n\n // member\n addMemberSlotListener(listener: (evt: Event) => void): void;\n removeMemberSlotListener(listener: (evt: Event) => void): void;\n\n addInputContainerListener(type: string, callback: (event: Event) => void): void;\n removeInputContainerListener(type: string, callback: (event: Event) => void): void;\n\n // state selectors\n getSlottedMemberElements(): NodeListOf<HTMLElement>;\n\n // state actions\n focusInput(): void;\n tryPropagateClick(target: EventTarget | null): void;\n}\n\nexport class ChipFieldAdapter extends FieldAdapter implements IChipFieldAdapter {\n protected _memberSlot: HTMLSlotElement;\n protected _inputContainerElement: HTMLElement;\n\n constructor(component: IChipFieldComponent) {\n super(component);\n }\n\n public initialize(): void {\n super.initialize(CHIP_FIELD_CONSTANTS.selectors.ROOT);\n this._memberSlot = getShadowElement(this._component, CHIP_FIELD_CONSTANTS.selectors.MEMBER_SLOT) as HTMLSlotElement;\n this._inputContainerElement = getShadowElement(this._component, CHIP_FIELD_CONSTANTS.selectors.INPUT_CONTAINER) as HTMLElement;\n }\n\n public addRootListener(type: string, callback: (event: Event) => void): void {\n this._rootElement.addEventListener(type, callback);\n }\n\n public removeRootListener(type: string, callback: (event: Event) => void): void {\n this._rootElement.removeEventListener(type, callback);\n }\n\n public addMemberSlotListener(listener: (evt: Event) => void): void {\n this._memberSlot.addEventListener('slotchange', listener);\n }\n\n public removeMemberSlotListener(listener: (evt: Event) => void): void {\n if (this._memberSlot) {\n this._memberSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addInputContainerListener(type: string, callback: (event: Event) => void): void {\n this._inputContainerElement.addEventListener(type, callback);\n }\n\n public removeInputContainerListener(type: string, callback: (event: Event) => void): void {\n this._inputContainerElement.removeEventListener(type, callback);\n }\n\n public override fieldHasValue(): boolean {\n const aMemberExists = !!this._component.querySelector(CHIP_FIELD_CONSTANTS.selectors.MEMBER);\n return aMemberExists || super.inputHasValue();\n }\n\n public focusInput(): void {\n this._inputElement?.focus();\n }\n \n public tryPropagateClick(target: EventTarget | null): void {\n // We only propagate the click to the input if it originated from our internal input container\n if (target instanceof HTMLElement && target.matches(CHIP_FIELD_CONSTANTS.selectors.INPUT_CONTAINER)) {\n this._inputElement?.dispatchEvent(new MouseEvent('click'));\n }\n }\n\n public getSlottedMemberElements(): NodeListOf<HTMLElement> {\n return this._component.querySelectorAll<HTMLElement>(CHIP_FIELD_CONSTANTS.selectors.MEMBER);\n }\n}\n", "import { getActiveElement } from '@tylertech/forge-core';\nimport { IChipFieldAdapter } from './chip-field-adapter';\nimport { CHIP_FIELD_CONSTANTS } from './chip-field-constants';\nimport { IFieldFoundation, FieldFoundation } from '../field/field-foundation';\n\nexport interface IChipFieldFoundation extends IFieldFoundation {}\n\nexport class ChipFieldFoundation extends FieldFoundation implements IChipFieldFoundation {\n private _memberSlotListener: () => void;\n private _inputContainerMouseDownListener: (evt: MouseEvent) => void;\n private _handleRootKeyDown: (event: KeyboardEvent) => void;\n private _handleKeyDown: (event: KeyboardEvent) => void;\n\n constructor(protected _adapter: IChipFieldAdapter) {\n super(_adapter);\n this._memberSlotListener = () => this._onMemberSlotChanged();\n this._inputContainerMouseDownListener = evt => this._onInputContainerMouseDown(evt);\n this._handleRootKeyDown = evt => this._onRootKeyDown(evt);\n this._handleKeyDown = evt => this._onKeyDown(evt);\n }\n\n public initialize(): void {\n super.initialize();\n this._adapter.addMemberSlotListener(this._memberSlotListener);\n this._adapter.addInputContainerListener('mousedown', this._inputContainerMouseDownListener);\n this._adapter.addRootListener('keydown', this._handleRootKeyDown);\n this._adapter.addInputListener('keydown', this._handleKeyDown);\n }\n\n public disconnect(): void {\n super.disconnect();\n this._adapter.removeMemberSlotListener(this._memberSlotListener);\n this._adapter.removeInputContainerListener('mousedown', this._inputContainerMouseDownListener);\n this._adapter.removeRootListener('keydown', this._handleRootKeyDown);\n this._adapter.removeInputListener('keydown', this._handleKeyDown);\n }\n\n private _onInputContainerMouseDown(evt: MouseEvent): void {\n evt.preventDefault();\n this._adapter.focusInput();\n this._adapter.tryPropagateClick(evt.target);\n }\n\n protected _onBlur(event: Event): void {\n const input = event.target as HTMLInputElement;\n input.value = '';\n super._onBlur(event);\n }\n\n private _onRootKeyDown(event: KeyboardEvent): void {\n if (this._adapter.inputHasValue()) {\n return;\n }\n\n switch (event.key) {\n case 'Right':\n case 'ArrowRight':\n this._focusNextMember();\n break;\n case 'Left':\n case 'ArrowLeft':\n this._focusPreviousMember();\n break;\n case 'Backspace':\n case 'Delete':\n case 'Del':\n this._removeMember();\n break;\n default:\n break;\n }\n }\n\n private _onKeyDown(event: KeyboardEvent): void {\n const input = event.target as HTMLInputElement;\n switch (event.key) {\n case 'Enter':\n this._addMember(input);\n break;\n case 'Esc':\n case 'Escape':\n case 'Tab':\n input.value = '';\n break;\n default:\n break;\n }\n }\n\n private _focusNextMember(): void {\n const members = this._adapter.getSlottedMemberElements();\n if (members.length < 1 || this._adapter.inputHasFocus()) {\n return;\n }\n\n for (let i = 0; i < members.length; i++) {\n const member = members.item(i);\n const nextMember = members.item(i + 1);\n\n if (this._memberIsActive(member)) {\n if (nextMember) {\n nextMember.focus();\n break;\n } else {\n this._adapter.focusInput();\n }\n }\n }\n }\n\n private _focusPreviousMember(): void {\n const members = this._adapter.getSlottedMemberElements();\n if (members.length < 1) {\n return;\n }\n\n if (this._adapter.inputHasFocus()) {\n members[members.length - 1].focus();\n return;\n }\n\n for (let i = 0; i < members.length; i++) {\n const previousMember = members.item(i - 1);\n const member = members.item(i);\n\n if (this._memberIsActive(member) && previousMember) {\n previousMember.focus();\n break;\n }\n }\n }\n\n private _memberIsActive(ele: HTMLElement): boolean {\n return getActiveElement() === ele || ele.hasAttribute('focused');\n }\n\n private _getActiveMember(): HTMLElement | null {\n const members = this._adapter.getSlottedMemberElements();\n\n for (let i = 0; i < members.length; i++) {\n const member = members.item(i);\n if (this._memberIsActive(member)) {\n return member;\n }\n }\n\n return null;\n }\n\n private _addMember(input: HTMLInputElement): void {\n const cleanInputValue = input.value.trim();\n if (cleanInputValue && cleanInputValue.length > 0) {\n this._adapter.emitHostEvent(CHIP_FIELD_CONSTANTS.events.MEMBER_ADDED, cleanInputValue);\n }\n\n input.value = '';\n }\n\n private _removeMember(): void {\n let memberToRemove = this._getActiveMember();\n if (!memberToRemove) {\n const members = this._adapter.getSlottedMemberElements();\n memberToRemove = members.item(members.length - 1);\n }\n\n if (!memberToRemove) {\n return;\n }\n\n this._focusNextMember();\n this._adapter.emitHostEvent(CHIP_FIELD_CONSTANTS.events.MEMBER_REMOVED, memberToRemove);\n }\n\n private _onMemberSlotChanged(): void {\n this.floatLabel(this._adapter.fieldHasValue() || this._adapter.inputHasFocus());\n this._adapter.getSlottedMemberElements().forEach(x => x.tabIndex = -1);\n }\n}\n", "import { CustomElement, attachShadowTemplate } from '@tylertech/forge-core';\nimport { ChipFieldAdapter } from './chip-field-adapter';\nimport { ChipFieldFoundation } from './chip-field-foundation';\nimport { CHIP_FIELD_CONSTANTS } from './chip-field-constants';\nimport { ChipComponent } from '../chips';\nimport { FieldComponent, IFieldComponent } from '../field/field';\n\nconst template = '<template><div class=\\\"forge-chip-field__wrapper\\\" part=\\\"root\\\"><div class=\\\"forge-chip-field forge-field\\\" part=\\\"container\\\"><slot name=\\\"leading\\\"></slot><div class=\\\"forge-field__label-input-container\\\" part=\\\"label-input-container\\\"><slot name=\\\"label\\\"></slot><div class=\\\"forge-field__input-container\\\" part=\\\"input-container\\\"><slot name=\\\"member\\\"></slot><slot></slot></div></div><slot name=\\\"trailing\\\"></slot><div class=\\\"forge-field__addon-end-container\\\" part=\\\"addon-end-container\\\"><slot name=\\\"addon-end\\\"></slot></div></div><slot name=\\\"helper-text\\\"></slot></div></template>';\nconst styles = '.forge-field::before{content:\\\"\\\";display:-webkit-box;display:flex;position:absolute;top:0;right:0;left:0;z-index:-1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;height:100%;pointer-events:none;border-style:solid;border-style:var(--forge-chip-field-border-style,solid);border-width:1px;-webkit-transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);background-color:transparent;background-color:var(--forge-chip-field-theme-background,transparent);text-align:left}.forge-field[dir=rtl]::before,[dir=rtl] .forge-field::before{text-align:right}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused)::before{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused):hover::before{border-color:rgba(0,0,0,.87);border-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled)::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-field--invalid:not(.forge-field--disabled)::before{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.forge-field--invalid:not(.forge-field--disabled):not(.forge-field--focused):hover::before{border-color:#db8a98;border-color:var(--forge-theme-error-hover,#db8a98)}.forge-field--disabled::before{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--shape-rounded){border-radius:4px}.forge-field:not(.forge-field--shape-rounded)::before{border-radius:4px}.forge-field--shape-rounded{border-radius:28px}.forge-field--shape-rounded::before{border-radius:28px}.forge-field--disabled::before{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-field--focused::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);border-width:2px}.forge-field__label-input-container{position:relative;-webkit-box-flex:1;flex:1 1 0.0001px;height:100%;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;min-width:0}.forge-field ::slotted(label){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65));pointer-events:none;right:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);font-size:var(--mdc-typography-subtitle1-font-size, 1rem);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.1rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;-webkit-transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field ::slotted(label[dir=rtl]),[dir=rtl] .forge-field ::slotted(label){right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.forge-field--dense:not(.forge-field--roomy) ::slotted(label){display:none}.forge-field--required ::slotted(label)::after{content:none}.forge-field--required ::slotted(label)::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:\\\"*\\\";margin-right:4px}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){font-size:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){font-size:1rem}.forge-field--disabled ::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){top:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){top:1.285rem}.forge-field:not(.forge-field--shape-rounded):not(.forge-field--leading) ::slotted(label){left:12px!important}.forge-field--shape-rounded:not(.forge-field--leading) ::slotted(label){left:32px!important}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end):not(.forge-field--shape-rounded) ::slotted(label){padding-right:12px}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end).forge-field--shape-rounded ::slotted(label){padding-right:32px}.forge-field ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65))}.forge-field--disabled ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.54rem) scale(.8125);transform:translateY(-.54rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.72rem) scale(.8125);transform:translateY(-.72rem) scale(.8125);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.62rem) scale(1);transform:translateY(-.62rem) scale(1);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.8rem) scale(1);transform:translateY(-.8rem) scale(1);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.62rem) scale(.8125);transform:translateY(-.62rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.8rem) scale(.8125);transform:translateY(-.8rem) scale(.8125);cursor:auto}.forge-field~::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;min-height:1.5rem;line-height:normal;padding-top:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field:not(.forge-field--dense):not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field--roomy:not(.forge-field--dense)~::slotted([slot=helper-text]){font-size:.875rem}.forge-field--dense:not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field~::slotted([slot=helper-text]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled)~::slotted([slot=helper-text]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field:not(.forge-field--shape-rounded)~::slotted([slot=helper-text]){margin-left:12px}.forge-field--shape-rounded~::slotted([slot=helper-text]){margin-left:32px}.forge-field ::slotted([slot=leading]){display:-webkit-box;display:flex;align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=leading]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=leading]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=leading]){margin:0 4px}.forge-field ::slotted([slot=leading]:not(forge-icon-button)){padding:6px}.forge-field ::slotted([slot=trailing]){align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=trailing]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=trailing]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=trailing]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=trailing]){margin:0 4px}.forge-field ::slotted([slot=trailing]:not(forge-icon-button)){padding:6px}.forge-field__addon-end-container{display:none}.forge-field--addon-end .forge-field__addon-end-container{height:100%;width:auto;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;padding:0 4px;border-left-width:1px;border-left-style:solid;-webkit-transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.54);border-left-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container:hover{border-left-color:rgba(0,0,0,.87);border-left-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#3f51b5;border-left-color:var(--mdc-theme-primary,#3f51b5)}.forge-field.forge-field--invalid:not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#b00020;border-left-color:var(--mdc-theme-error,#b00020)}.forge-field.forge-field--invalid:not(.forge-field--focused):not(.forge-field--disabled) .forge-field__addon-end-container:hover{border-left-color:#db8a98;border-left-color:var(--forge-theme-error-hover,#db8a98)}.forge-field.forge-field--disabled .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.12);border-left-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=addon-end]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=addon-end]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=addon-end]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-chip-field{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;z-index:1;z-index:var(--forge-z-index-surface,1);margin-top:0;margin-top:var(--forge-chip-field-margin-top,0);display:grid;grid-template-columns:[leading] -webkit-min-content [input] 1fr [trailing] -webkit-min-content [addon-end] -webkit-min-content [end];grid-template-columns:[leading] min-content [input] 1fr [trailing] min-content [addon-end] min-content [end]}.forge-chip-field.forge-field--disabled{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);cursor:not-allowed}.forge-chip-field:not(.forge-field--dense):not(.forge-field--roomy){height:auto;min-height:46px;min-height:var(--forge-chip-field-height,46px)}.forge-chip-field.forge-field--roomy:not(.forge-field--dense){height:auto;min-height:3.5rem;min-height:var(--forge-chip-field-height,3.5rem)}.forge-chip-field.forge-field--dense:not(.forge-field--roomy){height:auto;min-height:1.5rem;min-height:var(--forge-chip-field-height,1.5rem)}.forge-field__label-input-container{grid-column-start:input;grid-column-end:trailing}.forge-field__input-container{-webkit-box-flex:1;flex:1 1 0.0001px;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:wrap;-webkit-box-align:start;align-items:flex-start;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field__input-container{padding:2px 12px}.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--shape-rounded:not(.forge-field--leading) .forge-field__input-container{padding-left:32px}.forge-field--leading:not(.forge-field--shape-rounded) .forge-field__input-container{padding-left:0}.forge-field--shape-rounded.forge-field--leading .forge-field__input-container{padding-left:0}.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--shape-rounded:not(.forge-field--trailing):not(.forge-field--addon-end) .forge-field__input-container{padding-right:32px}.forge-field--addon-end:not(.forge-field--shape-rounded) .forge-field__input-container,.forge-field--trailing:not(.forge-field--shape-rounded) .forge-field__input-container{padding-right:0}.forge-field--shape-rounded.forge-field--addon-end .forge-field__input-container,.forge-field--shape-rounded.forge-field--trailing .forge-field__input-container{padding-right:0}.forge-field ::slotted([slot=member]){display:block}.forge-field--disabled ::slotted([slot=member]){--mdc-theme-primary:rgba(0, 0, 0, 0.38);--mdc-theme-primary:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38));cursor:not-allowed;pointer-events:none}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 8px 2px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=member]){margin:6px 12px 6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 6px 2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:20px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:16px}.forge-field ::slotted(input){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);border:none;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;line-height:normal;min-width:0}.forge-field ::slotted(input)::-webkit-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-moz-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):invalid{-webkit-box-shadow:none;box-shadow:none}.forge-field ::slotted(input):-webkit-autofill{z-index:auto!important}.forge-field:not(.forge-field--disabled) ::slotted(input){color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--disabled ::slotted(input){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6));cursor:not-allowed}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){font-size:.875rem;font-size:var(--forge-chip-field-font-size, .875rem)}.forge-field ::slotted(input){-webkit-box-flex:1;flex:1 1 0.0001px;min-width:40px;display:block;align-self:flex-start;padding:0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){margin:4px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){margin:6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){margin:2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){height:1.25rem;line-height:1.25rem}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field ::slotted([slot=leading]){grid-column-start:leading;grid-column-end:input;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=leading]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){padding-top:0;padding-bottom:0}.forge-field ::slotted([slot=trailing]){grid-column-start:trailing;grid-column-end:addon-end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=trailing]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){padding-top:0;padding-bottom:0}.forge-field--addon-end .forge-field__addon-end-container{grid-column-start:addon-end;grid-column-end:end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=addon-end]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:0;margin-bottom:0}.forge-field ::slotted(forge-icon-button){display:-webkit-inline-box!important;display:inline-flex!important}:host{display:block;contain:layout}:host([hidden]){display:none}';\n\nexport interface IChipFieldComponent extends IFieldComponent { }\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-chip-field': IChipFieldComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-chip-field-member-added': CustomEvent<string>;\n 'forge-chip-field-member-removed': CustomEvent<HTMLElement>;\n }\n}\n\n/**\n * The web component class behind the `<forge-chip-field>` custom element.\n * \n * @tag forge-chip-field\n */\n@CustomElement({\n name: CHIP_FIELD_CONSTANTS.elementName,\n dependencies: [ChipComponent]\n})\nexport class ChipFieldComponent extends FieldComponent<ChipFieldFoundation> implements IChipFieldComponent {\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new ChipFieldFoundation(new ChipFieldAdapter(this));\n }\n}\n", "import { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core/delegates/form-field-component-delegate';\nimport { IChipFieldComponent } from './chip-field';\nimport { CHIP_FIELD_CONSTANTS } from './chip-field-constants';\n\nexport type ChipFieldComponentDelegateProps = Partial<IChipFieldComponent>;\nexport interface IChipFieldComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n id?: string;\n label?: string;\n type?: string;\n value?: string;\n helperText?: string;\n placeholder?: string;\n leadingElement?: HTMLElement;\n trailingElement?: HTMLElement;\n}\nexport interface IChipFieldComponentDelegateConfig extends IBaseComponentDelegateConfig<IChipFieldComponent, IChipFieldComponentDelegateOptions> {}\n\nexport class ChipFieldComponentDelegate extends FormFieldComponentDelegate<IChipFieldComponent, IChipFieldComponentDelegateOptions> {\n private _inputElement: HTMLInputElement;\n private _labelElement: HTMLLabelElement | undefined;\n private _helperTextElement: HTMLSpanElement | undefined;\n\n constructor(config?: IChipFieldComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IChipFieldComponent {\n const chipField = document.createElement(CHIP_FIELD_CONSTANTS.elementName);\n\n this._inputElement = this._buildInputElement(chipField);\n\n if (this._config.options?.leadingElement) {\n this._config.options.leadingElement.slot = 'leading';\n chipField.appendChild(this._config.options.leadingElement);\n }\n if (this._config.options?.trailingElement) {\n this._config.options.trailingElement.slot = 'trailing';\n chipField.appendChild(this._config.options.trailingElement);\n }\n\n chipField.appendChild(this._inputElement);\n return chipField;\n }\n\n protected override _configure(): void {\n if (this._config.options?.helperText) {\n this.setHelperText(this._config.options.helperText);\n }\n if (typeof this._config.options?.label === 'string') {\n this._createLabel(this._config.options.label);\n }\n }\n\n public get value(): string {\n return this._inputElement.value;\n }\n public set value(value: string) {\n this._inputElement.value = value;\n }\n\n public get disabled(): boolean {\n return this._inputElement.disabled;\n }\n public set disabled(value: boolean) {\n this._inputElement.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._element.invalid || false;\n }\n public set invalid(value: boolean) {\n this._element.invalid = value;\n }\n\n public get inputElement(): HTMLInputElement {\n return this._inputElement;\n }\n\n public get labelElement(): HTMLLabelElement | undefined {\n return this._labelElement;\n }\n\n public onChange(listener: (value: string) => void): void {\n this._inputElement.addEventListener('input', evt => listener((evt.target as HTMLInputElement).value));\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._inputElement.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._inputElement.addEventListener('blur', evt => listener(evt));\n }\n\n public setLabel(text: string | null): void {\n if (text) {\n if (this._labelElement) {\n this._labelElement.textContent = text;\n } else {\n this._createLabel(text);\n }\n } else if (this._labelElement) {\n this._element.removeChild(this._labelElement);\n this._labelElement = undefined;\n }\n }\n\n public setHelperText(text: string | null): void {\n if (text) {\n if (!this._helperTextElement) {\n this._helperTextElement = document.createElement('span');\n this._helperTextElement.slot = 'helper-text';\n this._element.appendChild(this._helperTextElement);\n }\n this._helperTextElement.textContent = text;\n } else if (this._helperTextElement) {\n this._element.removeChild(this._helperTextElement);\n this._helperTextElement = undefined;\n }\n }\n\n public floatLabel(value: boolean): void {\n this._element.floatLabel(value);\n }\n\n private _createLabel(text: string): void {\n this._labelElement = document.createElement('label');\n this._labelElement.textContent = text;\n if (this._config.options?.id) {\n this._labelElement.setAttribute('for', this._config.options.id);\n }\n this._element.appendChild(this._labelElement);\n }\n\n private _buildInputElement(chipField: IChipFieldComponent): HTMLInputElement {\n const inputElement = document.createElement('input');\n inputElement.type = this._config.options?.type || 'text';\n\n if (this._config.options?.value !== undefined) {\n inputElement.value = this._config.options.value;\n }\n if (this._config.options?.id) {\n inputElement.id = this._config.options.id;\n }\n if (typeof this._config.options?.placeholder === 'string') {\n inputElement.placeholder = this._config.options?.placeholder;\n }\n\n chipField.appendChild(inputElement);\n return inputElement;\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { ChipFieldComponent } from './chip-field';\n\nexport * from './chip-field-adapter';\nexport * from './chip-field-component-delegate';\nexport * from './chip-field-constants';\nexport * from './chip-field-foundation';\nexport * from './chip-field';\n\nexport function defineChipFieldComponent(): void {\n defineCustomElement(ChipFieldComponent);\n}\n"],
|
|
5
|
+
"mappings": "2TAEA,GAAM,GAA2C,GAAG,cAE9C,EAAU,CACd,KAAM,kBACR,EAEM,EAAQ,CACZ,MAAO,QACP,YAAa,cACb,OAAQ,QACV,EAEM,EAAY,CAChB,KAAM,IAAI,EAAQ,OAClB,gBAAiB,gCACjB,MAAO,QACP,MAAO,SAAS,EAAM,SACtB,YAAa,SAAS,EAAM,eAC5B,OAAQ,SAAS,EAAM,UACvB,WAAY,aAAa,EAAM,SAC/B,YAAa,aAAa,EAAM,SAClC,EAEM,EAAS,CACb,aAAc,GAAG,iBACjB,eAAgB,GAAG,kBACrB,EAEa,EAAuB,CAClC,cACA,UACA,QACA,YACA,QACF,ECXO,GAAM,GAAN,aAA+B,EAA0C,CAI9E,YAAY,EAAgC,CAC1C,MAAM,CAAS,CACjB,CAEA,AAAO,YAAmB,CACxB,MAAM,WAAW,EAAqB,UAAU,IAAI,EACpD,KAAK,YAAc,EAAiB,KAAK,WAAY,EAAqB,UAAU,WAAW,EAC/F,KAAK,uBAAyB,EAAiB,KAAK,WAAY,EAAqB,UAAU,eAAe,CAChH,CAEA,AAAO,gBAAgB,EAAc,EAAwC,CAC3E,KAAK,aAAa,iBAAiB,EAAM,CAAQ,CACnD,CAEA,AAAO,mBAAmB,EAAc,EAAwC,CAC9E,KAAK,aAAa,oBAAoB,EAAM,CAAQ,CACtD,CAEA,AAAO,sBAAsB,EAAsC,CACjE,KAAK,YAAY,iBAAiB,aAAc,CAAQ,CAC1D,CAEA,AAAO,yBAAyB,EAAsC,CACpE,AAAI,KAAK,aACP,KAAK,YAAY,oBAAoB,aAAc,CAAQ,CAE/D,CAEA,AAAO,0BAA0B,EAAc,EAAwC,CACrF,KAAK,uBAAuB,iBAAiB,EAAM,CAAQ,CAC7D,CAEA,AAAO,6BAA6B,EAAc,EAAwC,CACxF,KAAK,uBAAuB,o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IO,aAA0C,CAC/C,EAAoB,CAAkB,CACxC",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as z,b as B,c as H,d as K,e as U}from"./chunk.YONRMJU5.js";import{E as S}from"./chunk.M4KJNCLO.js";import{F as O}from"./chunk.PBJEZJTY.js";import{a}from"./chunk.E43TT4RI.js";import{a as m}from"./chunk.IARIRFXO.js";import{e as D}from"./chunk.AWCBH5KW.js";import{e as w}from"./chunk.UOWU5VVK.js";import{b as N}from"./chunk.JMXJXZTS.js";import{l as M}from"./chunk.LZMYHIO2.js";import{a as V}from"./chunk.D4SNVKDA.js";import{d as R,l as x}from"./chunk.JXY6MTP3.js";import{a as F}from"./chunk.24D46RLZ.js";import{b}from"./chunk.HYMB3XDK.js";import{e as l}from"./chunk.3MP6OFVU.js";import{a as C}from"./chunk.B3IJU6XJ.js";import{a as A,b as L}from"./chunk.OOW3UKT4.js";import{a as y,e as P,i as E}from"./chunk.MMVZJLXE.js";import{s as v}from"./chunk.R4NDFXVA.js";import{f as g,g as k}from"./chunk.G76HB2FK.js";import{f as h}from"./chunk.MCIQXNKY.js";var d=`${L}date-range-picker`,u=class{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new u(this)}},q={FROM:"from",TO:"to",END_VALUE:"end-value"},G={INPUT:"input"},W={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},i={elementName:d,selectors:G,events:W,observedAttributes:q};var _=class extends K{constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(i.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(i.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${i.elementName} requires two inputs`)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new O(t,this._dropdownIdentifier)}initializeMask(t){this._fromInputMask&&this._fromInputMask.destroy(),this._fromInputMask=new b(this._fromInputElement,t)}initializeToMask(t){this._toInputMask&&this._toInputMask.destroy(),this._toInputMask=new b(this._toInputElement,t)}destroy(){super.destroy(),this._destroyToValueChangeListener()}destroyMask(){this._fromInputMask&&(this._fromInputMask.destroy(),this._fromInputMask=void 0),this._toInputMask&&(this._toInputMask.destroy(),this._toInputMask=void 0)}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier))}addInputListener(t,e,n){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:n})}addToInputListener(t,e,n){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:n})}removeInputListener(t,e){var n;(n=this._fromInputElement)==null||n.removeEventListener(t,e)}removeToInputListener(t,e){var n;(n=this._toInputElement)==null||n.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let n=D(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(n)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=D(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(){return this._toInputElement===v()||this._fromInputElement===v()}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){E(this._fromInputElement,t,e)}emitToInputEvent(t,e){E(this._toInputElement,t,e)}_createToggleElement(){return H("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}};var c=class extends U{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(),this._toInputBlurListener=e=>this._onToInputBlur(e)}_initializeState(){this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let n=this._getTypedValue(t&&t.from||null),o=this._getTypedValue(t&&t.to||null),p=new u({from:n,to:o});return this._adapter.emitHostEvent(i.events.CHANGE,p,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(i.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(i.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new a({from:this._from||t,to:this._to||void 0}):new a({from:t});!this._isDateRangeAcceptable(e)||(this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t))}_onClear(){this._onDateSelected({date:null,range:new a,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(k(e)&&this._isDateValueAcceptable(e)){let n=this._formatDate(e);n&&this._adapter.setToInputValue(n,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(t){if(!(t!=null&&t.to))return!0;let e=()=>this._isDateValueAcceptable(t.from),n=()=>this._isDateValueAcceptable(t.to),o=()=>(t==null?void 0:t.from)&&(t==null?void 0:t.to)?t.from.getTime()<=t.to.getTime():!0;return e()&&n()&&o()}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let n=this._formatDate(e&&e.from||null),o=this._formatDate(e&&e.to||null);this._adapter.setInputValue(n,this._notifyInputValueChanges),this._adapter.setToInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(o?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeMask(){if(super._initializeMask(),this._masked){let t={showMaskFormat:this._showMaskFormat,pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,n,o,p)=>this._prepareMaskCallback.call(null,e,n,o,p)),this._adapter.initializeToMask(t)}}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(i.events.INPUT,e),!l(n,this._from)&&this._isDateValueAcceptable(n)&&this._emitChangeEvent(new a({from:n||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(i.events.INPUT,e),!l(n,this._to)&&this._isDateValueAcceptable(n)&&this._emitChangeEvent(new a({from:this._from||void 0,to:n||void 0}))}_onToInputFocus(){this._adapter.selectToInputText()}_onToInputBlur(t){this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);l(n,this._from)||(this.from=n,this._emitChangeEvent(new a({from:n||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);l(n,this._to)||(this.to=n,this._emitChangeEvent(new a({from:this._from||void 0,to:n||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){!t||(t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to})}get from(){let t=this._getTypedValue(this._from);return t?g(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new a({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?g(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new a({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var X="<template><slot></slot></template>",j=":host{display:block}:host([hidden]){display:none}",s=class extends B{constructor(){super();R.define(M),P(this,X,j),this._foundation=new c(new _(this))}static get observedAttributes(){return[...Object.values(z.observedAttributes),i.observedAttributes.FROM,i.observedAttributes.TO]}attributeChangedCallback(t,e,n){switch(t){case i.observedAttributes.FROM:this.from=n;return;case i.observedAttributes.TO:this.to=n;return}super.attributeChangedCallback(t,e,n)}};h([C()],s.prototype,"from",2),h([C()],s.prototype,"to",2),s=h([A({name:i.elementName,dependencies:[w,S,N,x]})],s);var $=class extends F{constructor(t){super(t)}_build(){let t=document.createElement(i.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector(`input[${m.attributes.MULTI_INPUT}-0]`)}get toInput(){return this._textField.querySelector(`input[${m.attributes.MULTI_INPUT}-1]`)}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(i.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var n,o,p,I,T;this._textField=document.createElement(m.elementName),(n=this._config.options)!=null&&n.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((p=this._config.options)==null?void 0:p.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((I=this._config.options)==null?void 0:I.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((T=this._config.options)==null?void 0:T.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function $t(){y(s)}export{u as a,i as b,_ as c,c as d,s as e,$ as f,$t as g};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as z,b as B,c as H,d as K,e as U}from"./chunk.XMI5RBZQ.js";import{E as S}from"./chunk.XCUYZZV4.js";import{F as O}from"./chunk.65G33MJV.js";import{a}from"./chunk.E43TT4RI.js";import{a as m}from"./chunk.IARIRFXO.js";import{e as D}from"./chunk.AWCBH5KW.js";import{e as w}from"./chunk.PV5MABYN.js";import{b as N}from"./chunk.EE2LK23T.js";import{l as M}from"./chunk.LZMYHIO2.js";import{a as V}from"./chunk.D4SNVKDA.js";import{d as R,l as x}from"./chunk.ZAKLVVFO.js";import{a as F}from"./chunk.24D46RLZ.js";import{b}from"./chunk.HYMB3XDK.js";import{e as l}from"./chunk.CZIQTYFJ.js";import{a as C}from"./chunk.B3IJU6XJ.js";import{a as A,b as L}from"./chunk.OOW3UKT4.js";import{a as y,e as P,i as E}from"./chunk.MMVZJLXE.js";import{s as v}from"./chunk.R4NDFXVA.js";import{f as g,g as k}from"./chunk.G76HB2FK.js";import{f as h}from"./chunk.MCIQXNKY.js";var d=`${L}date-range-picker`,u=class{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new u(this)}},q={FROM:"from",TO:"to",END_VALUE:"end-value"},G={INPUT:"input"},W={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},i={elementName:d,selectors:G,events:W,observedAttributes:q};var _=class extends K{constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(i.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(i.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${i.elementName} requires two inputs`)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new O(t,this._dropdownIdentifier)}initializeMask(t){this._fromInputMask&&this._fromInputMask.destroy(),this._fromInputMask=new b(this._fromInputElement,t)}initializeToMask(t){this._toInputMask&&this._toInputMask.destroy(),this._toInputMask=new b(this._toInputElement,t)}destroy(){super.destroy(),this._destroyToValueChangeListener()}destroyMask(){this._fromInputMask&&(this._fromInputMask.destroy(),this._fromInputMask=void 0),this._toInputMask&&(this._toInputMask.destroy(),this._toInputMask=void 0)}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier))}addInputListener(t,e,n){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:n})}addToInputListener(t,e,n){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:n})}removeInputListener(t,e){var n;(n=this._fromInputElement)==null||n.removeEventListener(t,e)}removeToInputListener(t,e){var n;(n=this._toInputElement)==null||n.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let n=D(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(n)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=D(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(){return this._toInputElement===v()||this._fromInputElement===v()}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){E(this._fromInputElement,t,e)}emitToInputEvent(t,e){E(this._toInputElement,t,e)}_createToggleElement(){return H("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}};var c=class extends U{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(),this._toInputBlurListener=e=>this._onToInputBlur(e)}_initializeState(){this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let n=this._getTypedValue(t&&t.from||null),o=this._getTypedValue(t&&t.to||null),p=new u({from:n,to:o});return this._adapter.emitHostEvent(i.events.CHANGE,p,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(i.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(i.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new a({from:this._from||t,to:this._to||void 0}):new a({from:t});!this._isDateRangeAcceptable(e)||(this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t))}_onClear(){this._onDateSelected({date:null,range:new a,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(k(e)&&this._isDateValueAcceptable(e)){let n=this._formatDate(e);n&&this._adapter.setToInputValue(n,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(t){if(!(t!=null&&t.to))return!0;let e=()=>this._isDateValueAcceptable(t.from),n=()=>this._isDateValueAcceptable(t.to),o=()=>(t==null?void 0:t.from)&&(t==null?void 0:t.to)?t.from.getTime()<=t.to.getTime():!0;return e()&&n()&&o()}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let n=this._formatDate(e&&e.from||null),o=this._formatDate(e&&e.to||null);this._adapter.setInputValue(n,this._notifyInputValueChanges),this._adapter.setToInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(o?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeMask(){if(super._initializeMask(),this._masked){let t={showMaskFormat:this._showMaskFormat,pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,n,o,p)=>this._prepareMaskCallback.call(null,e,n,o,p)),this._adapter.initializeToMask(t)}}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(i.events.INPUT,e),!l(n,this._from)&&this._isDateValueAcceptable(n)&&this._emitChangeEvent(new a({from:n||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(i.events.INPUT,e),!l(n,this._to)&&this._isDateValueAcceptable(n)&&this._emitChangeEvent(new a({from:this._from||void 0,to:n||void 0}))}_onToInputFocus(){this._adapter.selectToInputText()}_onToInputBlur(t){this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);l(n,this._from)||(this.from=n,this._emitChangeEvent(new a({from:n||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);l(n,this._to)||(this.to=n,this._emitChangeEvent(new a({from:this._from||void 0,to:n||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){t||(t={from:null,to:null}),t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to}}get from(){let t=this._getTypedValue(this._from);return t?g(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new a({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?g(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new a({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var X="<template><slot></slot></template>",j=":host{display:block}:host([hidden]){display:none}",s=class extends B{constructor(){super();R.define(M),P(this,X,j),this._foundation=new c(new _(this))}static get observedAttributes(){return[...Object.values(z.observedAttributes),i.observedAttributes.FROM,i.observedAttributes.TO]}attributeChangedCallback(t,e,n){switch(t){case i.observedAttributes.FROM:this.from=n;return;case i.observedAttributes.TO:this.to=n;return}super.attributeChangedCallback(t,e,n)}};h([C()],s.prototype,"from",2),h([C()],s.prototype,"to",2),s=h([A({name:i.elementName,dependencies:[w,S,N,x]})],s);var $=class extends F{constructor(t){super(t)}_build(){let t=document.createElement(i.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector(`input[${m.attributes.MULTI_INPUT}-0]`)}get toInput(){return this._textField.querySelector(`input[${m.attributes.MULTI_INPUT}-1]`)}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(i.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var n,o,p,I,T;this._textField=document.createElement(m.elementName),(n=this._config.options)!=null&&n.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((p=this._config.options)==null?void 0:p.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((I=this._config.options)==null?void 0:I.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((T=this._config.options)==null?void 0:T.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function $t(){y(s)}export{u as a,i as b,_ as c,c as d,s as e,$ as f,$t as g};
|
|
7
|
+
//# sourceMappingURL=chunk.LYAS4FAN.js.map
|