@tylertech/forge 3.0.0-next.17 → 3.0.0-next.19
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 +231 -124
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/app-bar/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-area/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/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.6J27XSTE.js → chunk.2AVJJJNS.js} +2 -2
- package/dist/esm/chunks/{chunk.H6AG3EFX.js → chunk.2F2N4WBN.js} +2 -2
- package/dist/esm/chunks/chunk.3WT7HPA7.js +12 -0
- package/dist/esm/chunks/{chunk.W7CM652O.js → chunk.4EBFMRTJ.js} +2 -2
- package/dist/esm/chunks/{chunk.6RZCV4ZV.js → chunk.4HZ6SNRV.js} +2 -2
- package/dist/esm/chunks/{chunk.HPCXVNG6.js → chunk.4SP42UG3.js} +2 -2
- package/dist/esm/chunks/{chunk.HPCXVNG6.js.map → chunk.4SP42UG3.js.map} +3 -3
- package/dist/esm/chunks/{chunk.XPIAOMSC.js → chunk.4YKLCBP2.js} +2 -2
- package/dist/esm/chunks/{chunk.O47OSK6Z.js → chunk.54DNA2QP.js} +2 -2
- package/dist/esm/chunks/{chunk.O47OSK6Z.js.map → chunk.54DNA2QP.js.map} +1 -1
- package/dist/esm/chunks/{chunk.2NGPMBVU.js → chunk.5JSCGQ7H.js} +2 -2
- package/dist/esm/chunks/{chunk.42VNZ74O.js → chunk.5NHGVUVR.js} +2 -2
- package/dist/esm/chunks/{chunk.Z7SLVU2O.js → chunk.5PNJOQDZ.js} +2 -2
- package/dist/esm/chunks/{chunk.IDB4KFSQ.js → chunk.66RZ2CUB.js} +2 -2
- package/dist/esm/chunks/{chunk.PR76A5VF.js → chunk.6DPDC4ON.js} +2 -2
- package/dist/esm/chunks/{chunk.ZZRAZZ3N.js → chunk.7AE3ATT3.js} +2 -2
- package/dist/esm/chunks/{chunk.AWEDY45N.js → chunk.AXBMJBED.js} +2 -2
- package/dist/esm/chunks/{chunk.NHYJMP25.js → chunk.B2RYZJGJ.js} +2 -2
- package/dist/esm/chunks/{chunk.S3KKICL3.js → chunk.CISGGM56.js} +2 -2
- package/dist/esm/chunks/{chunk.LXFL2C62.js → chunk.CJUX3PL5.js} +2 -2
- package/dist/esm/chunks/{chunk.VOL4DT5F.js → chunk.DYBD4IRT.js} +2 -2
- package/dist/esm/chunks/{chunk.LDHY3O6H.js → chunk.E2FS4PJS.js} +2 -2
- package/dist/esm/chunks/chunk.E7TIN4JS.js +7 -0
- package/dist/esm/chunks/chunk.E7TIN4JS.js.map +7 -0
- package/dist/esm/chunks/{chunk.OJHNLDNM.js → chunk.F3FWXBDS.js} +2 -2
- package/dist/esm/chunks/{chunk.3PHNRX5D.js → chunk.FOQH2SSU.js} +2 -2
- package/dist/esm/chunks/{chunk.GFKYBECY.js → chunk.FXDHZCID.js} +2 -2
- package/dist/esm/chunks/{chunk.SN3VXOWN.js → chunk.FZC3WXSY.js} +2 -2
- package/dist/esm/chunks/chunk.GAQ3POUT.js +7 -0
- package/dist/esm/chunks/chunk.GAQ3POUT.js.map +7 -0
- package/dist/esm/chunks/{chunk.HBFU4EGB.js → chunk.IE42X2LV.js} +2 -2
- package/dist/esm/chunks/{chunk.JRROGJ2G.js → chunk.IO3A5OM6.js} +2 -2
- package/dist/esm/chunks/{chunk.EPVNVBZI.js → chunk.J5MWS2KZ.js} +2 -2
- package/dist/esm/chunks/{chunk.6YDMW2GO.js → chunk.JO6GPIMF.js} +2 -2
- package/dist/esm/chunks/{chunk.5YTYVHYR.js → chunk.JUXSSZ3B.js} +2 -2
- package/dist/esm/chunks/{chunk.FTADCSFT.js → chunk.KIQZLNDG.js} +2 -2
- package/dist/esm/chunks/{chunk.VX7H6YHF.js → chunk.LNMQ5A25.js} +2 -2
- package/dist/esm/chunks/{chunk.YCG7OVYF.js → chunk.MBXBM6UI.js} +2 -2
- package/dist/esm/chunks/{chunk.SUR46MJG.js → chunk.N2DHFDXD.js} +2 -2
- package/dist/esm/chunks/{chunk.OD54UG2G.js → chunk.NSKIEZWE.js} +2 -2
- package/dist/esm/chunks/{chunk.6JR2HMWB.js → chunk.NY3N6KUZ.js} +2 -2
- package/dist/esm/chunks/{chunk.ZTBOQMRE.js → chunk.O6WN2UP6.js} +2 -2
- package/dist/esm/chunks/{chunk.JMIUB3S3.js → chunk.OWYOZF53.js} +2 -2
- package/dist/esm/chunks/{chunk.ND2X5OQ4.js → chunk.OXGCNOUY.js} +2 -2
- package/dist/esm/chunks/{chunk.OAZXY4Q5.js → chunk.QIMAHW7V.js} +2 -2
- package/dist/esm/chunks/{chunk.ZJQLVAJY.js → chunk.QXZ3AAXD.js} +2 -2
- package/dist/esm/chunks/{chunk.TGGC2THA.js → chunk.RB435MRJ.js} +2 -2
- package/dist/esm/chunks/{chunk.O7DID7GP.js → chunk.RBG6AMLV.js} +2 -2
- package/dist/esm/chunks/{chunk.ZZV7P3FR.js → chunk.RN634NOB.js} +2 -2
- package/dist/esm/chunks/{chunk.7QO5JEOC.js → chunk.RQ3RHGLB.js} +2 -2
- package/dist/esm/chunks/{chunk.NPCUVYWP.js → chunk.S2KPWTRW.js} +2 -2
- package/dist/esm/chunks/{chunk.ME7ICFCZ.js → chunk.SWDOKJUF.js} +2 -2
- package/dist/esm/chunks/{chunk.MMMG4MZ3.js → chunk.ULZJYWM2.js} +2 -2
- package/dist/esm/chunks/{chunk.PGSL6NFZ.js → chunk.VGKNQYHG.js} +2 -2
- package/dist/esm/chunks/{chunk.VLADAZRB.js → chunk.VRTR7WMN.js} +2 -2
- package/dist/esm/chunks/{chunk.NBYCIDFC.js → chunk.W2W3NTFC.js} +2 -2
- package/dist/esm/chunks/{chunk.ZSHN7Z45.js → chunk.WKLDPPHS.js} +2 -2
- package/dist/esm/chunks/{chunk.4X4SSZQU.js → chunk.WM6ZUVDR.js} +2 -2
- package/dist/esm/chunks/{chunk.TRSICKKS.js → chunk.XH63INIK.js} +2 -2
- package/dist/esm/chunks/{chunk.VNH44AGF.js → chunk.Y7ZZ7HDC.js} +2 -2
- package/dist/esm/chunks/{chunk.MTZOQQXR.js → chunk.YGXXWF52.js} +2 -2
- package/dist/esm/chunks/{chunk.KVPKVWCZ.js → chunk.YHIHHGMQ.js} +2 -2
- package/dist/esm/chunks/{chunk.OVDO5RVX.js → chunk.YOKBWEXF.js} +2 -2
- package/dist/esm/chunks/{chunk.L5OB7WM2.js → chunk.ZYYPOLIG.js} +2 -2
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/utils/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/deprecated/button/index.js +1 -1
- package/dist/esm/deprecated/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-action-button/index.js +1 -1
- package/dist/esm/focus-indicator/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/label/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/overlay/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/popover/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/radio/radio/index.js +1 -1
- package/dist/esm/radio/radio-group/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-button/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/state-layer/index.js +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/dist/esm/tooltip/index.js +1 -1
- package/dist/forge-dark.css +1 -1
- package/esm/banner/banner-adapter.d.ts +18 -18
- package/esm/banner/banner-adapter.js +26 -23
- package/esm/banner/banner-constants.d.ts +20 -16
- package/esm/banner/banner-constants.js +19 -21
- package/esm/banner/banner-foundation.d.ts +15 -14
- package/esm/banner/banner-foundation.js +54 -43
- package/esm/banner/banner.d.ts +36 -7
- package/esm/banner/banner.js +51 -18
- package/esm/core/utils/position-utils.d.ts +2 -10
- package/esm/core/utils/position-utils.js +8 -17
- package/esm/core/utils/utils.d.ts +6 -0
- package/esm/core/utils/utils.js +9 -0
- package/esm/overlay/overlay-adapter.d.ts +1 -2
- package/esm/overlay/overlay-adapter.js +9 -13
- package/esm/overlay/overlay-constants.d.ts +6 -1
- package/esm/overlay/overlay-constants.js +22 -0
- package/esm/overlay/overlay-foundation.js +1 -5
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/package.json +1 -1
- package/styles/banner/_core.scss +59 -0
- package/styles/banner/_token-utils.scss +30 -0
- package/styles/banner/banner.scss +137 -9
- package/styles/banner/index.scss +6 -0
- package/styles/core/styles/tokens/banner/_tokens.scss +26 -0
- package/styles/theme/_theme-dark.scss +0 -6
- package/dist/esm/chunks/chunk.53HPDCFR.js +0 -7
- package/dist/esm/chunks/chunk.53HPDCFR.js.map +0 -7
- package/dist/esm/chunks/chunk.DFRD7A2Y.js +0 -7
- package/dist/esm/chunks/chunk.DFRD7A2Y.js.map +0 -7
- package/dist/esm/chunks/chunk.YVCGGQQG.js +0 -12
- package/styles/badge/_mixins.scss +0 -125
- package/styles/badge/_variables.scss +0 -87
- package/styles/banner/_mixins.scss +0 -219
- package/styles/banner/_variables.scss +0 -88
- /package/dist/esm/chunks/{chunk.6J27XSTE.js.map → chunk.2AVJJJNS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.H6AG3EFX.js.map → chunk.2F2N4WBN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YVCGGQQG.js.map → chunk.3WT7HPA7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W7CM652O.js.map → chunk.4EBFMRTJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6RZCV4ZV.js.map → chunk.4HZ6SNRV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XPIAOMSC.js.map → chunk.4YKLCBP2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2NGPMBVU.js.map → chunk.5JSCGQ7H.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.42VNZ74O.js.map → chunk.5NHGVUVR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Z7SLVU2O.js.map → chunk.5PNJOQDZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IDB4KFSQ.js.map → chunk.66RZ2CUB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PR76A5VF.js.map → chunk.6DPDC4ON.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZZRAZZ3N.js.map → chunk.7AE3ATT3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AWEDY45N.js.map → chunk.AXBMJBED.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NHYJMP25.js.map → chunk.B2RYZJGJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.S3KKICL3.js.map → chunk.CISGGM56.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LXFL2C62.js.map → chunk.CJUX3PL5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VOL4DT5F.js.map → chunk.DYBD4IRT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LDHY3O6H.js.map → chunk.E2FS4PJS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OJHNLDNM.js.map → chunk.F3FWXBDS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3PHNRX5D.js.map → chunk.FOQH2SSU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GFKYBECY.js.map → chunk.FXDHZCID.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SN3VXOWN.js.map → chunk.FZC3WXSY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HBFU4EGB.js.map → chunk.IE42X2LV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JRROGJ2G.js.map → chunk.IO3A5OM6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EPVNVBZI.js.map → chunk.J5MWS2KZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6YDMW2GO.js.map → chunk.JO6GPIMF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5YTYVHYR.js.map → chunk.JUXSSZ3B.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FTADCSFT.js.map → chunk.KIQZLNDG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VX7H6YHF.js.map → chunk.LNMQ5A25.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YCG7OVYF.js.map → chunk.MBXBM6UI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SUR46MJG.js.map → chunk.N2DHFDXD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OD54UG2G.js.map → chunk.NSKIEZWE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6JR2HMWB.js.map → chunk.NY3N6KUZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZTBOQMRE.js.map → chunk.O6WN2UP6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JMIUB3S3.js.map → chunk.OWYOZF53.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ND2X5OQ4.js.map → chunk.OXGCNOUY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OAZXY4Q5.js.map → chunk.QIMAHW7V.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZJQLVAJY.js.map → chunk.QXZ3AAXD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TGGC2THA.js.map → chunk.RB435MRJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.O7DID7GP.js.map → chunk.RBG6AMLV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZZV7P3FR.js.map → chunk.RN634NOB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7QO5JEOC.js.map → chunk.RQ3RHGLB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NPCUVYWP.js.map → chunk.S2KPWTRW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ME7ICFCZ.js.map → chunk.SWDOKJUF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MMMG4MZ3.js.map → chunk.ULZJYWM2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PGSL6NFZ.js.map → chunk.VGKNQYHG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VLADAZRB.js.map → chunk.VRTR7WMN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NBYCIDFC.js.map → chunk.W2W3NTFC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZSHN7Z45.js.map → chunk.WKLDPPHS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4X4SSZQU.js.map → chunk.WM6ZUVDR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TRSICKKS.js.map → chunk.XH63INIK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VNH44AGF.js.map → chunk.Y7ZZ7HDC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MTZOQQXR.js.map → chunk.YGXXWF52.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KVPKVWCZ.js.map → chunk.YHIHHGMQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OVDO5RVX.js.map → chunk.YOKBWEXF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.L5OB7WM2.js.map → chunk.ZYYPOLIG.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{a as z,b as B,c as H,d as K,e as U}from"./chunk.ZZRAZZ3N.js";import{E as S}from"./chunk.NHYJMP25.js";import{F as O}from"./chunk.IC4DLKE3.js";import{a}from"./chunk.44IUAOBP.js";import{e as N}from"./chunk.253H47GA.js";import{a as _}from"./chunk.LEN33O6V.js";import{e as v}from"./chunk.UV3WIHCM.js";import{d as w}from"./chunk.NPCUVYWP.js";import{l as A}from"./chunk.EWT2PBEP.js";import{d as R,l as x}from"./chunk.L7BSLZCB.js";import{e as p}from"./chunk.QG5EYBS3.js";import{b as T}from"./chunk.XIQFHO5R.js";import{a as L}from"./chunk.YTBNAGLS.js";import{a as E}from"./chunk.NVUMRW44.js";import{a as F,b as M}from"./chunk.UVXKHQQZ.js";import{a as y,e as P,h as D}from"./chunk.TPXXHX5J.js";import{a as V}from"./chunk.MGLWXAZO.js";import{t as k}from"./chunk.HZUQXCOQ.js";import{f as g,g as b}from"./chunk.J2M2MXP2.js";import{d as h}from"./chunk.M3QDAYD2.js";var d=`${M}date-range-picker`,m=class l{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new l(this)}},q={FROM:"from",TO:"to",END_VALUE:"end-value"},G={INPUT:"input"},W={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},n={elementName:d,selectors:G,events:W,observedAttributes:q};var c=class extends K{constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(n.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(n.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${n.elementName} requires two inputs`)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new O(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new T(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new T(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier))}addInputListener(t,e,i){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:i})}addToInputListener(t,e,i){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:i})}removeInputListener(t,e){var i;(i=this._fromInputElement)==null||i.removeEventListener(t,e)}removeToInputListener(t,e){var i;(i=this._toInputElement)==null||i.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let i=v(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(i)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=v(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=k(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){D(this._fromInputElement,t,e)}emitToInputEvent(t,e){D(this._toInputElement,t,e)}_createToggleElement(){return H("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}};var f=class extends U{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(),this._toInputBlurListener=e=>this._onToInputBlur(e)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let i=this._getTypedValue(t&&t.from||null),o=this._getTypedValue(t&&t.to||null),u=new m({from:i,to:o});return this._adapter.emitHostEvent(n.events.CHANGE,u,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new a({from:this._from||t,to:this._to||void 0}):new a({from:t});this._isDateRangeAcceptable(e)&&(this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t))}_onClear(){this._onDateSelected({date:null,range:new a,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(b(e)&&this._isDateValueAcceptable(e)){let i=this._formatDate(e);i&&this._adapter.setToInputValue(i,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(t){if(!(t!=null&&t.to))return!0;let e=()=>this._isDateValueAcceptable(t.from),i=()=>this._isDateValueAcceptable(t.to),o=()=>t!=null&&t.from&&(t!=null&&t.to)?t.from.getTime()<=t.to.getTime():!0;return e()&&i()&&o()}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let i=this._formatDate(e&&e.from||null),o=this._formatDate(e&&e.to||null);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._adapter.setToInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(o?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeToMask(){if(!this._masked)return;let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,i,o,u)=>this._prepareMaskCallback.call(null,e,i,o,u)),this._adapter.initializeToMask(t)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,e),!p(i,this._from)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(n.events.INPUT,e),!p(i,this._to)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(t){this._masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(t){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(t.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);p(i,this._from)||(this.from=i,this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);p(i,this._to)||(this.to=i,this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){t||(t={from:null,to:null}),t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to}}get from(){let t=this._getTypedValue(this._from);return t?g(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new a({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?g(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new a({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var X="<template><slot></slot></template>",j=":host{display:block}:host([hidden]){display:none}",s=class extends B{constructor(){super();R.define(A),P(this,X,j),this._foundation=new f(new c(this))}static get observedAttributes(){return[...Object.values(z.observedAttributes),n.observedAttributes.FROM,n.observedAttributes.TO]}attributeChangedCallback(t,e,i){switch(t){case n.observedAttributes.FROM:this.from=i;return;case n.observedAttributes.TO:this.to=i;return}super.attributeChangedCallback(t,e,i)}};h([E()],s.prototype,"from",2),h([E()],s.prototype,"to",2),s=h([F({name:n.elementName,dependencies:[N,S,w,x]})],s);var $=class extends L{constructor(t){super(t)}_build(){let t=document.createElement(n.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector(`input[${_.attributes.MULTI_INPUT}-0]`)}get toInput(){return this._textField.querySelector(`input[${_.attributes.MULTI_INPUT}-1]`)}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(n.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var i,o,u,I,C;this._textField=document.createElement(_.elementName),(i=this._config.options)!=null&&i.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((u=this._config.options)==null?void 0:u.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((I=this._config.options)==null?void 0:I.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((C=this._config.options)==null?void 0:C.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function qt(){y(s)}export{m as a,n as b,c,f as d,s as e,$ as f,qt as g};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as z,b as B,c as H,d as K,e as U}from"./chunk.7AE3ATT3.js";import{E as S}from"./chunk.B2RYZJGJ.js";import{F as O}from"./chunk.IC4DLKE3.js";import{a}from"./chunk.44IUAOBP.js";import{e as N}from"./chunk.253H47GA.js";import{a as _}from"./chunk.LEN33O6V.js";import{e as v}from"./chunk.UV3WIHCM.js";import{d as w}from"./chunk.S2KPWTRW.js";import{l as A}from"./chunk.EWT2PBEP.js";import{d as R,l as x}from"./chunk.L7BSLZCB.js";import{e as p}from"./chunk.QG5EYBS3.js";import{b as T}from"./chunk.XIQFHO5R.js";import{a as L}from"./chunk.YTBNAGLS.js";import{a as E}from"./chunk.NVUMRW44.js";import{a as F,b as M}from"./chunk.UVXKHQQZ.js";import{a as y,e as P,h as D}from"./chunk.TPXXHX5J.js";import{a as V}from"./chunk.MGLWXAZO.js";import{t as k}from"./chunk.HZUQXCOQ.js";import{f as g,g as b}from"./chunk.J2M2MXP2.js";import{d as h}from"./chunk.M3QDAYD2.js";var d=`${M}date-range-picker`,m=class l{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new l(this)}},q={FROM:"from",TO:"to",END_VALUE:"end-value"},G={INPUT:"input"},W={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},n={elementName:d,selectors:G,events:W,observedAttributes:q};var c=class extends K{constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(n.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(n.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${n.elementName} requires two inputs`)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new O(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new T(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new T(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier))}addInputListener(t,e,i){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:i})}addToInputListener(t,e,i){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:i})}removeInputListener(t,e){var i;(i=this._fromInputElement)==null||i.removeEventListener(t,e)}removeToInputListener(t,e){var i;(i=this._toInputElement)==null||i.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let i=v(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(i)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=v(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=k(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){D(this._fromInputElement,t,e)}emitToInputEvent(t,e){D(this._toInputElement,t,e)}_createToggleElement(){return H("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}};var f=class extends U{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(),this._toInputBlurListener=e=>this._onToInputBlur(e)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let i=this._getTypedValue(t&&t.from||null),o=this._getTypedValue(t&&t.to||null),u=new m({from:i,to:o});return this._adapter.emitHostEvent(n.events.CHANGE,u,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new a({from:this._from||t,to:this._to||void 0}):new a({from:t});this._isDateRangeAcceptable(e)&&(this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t))}_onClear(){this._onDateSelected({date:null,range:new a,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(b(e)&&this._isDateValueAcceptable(e)){let i=this._formatDate(e);i&&this._adapter.setToInputValue(i,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(t){if(!(t!=null&&t.to))return!0;let e=()=>this._isDateValueAcceptable(t.from),i=()=>this._isDateValueAcceptable(t.to),o=()=>t!=null&&t.from&&(t!=null&&t.to)?t.from.getTime()<=t.to.getTime():!0;return e()&&i()&&o()}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let i=this._formatDate(e&&e.from||null),o=this._formatDate(e&&e.to||null);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._adapter.setToInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(o?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeToMask(){if(!this._masked)return;let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,i,o,u)=>this._prepareMaskCallback.call(null,e,i,o,u)),this._adapter.initializeToMask(t)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,e),!p(i,this._from)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(n.events.INPUT,e),!p(i,this._to)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(t){this._masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(t){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(t.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);p(i,this._from)||(this.from=i,this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);p(i,this._to)||(this.to=i,this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){t||(t={from:null,to:null}),t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to}}get from(){let t=this._getTypedValue(this._from);return t?g(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new a({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?g(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new a({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var X="<template><slot></slot></template>",j=":host{display:block}:host([hidden]){display:none}",s=class extends B{constructor(){super();R.define(A),P(this,X,j),this._foundation=new f(new c(this))}static get observedAttributes(){return[...Object.values(z.observedAttributes),n.observedAttributes.FROM,n.observedAttributes.TO]}attributeChangedCallback(t,e,i){switch(t){case n.observedAttributes.FROM:this.from=i;return;case n.observedAttributes.TO:this.to=i;return}super.attributeChangedCallback(t,e,i)}};h([E()],s.prototype,"from",2),h([E()],s.prototype,"to",2),s=h([F({name:n.elementName,dependencies:[N,S,w,x]})],s);var $=class extends L{constructor(t){super(t)}_build(){let t=document.createElement(n.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector(`input[${_.attributes.MULTI_INPUT}-0]`)}get toInput(){return this._textField.querySelector(`input[${_.attributes.MULTI_INPUT}-1]`)}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(n.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var i,o,u,I,C;this._textField=document.createElement(_.elementName),(i=this._config.options)!=null&&i.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((u=this._config.options)==null?void 0:u.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((I=this._config.options)==null?void 0:I.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((C=this._config.options)==null?void 0:C.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function qt(){y(s)}export{m as a,n as b,c,f as d,s as e,$ as f,qt as g};
|
|
7
|
+
//# sourceMappingURL=chunk.NY3N6KUZ.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{b as S}from"./chunk.LEN33O6V.js";import{d as N,e as F}from"./chunk.NPCUVYWP.js";import{k as d,z as m}from"./chunk.EWT2PBEP.js";import{d as h}from"./chunk.L7BSLZCB.js";import{a as A}from"./chunk.YTBNAGLS.js";import{a as C}from"./chunk.ZY3ETQ3D.js";import{a as E}from"./chunk.NVUMRW44.js";import{a as B,b as L}from"./chunk.UVXKHQQZ.js";import{a as I,e as T,f as c,k as D}from"./chunk.TPXXHX5J.js";import{k as f}from"./chunk.J2M2MXP2.js";import{a as _,b as x,d as p}from"./chunk.M3QDAYD2.js";var R=`${L}quantity-field`,q={INVALID:"invalid",REQUIRED:"required",DISABLED:"disabled"},O={ROOT:"forge-quantity-field",INVALID:"forge-quantity-field--invalid",REQUIRED:"forge-quantity-field--required"},a={INCREMENT_BUTTON:"increment-button",DECREMENT_BUTTON:"decrement-button",LABEL:"label",HELPER_TEXT:"helper-text"},w={ROOT:`.${O.ROOT}`,INCREMENT_BUTTON_SLOT:`slot[name=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON_SLOT:`slot[name=${a.DECREMENT_BUTTON}]`,INCREMENT_BUTTON:`[slot=${a.INCREMENT_BUTTON}], button[slot=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON:`[slot=${a.DECREMENT_BUTTON}], button[slot=${a.DECREMENT_BUTTON}]`,TEXT_FIELD:"forge-text-field",INPUT:"input[type=number]",LABEL:`[slot=${a.LABEL}]`,HELPER_TEXT:`[slot=${a.HELPER_TEXT}]`},i={elementName:R,classes:O,slots:a,selectors:w,attributes:q};var v=class extends C{constructor(t){super(t);this._rootElement=c(t,i.selectors.ROOT),this._incrementButtonSlot=c(this._component,i.selectors.INCREMENT_BUTTON_SLOT),this._decrementButtonSlot=c(this._component,i.selectors.DECREMENT_BUTTON_SLOT)}initializeButtons(){this._incrementButton&&!this._incrementButton.hasAttribute("tabindex")&&(this._incrementButton.tabIndex=-1),this._decrementButton&&!this._decrementButton.hasAttribute("tabindex")&&(this._decrementButton.tabIndex=-1)}addRootClass(t){this._rootElement.classList.add(t)}removeRootClass(t){this._rootElement.classList.remove(t)}inputHasAttribute(t){return this.inputElement?this.inputElement.hasAttribute(t):!1}addIncrementButtonSlotListener(t){this._incrementButtonSlot.addEventListener("slotchange",t)}removeIncrementButtonSlotListener(t){this._incrementButtonSlot&&this._incrementButtonSlot.removeEventListener("slotchange",t)}addDecrementButtonSlotListener(t){this._decrementButtonSlot.addEventListener("slotchange",t)}removeDecrementButtonSlotListener(t){this._decrementButtonSlot&&this._decrementButtonSlot.removeEventListener("slotchange",t)}addTextFieldAttribute(t,e=""){this._textFieldComponent&&this._textFieldComponent.setAttribute(t,e)}removeTextFieldAttribute(t){this._textFieldComponent&&this._textFieldComponent.removeAttribute(t)}addIncrementEventListener(t,e){this._incrementButtonElement.addEventListener(t,e)}removeIncrementEventListener(t,e){this._incrementButtonElement&&this._incrementButtonElement.removeEventListener(t,e)}addDecrementEventListener(t,e){this._decrementButtonElement.addEventListener(t,e)}removeDecrementEventListener(t,e){this._decrementButtonElement&&this._decrementButtonElement.removeEventListener(t,e)}addIncrementButtonAttribute(t,e=""){this._incrementButtonElement.setAttribute(t,e)}removeIncrementButtonAttribute(t){this._incrementButtonElement.removeAttribute(t)}addDecrementButtonAttribute(t,e=""){this._decrementButtonElement.setAttribute(t,e)}removeDecrementButtonAttribute(t){this._decrementButtonElement.removeAttribute(t)}increment(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e+this._inputStep).toFixed(n));this._inputMax&&this._inputMax<o&&(o=this._inputMax),this._setInputValue(o)}decrement(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e-this._inputStep).toFixed(n));this._inputMin&&this._inputMin>o&&(o=this._inputMin),this._setInputValue(o)}addInputDisabledAttributeChangeListener(t){this._setupInputDisabledAttributeMutationObserver(t)}removeInputDisabledAttributeChangeListener(){this._cleanupInputDisabledAttributeMutationObserver()}_setInputValue(t){this.inputElement&&(this.inputElement.value=`${t}`,this.inputElement.dispatchEvent(new Event("input")),this.inputElement.dispatchEvent(new Event("change")))}_isNullOrUndefinedOrEmpty(t){return t==null||t===""}_setupInputDisabledAttributeMutationObserver(t){if(!this.inputElement)return;this._cleanupInputDisabledAttributeMutationObserver();let e=o=>this._inputDisabledAttributeMutationCallback(o,t);this._inputAttributeMutationObserver=new MutationObserver(e);let n={attributes:!0,attributeOldValue:!0,attributeFilter:[i.attributes.DISABLED]};this._inputAttributeMutationObserver.observe(this.inputElement,n)}_cleanupInputDisabledAttributeMutationObserver(){this._inputAttributeMutationObserver&&(this._inputAttributeMutationObserver.disconnect(),delete this._inputAttributeMutationObserver)}_inputDisabledAttributeMutationCallback(t,e){for(let n of t)n.type!=="attributes"||!n.attributeName||n.attributeName!==i.attributes.DISABLED||n.target[n.attributeName]===n.oldValue||e()}get _incrementButtonElement(){return this._incrementButton||(this._incrementButton=this._component.querySelector(i.selectors.INCREMENT_BUTTON)),this._incrementButton}get _decrementButtonElement(){return this._decrementButton||(this._decrementButton=this._component.querySelector(i.selectors.DECREMENT_BUTTON)),this._decrementButton}get _textFieldComponent(){return this._textField||(this._textField=this._component.querySelector(i.selectors.TEXT_FIELD)),this._textField}get inputElement(){return this._inputElement||(this._inputElement=this._component.querySelector(i.selectors.INPUT)),this._inputElement}get _inputStep(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.step)?1:+t.step}get _inputMax(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.max)?null:+t.max}get _inputMin(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.min)?null:+t.min}_calcPrecision(t){let e=String(t);return e.includes(".")?e.split(".")[1].length:0}};var b=class{constructor(r){this._adapter=r;this._incrementValue=()=>this._adapter.increment(),this._decrementValue=()=>this._adapter.decrement(),this._incrementButtonSlotChanged=()=>this._onIncrementButtonSlotChanged(),this._decrementButtonSlotChanged=()=>this._onDecrementButtonSlotChanged(),this._adapter.addIncrementButtonSlotListener(this._incrementButtonSlotChanged),this._adapter.addDecrementButtonSlotListener(this._decrementButtonSlotChanged)}connect(){this._adapter.addInputDisabledAttributeChangeListener(()=>this._syncDisabledStateOfButtons()),this._syncDisabledStateOfButtons(),this._adapter.initializeButtons()}disconnect(){this._removeIncrementEventListener(),this._removeDecrementEventListener(),this._removeIncrementButtonSlotListener(),this._removeDecrementButtonSlotListener(),this._adapter.removeInputDisabledAttributeChangeListener()}_onIncrementButtonSlotChanged(){this._addIncrementEventListener()}_onDecrementButtonSlotChanged(){this._addDecrementEventListener()}_addIncrementEventListener(){this._adapter.addIncrementEventListener("click",this._incrementValue)}_addDecrementEventListener(){this._adapter.addDecrementEventListener("click",this._decrementValue)}_removeIncrementEventListener(){this._adapter.removeIncrementEventListener("click",this._incrementValue)}_removeDecrementEventListener(){this._adapter.removeDecrementEventListener("click",this._decrementValue)}_removeIncrementButtonSlotListener(){this._adapter.removeIncrementButtonSlotListener(this._incrementButtonSlotChanged)}_removeDecrementButtonSlotListener(){this._adapter.removeDecrementButtonSlotListener(this._decrementButtonSlotChanged)}_syncDisabledStateOfButtons(){this._adapter.inputHasAttribute(i.attributes.DISABLED)?(this._adapter.addDecrementButtonAttribute(i.attributes.DISABLED),this._adapter.addIncrementButtonAttribute(i.attributes.DISABLED)):(this._adapter.removeIncrementButtonAttribute(i.attributes.DISABLED),this._adapter.removeDecrementButtonAttribute(i.attributes.DISABLED))}get required(){return this._required}set required(r){this._required!==r&&(this._required=r,this._required?(this._adapter.setHostAttribute(i.attributes.REQUIRED),this._adapter.addRootClass(i.classes.REQUIRED)):(this._adapter.removeHostAttribute(i.attributes.REQUIRED),this._adapter.removeRootClass(i.classes.REQUIRED)))}get invalid(){return this._invalid}set invalid(r){this._invalid!==r&&(this._invalid=r,this._invalid?(this._adapter.setHostAttribute(i.attributes.INVALID),this._adapter.addRootClass(i.classes.INVALID),this._adapter.addTextFieldAttribute(i.attributes.INVALID)):(this._adapter.removeHostAttribute(i.attributes.INVALID),this._adapter.removeRootClass(i.classes.INVALID),this._adapter.removeTextFieldAttribute(i.attributes.INVALID)))}};var U='<template><div class="forge-quantity-field" part="root"><slot name="label"></slot><div class="forge-quantity-field__row" part="row"><slot name="decrement-button"></slot><slot></slot><slot name="increment-button"></slot></div><slot name="helper-text"></slot></div></template>',k='.forge-quantity-field ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.forge-quantity-field__row{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.forge-quantity-field ::slotted(forge-icon-button:first-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-right:4px}.forge-quantity-field ::slotted(forge-icon-button:last-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-left:4px}.forge-quantity-field ::slotted(forge-text-field){--forge-text-field-margin-top:0;--forge-text-field-margin-bottom:0}.forge-quantity-field--required ::slotted([slot=label])::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:"*";margin-right:4px}.forge-quantity-field--invalid ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}:host{display:inline-block}:host([hidden]){display:none}',s=class extends D{constructor(){super();T(this,U,k),this._foundation=new b(new v(this)),h.define([m,d])}static get observedAttributes(){return[i.attributes.INVALID,i.attributes.REQUIRED]}connectedCallback(){this._requiredElementsPresent()?this._foundation.connect():this._ensureElementsPresent().then(()=>{this._foundation.connect()})}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,e,n){switch(t){case i.attributes.INVALID:this.invalid=f(n);break;case i.attributes.REQUIRED:this.required=f(n);break}}_ensureElementsPresent(){return new Promise(t=>{if(this._requiredElementsPresent()){t();return}let e=new MutationObserver(n=>{n.reduce((l,u)=>l+u.addedNodes.length,0)>0&&this._requiredElementsPresent()&&(e.disconnect(),t())});e.observe(this,{childList:!0,subtree:!0})})}_requiredElementsPresent(){let t=this.querySelector(i.selectors.INPUT),e=this.querySelector(i.selectors.DECREMENT_BUTTON),n=this.querySelector(i.selectors.INCREMENT_BUTTON);return!!t&&!!e&&!!n}};p([E()],s.prototype,"invalid",2),p([E()],s.prototype,"required",2),s=p([B({name:i.elementName,dependencies:[N]})],s);var M=class extends A{constructor(t){super(t);h.define([m,d])}_build(){let t=document.createElement(i.elementName);return this._attachButton(t,m.name,"decrement-button"),this._attachTextField(t),this._attachButton(t,d.name,"increment-button"),t}_configure(){var t,e,n,o,l;this.inputElement.value=(e=(t=this._config.options)==null?void 0:t.value)!=null?e:"0",this.inputElement.style.textAlign="center",this.inputElement.style.width="64px",(n=this._config.options)!=null&&n.helperText&&this.setHelperText(this._config.options.helperText),typeof((o=this._config.options)==null?void 0:o.label)=="string"&&this._createLabel(this._config.options.label),((l=this._config.options)==null?void 0:l.step)!==void 0&&(this.inputElement.step=this._config.options.step)}get value(){return this._textFieldDelegate.inputElement.value}set value(t){this._textFieldDelegate.inputElement.value=t}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(t){this._textFieldDelegate.inputElement.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}get inputElement(){return this._textFieldDelegate.inputElement}get labelElement(){return this._labelElement}onChange(t){this._textFieldDelegate.inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var n,o,l,u,y;let e={props:_({},(o=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:o.props),options:x(_({},(u=(l=this._config.options)==null?void 0:l.textFieldDelegateConfig)==null?void 0:u.options),{id:(y=this._config.options)==null?void 0:y.id,type:"number"})};this._textFieldDelegate=new S(e),t.appendChild(this._textFieldDelegate.element)}setLabel(t){t?this._labelElement?this._labelElement.textContent=t:this._createLabel(t):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,this._labelElement.slot="label",(e=this._config.options)!=null&&e.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_attachButton(t,e,n){return new F({options:{iconName:e,parent:t,attributes:{slot:n}}})}};function ft(){I(s)}export{i as a,v as b,b as c,s as d,M as e,ft as f};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{b as S}from"./chunk.LEN33O6V.js";import{d as N,e as F}from"./chunk.S2KPWTRW.js";import{k as d,z as m}from"./chunk.EWT2PBEP.js";import{d as h}from"./chunk.L7BSLZCB.js";import{a as A}from"./chunk.YTBNAGLS.js";import{a as C}from"./chunk.ZY3ETQ3D.js";import{a as E}from"./chunk.NVUMRW44.js";import{a as B,b as L}from"./chunk.UVXKHQQZ.js";import{a as I,e as T,f as c,k as D}from"./chunk.TPXXHX5J.js";import{k as f}from"./chunk.J2M2MXP2.js";import{a as _,b as x,d as p}from"./chunk.M3QDAYD2.js";var R=`${L}quantity-field`,q={INVALID:"invalid",REQUIRED:"required",DISABLED:"disabled"},O={ROOT:"forge-quantity-field",INVALID:"forge-quantity-field--invalid",REQUIRED:"forge-quantity-field--required"},a={INCREMENT_BUTTON:"increment-button",DECREMENT_BUTTON:"decrement-button",LABEL:"label",HELPER_TEXT:"helper-text"},w={ROOT:`.${O.ROOT}`,INCREMENT_BUTTON_SLOT:`slot[name=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON_SLOT:`slot[name=${a.DECREMENT_BUTTON}]`,INCREMENT_BUTTON:`[slot=${a.INCREMENT_BUTTON}], button[slot=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON:`[slot=${a.DECREMENT_BUTTON}], button[slot=${a.DECREMENT_BUTTON}]`,TEXT_FIELD:"forge-text-field",INPUT:"input[type=number]",LABEL:`[slot=${a.LABEL}]`,HELPER_TEXT:`[slot=${a.HELPER_TEXT}]`},i={elementName:R,classes:O,slots:a,selectors:w,attributes:q};var v=class extends C{constructor(t){super(t);this._rootElement=c(t,i.selectors.ROOT),this._incrementButtonSlot=c(this._component,i.selectors.INCREMENT_BUTTON_SLOT),this._decrementButtonSlot=c(this._component,i.selectors.DECREMENT_BUTTON_SLOT)}initializeButtons(){this._incrementButton&&!this._incrementButton.hasAttribute("tabindex")&&(this._incrementButton.tabIndex=-1),this._decrementButton&&!this._decrementButton.hasAttribute("tabindex")&&(this._decrementButton.tabIndex=-1)}addRootClass(t){this._rootElement.classList.add(t)}removeRootClass(t){this._rootElement.classList.remove(t)}inputHasAttribute(t){return this.inputElement?this.inputElement.hasAttribute(t):!1}addIncrementButtonSlotListener(t){this._incrementButtonSlot.addEventListener("slotchange",t)}removeIncrementButtonSlotListener(t){this._incrementButtonSlot&&this._incrementButtonSlot.removeEventListener("slotchange",t)}addDecrementButtonSlotListener(t){this._decrementButtonSlot.addEventListener("slotchange",t)}removeDecrementButtonSlotListener(t){this._decrementButtonSlot&&this._decrementButtonSlot.removeEventListener("slotchange",t)}addTextFieldAttribute(t,e=""){this._textFieldComponent&&this._textFieldComponent.setAttribute(t,e)}removeTextFieldAttribute(t){this._textFieldComponent&&this._textFieldComponent.removeAttribute(t)}addIncrementEventListener(t,e){this._incrementButtonElement.addEventListener(t,e)}removeIncrementEventListener(t,e){this._incrementButtonElement&&this._incrementButtonElement.removeEventListener(t,e)}addDecrementEventListener(t,e){this._decrementButtonElement.addEventListener(t,e)}removeDecrementEventListener(t,e){this._decrementButtonElement&&this._decrementButtonElement.removeEventListener(t,e)}addIncrementButtonAttribute(t,e=""){this._incrementButtonElement.setAttribute(t,e)}removeIncrementButtonAttribute(t){this._incrementButtonElement.removeAttribute(t)}addDecrementButtonAttribute(t,e=""){this._decrementButtonElement.setAttribute(t,e)}removeDecrementButtonAttribute(t){this._decrementButtonElement.removeAttribute(t)}increment(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e+this._inputStep).toFixed(n));this._inputMax&&this._inputMax<o&&(o=this._inputMax),this._setInputValue(o)}decrement(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e-this._inputStep).toFixed(n));this._inputMin&&this._inputMin>o&&(o=this._inputMin),this._setInputValue(o)}addInputDisabledAttributeChangeListener(t){this._setupInputDisabledAttributeMutationObserver(t)}removeInputDisabledAttributeChangeListener(){this._cleanupInputDisabledAttributeMutationObserver()}_setInputValue(t){this.inputElement&&(this.inputElement.value=`${t}`,this.inputElement.dispatchEvent(new Event("input")),this.inputElement.dispatchEvent(new Event("change")))}_isNullOrUndefinedOrEmpty(t){return t==null||t===""}_setupInputDisabledAttributeMutationObserver(t){if(!this.inputElement)return;this._cleanupInputDisabledAttributeMutationObserver();let e=o=>this._inputDisabledAttributeMutationCallback(o,t);this._inputAttributeMutationObserver=new MutationObserver(e);let n={attributes:!0,attributeOldValue:!0,attributeFilter:[i.attributes.DISABLED]};this._inputAttributeMutationObserver.observe(this.inputElement,n)}_cleanupInputDisabledAttributeMutationObserver(){this._inputAttributeMutationObserver&&(this._inputAttributeMutationObserver.disconnect(),delete this._inputAttributeMutationObserver)}_inputDisabledAttributeMutationCallback(t,e){for(let n of t)n.type!=="attributes"||!n.attributeName||n.attributeName!==i.attributes.DISABLED||n.target[n.attributeName]===n.oldValue||e()}get _incrementButtonElement(){return this._incrementButton||(this._incrementButton=this._component.querySelector(i.selectors.INCREMENT_BUTTON)),this._incrementButton}get _decrementButtonElement(){return this._decrementButton||(this._decrementButton=this._component.querySelector(i.selectors.DECREMENT_BUTTON)),this._decrementButton}get _textFieldComponent(){return this._textField||(this._textField=this._component.querySelector(i.selectors.TEXT_FIELD)),this._textField}get inputElement(){return this._inputElement||(this._inputElement=this._component.querySelector(i.selectors.INPUT)),this._inputElement}get _inputStep(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.step)?1:+t.step}get _inputMax(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.max)?null:+t.max}get _inputMin(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.min)?null:+t.min}_calcPrecision(t){let e=String(t);return e.includes(".")?e.split(".")[1].length:0}};var b=class{constructor(r){this._adapter=r;this._incrementValue=()=>this._adapter.increment(),this._decrementValue=()=>this._adapter.decrement(),this._incrementButtonSlotChanged=()=>this._onIncrementButtonSlotChanged(),this._decrementButtonSlotChanged=()=>this._onDecrementButtonSlotChanged(),this._adapter.addIncrementButtonSlotListener(this._incrementButtonSlotChanged),this._adapter.addDecrementButtonSlotListener(this._decrementButtonSlotChanged)}connect(){this._adapter.addInputDisabledAttributeChangeListener(()=>this._syncDisabledStateOfButtons()),this._syncDisabledStateOfButtons(),this._adapter.initializeButtons()}disconnect(){this._removeIncrementEventListener(),this._removeDecrementEventListener(),this._removeIncrementButtonSlotListener(),this._removeDecrementButtonSlotListener(),this._adapter.removeInputDisabledAttributeChangeListener()}_onIncrementButtonSlotChanged(){this._addIncrementEventListener()}_onDecrementButtonSlotChanged(){this._addDecrementEventListener()}_addIncrementEventListener(){this._adapter.addIncrementEventListener("click",this._incrementValue)}_addDecrementEventListener(){this._adapter.addDecrementEventListener("click",this._decrementValue)}_removeIncrementEventListener(){this._adapter.removeIncrementEventListener("click",this._incrementValue)}_removeDecrementEventListener(){this._adapter.removeDecrementEventListener("click",this._decrementValue)}_removeIncrementButtonSlotListener(){this._adapter.removeIncrementButtonSlotListener(this._incrementButtonSlotChanged)}_removeDecrementButtonSlotListener(){this._adapter.removeDecrementButtonSlotListener(this._decrementButtonSlotChanged)}_syncDisabledStateOfButtons(){this._adapter.inputHasAttribute(i.attributes.DISABLED)?(this._adapter.addDecrementButtonAttribute(i.attributes.DISABLED),this._adapter.addIncrementButtonAttribute(i.attributes.DISABLED)):(this._adapter.removeIncrementButtonAttribute(i.attributes.DISABLED),this._adapter.removeDecrementButtonAttribute(i.attributes.DISABLED))}get required(){return this._required}set required(r){this._required!==r&&(this._required=r,this._required?(this._adapter.setHostAttribute(i.attributes.REQUIRED),this._adapter.addRootClass(i.classes.REQUIRED)):(this._adapter.removeHostAttribute(i.attributes.REQUIRED),this._adapter.removeRootClass(i.classes.REQUIRED)))}get invalid(){return this._invalid}set invalid(r){this._invalid!==r&&(this._invalid=r,this._invalid?(this._adapter.setHostAttribute(i.attributes.INVALID),this._adapter.addRootClass(i.classes.INVALID),this._adapter.addTextFieldAttribute(i.attributes.INVALID)):(this._adapter.removeHostAttribute(i.attributes.INVALID),this._adapter.removeRootClass(i.classes.INVALID),this._adapter.removeTextFieldAttribute(i.attributes.INVALID)))}};var U='<template><div class="forge-quantity-field" part="root"><slot name="label"></slot><div class="forge-quantity-field__row" part="row"><slot name="decrement-button"></slot><slot></slot><slot name="increment-button"></slot></div><slot name="helper-text"></slot></div></template>',k='.forge-quantity-field ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.forge-quantity-field__row{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.forge-quantity-field ::slotted(forge-icon-button:first-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-right:4px}.forge-quantity-field ::slotted(forge-icon-button:last-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-left:4px}.forge-quantity-field ::slotted(forge-text-field){--forge-text-field-margin-top:0;--forge-text-field-margin-bottom:0}.forge-quantity-field--required ::slotted([slot=label])::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:"*";margin-right:4px}.forge-quantity-field--invalid ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}:host{display:inline-block}:host([hidden]){display:none}',s=class extends D{constructor(){super();T(this,U,k),this._foundation=new b(new v(this)),h.define([m,d])}static get observedAttributes(){return[i.attributes.INVALID,i.attributes.REQUIRED]}connectedCallback(){this._requiredElementsPresent()?this._foundation.connect():this._ensureElementsPresent().then(()=>{this._foundation.connect()})}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,e,n){switch(t){case i.attributes.INVALID:this.invalid=f(n);break;case i.attributes.REQUIRED:this.required=f(n);break}}_ensureElementsPresent(){return new Promise(t=>{if(this._requiredElementsPresent()){t();return}let e=new MutationObserver(n=>{n.reduce((l,u)=>l+u.addedNodes.length,0)>0&&this._requiredElementsPresent()&&(e.disconnect(),t())});e.observe(this,{childList:!0,subtree:!0})})}_requiredElementsPresent(){let t=this.querySelector(i.selectors.INPUT),e=this.querySelector(i.selectors.DECREMENT_BUTTON),n=this.querySelector(i.selectors.INCREMENT_BUTTON);return!!t&&!!e&&!!n}};p([E()],s.prototype,"invalid",2),p([E()],s.prototype,"required",2),s=p([B({name:i.elementName,dependencies:[N]})],s);var M=class extends A{constructor(t){super(t);h.define([m,d])}_build(){let t=document.createElement(i.elementName);return this._attachButton(t,m.name,"decrement-button"),this._attachTextField(t),this._attachButton(t,d.name,"increment-button"),t}_configure(){var t,e,n,o,l;this.inputElement.value=(e=(t=this._config.options)==null?void 0:t.value)!=null?e:"0",this.inputElement.style.textAlign="center",this.inputElement.style.width="64px",(n=this._config.options)!=null&&n.helperText&&this.setHelperText(this._config.options.helperText),typeof((o=this._config.options)==null?void 0:o.label)=="string"&&this._createLabel(this._config.options.label),((l=this._config.options)==null?void 0:l.step)!==void 0&&(this.inputElement.step=this._config.options.step)}get value(){return this._textFieldDelegate.inputElement.value}set value(t){this._textFieldDelegate.inputElement.value=t}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(t){this._textFieldDelegate.inputElement.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}get inputElement(){return this._textFieldDelegate.inputElement}get labelElement(){return this._labelElement}onChange(t){this._textFieldDelegate.inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var n,o,l,u,y;let e={props:_({},(o=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:o.props),options:x(_({},(u=(l=this._config.options)==null?void 0:l.textFieldDelegateConfig)==null?void 0:u.options),{id:(y=this._config.options)==null?void 0:y.id,type:"number"})};this._textFieldDelegate=new S(e),t.appendChild(this._textFieldDelegate.element)}setLabel(t){t?this._labelElement?this._labelElement.textContent=t:this._createLabel(t):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,this._labelElement.slot="label",(e=this._config.options)!=null&&e.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_attachButton(t,e,n){return new F({options:{iconName:e,parent:t,attributes:{slot:n}}})}};function ft(){I(s)}export{i as a,v as b,b as c,s as d,M as e,ft as f};
|
|
7
|
+
//# sourceMappingURL=chunk.O6WN2UP6.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{b as k,d as x}from"./chunk.OJHNLDNM.js";import{a as w,p as T}from"./chunk.FTADCSFT.js";import{l as v}from"./chunk.HPCXVNG6.js";import{a as y}from"./chunk.ZY3ETQ3D.js";import{a as n}from"./chunk.NVUMRW44.js";import{a as I,b as g}from"./chunk.UVXKHQQZ.js";import{a as A,e as L,f as m}from"./chunk.TPXXHX5J.js";import{v as E}from"./chunk.HZUQXCOQ.js";import{k as l,n as u}from"./chunk.J2M2MXP2.js";import{a as h,d as a}from"./chunk.M3QDAYD2.js";var R=`${g}list`,H={ROLE:"role",STATIC:"static",NON_INTERACTIVE:"non-interactive",DISABLED:"disabled",DENSE:"dense",PROPAGATE_CLICK:"propagate-click",SELECTED_VALUE:"selected-value",INDENTED:"indented",TWO_LINE:"two-line",THREE_LINE:"three-line",WRAP:"wrap"},O=h({},H),c={elementName:R,attributes:O},C={list:"listitem",listbox:"option",menu:"menuitem"};var N=`${g}list-item`,S={HREF:"href",TARGET:"target",DOWNLOAD:"download",REL:"rel",STATIC:"static",NON_INTERACTIVE:"non-interactive",DISABLED:"disabled",SELECTED:"selected",ACTIVE:"active",VALUE:"value",DENSE:"dense",PROPAGATE_CLICK:"propagate-click",INDENTED:"indented",TWO_LINE:"two-line",THREE_LINE:"three-line",WRAP:"wrap"},z=h({},S),D={ROOT:"forge-list-item"},P={ROOT:`.${D.ROOT}`,CHECKBOX_RADIO_SELECTOR:":is(input[type=checkbox], input[type=radio], forge-checkbox):not(:disabled):not([forge-ignore])",SWITCH_SELECTOR:"forge-switch:not([disabled]):not([forge-ignore])",IGNORE:"[forge-ignore],[data-forge-ignore]"},M={SELECT:`${N}-select`},i={elementName:N,observedAttributes:S,attributes:z,classes:D,selectors:P,events:M};var p=class extends y{constructor(t){super(t);this._rootElement=m(t,i.selectors.ROOT),this._focusIndicatorElement=m(t,k.elementName),this._stateLayerElement=m(t,w.elementName)}initialize(){let t=this._getParentList();t&&this._inheritParentListProps(t),this._rootElement.tabIndex=this._component.nonInteractive||this._component.disabled?-1:0,this._component.hasAttribute("role")||this._setRole(t)}setHref(t){if(t){if(this._rootElement.tagName!=="A"){let s=this._createAnchorRootElement();this._rootElement=v(this._rootElement,s)}this._rootElement.href=t}else if(this._rootElement.tagName==="A"){let s=this._createDefaultRootElement();this._rootElement=v(this._rootElement,s)}}setAnchorTarget(t){this._rootElement.tagName==="A"&&(this._rootElement.target=t)}setAnchorDownload(t){this._rootElement.tagName==="A"&&(this._rootElement.download=t)}setAnchorRel(t){this._rootElement.tagName==="A"&&(this._rootElement.rel=t)}setNonInteractive(t){this._rootElement.tabIndex=t?-1:0,t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setDisabled(t){this._rootElement.tabIndex=t?-1:0,E(this._component,t,"aria-disabled","true"),t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setActive(t){this._focusIndicatorElement.active=t}trySelect(t){let s=this._getParentList();if((s==null?void 0:s.selectedValue)===void 0)return null;let d=(Array.isArray(s.selectedValue)?s.selectedValue:[s.selectedValue]).some(_=>u(_,t));return this.tryToggleSelectionControl(d),d}tryToggleSelectionControl(t){let s=this._component.querySelector(i.selectors.CHECKBOX_RADIO_SELECTOR);if(s){let r=typeof t=="boolean",d=s.checked;s.checked=r?t:!s.checked,(!r||d!==t)&&s.dispatchEvent(new Event("change",{bubbles:!0}))}else{let r=this._component.querySelector(i.selectors.SWITCH_SELECTOR);if(!r)return;let d=typeof t=="boolean",_=r.on;r.on=d?t:!r.on,(!d||_!==t)&&r.dispatchEvent(new CustomEvent("forge-switch-change",{bubbles:!0,detail:r.on}))}}isFocused(){return this._component.matches(":focus")}setFocus(){this._rootElement.focus({preventScroll:!0})}animateStateLayer(){this._stateLayerElement.playAnimation()}clickAnchor(){this._rootElement.tagName==="A"&&this._rootElement.click()}clickHost(){HTMLElement.prototype.click.call(this._component)}_createAnchorRootElement(){let t=document.createElement("a");return t.classList.add(i.classes.ROOT),t.setAttribute("part","root"),this._component.href&&(t.href=this._component.href),this._component.target&&(t.target=this._component.target),this._component.download&&(t.download=this._component.download),this._component.rel&&(t.rel=this._component.rel),t}_createDefaultRootElement(){let t=document.createElement("div");return t.classList.add(i.classes.ROOT),t.setAttribute("part","root"),t.tabIndex=this._component.nonInteractive||this._component.disabled?-1:0,t}_getParentList(){return this._component.closest(c.elementName)}_inheritParentListProps(t){(t.hasAttribute(c.attributes.NON_INTERACTIVE)||t.hasAttribute(c.attributes.STATIC))&&(this._component.nonInteractive=!0),t.hasAttribute(c.attributes.DISABLED)&&(this._component.disabled=!0),t.hasAttribute(c.attributes.DENSE)&&(this._component.dense=!0),t.getAttribute(c.attributes.PROPAGATE_CLICK)==="false"&&(this._component.propagateClick=!1),t.hasAttribute(c.attributes.INDENTED)&&(this._component.indented=!0),t.hasAttribute(c.attributes.TWO_LINE)&&(this._component.twoLine=!0),t.hasAttribute(c.attributes.THREE_LINE)&&(this._component.threeLine=!0)}_setRole(t){var d;let s=t==null?void 0:t.getAttribute("role"),r=(d=C[s])!=null?d:"listitem";this._component.setAttribute("role",r)}};var b=class{constructor(e){this._adapter=e;this._target="";this._download="";this._rel="";this._nonInteractive=!1;this._disabled=!1;this._selected=!1;this._active=!1;this._dense=!1;this._propagateClick=!0;this._indented=!1;this._twoLine=!1;this._threeLine=!1;this._wrap=!1;this._clickListener=this._onClick.bind(this),this._pointerDownListener=this._onPointerDown.bind(this),this._keydownListener=this._onKeydown.bind(this)}initialize(){this._adapter.initialize(),!this._nonInteractive&&!this._disabled&&(this._adapter.addHostListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keydownListener),this._propagateClick||this._adapter.addHostListener("pointerdown",this._pointerDownListener))}disconnect(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeHostListener("pointerdown",this._pointerDownListener),this._adapter.removeHostListener("keydown",this._keydownListener)}setFocus(){this._adapter.setFocus()}click(){this._href?this._adapter.clickAnchor():this._adapter.clickHost()}_onPointerDown(e){this._adapter.isFocused()&&e.preventDefault()}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&(!this._href&&e.key===" "&&e.preventDefault(),this._adapter.animateStateLayer(),this._select(e.target))}_onClick(e){this._select(e.target)}_select(e){let t=e==null?void 0:e.matches(i.selectors.IGNORE);if(this._nonInteractive||this._disabled||t)return;!this._adapter.isFocused()&&this._propagateClick&&this.setFocus(),e.matches(i.selectors.CHECKBOX_RADIO_SELECTOR)||this._adapter.tryToggleSelectionControl();let s={value:this._value,listItem:this._adapter.hostElement};this._adapter.emitHostEvent(i.events.SELECT,s)}get href(){return this._href}set href(e){this._href!==e&&(this._href=e,this._adapter.setHref(this._href),this._adapter.toggleHostAttribute(i.attributes.HREF,!!this._href,this._href))}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this._href&&this._adapter.setAnchorTarget(this._target),this._adapter.toggleHostAttribute(i.attributes.TARGET,!!this._target,this._target))}get download(){return this._download}set download(e){this._download!==e&&(this._download=e,this._adapter.setAnchorDownload(this._download),this._adapter.toggleHostAttribute(i.attributes.DOWNLOAD,!!this._download,this._download))}get rel(){return this._rel}set rel(e){this._rel!==e&&(this._rel=e,this._adapter.setAnchorRel(this._rel),this._adapter.toggleHostAttribute(i.attributes.REL,!!this._rel,this._rel))}get static(){return this.nonInteractive}set static(e){this.nonInteractive=e}get nonInteractive(){return this._nonInteractive}set nonInteractive(e){this._nonInteractive!==e&&(this._nonInteractive=e,this._nonInteractive?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener),this._adapter.setNonInteractive(this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.STATIC,this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.NON_INTERACTIVE,this._nonInteractive))}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._disabled?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener),this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get selected(){return this._selected}set selected(e){this._selected!==e&&(this._selected=e,this._adapter.tryToggleSelectionControl(this._selected),this._adapter.toggleHostAttribute(i.attributes.SELECTED,this._selected))}get active(){return this._active}set active(e){this._active!==e&&(this._active=e,this._adapter.setActive(this._active),this._adapter.toggleHostAttribute(i.attributes.ACTIVE,this._active))}get value(){return this._value}set value(e){this._value=e;let t=this._adapter.trySelect(this._value);t!==null&&t!==this._selected&&(this.selected=t)}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.toggleHostAttribute(i.attributes.DENSE,this._dense))}get propagateClick(){return this._propagateClick}set propagateClick(e){this._propagateClick!==e&&(this._propagateClick=e,this._propagateClick?this._adapter.removeHostListener("pointerdown",this._pointerDownListener):this._adapter.addHostListener("pointerdown",this._pointerDownListener),this._adapter.setHostAttribute(i.attributes.PROPAGATE_CLICK,this._propagateClick?"true":"false"))}get indented(){return this._indented}set indented(e){this._indented!==e&&(this._indented=e,this._adapter.toggleHostAttribute(i.attributes.INDENTED,this._indented))}get twoLine(){return this._twoLine}set twoLine(e){this._twoLine!==e&&(this._twoLine=e,this._adapter.toggleHostAttribute(i.attributes.TWO_LINE,this._twoLine))}get threeLine(){return this._threeLine}set threeLine(e){this._threeLine!==e&&(this._threeLine=e,this._adapter.toggleHostAttribute(i.attributes.THREE_LINE,this._threeLine))}get wrap(){return this._wrap}set wrap(e){this._wrap!==e&&(this._wrap=e,this._adapter.toggleHostAttribute(i.attributes.WRAP,this._wrap))}};var F='<template><div class="forge-list-item" tabindex="0" part="root"><slot name="leading"></slot><slot name="avatar"></slot><div class="text-container" part="text-container"><slot></slot><slot name="title"></slot><slot name="primary-text"></slot><slot name="subtitle"></slot><slot name="secondary-text"></slot><slot name="tertiary-text"></slot><slot name="tertiary-title"></slot></div><slot name="trailing"></slot><forge-state-layer exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator part="focus-indicator" inward></forge-focus-indicator></div></template>',W=':host{--_list-item-indent:var(--forge-list-item-indent, 56px);--_list-item-dense-indent:var(--forge-list-item-dense-indent, 48px)}:host{display:block;outline:0}:host([hidden]){display:none}.forge-list-item{--_list-item-background-color:var(--forge-list-item-background-color, transparent);--_list-item-shape:var(--forge-list-item-shape, 0);--_list-item-padding:var(--forge-list-item-padding, 8px 16px);--_list-item-margin:var(--forge-list-item-margin, 0);--_list-item-height:var(--forge-list-item-height, 48px);--_list-item-dense-height:var(--forge-list-item-dense-height, 32px);--_list-item-cursor:var(--forge-list-item-cursor, pointer);--_list-item-supporting-text-color:var(--forge-list-item-supporting-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-supporting-text-font-size:var(--forge-list-item-supporting-text-font-size, var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1))));--_list-item-supporting-text-font-weight:var(--forge-list-item-supporting-text-font-weight, var(--forge-typography-body2-font-weight, 400));--_list-item-supporting-text-line-height:var(--forge-list-item-supporting-text-line-height, 1.5rem);--_list-item-selected-color:var(--forge-list-item-selected-color, var(--forge-theme-primary, #3f51b5));--_list-item-selected-opacity:var(--forge-list-item-selected-opacity, 0.08);--_list-item-selected-leading-color:var(--forge-list-item-selected-leading-color, var(--_list-item-selected-color));--_list-item-selected-trailing-color:var(--forge-list-item-selected-trailing-color, var(--_list-item-selected-color));--_list-item-selected-supporting-text-color:var(--forge-list-item-selected-supporting-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-disabled-opacity:var(--forge-list-item-disabled-opacity, 0.38);--_list-item-disabled-cursor:var(--forge-list-item-disabled-cursor, not-allowed);--_list-item-one-line-height:var(--forge-list-item-one-line-height, var(--_list-item-height));--_list-item-two-line-height:var(--forge-list-item-two-line-height, var(--forge-list-item-height, 72px));--_list-item-three-line-height:var(--forge-list-item-three-line-height, var(--forge-list-item-height, 88px));--_list-item-dense-one-line-height:var(--forge-list-item-dense-one-line-height, var(--_list-item-dense-height));--_list-item-dense-two-line-height:var(--forge-list-item-dense-two-line-height, var(--forge-list-item-dense-height, 56px));--_list-item-dense-three-line-height:var(--forge-list-item-dense-three-line-height, var(--forge-list-item-dense-height, 72px));--_list-item-dense-font-size:var(--forge-list-item-dense-font-size, 0.875rem);--_list-item-dense-leading-margin-end:var(--forge-list-item-dense-leading-margin-end, var(--forge-list-item-leading-margin-end, 24px));--_list-item-dense-trailing-margin-start:var(--forge-list-item-dense-trailing-margin-start, var(--forge-list-item-trailing-margin-start, 24px));--_list-item-leading-margin-start:var(--forge-list-item-leading-margin-start, 0);--_list-item-leading-margin-end:var(--forge-list-item-leading-margin-end, 32px);--_list-item-leading-selected-color:var(--forge-list-item-leading-selected-color, var(--_list-item-selected-color));--_list-item-trailing-margin-start:var(--forge-list-item-trailing-margin-start, 32px);--_list-item-trailing-margin-end:var(--forge-list-item-trailing-margin-end, 0);--_list-item-trailing-selected-color:var(--forge-list-item-trailing-selected-color, var(--_list-item-selected-color));--_list-item-avatar-background-color:var(--forge-list-item-avatar-background-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-avatar-color:var(--forge-list-item-avatar-color, var(--forge-theme-on-primary, #ffffff));--_list-item-avatar-shape:var(--forge-list-item-avatar-shape, var(--forge-shape-round, 50%));--_list-item-avatar-margin-start:var(--forge-list-item-avatar-margin-start, 0);--_list-item-avatar-margin-end:var(--forge-list-item-avatar-margin-end, 16px);--_list-item-avatar-size:var(--forge-list-item-avatar-size, 40px)}.forge-list-item{position:relative;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;text-decoration:none;background-color:var(--_list-item-background-color);border-radius:var(--_list-item-shape);-webkit-tap-highlight-color:transparent;height:var(--_list-item-height);min-height:var(--_list-item-height);padding:var(--_list-item-padding);margin:var(--_list-item-margin);cursor:var(--_list-item-cursor)}:host([non-interactive]) .forge-list-item{cursor:initial}:host([disabled]) .forge-list-item{cursor:var(--_list-item-disabled-cursor);opacity:var(--_list-item-disabled-opacity)}:host([two-line]) .forge-list-item{height:var(--_list-item-two-line-height);min-height:var(--_list-item-two-line-height)}:host([three-line]) .forge-list-item{height:var(--_list-item-three-line-height);min-height:var(--_list-item-three-line-height)}:host([dense]) .forge-list-item{height:var(--_list-item-dense-one-line-height);min-height:var(--_list-item-dense-one-line-height)}:host([dense]) .text-container{font-size:var(--_list-item-dense-font-size)}:host([dense][indented]){-webkit-margin-start:var(--_list-item-dense-indent);margin-inline-start:var(--_list-item-dense-indent)}:host([dense][two-line]) .forge-list-item{height:var(--_list-item-dense-two-line-height);min-height:var(--_list-item-dense-two-line-height)}:host([dense][three-line]) .forge-list-item{height:var(--_list-item-dense-three-line-height);min-height:var(--_list-item-dense-three-line-height)}:host([selected]) .forge-list-item{color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item::before{content:"";position:absolute;inset:0;border-radius:inherit;opacity:var(--_list-item-selected-opacity);background-color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=leading]),:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=leading]){color:var(--_list-item-leading-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-trailing-selected-color)}:host([selected]) .text-container{color:var(--_list-item-selected-color)}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_list-item-selected-color)}:host([indented]){-webkit-margin-start:var(--_list-item-indent);margin-inline-start:var(--_list-item-indent)}a.forge-list-item{color:inherit}.text-container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body2-text-decoration,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:var(--_list-item-supporting-text-font-size);font-weight:var(--_list-item-supporting-text-font-weight);line-height:var(--_list-item-supporting-text-line-height);-webkit-box-flex:1;flex:1}slot[name=secondary-text]::slotted(*),slot[name=subtitle]::slotted(*),slot[name=tertiary-text]::slotted(*),slot[name=tertiary-title]::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body1-text-decoration,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--_list-item-supporting-text-color);display:block}:host([selected]) slot[name=secondary-text]::slotted(*),:host([selected]) slot[name=subtitle]::slotted(*),:host([selected]) slot[name=tertiary-text]::slotted(*),:host([selected]) slot[name=tertiary-title]::slotted(*){color:var(--_list-item-selected-supporting-text-color)}::slotted([slot=avatar]){background-color:var(--_list-item-avatar-background-color);color:var(--_list-item-avatar-color);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor;-webkit-margin-start:var(--_list-item-avatar-margin-start);margin-inline-start:var(--_list-item-avatar-margin-start);-webkit-margin-end:var(--_list-item-avatar-margin-end);margin-inline-end:var(--_list-item-avatar-margin-end);min-width:var(--_list-item-avatar-size);min-height:var(--_list-item-avatar-size);border-radius:var(--_list-item-avatar-shape)}::slotted([slot=leading]),::slotted([slot=trailing]){color:var(--_list-item-supporting-text-color);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor}::slotted([slot=leading]){-webkit-margin-start:var(--_list-item-leading-margin-start);margin-inline-start:var(--_list-item-leading-margin-start);-webkit-margin-end:var(--_list-item-leading-margin-end);margin-inline-end:var(--_list-item-leading-margin-end)}:host([selected]) ::slotted([slot=leading]){color:var(--_list-item-leading-selected-color)}:host([dense]) ::slotted([slot=leading]){-webkit-margin-end:var(--_list-item-dense-leading-margin-end);margin-inline-end:var(--_list-item-dense-leading-margin-end)}::slotted([slot=trailing]){-webkit-margin-start:var(--_list-item-trailing-margin-start);margin-inline-start:var(--_list-item-trailing-margin-start);-webkit-margin-end:var(--_list-item-trailing-margin-end);margin-inline-end:var(--_list-item-trailing-margin-end)}:host([selected]) ::slotted([slot=trailing]){color:var(--_list-item-trailing-selected-color)}:host([dense]) ::slotted([slot=trailing]){-webkit-margin-start:var(--_list-item-dense-trailing-margin-start);margin-inline-start:var(--_list-item-dense-trailing-margin-start)}:host([wrap]) .forge-list-item{height:auto}:host([wrap]) .text-container{white-space:normal;overflow:visible;text-overflow:clip}:host([wrap]) slot[name=secondary-text]::slotted(*),:host([wrap]) slot[name=subtitle]::slotted(*),:host([wrap]) slot[name=tertiary-text]::slotted(*),:host([wrap]) slot[name=tertiary-title]::slotted(*){white-space:normal;overflow:visible;text-overflow:clip}forge-focus-indicator{z-index:1;--forge-focus-indicator-shape:var(--forge-shape-medium, 4px)}forge-state-layer{border-radius:inherit}',o=class extends HTMLElement{constructor(){super();L(this,F,W),this._foundation=new b(new p(this))}static get observedAttributes(){return[i.observedAttributes.HREF,i.observedAttributes.TARGET,i.observedAttributes.DOWNLOAD,i.observedAttributes.REL,i.observedAttributes.STATIC,i.observedAttributes.NON_INTERACTIVE,i.observedAttributes.DISABLED,i.observedAttributes.SELECTED,i.observedAttributes.ACTIVE,i.observedAttributes.VALUE,i.observedAttributes.DENSE,i.observedAttributes.PROPAGATE_CLICK,i.observedAttributes.INDENTED,i.observedAttributes.TWO_LINE,i.observedAttributes.THREE_LINE,i.observedAttributes.WRAP]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,s,r){switch(t){case i.observedAttributes.HREF:this.href=r;break;case i.observedAttributes.TARGET:this.target=r;break;case i.observedAttributes.DOWNLOAD:this.download=r;break;case i.observedAttributes.REL:this.rel=r;break;case i.observedAttributes.NON_INTERACTIVE:case i.observedAttributes.STATIC:this.nonInteractive=l(r);break;case i.observedAttributes.DISABLED:this.disabled=l(r);break;case i.observedAttributes.SELECTED:this.selected=l(r);break;case i.observedAttributes.ACTIVE:this.active=l(r);break;case i.observedAttributes.VALUE:this.value=r;break;case i.observedAttributes.DENSE:this.dense=l(r);break;case i.observedAttributes.PROPAGATE_CLICK:this.propagateClick=l(r);break;case i.observedAttributes.INDENTED:this.indented=l(r);break;case i.observedAttributes.TWO_LINE:this.twoLine=l(r);break;case i.observedAttributes.THREE_LINE:this.threeLine=l(r);break;case i.observedAttributes.WRAP:this.wrap=l(r);break}}focus(){this._foundation.setFocus()}click(){this._foundation.click()}};a([n()],o.prototype,"href",2),a([n()],o.prototype,"target",2),a([n()],o.prototype,"download",2),a([n()],o.prototype,"rel",2),a([n()],o.prototype,"static",2),a([n()],o.prototype,"nonInteractive",2),a([n()],o.prototype,"disabled",2),a([n()],o.prototype,"selected",2),a([n()],o.prototype,"active",2),a([n()],o.prototype,"value",2),a([n()],o.prototype,"dense",2),a([n()],o.prototype,"propagateClick",2),a([n()],o.prototype,"indented",2),a([n()],o.prototype,"twoLine",2),a([n()],o.prototype,"threeLine",2),a([n()],o.prototype,"wrap",2),o=a([I({name:i.elementName,dependencies:[T,x]})],o);function ut(){A(o)}export{i as a,c as b,C as c,p as d,b as e,o as f,ut as g};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{b as k,d as x}from"./chunk.F3FWXBDS.js";import{a as w,p as T}from"./chunk.KIQZLNDG.js";import{l as v}from"./chunk.4SP42UG3.js";import{a as y}from"./chunk.ZY3ETQ3D.js";import{a as n}from"./chunk.NVUMRW44.js";import{a as I,b as g}from"./chunk.UVXKHQQZ.js";import{a as A,e as L,f as m}from"./chunk.TPXXHX5J.js";import{v as E}from"./chunk.HZUQXCOQ.js";import{k as l,n as u}from"./chunk.J2M2MXP2.js";import{a as h,d as a}from"./chunk.M3QDAYD2.js";var R=`${g}list`,H={ROLE:"role",STATIC:"static",NON_INTERACTIVE:"non-interactive",DISABLED:"disabled",DENSE:"dense",PROPAGATE_CLICK:"propagate-click",SELECTED_VALUE:"selected-value",INDENTED:"indented",TWO_LINE:"two-line",THREE_LINE:"three-line",WRAP:"wrap"},O=h({},H),c={elementName:R,attributes:O},C={list:"listitem",listbox:"option",menu:"menuitem"};var N=`${g}list-item`,S={HREF:"href",TARGET:"target",DOWNLOAD:"download",REL:"rel",STATIC:"static",NON_INTERACTIVE:"non-interactive",DISABLED:"disabled",SELECTED:"selected",ACTIVE:"active",VALUE:"value",DENSE:"dense",PROPAGATE_CLICK:"propagate-click",INDENTED:"indented",TWO_LINE:"two-line",THREE_LINE:"three-line",WRAP:"wrap"},z=h({},S),D={ROOT:"forge-list-item"},P={ROOT:`.${D.ROOT}`,CHECKBOX_RADIO_SELECTOR:":is(input[type=checkbox], input[type=radio], forge-checkbox):not(:disabled):not([forge-ignore])",SWITCH_SELECTOR:"forge-switch:not([disabled]):not([forge-ignore])",IGNORE:"[forge-ignore],[data-forge-ignore]"},M={SELECT:`${N}-select`},i={elementName:N,observedAttributes:S,attributes:z,classes:D,selectors:P,events:M};var p=class extends y{constructor(t){super(t);this._rootElement=m(t,i.selectors.ROOT),this._focusIndicatorElement=m(t,k.elementName),this._stateLayerElement=m(t,w.elementName)}initialize(){let t=this._getParentList();t&&this._inheritParentListProps(t),this._rootElement.tabIndex=this._component.nonInteractive||this._component.disabled?-1:0,this._component.hasAttribute("role")||this._setRole(t)}setHref(t){if(t){if(this._rootElement.tagName!=="A"){let s=this._createAnchorRootElement();this._rootElement=v(this._rootElement,s)}this._rootElement.href=t}else if(this._rootElement.tagName==="A"){let s=this._createDefaultRootElement();this._rootElement=v(this._rootElement,s)}}setAnchorTarget(t){this._rootElement.tagName==="A"&&(this._rootElement.target=t)}setAnchorDownload(t){this._rootElement.tagName==="A"&&(this._rootElement.download=t)}setAnchorRel(t){this._rootElement.tagName==="A"&&(this._rootElement.rel=t)}setNonInteractive(t){this._rootElement.tabIndex=t?-1:0,t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setDisabled(t){this._rootElement.tabIndex=t?-1:0,E(this._component,t,"aria-disabled","true"),t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setActive(t){this._focusIndicatorElement.active=t}trySelect(t){let s=this._getParentList();if((s==null?void 0:s.selectedValue)===void 0)return null;let d=(Array.isArray(s.selectedValue)?s.selectedValue:[s.selectedValue]).some(_=>u(_,t));return this.tryToggleSelectionControl(d),d}tryToggleSelectionControl(t){let s=this._component.querySelector(i.selectors.CHECKBOX_RADIO_SELECTOR);if(s){let r=typeof t=="boolean",d=s.checked;s.checked=r?t:!s.checked,(!r||d!==t)&&s.dispatchEvent(new Event("change",{bubbles:!0}))}else{let r=this._component.querySelector(i.selectors.SWITCH_SELECTOR);if(!r)return;let d=typeof t=="boolean",_=r.on;r.on=d?t:!r.on,(!d||_!==t)&&r.dispatchEvent(new CustomEvent("forge-switch-change",{bubbles:!0,detail:r.on}))}}isFocused(){return this._component.matches(":focus")}setFocus(){this._rootElement.focus({preventScroll:!0})}animateStateLayer(){this._stateLayerElement.playAnimation()}clickAnchor(){this._rootElement.tagName==="A"&&this._rootElement.click()}clickHost(){HTMLElement.prototype.click.call(this._component)}_createAnchorRootElement(){let t=document.createElement("a");return t.classList.add(i.classes.ROOT),t.setAttribute("part","root"),this._component.href&&(t.href=this._component.href),this._component.target&&(t.target=this._component.target),this._component.download&&(t.download=this._component.download),this._component.rel&&(t.rel=this._component.rel),t}_createDefaultRootElement(){let t=document.createElement("div");return t.classList.add(i.classes.ROOT),t.setAttribute("part","root"),t.tabIndex=this._component.nonInteractive||this._component.disabled?-1:0,t}_getParentList(){return this._component.closest(c.elementName)}_inheritParentListProps(t){(t.hasAttribute(c.attributes.NON_INTERACTIVE)||t.hasAttribute(c.attributes.STATIC))&&(this._component.nonInteractive=!0),t.hasAttribute(c.attributes.DISABLED)&&(this._component.disabled=!0),t.hasAttribute(c.attributes.DENSE)&&(this._component.dense=!0),t.getAttribute(c.attributes.PROPAGATE_CLICK)==="false"&&(this._component.propagateClick=!1),t.hasAttribute(c.attributes.INDENTED)&&(this._component.indented=!0),t.hasAttribute(c.attributes.TWO_LINE)&&(this._component.twoLine=!0),t.hasAttribute(c.attributes.THREE_LINE)&&(this._component.threeLine=!0)}_setRole(t){var d;let s=t==null?void 0:t.getAttribute("role"),r=(d=C[s])!=null?d:"listitem";this._component.setAttribute("role",r)}};var b=class{constructor(e){this._adapter=e;this._target="";this._download="";this._rel="";this._nonInteractive=!1;this._disabled=!1;this._selected=!1;this._active=!1;this._dense=!1;this._propagateClick=!0;this._indented=!1;this._twoLine=!1;this._threeLine=!1;this._wrap=!1;this._clickListener=this._onClick.bind(this),this._pointerDownListener=this._onPointerDown.bind(this),this._keydownListener=this._onKeydown.bind(this)}initialize(){this._adapter.initialize(),!this._nonInteractive&&!this._disabled&&(this._adapter.addHostListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keydownListener),this._propagateClick||this._adapter.addHostListener("pointerdown",this._pointerDownListener))}disconnect(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeHostListener("pointerdown",this._pointerDownListener),this._adapter.removeHostListener("keydown",this._keydownListener)}setFocus(){this._adapter.setFocus()}click(){this._href?this._adapter.clickAnchor():this._adapter.clickHost()}_onPointerDown(e){this._adapter.isFocused()&&e.preventDefault()}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&(!this._href&&e.key===" "&&e.preventDefault(),this._adapter.animateStateLayer(),this._select(e.target))}_onClick(e){this._select(e.target)}_select(e){let t=e==null?void 0:e.matches(i.selectors.IGNORE);if(this._nonInteractive||this._disabled||t)return;!this._adapter.isFocused()&&this._propagateClick&&this.setFocus(),e.matches(i.selectors.CHECKBOX_RADIO_SELECTOR)||this._adapter.tryToggleSelectionControl();let s={value:this._value,listItem:this._adapter.hostElement};this._adapter.emitHostEvent(i.events.SELECT,s)}get href(){return this._href}set href(e){this._href!==e&&(this._href=e,this._adapter.setHref(this._href),this._adapter.toggleHostAttribute(i.attributes.HREF,!!this._href,this._href))}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this._href&&this._adapter.setAnchorTarget(this._target),this._adapter.toggleHostAttribute(i.attributes.TARGET,!!this._target,this._target))}get download(){return this._download}set download(e){this._download!==e&&(this._download=e,this._adapter.setAnchorDownload(this._download),this._adapter.toggleHostAttribute(i.attributes.DOWNLOAD,!!this._download,this._download))}get rel(){return this._rel}set rel(e){this._rel!==e&&(this._rel=e,this._adapter.setAnchorRel(this._rel),this._adapter.toggleHostAttribute(i.attributes.REL,!!this._rel,this._rel))}get static(){return this.nonInteractive}set static(e){this.nonInteractive=e}get nonInteractive(){return this._nonInteractive}set nonInteractive(e){this._nonInteractive!==e&&(this._nonInteractive=e,this._nonInteractive?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener),this._adapter.setNonInteractive(this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.STATIC,this._nonInteractive),this._adapter.toggleHostAttribute(i.attributes.NON_INTERACTIVE,this._nonInteractive))}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._disabled?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener),this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get selected(){return this._selected}set selected(e){this._selected!==e&&(this._selected=e,this._adapter.tryToggleSelectionControl(this._selected),this._adapter.toggleHostAttribute(i.attributes.SELECTED,this._selected))}get active(){return this._active}set active(e){this._active!==e&&(this._active=e,this._adapter.setActive(this._active),this._adapter.toggleHostAttribute(i.attributes.ACTIVE,this._active))}get value(){return this._value}set value(e){this._value=e;let t=this._adapter.trySelect(this._value);t!==null&&t!==this._selected&&(this.selected=t)}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.toggleHostAttribute(i.attributes.DENSE,this._dense))}get propagateClick(){return this._propagateClick}set propagateClick(e){this._propagateClick!==e&&(this._propagateClick=e,this._propagateClick?this._adapter.removeHostListener("pointerdown",this._pointerDownListener):this._adapter.addHostListener("pointerdown",this._pointerDownListener),this._adapter.setHostAttribute(i.attributes.PROPAGATE_CLICK,this._propagateClick?"true":"false"))}get indented(){return this._indented}set indented(e){this._indented!==e&&(this._indented=e,this._adapter.toggleHostAttribute(i.attributes.INDENTED,this._indented))}get twoLine(){return this._twoLine}set twoLine(e){this._twoLine!==e&&(this._twoLine=e,this._adapter.toggleHostAttribute(i.attributes.TWO_LINE,this._twoLine))}get threeLine(){return this._threeLine}set threeLine(e){this._threeLine!==e&&(this._threeLine=e,this._adapter.toggleHostAttribute(i.attributes.THREE_LINE,this._threeLine))}get wrap(){return this._wrap}set wrap(e){this._wrap!==e&&(this._wrap=e,this._adapter.toggleHostAttribute(i.attributes.WRAP,this._wrap))}};var F='<template><div class="forge-list-item" tabindex="0" part="root"><slot name="leading"></slot><slot name="avatar"></slot><div class="text-container" part="text-container"><slot></slot><slot name="title"></slot><slot name="primary-text"></slot><slot name="subtitle"></slot><slot name="secondary-text"></slot><slot name="tertiary-text"></slot><slot name="tertiary-title"></slot></div><slot name="trailing"></slot><forge-state-layer exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator part="focus-indicator" inward></forge-focus-indicator></div></template>',W=':host{--_list-item-indent:var(--forge-list-item-indent, 56px);--_list-item-dense-indent:var(--forge-list-item-dense-indent, 48px)}:host{display:block;outline:0}:host([hidden]){display:none}.forge-list-item{--_list-item-background-color:var(--forge-list-item-background-color, transparent);--_list-item-shape:var(--forge-list-item-shape, 0);--_list-item-padding:var(--forge-list-item-padding, 8px 16px);--_list-item-margin:var(--forge-list-item-margin, 0);--_list-item-height:var(--forge-list-item-height, 48px);--_list-item-dense-height:var(--forge-list-item-dense-height, 32px);--_list-item-cursor:var(--forge-list-item-cursor, pointer);--_list-item-supporting-text-color:var(--forge-list-item-supporting-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-supporting-text-font-size:var(--forge-list-item-supporting-text-font-size, var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1))));--_list-item-supporting-text-font-weight:var(--forge-list-item-supporting-text-font-weight, var(--forge-typography-body2-font-weight, 400));--_list-item-supporting-text-line-height:var(--forge-list-item-supporting-text-line-height, 1.5rem);--_list-item-selected-color:var(--forge-list-item-selected-color, var(--forge-theme-primary, #3f51b5));--_list-item-selected-opacity:var(--forge-list-item-selected-opacity, 0.08);--_list-item-selected-leading-color:var(--forge-list-item-selected-leading-color, var(--_list-item-selected-color));--_list-item-selected-trailing-color:var(--forge-list-item-selected-trailing-color, var(--_list-item-selected-color));--_list-item-selected-supporting-text-color:var(--forge-list-item-selected-supporting-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-disabled-opacity:var(--forge-list-item-disabled-opacity, 0.38);--_list-item-disabled-cursor:var(--forge-list-item-disabled-cursor, not-allowed);--_list-item-one-line-height:var(--forge-list-item-one-line-height, var(--_list-item-height));--_list-item-two-line-height:var(--forge-list-item-two-line-height, var(--forge-list-item-height, 72px));--_list-item-three-line-height:var(--forge-list-item-three-line-height, var(--forge-list-item-height, 88px));--_list-item-dense-one-line-height:var(--forge-list-item-dense-one-line-height, var(--_list-item-dense-height));--_list-item-dense-two-line-height:var(--forge-list-item-dense-two-line-height, var(--forge-list-item-dense-height, 56px));--_list-item-dense-three-line-height:var(--forge-list-item-dense-three-line-height, var(--forge-list-item-dense-height, 72px));--_list-item-dense-font-size:var(--forge-list-item-dense-font-size, 0.875rem);--_list-item-dense-leading-margin-end:var(--forge-list-item-dense-leading-margin-end, var(--forge-list-item-leading-margin-end, 24px));--_list-item-dense-trailing-margin-start:var(--forge-list-item-dense-trailing-margin-start, var(--forge-list-item-trailing-margin-start, 24px));--_list-item-leading-margin-start:var(--forge-list-item-leading-margin-start, 0);--_list-item-leading-margin-end:var(--forge-list-item-leading-margin-end, 32px);--_list-item-leading-selected-color:var(--forge-list-item-leading-selected-color, var(--_list-item-selected-color));--_list-item-trailing-margin-start:var(--forge-list-item-trailing-margin-start, 32px);--_list-item-trailing-margin-end:var(--forge-list-item-trailing-margin-end, 0);--_list-item-trailing-selected-color:var(--forge-list-item-trailing-selected-color, var(--_list-item-selected-color));--_list-item-avatar-background-color:var(--forge-list-item-avatar-background-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-avatar-color:var(--forge-list-item-avatar-color, var(--forge-theme-on-primary, #ffffff));--_list-item-avatar-shape:var(--forge-list-item-avatar-shape, var(--forge-shape-round, 50%));--_list-item-avatar-margin-start:var(--forge-list-item-avatar-margin-start, 0);--_list-item-avatar-margin-end:var(--forge-list-item-avatar-margin-end, 16px);--_list-item-avatar-size:var(--forge-list-item-avatar-size, 40px)}.forge-list-item{position:relative;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;text-decoration:none;background-color:var(--_list-item-background-color);border-radius:var(--_list-item-shape);-webkit-tap-highlight-color:transparent;height:var(--_list-item-height);min-height:var(--_list-item-height);padding:var(--_list-item-padding);margin:var(--_list-item-margin);cursor:var(--_list-item-cursor)}:host([non-interactive]) .forge-list-item{cursor:initial}:host([disabled]) .forge-list-item{cursor:var(--_list-item-disabled-cursor);opacity:var(--_list-item-disabled-opacity)}:host([two-line]) .forge-list-item{height:var(--_list-item-two-line-height);min-height:var(--_list-item-two-line-height)}:host([three-line]) .forge-list-item{height:var(--_list-item-three-line-height);min-height:var(--_list-item-three-line-height)}:host([dense]) .forge-list-item{height:var(--_list-item-dense-one-line-height);min-height:var(--_list-item-dense-one-line-height)}:host([dense]) .text-container{font-size:var(--_list-item-dense-font-size)}:host([dense][indented]){-webkit-margin-start:var(--_list-item-dense-indent);margin-inline-start:var(--_list-item-dense-indent)}:host([dense][two-line]) .forge-list-item{height:var(--_list-item-dense-two-line-height);min-height:var(--_list-item-dense-two-line-height)}:host([dense][three-line]) .forge-list-item{height:var(--_list-item-dense-three-line-height);min-height:var(--_list-item-dense-three-line-height)}:host([selected]) .forge-list-item{color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item::before{content:"";position:absolute;inset:0;border-radius:inherit;opacity:var(--_list-item-selected-opacity);background-color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=leading]),:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=leading]){color:var(--_list-item-leading-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-trailing-selected-color)}:host([selected]) .text-container{color:var(--_list-item-selected-color)}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_list-item-selected-color)}:host([indented]){-webkit-margin-start:var(--_list-item-indent);margin-inline-start:var(--_list-item-indent)}a.forge-list-item{color:inherit}.text-container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body2-text-decoration,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:var(--_list-item-supporting-text-font-size);font-weight:var(--_list-item-supporting-text-font-weight);line-height:var(--_list-item-supporting-text-line-height);-webkit-box-flex:1;flex:1}slot[name=secondary-text]::slotted(*),slot[name=subtitle]::slotted(*),slot[name=tertiary-text]::slotted(*),slot[name=tertiary-title]::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body1-text-decoration,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--_list-item-supporting-text-color);display:block}:host([selected]) slot[name=secondary-text]::slotted(*),:host([selected]) slot[name=subtitle]::slotted(*),:host([selected]) slot[name=tertiary-text]::slotted(*),:host([selected]) slot[name=tertiary-title]::slotted(*){color:var(--_list-item-selected-supporting-text-color)}::slotted([slot=avatar]){background-color:var(--_list-item-avatar-background-color);color:var(--_list-item-avatar-color);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor;-webkit-margin-start:var(--_list-item-avatar-margin-start);margin-inline-start:var(--_list-item-avatar-margin-start);-webkit-margin-end:var(--_list-item-avatar-margin-end);margin-inline-end:var(--_list-item-avatar-margin-end);min-width:var(--_list-item-avatar-size);min-height:var(--_list-item-avatar-size);border-radius:var(--_list-item-avatar-shape)}::slotted([slot=leading]),::slotted([slot=trailing]){color:var(--_list-item-supporting-text-color);display:-webkit-inline-box;display:inline-flex;flex-shrink:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;fill:currentColor}::slotted([slot=leading]){-webkit-margin-start:var(--_list-item-leading-margin-start);margin-inline-start:var(--_list-item-leading-margin-start);-webkit-margin-end:var(--_list-item-leading-margin-end);margin-inline-end:var(--_list-item-leading-margin-end)}:host([selected]) ::slotted([slot=leading]){color:var(--_list-item-leading-selected-color)}:host([dense]) ::slotted([slot=leading]){-webkit-margin-end:var(--_list-item-dense-leading-margin-end);margin-inline-end:var(--_list-item-dense-leading-margin-end)}::slotted([slot=trailing]){-webkit-margin-start:var(--_list-item-trailing-margin-start);margin-inline-start:var(--_list-item-trailing-margin-start);-webkit-margin-end:var(--_list-item-trailing-margin-end);margin-inline-end:var(--_list-item-trailing-margin-end)}:host([selected]) ::slotted([slot=trailing]){color:var(--_list-item-trailing-selected-color)}:host([dense]) ::slotted([slot=trailing]){-webkit-margin-start:var(--_list-item-dense-trailing-margin-start);margin-inline-start:var(--_list-item-dense-trailing-margin-start)}:host([wrap]) .forge-list-item{height:auto}:host([wrap]) .text-container{white-space:normal;overflow:visible;text-overflow:clip}:host([wrap]) slot[name=secondary-text]::slotted(*),:host([wrap]) slot[name=subtitle]::slotted(*),:host([wrap]) slot[name=tertiary-text]::slotted(*),:host([wrap]) slot[name=tertiary-title]::slotted(*){white-space:normal;overflow:visible;text-overflow:clip}forge-focus-indicator{z-index:1;--forge-focus-indicator-shape:var(--forge-shape-medium, 4px)}forge-state-layer{border-radius:inherit}',o=class extends HTMLElement{constructor(){super();L(this,F,W),this._foundation=new b(new p(this))}static get observedAttributes(){return[i.observedAttributes.HREF,i.observedAttributes.TARGET,i.observedAttributes.DOWNLOAD,i.observedAttributes.REL,i.observedAttributes.STATIC,i.observedAttributes.NON_INTERACTIVE,i.observedAttributes.DISABLED,i.observedAttributes.SELECTED,i.observedAttributes.ACTIVE,i.observedAttributes.VALUE,i.observedAttributes.DENSE,i.observedAttributes.PROPAGATE_CLICK,i.observedAttributes.INDENTED,i.observedAttributes.TWO_LINE,i.observedAttributes.THREE_LINE,i.observedAttributes.WRAP]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,s,r){switch(t){case i.observedAttributes.HREF:this.href=r;break;case i.observedAttributes.TARGET:this.target=r;break;case i.observedAttributes.DOWNLOAD:this.download=r;break;case i.observedAttributes.REL:this.rel=r;break;case i.observedAttributes.NON_INTERACTIVE:case i.observedAttributes.STATIC:this.nonInteractive=l(r);break;case i.observedAttributes.DISABLED:this.disabled=l(r);break;case i.observedAttributes.SELECTED:this.selected=l(r);break;case i.observedAttributes.ACTIVE:this.active=l(r);break;case i.observedAttributes.VALUE:this.value=r;break;case i.observedAttributes.DENSE:this.dense=l(r);break;case i.observedAttributes.PROPAGATE_CLICK:this.propagateClick=l(r);break;case i.observedAttributes.INDENTED:this.indented=l(r);break;case i.observedAttributes.TWO_LINE:this.twoLine=l(r);break;case i.observedAttributes.THREE_LINE:this.threeLine=l(r);break;case i.observedAttributes.WRAP:this.wrap=l(r);break}}focus(){this._foundation.setFocus()}click(){this._foundation.click()}};a([n()],o.prototype,"href",2),a([n()],o.prototype,"target",2),a([n()],o.prototype,"download",2),a([n()],o.prototype,"rel",2),a([n()],o.prototype,"static",2),a([n()],o.prototype,"nonInteractive",2),a([n()],o.prototype,"disabled",2),a([n()],o.prototype,"selected",2),a([n()],o.prototype,"active",2),a([n()],o.prototype,"value",2),a([n()],o.prototype,"dense",2),a([n()],o.prototype,"propagateClick",2),a([n()],o.prototype,"indented",2),a([n()],o.prototype,"twoLine",2),a([n()],o.prototype,"threeLine",2),a([n()],o.prototype,"wrap",2),o=a([I({name:i.elementName,dependencies:[T,x]})],o);function ut(){A(o)}export{i as a,c as b,C as c,p as d,b as e,o as f,ut as g};
|
|
7
|
+
//# sourceMappingURL=chunk.OWYOZF53.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 l,b as y}from"./chunk.F2327OUE.js";import{c as w}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as l,b as y}from"./chunk.F2327OUE.js";import{c as w}from"./chunk.YGXXWF52.js";import{a as E,d as v}from"./chunk.S2KPWTRW.js";import{y as T}from"./chunk.EWT2PBEP.js";import{a as C,d as A,l as O}from"./chunk.L7BSLZCB.js";import{m as N}from"./chunk.QG5EYBS3.js";import{a as B}from"./chunk.ZY3ETQ3D.js";import{a as s}from"./chunk.NVUMRW44.js";import{a as g,b as I}from"./chunk.UVXKHQQZ.js";import{a as u,d as _,g as a,k as f}from"./chunk.TPXXHX5J.js";import{v as b}from"./chunk.HZUQXCOQ.js";import{k as c}from"./chunk.J2M2MXP2.js";import{d as r}from"./chunk.M3QDAYD2.js";var S=`${I}app-bar-notification-button`,x={COUNT:"count",DOT:"dot",THEME:"theme",SHOW_BADGE:"show-badge",ICON:"icon"},H=["aria-label","aria-labelledby"],e={elementName:S,attributes:x,forwardedAttributes:H};var d=class extends B{constructor(i){super(i)}setIcon(i){this._iconElement.name=i}initialize(){this._iconButtonElement=a(this._component,E.elementName),this._badgeElement=a(this._component,l.elementName),this._iconElement=a(this._component,C.elementName);let i=this._iconButtonElement.getAttribute("aria-labelledby");this._forwardObserver=N(this._component,e.forwardedAttributes,(m,o)=>{m==="aria-labelledby"&&!o&&(o=i),b(this._iconButtonElement,!!o,m,o!=null?o:void 0)})}destroy(){var i;(i=this._forwardObserver)==null||i.disconnect(),this._forwardObserver=void 0}setCount(i){this._badgeElement.textContent=String(i)}setBadgeType(i){this._badgeElement.dot=i}setBadgeTheme(i){b(this._badgeElement,!!i,l.attributes.THEME,i)}setBadgeVisible(i){this._badgeElement.hide=!i}};var p=class{constructor(t){this._adapter=t;this._count="0";this._dot=!1;this._showBadge=!1;this._isInitialized=!1;this._icon="notifications"}initialize(){this._adapter.initialize(),this._adapter.setCount(this._count),this._adapter.setBadgeType(this._dot),this._adapter.setBadgeTheme(this._theme),this._adapter.setBadgeVisible(this._showBadge),this._adapter.setIcon(this._icon),this._isInitialized=!0}destroy(){this._adapter.destroy(),this._isInitialized=!1}get icon(){return this._icon}set icon(t){this._icon!==t&&(this._icon=t,this._isInitialized&&this._adapter.setIcon(this._icon),this._adapter.setHostAttribute(e.attributes.ICON,this._icon))}get count(){return this._count}set count(t){this._count!==t&&(this._count=t,this._isInitialized&&this._adapter.setCount(this._count),this._adapter.setHostAttribute(e.attributes.COUNT,this._count))}get dot(){return this._dot}set dot(t){t=!!t,this._dot!==t&&(this._dot=t,this._isInitialized&&this._adapter.setBadgeType(this._dot),this._adapter.toggleHostAttribute(e.attributes.DOT,this._dot))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._isInitialized&&(this._adapter.setBadgeTheme(this._theme),this._adapter.setHostAttribute(e.attributes.THEME,this._theme)))}get showBadge(){return this._showBadge}set showBadge(t){t=!!t,this._showBadge!==t&&(this._showBadge=t,this._isInitialized&&this._adapter.setBadgeVisible(this._showBadge),this._adapter.toggleHostAttribute(e.attributes.SHOW_BADGE,this._showBadge))}};var z='<template><forge-icon-button><forge-icon></forge-icon><forge-badge slot="badge"></forge-badge></forge-icon-button><forge-tooltip type="label" placement="bottom">Notifications</forge-tooltip></template>',n=class extends f{constructor(){super();A.define(T),this._foundation=new p(new d(this))}static get observedAttributes(){return[e.attributes.COUNT,e.attributes.DOT,e.attributes.THEME,e.attributes.SHOW_BADGE,e.attributes.ICON]}initializedCallback(){_(this,z)}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(i,m,o){switch(i){case e.attributes.COUNT:this.count=o;break;case e.attributes.DOT:this.dot=c(o);break;case e.attributes.THEME:this.theme=o;break;case e.attributes.ICON:this.icon=o;break;case e.attributes.SHOW_BADGE:this.showBadge=c(o);break}}};r([s()],n.prototype,"count",2),r([s()],n.prototype,"dot",2),r([s()],n.prototype,"theme",2),r([s()],n.prototype,"icon",2),r([s()],n.prototype,"showBadge",2),n=r([g({name:e.elementName,dependencies:[v,w,y,O]})],n);function ct(){u(n)}export{e as a,d as b,p as c,n as d,ct as e};
|
|
7
|
+
//# sourceMappingURL=chunk.OXGCNOUY.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 L}from"./chunk.GDKJ4RZX.js";import{d as P}from"./chunk.VX7H6YHF.js";import{a as d,d as k}from"./chunk.CPD4RUF2.js";import{a as w,b as N}from"./chunk.STIZCKQA.js";import{a as I}from"./chunk.ZY3ETQ3D.js";import{a as o}from"./chunk.NVUMRW44.js";import{a as A,b as S}from"./chunk.UVXKHQQZ.js";import{a as B,e as C,f as n,k as T}from"./chunk.TPXXHX5J.js";import{e as b,f,i as y,t as E,u as x,v}from"./chunk.HZUQXCOQ.js";import{b as _,k as h}from"./chunk.J2M2MXP2.js";import{d as s}from"./chunk.M3QDAYD2.js";var R=`${S}busy-indicator`,F={SURFACE_INVISIBLE:"forge-busy-indicator__surface--invisible",SURFACE_FIXED:"forge-busy-indicator__surface--fixed"},D={SURFACE:".forge-busy-indicator__surface",SURFACE_INVISIBLE:`.${F.SURFACE_INVISIBLE}`,TITLE:".forge-busy-indicator__title",MESSAGE:".forge-busy-indicator__message",CANCEL:".forge-busy-indicator__cancel-button",SPINNER:".forge-busy-indicator__spinner",PROGRESS_BAR_CONTAINER:".forge-busy-indicator__progress-container",PROGRESS_BAR:`.forge-busy-indicator__progress-container ${w.elementName}`,BACKDROP:d.elementName},O={CANCEL:`${R}-cancel`},M={CANCELLING:"Cancelling..."},z={TITLE_TEXT:"title-text",MESSAGE:"message",CANCEL:"cancel",SPINNER:"spinner",PROGRESS_BAR:"progress-bar",PROGRESS_BAR_DETERMINATE:"progress-bar-determinate",PROGRESS:"progress",BUFFER:"buffer",WIDTH:"width",DIRECTION:"direction",MINIMUM_VISIBLE_LIFETIME:"minimum-visible-lifetime",MANAGE_FOCUS:"manage-focus",PARENT_OPEN:"forge-busy-indicator-open",FIXED:"fixed"},H={TRANSITION_LENGTH:120},t={elementName:R,selectors:D,events:O,strings:M,attributes:z,numbers:H,classes:F};var p=class extends I{constructor(e){super(e);this._parentElement=null;this._surfaceElement=n(e,t.selectors.SURFACE),this._titleElement=n(e,t.selectors.TITLE),this._messageElement=n(e,t.selectors.MESSAGE),this._cancelButtonElement=n(e,t.selectors.CANCEL),this._spinnerElement=n(e,t.selectors.SPINNER),this._progressBarContainerElement=n(e,t.selectors.PROGRESS_BAR_CONTAINER),this._progressBarElement=n(e,t.selectors.PROGRESS_BAR),this._backdropElement=n(e,t.selectors.BACKDROP)}setSurfaceOpacity(e){this._surfaceElement.style.opacity=e.toString()}setFixed(e){v(this._backdropElement,e,d.attributes.FIXED),x(this._surfaceElement,e,t.classes.SURFACE_FIXED)}setTitle(e){this._titleElement.innerText=e}setMessage(e){this._messageElement.innerText=e}setTitleVisibility(e){this._titlePlaceholderElement=this._toggleElement(e,t.selectors.TITLE,this._titleElement,this._titlePlaceholderElement)}setCancelButtonVisibility(e){this._cancelButtonPlaceholderElement=this._toggleElement(e,t.selectors.CANCEL,this._cancelButtonElement,this._cancelButtonPlaceholderElement)}setMessageVisibility(e){this._messagePlaceholderElement=this._toggleElement(e,t.selectors.MESSAGE,this._messageElement,this._messagePlaceholderElement)}setSpinnerVisibility(e){this._spinnerPlaceholderElement=this._toggleElement(e,t.selectors.SPINNER,this._spinnerElement,this._spinnerPlaceholderElement)}setProgressBarVisibility(e){this._progressBarContainerPlaceholderElement=this._toggleElement(e,t.selectors.PROGRESS_BAR_CONTAINER,this._progressBarContainerElement,this._progressBarContainerPlaceholderElement)}setProgressBarDeterminate(e){this._progressBarElement.determinate=e}setProgressBarProgress(e){this._progressBarElement.progress=e}setProgressBarBuffer(e){this._progressBarElement.buffer=e}addCancelButtonEventListener(e,a){this._cancelButtonElement.addEventListener(e,a)}removeCancelButtonEventListener(e,a){this._cancelButtonElement.removeEventListener(e,a)}setCancelButtonAttribute(e,a){this._cancelButtonElement.setAttribute(e,a)}setCancelButtonText(e){this._cancelButtonElement.innerText=e}setSurfaceWidth(e){this._surfaceElement.style.width=e.toString()}captureFocus(){this._surfaceElement.focus()}remove(){y(this._component)}hideBackdrop(){this._backdropElement.fadeOut()}_toggleElement(e,a,c,l){let g=!!n(this._component,a);return l||(l=document.createComment(`(${t.elementName}) ${a}`)),e&&!g?b(c,l):!e&&g&&b(l,c),l}setContainerInvisible(){f(t.classes.SURFACE_INVISIBLE,this._surfaceElement)}setBackdropAppearance(e){this._backdropElement.setAttribute(d.attributes.APPEARANCE,String(e))}setParentAttribute(e,a){this._parentElement=this._component.parentElement,this._parentElement&&this._parentElement.setAttribute(e,a)}removeParentAttribute(e){this._parentElement&&(this._parentElement.removeAttribute(e),this._parentElement=null)}getFocusedElement(){return E(this._component.ownerDocument)}hasFocus(){let e=this.getFocusedElement();return this._component===e||this._surfaceElement===e||this._surfaceElement.contains(e)}};var m=class{constructor(i){this._adapter=i;this._canCancel=!1;this._showSpinner=!0;this._showProgressBar=!1;this._progressBarDeterminate=!1;this._progress=0;this._buffer=0;this._cancelListenerAttached=!1;this._direction="row";this._manageFocus=!0;this._fixed=!0}destroy(){this._adapter.removeCancelButtonEventListener("click",this._onCancelClick)}show(){this._applyDirection(),this._adapter.setParentAttribute(t.attributes.PARENT_OPEN,"true"),this._adapter.setHostAttribute("tabindex","0"),this._adapter.setSurfaceOpacity(0),this._adapter.setFixed(this._fixed),this._titleText||this._adapter.setTitleVisibility(!1),this._message&&this._adapter.setMessage(this._message),this._adapter.setMessageVisibility(!!this._message),this._canCancel?this._attachCancelClickListener():this._adapter.setCancelButtonVisibility(!1),this._showSpinner||this._adapter.setSpinnerVisibility(!1),this._showProgressBar?(this._adapter.setProgressBarDeterminate(this._progressBarDeterminate),this._adapter.setProgressBarProgress(this._progress),this._adapter.setProgressBarBuffer(this._buffer)):this._adapter.setProgressBarVisibility(!1),this._width&&this._adapter.setSurfaceWidth(typeof this._width=="number"?`${this._width}px`:this._width),(!this._message||this._message.length===0)&&this._showSpinner&&(!this.titleText||this._titleText.length===0)&&!this._canCancel&&(this._adapter.setContainerInvisible(),this._adapter.setBackdropAppearance("light")),this.fadeIn()}hide(i=!1){i?(this._manageFocus&&this._releaseFocus(),this._adapter.remove(),this._adapter.removeParentAttribute(t.attributes.PARENT_OPEN)):(this.fadeOut(),this._adapter.hideBackdrop(),setTimeout(()=>{this._manageFocus&&this._releaseFocus(),this._adapter.remove(),this._adapter.removeParentAttribute(t.attributes.PARENT_OPEN)},t.numbers.TRANSITION_LENGTH))}fadeOut(){this._adapter.setSurfaceOpacity(0)}fadeIn(){this._adapter.setSurfaceOpacity(1),this._manageFocus&&this._captureFocus()}_attachCancelClickListener(){this._cancelListenerAttached||(this._adapter.addCancelButtonEventListener("click",this._onCancelClick.bind(this)),this._cancelListenerAttached=!0)}_onCancelClick(){this._adapter.setCancelButtonAttribute("disabled","disabled"),this._adapter.setCancelButtonText(t.strings.CANCELLING),this._adapter.removeCancelButtonEventListener("click",this._onCancelClick),this._adapter.emitHostEvent(t.events.CANCEL)}_captureFocus(){this._previouslyFocusedElement=this._adapter.getFocusedElement(),this._adapter.captureFocus()}_releaseFocus(){this._previouslyFocusedElement&&this._adapter.hasFocus()&&this._previouslyFocusedElement.focus()}set titleText(i){this._titleText!==i&&(this._titleText=i,this._adapter.setTitle(this._titleText),this._adapter.setTitleVisibility(!!this._titleText),this._adapter.setHostAttribute(t.attributes.TITLE_TEXT,this._titleText))}get titleText(){return this._titleText}set message(i){this._message!==i&&(this._message=i,this._adapter.setMessage(this._message),this._adapter.setMessageVisibility(!!this._message),this._adapter.setHostAttribute(t.attributes.MESSAGE,this._message))}get message(){return this._message}set cancel(i){this._canCancel!==i&&(this._canCancel=i,this._adapter.setCancelButtonVisibility(!!this._canCancel),this._canCancel?this._attachCancelClickListener():this._adapter.removeCancelButtonEventListener("click",this._onCancelClick),this._adapter.setHostAttribute(t.attributes.CANCEL,this._canCancel.toString()))}get cancel(){return this._canCancel}set spinner(i){this._showSpinner!==i&&(this._showSpinner=i,this._adapter.setSpinnerVisibility(!!this._showSpinner),this._adapter.setHostAttribute(t.attributes.SPINNER,""+this._showSpinner))}get spinner(){return this._showSpinner}set progressBar(i){this._showProgressBar!==i&&(this._showProgressBar=i,this._adapter.setProgressBarVisibility(!!this._showProgressBar),this._adapter.setHostAttribute(t.attributes.PROGRESS_BAR,this._showProgressBar.toString()))}get progressBar(){return this._showProgressBar}set progressBarDeterminate(i){this._progressBarDeterminate!==i&&(this._progressBarDeterminate=i,this._adapter.setProgressBarDeterminate(i))}get progressBarDeterminate(){return this._progressBarDeterminate}set progress(i){this._progress!==i&&this._progressBarDeterminate&&(this._progress=i,this._adapter.setProgressBarProgress(i))}get progress(){return this._progress}set buffer(i){this._buffer!==i&&this._progressBarDeterminate&&(this._buffer=i,this._adapter.setProgressBarBuffer(i),this._adapter.setHostAttribute(t.attributes.BUFFER,_(this._buffer)?this._buffer.toString():"0"))}get buffer(){return this._buffer}get direction(){return this._direction}set direction(i){i!==this._direction&&(this._direction=i,this._applyDirection())}_applyDirection(){this._direction&&this._adapter.setHostAttribute(t.attributes.DIRECTION,String(this._direction))}set width(i){this._width!==i&&(typeof i=="number"&&i<0&&(i="auto"),this._width=i,this._adapter.setSurfaceWidth(typeof this._width=="number"?`${this._width}px`:this._width),this._adapter.setHostAttribute(t.attributes.WIDTH,this._width.toString()))}get width(){return this._width}get manageFocus(){return this._manageFocus}set manageFocus(i){this._manageFocus!==i&&(this._manageFocus=i,this._adapter.toggleHostAttribute(t.attributes.MANAGE_FOCUS,this._manageFocus))}get fixed(){return this._fixed}set fixed(i){this._fixed!==i&&(this._fixed=i,this._adapter.setFixed(this._fixed),this._adapter.toggleHostAttribute(t.attributes.FIXED,this._fixed))}};var G='<template><forge-backdrop part="backdrop" fixed></forge-backdrop><div class="forge-busy-indicator__surface" role="alert" aria-labelledby="title" aria-describedby="message" part="surface" tabindex="0"><h1 id="title" class="forge-busy-indicator__title" part="title">Loading</h1><div class="forge-busy-indicator__message-container" part="message-container"><forge-circular-progress class="forge-busy-indicator__spinner" part="spinner" aria-hidden="true"></forge-circular-progress><p id="message" class="forge-busy-indicator__message" part="message"></p><forge-button class="forge-busy-indicator__cancel-button" part="cancel-button">Cancel</forge-button></div><div class="forge-busy-indicator__progress-container" part="progress-bar-container"><forge-linear-progress part="progress-bar" aria-hidden="true"></forge-linear-progress></div></div></template>',V=":host{outline:0;contain:content}:host([hidden]){display:none}:host([direction=row]) .forge-busy-indicator__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);z-index:8;z-index:var(--forge-z-index-dialog,8);position:absolute;padding:48px;-webkit-box-sizing:border-box;box-sizing:border-box;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1);outline:0;opacity:0;min-width:280px;max-width:865px}:host([direction=row]) .forge-busy-indicator__surface .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-medium,4px)}:host([direction=row]) .forge-busy-indicator__surface--fixed{position:fixed}:host([direction=row]) .forge-busy-indicator__surface--invisible{background:0 0;-webkit-box-shadow:none;box-shadow:none;min-width:auto}:host([direction=row]) .forge-busy-indicator__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-headline5-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.5rem;font-size:var(--mdc-typography-headline5-font-size, 1.5rem);line-height:2rem;line-height:var(--mdc-typography-headline5-line-height, 2rem);font-weight:400;font-weight:var(--mdc-typography-headline5-font-weight,400);letter-spacing:normal;letter-spacing:var(--mdc-typography-headline5-letter-spacing, normal);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-headline5-text-decoration,inherit);text-decoration:var(--mdc-typography-headline5-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline5-text-transform,inherit);margin-top:-24px;margin-left:-24px}:host([direction=row]) .forge-busy-indicator__message-container{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}:host([direction=row]) .forge-busy-indicator__message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));-webkit-box-flex:1;flex:1 auto;margin-block:0}:host([direction=row]) .forge-busy-indicator__message:nth-child(2){margin-left:16px}:host([direction=row]) .forge-busy-indicator__cancel-button{margin-left:16px}:host([direction=row]) .forge-busy-indicator__progress-container{min-width:244px;margin-top:24px}:host([direction=column]) .forge-busy-indicator__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);z-index:8;z-index:var(--forge-z-index-dialog,8);position:absolute;padding:48px;-webkit-box-sizing:border-box;box-sizing:border-box;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1);outline:0;opacity:0;min-width:256px;max-width:356px}:host([direction=column]) .forge-busy-indicator__surface .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-medium,4px)}:host([direction=column]) .forge-busy-indicator__surface--invisible{background:0 0;-webkit-box-shadow:none;box-shadow:none;min-width:auto}:host([direction=column]) .forge-busy-indicator__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-headline5-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.5rem;font-size:var(--mdc-typography-headline5-font-size, 1.5rem);line-height:2rem;line-height:var(--mdc-typography-headline5-line-height, 2rem);font-weight:400;font-weight:var(--mdc-typography-headline5-font-weight,400);letter-spacing:normal;letter-spacing:var(--mdc-typography-headline5-letter-spacing, normal);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-headline5-text-decoration,inherit);text-decoration:var(--mdc-typography-headline5-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline5-text-transform,inherit);margin-top:-24px;margin-left:-24px}:host([direction=column]) .forge-busy-indicator__message-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;display:-webkit-box;display:flex;place-items:center}:host([direction=column]) .forge-busy-indicator__message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));-webkit-box-flex:1;flex:1 auto;text-align:center;margin:0}:host([direction=column]) .forge-busy-indicator__cancel-button{margin-top:16px;margin-bottom:-36px;margin-right:0;margin-left:0}:host([direction=column]) .forge-busy-indicator__progress-container{min-width:244px;margin-top:24px}:host([direction=column]) .forge-busy-indicator__spinner{margin-bottom:32px}",r=class extends T{constructor(){super();C(this,G,V),this._foundation=new m(new p(this))}static get observedAttributes(){return[t.attributes.TITLE_TEXT,t.attributes.MESSAGE,t.attributes.CANCEL,t.attributes.MINIMUM_VISIBLE_LIFETIME,t.attributes.DIRECTION,t.attributes.MANAGE_FOCUS,t.attributes.FIXED]}initializedCallback(){this._foundation.show()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,a,c){switch(e){case t.attributes.TITLE_TEXT:this.titleText=c;break;case t.attributes.MESSAGE:this.message=c;break;case t.attributes.CANCEL:this.cancel=c==="true";break;case t.attributes.MANAGE_FOCUS:this.manageFocus=h(c);break;case t.attributes.FIXED:this.fixed=h(c);break}}hide(e=!0){this._foundation.hide(e)}};s([o()],r.prototype,"titleText",2),s([o()],r.prototype,"message",2),s([o()],r.prototype,"cancel",2),s([o()],r.prototype,"spinner",2),s([o()],r.prototype,"progressBar",2),s([o()],r.prototype,"progressBarDeterminate",2),s([o()],r.prototype,"progress",2),s([o()],r.prototype,"buffer",2),s([o()],r.prototype,"width",2),s([o()],r.prototype,"direction",2),s([o()],r.prototype,"manageFocus",2),s([o()],r.prototype,"fixed",2),r=s([A({name:t.elementName,dependencies:[k,L,N,P]})],r);function ve(){B(r)}export{t as a,p as b,m as c,r as d,ve as e};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{d as L}from"./chunk.GDKJ4RZX.js";import{d as P}from"./chunk.LNMQ5A25.js";import{a as d,d as k}from"./chunk.CPD4RUF2.js";import{a as w,b as N}from"./chunk.STIZCKQA.js";import{a as I}from"./chunk.ZY3ETQ3D.js";import{a as o}from"./chunk.NVUMRW44.js";import{a as A,b as S}from"./chunk.UVXKHQQZ.js";import{a as B,e as C,f as n,k as T}from"./chunk.TPXXHX5J.js";import{e as b,f,i as y,t as E,u as x,v}from"./chunk.HZUQXCOQ.js";import{b as _,k as h}from"./chunk.J2M2MXP2.js";import{d as s}from"./chunk.M3QDAYD2.js";var R=`${S}busy-indicator`,F={SURFACE_INVISIBLE:"forge-busy-indicator__surface--invisible",SURFACE_FIXED:"forge-busy-indicator__surface--fixed"},D={SURFACE:".forge-busy-indicator__surface",SURFACE_INVISIBLE:`.${F.SURFACE_INVISIBLE}`,TITLE:".forge-busy-indicator__title",MESSAGE:".forge-busy-indicator__message",CANCEL:".forge-busy-indicator__cancel-button",SPINNER:".forge-busy-indicator__spinner",PROGRESS_BAR_CONTAINER:".forge-busy-indicator__progress-container",PROGRESS_BAR:`.forge-busy-indicator__progress-container ${w.elementName}`,BACKDROP:d.elementName},O={CANCEL:`${R}-cancel`},M={CANCELLING:"Cancelling..."},z={TITLE_TEXT:"title-text",MESSAGE:"message",CANCEL:"cancel",SPINNER:"spinner",PROGRESS_BAR:"progress-bar",PROGRESS_BAR_DETERMINATE:"progress-bar-determinate",PROGRESS:"progress",BUFFER:"buffer",WIDTH:"width",DIRECTION:"direction",MINIMUM_VISIBLE_LIFETIME:"minimum-visible-lifetime",MANAGE_FOCUS:"manage-focus",PARENT_OPEN:"forge-busy-indicator-open",FIXED:"fixed"},H={TRANSITION_LENGTH:120},t={elementName:R,selectors:D,events:O,strings:M,attributes:z,numbers:H,classes:F};var p=class extends I{constructor(e){super(e);this._parentElement=null;this._surfaceElement=n(e,t.selectors.SURFACE),this._titleElement=n(e,t.selectors.TITLE),this._messageElement=n(e,t.selectors.MESSAGE),this._cancelButtonElement=n(e,t.selectors.CANCEL),this._spinnerElement=n(e,t.selectors.SPINNER),this._progressBarContainerElement=n(e,t.selectors.PROGRESS_BAR_CONTAINER),this._progressBarElement=n(e,t.selectors.PROGRESS_BAR),this._backdropElement=n(e,t.selectors.BACKDROP)}setSurfaceOpacity(e){this._surfaceElement.style.opacity=e.toString()}setFixed(e){v(this._backdropElement,e,d.attributes.FIXED),x(this._surfaceElement,e,t.classes.SURFACE_FIXED)}setTitle(e){this._titleElement.innerText=e}setMessage(e){this._messageElement.innerText=e}setTitleVisibility(e){this._titlePlaceholderElement=this._toggleElement(e,t.selectors.TITLE,this._titleElement,this._titlePlaceholderElement)}setCancelButtonVisibility(e){this._cancelButtonPlaceholderElement=this._toggleElement(e,t.selectors.CANCEL,this._cancelButtonElement,this._cancelButtonPlaceholderElement)}setMessageVisibility(e){this._messagePlaceholderElement=this._toggleElement(e,t.selectors.MESSAGE,this._messageElement,this._messagePlaceholderElement)}setSpinnerVisibility(e){this._spinnerPlaceholderElement=this._toggleElement(e,t.selectors.SPINNER,this._spinnerElement,this._spinnerPlaceholderElement)}setProgressBarVisibility(e){this._progressBarContainerPlaceholderElement=this._toggleElement(e,t.selectors.PROGRESS_BAR_CONTAINER,this._progressBarContainerElement,this._progressBarContainerPlaceholderElement)}setProgressBarDeterminate(e){this._progressBarElement.determinate=e}setProgressBarProgress(e){this._progressBarElement.progress=e}setProgressBarBuffer(e){this._progressBarElement.buffer=e}addCancelButtonEventListener(e,a){this._cancelButtonElement.addEventListener(e,a)}removeCancelButtonEventListener(e,a){this._cancelButtonElement.removeEventListener(e,a)}setCancelButtonAttribute(e,a){this._cancelButtonElement.setAttribute(e,a)}setCancelButtonText(e){this._cancelButtonElement.innerText=e}setSurfaceWidth(e){this._surfaceElement.style.width=e.toString()}captureFocus(){this._surfaceElement.focus()}remove(){y(this._component)}hideBackdrop(){this._backdropElement.fadeOut()}_toggleElement(e,a,c,l){let g=!!n(this._component,a);return l||(l=document.createComment(`(${t.elementName}) ${a}`)),e&&!g?b(c,l):!e&&g&&b(l,c),l}setContainerInvisible(){f(t.classes.SURFACE_INVISIBLE,this._surfaceElement)}setBackdropAppearance(e){this._backdropElement.setAttribute(d.attributes.APPEARANCE,String(e))}setParentAttribute(e,a){this._parentElement=this._component.parentElement,this._parentElement&&this._parentElement.setAttribute(e,a)}removeParentAttribute(e){this._parentElement&&(this._parentElement.removeAttribute(e),this._parentElement=null)}getFocusedElement(){return E(this._component.ownerDocument)}hasFocus(){let e=this.getFocusedElement();return this._component===e||this._surfaceElement===e||this._surfaceElement.contains(e)}};var m=class{constructor(i){this._adapter=i;this._canCancel=!1;this._showSpinner=!0;this._showProgressBar=!1;this._progressBarDeterminate=!1;this._progress=0;this._buffer=0;this._cancelListenerAttached=!1;this._direction="row";this._manageFocus=!0;this._fixed=!0}destroy(){this._adapter.removeCancelButtonEventListener("click",this._onCancelClick)}show(){this._applyDirection(),this._adapter.setParentAttribute(t.attributes.PARENT_OPEN,"true"),this._adapter.setHostAttribute("tabindex","0"),this._adapter.setSurfaceOpacity(0),this._adapter.setFixed(this._fixed),this._titleText||this._adapter.setTitleVisibility(!1),this._message&&this._adapter.setMessage(this._message),this._adapter.setMessageVisibility(!!this._message),this._canCancel?this._attachCancelClickListener():this._adapter.setCancelButtonVisibility(!1),this._showSpinner||this._adapter.setSpinnerVisibility(!1),this._showProgressBar?(this._adapter.setProgressBarDeterminate(this._progressBarDeterminate),this._adapter.setProgressBarProgress(this._progress),this._adapter.setProgressBarBuffer(this._buffer)):this._adapter.setProgressBarVisibility(!1),this._width&&this._adapter.setSurfaceWidth(typeof this._width=="number"?`${this._width}px`:this._width),(!this._message||this._message.length===0)&&this._showSpinner&&(!this.titleText||this._titleText.length===0)&&!this._canCancel&&(this._adapter.setContainerInvisible(),this._adapter.setBackdropAppearance("light")),this.fadeIn()}hide(i=!1){i?(this._manageFocus&&this._releaseFocus(),this._adapter.remove(),this._adapter.removeParentAttribute(t.attributes.PARENT_OPEN)):(this.fadeOut(),this._adapter.hideBackdrop(),setTimeout(()=>{this._manageFocus&&this._releaseFocus(),this._adapter.remove(),this._adapter.removeParentAttribute(t.attributes.PARENT_OPEN)},t.numbers.TRANSITION_LENGTH))}fadeOut(){this._adapter.setSurfaceOpacity(0)}fadeIn(){this._adapter.setSurfaceOpacity(1),this._manageFocus&&this._captureFocus()}_attachCancelClickListener(){this._cancelListenerAttached||(this._adapter.addCancelButtonEventListener("click",this._onCancelClick.bind(this)),this._cancelListenerAttached=!0)}_onCancelClick(){this._adapter.setCancelButtonAttribute("disabled","disabled"),this._adapter.setCancelButtonText(t.strings.CANCELLING),this._adapter.removeCancelButtonEventListener("click",this._onCancelClick),this._adapter.emitHostEvent(t.events.CANCEL)}_captureFocus(){this._previouslyFocusedElement=this._adapter.getFocusedElement(),this._adapter.captureFocus()}_releaseFocus(){this._previouslyFocusedElement&&this._adapter.hasFocus()&&this._previouslyFocusedElement.focus()}set titleText(i){this._titleText!==i&&(this._titleText=i,this._adapter.setTitle(this._titleText),this._adapter.setTitleVisibility(!!this._titleText),this._adapter.setHostAttribute(t.attributes.TITLE_TEXT,this._titleText))}get titleText(){return this._titleText}set message(i){this._message!==i&&(this._message=i,this._adapter.setMessage(this._message),this._adapter.setMessageVisibility(!!this._message),this._adapter.setHostAttribute(t.attributes.MESSAGE,this._message))}get message(){return this._message}set cancel(i){this._canCancel!==i&&(this._canCancel=i,this._adapter.setCancelButtonVisibility(!!this._canCancel),this._canCancel?this._attachCancelClickListener():this._adapter.removeCancelButtonEventListener("click",this._onCancelClick),this._adapter.setHostAttribute(t.attributes.CANCEL,this._canCancel.toString()))}get cancel(){return this._canCancel}set spinner(i){this._showSpinner!==i&&(this._showSpinner=i,this._adapter.setSpinnerVisibility(!!this._showSpinner),this._adapter.setHostAttribute(t.attributes.SPINNER,""+this._showSpinner))}get spinner(){return this._showSpinner}set progressBar(i){this._showProgressBar!==i&&(this._showProgressBar=i,this._adapter.setProgressBarVisibility(!!this._showProgressBar),this._adapter.setHostAttribute(t.attributes.PROGRESS_BAR,this._showProgressBar.toString()))}get progressBar(){return this._showProgressBar}set progressBarDeterminate(i){this._progressBarDeterminate!==i&&(this._progressBarDeterminate=i,this._adapter.setProgressBarDeterminate(i))}get progressBarDeterminate(){return this._progressBarDeterminate}set progress(i){this._progress!==i&&this._progressBarDeterminate&&(this._progress=i,this._adapter.setProgressBarProgress(i))}get progress(){return this._progress}set buffer(i){this._buffer!==i&&this._progressBarDeterminate&&(this._buffer=i,this._adapter.setProgressBarBuffer(i),this._adapter.setHostAttribute(t.attributes.BUFFER,_(this._buffer)?this._buffer.toString():"0"))}get buffer(){return this._buffer}get direction(){return this._direction}set direction(i){i!==this._direction&&(this._direction=i,this._applyDirection())}_applyDirection(){this._direction&&this._adapter.setHostAttribute(t.attributes.DIRECTION,String(this._direction))}set width(i){this._width!==i&&(typeof i=="number"&&i<0&&(i="auto"),this._width=i,this._adapter.setSurfaceWidth(typeof this._width=="number"?`${this._width}px`:this._width),this._adapter.setHostAttribute(t.attributes.WIDTH,this._width.toString()))}get width(){return this._width}get manageFocus(){return this._manageFocus}set manageFocus(i){this._manageFocus!==i&&(this._manageFocus=i,this._adapter.toggleHostAttribute(t.attributes.MANAGE_FOCUS,this._manageFocus))}get fixed(){return this._fixed}set fixed(i){this._fixed!==i&&(this._fixed=i,this._adapter.setFixed(this._fixed),this._adapter.toggleHostAttribute(t.attributes.FIXED,this._fixed))}};var G='<template><forge-backdrop part="backdrop" fixed></forge-backdrop><div class="forge-busy-indicator__surface" role="alert" aria-labelledby="title" aria-describedby="message" part="surface" tabindex="0"><h1 id="title" class="forge-busy-indicator__title" part="title">Loading</h1><div class="forge-busy-indicator__message-container" part="message-container"><forge-circular-progress class="forge-busy-indicator__spinner" part="spinner" aria-hidden="true"></forge-circular-progress><p id="message" class="forge-busy-indicator__message" part="message"></p><forge-button class="forge-busy-indicator__cancel-button" part="cancel-button">Cancel</forge-button></div><div class="forge-busy-indicator__progress-container" part="progress-bar-container"><forge-linear-progress part="progress-bar" aria-hidden="true"></forge-linear-progress></div></div></template>',V=":host{outline:0;contain:content}:host([hidden]){display:none}:host([direction=row]) .forge-busy-indicator__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);z-index:8;z-index:var(--forge-z-index-dialog,8);position:absolute;padding:48px;-webkit-box-sizing:border-box;box-sizing:border-box;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1);outline:0;opacity:0;min-width:280px;max-width:865px}:host([direction=row]) .forge-busy-indicator__surface .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-medium,4px)}:host([direction=row]) .forge-busy-indicator__surface--fixed{position:fixed}:host([direction=row]) .forge-busy-indicator__surface--invisible{background:0 0;-webkit-box-shadow:none;box-shadow:none;min-width:auto}:host([direction=row]) .forge-busy-indicator__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-headline5-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.5rem;font-size:var(--mdc-typography-headline5-font-size, 1.5rem);line-height:2rem;line-height:var(--mdc-typography-headline5-line-height, 2rem);font-weight:400;font-weight:var(--mdc-typography-headline5-font-weight,400);letter-spacing:normal;letter-spacing:var(--mdc-typography-headline5-letter-spacing, normal);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-headline5-text-decoration,inherit);text-decoration:var(--mdc-typography-headline5-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline5-text-transform,inherit);margin-top:-24px;margin-left:-24px}:host([direction=row]) .forge-busy-indicator__message-container{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}:host([direction=row]) .forge-busy-indicator__message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));-webkit-box-flex:1;flex:1 auto;margin-block:0}:host([direction=row]) .forge-busy-indicator__message:nth-child(2){margin-left:16px}:host([direction=row]) .forge-busy-indicator__cancel-button{margin-left:16px}:host([direction=row]) .forge-busy-indicator__progress-container{min-width:244px;margin-top:24px}:host([direction=column]) .forge-busy-indicator__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);z-index:8;z-index:var(--forge-z-index-dialog,8);position:absolute;padding:48px;-webkit-box-sizing:border-box;box-sizing:border-box;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1);outline:0;opacity:0;min-width:256px;max-width:356px}:host([direction=column]) .forge-busy-indicator__surface .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-medium,4px)}:host([direction=column]) .forge-busy-indicator__surface--invisible{background:0 0;-webkit-box-shadow:none;box-shadow:none;min-width:auto}:host([direction=column]) .forge-busy-indicator__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-headline5-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.5rem;font-size:var(--mdc-typography-headline5-font-size, 1.5rem);line-height:2rem;line-height:var(--mdc-typography-headline5-line-height, 2rem);font-weight:400;font-weight:var(--mdc-typography-headline5-font-weight,400);letter-spacing:normal;letter-spacing:var(--mdc-typography-headline5-letter-spacing, normal);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-headline5-text-decoration,inherit);text-decoration:var(--mdc-typography-headline5-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline5-text-transform,inherit);margin-top:-24px;margin-left:-24px}:host([direction=column]) .forge-busy-indicator__message-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;display:-webkit-box;display:flex;place-items:center}:host([direction=column]) .forge-busy-indicator__message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));-webkit-box-flex:1;flex:1 auto;text-align:center;margin:0}:host([direction=column]) .forge-busy-indicator__cancel-button{margin-top:16px;margin-bottom:-36px;margin-right:0;margin-left:0}:host([direction=column]) .forge-busy-indicator__progress-container{min-width:244px;margin-top:24px}:host([direction=column]) .forge-busy-indicator__spinner{margin-bottom:32px}",r=class extends T{constructor(){super();C(this,G,V),this._foundation=new m(new p(this))}static get observedAttributes(){return[t.attributes.TITLE_TEXT,t.attributes.MESSAGE,t.attributes.CANCEL,t.attributes.MINIMUM_VISIBLE_LIFETIME,t.attributes.DIRECTION,t.attributes.MANAGE_FOCUS,t.attributes.FIXED]}initializedCallback(){this._foundation.show()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,a,c){switch(e){case t.attributes.TITLE_TEXT:this.titleText=c;break;case t.attributes.MESSAGE:this.message=c;break;case t.attributes.CANCEL:this.cancel=c==="true";break;case t.attributes.MANAGE_FOCUS:this.manageFocus=h(c);break;case t.attributes.FIXED:this.fixed=h(c);break}}hide(e=!0){this._foundation.hide(e)}};s([o()],r.prototype,"titleText",2),s([o()],r.prototype,"message",2),s([o()],r.prototype,"cancel",2),s([o()],r.prototype,"spinner",2),s([o()],r.prototype,"progressBar",2),s([o()],r.prototype,"progressBarDeterminate",2),s([o()],r.prototype,"progress",2),s([o()],r.prototype,"buffer",2),s([o()],r.prototype,"width",2),s([o()],r.prototype,"direction",2),s([o()],r.prototype,"manageFocus",2),s([o()],r.prototype,"fixed",2),r=s([A({name:t.elementName,dependencies:[k,L,N,P]})],r);function ve(){B(r)}export{t as a,p as b,m as c,r as d,ve as e};
|
|
7
|
+
//# sourceMappingURL=chunk.QIMAHW7V.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 A}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{d as A}from"./chunk.F3FWXBDS.js";import{A as _}from"./chunk.EWT2PBEP.js";import{d as E,l as I}from"./chunk.L7BSLZCB.js";import{a as f}from"./chunk.ZY3ETQ3D.js";import{a as n}from"./chunk.NVUMRW44.js";import{a as g,b as y}from"./chunk.UVXKHQQZ.js";import{a as u,e as b,f as m,k as v}from"./chunk.TPXXHX5J.js";import{n as h}from"./chunk.HZUQXCOQ.js";import{k as d}from"./chunk.J2M2MXP2.js";import{d as p}from"./chunk.M3QDAYD2.js";var T=`${y}app-bar-search`,x={ROOT:".forge-app-bar-search",INPUT:"input"},L={DISABLED:"disabled",VALUE:"value",PLACEHOLDER:"placeholder"},C={INPUT:`${T}-input`},e={elementName:T,selectors:x,attributes:L,events:C};var s=class{constructor(a){this._adapter=a;this._disabled=!1;this._keydownListener=a=>this._onKeydown(a)}initialize(){this._adapter.initialize(),this._tryForwardInputState(),this._adapter.addInputEventListener("keydown",this._keydownListener)}_tryForwardInputState(){this._disabled&&this._adapter.setInputProperty("disabled",this._disabled),this._adapter.hasHostAttribute(e.attributes.VALUE)&&this._adapter.setInputProperty("value",this._adapter.getHostAttribute(e.attributes.VALUE)),this._adapter.hasHostAttribute(e.attributes.PLACEHOLDER)&&this._adapter.setInputProperty("placeholder",this._adapter.getHostAttribute(e.attributes.PLACEHOLDER))}_onKeydown({key:a,target:t}){if(!this._disabled&&a==="Enter"){let r={value:t.value};this._adapter.emitHostEvent(e.events.INPUT,r,!0)}}disconnect(){this._adapter.removeInputEventListener("keydown",this._keydownListener)}get disabled(){return this._disabled}set disabled(a){a!==this._disabled&&(this._disabled=a,this._adapter.setInputProperty("disabled",this._disabled),this._adapter.toggleHostAttribute(e.attributes.DISABLED,this._disabled))}get value(){return this._adapter.getInputProperty("value")}set value(a){this._adapter.setInputProperty("value",a)}get placeholder(){return this._adapter.getInputProperty("placeholder")}set placeholder(a){this._adapter.setInputProperty("placeholder",a)}};var c=class extends f{constructor(t){super(t);this._rootElement=m(t,e.selectors.ROOT)}initialize(){let t=this._component.querySelector(e.selectors.INPUT);if(t){this._inputElement=t,this._inputElement.hasAttribute("slot")||(this._inputElement.slot="input");let r=document.createElement("forge-focus-indicator");r.targetElement=this._inputElement,this._rootElement.appendChild(r)}}addInputEventListener(t,r){var o;(o=this._inputElement)==null||o.addEventListener(t,r)}removeInputEventListener(t,r){var o;(o=this._inputElement)==null||o.removeEventListener(t,r)}setInputProperty(t,r){this._inputElement&&(this._inputElement[t]=r)}getInputProperty(t){var r;return(r=this._inputElement)==null?void 0:r[t]}};var S='<template><div class="forge-app-bar-search" part="root"><slot name="start"><forge-icon name="search" class="icon" part="icon"></forge-icon></slot><slot name="input"></slot><slot name="end"></slot></div></template>',k=':host{display:block}:host([hidden]){display:none}.forge-app-bar-search{--_app-bar-search-color:var(--forge-app-bar-search-color, currentColor);--_app-bar-search-height:var(--forge-app-bar-search-height, 36px);--_app-bar-search-padding:var(--forge-app-bar-search-padding, 8px);--_app-bar-search-shape:var(--forge-app-bar-search-shape, var(--forge-shape-small, 2px));--_app-bar-search-gap:var(--forge-app-bar-search-gap, 4px);--_app-bar-search-input-placeholder-color:var(--forge-app-bar-search-input-placeholder-color, var(--_app-bar-search-color));--_app-bar-search-input-placeholder-opacity:var(--forge-app-bar-search-input-placeholder-opacity, 0.38);--_app-bar-search-background-color:var(--forge-app-bar-search-background-color, var(--_app-bar-search-color));--_app-bar-search-background-color-opacity:var(--forge-app-bar-search-background-color-opacity, 0.08);--_app-bar-search-border-color:var(--forge-app-bar-search-border-color, var(--_app-bar-search-color));--_app-bar-search-border-opacity:var(--forge-app-bar-search-border-opacity, 0.54);--_app-bar-search-border-hover-opacity:var(--forge-app-bar-search-border-hover-opacity, 0.87);--_app-bar-search-transition-duration:var(--forge-app-bar-search-transition-duration, var(--forge-animation-duration-short3, 150ms));--_app-bar-search-transition-timing-function:var(--forge-app-bar-search-transition-timing-function, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-app-bar-search{position:relative;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-flex:1;flex:1 1 auto;gap:var(--_app-bar-search-gap);height:var(--_app-bar-search-height);width:100%;padding-inline:var(--_app-bar-search-padding);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:var(--_app-bar-search-shape)}.forge-app-bar-search:hover::after{opacity:var(--_app-bar-search-border-hover-opacity)}.forge-app-bar-search::before{content:"";position:absolute;inset:0;pointer-events:none;background-color:var(--_app-bar-search-background-color);opacity:var(--_app-bar-search-background-color-opacity)}.forge-app-bar-search::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:var(--_app-bar-search-border-opacity);border-radius:var(--_app-bar-search-shape);outline:1px solid var(--_app-bar-search-border-color);-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-duration:var(--_app-bar-search-transition-duration);transition-duration:var(--_app-bar-search-transition-duration);-webkit-transition-timing-function:var(--_app-bar-search-transition-timing-function);transition-timing-function:var(--_app-bar-search-transition-timing-function)}:host([disabled]){cursor:not-allowed}:host([disabled]) .forge-app-bar-search{pointer-events:none;opacity:38%}:host([disabled]) ::slotted(input){pointer-events:none}forge-focus-indicator{--forge-focus-indicator-color:currentColor;--forge-focus-indicator-outward-offset:0px}::slotted(input){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);-webkit-text-decoration:var(--forge-typography-body2-text-decoration,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);display:block;overflow:hidden;background:0 0;color:currentColor;border:none;width:100%;margin:0;outline:0}::slotted(input)::-webkit-input-placeholder{color:currentColor;opacity:var(--_app-bar-search-input-placeholder-opacity)}::slotted(input)::-moz-placeholder{color:currentColor;opacity:var(--_app-bar-search-input-placeholder-opacity)}::slotted(input):-ms-input-placeholder{color:currentColor;opacity:var(--_app-bar-search-input-placeholder-opacity)}::slotted(input)::-ms-input-placeholder{color:currentColor;opacity:var(--_app-bar-search-input-placeholder-opacity)}::slotted(input)::placeholder{color:currentColor;opacity:var(--_app-bar-search-input-placeholder-opacity)}',i=class extends v{constructor(){super();E.define(_),b(this,S,k),this._foundation=new s(new c(this))}static get observedAttributes(){return[e.attributes.DISABLED,e.attributes.VALUE,e.attributes.PLACEHOLDER]}connectedCallback(){this.querySelector(e.selectors.INPUT)?this._foundation.initialize():h(this).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,r,o){switch(t){case e.attributes.DISABLED:this.disabled=d(o);break;case e.attributes.VALUE:this.value=o;break;case e.attributes.PLACEHOLDER:this.placeholder=o;break}}};p([n()],i.prototype,"value",2),p([n()],i.prototype,"disabled",2),p([n()],i.prototype,"placeholder",2),i=p([g({name:e.elementName,dependencies:[I,A]})],i);function ae(){u(i)}export{e as a,s as b,c,i as d,ae as e};
|
|
7
|
+
//# sourceMappingURL=chunk.QXZ3AAXD.js.map
|