@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
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { BaseAdapter } from '../core';
|
|
7
|
+
export class FocusIndicatorAdapter extends BaseAdapter {
|
|
8
|
+
constructor(component) {
|
|
9
|
+
super(component);
|
|
10
|
+
this._targetElement = null;
|
|
11
|
+
}
|
|
12
|
+
destroy() {
|
|
13
|
+
this._targetElement = null;
|
|
14
|
+
}
|
|
15
|
+
hasTargetElement() {
|
|
16
|
+
return !!this._targetElement;
|
|
17
|
+
}
|
|
18
|
+
addTargetListener(type, listener) {
|
|
19
|
+
var _a;
|
|
20
|
+
(_a = this._targetElement) === null || _a === void 0 ? void 0 : _a.addEventListener(type, listener);
|
|
21
|
+
}
|
|
22
|
+
removeTargetListener(type, listener) {
|
|
23
|
+
var _a;
|
|
24
|
+
(_a = this._targetElement) === null || _a === void 0 ? void 0 : _a.removeEventListener(type, listener);
|
|
25
|
+
}
|
|
26
|
+
getTargetElement() {
|
|
27
|
+
return this._targetElement;
|
|
28
|
+
}
|
|
29
|
+
setTargetElement(el) {
|
|
30
|
+
this._targetElement = el;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* We use the following heuristic for locating the target element:
|
|
34
|
+
* - If the `target` attribute is set, we use that value to query the DOM for the target element
|
|
35
|
+
* - 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)
|
|
36
|
+
* - If the `target` attribute is set but the querySelector returns null, we use the parent element as the target element
|
|
37
|
+
* - If the `target` attribute is not set, we use the parent element as the target element
|
|
38
|
+
* @param value {string | null} - A selector string to query the DOM for the target element
|
|
39
|
+
*/
|
|
40
|
+
trySetTarget(value) {
|
|
41
|
+
if (value) {
|
|
42
|
+
const rootNode = this._component.getRootNode();
|
|
43
|
+
// Special case handling for a `:host` selector to easily target a host element
|
|
44
|
+
// from within a shadow tree, given that this is a very common scenario
|
|
45
|
+
if (value === ':host' && rootNode instanceof ShadowRoot) {
|
|
46
|
+
this._targetElement = rootNode.host;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this._targetElement = rootNode.querySelector(`#${value}`);
|
|
50
|
+
}
|
|
51
|
+
if (!this._targetElement) {
|
|
52
|
+
this.setTargetElement(this._component.parentElement);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
isActive(selector) {
|
|
56
|
+
var _a;
|
|
57
|
+
return !!((_a = this._targetElement) === null || _a === void 0 ? void 0 : _a.matches(selector));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare const FOCUS_INDICATOR_CONSTANTS: {
|
|
7
|
+
elementName: "forge-focus-indicator";
|
|
8
|
+
attributes: {
|
|
9
|
+
TARGET: string;
|
|
10
|
+
ACTIVE: string;
|
|
11
|
+
INWARD: string;
|
|
12
|
+
CIRCULAR: string;
|
|
13
|
+
ALLOW_FOCUS: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { COMPONENT_NAME_PREFIX } from '../constants';
|
|
7
|
+
const elementName = `${COMPONENT_NAME_PREFIX}focus-indicator`;
|
|
8
|
+
const observedAttributes = {
|
|
9
|
+
TARGET: 'target',
|
|
10
|
+
ACTIVE: 'active',
|
|
11
|
+
INWARD: 'inward',
|
|
12
|
+
CIRCULAR: 'circular',
|
|
13
|
+
ALLOW_FOCUS: 'allow-focus'
|
|
14
|
+
};
|
|
15
|
+
const attributes = Object.assign({}, observedAttributes);
|
|
16
|
+
export const FOCUS_INDICATOR_CONSTANTS = {
|
|
17
|
+
elementName,
|
|
18
|
+
attributes
|
|
19
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { IFocusIndicatorAdapter } from './focus-indicator-adapter';
|
|
7
|
+
export interface IFocusIndicatorFoundation {
|
|
8
|
+
targetElement: HTMLElement | null;
|
|
9
|
+
target: string | null;
|
|
10
|
+
active: boolean;
|
|
11
|
+
inward: boolean;
|
|
12
|
+
circular: boolean;
|
|
13
|
+
allowFocus: boolean;
|
|
14
|
+
initialize(): void;
|
|
15
|
+
destroy(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class FocusIndicatorFoundation implements IFocusIndicatorFoundation {
|
|
18
|
+
private _adapter;
|
|
19
|
+
private _target;
|
|
20
|
+
private _active;
|
|
21
|
+
private _inward;
|
|
22
|
+
private _circular;
|
|
23
|
+
private _allowFocus;
|
|
24
|
+
private _interactionListener;
|
|
25
|
+
constructor(_adapter: IFocusIndicatorAdapter);
|
|
26
|
+
initialize(): void;
|
|
27
|
+
destroy(): void;
|
|
28
|
+
private _addListeners;
|
|
29
|
+
private _removeListeners;
|
|
30
|
+
private _onInteraction;
|
|
31
|
+
get targetElement(): HTMLElement | null;
|
|
32
|
+
set targetElement(value: HTMLElement | null);
|
|
33
|
+
get target(): string | null;
|
|
34
|
+
set target(value: string | null);
|
|
35
|
+
get active(): boolean;
|
|
36
|
+
set active(value: boolean);
|
|
37
|
+
get inward(): boolean;
|
|
38
|
+
set inward(value: boolean);
|
|
39
|
+
get circular(): boolean;
|
|
40
|
+
set circular(value: boolean);
|
|
41
|
+
get allowFocus(): boolean;
|
|
42
|
+
set allowFocus(value: boolean);
|
|
43
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { FOCUS_INDICATOR_CONSTANTS } from './focus-indicator-constants';
|
|
7
|
+
export class FocusIndicatorFoundation {
|
|
8
|
+
constructor(_adapter) {
|
|
9
|
+
this._adapter = _adapter;
|
|
10
|
+
this._target = null;
|
|
11
|
+
this._active = false;
|
|
12
|
+
this._inward = false;
|
|
13
|
+
this._circular = false;
|
|
14
|
+
this._allowFocus = false;
|
|
15
|
+
this._interactionListener = evt => this._onInteraction(evt);
|
|
16
|
+
}
|
|
17
|
+
initialize() {
|
|
18
|
+
if (!this._adapter.hasTargetElement()) {
|
|
19
|
+
this._adapter.trySetTarget(this._target);
|
|
20
|
+
}
|
|
21
|
+
this._addListeners();
|
|
22
|
+
}
|
|
23
|
+
destroy() {
|
|
24
|
+
this._adapter.destroy();
|
|
25
|
+
this._removeListeners();
|
|
26
|
+
}
|
|
27
|
+
_addListeners() {
|
|
28
|
+
this._adapter.addTargetListener('focusin', this._interactionListener);
|
|
29
|
+
this._adapter.addTargetListener('focusout', this._interactionListener);
|
|
30
|
+
this._adapter.addTargetListener('pointerdown', this._interactionListener);
|
|
31
|
+
}
|
|
32
|
+
_removeListeners() {
|
|
33
|
+
this._adapter.removeTargetListener('focusin', this._interactionListener);
|
|
34
|
+
this._adapter.removeTargetListener('focusout', this._interactionListener);
|
|
35
|
+
this._adapter.removeTargetListener('pointerdown', this._interactionListener);
|
|
36
|
+
}
|
|
37
|
+
_onInteraction(evt) {
|
|
38
|
+
switch (evt.type) {
|
|
39
|
+
case 'focusin':
|
|
40
|
+
this.active = this._adapter.isActive(this._allowFocus ? ':focus' : ':focus-visible');
|
|
41
|
+
break;
|
|
42
|
+
case 'focusout':
|
|
43
|
+
this.active = false;
|
|
44
|
+
break;
|
|
45
|
+
case 'pointerdown':
|
|
46
|
+
this.active = this._allowFocus ? this._adapter.isActive(':focus') : false;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
get targetElement() {
|
|
51
|
+
return this._adapter.getTargetElement();
|
|
52
|
+
}
|
|
53
|
+
set targetElement(value) {
|
|
54
|
+
this._removeListeners();
|
|
55
|
+
this._adapter.setTargetElement(value);
|
|
56
|
+
this._addListeners();
|
|
57
|
+
}
|
|
58
|
+
get target() {
|
|
59
|
+
return this._adapter.getHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.TARGET);
|
|
60
|
+
}
|
|
61
|
+
set target(value) {
|
|
62
|
+
if (this._target !== value) {
|
|
63
|
+
this._target = value;
|
|
64
|
+
if (this._adapter.isConnected) {
|
|
65
|
+
this._adapter.trySetTarget(value);
|
|
66
|
+
}
|
|
67
|
+
this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.TARGET, Boolean(this._target), this._target);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
get active() {
|
|
71
|
+
return this._active;
|
|
72
|
+
}
|
|
73
|
+
set active(value) {
|
|
74
|
+
value = Boolean(value);
|
|
75
|
+
if (this._active !== value) {
|
|
76
|
+
this._active = value;
|
|
77
|
+
this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.ACTIVE, this._active);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
get inward() {
|
|
81
|
+
return this._inward;
|
|
82
|
+
}
|
|
83
|
+
set inward(value) {
|
|
84
|
+
value = Boolean(value);
|
|
85
|
+
if (this._inward !== value) {
|
|
86
|
+
this._inward = value;
|
|
87
|
+
this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.INWARD, this._inward);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
get circular() {
|
|
91
|
+
return this._circular;
|
|
92
|
+
}
|
|
93
|
+
set circular(value) {
|
|
94
|
+
value = Boolean(value);
|
|
95
|
+
if (this._circular !== value) {
|
|
96
|
+
this._circular = value;
|
|
97
|
+
this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.CIRCULAR, this._circular);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
get allowFocus() {
|
|
101
|
+
return this._allowFocus;
|
|
102
|
+
}
|
|
103
|
+
set allowFocus(value) {
|
|
104
|
+
value = Boolean(value);
|
|
105
|
+
if (this._allowFocus !== value) {
|
|
106
|
+
this._allowFocus = value;
|
|
107
|
+
this._adapter.toggleHostAttribute(FOCUS_INDICATOR_CONSTANTS.attributes.ALLOW_FOCUS, this._allowFocus);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { BaseComponent, IBaseComponent } from '../core/base/base-component';
|
|
7
|
+
export interface IFocusIndicatorComponent extends IBaseComponent {
|
|
8
|
+
targetElement: HTMLElement;
|
|
9
|
+
target: string | null;
|
|
10
|
+
active: boolean;
|
|
11
|
+
inward: boolean;
|
|
12
|
+
circular: boolean;
|
|
13
|
+
allowFocus: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'forge-focus-indicator': IFocusIndicatorComponent;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @tag forge-focus-indicator
|
|
22
|
+
*
|
|
23
|
+
* @summary Renders a focus indicator when an attached element matches `:focus-visible`.
|
|
24
|
+
*
|
|
25
|
+
* @property {HTMLElement} targetElement - The element to attach the focus indicator to.
|
|
26
|
+
* @property {string} target - The id of the element to attach the focus indicator to.
|
|
27
|
+
* @property {boolean} active - Controls whether the indicator is active.
|
|
28
|
+
* @property {boolean} inward - Controls whether the indicator renders inward.
|
|
29
|
+
* @property {boolean} circular - Controls whether the indicator renders circular.
|
|
30
|
+
* @property {boolean} allowFocus - Controls whether the indicator renders when the target element matches `:focus` instead of `:focus-visible`.
|
|
31
|
+
*
|
|
32
|
+
* @attribute {string} target - The id of the element to attach the focus indicator to.
|
|
33
|
+
* @attribute {boolean} active - Controls whether the indicator is active.
|
|
34
|
+
* @attribute {boolean} inward - Controls whether the indicator renders inward.
|
|
35
|
+
* @attribute {boolean} circular - Controls whether the indicator renders circular.
|
|
36
|
+
* @attribute {boolean} allow-focus - Controls whether the indicator renders when the target element matches `:focus` instead of `:focus-visible`.
|
|
37
|
+
*
|
|
38
|
+
* @cssproperty --forge-focus-indicator-active-width - The width of the focus indicator when active. When animating this is the max extent.
|
|
39
|
+
* @cssproperty --forge-focus-indicator-color - The color of the focus indicator.
|
|
40
|
+
* @cssproperty --forge-focus-indicator-duration - The animation duration.
|
|
41
|
+
* @cssproperty --forge-focus-indicator-outward-offset - The offset of the focus indicator when outward.
|
|
42
|
+
* @cssproperty --forge-focus-indicator-inward-offset - The offset of the focus indicator when inward.
|
|
43
|
+
* @cssproperty --forge-focus-indicator-shape - The shape of the focus indicator.
|
|
44
|
+
* @cssproperty --forge-focus-indicator-width - The width of the focus indicator when resting.
|
|
45
|
+
* @cssproperty --forge-focus-indicator-shape-start-start - The start start shape.
|
|
46
|
+
* @cssproperty --forge-focus-indicator-shape-start-end - The start end shape.
|
|
47
|
+
* @cssproperty --forge-focus-indicator-shape-end-start - The end start shape.
|
|
48
|
+
* @cssproperty --forge-focus-indicator-shape-end-end - The end end shape.
|
|
49
|
+
* @cssproperty --forge-focus-indicator-offset-block - The block offset.
|
|
50
|
+
* @cssproperty --forge-focus-indicator-offset-inline - The inline offset.
|
|
51
|
+
*
|
|
52
|
+
* @csspart indicator - The focus indicator element.
|
|
53
|
+
*/
|
|
54
|
+
export declare class FocusIndicatorComponent extends BaseComponent implements IFocusIndicatorComponent {
|
|
55
|
+
static get observedAttributes(): string[];
|
|
56
|
+
private _foundation;
|
|
57
|
+
constructor();
|
|
58
|
+
connectedCallback(): void;
|
|
59
|
+
disconnectedCallback(): void;
|
|
60
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
61
|
+
targetElement: HTMLElement;
|
|
62
|
+
target: string | null;
|
|
63
|
+
active: boolean;
|
|
64
|
+
inward: boolean;
|
|
65
|
+
circular: boolean;
|
|
66
|
+
allowFocus: boolean;
|
|
67
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { attachShadowTemplate, coerceBoolean, CustomElement, FoundationProperty } from '@tylertech/forge-core';
|
|
8
|
+
import { BaseComponent } from '../core/base/base-component';
|
|
9
|
+
import { FocusIndicatorAdapter } from './focus-indicator-adapter';
|
|
10
|
+
import { FOCUS_INDICATOR_CONSTANTS } from './focus-indicator-constants';
|
|
11
|
+
import { FocusIndicatorFoundation } from './focus-indicator-foundation';
|
|
12
|
+
const template = '<template><div class=\"forge-focus-indicator\" part=\"indicator\"></div></template>';
|
|
13
|
+
const 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%}';
|
|
14
|
+
/**
|
|
15
|
+
* @tag forge-focus-indicator
|
|
16
|
+
*
|
|
17
|
+
* @summary Renders a focus indicator when an attached element matches `:focus-visible`.
|
|
18
|
+
*
|
|
19
|
+
* @property {HTMLElement} targetElement - The element to attach the focus indicator to.
|
|
20
|
+
* @property {string} target - The id of the element to attach the focus indicator to.
|
|
21
|
+
* @property {boolean} active - Controls whether the indicator is active.
|
|
22
|
+
* @property {boolean} inward - Controls whether the indicator renders inward.
|
|
23
|
+
* @property {boolean} circular - Controls whether the indicator renders circular.
|
|
24
|
+
* @property {boolean} allowFocus - Controls whether the indicator renders when the target element matches `:focus` instead of `:focus-visible`.
|
|
25
|
+
*
|
|
26
|
+
* @attribute {string} target - The id of the element to attach the focus indicator to.
|
|
27
|
+
* @attribute {boolean} active - Controls whether the indicator is active.
|
|
28
|
+
* @attribute {boolean} inward - Controls whether the indicator renders inward.
|
|
29
|
+
* @attribute {boolean} circular - Controls whether the indicator renders circular.
|
|
30
|
+
* @attribute {boolean} allow-focus - Controls whether the indicator renders when the target element matches `:focus` instead of `:focus-visible`.
|
|
31
|
+
*
|
|
32
|
+
* @cssproperty --forge-focus-indicator-active-width - The width of the focus indicator when active. When animating this is the max extent.
|
|
33
|
+
* @cssproperty --forge-focus-indicator-color - The color of the focus indicator.
|
|
34
|
+
* @cssproperty --forge-focus-indicator-duration - The animation duration.
|
|
35
|
+
* @cssproperty --forge-focus-indicator-outward-offset - The offset of the focus indicator when outward.
|
|
36
|
+
* @cssproperty --forge-focus-indicator-inward-offset - The offset of the focus indicator when inward.
|
|
37
|
+
* @cssproperty --forge-focus-indicator-shape - The shape of the focus indicator.
|
|
38
|
+
* @cssproperty --forge-focus-indicator-width - The width of the focus indicator when resting.
|
|
39
|
+
* @cssproperty --forge-focus-indicator-shape-start-start - The start start shape.
|
|
40
|
+
* @cssproperty --forge-focus-indicator-shape-start-end - The start end shape.
|
|
41
|
+
* @cssproperty --forge-focus-indicator-shape-end-start - The end start shape.
|
|
42
|
+
* @cssproperty --forge-focus-indicator-shape-end-end - The end end shape.
|
|
43
|
+
* @cssproperty --forge-focus-indicator-offset-block - The block offset.
|
|
44
|
+
* @cssproperty --forge-focus-indicator-offset-inline - The inline offset.
|
|
45
|
+
*
|
|
46
|
+
* @csspart indicator - The focus indicator element.
|
|
47
|
+
*/
|
|
48
|
+
let FocusIndicatorComponent = class FocusIndicatorComponent extends BaseComponent {
|
|
49
|
+
static get observedAttributes() {
|
|
50
|
+
return [
|
|
51
|
+
FOCUS_INDICATOR_CONSTANTS.attributes.TARGET,
|
|
52
|
+
FOCUS_INDICATOR_CONSTANTS.attributes.ACTIVE,
|
|
53
|
+
FOCUS_INDICATOR_CONSTANTS.attributes.INWARD,
|
|
54
|
+
FOCUS_INDICATOR_CONSTANTS.attributes.CIRCULAR,
|
|
55
|
+
FOCUS_INDICATOR_CONSTANTS.attributes.ALLOW_FOCUS
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
constructor() {
|
|
59
|
+
super();
|
|
60
|
+
attachShadowTemplate(this, template, styles);
|
|
61
|
+
this._foundation = new FocusIndicatorFoundation(new FocusIndicatorAdapter(this));
|
|
62
|
+
}
|
|
63
|
+
connectedCallback() {
|
|
64
|
+
this._foundation.initialize();
|
|
65
|
+
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
this._foundation.destroy();
|
|
68
|
+
}
|
|
69
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
70
|
+
switch (name) {
|
|
71
|
+
case FOCUS_INDICATOR_CONSTANTS.attributes.TARGET:
|
|
72
|
+
this.target = newValue;
|
|
73
|
+
break;
|
|
74
|
+
case FOCUS_INDICATOR_CONSTANTS.attributes.ACTIVE:
|
|
75
|
+
this.active = coerceBoolean(newValue);
|
|
76
|
+
break;
|
|
77
|
+
case FOCUS_INDICATOR_CONSTANTS.attributes.INWARD:
|
|
78
|
+
this.inward = coerceBoolean(newValue);
|
|
79
|
+
break;
|
|
80
|
+
case FOCUS_INDICATOR_CONSTANTS.attributes.CIRCULAR:
|
|
81
|
+
this.circular = coerceBoolean(newValue);
|
|
82
|
+
break;
|
|
83
|
+
case FOCUS_INDICATOR_CONSTANTS.attributes.ALLOW_FOCUS:
|
|
84
|
+
this.allowFocus = coerceBoolean(newValue);
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
__decorate([
|
|
90
|
+
FoundationProperty()
|
|
91
|
+
], FocusIndicatorComponent.prototype, "targetElement", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
FoundationProperty()
|
|
94
|
+
], FocusIndicatorComponent.prototype, "target", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
FoundationProperty()
|
|
97
|
+
], FocusIndicatorComponent.prototype, "active", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
FoundationProperty()
|
|
100
|
+
], FocusIndicatorComponent.prototype, "inward", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
FoundationProperty()
|
|
103
|
+
], FocusIndicatorComponent.prototype, "circular", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
FoundationProperty()
|
|
106
|
+
], FocusIndicatorComponent.prototype, "allowFocus", void 0);
|
|
107
|
+
FocusIndicatorComponent = __decorate([
|
|
108
|
+
CustomElement({
|
|
109
|
+
name: FOCUS_INDICATOR_CONSTANTS.elementName
|
|
110
|
+
})
|
|
111
|
+
], FocusIndicatorComponent);
|
|
112
|
+
export { FocusIndicatorComponent };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export * from './focus-indicator-adapter';
|
|
7
|
+
export * from './focus-indicator-constants';
|
|
8
|
+
export * from './focus-indicator-foundation';
|
|
9
|
+
export * from './focus-indicator';
|
|
10
|
+
export declare function defineFocusIndicatorComponent(): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { defineCustomElement } from '@tylertech/forge-core';
|
|
7
|
+
import { FocusIndicatorComponent } from './focus-indicator';
|
|
8
|
+
export * from './focus-indicator-adapter';
|
|
9
|
+
export * from './focus-indicator-constants';
|
|
10
|
+
export * from './focus-indicator-foundation';
|
|
11
|
+
export * from './focus-indicator';
|
|
12
|
+
export function defineFocusIndicatorComponent() {
|
|
13
|
+
defineCustomElement(FocusIndicatorComponent);
|
|
14
|
+
}
|
package/esm/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export * from './expansion-panel';
|
|
|
32
32
|
export * from './file-picker';
|
|
33
33
|
export * from './floating-action-button';
|
|
34
34
|
export * from './floating-label';
|
|
35
|
+
export * from './focus-indicator';
|
|
35
36
|
export * from './icon-button';
|
|
36
37
|
export * from './inline-message';
|
|
37
38
|
export * from './keyboard-shortcut';
|
package/esm/index.js
CHANGED
|
@@ -35,6 +35,7 @@ import { DrawerComponent, MiniDrawerComponent, ModalDrawerComponent } from './dr
|
|
|
35
35
|
import { ExpansionPanelComponent } from './expansion-panel';
|
|
36
36
|
import { FilePickerComponent } from './file-picker';
|
|
37
37
|
import { FloatingActionButton } from './floating-action-button';
|
|
38
|
+
import { FocusIndicatorComponent } from './focus-indicator';
|
|
38
39
|
import { IconButtonComponent } from './icon-button';
|
|
39
40
|
import { InlineMessageComponent } from './inline-message';
|
|
40
41
|
import { KeyboardShortcutComponent } from './keyboard-shortcut';
|
|
@@ -99,6 +100,7 @@ export * from './expansion-panel';
|
|
|
99
100
|
export * from './file-picker';
|
|
100
101
|
export * from './floating-action-button';
|
|
101
102
|
export * from './floating-label';
|
|
103
|
+
export * from './focus-indicator';
|
|
102
104
|
export * from './icon-button';
|
|
103
105
|
export * from './inline-message';
|
|
104
106
|
export * from './keyboard-shortcut';
|
|
@@ -162,6 +164,7 @@ const CUSTOM_ELEMENTS = [
|
|
|
162
164
|
ExpansionPanelComponent,
|
|
163
165
|
FilePickerComponent,
|
|
164
166
|
FloatingActionButton,
|
|
167
|
+
FocusIndicatorComponent,
|
|
165
168
|
ProductIconComponent,
|
|
166
169
|
IconComponent,
|
|
167
170
|
IconButtonComponent,
|
|
@@ -24,6 +24,9 @@ export function createStartHandleElement(thumbLabel) {
|
|
|
24
24
|
const startHandle = document.createElement('div');
|
|
25
25
|
startHandle.classList.add(SLIDER_CONSTANTS.classes.HANDLE, SLIDER_CONSTANTS.classes.HANDLE_START);
|
|
26
26
|
startHandle.setAttribute('part', 'handle-start');
|
|
27
|
+
const startHandleFocusIndicator = document.createElement('forge-focus-indicator');
|
|
28
|
+
startHandleFocusIndicator.target = 'start';
|
|
29
|
+
startHandle.appendChild(startHandleFocusIndicator);
|
|
27
30
|
const startHandleThumb = document.createElement('div');
|
|
28
31
|
startHandleThumb.classList.add(SLIDER_CONSTANTS.classes.HANDLE_THUMB);
|
|
29
32
|
startHandleThumb.setAttribute('part', 'handle-start-thumb');
|
package/esm/slider/slider.d.ts
CHANGED
|
@@ -127,7 +127,6 @@ declare global {
|
|
|
127
127
|
* @csspart handle-start-thumb - Styles the start handle thumb element.
|
|
128
128
|
* @csspart handle-start-label - Styles the start handle label element.
|
|
129
129
|
* @csspart handle-start-label-content - Styles the start handle label content element.
|
|
130
|
-
*
|
|
131
130
|
*/
|
|
132
131
|
export declare class SliderComponent extends BaseComponent implements ISliderComponent {
|
|
133
132
|
static get observedAttributes(): string[];
|