@tylertech/forge 3.0.0-next.6 → 3.0.0-next.8
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 +2084 -1482
- 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/card/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.Q6IP5GJ6.js → chunk.246JM2YT.js} +2 -2
- package/dist/esm/chunks/{chunk.DHTAH23Y.js → chunk.24L5GDD2.js} +2 -2
- package/dist/esm/chunks/{chunk.ZWTZJJ6H.js → chunk.2IQGDFQS.js} +2 -2
- package/dist/esm/chunks/{chunk.DAGXGSX7.js → chunk.2LRDPTHK.js} +2 -2
- package/dist/esm/chunks/{chunk.Q47M2LB5.js → chunk.2QFIMTVP.js} +2 -2
- package/dist/esm/chunks/{chunk.IVB6XTHQ.js → chunk.2TQONIPK.js} +2 -2
- package/dist/esm/chunks/{chunk.DXHKS7XO.js → chunk.2XFVFZ3P.js} +2 -2
- package/dist/esm/chunks/{chunk.3ICROIFD.js → chunk.2YAU7AXH.js} +2 -2
- package/dist/esm/chunks/{chunk.5B2CGITX.js → chunk.2YX7ASSX.js} +2 -2
- package/dist/esm/chunks/{chunk.QLNGQCJX.js → chunk.2ZTERGYF.js} +2 -2
- package/dist/esm/chunks/{chunk.BIJJCDHE.js → chunk.3AF7CJP2.js} +2 -2
- package/dist/esm/chunks/{chunk.BIJJCDHE.js.map → chunk.3AF7CJP2.js.map} +1 -1
- package/dist/esm/chunks/{chunk.Y2ANYRZH.js → chunk.4EB5NVCK.js} +2 -2
- package/dist/esm/chunks/{chunk.SACZLJPQ.js → chunk.4LVS2EYJ.js} +2 -2
- package/dist/esm/chunks/chunk.57XQ4F6F.js +12 -0
- package/dist/esm/chunks/chunk.57XQ4F6F.js.map +7 -0
- package/dist/esm/chunks/{chunk.E3VXLUEY.js → chunk.5IVB5L5Z.js} +2 -2
- package/dist/esm/chunks/{chunk.GZZ6GFKT.js → chunk.5MK5YWCK.js} +2 -2
- package/dist/esm/chunks/{chunk.QO37K76P.js → chunk.6SBTLXLH.js} +2 -2
- package/dist/esm/chunks/{chunk.BTZF6QGA.js → chunk.7JQHQKXN.js} +2 -2
- package/dist/esm/chunks/{chunk.TWV4OTF7.js → chunk.A5MBSCSQ.js} +2 -2
- package/dist/esm/chunks/{chunk.4EF7UJDK.js → chunk.A5R7KUIP.js} +2 -2
- package/dist/esm/chunks/{chunk.NQH4ZCXJ.js → chunk.AGMPIMJV.js} +2 -2
- package/dist/esm/chunks/{chunk.PMY4KVCF.js → chunk.BKCEVPKW.js} +2 -2
- package/dist/esm/chunks/{chunk.I5MLIFN5.js → chunk.BSTIDYQJ.js} +2 -2
- package/dist/esm/chunks/chunk.C2LTB7EX.js +7 -0
- package/dist/esm/chunks/chunk.C2LTB7EX.js.map +7 -0
- package/dist/esm/chunks/chunk.CN27IHDN.js +7 -0
- package/dist/esm/chunks/chunk.CN27IHDN.js.map +7 -0
- package/dist/esm/chunks/{chunk.MZNL36GJ.js → chunk.CNQESSA3.js} +2 -2
- package/dist/esm/chunks/{chunk.6FISJTFJ.js → chunk.E6KWYFZG.js} +2 -2
- package/dist/esm/chunks/{chunk.H3SBIXK5.js → chunk.ECRL6O3V.js} +2 -2
- package/dist/esm/chunks/{chunk.SBDWCXK3.js → chunk.ER52NFXX.js} +2 -2
- package/dist/esm/chunks/{chunk.GSQF3ACL.js → chunk.EUE3OVC7.js} +2 -2
- package/dist/esm/chunks/{chunk.DGNS4JNN.js → chunk.FAANPQES.js} +2 -2
- package/dist/esm/chunks/{chunk.MZLPUI6R.js → chunk.FYWPZFLJ.js} +2 -2
- package/dist/esm/chunks/{chunk.MZLPUI6R.js.map → chunk.FYWPZFLJ.js.map} +2 -2
- package/dist/esm/chunks/{chunk.LMSXJOPL.js → chunk.GF2GUVYS.js} +2 -2
- package/dist/esm/chunks/{chunk.QKRB6AIQ.js → chunk.GHSAKRYH.js} +2 -2
- package/dist/esm/chunks/{chunk.JHTGKXXX.js → chunk.GJW4WS4I.js} +2 -2
- package/dist/esm/chunks/{chunk.IW37LUQJ.js → chunk.GUYPITGA.js} +2 -2
- package/dist/esm/chunks/{chunk.G75X57KY.js → chunk.HKJEGD6C.js} +2 -2
- package/dist/esm/chunks/{chunk.3ARIVYGG.js → chunk.IGK3VYZG.js} +2 -2
- package/dist/esm/chunks/chunk.IIXLFXHZ.js +7 -0
- package/dist/esm/chunks/chunk.IIXLFXHZ.js.map +7 -0
- package/dist/esm/chunks/chunk.JQIOVCKI.js +7 -0
- package/dist/esm/chunks/chunk.JQIOVCKI.js.map +7 -0
- package/dist/esm/chunks/{chunk.7MDHI4PT.js → chunk.JVW6JGV3.js} +2 -2
- package/dist/esm/chunks/chunk.LJYTJ3RV.js +7 -0
- package/dist/esm/chunks/chunk.LJYTJ3RV.js.map +7 -0
- package/dist/esm/chunks/{chunk.LQ4RD7WW.js → chunk.MXNLCQRB.js} +2 -2
- package/dist/esm/chunks/{chunk.DCCJTW7C.js → chunk.NDGFQILG.js} +2 -2
- package/dist/esm/chunks/{chunk.PG4HEEX2.js → chunk.OTVT3XM2.js} +2 -2
- package/dist/esm/chunks/{chunk.VSO5QDBV.js → chunk.P5QIB6OY.js} +2 -2
- package/dist/esm/chunks/{chunk.XUV63FEH.js → chunk.PPPTT3SM.js} +2 -2
- package/dist/esm/chunks/{chunk.GZRMHYID.js → chunk.QA3NU7EN.js} +2 -2
- package/dist/esm/chunks/{chunk.MVYTV6WX.js → chunk.QYKO543K.js} +2 -2
- package/dist/esm/chunks/{chunk.XI4RWFCG.js → chunk.RHYRMQS7.js} +2 -2
- package/dist/esm/chunks/{chunk.Q4SCW4FN.js → chunk.RUSHOL23.js} +2 -2
- package/dist/esm/chunks/{chunk.AD4CP4UK.js → chunk.SIJGKRYS.js} +2 -2
- package/dist/esm/chunks/{chunk.RTMDWDS4.js → chunk.SYZB7B4F.js} +2 -2
- package/dist/esm/chunks/{chunk.GYPPM2D2.js → chunk.SZIM4KFZ.js} +2 -2
- package/dist/esm/chunks/{chunk.UXQZFI55.js → chunk.THPU5KBV.js} +2 -2
- package/dist/esm/chunks/{chunk.K6VWRQWY.js → chunk.TXFYS6EU.js} +2 -2
- package/dist/esm/chunks/{chunk.ZLFH7VOM.js → chunk.V4RBOYNH.js} +2 -2
- package/dist/esm/chunks/chunk.WH6C36MO.js +7 -0
- package/dist/esm/chunks/chunk.WH6C36MO.js.map +7 -0
- package/dist/esm/chunks/{chunk.JRV5FYMW.js → chunk.YUAU5IWT.js} +2 -2
- package/dist/esm/chunks/{chunk.YSFUL5AD.js → chunk.YZLASVCK.js} +2 -2
- package/dist/esm/chunks/{chunk.R7MQKCHR.js → chunk.Z5TWWM7I.js} +2 -2
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-action-button/index.js +1 -1
- package/dist/esm/focus-indicator/index.js +7 -0
- package/dist/esm/focus-indicator/index.js.map +7 -0
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/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/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/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/esm/card/card-constants.d.ts +2 -2
- package/esm/card/card-constants.js +2 -2
- package/esm/card/card.d.ts +19 -8
- package/esm/card/card.js +30 -21
- package/esm/focus-indicator/focus-indicator-adapter.d.ts +37 -0
- package/esm/focus-indicator/focus-indicator-adapter.js +59 -0
- package/esm/focus-indicator/focus-indicator-constants.d.ts +15 -0
- package/esm/focus-indicator/focus-indicator-constants.js +19 -0
- package/esm/focus-indicator/focus-indicator-foundation.d.ts +43 -0
- package/esm/focus-indicator/focus-indicator-foundation.js +110 -0
- package/esm/focus-indicator/focus-indicator.d.ts +67 -0
- package/esm/focus-indicator/focus-indicator.js +112 -0
- package/esm/focus-indicator/index.d.ts +10 -0
- package/esm/focus-indicator/index.js +14 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +3 -0
- package/esm/slider/slider-utils.js +3 -0
- package/esm/slider/slider.d.ts +0 -1
- package/esm/slider/slider.js +7 -4
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/tabs/tab/tab-adapter.d.ts +15 -39
- package/esm/tabs/tab/tab-adapter.js +65 -78
- package/esm/tabs/tab/tab-constants.d.ts +13 -13
- package/esm/tabs/tab/tab-constants.js +18 -10
- package/esm/tabs/tab/tab-foundation.d.ts +24 -23
- package/esm/tabs/tab/tab-foundation.js +68 -62
- package/esm/tabs/tab/tab-ripple.d.ts +17 -0
- package/esm/tabs/tab/tab-ripple.js +33 -0
- package/esm/tabs/tab/tab.d.ts +56 -19
- package/esm/tabs/tab/tab.js +82 -32
- package/esm/tabs/tab-bar/tab-bar-adapter.d.ts +49 -87
- package/esm/tabs/tab-bar/tab-bar-adapter.js +114 -188
- package/esm/tabs/tab-bar/tab-bar-constants.d.ts +15 -45
- package/esm/tabs/tab-bar/tab-bar-constants.js +22 -56
- package/esm/tabs/tab-bar/tab-bar-foundation.d.ts +56 -65
- package/esm/tabs/tab-bar/tab-bar-foundation.js +241 -302
- package/esm/tabs/tab-bar/tab-bar.d.ts +51 -36
- package/esm/tabs/tab-bar/tab-bar.js +84 -52
- package/package.json +1 -1
- package/styles/card/_mixins.scss +8 -7
- package/styles/core/style-layer/tabs/tab/_core.scss +419 -0
- package/styles/core/style-layer/tabs/tab/_variables.scss +20 -0
- package/styles/core/style-layer/tabs/tab/index.scss +13 -0
- package/styles/core/style-layer/tabs/tab-bar/_core.scss +110 -0
- package/styles/core/style-layer/tabs/tab-bar/_variables.scss +9 -0
- package/styles/core/style-layer/tabs/tab-bar/index.scss +13 -0
- package/styles/focus-indicator/_mixins.scss +147 -0
- package/styles/focus-indicator/_variables.scss +20 -0
- package/styles/focus-indicator/focus-indicator.scss +32 -0
- package/styles/slider/_mixins.scss +9 -0
- package/styles/tabs/tab/_mixins.scss +55 -126
- package/styles/tabs/tab/_variables.scss +26 -4
- package/styles/tabs/tab/tab.scss +50 -11
- package/styles/tabs/tab-bar/_mixins.scss +20 -60
- package/styles/tabs/tab-bar/_variables.scss +11 -0
- package/styles/tabs/tab-bar/tab-bar.scss +29 -2
- package/dist/esm/chunks/chunk.4B22UXEH.js +0 -7
- package/dist/esm/chunks/chunk.4B22UXEH.js.map +0 -7
- package/dist/esm/chunks/chunk.4QPMNWJ3.js +0 -129
- package/dist/esm/chunks/chunk.4QPMNWJ3.js.map +0 -7
- package/dist/esm/chunks/chunk.BWZKQ6WX.js +0 -7
- package/dist/esm/chunks/chunk.BWZKQ6WX.js.map +0 -7
- package/dist/esm/chunks/chunk.D3IAEEPM.js +0 -201
- package/dist/esm/chunks/chunk.D3IAEEPM.js.map +0 -7
- package/dist/esm/chunks/chunk.NV4U4DE6.js +0 -12
- package/dist/esm/chunks/chunk.NV4U4DE6.js.map +0 -7
- /package/dist/esm/chunks/{chunk.Q6IP5GJ6.js.map → chunk.246JM2YT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DHTAH23Y.js.map → chunk.24L5GDD2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZWTZJJ6H.js.map → chunk.2IQGDFQS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DAGXGSX7.js.map → chunk.2LRDPTHK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q47M2LB5.js.map → chunk.2QFIMTVP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IVB6XTHQ.js.map → chunk.2TQONIPK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DXHKS7XO.js.map → chunk.2XFVFZ3P.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3ICROIFD.js.map → chunk.2YAU7AXH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5B2CGITX.js.map → chunk.2YX7ASSX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QLNGQCJX.js.map → chunk.2ZTERGYF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Y2ANYRZH.js.map → chunk.4EB5NVCK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SACZLJPQ.js.map → chunk.4LVS2EYJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.E3VXLUEY.js.map → chunk.5IVB5L5Z.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GZZ6GFKT.js.map → chunk.5MK5YWCK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QO37K76P.js.map → chunk.6SBTLXLH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BTZF6QGA.js.map → chunk.7JQHQKXN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TWV4OTF7.js.map → chunk.A5MBSCSQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4EF7UJDK.js.map → chunk.A5R7KUIP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NQH4ZCXJ.js.map → chunk.AGMPIMJV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PMY4KVCF.js.map → chunk.BKCEVPKW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.I5MLIFN5.js.map → chunk.BSTIDYQJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MZNL36GJ.js.map → chunk.CNQESSA3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6FISJTFJ.js.map → chunk.E6KWYFZG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.H3SBIXK5.js.map → chunk.ECRL6O3V.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SBDWCXK3.js.map → chunk.ER52NFXX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GSQF3ACL.js.map → chunk.EUE3OVC7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DGNS4JNN.js.map → chunk.FAANPQES.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LMSXJOPL.js.map → chunk.GF2GUVYS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QKRB6AIQ.js.map → chunk.GHSAKRYH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JHTGKXXX.js.map → chunk.GJW4WS4I.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IW37LUQJ.js.map → chunk.GUYPITGA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.G75X57KY.js.map → chunk.HKJEGD6C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3ARIVYGG.js.map → chunk.IGK3VYZG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7MDHI4PT.js.map → chunk.JVW6JGV3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LQ4RD7WW.js.map → chunk.MXNLCQRB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DCCJTW7C.js.map → chunk.NDGFQILG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PG4HEEX2.js.map → chunk.OTVT3XM2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VSO5QDBV.js.map → chunk.P5QIB6OY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XUV63FEH.js.map → chunk.PPPTT3SM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GZRMHYID.js.map → chunk.QA3NU7EN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MVYTV6WX.js.map → chunk.QYKO543K.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XI4RWFCG.js.map → chunk.RHYRMQS7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q4SCW4FN.js.map → chunk.RUSHOL23.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AD4CP4UK.js.map → chunk.SIJGKRYS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RTMDWDS4.js.map → chunk.SYZB7B4F.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GYPPM2D2.js.map → chunk.SZIM4KFZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UXQZFI55.js.map → chunk.THPU5KBV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.K6VWRQWY.js.map → chunk.TXFYS6EU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZLFH7VOM.js.map → chunk.V4RBOYNH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JRV5FYMW.js.map → chunk.YUAU5IWT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YSFUL5AD.js.map → chunk.YZLASVCK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.R7MQKCHR.js.map → chunk.Z5TWWM7I.js.map} +0 -0
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{c as x,d as D}from"./chunk.Q6IP5GJ6.js";import{a as y}from"./chunk.RFLASSCI.js";import{a as l}from"./chunk.NVUMRW44.js";import{a as E}from"./chunk.5V5ABSHI.js";import{a as b,b as L}from"./chunk.DTZFWZPB.js";import{a as v,e as f,f as c,k as _}from"./chunk.NK7H3MMM.js";import{k as p,l as u}from"./chunk.J2M2MXP2.js";import{d as s}from"./chunk.M3QDAYD2.js";var C=`${L}file-picker`,I={ACCEPT:"accept",MAX_SIZE:"max-size",CAPTURE:"capture",MULTIPLE:"multiple",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},T={HIGHLIGHT:"highlight",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},S={CONTAINER:"container",BUTTON:"button",INPUT:"input"},A={CONTAINER:"#container",BUTTON:"#button",INPUT:"#input",BUTTON_SLOT:"#button-slot"},P={FILES_CHANGED:`${C}-change`},i={elementName:C,attributes:I,classes:T,ids:S,selectors:A,events:P};var d=class extends E{constructor(e){super(e);this._container=c(e,i.selectors.CONTAINER),this._buttonSlot=c(e,i.selectors.BUTTON_SLOT),this._input=c(e,i.selectors.INPUT),this._inputEventListener=()=>{this._input.value="",this._input.click()},this._container.addEventListener("click",this._inputEventListener)}registerButtonSlotListener(e){this._buttonSlot.addEventListener("slotchange",e)}registerInputChangeListener(e){this._input.addEventListener("change",e)}registerDragEnterListener(e){this._container.addEventListener("dragenter",e)}registerDragLeaveListener(e){this._container.addEventListener("dragleave",e)}registerDragOverListener(e){this._container.addEventListener("dragover",e)}registerDropListener(e){this._container.addEventListener("drop",e)}removeDragEnterListener(e){this._container.removeEventListener("dragenter",e)}removeDragLeaveListener(e){this._container.removeEventListener("dragleave",e)}removeDragOverListener(e){this._container.removeEventListener("dragover",e)}removeDropListener(e){this._container.removeEventListener("drop",e)}initializeButton(){let e=this._component.querySelector("button");this._button=e||void 0}setHighlightState(e){this._container.classList.contains(i.classes.HIGHLIGHT)!==e&&this._container.classList.toggle(i.classes.HIGHLIGHT)}setAccept(e){e?this._input.setAttribute("accept",e):this._input.removeAttribute("accept")}setCapture(e){e?this._input.setAttribute("capture",e):this._input.removeAttribute("capture")}setMultiple(e){e?this._input.setAttribute("multiple",""):this._input.removeAttribute("multiple")}setDisabled(e){var n,o;e?(this._container.removeEventListener("click",this._inputEventListener),(n=this._button)==null||n.setAttribute("disabled",""),this._container.setAttribute("disabled","")):(this._container.addEventListener("click",this._inputEventListener),(o=this._button)==null||o.removeAttribute("disabled"),this._container.removeAttribute("disabled"))}setCompact(e){this._container.classList.contains(i.classes.COMPACT)!==e&&this._container.classList.toggle(i.classes.COMPACT)}setBorderless(e){this._container.classList.contains(i.classes.BORDERLESS)!==e&&this._container.classList.toggle(i.classes.BORDERLESS)}};var g=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._accept=null;this._maxSize=null;this._capture=null;this._multiple=!1;this._disabled=!1;this._compact=!1;this._borderless=!1;this._buttonSlotListener=e=>this._onButtonSlotChanged(e),this._inputChangeListener=e=>this._onInputChange(e),this._dragEnterListener=e=>this._onDragEnter(e),this._dragLeaveListener=e=>this._onDragLeave(e),this._dragOverListener=e=>this._onDragOver(e),this._dropListener=e=>this._onDrop(e),this._adapter.registerButtonSlotListener(this._buttonSlotListener),this._adapter.registerInputChangeListener(this._inputChangeListener),this._compact||this._registerDragListeners()}initialize(){this._adapter.initializeButton(),this._adapter.setDisabled(this._disabled),this._isInitialized=!0}destroy(){this._isInitialized=!1}_onButtonSlotChanged(t){this._adapter.initializeButton()}_onInputChange(t){let e=t.target.files;e&&this._handleFiles(e)}_onDragEnter(t){this._handleDragEvent(t,!0)}_onDragLeave(t){this._handleDragEvent(t,!1)}_onDragOver(t){this._handleDragEvent(t,!0)}_onDrop(t){if(this._handleDragEvent(t,!1),!this._disabled){let e=t.dataTransfer;if(e){let n=e.files;this._handleFiles(n)}}}_registerDragListeners(){this._adapter.registerDragEnterListener(this._dragEnterListener),this._adapter.registerDragLeaveListener(this._dragLeaveListener),this._adapter.registerDragOverListener(this._dragOverListener),this._adapter.registerDropListener(this._dropListener)}_removeDragListeners(){this._adapter.removeDragEnterListener(this._dragEnterListener),this._adapter.removeDragLeaveListener(this._dragLeaveListener),this._adapter.removeDragOverListener(this._dragOverListener),this._adapter.removeDropListener(this._dropListener)}_handleFiles(t){let e={};if(t){let n=this._sortFiles(t),o=n.legalFiles||null;!this._multiple&&o&&o.length>1&&(o=o.splice(1)),e=n}this._adapter.emitHostEvent(i.events.FILES_CHANGED,e)}_sortFiles(t){let e=[],n=[];if(!this._accept&&!this.maxSize)return e=Array.from(t),{legalFiles:e,illegalFiles:n};let o=this._accept?this._accept.split(",").map(r=>r.trim().toLowerCase()):[""];for(let r=0;r<t.length;r++)!o.some(m=>t[r].type.toLowerCase().match(m)||t[r].name.toLowerCase().match("\\"+m))||this._maxSize&&t[r].size>this._maxSize?n.push(t[r]):e.push(t[r]);return{legalFiles:e,illegalFiles:n}}_handleDragEvent(t,e){this._disabled||(t.preventDefault(),t.stopPropagation(),this._adapter.setHighlightState(e))}get accept(){return this._accept}set accept(t){this._accept!==t&&(this._accept=t,this._adapter.setAccept(t),this._adapter.toggleHostAttribute(i.attributes.ACCEPT,!!t,String(t)))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize!==t&&(this._maxSize=t,this._adapter.toggleHostAttribute(i.attributes.MAX_SIZE,!!t,String(t)))}get capture(){return this._capture}set capture(t){this._capture!==t&&(this._capture=t,this._adapter.setCapture(t),this._adapter.toggleHostAttribute(i.attributes.CAPTURE,!!t,String(t)))}get multiple(){return this._multiple}set multiple(t){this._multiple!==t&&(this._multiple=t,this._adapter.setMultiple(t),this._adapter.toggleHostAttribute(i.attributes.MULTIPLE,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(i.attributes.DISABLED,t))}get compact(){return this._compact}set compact(t){this._compact!==t&&(this._compact=t,this._adapter.setCompact(t),t?this._removeDragListeners():this._registerDragListeners(),this._adapter.toggleHostAttribute(i.attributes.COMPACT,t))}get borderless(){return this._borderless}set borderless(t){this._borderless!==t&&(this._borderless=t,this._adapter.setBorderless(t),this._adapter.toggleHostAttribute(i.attributes.BORDERLESS,t))}};var F='<template><form class="forge-file-picker" id="container" part="form"><div class="forge-file-picker__primary" id="primary" part="primary"><slot name="primary"></slot></div><slot id="button-slot"></slot><div class="forge-file-picker__secondary" id="secondary" part="secondary"><slot name="secondary"></slot></div><input type="file" class="forge-file-picker__input" id="input" part="input"></form><div class="forge-file-picker__helper-text" part="helper-text-container"><slot name="helper-text"></slot></div></template>',O=".forge-file-picker{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;background-color:rgba(189,189,189,.12);border:1px dashed #e0e0e0;display:grid;-webkit-box-pack:center;justify-content:center;align-content:center;gap:16px;padding:16px;text-align:center;cursor:pointer}.forge-file-picker__primary{-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);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));max-width:auto;max-width:var(--forge-file-picker-max-content-width,auto)}.forge-file-picker__secondary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;font-size:var(--forge-typography-subtitle2-secondary-font-size, .875rem);line-height:1.375rem;line-height:var(--forge-typography-subtitle2-secondary-line-height, 1.375rem);font-weight:400;font-weight:var(--forge-typography-subtitle2-secondary-font-weight,400);letter-spacing:.0087500001em;letter-spacing:var(--forge-typography-subtitle2-secondary-letter-spacing, .0087500001em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-subtitle2-secondary-text-decoration,inherit);text-decoration:var(--forge-typography-subtitle2-secondary-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-subtitle2-secondary-text-transform,inherit);color:var(--mdc-theme-text-secondary-on-background);color:var(--forge-typography-subtitle2-secondary-color,var(--mdc-theme-text-secondary-on-background));color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));max-width:auto;max-width:var(--forge-file-picker-max-content-width,auto)}.forge-file-picker__input{display:none}.forge-file-picker__helper-text ::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;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));margin-left:12px;-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;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);text-align:start}.forge-file-picker[disabled]{background-color:#fafafa;background-color:var(--mdc-theme-background,#fafafa);border-color:#e0e0e0;border-color:var(--forge-theme-border-color,#e0e0e0);opacity:.38;cursor:unset}.forge-file-picker.compact{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;background-color:transparent;border:none;padding:0}.forge-file-picker.compact .forge-file-picker__primary,.forge-file-picker.compact .forge-file-picker__secondary{display:none}.forge-file-picker.compact .forge-file-picker__button>button{width:auto;width:var(--forge-file-picker-width,auto);background-color:transparent}.forge-file-picker:not(.compact).highlight{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);background-color:rgba(63,81,181,.12);border-width:1px;border-style:solid}.forge-file-picker.borderless{--forge-file-picker-width:100%;border:none}.forge-file-picker.borderless:not(.compact).highlight{border:none}.forge-file-picker.borderless+.forge-file-picker__helper-text{display:none}:host{width:auto;width:var(--forge-file-picker-width,auto);height:auto;height:var(--forge-file-picker-height,auto);display:inline-block}:host([hidden]){display:none}",a=class extends _{constructor(){super();f(this,F,O),this._foundation=new g(new d(this))}static get observedAttributes(){return[i.attributes.ACCEPT,i.attributes.MAX_SIZE,i.attributes.CAPTURE,i.attributes.MULTIPLE,i.attributes.DISABLED,i.attributes.COMPACT,i.attributes.BORDERLESS]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,n,o){switch(e){case i.attributes.ACCEPT:this.accept=o;break;case i.attributes.MAX_SIZE:this.maxSize=u(o);break;case i.attributes.CAPTURE:this.capture=o;break;case i.attributes.MULTIPLE:this.multiple=p(o);break;case i.attributes.DISABLED:this.disabled=p(o);break;case i.attributes.COMPACT:this.compact=p(o);break;case i.attributes.BORDERLESS:this.borderless=p(o);break}}};s([l()],a.prototype,"accept",2),s([l()],a.prototype,"maxSize",2),s([l()],a.prototype,"capture",2),s([l()],a.prototype,"multiple",2),s([l()],a.prototype,"disabled",2),s([l()],a.prototype,"compact",2),s([l()],a.prototype,"borderless",2),a=s([b({name:i.elementName,dependencies:[x]})],a);var k=class extends y{constructor(t){super(t)}_build(){return document.createElement(i.elementName)}_configure(){var t,e,n,o;if((t=this._config.options)!=null&&t.primaryText){let r=document.createElement("span");r.slot="primary",r.textContent=this._config.options.primaryText,this._element.appendChild(r)}if((e=this._config.options)!=null&&e.secondaryText){let r=document.createElement("span");r.slot="secondary",r.textContent=this._config.options.secondaryText,this._element.appendChild(r)}if((n=this._config.options)!=null&&n.buttonText&&new D({options:{parent:this._element,text:this._config.options.buttonText},props:{type:"outlined"}}),(o=this._config.options)!=null&&o.helperText){let r=document.createElement("span");r.slot="helper-text",r.textContent=this._config.options.helperText,this._element.appendChild(r)}}onChange(t){this._element.addEventListener(i.events.FILES_CHANGED,e=>t(e.detail))}};function ce(){v(a)}export{i as a,d as b,g as c,a as d,k as e,ce as f};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{c as x,d as D}from"./chunk.246JM2YT.js";import{a as y}from"./chunk.RFLASSCI.js";import{a as l}from"./chunk.NVUMRW44.js";import{a as E}from"./chunk.5V5ABSHI.js";import{a as b,b as L}from"./chunk.DTZFWZPB.js";import{a as v,e as f,f as c,k as _}from"./chunk.NK7H3MMM.js";import{k as p,l as u}from"./chunk.J2M2MXP2.js";import{d as s}from"./chunk.M3QDAYD2.js";var C=`${L}file-picker`,I={ACCEPT:"accept",MAX_SIZE:"max-size",CAPTURE:"capture",MULTIPLE:"multiple",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},T={HIGHLIGHT:"highlight",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},S={CONTAINER:"container",BUTTON:"button",INPUT:"input"},A={CONTAINER:"#container",BUTTON:"#button",INPUT:"#input",BUTTON_SLOT:"#button-slot"},P={FILES_CHANGED:`${C}-change`},i={elementName:C,attributes:I,classes:T,ids:S,selectors:A,events:P};var d=class extends E{constructor(e){super(e);this._container=c(e,i.selectors.CONTAINER),this._buttonSlot=c(e,i.selectors.BUTTON_SLOT),this._input=c(e,i.selectors.INPUT),this._inputEventListener=()=>{this._input.value="",this._input.click()},this._container.addEventListener("click",this._inputEventListener)}registerButtonSlotListener(e){this._buttonSlot.addEventListener("slotchange",e)}registerInputChangeListener(e){this._input.addEventListener("change",e)}registerDragEnterListener(e){this._container.addEventListener("dragenter",e)}registerDragLeaveListener(e){this._container.addEventListener("dragleave",e)}registerDragOverListener(e){this._container.addEventListener("dragover",e)}registerDropListener(e){this._container.addEventListener("drop",e)}removeDragEnterListener(e){this._container.removeEventListener("dragenter",e)}removeDragLeaveListener(e){this._container.removeEventListener("dragleave",e)}removeDragOverListener(e){this._container.removeEventListener("dragover",e)}removeDropListener(e){this._container.removeEventListener("drop",e)}initializeButton(){let e=this._component.querySelector("button");this._button=e||void 0}setHighlightState(e){this._container.classList.contains(i.classes.HIGHLIGHT)!==e&&this._container.classList.toggle(i.classes.HIGHLIGHT)}setAccept(e){e?this._input.setAttribute("accept",e):this._input.removeAttribute("accept")}setCapture(e){e?this._input.setAttribute("capture",e):this._input.removeAttribute("capture")}setMultiple(e){e?this._input.setAttribute("multiple",""):this._input.removeAttribute("multiple")}setDisabled(e){var n,o;e?(this._container.removeEventListener("click",this._inputEventListener),(n=this._button)==null||n.setAttribute("disabled",""),this._container.setAttribute("disabled","")):(this._container.addEventListener("click",this._inputEventListener),(o=this._button)==null||o.removeAttribute("disabled"),this._container.removeAttribute("disabled"))}setCompact(e){this._container.classList.contains(i.classes.COMPACT)!==e&&this._container.classList.toggle(i.classes.COMPACT)}setBorderless(e){this._container.classList.contains(i.classes.BORDERLESS)!==e&&this._container.classList.toggle(i.classes.BORDERLESS)}};var g=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._accept=null;this._maxSize=null;this._capture=null;this._multiple=!1;this._disabled=!1;this._compact=!1;this._borderless=!1;this._buttonSlotListener=e=>this._onButtonSlotChanged(e),this._inputChangeListener=e=>this._onInputChange(e),this._dragEnterListener=e=>this._onDragEnter(e),this._dragLeaveListener=e=>this._onDragLeave(e),this._dragOverListener=e=>this._onDragOver(e),this._dropListener=e=>this._onDrop(e),this._adapter.registerButtonSlotListener(this._buttonSlotListener),this._adapter.registerInputChangeListener(this._inputChangeListener),this._compact||this._registerDragListeners()}initialize(){this._adapter.initializeButton(),this._adapter.setDisabled(this._disabled),this._isInitialized=!0}destroy(){this._isInitialized=!1}_onButtonSlotChanged(t){this._adapter.initializeButton()}_onInputChange(t){let e=t.target.files;e&&this._handleFiles(e)}_onDragEnter(t){this._handleDragEvent(t,!0)}_onDragLeave(t){this._handleDragEvent(t,!1)}_onDragOver(t){this._handleDragEvent(t,!0)}_onDrop(t){if(this._handleDragEvent(t,!1),!this._disabled){let e=t.dataTransfer;if(e){let n=e.files;this._handleFiles(n)}}}_registerDragListeners(){this._adapter.registerDragEnterListener(this._dragEnterListener),this._adapter.registerDragLeaveListener(this._dragLeaveListener),this._adapter.registerDragOverListener(this._dragOverListener),this._adapter.registerDropListener(this._dropListener)}_removeDragListeners(){this._adapter.removeDragEnterListener(this._dragEnterListener),this._adapter.removeDragLeaveListener(this._dragLeaveListener),this._adapter.removeDragOverListener(this._dragOverListener),this._adapter.removeDropListener(this._dropListener)}_handleFiles(t){let e={};if(t){let n=this._sortFiles(t),o=n.legalFiles||null;!this._multiple&&o&&o.length>1&&(o=o.splice(1)),e=n}this._adapter.emitHostEvent(i.events.FILES_CHANGED,e)}_sortFiles(t){let e=[],n=[];if(!this._accept&&!this.maxSize)return e=Array.from(t),{legalFiles:e,illegalFiles:n};let o=this._accept?this._accept.split(",").map(r=>r.trim().toLowerCase()):[""];for(let r=0;r<t.length;r++)!o.some(m=>t[r].type.toLowerCase().match(m)||t[r].name.toLowerCase().match("\\"+m))||this._maxSize&&t[r].size>this._maxSize?n.push(t[r]):e.push(t[r]);return{legalFiles:e,illegalFiles:n}}_handleDragEvent(t,e){this._disabled||(t.preventDefault(),t.stopPropagation(),this._adapter.setHighlightState(e))}get accept(){return this._accept}set accept(t){this._accept!==t&&(this._accept=t,this._adapter.setAccept(t),this._adapter.toggleHostAttribute(i.attributes.ACCEPT,!!t,String(t)))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize!==t&&(this._maxSize=t,this._adapter.toggleHostAttribute(i.attributes.MAX_SIZE,!!t,String(t)))}get capture(){return this._capture}set capture(t){this._capture!==t&&(this._capture=t,this._adapter.setCapture(t),this._adapter.toggleHostAttribute(i.attributes.CAPTURE,!!t,String(t)))}get multiple(){return this._multiple}set multiple(t){this._multiple!==t&&(this._multiple=t,this._adapter.setMultiple(t),this._adapter.toggleHostAttribute(i.attributes.MULTIPLE,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(i.attributes.DISABLED,t))}get compact(){return this._compact}set compact(t){this._compact!==t&&(this._compact=t,this._adapter.setCompact(t),t?this._removeDragListeners():this._registerDragListeners(),this._adapter.toggleHostAttribute(i.attributes.COMPACT,t))}get borderless(){return this._borderless}set borderless(t){this._borderless!==t&&(this._borderless=t,this._adapter.setBorderless(t),this._adapter.toggleHostAttribute(i.attributes.BORDERLESS,t))}};var F='<template><form class="forge-file-picker" id="container" part="form"><div class="forge-file-picker__primary" id="primary" part="primary"><slot name="primary"></slot></div><slot id="button-slot"></slot><div class="forge-file-picker__secondary" id="secondary" part="secondary"><slot name="secondary"></slot></div><input type="file" class="forge-file-picker__input" id="input" part="input"></form><div class="forge-file-picker__helper-text" part="helper-text-container"><slot name="helper-text"></slot></div></template>',O=".forge-file-picker{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;background-color:rgba(189,189,189,.12);border:1px dashed #e0e0e0;display:grid;-webkit-box-pack:center;justify-content:center;align-content:center;gap:16px;padding:16px;text-align:center;cursor:pointer}.forge-file-picker__primary{-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);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));max-width:auto;max-width:var(--forge-file-picker-max-content-width,auto)}.forge-file-picker__secondary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;font-size:var(--forge-typography-subtitle2-secondary-font-size, .875rem);line-height:1.375rem;line-height:var(--forge-typography-subtitle2-secondary-line-height, 1.375rem);font-weight:400;font-weight:var(--forge-typography-subtitle2-secondary-font-weight,400);letter-spacing:.0087500001em;letter-spacing:var(--forge-typography-subtitle2-secondary-letter-spacing, .0087500001em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-subtitle2-secondary-text-decoration,inherit);text-decoration:var(--forge-typography-subtitle2-secondary-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-subtitle2-secondary-text-transform,inherit);color:var(--mdc-theme-text-secondary-on-background);color:var(--forge-typography-subtitle2-secondary-color,var(--mdc-theme-text-secondary-on-background));color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));max-width:auto;max-width:var(--forge-file-picker-max-content-width,auto)}.forge-file-picker__input{display:none}.forge-file-picker__helper-text ::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;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));margin-left:12px;-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;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);text-align:start}.forge-file-picker[disabled]{background-color:#fafafa;background-color:var(--mdc-theme-background,#fafafa);border-color:#e0e0e0;border-color:var(--forge-theme-border-color,#e0e0e0);opacity:.38;cursor:unset}.forge-file-picker.compact{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;background-color:transparent;border:none;padding:0}.forge-file-picker.compact .forge-file-picker__primary,.forge-file-picker.compact .forge-file-picker__secondary{display:none}.forge-file-picker.compact .forge-file-picker__button>button{width:auto;width:var(--forge-file-picker-width,auto);background-color:transparent}.forge-file-picker:not(.compact).highlight{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);background-color:rgba(63,81,181,.12);border-width:1px;border-style:solid}.forge-file-picker.borderless{--forge-file-picker-width:100%;border:none}.forge-file-picker.borderless:not(.compact).highlight{border:none}.forge-file-picker.borderless+.forge-file-picker__helper-text{display:none}:host{width:auto;width:var(--forge-file-picker-width,auto);height:auto;height:var(--forge-file-picker-height,auto);display:inline-block}:host([hidden]){display:none}",a=class extends _{constructor(){super();f(this,F,O),this._foundation=new g(new d(this))}static get observedAttributes(){return[i.attributes.ACCEPT,i.attributes.MAX_SIZE,i.attributes.CAPTURE,i.attributes.MULTIPLE,i.attributes.DISABLED,i.attributes.COMPACT,i.attributes.BORDERLESS]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,n,o){switch(e){case i.attributes.ACCEPT:this.accept=o;break;case i.attributes.MAX_SIZE:this.maxSize=u(o);break;case i.attributes.CAPTURE:this.capture=o;break;case i.attributes.MULTIPLE:this.multiple=p(o);break;case i.attributes.DISABLED:this.disabled=p(o);break;case i.attributes.COMPACT:this.compact=p(o);break;case i.attributes.BORDERLESS:this.borderless=p(o);break}}};s([l()],a.prototype,"accept",2),s([l()],a.prototype,"maxSize",2),s([l()],a.prototype,"capture",2),s([l()],a.prototype,"multiple",2),s([l()],a.prototype,"disabled",2),s([l()],a.prototype,"compact",2),s([l()],a.prototype,"borderless",2),a=s([b({name:i.elementName,dependencies:[x]})],a);var k=class extends y{constructor(t){super(t)}_build(){return document.createElement(i.elementName)}_configure(){var t,e,n,o;if((t=this._config.options)!=null&&t.primaryText){let r=document.createElement("span");r.slot="primary",r.textContent=this._config.options.primaryText,this._element.appendChild(r)}if((e=this._config.options)!=null&&e.secondaryText){let r=document.createElement("span");r.slot="secondary",r.textContent=this._config.options.secondaryText,this._element.appendChild(r)}if((n=this._config.options)!=null&&n.buttonText&&new D({options:{parent:this._element,text:this._config.options.buttonText},props:{type:"outlined"}}),(o=this._config.options)!=null&&o.helperText){let r=document.createElement("span");r.slot="helper-text",r.textContent=this._config.options.helperText,this._element.appendChild(r)}}onChange(t){this._element.addEventListener(i.events.FILES_CHANGED,e=>t(e.detail))}};function ce(){v(a)}export{i as a,d as b,g as c,a as d,k as e,ce as f};
|
|
7
|
+
//# sourceMappingURL=chunk.AGMPIMJV.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{d as at}from"./chunk.TT2VTZJ6.js";import{h as st}from"./chunk.RTMDWDS4.js";import{e as it}from"./chunk.7G72CBOJ.js";import{c as et}from"./chunk.Q47M2LB5.js";import{e as tt}from"./chunk.E3VXLUEY.js";import{a as f,b as nt}from"./chunk.PHTOULRR.js";import{a as rt}from"./chunk.LIKJD4SK.js";import{a as F}from"./chunk.MGLWXAZO.js";import{a as C,b as ot}from"./chunk.4EF7UJDK.js";import{j as K}from"./chunk.MZLPUI6R.js";import{a as Q,d as Z,l as E}from"./chunk.H5D54EHO.js";import{g as J}from"./chunk.XIQFHO5R.js";import{j as b,k as X,n as G,o as q,p as Y,q as j}from"./chunk.DMCBAYQX.js";import{a as $}from"./chunk.G4IN6Y46.js";import{a as u}from"./chunk.NVUMRW44.js";import{a as W}from"./chunk.5V5ABSHI.js";import{a as R,b as z}from"./chunk.DTZFWZPB.js";import{a as N,e as H,f as V,h as U,k as B}from"./chunk.NK7H3MMM.js";import{m as A,s as P,u as x}from"./chunk.CFDK4RCW.js";import{a as D,k as m,l as y,o as L}from"./chunk.J2M2MXP2.js";import{a as w,d as p}from"./chunk.M3QDAYD2.js";var h=`${z}time-picker`,lt={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},ft={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${lt.TOGGLE}]`},gt={OPEN:`${h}-open`,CLOSE:`${h}-close`,INPUT:`${h}-input`,CHANGE:`${h}-change`},vt={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},s={elementName:h,attributes:lt,selectors:ft,events:gt,numbers:vt};var g=class extends W{constructor(e){super(e)}initialize(){this._inputElement=this._component.querySelector(s.selectors.INPUT)}initializeMask(e){this.destroyMask(),this._inputMask=new J(this._inputElement,e)}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=void 0}initializeAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false")}addInputListener(e,i,n){this._inputElement.addEventListener(e,i,{capture:n})}removeInputListener(e,i,n){this._inputElement&&this._inputElement.removeEventListener(e,i,{capture:n})}addToggleListener(e,i){this._toggleElement&&this._toggleElement.addEventListener(e,i)}removeToggleListener(e,i){this._toggleElement&&this._toggleElement.removeEventListener(e,i)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let e=this._component.querySelector(f.elementName),i=this._component.querySelector(s.selectors.TOGGLE);if(e){let n=e.querySelector(`${C.elementName}[slot=trailing]`);if(n||i){this._toggleElement=n||i;return}let a=document.createElement(C.elementName);a.slot="trailing",a.dense=!0,a.densityLevel=3,a.style.marginRight="4px";let r=document.createElement("button");r.type="button",r.tabIndex=-1,r.setAttribute("aria-label","Toggle time dropdown");let d=document.createElement(Q.elementName);d.name="clock_outline",r.appendChild(d),a.appendChild(r),e.appendChild(a),this._toggleElement=a}else i&&(this._toggleElement=i)}tryFocusInput(){this._inputElement.select()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return P()===this._inputElement}setInputValue(e,i){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.update(),i&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this.setToggleDisabled(e)}attachDropdown(e){this._listDropdown=new st(this._inputElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`)}detachDropdown(){this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0),this._inputElement.removeAttribute("aria-controls")}propagateKey(e){var i;(i=this._listDropdown)==null||i.handleKey(e)}setActiveDescendant(e){x(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._getTargetElement(e).getBoundingClientRect().width}_emitInputEvent(e){this._inputElement.dispatchEvent(new Event(e))}emitInputEvent(e,i){U(this._inputElement,e,i)}setInputReadonly(e){this._inputElement.readOnly=e}setToggleDisabled(e){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",e.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=e;else{let i=this._toggleElement.querySelector("button");i&&(i.disabled=e)}}hasActiveOption(){var e,i;return((i=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?i:-1)>=0}activateOptionByIndex(e){var i;(i=this._listDropdown)==null||i.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}getActiveOption(){var e;return(e=this._listDropdown)==null?void 0:e.getActiveOption()}_getTargetElement(e){return this._targetElement?this._targetElement:(this._targetElement=e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){let e=this._component.querySelector(f.elementName);if(e&&e.shadowRoot){let i=V(e,f.selectors.ROOT);if(i)return i}return this._component}};function v(o,t,e){if(!o||/^\s*$/.test(o))return null;let i=0,n=0,a=0;if(b.test(o)){let r=G(o);i=+r.hours||0,n=+r.minutes||0,a=+r.seconds||0}else if(X.test(o)){let r=q(o);i=+r.hours||0,n=+r.minutes||0,a=+r.seconds||0,i===12&&r.meridiem==="AM"&&(i=0),i<12&&r.meridiem==="PM"&&(i+=12)}else return null;return dt(i)+T(n)+(e?O(a):0)}function c(o,t,e){if(typeof o!="number"||o<0)return null;let i=Math.min(pt(o),23),n=Math.min(ut(o),59),r=o/(1e3*60)<720?"AM":"PM";t||(i=i<=12?i:i-12,i===0&&(i=12));let d=`${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}`;if(e){let _=Math.min(M(o),59);d+=`:${String(_).padStart(2,"0")}`}return t||(d+=` ${r}`),d}function pt(o){return Math.abs(Math.floor(o/(1e3*60*60)))}function ut(o){return Math.abs(Math.floor(I(o)%60))}function I(o){return o/(1e3*60)}function M(o){return Math.abs(Math.floor(It(o)%60))}function It(o){return o/1e3}function dt(o){return o*60*60*1e3}function T(o){return o*60*1e3}function O(o){return o*1e3}function ct(o){return o-O(M(o))}function S(o){let t=new Date,e=t.getHours(),i=t.getMinutes();return dt(e)+T(i)+(o?O(t.getSeconds()):0)}function Rt(o,t,e=!1){o||(o=new Date);let i=v(t,!0,e);if(!i)return o.setHours(0,0,0),o;let n=pt(i),a=828e5;n>a?n=a:n<0&&(n=0);let r=ut(i),d=e?M(i):0;return o.setHours(n,r,d),o}var k=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=s.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=D(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown(),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,i;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown(!0));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((i=this._dropdownConfig)==null?void 0:i.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let n=S(this._allowSeconds);if(this._value!==n){let a=c(n,!0,this._allowSeconds);this._emitChangeEvent(a)&&(this._applyValue(n),this._selectInputText())}break}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown(!0):(F.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this._allowInput&&this._adapter.selectInputText(),this.masked&&this._showMaskFormat&&this._applyMask()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown(!0)}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:L(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown(!0)}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=c(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(ct(this._value)),this._isInitialized&&t!==this._value){let e=c(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown(!0),t=j(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let i;!this._masked&&typeof this._parseCallback=="function"?i=this._parseCallback.call(null,t):i=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),i=this._validateMillis(i),this._trySetValue(i)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(s.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=c(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(s.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,i=typeof this._max=="number"&&t>this._max;(e||i)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):Y(t)}_isValidInputValue(t){return b.test(t)}_onSelect(t){if(this._closeDropdown(!0),!t.isCustom&&t.metadata==="now"&&(t.time=S(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let n=t.customCallback.call(null,t.metadata);if(typeof n!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=n}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=c(t.time,!0,this._allowSeconds);this._emitChangeEvent(e)&&(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let i=this._formatValue(this._value);this._adapter.getInputValue()!==i&&this._adapter.setInputValue(i,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>s.numbers.MAX_DAY_MILLIS?s.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(s.attributes.OPEN);let e=t.filter(a=>!a.divider&&!a.disabled),i=[],n=0;if(t.length)if(this._value!=null){let a=this._findClosestOptionIndex(this._value,e);a>=0&&(e[a].value.time===this._value?i=[e[a].value]:n=a)}else if(typeof this._startTime=="number"){let a=this._findClosestOptionIndex(this._startTime,e);a>=0&&a<e.length&&(n=a)}else this._startTime==null&&(n=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,selectedValues:i,syncWidth:!0,visibleStartIndex:n,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:a=>this._onSelect(a),closeCallback:()=>this._closeDropdown(!0),activeChangeCallback:a=>this._adapter.setActiveDescendant(a),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(s.events.OPEN,void 0,!1)}_closeDropdown(t=!1){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(s.attributes.OPEN),this._adapter.detachDropdown(),t&&this._adapter.emitHostEvent(s.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,i=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,n=v(i,!0,!1);return this._findClosestOptionIndex(n,t)}_findClosestOptionIndex(t,e){let i=e.reduce((n,a)=>Math.abs((a.value.time||0)-t)<Math.abs((n.value.time||0)-t)?a:n);return e.indexOf(i)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let i=this._formatValue(this._value);e!==i&&(this._adapter.setInputValue(i,t),this._adapter.emitInputEvent(s.events.INPUT,i))}_generateTimeOptions(){let t=this._min!=null?Math.max(I(this._min),0):0,e=this._max!=null?Math.min(I(this._max),s.numbers.MAX_DAY_MINUTES):s.numbers.MAX_DAY_MINUTES,i=this._step,n=[],a=[];if(this._showHourOptions){for(let d=t;d<=e&&d!==s.numbers.MAX_DAY_MINUTES;d+=i){let _=T(d),_t=this._restrictedTimes.includes(_),ht=c(_,this._use24HourTime,!1)||"",bt={time:_};n.push({label:ht,value:bt,disabled:_t})}let r=n.findIndex(d=>d.value.time/1e3/60>=720);r>=0&&r<n.length-1&&n.splice(r,0,{label:"",value:null,divider:!0})}if(this._showNow){let r={time:null,metadata:"now"};a.push({label:"Now",value:r})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let r=this._customOptions.map(d=>{let _={time:null,metadata:d.value,isCustom:!0,customCallback:d.toMilliseconds};return{label:d.label,value:_}});a=[...a,...r]}return a.length&&(n.length&&n.splice(0,0,{label:"",value:null,divider:!0}),a.forEach((r,d)=>n.splice(d,0,r))),n}_convertTimeStringToMillis(t,e,i){return(!t||!this._isValidTimeFormat(t))&&(t=""),v(t,e,i)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):c(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(s.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return c(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return c(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return c(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>c(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return c(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(s.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var Tt="<template><slot></slot></template>",kt=":host{display:block}:host([hidden]){display:none}",l=class extends B{constructor(){super();Z.define([rt,K]),H(this,Tt,kt),this._foundation=new k(new g(this))}static get observedAttributes(){return[s.attributes.VALUE,s.attributes.OPEN,s.attributes.ALLOW_SECONDS,s.attributes.MASKED,s.attributes.SHOW_MASK_FORMAT,s.attributes.USE_24_HOUR_TIME,s.attributes.ALLOW_INVALID_TIME,s.attributes.MIN,s.attributes.MAX,s.attributes.START_TIME,s.attributes.STEP,s.attributes.ALLOW_INPUT,s.attributes.SHOW_NOW,s.attributes.SHOW_HOUR_OPTIONS,s.attributes.DISABLED,s.attributes.POPUP_CLASSES,s.attributes.ALLOW_DROPDOWN]}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():A(this,s.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,n){switch(e){case s.attributes.VALUE:this.value=n;break;case s.attributes.OPEN:this.open=m(n);break;case s.attributes.ALLOW_SECONDS:this.allowSeconds=m(n);break;case s.attributes.MASKED:this.masked=m(n);break;case s.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=m(n);break;case s.attributes.USE_24_HOUR_TIME:this.use24HourTime=m(n);break;case s.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=m(n);break;case s.attributes.SHOW_NOW:this.showNow=m(n);break;case s.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=m(n);break;case s.attributes.MIN:this.min=n;break;case s.attributes.MAX:this.max=n;break;case s.attributes.START_TIME:this.startTime=n;break;case s.attributes.STEP:this.step=y(n);break;case s.attributes.ALLOW_INPUT:this.allowInput=m(n);break;case s.attributes.DISABLED:this.disabled=m(n);break;case s.attributes.POPUP_CLASSES:this.popupClasses=n;break;case s.attributes.ALLOW_DROPDOWN:this.allowDropdown=m(n);break}}};p([u()],l.prototype,"value",2),p([u()],l.prototype,"open",2),p([u()],l.prototype,"allowSeconds",2),p([u()],l.prototype,"masked",2),p([u()],l.prototype,"showMaskFormat",2),p([u()],l.prototype,"use24HourTime",2),p([u()],l.prototype,"allowInvalidTime",2),p([u()],l.prototype,"min",2),p([u()],l.prototype,"max",2),p([u()],l.prototype,"restrictedTimes",2),p([u()],l.prototype,"startTime",2),p([u()],l.prototype,"step",2),p([u()],l.prototype,"allowInput",2),p([u()],l.prototype,"showNow",2),p([u()],l.prototype,"showHourOptions",2),p([u()],l.prototype,"customOptions",2),p([u()],l.prototype,"validationCallback",2),p([u()],l.prototype,"parseCallback",2),p([u()],l.prototype,"formatCallback",2),p([u()],l.prototype,"coercionCallback",2),p([u()],l.prototype,"prepareMaskCallback",2),p([u()],l.prototype,"disabled",2),p([u()],l.prototype,"popupClasses",2),p([u()],l.prototype,"allowDropdown",2),p([u()],l.prototype,"popupTarget",2),l=p([R({name:s.elementName,dependencies:[et,tt,ot,E,it,E,at]})],l);var mt=class extends ${constructor(e){super(e)}_build(){let e=document.createElement(s.elementName);return this._attachTextField(e),e}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(s.events.CHANGE,i=>{var n;return e((n=i.detail)!=null?n:"")})}onInput(e){this._element.addEventListener(s.events.INPUT,i=>{var n;return e((n=i.detail)!=null?n:"")})}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",i=>e(i))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",i=>e(i))}_attachTextField(e){var n,a,r,d;let i={props:w({},(a=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:a.props),options:w({},(d=(r=this._config.options)==null?void 0:r.textFieldDelegateConfig)==null?void 0:d.options)};this._textFieldDelegate=new nt(i),e.appendChild(this._textFieldDelegate.element)}};function Ne(){N(l)}export{s as a,g as b,v as c,c as d,pt as e,ut as f,I as g,M as h,It as i,dt as j,T as k,O as l,ct as m,S as n,Rt as o,k as p,l as q,mt as r,Ne as s};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{d as at}from"./chunk.TT2VTZJ6.js";import{h as st}from"./chunk.SYZB7B4F.js";import{e as it}from"./chunk.7G72CBOJ.js";import{c as et}from"./chunk.2QFIMTVP.js";import{e as tt}from"./chunk.5IVB5L5Z.js";import{a as f,b as nt}from"./chunk.PHTOULRR.js";import{a as rt}from"./chunk.LIKJD4SK.js";import{a as F}from"./chunk.MGLWXAZO.js";import{a as C,b as ot}from"./chunk.A5R7KUIP.js";import{j as K}from"./chunk.FYWPZFLJ.js";import{a as Q,d as Z,l as E}from"./chunk.H5D54EHO.js";import{g as J}from"./chunk.XIQFHO5R.js";import{j as b,k as X,n as G,o as q,p as Y,q as j}from"./chunk.DMCBAYQX.js";import{a as $}from"./chunk.G4IN6Y46.js";import{a as u}from"./chunk.NVUMRW44.js";import{a as W}from"./chunk.5V5ABSHI.js";import{a as R,b as z}from"./chunk.DTZFWZPB.js";import{a as N,e as H,f as V,h as U,k as B}from"./chunk.NK7H3MMM.js";import{m as A,s as P,u as x}from"./chunk.CFDK4RCW.js";import{a as D,k as m,l as y,o as L}from"./chunk.J2M2MXP2.js";import{a as w,d as p}from"./chunk.M3QDAYD2.js";var h=`${z}time-picker`,lt={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},ft={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${lt.TOGGLE}]`},gt={OPEN:`${h}-open`,CLOSE:`${h}-close`,INPUT:`${h}-input`,CHANGE:`${h}-change`},vt={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},s={elementName:h,attributes:lt,selectors:ft,events:gt,numbers:vt};var g=class extends W{constructor(e){super(e)}initialize(){this._inputElement=this._component.querySelector(s.selectors.INPUT)}initializeMask(e){this.destroyMask(),this._inputMask=new J(this._inputElement,e)}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=void 0}initializeAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false")}addInputListener(e,i,n){this._inputElement.addEventListener(e,i,{capture:n})}removeInputListener(e,i,n){this._inputElement&&this._inputElement.removeEventListener(e,i,{capture:n})}addToggleListener(e,i){this._toggleElement&&this._toggleElement.addEventListener(e,i)}removeToggleListener(e,i){this._toggleElement&&this._toggleElement.removeEventListener(e,i)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let e=this._component.querySelector(f.elementName),i=this._component.querySelector(s.selectors.TOGGLE);if(e){let n=e.querySelector(`${C.elementName}[slot=trailing]`);if(n||i){this._toggleElement=n||i;return}let a=document.createElement(C.elementName);a.slot="trailing",a.dense=!0,a.densityLevel=3,a.style.marginRight="4px";let r=document.createElement("button");r.type="button",r.tabIndex=-1,r.setAttribute("aria-label","Toggle time dropdown");let d=document.createElement(Q.elementName);d.name="clock_outline",r.appendChild(d),a.appendChild(r),e.appendChild(a),this._toggleElement=a}else i&&(this._toggleElement=i)}tryFocusInput(){this._inputElement.select()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return P()===this._inputElement}setInputValue(e,i){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.update(),i&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this.setToggleDisabled(e)}attachDropdown(e){this._listDropdown=new st(this._inputElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`)}detachDropdown(){this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0),this._inputElement.removeAttribute("aria-controls")}propagateKey(e){var i;(i=this._listDropdown)==null||i.handleKey(e)}setActiveDescendant(e){x(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._getTargetElement(e).getBoundingClientRect().width}_emitInputEvent(e){this._inputElement.dispatchEvent(new Event(e))}emitInputEvent(e,i){U(this._inputElement,e,i)}setInputReadonly(e){this._inputElement.readOnly=e}setToggleDisabled(e){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",e.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=e;else{let i=this._toggleElement.querySelector("button");i&&(i.disabled=e)}}hasActiveOption(){var e,i;return((i=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?i:-1)>=0}activateOptionByIndex(e){var i;(i=this._listDropdown)==null||i.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}getActiveOption(){var e;return(e=this._listDropdown)==null?void 0:e.getActiveOption()}_getTargetElement(e){return this._targetElement?this._targetElement:(this._targetElement=e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){let e=this._component.querySelector(f.elementName);if(e&&e.shadowRoot){let i=V(e,f.selectors.ROOT);if(i)return i}return this._component}};function v(o,t,e){if(!o||/^\s*$/.test(o))return null;let i=0,n=0,a=0;if(b.test(o)){let r=G(o);i=+r.hours||0,n=+r.minutes||0,a=+r.seconds||0}else if(X.test(o)){let r=q(o);i=+r.hours||0,n=+r.minutes||0,a=+r.seconds||0,i===12&&r.meridiem==="AM"&&(i=0),i<12&&r.meridiem==="PM"&&(i+=12)}else return null;return dt(i)+T(n)+(e?O(a):0)}function c(o,t,e){if(typeof o!="number"||o<0)return null;let i=Math.min(pt(o),23),n=Math.min(ut(o),59),r=o/(1e3*60)<720?"AM":"PM";t||(i=i<=12?i:i-12,i===0&&(i=12));let d=`${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}`;if(e){let _=Math.min(M(o),59);d+=`:${String(_).padStart(2,"0")}`}return t||(d+=` ${r}`),d}function pt(o){return Math.abs(Math.floor(o/(1e3*60*60)))}function ut(o){return Math.abs(Math.floor(I(o)%60))}function I(o){return o/(1e3*60)}function M(o){return Math.abs(Math.floor(It(o)%60))}function It(o){return o/1e3}function dt(o){return o*60*60*1e3}function T(o){return o*60*1e3}function O(o){return o*1e3}function ct(o){return o-O(M(o))}function S(o){let t=new Date,e=t.getHours(),i=t.getMinutes();return dt(e)+T(i)+(o?O(t.getSeconds()):0)}function Rt(o,t,e=!1){o||(o=new Date);let i=v(t,!0,e);if(!i)return o.setHours(0,0,0),o;let n=pt(i),a=828e5;n>a?n=a:n<0&&(n=0);let r=ut(i),d=e?M(i):0;return o.setHours(n,r,d),o}var k=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=s.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=D(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown(),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,i;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown(!0));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((i=this._dropdownConfig)==null?void 0:i.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let n=S(this._allowSeconds);if(this._value!==n){let a=c(n,!0,this._allowSeconds);this._emitChangeEvent(a)&&(this._applyValue(n),this._selectInputText())}break}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown(!0):(F.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this._allowInput&&this._adapter.selectInputText(),this.masked&&this._showMaskFormat&&this._applyMask()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown(!0)}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:L(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown(!0)}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=c(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(ct(this._value)),this._isInitialized&&t!==this._value){let e=c(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown(!0),t=j(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let i;!this._masked&&typeof this._parseCallback=="function"?i=this._parseCallback.call(null,t):i=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),i=this._validateMillis(i),this._trySetValue(i)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(s.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=c(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(s.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,i=typeof this._max=="number"&&t>this._max;(e||i)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):Y(t)}_isValidInputValue(t){return b.test(t)}_onSelect(t){if(this._closeDropdown(!0),!t.isCustom&&t.metadata==="now"&&(t.time=S(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let n=t.customCallback.call(null,t.metadata);if(typeof n!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=n}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=c(t.time,!0,this._allowSeconds);this._emitChangeEvent(e)&&(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let i=this._formatValue(this._value);this._adapter.getInputValue()!==i&&this._adapter.setInputValue(i,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>s.numbers.MAX_DAY_MILLIS?s.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(s.attributes.OPEN);let e=t.filter(a=>!a.divider&&!a.disabled),i=[],n=0;if(t.length)if(this._value!=null){let a=this._findClosestOptionIndex(this._value,e);a>=0&&(e[a].value.time===this._value?i=[e[a].value]:n=a)}else if(typeof this._startTime=="number"){let a=this._findClosestOptionIndex(this._startTime,e);a>=0&&a<e.length&&(n=a)}else this._startTime==null&&(n=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,selectedValues:i,syncWidth:!0,visibleStartIndex:n,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:a=>this._onSelect(a),closeCallback:()=>this._closeDropdown(!0),activeChangeCallback:a=>this._adapter.setActiveDescendant(a),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(s.events.OPEN,void 0,!1)}_closeDropdown(t=!1){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(s.attributes.OPEN),this._adapter.detachDropdown(),t&&this._adapter.emitHostEvent(s.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,i=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,n=v(i,!0,!1);return this._findClosestOptionIndex(n,t)}_findClosestOptionIndex(t,e){let i=e.reduce((n,a)=>Math.abs((a.value.time||0)-t)<Math.abs((n.value.time||0)-t)?a:n);return e.indexOf(i)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let i=this._formatValue(this._value);e!==i&&(this._adapter.setInputValue(i,t),this._adapter.emitInputEvent(s.events.INPUT,i))}_generateTimeOptions(){let t=this._min!=null?Math.max(I(this._min),0):0,e=this._max!=null?Math.min(I(this._max),s.numbers.MAX_DAY_MINUTES):s.numbers.MAX_DAY_MINUTES,i=this._step,n=[],a=[];if(this._showHourOptions){for(let d=t;d<=e&&d!==s.numbers.MAX_DAY_MINUTES;d+=i){let _=T(d),_t=this._restrictedTimes.includes(_),ht=c(_,this._use24HourTime,!1)||"",bt={time:_};n.push({label:ht,value:bt,disabled:_t})}let r=n.findIndex(d=>d.value.time/1e3/60>=720);r>=0&&r<n.length-1&&n.splice(r,0,{label:"",value:null,divider:!0})}if(this._showNow){let r={time:null,metadata:"now"};a.push({label:"Now",value:r})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let r=this._customOptions.map(d=>{let _={time:null,metadata:d.value,isCustom:!0,customCallback:d.toMilliseconds};return{label:d.label,value:_}});a=[...a,...r]}return a.length&&(n.length&&n.splice(0,0,{label:"",value:null,divider:!0}),a.forEach((r,d)=>n.splice(d,0,r))),n}_convertTimeStringToMillis(t,e,i){return(!t||!this._isValidTimeFormat(t))&&(t=""),v(t,e,i)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):c(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(s.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return c(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return c(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return c(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>c(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return c(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(s.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var Tt="<template><slot></slot></template>",kt=":host{display:block}:host([hidden]){display:none}",l=class extends B{constructor(){super();Z.define([rt,K]),H(this,Tt,kt),this._foundation=new k(new g(this))}static get observedAttributes(){return[s.attributes.VALUE,s.attributes.OPEN,s.attributes.ALLOW_SECONDS,s.attributes.MASKED,s.attributes.SHOW_MASK_FORMAT,s.attributes.USE_24_HOUR_TIME,s.attributes.ALLOW_INVALID_TIME,s.attributes.MIN,s.attributes.MAX,s.attributes.START_TIME,s.attributes.STEP,s.attributes.ALLOW_INPUT,s.attributes.SHOW_NOW,s.attributes.SHOW_HOUR_OPTIONS,s.attributes.DISABLED,s.attributes.POPUP_CLASSES,s.attributes.ALLOW_DROPDOWN]}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():A(this,s.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,n){switch(e){case s.attributes.VALUE:this.value=n;break;case s.attributes.OPEN:this.open=m(n);break;case s.attributes.ALLOW_SECONDS:this.allowSeconds=m(n);break;case s.attributes.MASKED:this.masked=m(n);break;case s.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=m(n);break;case s.attributes.USE_24_HOUR_TIME:this.use24HourTime=m(n);break;case s.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=m(n);break;case s.attributes.SHOW_NOW:this.showNow=m(n);break;case s.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=m(n);break;case s.attributes.MIN:this.min=n;break;case s.attributes.MAX:this.max=n;break;case s.attributes.START_TIME:this.startTime=n;break;case s.attributes.STEP:this.step=y(n);break;case s.attributes.ALLOW_INPUT:this.allowInput=m(n);break;case s.attributes.DISABLED:this.disabled=m(n);break;case s.attributes.POPUP_CLASSES:this.popupClasses=n;break;case s.attributes.ALLOW_DROPDOWN:this.allowDropdown=m(n);break}}};p([u()],l.prototype,"value",2),p([u()],l.prototype,"open",2),p([u()],l.prototype,"allowSeconds",2),p([u()],l.prototype,"masked",2),p([u()],l.prototype,"showMaskFormat",2),p([u()],l.prototype,"use24HourTime",2),p([u()],l.prototype,"allowInvalidTime",2),p([u()],l.prototype,"min",2),p([u()],l.prototype,"max",2),p([u()],l.prototype,"restrictedTimes",2),p([u()],l.prototype,"startTime",2),p([u()],l.prototype,"step",2),p([u()],l.prototype,"allowInput",2),p([u()],l.prototype,"showNow",2),p([u()],l.prototype,"showHourOptions",2),p([u()],l.prototype,"customOptions",2),p([u()],l.prototype,"validationCallback",2),p([u()],l.prototype,"parseCallback",2),p([u()],l.prototype,"formatCallback",2),p([u()],l.prototype,"coercionCallback",2),p([u()],l.prototype,"prepareMaskCallback",2),p([u()],l.prototype,"disabled",2),p([u()],l.prototype,"popupClasses",2),p([u()],l.prototype,"allowDropdown",2),p([u()],l.prototype,"popupTarget",2),l=p([R({name:s.elementName,dependencies:[et,tt,ot,E,it,E,at]})],l);var mt=class extends ${constructor(e){super(e)}_build(){let e=document.createElement(s.elementName);return this._attachTextField(e),e}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(s.events.CHANGE,i=>{var n;return e((n=i.detail)!=null?n:"")})}onInput(e){this._element.addEventListener(s.events.INPUT,i=>{var n;return e((n=i.detail)!=null?n:"")})}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",i=>e(i))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",i=>e(i))}_attachTextField(e){var n,a,r,d;let i={props:w({},(a=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:a.props),options:w({},(d=(r=this._config.options)==null?void 0:r.textFieldDelegateConfig)==null?void 0:d.options)};this._textFieldDelegate=new nt(i),e.appendChild(this._textFieldDelegate.element)}};function Ne(){N(l)}export{s as a,g as b,v as c,c as d,pt as e,ut as f,I as g,M as h,It as i,dt as j,T as k,O as l,ct as m,S as n,Rt as o,k as p,l as q,mt as r,Ne as s};
|
|
7
|
+
//# sourceMappingURL=chunk.BKCEVPKW.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as o}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as o}from"./chunk.SIJGKRYS.js";import{a as n}from"./chunk.G4IN6Y46.js";var l=class extends n{constructor(e){super(e)}_build(){return document.createElement(o.elementName)}_configure(){var e;typeof((e=this._config.options)==null?void 0:e.helperText)=="string"&&this.setHelperText(this._config.options.helperText)}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._element.invalid||!1}set invalid(e){this._element.invalid=e}onChange(e){this._element.addEventListener("change",t=>e(t.detail))}onFocus(e){this._element.addEventListener("focus",t=>e(t))}onBlur(e){this._element.addEventListener("blur",t=>e(t))}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._helperTextElement.isConnected&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}};export{l as a};
|
|
7
|
+
//# sourceMappingURL=chunk.BSTIDYQJ.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 s}from"./chunk.NVUMRW44.js";import{a as g}from"./chunk.5V5ABSHI.js";import{a as p,b}from"./chunk.DTZFWZPB.js";import{e as _,k as f}from"./chunk.NK7H3MMM.js";import{k as d}from"./chunk.J2M2MXP2.js";import{a as h,d as n}from"./chunk.M3QDAYD2.js";var c=class extends g{constructor(r){super(r);this._targetElement=null}destroy(){this._targetElement=null}hasTargetElement(){return!!this._targetElement}addTargetListener(r,a){var i;(i=this._targetElement)==null||i.addEventListener(r,a)}removeTargetListener(r,a){var i;(i=this._targetElement)==null||i.removeEventListener(r,a)}getTargetElement(){return this._targetElement}setTargetElement(r){this._targetElement=r}trySetTarget(r){if(r){let a=this._component.getRootNode();if(r===":host"&&a instanceof ShadowRoot){this._targetElement=a.host;return}this._targetElement=a.querySelector(`#${r}`)}this._targetElement||this.setTargetElement(this._component.parentElement)}isActive(r){var a;return!!((a=this._targetElement)!=null&&a.matches(r))}};var m=`${b}focus-indicator`,v={TARGET:"target",ACTIVE:"active",INWARD:"inward",CIRCULAR:"circular",ALLOW_FOCUS:"allow-focus"},w=h({},v),e={elementName:m,attributes:w};var l=class{constructor(t){this._adapter=t;this._target=null;this._active=!1;this._inward=!1;this._circular=!1;this._allowFocus=!1;this._interactionListener=r=>this._onInteraction(r)}initialize(){this._adapter.hasTargetElement()||this._adapter.trySetTarget(this._target),this._addListeners()}destroy(){this._adapter.destroy(),this._removeListeners()}_addListeners(){this._adapter.addTargetListener("focusin",this._interactionListener),this._adapter.addTargetListener("focusout",this._interactionListener),this._adapter.addTargetListener("pointerdown",this._interactionListener)}_removeListeners(){this._adapter.removeTargetListener("focusin",this._interactionListener),this._adapter.removeTargetListener("focusout",this._interactionListener),this._adapter.removeTargetListener("pointerdown",this._interactionListener)}_onInteraction(t){switch(t.type){case"focusin":this.active=this._adapter.isActive(this._allowFocus?":focus":":focus-visible");break;case"focusout":this.active=!1;break;case"pointerdown":this.active=this._allowFocus?this._adapter.isActive(":focus"):!1;break}}get targetElement(){return this._adapter.getTargetElement()}set targetElement(t){this._removeListeners(),this._adapter.setTargetElement(t),this._addListeners()}get target(){return this._adapter.getHostAttribute(e.attributes.TARGET)}set target(t){this._target!==t&&(this._target=t,this._adapter.isConnected&&this._adapter.trySetTarget(t),this._adapter.toggleHostAttribute(e.attributes.TARGET,!!this._target,this._target))}get active(){return this._active}set active(t){t=!!t,this._active!==t&&(this._active=t,this._adapter.toggleHostAttribute(e.attributes.ACTIVE,this._active))}get inward(){return this._inward}set inward(t){t=!!t,this._inward!==t&&(this._inward=t,this._adapter.toggleHostAttribute(e.attributes.INWARD,this._inward))}get circular(){return this._circular}set circular(t){t=!!t,this._circular!==t&&(this._circular=t,this._adapter.toggleHostAttribute(e.attributes.CIRCULAR,this._circular))}get allowFocus(){return this._allowFocus}set allowFocus(t){t=!!t,this._allowFocus!==t&&(this._allowFocus=t,this._adapter.toggleHostAttribute(e.attributes.ALLOW_FOCUS,this._allowFocus))}};var T='<template><div class="forge-focus-indicator" part="indicator"></div></template>',E=".forge-focus-indicator{--_active-width:var(--forge-focus-indicator-active-width, 6px);--_color:var(--forge-focus-indicator-color, var(--mdc-theme-primary, #3f51b5));--_duration:var(--forge-focus-indicator-duration, 600ms);--_outward-offset:var(--forge-focus-indicator-outward-offset, 4px);--_inward-offset:var(--forge-focus-indicator-inward-offset, 0px);--_shape:var(--forge-focus-indicator-shape, 1px);--_width:var(--forge-focus-indicator-width, 3px);--_easing:var(--forge-focus-indicator-easing, cubic-bezier(0.2, 0, 0, 1));--_shape-start-start:var(--forge-focus-indicator-shape-start-start, var(--_shape));--_shape-start-end:var(--forge-focus-indicator-shape-start-end, var(--_shape));--_shape-end-start:var(--forge-focus-indicator-shape-end-start, var(--_shape));--_shape-end-end:var(--forge-focus-indicator-shape-end-end, var(--_shape));--_margin-block:var(--forge-focus-indicator-offset-block, 0);--_margin-inline:var(--forge-focus-indicator-offset-inline, 0);-webkit-animation-delay:0s,calc(var(--_duration) * .25);animation-delay:0s,calc(var(--_duration) * .25);-webkit-animation-duration:calc(var(--_duration) * .25),calc(var(--_duration) * .75);animation-duration:calc(var(--_duration) * .25),calc(var(--_duration) * .75);-webkit-animation-timing-function:var(--_easing);animation-timing-function:var(--_easing);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--_color);display:none;pointer-events:none;position:absolute;margin-block:var(--_margin-block);margin-inline:var(--_margin-inline)}@media (prefers-reduced-motion){.forge-focus-indicator{-webkit-animation:none;animation:none}}@-webkit-keyframes outward-grow{from{outline-width:0}to{outline-width:var(--_active-width)}}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--_active-width)}}@-webkit-keyframes outward-shrink{from{outline-width:var(--_active-width)}}@keyframes outward-shrink{from{outline-width:var(--_active-width)}}@-webkit-keyframes inward-grow{from{border-width:0}to{border-width:var(--_active-width)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--_active-width)}}@-webkit-keyframes inward-shrink{from{border-width:var(--_active-width)}}@keyframes inward-shrink{from{border-width:var(--_active-width)}}:host{display:contents}:host([hidden]){display:none}:host([active]) .forge-focus-indicator{display:-webkit-box;display:flex}:host(:not([inward])) .forge-focus-indicator{-webkit-animation-name:outward-grow,outward-shrink;animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--_shape-end-end) + var(--_outward-offset));border-end-start-radius:calc(var(--_shape-end-start) + var(--_outward-offset));border-start-end-radius:calc(var(--_shape-start-end) + var(--_outward-offset));border-start-start-radius:calc(var(--_shape-start-start) + var(--_outward-offset));inset:calc(-1 * var(--_outward-offset));outline:var(--_width) solid currentColor}:host([inward]) .forge-focus-indicator{-webkit-animation-name:inward-grow,inward-shrink;animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--_shape-end-end) - var(--_inward-offset));border-end-start-radius:calc(var(--_shape-end-start) - var(--_inward-offset));border-start-end-radius:calc(var(--_shape-start-end) - var(--_inward-offset));border-start-start-radius:calc(var(--_shape-start-start) - var(--_inward-offset));border:var(--_width) solid currentColor;inset:var(--_inward-offset)}:host([circular]) .forge-focus-indicator{--_shape:50%}",o=class extends f{constructor(){super();_(this,T,E),this._foundation=new l(new c(this))}static get observedAttributes(){return[e.attributes.TARGET,e.attributes.ACTIVE,e.attributes.INWARD,e.attributes.CIRCULAR,e.attributes.ALLOW_FOCUS]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(r,a,i){switch(r){case e.attributes.TARGET:this.target=i;break;case e.attributes.ACTIVE:this.active=d(i);break;case e.attributes.INWARD:this.inward=d(i);break;case e.attributes.CIRCULAR:this.circular=d(i);break;case e.attributes.ALLOW_FOCUS:this.allowFocus=d(i);break}}};n([s()],o.prototype,"targetElement",2),n([s()],o.prototype,"target",2),n([s()],o.prototype,"active",2),n([s()],o.prototype,"inward",2),n([s()],o.prototype,"circular",2),n([s()],o.prototype,"allowFocus",2),o=n([p({name:e.elementName})],o);export{c as a,e as b,l as c,o as d};
|
|
7
|
+
//# sourceMappingURL=chunk.C2LTB7EX.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/focus-indicator/focus-indicator-adapter.ts", "../../src/focus-indicator/focus-indicator-constants.ts", "../../src/focus-indicator/focus-indicator-foundation.ts", "../../src/focus-indicator/focus-indicator.ts"],
|
|
4
|
+
"sourcesContent": ["import { BaseAdapter, IBaseAdapter } from '../core';\nimport { IFocusIndicatorComponent } from './focus-indicator';\n\nexport interface IFocusIndicatorAdapter extends IBaseAdapter {\n destroy(): void;\n hasTargetElement(): boolean;\n addTargetListener(type: string, listener: EventListener): void;\n removeTargetListener(type: string, listener: EventListener): void;\n getTargetElement(): HTMLElement | null;\n setTargetElement(el: HTMLElement | null): void;\n trySetTarget(value: string | null): void;\n isActive(selector: string): boolean;\n}\n\nexport class FocusIndicatorAdapter extends BaseAdapter<IFocusIndicatorComponent> implements IFocusIndicatorAdapter {\n private _targetElement: HTMLElement | null = null;\n\n constructor(component: IFocusIndicatorComponent) {\n super(component);\n }\n\n public destroy(): void {\n this._targetElement = null;\n }\n \n public hasTargetElement(): boolean {\n return !!this._targetElement;\n }\n\n public addTargetListener(type: string, listener: EventListener): void {\n this._targetElement?.addEventListener(type, listener);\n }\n\n public removeTargetListener(type: string, listener: EventListener): void {\n this._targetElement?.removeEventListener(type, listener);\n }\n\n public getTargetElement(): HTMLElement | null {\n return this._targetElement;\n }\n\n public setTargetElement(el: HTMLElement | null): void {\n this._targetElement = el;\n }\n\n /**\n * We use the following heuristic for locating the target element:\n * - If the `target` attribute is set, we use that value to query the DOM for the target element\n * - If the `target` attribute is set to `:host`, we use the host element from within a shadow tree (only if the root node is a ShadowRoot instance)\n * - If the `target` attribute is set but the querySelector returns null, we use the parent element as the target element\n * - If the `target` attribute is not set, we use the parent element as the target element\n * @param value {string | null} - A selector string to query the DOM for the target element\n */\n public trySetTarget(value: string | null): void {\n if (value) {\n const rootNode = this._component.getRootNode() as Document | ShadowRoot;\n\n // Special case handling for a `:host` selector to easily target a host element\n // from within a shadow tree, given that this is a very common scenario\n if (value === ':host' && rootNode instanceof ShadowRoot) {\n this._targetElement = rootNode.host as HTMLElement;\n return;\n }\n\n this._targetElement = rootNode.querySelector(`#${value}`);\n }\n\n if (!this._targetElement) {\n this.setTargetElement(this._component.parentElement);\n }\n }\n\n public isActive(selector: string): boolean {\n return !!this._targetElement?.matches(selector);\n }\n}\n", "import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}focus-indicator`;\n\nconst observedAttributes = {\n TARGET: 'target',\n ACTIVE: 'active',\n INWARD: 'inward',\n CIRCULAR: 'circular',\n ALLOW_FOCUS: 'allow-focus'\n};\n\nconst attributes = {\n ...observedAttributes\n};\n\nexport const FOCUS_INDICATOR_CONSTANTS = {\n elementName,\n attributes\n};\n", "import { IFocusIndicatorAdapter } from './focus-indicator-adapter';\nimport { FOCUS_INDICATOR_CONSTANTS } from './focus-indicator-constants';\n\nexport interface IFocusIndicatorFoundation {\n targetElement: HTMLElement | null;\n target: string | null;\n active: boolean;\n inward: boolean;\n circular: boolean;\n allowFocus: boolean;\n initialize(): void;\n destroy(): void;\n}\n\nexport class FocusIndicatorFoundation implements IFocusIndicatorFoundation {\n private _target: string | null = null;\n private _active = false;\n private _inward = false;\n private _circular = false;\n private _allowFocus = false;\n private _interactionListener: EventListener;\n\n constructor(private _adapter: IFocusIndicatorAdapter) {\n this._interactionListener = evt => this._onInteraction(evt);\n }\n\n public initialize(): void {\n if (!this._adapter.hasTargetElement()) {\n this._adapter.trySetTarget(this._target);\n }\n this._addListeners();\n }\n\n public destroy(): void {\n this._adapter.destroy();\n this._removeListeners();\n }\n\n private _addListeners(): void {\n this._adapter.addTargetListener('focusin', this._interactionListener);\n this._adapter.addTargetListener('focusout', this._interactionListener);\n this._adapter.addTargetListener('pointerdown', this._interactionListener);\n }\n\n private _removeListeners(): void {\n this._adapter.removeTargetListener('focusin', this._interactionListener);\n this._adapter.removeTargetListener('focusout', this._interactionListener);\n this._adapter.removeTargetListener('pointerdown', this._interactionListener);\n }\n\n private _onInteraction(evt: Event): void {\n switch (evt.type) {\n case 'focusin':\n this.active = this._adapter.isActive(this._allowFocus ? ':focus' : ':focus-visible');\n break;\n case 'focusout':\n this.active = false;\n break;\n case 'pointerdown':\n this.active = this._allowFocus ? this._adapter.isActive(':focus') : false;\n break;\n }\n }\n\n public get targetElement(): HTMLElement | null {\n return this._adapter.getTargetElement();\n }\n public set targetElement(value: HTMLElement | null) {\n this._removeListeners();\n this._adapter.setTargetElement(value);\n this._addListeners();\n }\n\n public get target(): string | null {\n return this._adapter.getHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.TARGET);\n }\n public set target(value: string | null) {\n if (this._target !== value) {\n this._target = value;\n if (this._adapter.isConnected) {\n this._adapter.trySetTarget(value);\n }\n this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.TARGET, Boolean(this._target), this._target as string);\n }\n }\n\n public get active(): boolean {\n return this._active;\n }\n public set active(value: boolean) {\n value = Boolean(value);\n if (this._active !== value) {\n this._active = value;\n this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.ACTIVE, this._active);\n }\n }\n\n public get inward(): boolean {\n return this._inward;\n }\n public set inward(value: boolean) {\n value = Boolean(value);\n if (this._inward !== value) {\n this._inward = value;\n this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.INWARD, this._inward);\n }\n }\n\n public get circular(): boolean {\n return this._circular;\n }\n public set circular(value: boolean) {\n value = Boolean(value);\n if (this._circular !== value) {\n this._circular = value;\n this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.CIRCULAR, this._circular);\n }\n }\n\n public get allowFocus(): boolean {\n return this._allowFocus;\n }\n public set allowFocus(value: boolean) {\n value = Boolean(value);\n if (this._allowFocus !== value) {\n this._allowFocus = value;\n this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.ALLOW_FOCUS, this._allowFocus);\n }\n }\n}\n", "import { attachShadowTemplate, coerceBoolean, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\nimport { FocusIndicatorAdapter } from './focus-indicator-adapter';\nimport { FOCUS_INDICATOR_CONSTANTS } from './focus-indicator-constants';\nimport { FocusIndicatorFoundation } from './focus-indicator-foundation';\n\nconst template = '<template><div class=\\\"forge-focus-indicator\\\" part=\\\"indicator\\\"></div></template>';\nconst styles = '.forge-focus-indicator{--_active-width:var(--forge-focus-indicator-active-width, 6px);--_color:var(--forge-focus-indicator-color, var(--mdc-theme-primary, #3f51b5));--_duration:var(--forge-focus-indicator-duration, 600ms);--_outward-offset:var(--forge-focus-indicator-outward-offset, 4px);--_inward-offset:var(--forge-focus-indicator-inward-offset, 0px);--_shape:var(--forge-focus-indicator-shape, 1px);--_width:var(--forge-focus-indicator-width, 3px);--_easing:var(--forge-focus-indicator-easing, cubic-bezier(0.2, 0, 0, 1));--_shape-start-start:var(--forge-focus-indicator-shape-start-start, var(--_shape));--_shape-start-end:var(--forge-focus-indicator-shape-start-end, var(--_shape));--_shape-end-start:var(--forge-focus-indicator-shape-end-start, var(--_shape));--_shape-end-end:var(--forge-focus-indicator-shape-end-end, var(--_shape));--_margin-block:var(--forge-focus-indicator-offset-block, 0);--_margin-inline:var(--forge-focus-indicator-offset-inline, 0);-webkit-animation-delay:0s,calc(var(--_duration) * .25);animation-delay:0s,calc(var(--_duration) * .25);-webkit-animation-duration:calc(var(--_duration) * .25),calc(var(--_duration) * .75);animation-duration:calc(var(--_duration) * .25),calc(var(--_duration) * .75);-webkit-animation-timing-function:var(--_easing);animation-timing-function:var(--_easing);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--_color);display:none;pointer-events:none;position:absolute;margin-block:var(--_margin-block);margin-inline:var(--_margin-inline)}@media (prefers-reduced-motion){.forge-focus-indicator{-webkit-animation:none;animation:none}}@-webkit-keyframes outward-grow{from{outline-width:0}to{outline-width:var(--_active-width)}}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--_active-width)}}@-webkit-keyframes outward-shrink{from{outline-width:var(--_active-width)}}@keyframes outward-shrink{from{outline-width:var(--_active-width)}}@-webkit-keyframes inward-grow{from{border-width:0}to{border-width:var(--_active-width)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--_active-width)}}@-webkit-keyframes inward-shrink{from{border-width:var(--_active-width)}}@keyframes inward-shrink{from{border-width:var(--_active-width)}}:host{display:contents}:host([hidden]){display:none}:host([active]) .forge-focus-indicator{display:-webkit-box;display:flex}:host(:not([inward])) .forge-focus-indicator{-webkit-animation-name:outward-grow,outward-shrink;animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--_shape-end-end) + var(--_outward-offset));border-end-start-radius:calc(var(--_shape-end-start) + var(--_outward-offset));border-start-end-radius:calc(var(--_shape-start-end) + var(--_outward-offset));border-start-start-radius:calc(var(--_shape-start-start) + var(--_outward-offset));inset:calc(-1 * var(--_outward-offset));outline:var(--_width) solid currentColor}:host([inward]) .forge-focus-indicator{-webkit-animation-name:inward-grow,inward-shrink;animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--_shape-end-end) - var(--_inward-offset));border-end-start-radius:calc(var(--_shape-end-start) - var(--_inward-offset));border-start-end-radius:calc(var(--_shape-start-end) - var(--_inward-offset));border-start-start-radius:calc(var(--_shape-start-start) - var(--_inward-offset));border:var(--_width) solid currentColor;inset:var(--_inward-offset)}:host([circular]) .forge-focus-indicator{--_shape:50%}';\n\nexport interface IFocusIndicatorComponent extends IBaseComponent {\n targetElement: HTMLElement;\n target: string | null;\n active: boolean;\n inward: boolean;\n circular: boolean;\n allowFocus: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-focus-indicator': IFocusIndicatorComponent;\n }\n}\n\n/**\n * @tag forge-focus-indicator\n * \n * @summary Renders a focus indicator when an attached element matches `:focus-visible`.\n * \n * @property {HTMLElement} targetElement - The element to attach the focus indicator to.\n * @property {string} target - The id of the element to attach the focus indicator to.\n * @property {boolean} active - Controls whether the indicator is active.\n * @property {boolean} inward - Controls whether the indicator renders inward.\n * @property {boolean} circular - Controls whether the indicator renders circular.\n * @property {boolean} allowFocus - Controls whether the indicator renders when the target element matches `:focus` instead of `:focus-visible`.\n * \n * @attribute {string} target - The id of the element to attach the focus indicator to.\n * @attribute {boolean} active - Controls whether the indicator is active.\n * @attribute {boolean} inward - Controls whether the indicator renders inward.\n * @attribute {boolean} circular - Controls whether the indicator renders circular.\n * @attribute {boolean} allow-focus - Controls whether the indicator renders when the target element matches `:focus` instead of `:focus-visible`.\n * \n * @cssproperty --forge-focus-indicator-active-width - The width of the focus indicator when active. When animating this is the max extent.\n * @cssproperty --forge-focus-indicator-color - The color of the focus indicator.\n * @cssproperty --forge-focus-indicator-duration - The animation duration.\n * @cssproperty --forge-focus-indicator-outward-offset - The offset of the focus indicator when outward.\n * @cssproperty --forge-focus-indicator-inward-offset - The offset of the focus indicator when inward.\n * @cssproperty --forge-focus-indicator-shape - The shape of the focus indicator.\n * @cssproperty --forge-focus-indicator-width - The width of the focus indicator when resting.\n * @cssproperty --forge-focus-indicator-shape-start-start - The start start shape.\n * @cssproperty --forge-focus-indicator-shape-start-end - The start end shape.\n * @cssproperty --forge-focus-indicator-shape-end-start - The end start shape.\n * @cssproperty --forge-focus-indicator-shape-end-end - The end end shape.\n * @cssproperty --forge-focus-indicator-offset-block - The block offset.\n * @cssproperty --forge-focus-indicator-offset-inline - The inline offset.\n * \n * @csspart indicator - The focus indicator element.\n */\n@CustomElement({\n name: FOCUS_INDICATOR_CONSTANTS.elementName\n})\nexport class FocusIndicatorComponent extends BaseComponent implements IFocusIndicatorComponent {\n public static get observedAttributes(): string[] {\n return [\n FOCUS_INDICATOR_CONSTANTS.attributes.TARGET,\n FOCUS_INDICATOR_CONSTANTS.attributes.ACTIVE,\n FOCUS_INDICATOR_CONSTANTS.attributes.INWARD,\n FOCUS_INDICATOR_CONSTANTS.attributes.CIRCULAR,\n FOCUS_INDICATOR_CONSTANTS.attributes.ALLOW_FOCUS\n ];\n }\n\n private _foundation: FocusIndicatorFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new FocusIndicatorFoundation(new FocusIndicatorAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.destroy();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case FOCUS_INDICATOR_CONSTANTS.attributes.TARGET:\n this.target = newValue;\n break;\n case FOCUS_INDICATOR_CONSTANTS.attributes.ACTIVE:\n this.active = coerceBoolean(newValue);\n break;\n case FOCUS_INDICATOR_CONSTANTS.attributes.INWARD:\n this.inward = coerceBoolean(newValue);\n break;\n case FOCUS_INDICATOR_CONSTANTS.attributes.CIRCULAR:\n this.circular = coerceBoolean(newValue);\n break;\n case FOCUS_INDICATOR_CONSTANTS.attributes.ALLOW_FOCUS:\n this.allowFocus = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare targetElement: HTMLElement;\n\n @FoundationProperty()\n public declare target: string | null;\n\n @FoundationProperty()\n public declare active: boolean;\n\n @FoundationProperty()\n public declare inward: boolean;\n\n @FoundationProperty()\n public declare circular: boolean;\n\n @FoundationProperty()\n public declare allowFocus: boolean;\n}\n"],
|
|
5
|
+
"mappings": "gQAcO,IAAMA,EAAN,cAAoCC,CAAwE,CAGjH,YAAYC,EAAqC,CAC/C,MAAMA,CAAS,EAHjB,KAAQ,eAAqC,IAI7C,CAEO,SAAgB,CACrB,KAAK,eAAiB,IACxB,CAEO,kBAA4B,CACjC,MAAO,CAAC,CAAC,KAAK,cAChB,CAEO,kBAAkBC,EAAcC,EAA+B,CA7BxE,IAAAC,GA8BIA,EAAA,KAAK,iBAAL,MAAAA,EAAqB,iBAAiBF,EAAMC,EAC9C,CAEO,qBAAqBD,EAAcC,EAA+B,CAjC3E,IAAAC,GAkCIA,EAAA,KAAK,iBAAL,MAAAA,EAAqB,oBAAoBF,EAAMC,EACjD,CAEO,kBAAuC,CAC5C,OAAO,KAAK,cACd,CAEO,iBAAiBE,EAA8B,CACpD,KAAK,eAAiBA,CACxB,CAUO,aAAaC,EAA4B,CAC9C,GAAIA,EAAO,CACT,IAAMC,EAAW,KAAK,WAAW,YAAY,EAI7C,GAAID,IAAU,SAAWC,aAAoB,WAAY,CACvD,KAAK,eAAiBA,EAAS,KAC/B,OAGF,KAAK,eAAiBA,EAAS,cAAc,IAAID,GAAO,EAGrD,KAAK,gBACR,KAAK,iBAAiB,KAAK,WAAW,aAAa,CAEvD,CAEO,SAASE,EAA2B,CAxE7C,IAAAJ,EAyEI,MAAO,CAAC,GAACA,EAAA,KAAK,iBAAL,MAAAA,EAAqB,QAAQI,GACxC,CACF,ECzEA,IAAMC,EAA2C,GAAGC,mBAE9CC,EAAqB,CACzB,OAAQ,SACR,OAAQ,SACR,OAAQ,SACR,SAAU,WACV,YAAa,aACf,EAEMC,EAAa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AAO,CACLC,EAA0B,WAAW,OACrCA,EAA0B,WAAW,OACrCA,EAA0B,WAAW,OACrCA,EAA0B,WAAW,SACrCA,EAA0B,WAAW,WACvC,CACF,CAUO,mBAA0B,CAC/B,KAAK,YAAY,WAAW,CAC9B,CAEO,sBAA6B,CAClC,KAAK,YAAY,QAAQ,CAC3B,CAEO,yBAAyBC,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKD,EAA0B,WAAW,OACxC,KAAK,OAASG,EACd,MACF,KAAKH,EAA0B,WAAW,OACxC,KAAK,OAASI,EAAcD,CAAQ,EACpC,MACF,KAAKH,EAA0B,WAAW,OACxC,KAAK,OAASI,EAAcD,CAAQ,EACpC,MACF,KAAKH,EAA0B,WAAW,SACxC,KAAK,SAAWI,EAAcD,CAAQ,EACtC,MACF,KAAKH,EAA0B,WAAW,YACxC,KAAK,WAAaI,EAAcD,CAAQ,EACxC,KACJ,CACF,CAmBF,EAhBiBE,EAAA,CADdC,EAAmB,GA/CTX,EAgDI,6BAGAU,EAAA,CADdC,EAAmB,GAlDTX,EAmDI,sBAGAU,EAAA,CADdC,EAAmB,GArDTX,EAsDI,sBAGAU,EAAA,CADdC,EAAmB,GAxDTX,EAyDI,sBAGAU,EAAA,CADdC,EAAmB,GA3DTX,EA4DI,wBAGAU,EAAA,CADdC,EAAmB,GA9DTX,EA+DI,0BA/DJA,EAANU,EAAA,CAHNE,EAAc,CACb,KAAMP,EAA0B,WAClC,CAAC,GACYL",
|
|
6
|
+
"names": ["FocusIndicatorAdapter", "BaseAdapter", "component", "type", "listener", "_a", "el", "value", "rootNode", "selector", "elementName", "COMPONENT_NAME_PREFIX", "observedAttributes", "attributes", "__spreadValues", "FOCUS_INDICATOR_CONSTANTS", "FocusIndicatorFoundation", "_adapter", "evt", "value", "FOCUS_INDICATOR_CONSTANTS", "template", "styles", "FocusIndicatorComponent", "BaseComponent", "attachShadowTemplate", "FocusIndicatorFoundation", "FocusIndicatorAdapter", "FOCUS_INDICATOR_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as r,b as B,c as g,f as V}from"./chunk.LJYTJ3RV.js";import{b as H}from"./chunk.A5R7KUIP.js";import{q as h,r as m,s as _,t as v}from"./chunk.FYWPZFLJ.js";import{d as N,l as R}from"./chunk.H5D54EHO.js";import{a as b}from"./chunk.NVUMRW44.js";import{a as O}from"./chunk.5V5ABSHI.js";import{a as C}from"./chunk.DTZFWZPB.js";import{a as L,e as I,f as y,k as z}from"./chunk.NK7H3MMM.js";import{u as E}from"./chunk.CFDK4RCW.js";import{k as p,l as A}from"./chunk.J2M2MXP2.js";import{d}from"./chunk.M3QDAYD2.js";var w=class extends O{constructor(e){super(e);this._defaultSlotElement=y(this._component,r.selectors.DEFAULT_SLOT),this._container=y(this._component,r.selectors.CONTAINER),this._scrollContainer=y(this._component,r.selectors.SCROLL_CONTAINER)}initializeContainerSizeObserver(e){this._resizeObserver=new ResizeObserver(()=>e()),this._resizeObserver.observe(this._component)}initializeScrollObserver(e){this._scrollContainer.addEventListener("scroll",e,{passive:!0})}destroyContainerSizeObserver(){var e;(e=this._resizeObserver)==null||e.disconnect(),this._resizeObserver=void 0}destroyScrollObserver(e){this._scrollContainer.removeEventListener("scroll",e,{passive:!0})}setVertical(e){E(this._scrollContainer,!!e,"aria-orientation","vertical")}setScrollBackwardButtonListener(e){var o,i;(i=(o=this._backwardScrollButton)==null?void 0:o.querySelector("button"))==null||i.addEventListener("click",e)}setScrollForwardButtonListener(e){var o,i;(i=(o=this._forwardScrollButton)==null?void 0:o.querySelector("button"))==null||i.addEventListener("click",e)}addSlotListener(e){this._defaultSlotElement.addEventListener("slotchange",e)}getTabs(){return Array.from(this._component.querySelectorAll(g.elementName))}async tryScrollTabIntoView(e){if(await new Promise(requestAnimationFrame),!e.isConnected||!e.selected&&!e.matches(":focus"))return;let o=this._component.vertical,i=o?this._scrollContainer.offsetTop:this._scrollContainer.offsetLeft,a=o?e.offsetTop:e.offsetLeft,c=o?e.offsetHeight:e.offsetWidth,l=o?this._scrollContainer.scrollTop:this._scrollContainer.scrollLeft,n=o?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth,u=a-(r.numbers.SCROLL_MARGIN+i),f=a+c-n+(r.numbers.SCROLL_MARGIN-i),k=Math.min(u,Math.max(f,l)),S=e.matches(":focus")?"smooth":"instant";this._scrollContainer.scrollTo({behavior:S,[o?"left":"top"]:0,[o?"top":"left"]:k})}getScrollState(){let{scrollHeight:e,scrollWidth:o,scrollLeft:i,scrollTop:a,clientHeight:c,clientWidth:l}=this._scrollContainer,n=this._component.vertical?c+a:l+i,u=this._component.vertical?e:o,f=n===u;return{isScrolledStart:(this._component.vertical?n-c:n-l)===0,isScrolledEnd:f}}isScrollable(){let{scrollHeight:e,scrollWidth:o,clientHeight:i,clientWidth:a}=this._scrollContainer;return this._component.vertical?e>i:o>a}setScrollButtons(e){var o,i;e?(this._backwardScrollButton=this._createScrollButton(this._component.vertical?v.name:m.name),this._container.insertAdjacentElement("afterbegin",this._backwardScrollButton),this._forwardScrollButton=this._createScrollButton(this._component.vertical?h.name:_.name),this._container.insertAdjacentElement("beforeend",this._forwardScrollButton)):((o=this._backwardScrollButton)==null||o.remove(),this._backwardScrollButton=void 0,(i=this._forwardScrollButton)==null||i.remove(),this._forwardScrollButton=void 0)}syncScrollButtons({backwardEnabled:e,forwardEnabled:o}){var c,l;let i=(c=this._backwardScrollButton)==null?void 0:c.querySelector("button"),a=(l=this._forwardScrollButton)==null?void 0:l.querySelector("button");if(i){let n=!e;n&&i.matches(":focus")&&(a==null||a.focus()),i.disabled=n}if(a){let n=!o;n&&a.matches(":focus")&&(i==null||i.focus()),a.disabled=n}}scroll(e){let o=this._component.vertical?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth;this._scrollContainer.scrollBy({behavior:"smooth",[this._component.vertical?"top":"left"]:o*(e==="forward"?1:-1)})}updateScrollButtonIcons(e){var a,c;let o=(a=this._backwardScrollButton)==null?void 0:a.querySelector("forge-icon");o&&(o.name=e?v.name:m.name);let i=(c=this._forwardScrollButton)==null?void 0:c.querySelector("forge-icon");i&&(i.name=e?h.name:_.name)}_createScrollButton(e){let o=document.createElement("forge-icon-button");o.classList.add(r.classes.SCROLL_BUTTON);let i=document.createElement("button");i.type="button",i.tabIndex=-1,i.setAttribute("aria-hidden","true"),o.appendChild(i);let a=document.createElement("forge-icon");return a.name=e,i.appendChild(a),o}};var T=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._disabled=!1;this._vertical=!1;this._clustered=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._autoActivate=!1;this._scrollButtons=!1;this._tabs=[];this._scrollButtonsVisible=!1;this._tabsChangedListener=()=>this._onTabsChanged(),this._tabSelectedListener=e=>this._onTabSelected(e),this._keydownListener=e=>this._onKeydown(e),this._resizeListener=()=>this._onResize(),this._scrollListener=()=>this._onScroll(),this._scrollBackwardButtonListener=()=>this._onScrollBackward(),this._scrollForwardButtonListener=()=>this._onScrollForward()}initialize(){this._adapter.addSlotListener(this._tabsChangedListener),this._adapter.addHostListener(g.events.SELECT,this._tabSelectedListener),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.setVertical(this._vertical),this._scrollButtons&&(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState()),this._tryScrollActiveTabIntoView(),this._isInitialized=!0}destroy(){this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._isInitialized=!1}async _onTabsChanged(){this._tabs=this._adapter.getTabs(),this._syncTabState(),this._tryScrollActiveTabIntoView()}_onTabSelected(t){this._selectTab(t.target)}async _onKeydown(t){var a,c;let e=this._vertical?"vertical":"horizontal";if(!(((a=B.get("default"))==null?void 0:a.has(t.key))||((c=B.get(e))==null?void 0:c.has(t.key))))return;t.preventDefault();let i=-1;if(t.key==="Home")i=this._tabs.findIndex(l=>!l.disabled);else if(t.key==="End")i=this._tabs.reduceRight((l,n,u)=>!n.disabled&&l===-1?u:l,-1);else{let l=this._tabs.findIndex(f=>f.matches(":focus")),n=t.key==="ArrowLeft"||t.key==="ArrowUp",u=f=>{var S;i=f+(n?-1:1),i=i<0?this._tabs.length-1:i%this._tabs.length,!this._tabs.every(D=>D.disabled)&&((S=this._tabs[i])!=null&&S.disabled)&&u(i)};u(l)}i!==-1&&(this._autoActivate?this._selectTab(this._tabs[i]):(this._tabs[i].focus({preventScroll:!0}),await this._adapter.tryScrollTabIntoView(this._tabs[i])))}async _selectTab(t,e=!0){if(!t||t.disabled)return;let o=this._tabs.find(i=>i.selected);if(o!==t){if(e){let i=this._tabs.indexOf(t);if(!this._adapter.emitHostEvent(r.events.CHANGE,i,!0,!0))return}t.selected=!0,t.focus({preventScroll:!0}),await this._adapter.tryScrollTabIntoView(t),o&&(o.selected=!1),this._activeTab=this._tabs.indexOf(t)}}_syncTabState(){this._tabs.forEach((t,e)=>{t.selected=e===this._activeTab,t.disabled=this._disabled,t.vertical=this._vertical,t.stacked=this._stacked,t.secondary=this._secondary,t.inverted=this._inverted})}_onResize(){this._detectScrollableStatus()}_onScroll(){this._updateScrollState()}_onScrollBackward(){this._adapter.scroll("backward")}_onScrollForward(){this._adapter.scroll("forward")}_detectScrollableStatus(){let t=this._adapter.isScrollable();this._scrollButtonsVisible!==t&&(this._adapter.setScrollButtons(t),t?(this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState(),this._adapter.setScrollBackwardButtonListener(this._scrollBackwardButtonListener),this._adapter.setScrollForwardButtonListener(this._scrollForwardButtonListener)):this._adapter.destroyScrollObserver(this._scrollListener),this._scrollButtonsVisible=t)}_updateScrollState(){let{isScrolledEnd:t,isScrolledStart:e}=this._adapter.getScrollState(),o={backwardEnabled:!e,forwardEnabled:!t};this._adapter.syncScrollButtons(o)}_tryScrollActiveTabIntoView(){this._tabScrollAnimationFrame&&window.cancelAnimationFrame(this._tabScrollAnimationFrame),this._tabScrollAnimationFrame=window.requestAnimationFrame(()=>{this._tabScrollAnimationFrame=void 0,this._adapter.isScrollable()&&typeof this._activeTab=="number"&&this._activeTab>=0&&this._tabs[this._activeTab]&&this._adapter.tryScrollTabIntoView(this._tabs[this._activeTab])})}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._tabs.forEach(e=>e.disabled=this._disabled),this._adapter.toggleHostAttribute(r.attributes.DISABLED,this._disabled))}get activeTab(){return this._activeTab}set activeTab(t){if(this._activeTab!==t)if(this._activeTab=t!=null?t:void 0,typeof this._activeTab=="number"){let e=this._tabs[this._activeTab];this._selectTab(e,!1),this._adapter.setHostAttribute(r.attributes.ACTIVE_TAB,String(this._activeTab))}else this._tabs.forEach(e=>e.selected=!1),this._adapter.removeHostAttribute(r.attributes.ACTIVE_TAB)}get vertical(){return this._vertical}set vertical(t){t=!!t,this._vertical!==t&&(this._vertical=t,this._isInitialized&&this._adapter.setVertical(this._vertical),this._tabs.forEach(e=>e.vertical=this._vertical),this._scrollButtonsVisible&&this._adapter.updateScrollButtonIcons(this._vertical),this._adapter.toggleHostAttribute(g.attributes.VERTICAL,this._vertical))}get clustered(){return this._clustered}set clustered(t){t=!!t,this._clustered!==t&&(this._clustered=t,this._adapter.toggleHostAttribute(r.attributes.CLUSTERED,this._clustered))}get stacked(){return this._stacked}set stacked(t){t=!!t,this._stacked!==t&&(this._stacked=t,this._tabs.forEach(e=>e.stacked=this._stacked),this._adapter.toggleHostAttribute(r.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(t){t=!!t,this._secondary!==t&&(this._secondary=t,this._tabs.forEach(e=>e.secondary=this._secondary),this._adapter.toggleHostAttribute(r.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(t){t=!!t,this._inverted!==t&&(this._inverted=t,this._tabs.forEach(e=>e.inverted=this._inverted),this._adapter.toggleHostAttribute(r.attributes.INVERTED,this._inverted))}get autoActivate(){return this._autoActivate}set autoActivate(t){t=!!t,this._autoActivate!==t&&(this._autoActivate=t,this._adapter.toggleHostAttribute(r.attributes.AUTO_ACTIVATE,this._autoActivate))}get scrollButtons(){return this._scrollButtons}set scrollButtons(t){t=!!t,this._scrollButtons!==t&&(this._scrollButtons=!!t,this._isInitialized&&(this._scrollButtons?(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._detectScrollableStatus(),this._updateScrollState(),this._tryScrollActiveTabIntoView()):(this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._adapter.setScrollButtons(this._scrollButtons),this._scrollButtonsVisible=!1)),this._adapter.setHostAttribute(r.attributes.SCROLL_BUTTONS,String(this._scrollButtons)))}};var F='<template><div class="container" part="container"><div role="tablist" class="scroll-container" part="scroll-container"><slot></slot></div></div></template>',K='.forge-icon-button{display:-webkit-inline-box;display:inline-flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;background-color:transparent;fill:currentColor;color:inherit;font-size:24px;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:48px;height:48px;padding:12px}.forge-icon-button forge-icon,.forge-icon-button img,.forge-icon-button svg{width:24px;height:24px}.forge-icon-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-icon-button:disabled{cursor:default;pointer-events:none}.forge-icon-button__icon{display:inline-block}.forge-icon-button__icon.forge-icon-button__icon--on{display:none}.forge-icon-button--on .forge-icon-button__icon{display:none}.forge-icon-button--on .forge-icon-button__icon.forge-icon-button__icon--on{display:inline-block}@-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}}.forge-icon-button{--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}.forge-icon-button::after,.forge-icon-button::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-icon-button::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-icon-button::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-icon-button.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-icon-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-icon-button.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-icon-button.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button::after,.forge-icon-button::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-icon-button.mdc-ripple-upgraded::after,.forge-icon-button.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%)}.forge-icon-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button::after,.forge-icon-button::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-icon-button.mdc-ripple-surface--hover::before,.forge-icon-button:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button.mdc-ripple-upgraded--background-focused::before,.forge-icon-button:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}forge-icon-button{position:relative;display:inline-block;overflow:visible}.forge-icon-button--on{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-icon-button--on::after,.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-icon-button--on.mdc-ripple-surface--hover::before,.forge-icon-button--on:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button--on.mdc-ripple-upgraded--background-focused::before,.forge-icon-button--on:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button--on:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button--on:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button--on.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);opacity:.08}.forge-icon-button--dense{width:28px;height:28px;padding:2px;padding:0}.forge-icon-button--dense-1{width:44px;height:44px;padding:10px}.forge-icon-button--dense-2{width:40px;height:40px;padding:8px}.forge-icon-button--dense-3{width:36px;height:36px;padding:6px}.forge-icon-button--dense-4{width:32px;height:32px;padding:4px}.forge-icon-button--dense-5{width:28px;height:28px;padding:2px}.forge-icon-button--dense-6{width:24px;height:24px;padding:0}.forge-icon-button--with-badge forge-badge{z-index:1;z-index:var(--forge-z-index-surface,1);pointer-events:none;--forge-badge-max-width:32px;--forge-badge-border:1px solid transparent}.forge-icon-button--with-badge forge-badge[app-bar-context]{--forge-badge-border:2px solid var(--forge-app-bar-theme-background)}.container{--_container-justify:var(--forge-tab-bar-justify, space-between);--_tab-flex:var(--forge-tab-bar-stretch, 1);--_divider-color:var(--forge-tab-bar-underline-color, var(--forge-theme-border-color, #e0e0e0));--_divider-thickness:var(--forge-tab-bar-underline-thickness, 1px);position:relative;display:grid;grid-template-columns:auto 1fr auto;max-width:100%;max-height:100%;-webkit-box-align:center;align-items:center;border-bottom:var(--_divider-thickness) solid var(--_divider-color)}.scroll-container{position:relative;display:-webkit-box;display:flex;-webkit-box-pack:var(--_container-justify);justify-content:var(--_container-justify);-webkit-box-align:end;align-items:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;grid-column:2}.scroll-container::-webkit-scrollbar{display:none}::slotted(*){-webkit-box-flex:var(--_tab-flex);flex:var(--_tab-flex)}::slotted([selected]){z-index:1}:host{position:relative;display:block}:host([vertical]) .container{grid-template-columns:none;grid-template-rows:auto 1fr auto;-webkit-box-align:initial;align-items:initial;border-bottom:none;border-right:var(--_divider-thickness) solid var(--_divider-color);height:100%}:host([vertical]) .scroll-container{display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:stretch;align-items:stretch;gap:0;grid-column:auto;grid-row:2}:host([vertical]) .scroll-button{justify-self:center}:host([inverted]:not([vertical])) .container{border-bottom:none;border-top:var(--_divider-thickness) solid var(--_divider-color)}:host([inverted][vertical]) .container{border-right:none;border-left:var(--_divider-thickness) solid var(--_divider-color)}:host([clustered]){--forge-tab-bar-justify:flex-start;--forge-tab-bar-stretch:0}:host([clustered=start]){--forge-tab-bar-justify:flex-start}:host([clustered=center]){--forge-tab-bar-justify:center}:host([clustered=end]){--forge-tab-bar-justify:flex-end}:host([hidden]){display:none}',s=class extends z{constructor(){super();N.define([m,_,v,h]),I(this,F,K),this._foundation=new T(new w(this))}static get observedAttributes(){return[r.attributes.DISABLED,r.attributes.ACTIVE_TAB,r.attributes.VERTICAL,r.attributes.CLUSTERED,r.attributes.STACKED,r.attributes.SECONDARY,r.attributes.INVERTED,r.attributes.AUTO_ACTIVATE,r.attributes.SCROLL_BUTTONS]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,o,i){switch(e){case r.attributes.DISABLED:this.disabled=p(i);break;case r.attributes.ACTIVE_TAB:this.activeTab=i?A(i):void 0;break;case r.attributes.VERTICAL:this.vertical=p(i);break;case r.attributes.CLUSTERED:this.clustered=p(i);break;case r.attributes.STACKED:this.stacked=p(i);break;case r.attributes.SECONDARY:this.secondary=p(i);break;case r.attributes.INVERTED:this.inverted=p(i);break;case r.attributes.AUTO_ACTIVATE:this.autoActivate=p(i);break;case r.attributes.SCROLL_BUTTONS:this.scrollButtons=p(i);break}}};d([b()],s.prototype,"disabled",2),d([b()],s.prototype,"activeTab",2),d([b()],s.prototype,"vertical",2),d([b()],s.prototype,"clustered",2),d([b()],s.prototype,"stacked",2),d([b()],s.prototype,"secondary",2),d([b()],s.prototype,"inverted",2),d([b()],s.prototype,"autoActivate",2),d([b()],s.prototype,"scrollButtons",2),s=d([C({name:r.elementName,dependencies:[V,H,R]})],s);function bt(){L(s)}export{w as a,T as b,s as c,bt as d};
|
|
7
|
+
//# sourceMappingURL=chunk.CN27IHDN.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/tabs/tab-bar/tab-bar-adapter.ts", "../../src/tabs/tab-bar/tab-bar-foundation.ts", "../../src/tabs/tab-bar/tab-bar.ts", "../../src/tabs/tab-bar/index.ts"],
|
|
4
|
+
"sourcesContent": ["\nimport { getShadowElement, toggleAttribute } from '@tylertech/forge-core';\nimport { tylIconKeyboardArrowLeft, tylIconKeyboardArrowRight, tylIconKeyboardArrowUp, tylIconKeyboardArrowDown } from '@tylertech/tyler-icons/standard';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { ITabComponent } from '../tab/tab';\nimport { TAB_CONSTANTS } from '../tab/tab-constants';\nimport { ITabBarComponent } from './tab-bar';\nimport { TAB_BAR_CONSTANTS } from './tab-bar-constants';\n\nexport interface ITabBarAdapter extends IBaseAdapter {\n initializeContainerSizeObserver(listener: () => void): void;\n destroyContainerSizeObserver(): void;\n initializeScrollObserver(listener: EventListener): void;\n destroyScrollObserver(listener: EventListener): void;\n setVertical(value: boolean): void;\n setScrollBackwardButtonListener(listener: EventListener): void;\n setScrollForwardButtonListener(listener: EventListener): void;\n addSlotListener(listener: EventListener): void;\n getTabs(): ITabComponent[];\n tryScrollTabIntoView(tab: ITabComponent): Promise<void>;\n isScrollable(): boolean;\n getScrollState(): ITabBarScrollInfo;\n setScrollButtons(value: boolean): void;\n syncScrollButtons(state: ITabBarScrollButtonState): void;\n scroll(which: 'backward' | 'forward'): void;\n updateScrollButtonIcons(vertical: boolean): void;\n}\n\nexport interface ITabBarScrollInfo {\n isScrolledStart: boolean;\n isScrolledEnd: boolean;\n}\n\nexport interface ITabBarScrollButtonState {\n backwardEnabled: boolean;\n forwardEnabled: boolean;\n}\n\nexport class TabBarAdapter extends BaseAdapter<ITabBarComponent> implements ITabBarAdapter {\n private readonly _defaultSlotElement: HTMLSlotElement;\n private readonly _container: HTMLElement;\n private readonly _scrollContainer: HTMLElement;\n private _resizeObserver: ResizeObserver | undefined;\n private _backwardScrollButton: HTMLElement | undefined;\n private _forwardScrollButton: HTMLElement | undefined;\n\n constructor(component: ITabBarComponent) {\n super(component);\n\n this._defaultSlotElement = getShadowElement(this._component, TAB_BAR_CONSTANTS.selectors.DEFAULT_SLOT) as HTMLSlotElement;\n this._container = getShadowElement(this._component, TAB_BAR_CONSTANTS.selectors.CONTAINER);\n this._scrollContainer = getShadowElement(this._component, TAB_BAR_CONSTANTS.selectors.SCROLL_CONTAINER);\n }\n\n public initializeContainerSizeObserver(listener: () => void): void {\n this._resizeObserver = new ResizeObserver(() => listener());\n this._resizeObserver.observe(this._component);\n }\n \n public initializeScrollObserver(listener: EventListener): void {\n this._scrollContainer.addEventListener('scroll', listener, { passive: true });\n }\n\n public destroyContainerSizeObserver(): void {\n this._resizeObserver?.disconnect();\n this._resizeObserver = undefined;\n }\n\n public destroyScrollObserver(listener: EventListener): void {\n this._scrollContainer.removeEventListener('scroll', listener, { passive: true } as AddEventListenerOptions);\n }\n\n public setVertical(value: boolean): void {\n toggleAttribute(this._scrollContainer, !!value, 'aria-orientation', 'vertical');\n }\n\n public setScrollBackwardButtonListener(listener: EventListener): void {\n this._backwardScrollButton?.querySelector('button')?.addEventListener('click', listener);\n }\n \n public setScrollForwardButtonListener(listener: EventListener): void {\n this._forwardScrollButton?.querySelector('button')?.addEventListener('click', listener);\n }\n\n public addSlotListener(listener: EventListener): void {\n this._defaultSlotElement.addEventListener('slotchange', listener);\n }\n\n public getTabs(): ITabComponent[] {\n return Array.from(this._component.querySelectorAll(TAB_CONSTANTS.elementName));\n }\n\n public async tryScrollTabIntoView(tab: ITabComponent): Promise<void> {\n await new Promise(requestAnimationFrame);\n\n // Due to the async nature of this method, make sure we still need to scroll this tab into view...\n if (!tab.isConnected || (!tab.selected && !tab.matches(':focus'))) {\n return;\n }\n\n const isVertical = this._component.vertical;\n const scrollContainerOffset = isVertical ? this._scrollContainer.offsetTop : this._scrollContainer.offsetLeft;\n const offset = isVertical ? tab.offsetTop : tab.offsetLeft;\n const extent = isVertical ? tab.offsetHeight : tab.offsetWidth;\n const scroll = isVertical ? this._scrollContainer.scrollTop : this._scrollContainer.scrollLeft;\n const hostExtent = isVertical ? this._scrollContainer.offsetHeight : this._scrollContainer.offsetWidth;\n const min = offset - (TAB_BAR_CONSTANTS.numbers.SCROLL_MARGIN + scrollContainerOffset);\n const max = offset + extent - hostExtent + (TAB_BAR_CONSTANTS.numbers.SCROLL_MARGIN - scrollContainerOffset);\n const to = Math.min(min, Math.max(max, scroll));\n const behavior = tab.matches(':focus') ? 'smooth' : 'instant' as ScrollBehavior;\n\n this._scrollContainer.scrollTo({\n behavior,\n [isVertical ? 'left' : 'top']: 0,\n [isVertical ? 'top' : 'left']: to\n });\n }\n\n public getScrollState(): ITabBarScrollInfo {\n const { scrollHeight, scrollWidth, scrollLeft, scrollTop, clientHeight, clientWidth } = this._scrollContainer;\n const scrollPosition = this._component.vertical ? clientHeight + scrollTop : clientWidth + scrollLeft;\n const scrollSize = this._component.vertical ? scrollHeight : scrollWidth;\n const isScrolledEnd = scrollPosition === scrollSize;\n const isScrolledStart = (this._component.vertical ? scrollPosition - clientHeight : scrollPosition - clientWidth) === 0;\n return { isScrolledStart, isScrolledEnd };\n }\n\n public isScrollable(): boolean {\n const { scrollHeight, scrollWidth, clientHeight, clientWidth } = this._scrollContainer;\n return this._component.vertical ? scrollHeight > clientHeight : scrollWidth > clientWidth;\n }\n\n public setScrollButtons(value: boolean): void {\n if (value) {\n this._backwardScrollButton = this._createScrollButton(this._component.vertical ? tylIconKeyboardArrowUp.name : tylIconKeyboardArrowLeft.name);\n this._container.insertAdjacentElement('afterbegin', this._backwardScrollButton);\n\n this._forwardScrollButton = this._createScrollButton(this._component.vertical ? tylIconKeyboardArrowDown.name : tylIconKeyboardArrowRight.name);\n this._container.insertAdjacentElement('beforeend', this._forwardScrollButton);\n } else {\n this._backwardScrollButton?.remove();\n this._backwardScrollButton = undefined;\n\n this._forwardScrollButton?.remove();\n this._forwardScrollButton = undefined;\n }\n }\n\n public syncScrollButtons({ backwardEnabled, forwardEnabled }: ITabBarScrollButtonState): void {\n const backButton = this._backwardScrollButton?.querySelector('button');\n const forwardButton = this._forwardScrollButton?.querySelector('button');\n\n if (backButton) {\n const disabled = !backwardEnabled;\n if (disabled && backButton.matches(':focus')) {\n forwardButton?.focus();\n }\n backButton.disabled = disabled;\n }\n\n if (forwardButton) {\n const disabled = !forwardEnabled;\n if (disabled && forwardButton.matches(':focus')) {\n backButton?.focus();\n }\n forwardButton.disabled = disabled;\n }\n }\n\n public scroll(which: 'backward' | 'forward'): void {\n const amount = this._component.vertical ? this._scrollContainer.offsetHeight : this._scrollContainer.offsetWidth;\n this._scrollContainer.scrollBy({\n behavior: 'smooth',\n [this._component.vertical ? 'top' : 'left']: amount * (which === 'forward' ? 1 : -1)\n });\n }\n\n public updateScrollButtonIcons(vertical: boolean): void {\n const backButtonIcon = this._backwardScrollButton?.querySelector('forge-icon');\n if (backButtonIcon) {\n backButtonIcon.name = vertical ? tylIconKeyboardArrowUp.name : tylIconKeyboardArrowLeft.name;\n }\n\n const nextButtonIcon = this._forwardScrollButton?.querySelector('forge-icon');\n if (nextButtonIcon) {\n nextButtonIcon.name = vertical ? tylIconKeyboardArrowDown.name : tylIconKeyboardArrowRight.name;\n }\n }\n\n private _createScrollButton(iconName: string): HTMLElement {\n const iconButton = document.createElement('forge-icon-button');\n iconButton.classList.add(TAB_BAR_CONSTANTS.classes.SCROLL_BUTTON);\n\n const button = document.createElement('button');\n button.type = 'button';\n button.tabIndex = -1;\n button.setAttribute('aria-hidden', 'true');\n iconButton.appendChild(button);\n\n const icon = document.createElement('forge-icon');\n icon.name = iconName;\n button.appendChild(icon);\n\n return iconButton;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { NAVIGATION_KEYS, TAB_BAR_CONSTANTS } from './tab-bar-constants';\nimport { ITabComponent } from '../tab/tab';\nimport { TAB_CONSTANTS } from '../tab/tab-constants';\n\nimport { ITabBarAdapter, ITabBarScrollButtonState } from './tab-bar-adapter';\n\nexport interface ITabBarFoundation extends ICustomElementFoundation {\n disabled: boolean;\n activeTab: number | null | undefined;\n vertical: boolean;\n clustered: boolean;\n stacked: boolean;\n secondary: boolean;\n inverted: boolean;\n autoActivate: boolean;\n scrollButtons: boolean;\n initialize(): void;\n destroy(): void;\n}\n\nexport class TabBarFoundation implements ITabBarFoundation {\n // State\n private _isInitialized = false;\n private _activeTab: number | null | undefined;\n private _disabled = false;\n private _vertical = false;\n private _clustered = false;\n private _stacked = false;\n private _secondary = false;\n private _inverted = false;\n private _autoActivate = false;\n private _scrollButtons = false;\n private _tabs: ITabComponent[] = [];\n private _scrollButtonsVisible = false;\n private _tabScrollAnimationFrame: number | undefined;\n\n // Listeners\n private _tabsChangedListener: EventListener;\n private _tabSelectedListener: EventListener;\n private _keydownListener: EventListener;\n private _resizeListener: () => void;\n private _scrollListener: EventListener;\n private _scrollBackwardButtonListener: EventListener;\n private _scrollForwardButtonListener: EventListener;\n\n constructor(private _adapter: ITabBarAdapter) {\n this._tabsChangedListener = () => this._onTabsChanged();\n this._tabSelectedListener = (evt: CustomEvent<void>) => this._onTabSelected(evt);\n this._keydownListener = (evt: KeyboardEvent) => this._onKeydown(evt);\n this._resizeListener = () => this._onResize();\n this._scrollListener = () => this._onScroll();\n this._scrollBackwardButtonListener = () => this._onScrollBackward();\n this._scrollForwardButtonListener = () => this._onScrollForward();\n }\n\n public initialize(): void {\n this._adapter.addSlotListener(this._tabsChangedListener);\n this._adapter.addHostListener(TAB_CONSTANTS.events.SELECT, this._tabSelectedListener);\n this._adapter.addHostListener('keydown', this._keydownListener);\n this._adapter.setVertical(this._vertical);\n\n if (this._scrollButtons) {\n this._adapter.initializeContainerSizeObserver(this._resizeListener);\n this._adapter.initializeScrollObserver(this._scrollListener);\n this._updateScrollState();\n }\n\n this._tryScrollActiveTabIntoView();\n this._isInitialized = true;\n }\n\n public destroy(): void {\n this._adapter.destroyContainerSizeObserver();\n this._adapter.destroyScrollObserver(this._scrollListener);\n this._isInitialized = false;\n }\n\n private async _onTabsChanged(): Promise<void> {\n this._tabs = this._adapter.getTabs();\n this._syncTabState();\n this._tryScrollActiveTabIntoView();\n }\n\n private _onTabSelected(evt: CustomEvent<void>): void {\n this._selectTab(evt.target as ITabComponent);\n }\n\n private async _onKeydown(evt: KeyboardEvent): Promise<void> {\n const orientation = this._vertical ? 'vertical' : 'horizontal';\n const isNavigationKey = NAVIGATION_KEYS.get('default')?.has(evt.key) ||\n NAVIGATION_KEYS.get(orientation)?.has(evt.key);\n\n if (!isNavigationKey) {\n return;\n }\n\n evt.preventDefault();\n let index = -1;\n\n if (evt.key === 'Home') {\n // Locate the first non-disabled tab\n index = this._tabs.findIndex(tab => !tab.disabled);\n } else if (evt.key === 'End') {\n // Locate the last non-disabled tab\n index = this._tabs.reduceRight((acc, tab, i) => !tab.disabled && acc === -1 ? i : acc, -1);\n } else {\n // Locate the next or previous tab based on the key that was pressed\n const currentIndex = this._tabs.findIndex(tab => tab.matches(':focus'));\n const isPrevKey = evt.key === 'ArrowLeft' || evt.key === 'ArrowUp';\n const calcIndex = (startIndex: number): void => {\n index = startIndex + (isPrevKey ? -1 : 1);\n index = index < 0 ? this._tabs.length - 1 : index % this._tabs.length;\n\n // Try to recurse until we find a non-disabled tab (unless all tabs are disabled already)\n const isAllTabsDisabled = this._tabs.every(tab => tab.disabled);\n if (!isAllTabsDisabled && this._tabs[index]?.disabled) {\n calcIndex(index);\n }\n };\n calcIndex(currentIndex);\n }\n\n if (index === -1) {\n return;\n }\n\n if (this._autoActivate) {\n this._selectTab(this._tabs[index]);\n } else {\n this._tabs[index].focus({ preventScroll: true });\n await this._adapter.tryScrollTabIntoView(this._tabs[index]);\n }\n }\n\n private async _selectTab(tab: ITabComponent, emitEvent = true): Promise<void> {\n if (!tab || tab.disabled) {\n return;\n }\n\n const currentSelectedTab = this._tabs.find(t => t.selected);\n if (currentSelectedTab === tab) {\n return;\n }\n\n if (emitEvent) {\n const index = this._tabs.indexOf(tab);\n const cancelled = !this._adapter.emitHostEvent(TAB_BAR_CONSTANTS.events.CHANGE, index, true, true);\n if (cancelled) {\n return;\n }\n }\n\n // Selecting a tab causes an animation of the indicator to start relative to the currently selected tab\n tab.selected = true;\n tab.focus({ preventScroll: true });\n await this._adapter.tryScrollTabIntoView(tab);\n\n // Always deselect the currently selected tab after selecting a new tab to allow\n // for the tab indicator animation to run properly (the newly selected tab attempts\n // to locate the current selected tab for its calculations)\n if (currentSelectedTab) {\n currentSelectedTab.selected = false;\n }\n\n this._activeTab = this._tabs.indexOf(tab);\n }\n\n /**\n * Ensures that all tabs have the correct state based on the tab bar state.\n * \n * This is called whenever a child tab is added to the DOM.\n */\n private _syncTabState(): void {\n this._tabs.forEach((tab, index) => {\n tab.selected = index === this._activeTab;\n tab.disabled = this._disabled;\n tab.vertical = this._vertical;\n tab.stacked = this._stacked;\n tab.secondary = this._secondary;\n tab.inverted = this._inverted;\n });\n }\n\n /** Called when the container size changes, but only if scroll buttons are enabled. */\n private _onResize(): void {\n this._detectScrollableStatus();\n }\n\n /** Called when the scroll container scrolls, but only if scroll buttons are enabled. */\n private _onScroll(): void {\n this._updateScrollState();\n }\n\n /** Handles clicking the scroll backward button. */\n private _onScrollBackward(): void {\n this._adapter.scroll('backward');\n }\n\n /** Handles clicking the scroll forward button. */\n private _onScrollForward(): void {\n this._adapter.scroll('forward');\n }\n\n /** Determines whether scroll buttons should be displayed based on the size of the container. */\n private _detectScrollableStatus(): void {\n const scrollable = this._adapter.isScrollable();\n\n if (this._scrollButtonsVisible === scrollable) {\n return;\n }\n \n this._adapter.setScrollButtons(scrollable);\n\n if (scrollable) {\n this._adapter.initializeScrollObserver(this._scrollListener);\n this._updateScrollState();\n this._adapter.setScrollBackwardButtonListener(this._scrollBackwardButtonListener);\n this._adapter.setScrollForwardButtonListener(this._scrollForwardButtonListener);\n } else {\n this._adapter.destroyScrollObserver(this._scrollListener);\n }\n\n this._scrollButtonsVisible = scrollable;\n }\n\n /** Updates the enabled/disabled state of the scroll buttons. */\n private _updateScrollState(): void {\n const { isScrolledEnd, isScrolledStart } = this._adapter.getScrollState();\n const state: ITabBarScrollButtonState = {\n backwardEnabled: !isScrolledStart,\n forwardEnabled: !isScrolledEnd\n };\n this._adapter.syncScrollButtons(state);\n }\n\n private _tryScrollActiveTabIntoView(): void {\n if (this._tabScrollAnimationFrame) {\n window.cancelAnimationFrame(this._tabScrollAnimationFrame);\n }\n\n // We batch the tab scrolling into a single animation frame to unnecessarily scrolling for each tab\n this._tabScrollAnimationFrame = window.requestAnimationFrame(() => {\n this._tabScrollAnimationFrame = undefined;\n if (this._adapter.isScrollable()) {\n if (typeof this._activeTab === 'number' && this._activeTab >= 0 && this._tabs[this._activeTab]) {\n this._adapter.tryScrollTabIntoView(this._tabs[this._activeTab]);\n }\n }\n });\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n value = Boolean(value);\n if (this._disabled !== value) {\n this._disabled = value;\n this._tabs.forEach(tab => tab.disabled = this._disabled);\n this._adapter.toggleHostAttribute(TAB_BAR_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n public get activeTab(): number | null | undefined {\n return this._activeTab;\n }\n public set activeTab(value: number | null | undefined) {\n if (this._activeTab !== value) {\n this._activeTab = value ?? undefined;\n\n if (typeof this._activeTab === 'number') {\n const newSelectedTab = this._tabs[this._activeTab];\n this._selectTab(newSelectedTab, false);\n this._adapter.setHostAttribute(TAB_BAR_CONSTANTS.attributes.ACTIVE_TAB, String(this._activeTab));\n } else {\n this._tabs.forEach(tab => tab.selected = false);\n this._adapter.removeHostAttribute(TAB_BAR_CONSTANTS.attributes.ACTIVE_TAB);\n }\n }\n }\n\n public get vertical(): boolean {\n return this._vertical;\n }\n public set vertical(value: boolean) {\n value = Boolean(value);\n if (this._vertical !== value) {\n this._vertical = value;\n\n if (this._isInitialized) {\n this._adapter.setVertical(this._vertical);\n }\n\n this._tabs.forEach(tab => tab.vertical = this._vertical);\n if (this._scrollButtonsVisible) {\n this._adapter.updateScrollButtonIcons(this._vertical);\n }\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.VERTICAL, this._vertical);\n }\n }\n\n public get clustered(): boolean {\n return this._clustered;\n }\n public set clustered(value: boolean) {\n value = Boolean(value);\n if (this._clustered !== value) {\n this._clustered = value;\n this._adapter.toggleHostAttribute(TAB_BAR_CONSTANTS.attributes.CLUSTERED, this._clustered);\n }\n }\n\n public get stacked(): boolean {\n return this._stacked;\n }\n public set stacked(value: boolean) {\n value = Boolean(value);\n if (this._stacked !== value) {\n this._stacked = value;\n this._tabs.forEach(tab => tab.stacked = this._stacked);\n this._adapter.toggleHostAttribute(TAB_BAR_CONSTANTS.attributes.STACKED, this._stacked);\n }\n }\n\n public get secondary(): boolean {\n return this._secondary;\n }\n public set secondary(value: boolean) {\n value = Boolean(value);\n if (this._secondary !== value) {\n this._secondary = value;\n this._tabs.forEach(tab => tab.secondary = this._secondary);\n this._adapter.toggleHostAttribute(TAB_BAR_CONSTANTS.attributes.SECONDARY, this._secondary);\n }\n }\n\n public get inverted(): boolean {\n return this._inverted;\n }\n public set inverted(value: boolean) {\n value = Boolean(value);\n if (this._inverted !== value) {\n this._inverted = value;\n this._tabs.forEach(tab => tab.inverted = this._inverted);\n this._adapter.toggleHostAttribute(TAB_BAR_CONSTANTS.attributes.INVERTED, this._inverted);\n }\n }\n\n public get autoActivate(): boolean {\n return this._autoActivate;\n }\n public set autoActivate(value: boolean) {\n value = Boolean(value);\n if (this._autoActivate !== value) {\n this._autoActivate = value;\n this._adapter.toggleHostAttribute(TAB_BAR_CONSTANTS.attributes.AUTO_ACTIVATE, this._autoActivate);\n }\n }\n\n public get scrollButtons(): boolean {\n return this._scrollButtons;\n }\n public set scrollButtons(value: boolean) {\n value = Boolean(value);\n if (this._scrollButtons !== value) {\n this._scrollButtons = Boolean(value);\n\n if (this._isInitialized) {\n if (this._scrollButtons) {\n this._adapter.initializeContainerSizeObserver(this._resizeListener);\n this._adapter.initializeScrollObserver(this._scrollListener);\n this._detectScrollableStatus();\n this._updateScrollState();\n this._tryScrollActiveTabIntoView();\n } else {\n this._adapter.destroyContainerSizeObserver();\n this._adapter.destroyScrollObserver(this._scrollListener);\n this._adapter.setScrollButtons(this._scrollButtons);\n this._scrollButtonsVisible = false;\n }\n }\n\n this._adapter.setHostAttribute(TAB_BAR_CONSTANTS.attributes.SCROLL_BUTTONS, String(this._scrollButtons));\n }\n }\n}\n", "import { attachShadowTemplate, coerceBoolean, coerceNumber, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { IconComponent, IconRegistry } from '../../icon';\nimport { IconButtonComponent } from '../../icon-button';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { TabComponent } from '../tab/tab';\nimport { TabBarAdapter } from './tab-bar-adapter';\nimport { TAB_BAR_CONSTANTS } from './tab-bar-constants';\nimport { TabBarFoundation } from './tab-bar-foundation';\nimport { tylIconKeyboardArrowLeft, tylIconKeyboardArrowRight, tylIconKeyboardArrowUp, tylIconKeyboardArrowDown } from '@tylertech/tyler-icons/standard';\n\nconst template = '<template><div class=\\\"container\\\" part=\\\"container\\\"><div role=\\\"tablist\\\" class=\\\"scroll-container\\\" part=\\\"scroll-container\\\"><slot></slot></div></div></template>';\nconst styles = '.forge-icon-button{display:-webkit-inline-box;display:inline-flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;background-color:transparent;fill:currentColor;color:inherit;font-size:24px;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:48px;height:48px;padding:12px}.forge-icon-button forge-icon,.forge-icon-button img,.forge-icon-button svg{width:24px;height:24px}.forge-icon-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-icon-button:disabled{cursor:default;pointer-events:none}.forge-icon-button__icon{display:inline-block}.forge-icon-button__icon.forge-icon-button__icon--on{display:none}.forge-icon-button--on .forge-icon-button__icon{display:none}.forge-icon-button--on .forge-icon-button__icon.forge-icon-button__icon--on{display:inline-block}@-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}}.forge-icon-button{--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}.forge-icon-button::after,.forge-icon-button::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-icon-button::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-icon-button::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-icon-button.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-icon-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-icon-button.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-icon-button.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button::after,.forge-icon-button::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-icon-button.mdc-ripple-upgraded::after,.forge-icon-button.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%)}.forge-icon-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button::after,.forge-icon-button::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-icon-button.mdc-ripple-surface--hover::before,.forge-icon-button:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button.mdc-ripple-upgraded--background-focused::before,.forge-icon-button:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}forge-icon-button{position:relative;display:inline-block;overflow:visible}.forge-icon-button--on{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-icon-button--on::after,.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-icon-button--on.mdc-ripple-surface--hover::before,.forge-icon-button--on:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button--on.mdc-ripple-upgraded--background-focused::before,.forge-icon-button--on:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button--on:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button--on:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button--on.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);opacity:.08}.forge-icon-button--dense{width:28px;height:28px;padding:2px;padding:0}.forge-icon-button--dense-1{width:44px;height:44px;padding:10px}.forge-icon-button--dense-2{width:40px;height:40px;padding:8px}.forge-icon-button--dense-3{width:36px;height:36px;padding:6px}.forge-icon-button--dense-4{width:32px;height:32px;padding:4px}.forge-icon-button--dense-5{width:28px;height:28px;padding:2px}.forge-icon-button--dense-6{width:24px;height:24px;padding:0}.forge-icon-button--with-badge forge-badge{z-index:1;z-index:var(--forge-z-index-surface,1);pointer-events:none;--forge-badge-max-width:32px;--forge-badge-border:1px solid transparent}.forge-icon-button--with-badge forge-badge[app-bar-context]{--forge-badge-border:2px solid var(--forge-app-bar-theme-background)}.container{--_container-justify:var(--forge-tab-bar-justify, space-between);--_tab-flex:var(--forge-tab-bar-stretch, 1);--_divider-color:var(--forge-tab-bar-underline-color, var(--forge-theme-border-color, #e0e0e0));--_divider-thickness:var(--forge-tab-bar-underline-thickness, 1px);position:relative;display:grid;grid-template-columns:auto 1fr auto;max-width:100%;max-height:100%;-webkit-box-align:center;align-items:center;border-bottom:var(--_divider-thickness) solid var(--_divider-color)}.scroll-container{position:relative;display:-webkit-box;display:flex;-webkit-box-pack:var(--_container-justify);justify-content:var(--_container-justify);-webkit-box-align:end;align-items:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;grid-column:2}.scroll-container::-webkit-scrollbar{display:none}::slotted(*){-webkit-box-flex:var(--_tab-flex);flex:var(--_tab-flex)}::slotted([selected]){z-index:1}:host{position:relative;display:block}:host([vertical]) .container{grid-template-columns:none;grid-template-rows:auto 1fr auto;-webkit-box-align:initial;align-items:initial;border-bottom:none;border-right:var(--_divider-thickness) solid var(--_divider-color);height:100%}:host([vertical]) .scroll-container{display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:stretch;align-items:stretch;gap:0;grid-column:auto;grid-row:2}:host([vertical]) .scroll-button{justify-self:center}:host([inverted]:not([vertical])) .container{border-bottom:none;border-top:var(--_divider-thickness) solid var(--_divider-color)}:host([inverted][vertical]) .container{border-right:none;border-left:var(--_divider-thickness) solid var(--_divider-color)}:host([clustered]){--forge-tab-bar-justify:flex-start;--forge-tab-bar-stretch:0}:host([clustered=start]){--forge-tab-bar-justify:flex-start}:host([clustered=center]){--forge-tab-bar-justify:center}:host([clustered=end]){--forge-tab-bar-justify:flex-end}:host([hidden]){display:none}';\n\nexport interface ITabBarComponent extends IBaseComponent {\n disabled: boolean;\n activeTab: number | null | undefined;\n vertical: boolean;\n clustered: boolean;\n stacked: boolean;\n secondary: boolean;\n inverted: boolean;\n autoActivate: boolean;\n scrollButtons: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-tab-bar': ITabBarComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-tab-bar-change': CustomEvent<number>;\n }\n}\n\n/**\n * @tag forge-tab-bar\n * \n * @summary Tabs organize content across different screens and views.\n * \n * @description\n * Use tabs to group content into helpful categories. Tabs are typically placed\n * above the content they relate to. Tabs can be used to navigate between screens,\n * or to group related content within a screen.\n * \n * @property {boolean} disabled - The disabled state of the tab bar.\n * @property {number} activeTab - The index of the active tab.\n * @property {boolean} vertical - Controls whether the tab bar is vertical or horizontal.\n * @property {boolean} clustered - Controls whether the tabs stretch the full width of their container or cluster together at their minimum width.\n * @property {boolean} stacked - Controls whether the tabs are taller to allow for slotted leading/trailing elements.\n * @property {boolean} secondary - Controls whether the tabs are styled as secondary tab navigation.\n * @property {boolean} inverted - Controls whether the tabs are rendered inverted (tab indicator at top instead of bottom).\n * @property {boolean} autoActivate - Controls whether the tabs are automatically activated when receiving focus.\n * @property {boolean} scrollButtons - Controls whether scroll buttons are displayed when the tabs overflow their container.\n * \n * @attribute disabled - The disabled state of the tab bar.\n * @attribute active-tab - The index of the active tab.\n * @attribute vertical - Controls whether the tab bar is vertical or horizontal.\n * @attribute clustered - Controls whether the tabs stretch the full width of their container or cluster together at their minimum width.\n * @attribute stacked - Controls whether the tabs are taller to allow for slotted leading/trailing elements.\n * @attribute secondary - Controls whether the tabs are styled as secondary tab navigation.\n * @attribute auto-activate - Controls whether the tabs are automatically activated when receiving focus.\n * @attribute scroll-buttons - Controls whether scroll buttons are displayed when the tabs overflow their container.\n * \n * @event forge-tab-bar-change {CustomEvent<number>} - Dispatches when the active tab changes.\n * \n * @cssproperty --forge-tab-bar-justify - The `justify-content` value for the tab bar flex container.\n * @cssproperty --forge-tab-bar-stretch - The `flex` value for the child `<forge-tab>` elements.\n * @cssproperty --forge-tab-bar-underline-color - The color of the underline.\n * @cssproperty --forge-tab-bar-underline-thickness - The thickness of the underline.\n * \n * @csspart container - The container element.\n * @csspart scroll-container - The scroll container element.\n */\n@CustomElement({\n name: TAB_BAR_CONSTANTS.elementName,\n dependencies: [\n TabComponent,\n IconButtonComponent,\n IconComponent\n ]\n})\nexport class TabBarComponent extends BaseComponent implements ITabBarComponent {\n public static get observedAttributes(): string[] {\n return [\n TAB_BAR_CONSTANTS.attributes.DISABLED,\n TAB_BAR_CONSTANTS.attributes.ACTIVE_TAB,\n TAB_BAR_CONSTANTS.attributes.VERTICAL,\n TAB_BAR_CONSTANTS.attributes.CLUSTERED,\n TAB_BAR_CONSTANTS.attributes.STACKED,\n TAB_BAR_CONSTANTS.attributes.SECONDARY,\n TAB_BAR_CONSTANTS.attributes.INVERTED,\n TAB_BAR_CONSTANTS.attributes.AUTO_ACTIVATE,\n TAB_BAR_CONSTANTS.attributes.SCROLL_BUTTONS\n ];\n }\n\n private _foundation: TabBarFoundation;\n\n constructor() {\n super();\n IconRegistry.define([\n tylIconKeyboardArrowLeft,\n tylIconKeyboardArrowRight,\n tylIconKeyboardArrowUp,\n tylIconKeyboardArrowDown\n ]);\n attachShadowTemplate(this, template, styles);\n this._foundation = new TabBarFoundation(new TabBarAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.destroy();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case TAB_BAR_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case TAB_BAR_CONSTANTS.attributes.ACTIVE_TAB:\n this.activeTab = newValue ? coerceNumber(newValue) : undefined;\n break;\n case TAB_BAR_CONSTANTS.attributes.VERTICAL:\n this.vertical = coerceBoolean(newValue);\n break;\n case TAB_BAR_CONSTANTS.attributes.CLUSTERED:\n this.clustered = coerceBoolean(newValue);\n break;\n case TAB_BAR_CONSTANTS.attributes.STACKED:\n this.stacked = coerceBoolean(newValue);\n break;\n case TAB_BAR_CONSTANTS.attributes.SECONDARY:\n this.secondary = coerceBoolean(newValue);\n break;\n case TAB_BAR_CONSTANTS.attributes.INVERTED:\n this.inverted = coerceBoolean(newValue);\n break;\n case TAB_BAR_CONSTANTS.attributes.AUTO_ACTIVATE:\n this.autoActivate = coerceBoolean(newValue);\n break;\n case TAB_BAR_CONSTANTS.attributes.SCROLL_BUTTONS:\n this.scrollButtons = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare disabled: boolean;\n\n @FoundationProperty()\n public declare activeTab: number | null | undefined;\n\n @FoundationProperty()\n public declare vertical: boolean;\n\n @FoundationProperty()\n public declare clustered: boolean;\n\n @FoundationProperty()\n public declare stacked: boolean;\n\n @FoundationProperty()\n public declare secondary: boolean;\n\n @FoundationProperty()\n public declare inverted: boolean;\n\n @FoundationProperty()\n public declare autoActivate: boolean;\n\n @FoundationProperty()\n public declare scrollButtons: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { TabBarComponent } from './tab-bar';\n\nexport * from './tab-bar-adapter';\nexport * from './tab-bar-constants';\nexport * from './tab-bar-foundation';\nexport * from './tab-bar';\n\nexport function defineTabBarComponent(): void {\n defineCustomElement(TabBarComponent);\n}\n"],
|
|
5
|
+
"mappings": "ggBAsCO,IAAMA,EAAN,cAA4BC,CAAwD,CAQzF,YAAYC,EAA6B,CACvC,MAAMA,CAAS,EAEf,KAAK,oBAAsBC,EAAiB,KAAK,WAAYC,EAAkB,UAAU,YAAY,EACrG,KAAK,WAAaD,EAAiB,KAAK,WAAYC,EAAkB,UAAU,SAAS,EACzF,KAAK,iBAAmBD,EAAiB,KAAK,WAAYC,EAAkB,UAAU,gBAAgB,CACxG,CAEO,gCAAgCC,EAA4B,CACjE,KAAK,gBAAkB,IAAI,eAAe,IAAMA,EAAS,CAAC,EAC1D,KAAK,gBAAgB,QAAQ,KAAK,UAAU,CAC9C,CAEO,yBAAyBA,EAA+B,CAC7D,KAAK,iBAAiB,iBAAiB,SAAUA,EAAU,CAAE,QAAS,EAAK,CAAC,CAC9E,CAEO,8BAAqC,CA/D9C,IAAAC,GAgEIA,EAAA,KAAK,kBAAL,MAAAA,EAAsB,aACtB,KAAK,gBAAkB,MACzB,CAEO,sBAAsBD,EAA+B,CAC1D,KAAK,iBAAiB,oBAAoB,SAAUA,EAAU,CAAE,QAAS,EAAK,CAA4B,CAC5G,CAEO,YAAYE,EAAsB,CACvCC,EAAgB,KAAK,iBAAkB,CAAC,CAACD,EAAO,mBAAoB,UAAU,CAChF,CAEO,gCAAgCF,EAA+B,CA5ExE,IAAAC,EAAAG,GA6EIA,GAAAH,EAAA,KAAK,wBAAL,YAAAA,EAA4B,cAAc,YAA1C,MAAAG,EAAqD,iBAAiB,QAASJ,EACjF,CAEO,+BAA+BA,EAA+B,CAhFvE,IAAAC,EAAAG,GAiFIA,GAAAH,EAAA,KAAK,uBAAL,YAAAA,EAA2B,cAAc,YAAzC,MAAAG,EAAoD,iBAA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kB,WAAW,SAChC,KAAK,SAAWI,EAAcD,CAAQ,EACtC,MACF,KAAKH,EAAkB,WAAW,cAChC,KAAK,aAAeI,EAAcD,CAAQ,EAC1C,MACF,KAAKH,EAAkB,WAAW,eAChC,KAAK,cAAgBI,EAAcD,CAAQ,EAC3C,KACJ,CACF,CA4BF,EAzBiBG,EAAA,CADdC,EAAmB,GArETjB,EAsEI,wBAGAgB,EAAA,CADdC,EAAmB,GAxETjB,EAyEI,yBAGAgB,EAAA,CADdC,EAAmB,GA3ETjB,EA4EI,wBAGAgB,EAAA,CADdC,EAAmB,GA9ETjB,EA+EI,yBAGAgB,EAAA,CADdC,EAAmB,GAjFTjB,EAkFI,uBAGAgB,EAAA,CADdC,EAAmB,GApFTjB,EAqFI,yBAGAgB,EAAA,CADdC,EAAmB,GAvFTjB,EAwFI,wBAGAgB,EAAA,CADdC,EAAmB,GA1FTjB,EA2FI,4BAGAgB,EAAA,CADdC,EAAmB,GA7FTjB,EA8FI,6BA9FJA,EAANgB,EAAA,CARNE,EAAc,CACb,KAAMR,EAAkB,YACxB,aAAc,CACZS,EACAC,EACAC,CACF,CACF,CAAC,GACYrB,GCzEN,SAASsB,IAA8B,CAC5CC,EAAoBC,CAAe,CACrC",
|
|
6
|
+
"names": ["TabBarAdapter", "BaseAdapter", "component", "getShadowElement", "TAB_BAR_CONSTANTS", "listener", "_a", "value", "toggleAttribute", "_b", "TAB_CONSTANTS", "tab", "isVertical", "scrollContainerOffset", "offset", "extent", "scroll", "hostExtent", "min", "max", "to", "behavior", "scrollHeight", "scrollWidth", "scrollLeft", "scrollTop", "clientHeight", "clientWidth", "scrollPosition", "scrollSize", "isScrolledEnd", "tylIconKeyboardArrowUp", "tylIconKeyboardArrowLeft", "tylIconKeyboardArrowDown", "tylIconKeyboardArrowRight", "backwardEnabled", "forwardEnabled", "backButton", "forwardButton", "disabled", "which", "amount", "vertical", "backButtonIcon", "nextButtonIcon", "iconName", "iconButton", "button", "icon", "TabBarFoundation", "_adapter", "evt", "TAB_CONSTANTS", "_a", "_b", "orientation", "NAVIGATION_KEYS", "index", "tab", "acc", "i", "currentIndex", "isPrevKey", "calcIndex", "startIndex", "emitEvent", "currentSelectedTab", "t", "TAB_BAR_CONSTANTS", "scrollable", "isScrolledEnd", "isScrolledStart", "state", "value", "newSelectedTab", "template", "styles", "TabBarComponent", "BaseComponent", "IconRegistry", "tylIconKeyboardArrowLeft", "tylIconKeyboardArrowRight", "tylIconKeyboardArrowUp", "tylIconKeyboardArrowDown", "attachShadowTemplate", "TabBarFoundation", "TabBarAdapter", "TAB_BAR_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumber", "__decorateClass", "FoundationProperty", "CustomElement", "TabComponent", "IconButtonComponent", "IconComponent", "defineTabBarComponent", "defineCustomElement", "TabBarComponent"]
|
|
7
|
+
}
|