@tylertech/forge 2.24.0 → 2.24.2
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 +93 -108
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/busy-indicator/index.js +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-area/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.UUBAUAER.js → chunk.3MMDUUTN.js} +2 -2
- package/dist/esm/chunks/{chunk.KZDQFUNT.js → chunk.3V2VDOOP.js} +2 -2
- package/dist/esm/chunks/{chunk.Q2PGK4IA.js → chunk.4KKMVMPN.js} +2 -2
- package/dist/esm/chunks/{chunk.WLBRU5HI.js → chunk.5SM7UG6C.js} +2 -2
- package/dist/esm/chunks/{chunk.KNNT4CGL.js → chunk.6DVJ22IK.js} +2 -2
- package/dist/esm/chunks/{chunk.QRWYYBZC.js → chunk.6NARYF7U.js} +2 -2
- package/dist/esm/chunks/{chunk.QRWYYBZC.js.map → chunk.6NARYF7U.js.map} +3 -3
- package/dist/esm/chunks/{chunk.4APGDQHF.js → chunk.AFW54X3W.js} +2 -2
- package/dist/esm/chunks/chunk.AH4YGLZ4.js +7 -0
- package/dist/esm/chunks/chunk.AH4YGLZ4.js.map +7 -0
- package/dist/esm/chunks/chunk.AJTQHK25.js +7 -0
- package/dist/esm/chunks/chunk.AJTQHK25.js.map +7 -0
- package/dist/esm/chunks/{chunk.KMMOZ2SF.js → chunk.C3G25JFG.js} +2 -2
- package/dist/esm/chunks/chunk.CL4FTBLR.js +7 -0
- package/dist/esm/chunks/chunk.CL4FTBLR.js.map +7 -0
- package/dist/esm/chunks/{chunk.POBCKMFO.js → chunk.CYLDP7ML.js} +2 -2
- package/dist/esm/chunks/{chunk.HDHGU4L2.js → chunk.E3K6KM57.js} +2 -2
- package/dist/esm/chunks/{chunk.PTEWJ5PZ.js → chunk.EQEMCHMB.js} +2 -2
- package/dist/esm/chunks/{chunk.QBST3QSM.js → chunk.FEU4FTVQ.js} +2 -2
- package/dist/esm/chunks/{chunk.ZN6U7WVM.js → chunk.FIZVVCUB.js} +2 -2
- package/dist/esm/chunks/{chunk.BQRXAJTH.js → chunk.JFAOCIGZ.js} +2 -2
- package/dist/esm/chunks/{chunk.4QVF44G5.js → chunk.K57IO236.js} +2 -2
- package/dist/esm/chunks/{chunk.K2O3KSP7.js → chunk.KGMCBPGV.js} +2 -2
- package/dist/esm/chunks/chunk.KYH5GKVI.js +7 -0
- package/dist/esm/chunks/chunk.KYH5GKVI.js.map +7 -0
- package/dist/esm/chunks/chunk.LEINPSKL.js +7 -0
- package/dist/esm/chunks/chunk.LEINPSKL.js.map +7 -0
- package/dist/esm/chunks/{chunk.V5L5DKNF.js → chunk.LFBYFJTX.js} +2 -2
- package/dist/esm/chunks/chunk.MKHU4IPO.js +7 -0
- package/dist/esm/chunks/chunk.MKHU4IPO.js.map +7 -0
- package/dist/esm/chunks/chunk.N6MAUMFI.js +7 -0
- package/dist/esm/chunks/chunk.N6MAUMFI.js.map +7 -0
- package/dist/esm/chunks/{chunk.USKQFX4N.js → chunk.OBBYRQCY.js} +2 -2
- package/dist/esm/chunks/chunk.OJ54J4L3.js +7 -0
- package/dist/esm/chunks/chunk.OJ54J4L3.js.map +7 -0
- package/dist/esm/chunks/chunk.OML7MHH6.js +29 -0
- package/dist/esm/chunks/chunk.OML7MHH6.js.map +7 -0
- package/dist/esm/chunks/chunk.OUORLMTZ.js +12 -0
- package/dist/esm/chunks/chunk.QIGNMZRL.js +7 -0
- package/dist/esm/chunks/chunk.QIGNMZRL.js.map +7 -0
- package/dist/esm/chunks/{chunk.DNWMURCG.js → chunk.RHXQ2GMV.js} +2 -2
- package/dist/esm/chunks/{chunk.OLNY6ZNB.js → chunk.TLXWXBQO.js} +2 -2
- package/dist/esm/chunks/chunk.TMEYQXRR.js +7 -0
- package/dist/esm/chunks/chunk.TMEYQXRR.js.map +7 -0
- package/dist/esm/chunks/{chunk.NHZTE4I4.js → chunk.TUQWDTRA.js} +2 -2
- package/dist/esm/chunks/{chunk.NHZTE4I4.js.map → chunk.TUQWDTRA.js.map} +1 -1
- package/dist/esm/chunks/{chunk.EPFMWAIO.js → chunk.TVWUZYVG.js} +2 -2
- package/dist/esm/chunks/{chunk.AITARMT3.js → chunk.UNFOIEF6.js} +2 -2
- package/dist/esm/chunks/{chunk.AITARMT3.js.map → chunk.UNFOIEF6.js.map} +2 -2
- package/dist/esm/chunks/{chunk.32AY5G4D.js → chunk.W3DFKTAX.js} +2 -2
- package/dist/esm/chunks/{chunk.ATJJ6NAY.js → chunk.WF24FWAT.js} +2 -2
- package/dist/esm/chunks/chunk.XINI6PNZ.js +7 -0
- package/dist/esm/chunks/chunk.XINI6PNZ.js.map +7 -0
- package/dist/esm/chunks/{chunk.WVU4LCVC.js → chunk.XKX2BE6Z.js} +2 -2
- package/dist/esm/chunks/{chunk.ZVHFSAID.js → chunk.YVXZ753Q.js} +2 -2
- package/dist/esm/chunks/{chunk.QFMQPAT2.js → chunk.Z7Y2RA4P.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/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.d.ts +2 -2
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.js +1 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.d.ts +3 -3
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +12 -4
- package/esm/app-bar/notification-button/app-bar-notification-button.d.ts +2 -2
- package/esm/app-bar/notification-button/app-bar-notification-button.js +2 -2
- package/esm/autocomplete/autocomplete-adapter.d.ts +2 -0
- package/esm/autocomplete/autocomplete-adapter.js +6 -0
- package/esm/autocomplete/autocomplete-foundation.js +1 -0
- package/esm/core/utils/utils.d.ts +9 -0
- package/esm/core/utils/utils.js +22 -0
- package/esm/date-picker/date-picker-adapter.js +3 -0
- package/esm/date-range-picker/date-range-picker-adapter.js +6 -1
- package/esm/list/list-item/list-item-adapter.js +3 -1
- package/esm/list-dropdown/list-dropdown-constants.d.ts +1 -0
- package/esm/list-dropdown/list-dropdown-utils.js +16 -3
- package/esm/menu/menu-adapter.d.ts +2 -0
- package/esm/menu/menu-adapter.js +3 -0
- package/esm/menu/menu-foundation.js +2 -5
- package/esm/select/core/base-select-adapter.d.ts +0 -2
- package/esm/select/core/base-select-foundation.js +1 -2
- package/esm/select/option/option.d.ts +0 -1
- package/esm/select/option/option.js +0 -5
- package/esm/select/select/select-adapter.d.ts +0 -1
- package/esm/select/select/select-adapter.js +4 -9
- package/esm/select/select/select-foundation.js +0 -1
- package/esm/select/select-dropdown/select-dropdown-adapter.d.ts +0 -1
- package/esm/select/select-dropdown/select-dropdown-adapter.js +0 -11
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/tabs/tab/tab-adapter.d.ts +1 -3
- package/esm/tabs/tab/tab-adapter.js +13 -14
- package/esm/tabs/tab/tab-constants.d.ts +2 -1
- package/esm/tabs/tab/tab-constants.js +2 -1
- package/esm/tabs/tab/tab-foundation.d.ts +0 -2
- package/esm/tabs/tab/tab-foundation.js +3 -3
- package/esm/tabs/tab/tab.d.ts +0 -1
- package/esm/tabs/tab/tab.js +2 -5
- package/esm/time-picker/time-picker-adapter.d.ts +2 -0
- package/esm/time-picker/time-picker-adapter.js +7 -2
- package/esm/time-picker/time-picker-foundation.js +1 -0
- package/package.json +1 -1
- package/styles/tabs/tab/_mixins.scss +3 -7
- package/styles/tabs/tab/tab.scss +4 -0
- package/dist/esm/chunks/chunk.36RT7UOR.js +0 -7
- package/dist/esm/chunks/chunk.36RT7UOR.js.map +0 -7
- package/dist/esm/chunks/chunk.7NUOX3JD.js +0 -12
- package/dist/esm/chunks/chunk.E6FHH3CM.js +0 -7
- package/dist/esm/chunks/chunk.E6FHH3CM.js.map +0 -7
- package/dist/esm/chunks/chunk.F6DMKNFU.js +0 -29
- package/dist/esm/chunks/chunk.F6DMKNFU.js.map +0 -7
- package/dist/esm/chunks/chunk.HSUOYMJT.js +0 -7
- package/dist/esm/chunks/chunk.HSUOYMJT.js.map +0 -7
- package/dist/esm/chunks/chunk.HVYDNI2O.js +0 -7
- package/dist/esm/chunks/chunk.HVYDNI2O.js.map +0 -7
- package/dist/esm/chunks/chunk.KZJYLYWN.js +0 -7
- package/dist/esm/chunks/chunk.KZJYLYWN.js.map +0 -7
- package/dist/esm/chunks/chunk.LZOAYM6V.js +0 -7
- package/dist/esm/chunks/chunk.LZOAYM6V.js.map +0 -7
- package/dist/esm/chunks/chunk.M5QM2CPF.js +0 -7
- package/dist/esm/chunks/chunk.M5QM2CPF.js.map +0 -7
- package/dist/esm/chunks/chunk.MA2P7CG4.js +0 -7
- package/dist/esm/chunks/chunk.MA2P7CG4.js.map +0 -7
- package/dist/esm/chunks/chunk.MSOMQ4HD.js +0 -7
- package/dist/esm/chunks/chunk.MSOMQ4HD.js.map +0 -7
- package/dist/esm/chunks/chunk.QRSFRMBF.js +0 -7
- package/dist/esm/chunks/chunk.QRSFRMBF.js.map +0 -7
- package/dist/esm/chunks/chunk.SDZC7JIX.js +0 -7
- package/dist/esm/chunks/chunk.SDZC7JIX.js.map +0 -7
- /package/dist/esm/chunks/{chunk.UUBAUAER.js.map → chunk.3MMDUUTN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KZDQFUNT.js.map → chunk.3V2VDOOP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q2PGK4IA.js.map → chunk.4KKMVMPN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WLBRU5HI.js.map → chunk.5SM7UG6C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KNNT4CGL.js.map → chunk.6DVJ22IK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4APGDQHF.js.map → chunk.AFW54X3W.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KMMOZ2SF.js.map → chunk.C3G25JFG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.POBCKMFO.js.map → chunk.CYLDP7ML.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HDHGU4L2.js.map → chunk.E3K6KM57.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PTEWJ5PZ.js.map → chunk.EQEMCHMB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QBST3QSM.js.map → chunk.FEU4FTVQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZN6U7WVM.js.map → chunk.FIZVVCUB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BQRXAJTH.js.map → chunk.JFAOCIGZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4QVF44G5.js.map → chunk.K57IO236.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.K2O3KSP7.js.map → chunk.KGMCBPGV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.V5L5DKNF.js.map → chunk.LFBYFJTX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.USKQFX4N.js.map → chunk.OBBYRQCY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7NUOX3JD.js.map → chunk.OUORLMTZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DNWMURCG.js.map → chunk.RHXQ2GMV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OLNY6ZNB.js.map → chunk.TLXWXBQO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EPFMWAIO.js.map → chunk.TVWUZYVG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.32AY5G4D.js.map → chunk.W3DFKTAX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ATJJ6NAY.js.map → chunk.WF24FWAT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WVU4LCVC.js.map → chunk.XKX2BE6Z.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZVHFSAID.js.map → chunk.YVXZ753Q.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QFMQPAT2.js.map → chunk.Z7Y2RA4P.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/date-picker/date-picker-constants.ts", "../../src/date-picker/date-picker-adapter.ts", "../../src/date-picker/date-picker-foundation.ts", "../../src/date-picker/date-picker.ts", "../../src/date-picker/date-picker-component-delegate.ts", "../../src/date-picker/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}date-picker`;\n\nconst observedAttributes = {\n VALUE: 'value'\n};\n\nconst selectors = {\n INPUT: 'input,input[forge-date-picker-input]'\n};\n\nconst events = {\n CHANGE: `${elementName}-change`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n INPUT: `${elementName}-input`\n};\n\nexport const DATE_PICKER_CONSTANTS = {\n elementName,\n selectors,\n events,\n observedAttributes\n};\n", "import { emitEvent, listenOwnProperty, getActiveElement } from '@tylertech/forge-core';\nimport { ICalendarDropdownPopupConfig } from '../calendar/calendar-dropdown';\nimport { CalendarDropdown } from '../calendar/calendar-dropdown/calendar-dropdown';\nimport { DateInputMask, IDateInputMaskOptions } from '../core/mask/date-input-mask';\nimport { BaseDatePickerAdapter, IBaseDatePickerAdapter } from './base/base-date-picker-adapter';\nimport { IDatePickerCalendarDropdownConfig } from './base/base-date-picker-constants';\nimport { IDatePickerComponent } from './date-picker';\nimport { DATE_PICKER_CONSTANTS } from './date-picker-constants';\nimport { setAriaControls, tryCreateAriaControlsPlaceholder } from '../core';\n\nexport interface IDatePickerAdapter extends IBaseDatePickerAdapter {}\n\nexport class DatePickerAdapter extends BaseDatePickerAdapter<IDatePickerComponent> implements IDatePickerAdapter {\n private _inputElement: HTMLInputElement;\n private _inputMask: DateInputMask | undefined;\n private _dropdownIdentifier: string;\n\n constructor(component: IDatePickerComponent) {\n super(component);\n this._dropdownIdentifier = `forge-date-picker-${this._identifier}`;\n }\n\n protected _initializeInput(): void {\n this._inputElement = this._component.querySelector(DATE_PICKER_CONSTANTS.selectors.INPUT) as HTMLInputElement;\n }\n\n protected _initializeCalendarDropdown(): void {\n const targetElement = this._getDefaultTargetElement();\n this._calendarDropdown = new CalendarDropdown(targetElement, this._dropdownIdentifier);\n }\n\n public initializeMask(options: IDateInputMaskOptions): void {\n this._inputMask?.destroy();\n this._inputMask = new DateInputMask(this._inputElement, options);\n }\n\n public destroyMask(): void {\n this._inputMask?.destroy();\n this._inputMask = undefined;\n }\n\n public initializeAccessibility(): void {\n this._inputElement.setAttribute('autocomplete', 'off');\n this._inputElement.setAttribute('autocorrect', 'off');\n this._inputElement.setAttribute('autocapitalize', 'off');\n this._inputElement.setAttribute('spellcheck', 'false');\n this._inputElement.setAttribute('role', 'combobox');\n this._inputElement.setAttribute('aria-live', 'assertive');\n this._inputElement.setAttribute('aria-atomic', 'true');\n this._inputElement.setAttribute('aria-haspopup', 'true');\n this._inputElement.setAttribute('aria-expanded', 'false');\n this._inputElement.setAttribute('aria-owns', this._dropdownIdentifier);\n tryCreateAriaControlsPlaceholder();\n setAriaControls(this._inputElement);\n }\n\n public addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._inputElement?.addEventListener(type, listener, { capture });\n }\n\n public removeInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._inputElement?.removeEventListener(type, listener, { capture });\n }\n\n public setInputValueChangedListener(context: any, listener: (value: any) => void): void {\n this.destroyValueChangeListener();\n const destroyListenerCb = listenOwnProperty(context, this._inputElement, 'value', listener);\n this._valueChangeListeners.push(destroyListenerCb);\n }\n\n public hasInputElement(): boolean {\n return !!this._inputElement;\n }\n\n public override attachCalendar(calendarConfig: IDatePickerCalendarDropdownConfig<Date | null>, dropdownConfig?: ICalendarDropdownPopupConfig): void {\n super.attachCalendar(calendarConfig, dropdownConfig);\n this._inputElement.setAttribute('aria-expanded', 'true');\n }\n\n public override detachCalendar(): void {\n super.detachCalendar();\n if (this._inputElement) {\n this._inputElement.setAttribute('aria-expanded', 'false');\n this._inputElement.removeAttribute('aria-activedescendant');\n }\n }\n\n public setActiveDescendant(id: string): void {\n this._inputElement.setAttribute('aria-activedescendant', id);\n }\n\n public setInputValue(value: string, emitEvents: boolean): void {\n if (this._inputElement.value === value) {\n return;\n }\n\n this._inputElement.value = value;\n \n if (this._inputMask) {\n this._inputMask.updateMask();\n }\n\n if (emitEvents) {\n this._inputElement.dispatchEvent(new Event('change'));\n this._inputElement.dispatchEvent(new Event('input'));\n }\n }\n\n public isInputDisabled(): boolean {\n return this._inputElement.disabled;\n }\n\n public isInputFocused(): boolean {\n return getActiveElement(this._component.ownerDocument) === this._inputElement;\n }\n\n public getInputValue(): string {\n return this._inputMask ? this._inputMask.maskedValue : this._inputElement.value;\n }\n\n public setDisabled(value: boolean): void {\n this._inputElement.disabled = value;\n this._inputElement.setAttribute('aria-disabled', value.toString());\n if (this._toggleElement) {\n this._toggleElement.setAttribute('aria-disabled', value.toString());\n if (this._toggleElement.hasOwnProperty('disabled')) {\n (this._toggleElement as HTMLButtonElement).disabled = value;\n }\n }\n }\n\n public tryFocusInput(): void {\n this._inputElement.focus();\n }\n\n public tryBlurInput(): void {\n this._inputElement.blur();\n }\n\n public selectInputText(): void {\n this._inputElement.select();\n }\n\n public emitInputEvent(type: string, data?: any): void {\n emitEvent(this._inputElement, type, data);\n }\n}\n", "import { isDate, Platform } from '@tylertech/forge-core';\nimport { CalendarMode, ICalendarDateSelectEventData } from '../calendar';\nimport { isSameDate } from '../core';\nimport { BaseDatePickerFoundation, IBaseDatePickerFoundation } from './base/base-date-picker-foundation';\nimport { IDatePickerAdapter } from './date-picker-adapter';\nimport { DATE_PICKER_CONSTANTS } from './date-picker-constants';\n\nexport interface IDatePickerFoundation extends IBaseDatePickerFoundation<Date | string> {}\n\nexport class DatePickerFoundation extends BaseDatePickerFoundation<IDatePickerAdapter, Date | string | null | undefined, Date> implements IDatePickerFoundation {\n protected _mode: CalendarMode = 'single';\n\n constructor(adapter: IDatePickerAdapter) {\n super(adapter);\n }\n\n protected _initializeState(): void {\n if (!this._value) {\n this._value = this._coerceDateValue(this._adapter.getInputValue());\n }\n }\n\n protected _emitChangeEvent(value: Date | null | undefined, force?: boolean): boolean {\n const typedValue = this._getTypedValue(value);\n const wasCancelled = !this._adapter.emitHostEvent(DATE_PICKER_CONSTANTS.events.CHANGE, typedValue, true, !force);\n if (!wasCancelled) {\n this._setValue(value);\n return true;\n }\n return false;\n }\n\n protected _emitOpenEvent(): void {\n this._adapter.emitHostEvent(DATE_PICKER_CONSTANTS.events.OPEN, undefined, false);\n }\n\n protected _emitCloseEvent(): void {\n this._adapter.emitHostEvent(DATE_PICKER_CONSTANTS.events.CLOSE, undefined, false);\n }\n\n protected _onToday(): void {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n this._onDateSelected({ date: today, selected: true, type: 'date' });\n }\n\n protected _onClear(): void {\n this._onDateSelected({ date: null, selected: false, type: 'date' });\n }\n\n protected _getCurrentValue(): Date | null | undefined {\n return this._value;\n }\n\n protected _setFormattedInputValue(suppressValueChanges?: boolean): void {\n const formattedDate = this._formatDate(this._value);\n if (formattedDate) {\n this._adapter.setInputValue(formattedDate, suppressValueChanges ? false : this._notifyInputValueChanges);\n } else {\n if (!this._allowInvalidDate) {\n this._adapter.setInputValue('', suppressValueChanges ? false : this._notifyInputValueChanges);\n }\n }\n }\n\n protected _setValue(value?: Date | null): void {\n if (!value || this._isDateValueAcceptable(value)) {\n this._value = value;\n }\n }\n\n protected _onDateSelected(event: ICalendarDateSelectEventData): void {\n const value = event.date;\n\n if (event.type === 'date') {\n this._closeCalendar(true);\n }\n \n if (!this._emitChangeEvent(value)) {\n return;\n }\n\n const formattedValue = this._formatDate(value);\n\n this._adapter.setInputValue(formattedValue, this._notifyInputValueChanges);\n this._formatInputValue();\n\n if (!Platform.isMobile) {\n this._adapter.selectInputText();\n }\n }\n\n protected override _openCalendar(emitOpenEvent?: boolean): void {\n super._openCalendar(emitOpenEvent);\n\n const currentValue = this._getCurrentValue();\n if (!!currentValue) {\n this._adapter.goToCalendarDate(new Date(currentValue));\n }\n }\n\n protected override _applyMin(): void {\n if (this._value && !this._isDateValueAcceptable(this._value)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n super._applyMin();\n }\n\n protected override _applyMax(): void {\n if (this._value && !this._isDateValueAcceptable(this._value)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n super._applyMax();\n }\n\n protected _applyDisabledDates(): void {\n if (this._value && !this._isDateValueAcceptable(this._value)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n }\n\n protected _applyDisabledDaysOfWeek(): void {\n if (this._value && !this._isDateValueAcceptable(this._value)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n }\n\n protected _handleInput(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (this._masked) {\n this._adapter.emitInputEvent(DATE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);\n }\n if (!isSameDate(date, this._value) && this._isDateValueAcceptable(date)) {\n this._emitChangeEvent(date);\n }\n }\n\n protected _onInputValueChanged(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n if (this._masked && sanitizedValue) {\n // If masked, allow clearing value by setting input.value directly\n // To set a date value, dispatch `input` event and mask will handle it.\n return;\n }\n const date = this._coerceDateValue(sanitizedValue);\n if (!isSameDate(date, this._value) && this._isDateValueAcceptable(date)) {\n this.value = date;\n this._emitChangeEvent(this._value);\n }\n }\n\n private _applyValue(): void {\n this._setFormattedInputValue();\n if (this._open) {\n this._adapter.setCalendarValue(this._value);\n }\n }\n\n public get value(): Date | string | null | undefined {\n const date = this._getTypedValue(this._value);\n\n if (!date) {\n return null;\n }\n\n if (isDate(date)) {\n return new Date(date.getTime());\n }\n\n return date;\n }\n\n public set value(value: Date | string | null | undefined) {\n if (this._value !== value) {\n this._setValue(this._coerceDateValue(value));\n if (this._isInitialized) {\n this._applyValue();\n }\n }\n }\n}\n", "import { attachShadowTemplate, CustomElement } from '@tylertech/forge-core';\nimport { tylIconInsertInvitation } from '@tylertech/tyler-icons/standard';\nimport { CalendarComponent } from '../calendar';\nimport { IconComponent, IconRegistry } from '../icon';\nimport { IconButtonComponent } from '../icon-button';\nimport { PopupComponent } from '../popup';\nimport { BaseDatePickerComponent, IBaseDatePickerComponent } from './base/base-date-picker';\nimport { BASE_DATE_PICKER_CONSTANTS } from './base/base-date-picker-constants';\nimport { DatePickerAdapter } from './date-picker-adapter';\nimport { DATE_PICKER_CONSTANTS } from './date-picker-constants';\nimport { DatePickerFoundation } from './date-picker-foundation';\n\nconst template = '<template><slot></slot></template>';\nconst styles = ':host{display:block}:host([hidden]){display:none}';\n\nexport interface IDatePickerComponent extends IBaseDatePickerComponent<Date | string | null> {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-date-picker': IDatePickerComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-date-picker-change': CustomEvent<Date | string | null>;\n 'forge-date-picker-open': CustomEvent<void>;\n 'forge-date-picker-close': CustomEvent<void>;\n 'forge-date-picker-input': CustomEvent<string>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-date-picker>` element.\n * \n * @tag forge-date-picker\n */\n@CustomElement({\n name: DATE_PICKER_CONSTANTS.elementName,\n dependencies: [\n PopupComponent,\n CalendarComponent,\n IconButtonComponent,\n IconComponent\n ]\n})\nexport class DatePickerComponent extends BaseDatePickerComponent<Date | string | undefined, Date, DatePickerFoundation> implements IDatePickerComponent {\n public static get observedAttributes(): string[] {\n return [\n ...Object.values(BASE_DATE_PICKER_CONSTANTS.observedAttributes),\n DATE_PICKER_CONSTANTS.observedAttributes.VALUE\n ];\n }\n\n constructor() {\n super();\n IconRegistry.define(tylIconInsertInvitation);\n attachShadowTemplate(this, template, styles);\n this._foundation = new DatePickerFoundation(new DatePickerAdapter(this));\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case DATE_PICKER_CONSTANTS.observedAttributes.VALUE:\n this.value = newValue;\n return;\n }\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n}\n", "import { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core/delegates/form-field-component-delegate';\nimport { ITextFieldComponent, ITextFieldComponentDelegateConfig, TextFieldComponentDelegate } from '../text-field';\nimport { IDatePickerComponent } from './date-picker';\nimport { DATE_PICKER_CONSTANTS } from './date-picker-constants';\n\nexport type DatePickerComponentDelegateProps = Partial<IDatePickerComponent>;\nexport interface IDatePickerComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n useDropdownIcon?: boolean;\n textFieldDelegateConfig?: ITextFieldComponentDelegateConfig;\n}\nexport interface IDatePickerComponentDelegateConfig extends IBaseComponentDelegateConfig<IDatePickerComponent, IDatePickerComponentDelegateOptions> {}\n\nexport class DatePickerComponentDelegate extends FormFieldComponentDelegate<IDatePickerComponent, IDatePickerComponentDelegateOptions> {\n private _textFieldDelegate: TextFieldComponentDelegate;\n\n constructor(config?: IDatePickerComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IDatePickerComponent {\n const datePicker = document.createElement(DATE_PICKER_CONSTANTS.elementName);\n this._attachTextField(datePicker);\n return datePicker;\n }\n\n public getInputElement(): HTMLInputElement {\n return this._textFieldDelegate.inputElement;\n }\n\n public getTextFieldElement(): ITextFieldComponent {\n return this._textFieldDelegate.element;\n }\n\n public get value(): any {\n return this._element.value;\n }\n public set value(value: any) {\n this._element.value = value;\n }\n\n public get disabled(): boolean {\n return this._element.disabled;\n }\n public set disabled(value: boolean) {\n this._element.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._textFieldDelegate.invalid || false;\n }\n public set invalid(value: boolean) {\n this._textFieldDelegate.invalid = value;\n }\n\n public onChange(listener: (value: string) => void): void {\n if (this._element.masked) {\n this._element.addEventListener(DATE_PICKER_CONSTANTS.events.INPUT, evt => listener((evt.target as HTMLInputElement).value));\n } else {\n this.getInputElement().addEventListener('input', evt => listener((evt.target as HTMLInputElement).value));\n }\n }\n\n public onInput(listener: (value: string) => void): void {\n if (this._element.masked) {\n this._element.addEventListener(DATE_PICKER_CONSTANTS.events.INPUT, (evt: CustomEvent) => listener(evt.detail));\n } else {\n this._textFieldDelegate.inputElement.addEventListener('input', evt => listener((evt.target as HTMLInputElement).value));\n }\n }\n\n public onFocus(listener: (evt: FocusEvent) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('focus', (evt: FocusEvent) => listener(evt));\n }\n\n public onBlur(listener: (evt: FocusEvent) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('blur', (evt: FocusEvent) => listener(evt));\n }\n\n private _attachTextField(datePicker: IDatePickerComponent): void {\n const textFieldConfig: ITextFieldComponentDelegateConfig = {\n props: { ...this._config.options?.textFieldDelegateConfig?.props },\n options: { ...this._config.options?.textFieldDelegateConfig?.options }\n };\n this._textFieldDelegate = new TextFieldComponentDelegate(textFieldConfig);\n datePicker.appendChild(this._textFieldDelegate.element);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { DatePickerComponent } from './date-picker';\n\nexport * from './date-picker';\nexport * from './date-picker-adapter';\nexport * from './date-picker-component-delegate';\nexport * from './date-picker-constants';\nexport * from './date-picker-foundation';\n\nexport function defineDatePickerComponent(): void {\n defineCustomElement(DatePickerComponent);\n}\n"],
|
|
5
|
+
"mappings": "uzBAEA,IAAMA,EAA2C,GAAGC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AQG,GAAqBD,EAASC,EAAI,MAAM,CAAC,EAE7G,KAAK,mBAAmB,aAAa,iBAAiB,QAASA,GAAOD,EAAUC,EAAI,OAA4B,KAAK,CAAC,CAE1H,CAEO,QAAQD,EAA2C,CACxD,KAAK,mBAAmB,aAAa,iBAAiB,QAAUC,GAAoBD,EAASC,CAAG,CAAC,CACnG,CAEO,OAAOD,EAA2C,CACvD,KAAK,mBAAmB,aAAa,iBAAiB,OAASC,GAAoBD,EAASC,CAAG,CAAC,CAClG,CAEQ,iBAAiBJ,EAAwC,CA/EnE,IAAAK,EAAAC,EAAAC,EAAAC,EAgFI,IAAMC,EAAqD,CACzD,MAAOC,EAAA,IAAKJ,GAAAD,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,0BAAtB,YAAAC,EAA+C,OAC3D,QAASI,EAAA,IAAKF,GAAAD,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,0BAAtB,YAAAC,EAA+C,QAC/D,EACA,KAAK,mBAAqB,IAAIG,EAA2BF,CAAe,EACxET,EAAW,YAAY,KAAK,mBAAmB,OAAO,CACxD,CACF,EC9EO,SAASY,IAAkC,CAChDC,EAAoBC,CAAmB,CACzC",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "observedAttributes", "selectors", "events", "DATE_PICKER_CONSTANTS", "DatePickerAdapter", "BaseDatePickerAdapter", "component", "DATE_PICKER_CONSTANTS", "targetElement", "CalendarDropdown", "options", "_a", "DateInputMask", "tryCreateAriaControlsPlaceholder", "setAriaControls", "type", "listener", "capture", "context", "destroyListenerCb", "listenOwnProperty", "calendarConfig", "dropdownConfig", "id", "value", "emitEvents", "getActiveElement", "data", "emitEvent", "DatePickerFoundation", "BaseDatePickerFoundation", "adapter", "value", "force", "typedValue", "DATE_PICKER_CONSTANTS", "today", "suppressValueChanges", "formattedDate", "event", "formattedValue", "Platform", "emitOpenEvent", "currentValue", "sanitizedValue", "date", "isSameDate", "isDate", "template", "styles", "DatePickerComponent", "BaseDatePickerComponent", "BASE_DATE_PICKER_CONSTANTS", "DATE_PICKER_CONSTANTS", "IconRegistry", "tylIconInsertInvitation", "attachShadowTemplate", "DatePickerFoundation", "DatePickerAdapter", "name", "oldValue", "newValue", "__decorateClass", "CustomElement", "PopupComponent", "CalendarComponent", "IconButtonComponent", "IconComponent", "DatePickerComponentDelegate", "FormFieldComponentDelegate", "config", "datePicker", "DATE_PICKER_CONSTANTS", "value", "listener", "evt", "_a", "_b", "_c", "_d", "textFieldConfig", "__spreadValues", "TextFieldComponentDelegate", "defineDatePickerComponent", "defineCustomElement", "DatePickerComponent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{b as v,c as A}from"./chunk.EC5JFSHR.js";import{a as s,b as h,f as E,g as D}from"./chunk.F3MP6AXF.js";import{a as x}from"./chunk.UWYANU5D.js";import{a as f}from"./chunk.KTGSZEAG.js";import{a as w,b as k}from"./chunk.DL7NX432.js";import{e as I,g as l,l as T}from"./chunk.LJLEPTLU.js";import{t as g}from"./chunk.4LA6HEA7.js";import{k as m}from"./chunk.J2M2MXP2.js";import{a as y,b as C,f as p}from"./chunk.MCIQXNKY.js";var R=`${k}tab`,B={DISABLED:"disabled",ACTIVE:"active",STRETCH:"stretch"},F={ROOT:".forge-tab",RIPPLE:".forge-tab__ripple",INDICATOR:".mdc-tab-indicator",CONTENT:".forge-tab__content",DEFAULT_SLOT:"slot:not([name])"},V={DISABLED:"forge-tab--disabled",ACTIVE:"forge-tab--active"},P={INTERACTED:`${R}-interacted`},i={elementName:R,attributes:B,selectors:F,classes:V,events:P};var z={ACTIVE:"mdc-tab-indicator--active",FADE:"mdc-tab-indicator--fade",NO_TRANSITION:"mdc-tab-indicator--no-transition"},O={CONTENT_SELECTOR:".mdc-tab-indicator__content"};var n=function(r){s(t,r);function t(e){return r.call(this,h(h({},t.defaultAdapter),e))||this}return Object.defineProperty(t,"cssClasses",{get:function(){return z},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return O},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},computeContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setContentStyleProperty:function(){}}},enumerable:!1,configurable:!0}),t.prototype.computeContentClientRect=function(){return this.adapter.computeContentClientRect()},t}(E);var L=function(r){s(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.activate=function(){this.adapter.addClass(n.cssClasses.ACTIVE)},t.prototype.deactivate=function(){this.adapter.removeClass(n.cssClasses.ACTIVE)},t}(n);var M=function(r){s(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.activate=function(e){if(!e){this.adapter.addClass(n.cssClasses.ACTIVE);return}var o=this.computeContentClientRect(),a=e.width/o.width,c=e.left-o.left;this.adapter.addClass(n.cssClasses.NO_TRANSITION),this.adapter.setContentStyleProperty("transform","translateX("+c+"px) scaleX("+a+")"),this.computeContentClientRect(),this.adapter.removeClass(n.cssClasses.NO_TRANSITION),this.adapter.addClass(n.cssClasses.ACTIVE),this.adapter.setContentStyleProperty("transform","")},t.prototype.deactivate=function(){this.adapter.removeClass(n.cssClasses.ACTIVE)},t}(n);var S=function(r){s(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(){this.content=this.root.querySelector(n.strings.CONTENT_SELECTOR)},t.prototype.computeContentClientRect=function(){return this.foundation.computeContentClientRect()},t.prototype.getDefaultFoundation=function(){var e=this,o={addClass:function(a){return e.root.classList.add(a)},removeClass:function(a){return e.root.classList.remove(a)},computeContentClientRect:function(){return e.content.getBoundingClientRect()},setContentStyleProperty:function(a,c){e.content.style.setProperty(a,c)}};return this.root.classList.contains(n.cssClasses.FADE)?new L(o):new M(o)},t.prototype.activate=function(e){this.foundation.activate(e)},t.prototype.deactivate=function(){this.foundation.deactivate()},t}(D);var _=class{constructor(t){this._root=t}get root(){return this._root}get unbounded(){return!1}get disabled(){return this._root.disabled}},b=class extends x{constructor(e){super(e);this._rootElement=l(this._component,i.selectors.ROOT),this._content=l(this._component,i.selectors.CONTENT),this._rippleElement=l(this._component,i.selectors.RIPPLE),this._tabIndicatorElement=l(this._component,i.selectors.INDICATOR)}initialize(){this._component.hasAttribute("role")||this._component.setAttribute("role","tab")}initializeRipple(){let e=new _(this._component),o=C(y({},v.createAdapter(e)),{addClass:c=>this._rippleElement.classList.add(c),removeClass:c=>this._rippleElement.classList.remove(c),updateCssVariable:(c,N)=>this._rippleElement.style.setProperty(c,N)}),a=new A(o);this._rippleInstance=new v(this._component,a)}destroyRipple(){this._rippleInstance&&this._rippleInstance.destroy()}initializeIndicator(){this._tabIndicator=new S(this._tabIndicatorElement)}destroyIndicator(){this._tabIndicator&&(this._tabIndicator.destroy(),this._tabIndicator=void 0)}activateIndicator(e){this._tabIndicator&&this._tabIndicator.activate(e)}deactivateIndicator(){this._tabIndicator&&this._tabIndicator.deactivate()}computeIndicatorBounds(){return this._tabIndicator?this._tabIndicator.computeContentClientRect():void 0}addButtonListener(e,o){this._component.addEventListener(e,o)}removeButtonListener(e,o){this._component.removeEventListener(e,o)}setDisabled(e){g(this._rootElement,e,i.classes.DISABLED),this.setTabIndex(e?-1:0),this._component.setAttribute("aria-disabled",e.toString())}setActive(e){g(this._rootElement,e,i.classes.ACTIVE),this.setTabIndex(e?0:-1),this._component.setAttribute("aria-selected",e.toString())}getOffsetLeft(){return this._rootElement.offsetLeft}getOffsetWidth(){return this._rootElement.offsetWidth}getContentOffsetLeft(){return this._content.offsetLeft}getContentOffsetWidth(){return this._content.offsetWidth}setTabIndex(e){this._component.tabIndex=e}};var u=class{constructor(t){this._adapter=t;this._disabled=!1;this._active=!1;this._stretch=!1;this._clickListener=e=>this._onClick(e)}initialize(){this._adapter.initialize(),this._adapter.initializeRipple(),this._adapter.initializeIndicator(),this._adapter.setDisabled(this._disabled),this._setActive(this._active),this._adapter.addButtonListener("click",this._clickListener)}disconnect(){this._adapter.destroyRipple(),this._adapter.destroyIndicator(),this._adapter.removeButtonListener("click",this._clickListener)}_onClick(t){this._disabled||this._active||this._adapter.emitHostEvent(i.events.INTERACTED,void 0,!0)}_setActive(t,e){this._active=t,this._adapter.setActive(this._active),this._active?this._adapter.activateIndicator(e):this._adapter.deactivateIndicator()}activate(t){this._setActive(!0,t)}deactivate(){this._setActive(!1)}computeIndicatorBounds(){return this._adapter.computeIndicatorBounds()}computeDimensions(){let t=this._adapter.getOffsetWidth(),e=this._adapter.getOffsetLeft(),o=this._adapter.getContentOffsetWidth(),a=this._adapter.getContentOffsetLeft();return{contentLeft:e+a,contentRight:e+a+o,rootLeft:e,rootRight:e+t}}setTabIndex(t){this._adapter.setTabIndex(t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get active(){return this._active}set active(t){this._active!==t&&(this._setActive(t),this._adapter.toggleHostAttribute(i.attributes.ACTIVE,this._active))}get stretch(){return this._stretch}set stretch(t){this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(i.attributes.STRETCH,this._stretch))}};var H='<template><div class="forge-tab" part="button"><slot name="top"></slot><span class="forge-tab__content" part="content"><slot name="leading"></slot><span class="forge-tab__text" part="text"><slot></slot></span><slot name="trailing"></slot></span><span class="mdc-tab-indicator" part="indicator-container"><span class="mdc-tab-indicator__content mdc-tab-indicator__content--underline" part="indicator"></span> </span><span class="forge-tab__ripple" part="ripple-container"></span></div></template>',W='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.mdc-tab-indicator .mdc-tab-indicator__content--icon{color:#ffc107;color:var(--mdc-theme-secondary,#ffc107)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:-webkit-box;display:flex;position:absolute;top:0;left:0;-webkit-box-pack:center;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{-webkit-transform-origin:left;transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{-webkit-transition:250ms -webkit-transform cubic-bezier(.4, 0, .2, 1);transition:250ms -webkit-transform cubic-bezier(.4, 0, .2, 1);transition:250ms transform cubic-bezier(.4, 0, .2, 1);transition:250ms transform cubic-bezier(.4, 0, .2, 1),250ms -webkit-transform cubic-bezier(.4, 0, .2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{-webkit-transition:none;transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{-webkit-transition:150ms opacity linear;transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{-webkit-transition-delay:0.1s;transition-delay:0.1s}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));position:relative;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-flex:1;flex:1 0 auto;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:0;background:0 0;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1;padding-right:24px;padding-left:24px;height:100%;width:100%}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=top]){padding-top:8px}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=top]),.forge-tab ::slotted([slot=trailing]){-webkit-transition:150ms color linear;transition:150ms color linear;fill:currentColor;width:24px;height:24px;font-size:24px;z-index:2}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){padding:0 8px}.forge-tab__content{position:relative;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;height:inherit;pointer-events:none}.forge-tab__text{-webkit-transition:150ms color linear;transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.forge-tab--active:not(.forge-tab--disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-tab--active:not(.forge-tab--disabled) ::slotted([slot=leading]),.forge-tab--active:not(.forge-tab--disabled) ::slotted([slot=top]),.forge-tab--active:not(.forge-tab--disabled) ::slotted([slot=trailing]){-webkit-transition-delay:0.1s;transition-delay:0.1s}.forge-tab__ripple{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.forge-tab__ripple::after,.forge-tab__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-tab__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-tab__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-tab__ripple.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-tab__ripple.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-tab__ripple.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-tab__ripple.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-tab__ripple.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-tab__ripple::after,.forge-tab__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-tab__ripple.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-tab__ripple::after,.forge-tab__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-tab__ripple.mdc-ripple-surface--hover::before,.forge-tab__ripple:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-tab__ripple.mdc-ripple-upgraded--background-focused::before,.forge-tab__ripple:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-tab__ripple:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-tab__ripple:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-tab__ripple.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}:host{display:inline-block;outline:0}:host([hidden]){display:none}:host([stretch]){-webkit-box-flex:1;flex:1}:host([disabled]){opacity:.38;pointer-events:none}:host([theme=primary]){--mdc-theme-primary:var(--mdc-theme-primary, $defaultValue)}:host([theme=primary]) .forge-tab.forge-tab--active{color:#3f51b5}:host([theme=secondary]){--mdc-theme-primary:var(--mdc-theme-secondary, $defaultValue)}:host([theme=secondary]) .forge-tab.forge-tab--active{color:#ffc107}:host([theme=warning]){--mdc-theme-primary:var(--mdc-theme-warning, $defaultValue)}:host([theme=warning]) .forge-tab.forge-tab--active{color:#d14900}:host([theme=success]){--mdc-theme-primary:var(--mdc-theme-success, $defaultValue)}:host([theme=success]) .forge-tab.forge-tab--active{color:#2e7d32}:host([theme=danger]){--mdc-theme-primary:var(--mdc-theme-danger, $defaultValue)}:host([theme=danger]) .forge-tab.forge-tab--active{color:#b00020}:host([theme=info]){--mdc-theme-primary:var(--mdc-theme-info, $defaultValue)}:host([theme=info]) .forge-tab.forge-tab--active{color:#424242}',d=class extends T{constructor(){super();I(this,H,W),this._foundation=new u(new b(this))}static get observedAttributes(){return[i.attributes.DISABLED,i.attributes.ACTIVE,i.attributes.STRETCH]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,o,a){switch(e){case i.attributes.DISABLED:this.disabled=m(a);break;case i.attributes.ACTIVE:this.active=m(a);break;case i.attributes.STRETCH:this.stretch=m(a);break}}activate(e){this._foundation.activate(e)}deactivate(){this._foundation.deactivate()}computeIndicatorBounds(){return this._foundation.computeIndicatorBounds()}computeDimensions(){return this._foundation.computeDimensions()}setTabIndex(e){this._foundation.setTabIndex(e)}};p([f()],d.prototype,"disabled",2),p([f()],d.prototype,"active",2),p([f()],d.prototype,"stretch",2),d=p([w({name:i.elementName})],d);export{i as a,b,u as c,d};
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2018 Google Inc.
|
|
10
|
+
*
|
|
11
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
* in the Software without restriction, including without limitation the rights
|
|
14
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
* furnished to do so, subject to the following conditions:
|
|
17
|
+
*
|
|
18
|
+
* The above copyright notice and this permission notice shall be included in
|
|
19
|
+
* all copies or substantial portions of the Software.
|
|
20
|
+
*
|
|
21
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
27
|
+
* THE SOFTWARE.
|
|
28
|
+
*/
|
|
29
|
+
//# sourceMappingURL=chunk.OML7MHH6.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/tabs/tab/tab-constants.ts", "../../../../../../node_modules/@material/tab-indicator/constants.ts", "../../../../../../node_modules/@material/tab-indicator/foundation.ts", "../../../../../../node_modules/@material/tab-indicator/fading-foundation.ts", "../../../../../../node_modules/@material/tab-indicator/sliding-foundation.ts", "../../../../../../node_modules/@material/tab-indicator/component.ts", "../../src/tabs/tab/tab-adapter.ts", "../../src/tabs/tab/tab-foundation.ts", "../../src/tabs/tab/tab.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}tab`;\n\nconst attributes = {\n DISABLED: 'disabled',\n ACTIVE: 'active',\n STRETCH: 'stretch'\n};\n\nconst selectors = {\n ROOT: '.forge-tab',\n RIPPLE: '.forge-tab__ripple',\n INDICATOR: '.mdc-tab-indicator',\n CONTENT: '.forge-tab__content',\n DEFAULT_SLOT: 'slot:not([name])'\n};\n\nconst classes = {\n DISABLED: 'forge-tab--disabled',\n ACTIVE: 'forge-tab--active'\n};\n\nconst events = {\n INTERACTED: `${elementName}-interacted`\n};\n\nexport const TAB_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n classes,\n events\n};\n\nexport interface ITabDimensions {\n rootLeft: number;\n rootRight: number;\n contentLeft: number;\n contentRight: number;\n}\n", null, null, null, null, null, "import { getShadowElement, toggleClass } from '@tylertech/forge-core';\nimport { MDCTabIndicator } from '@material/tab-indicator';\nimport { IBaseAdapter, BaseAdapter } from '../../core/base/base-adapter';\nimport { ITabComponent } from './tab';\nimport { TAB_CONSTANTS } from './tab-constants';\nimport { ForgeRipple, ForgeRippleCapableSurface, ForgeRippleFoundation } from '../../ripple';\n\nexport interface ITabAdapter extends IBaseAdapter {\n initialize(): void;\n initializeIndicator(): void;\n destroyIndicator(): void;\n computeIndicatorBounds(): DOMRect | undefined;\n activateIndicator(previousIndicatorClientRect?: DOMRect): void;\n deactivateIndicator(): void;\n initializeRipple(): void;\n destroyRipple(): void;\n addButtonListener(type: string, listener: (evt: Event) => void): void;\n removeButtonListener(type: string, listener: (evt: Event) => void): void;\n setDisabled(value: boolean): void;\n setActive(value: boolean): void;\n getOffsetLeft(): number;\n getOffsetWidth(): number;\n getContentOffsetLeft(): number;\n getContentOffsetWidth(): number;\n setTabIndex(value: number): void;\n}\n\nclass TabRippleSurface implements ForgeRippleCapableSurface {\n constructor(private _root: ITabComponent) {}\n\n public get root(): Element {\n return this._root;\n }\n\n public get unbounded(): boolean | undefined {\n return false;\n }\n\n public get disabled(): boolean | undefined {\n return this._root.disabled;\n }\n}\n\nexport class TabAdapter extends BaseAdapter<ITabComponent> implements ITabAdapter {\n private _rootElement: HTMLButtonElement;\n private _content: HTMLElement;\n private _rippleElement: HTMLElement;\n private _rippleInstance: ForgeRipple | undefined;\n private _tabIndicatorElement: HTMLElement;\n private _tabIndicator: MDCTabIndicator | undefined;\n\n constructor(component: ITabComponent) {\n super(component);\n this._rootElement = getShadowElement(this._component, TAB_CONSTANTS.selectors.ROOT) as HTMLButtonElement;\n this._content = getShadowElement(this._component, TAB_CONSTANTS.selectors.CONTENT);\n this._rippleElement = getShadowElement(this._component, TAB_CONSTANTS.selectors.RIPPLE);\n this._tabIndicatorElement = getShadowElement(this._component, TAB_CONSTANTS.selectors.INDICATOR);\n }\n\n public initialize(): void {\n if (!this._component.hasAttribute('role')) {\n this._component.setAttribute('role', 'tab');\n }\n }\n\n public initializeRipple(): void {\n const rippleCapableSurface = new TabRippleSurface(this._component);\n const rippleAdapter = {\n ...ForgeRipple.createAdapter(rippleCapableSurface),\n addClass: (className: string) => this._rippleElement.classList.add(className),\n removeClass: (className: string) => this._rippleElement.classList.remove(className),\n updateCssVariable: (varName: string, value: string) => this._rippleElement.style.setProperty(varName, value)\n };\n const rippleFoundation = new ForgeRippleFoundation(rippleAdapter);\n this._rippleInstance = new ForgeRipple(this._component, rippleFoundation);\n }\n\n public destroyRipple(): void {\n if (this._rippleInstance) {\n this._rippleInstance.destroy();\n }\n }\n\n public initializeIndicator(): void {\n this._tabIndicator = new MDCTabIndicator(this._tabIndicatorElement);\n }\n\n public destroyIndicator(): void {\n if (this._tabIndicator) {\n this._tabIndicator.destroy();\n this._tabIndicator = undefined;\n }\n }\n\n public activateIndicator(previousIndicatorClientRect?: DOMRect): void {\n if (this._tabIndicator) {\n this._tabIndicator.activate(previousIndicatorClientRect);\n }\n }\n\n public deactivateIndicator(): void {\n if (this._tabIndicator) {\n this._tabIndicator.deactivate();\n }\n }\n\n public computeIndicatorBounds(): DOMRect | undefined {\n return this._tabIndicator ? this._tabIndicator.computeContentClientRect() as DOMRect : undefined;\n }\n\n public addButtonListener(type: string, listener: (evt: Event) => void): void {\n this._component.addEventListener(type, listener);\n }\n\n public removeButtonListener(type: string, listener: (evt: Event) => void): void {\n this._component.removeEventListener(type, listener);\n }\n\n public setDisabled(value: boolean): void {\n toggleClass(this._rootElement, value, TAB_CONSTANTS.classes.DISABLED);\n this.setTabIndex(!value ? 0 : -1);\n this._component.setAttribute('aria-disabled', value.toString());\n }\n\n public setActive(value: boolean): void {\n toggleClass(this._rootElement, value, TAB_CONSTANTS.classes.ACTIVE);\n this.setTabIndex(value ? 0 : -1);\n this._component.setAttribute('aria-selected', value.toString());\n }\n\n public getOffsetLeft(): number {\n return this._rootElement.offsetLeft;\n }\n \n public getOffsetWidth(): number {\n return this._rootElement.offsetWidth;\n }\n\n public getContentOffsetLeft(): number {\n return this._content.offsetLeft;\n }\n\n public getContentOffsetWidth(): number {\n return this._content.offsetWidth;\n }\n\n public setTabIndex(value: number): void {\n this._component.tabIndex = value;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { ITabAdapter } from './tab-adapter';\nimport { TAB_CONSTANTS, ITabDimensions } from './tab-constants';\n\nexport interface ITabFoundation extends ICustomElementFoundation {\n disabled: boolean;\n active: boolean;\n stretch: boolean;\n activate(previousIndicatorClientRect?: DOMRect): void;\n deactivate(): void;\n computeIndicatorBounds(): DOMRect | undefined;\n computeDimensions(): ITabDimensions;\n setTabIndex(value: number): void;\n}\n\nexport class TabFoundation implements ITabFoundation {\n private _disabled = false;\n private _active = false;\n private _stretch = false;\n private _clickListener: (evt: MouseEvent) => void;\n\n constructor(private _adapter: ITabAdapter) {\n this._clickListener = (evt: MouseEvent) => this._onClick(evt);\n }\n\n public initialize(): void {\n this._adapter.initialize();\n this._adapter.initializeRipple();\n this._adapter.initializeIndicator();\n this._adapter.setDisabled(this._disabled);\n this._setActive(this._active);\n this._adapter.addButtonListener('click', this._clickListener);\n }\n \n public disconnect(): void {\n this._adapter.destroyRipple();\n this._adapter.destroyIndicator();\n this._adapter.removeButtonListener('click', this._clickListener);\n }\n\n private _onClick(evt: MouseEvent): void {\n if (this._disabled) {\n return;\n }\n if (!this._active) {\n this._adapter.emitHostEvent(TAB_CONSTANTS.events.INTERACTED, undefined, true);\n }\n }\n\n private _setActive(isActive: boolean, previousIndicatorClientRect?: DOMRect): void {\n this._active = isActive;\n this._adapter.setActive(this._active);\n if (this._active) {\n this._adapter.activateIndicator(previousIndicatorClientRect);\n } else {\n this._adapter.deactivateIndicator();\n }\n }\n\n public activate(previousIndicatorClientRect?: DOMRect): void {\n this._setActive(true, previousIndicatorClientRect);\n }\n\n public deactivate(): void {\n this._setActive(false);\n }\n\n public computeIndicatorBounds(): DOMRect | undefined {\n return this._adapter.computeIndicatorBounds();\n }\n\n public computeDimensions(): ITabDimensions {\n const rootWidth = this._adapter.getOffsetWidth();\n const rootLeft = this._adapter.getOffsetLeft();\n const contentWidth = this._adapter.getContentOffsetWidth();\n const contentLeft = this._adapter.getContentOffsetLeft();\n return {\n contentLeft: rootLeft + contentLeft,\n contentRight: rootLeft + contentLeft + contentWidth,\n rootLeft,\n rootRight: rootLeft + rootWidth\n };\n }\n\n public setTabIndex(value: number): void {\n this._adapter.setTabIndex(value);\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.setDisabled(this._disabled);\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n public get active(): boolean {\n return this._active;\n }\n public set active(value: boolean) {\n if (this._active !== value) {\n this._setActive(value);\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.ACTIVE, this._active);\n }\n }\n\n public get stretch(): boolean {\n return this._stretch;\n }\n public set stretch(value: boolean) {\n if (this._stretch !== value) {\n this._stretch = value;\n this._adapter.toggleHostAttribute(TAB_CONSTANTS.attributes.STRETCH, this._stretch);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\nimport { TabAdapter } from './tab-adapter';\nimport { TabFoundation } from './tab-foundation';\nimport { TAB_CONSTANTS, ITabDimensions } from './tab-constants';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-tab\\\" part=\\\"button\\\"><slot name=\\\"top\\\"></slot><span class=\\\"forge-tab__content\\\" part=\\\"content\\\"><slot name=\\\"leading\\\"></slot><span class=\\\"forge-tab__text\\\" part=\\\"text\\\"><slot></slot></span><slot name=\\\"trailing\\\"></slot></span><span class=\\\"mdc-tab-indicator\\\" part=\\\"indicator-container\\\"><span class=\\\"mdc-tab-indicator__content mdc-tab-indicator__content--underline\\\" part=\\\"indicator\\\"></span> </span><span class=\\\"forge-tab__ripple\\\" part=\\\"ripple-container\\\"></span></div></template>';\nconst styles = '@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.mdc-tab-indicator .mdc-tab-indicator__content--icon{color:#ffc107;color:var(--mdc-theme-secondary,#ffc107)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:-webkit-box;display:flex;position:absolute;top:0;left:0;-webkit-box-pack:center;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{-webkit-transform-origin:left;transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{-webkit-transition:250ms -webkit-transform cubic-bezier(.4, 0, .2, 1);transition:250ms -webkit-transform cubic-bezier(.4, 0, .2, 1);transition:250ms transform cubic-bezier(.4, 0, .2, 1);transition:250ms transform cubic-bezier(.4, 0, .2, 1),250ms -webkit-transform cubic-bezier(.4, 0, .2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{-webkit-transition:none;transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{-webkit-transition:150ms opacity linear;transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{-webkit-transition-delay:0.1s;transition-delay:0.1s}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));position:relative;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-flex:1;flex:1 0 auto;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:0;background:0 0;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1;padding-right:24px;padding-left:24px;height:100%;width:100%}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=top]){padding-top:8px}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=top]),.forge-tab ::slotted([slot=trailing]){-webkit-transition:150ms color linear;transition:150ms color linear;fill:currentColor;width:24px;height:24px;font-size:24px;z-index:2}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){padding:0 8px}.forge-tab__content{position:relative;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;height:inherit;pointer-events:none}.forge-tab__text{-webkit-transition:150ms color linear;transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.forge-tab--active:not(.forge-tab--disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-tab--active:not(.forge-tab--disabled) ::slotted([slot=leading]),.forge-tab--active:not(.forge-tab--disabled) ::slotted([slot=top]),.forge-tab--active:not(.forge-tab--disabled) ::slotted([slot=trailing]){-webkit-transition-delay:0.1s;transition-delay:0.1s}.forge-tab__ripple{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.forge-tab__ripple::after,.forge-tab__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-tab__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-tab__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-tab__ripple.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-tab__ripple.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-tab__ripple.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-tab__ripple.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-tab__ripple.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-tab__ripple::after,.forge-tab__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-tab__ripple.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-tab__ripple::after,.forge-tab__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-tab__ripple.mdc-ripple-surface--hover::before,.forge-tab__ripple:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-tab__ripple.mdc-ripple-upgraded--background-focused::before,.forge-tab__ripple:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-tab__ripple:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-tab__ripple:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-tab__ripple.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}:host{display:inline-block;outline:0}:host([hidden]){display:none}:host([stretch]){-webkit-box-flex:1;flex:1}:host([disabled]){opacity:.38;pointer-events:none}:host([theme=primary]){--mdc-theme-primary:var(--mdc-theme-primary, $defaultValue)}:host([theme=primary]) .forge-tab.forge-tab--active{color:#3f51b5}:host([theme=secondary]){--mdc-theme-primary:var(--mdc-theme-secondary, $defaultValue)}:host([theme=secondary]) .forge-tab.forge-tab--active{color:#ffc107}:host([theme=warning]){--mdc-theme-primary:var(--mdc-theme-warning, $defaultValue)}:host([theme=warning]) .forge-tab.forge-tab--active{color:#d14900}:host([theme=success]){--mdc-theme-primary:var(--mdc-theme-success, $defaultValue)}:host([theme=success]) .forge-tab.forge-tab--active{color:#2e7d32}:host([theme=danger]){--mdc-theme-primary:var(--mdc-theme-danger, $defaultValue)}:host([theme=danger]) .forge-tab.forge-tab--active{color:#b00020}:host([theme=info]){--mdc-theme-primary:var(--mdc-theme-info, $defaultValue)}:host([theme=info]) .forge-tab.forge-tab--active{color:#424242}';\n\nexport interface ITabComponent extends IBaseComponent {\n disabled: boolean;\n active: boolean;\n stretch: boolean;\n activate(previousIndicatorClientRect?: DOMRect): void;\n deactivate(): void;\n computeIndicatorBounds(): DOMRect | undefined;\n computeDimensions(): ITabDimensions;\n setTabIndex(value: number): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-tab': ITabComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-tab-interacted': CustomEvent<void>;\n }\n}\n\n/**\n * The web component class behind the `<forge-tab>` custom element.\n * \n * @tag forge-tab\n */\n@CustomElement({\n name: TAB_CONSTANTS.elementName\n})\nexport class TabComponent extends BaseComponent implements ITabComponent {\n public static get observedAttributes(): string[] {\n return [\n TAB_CONSTANTS.attributes.DISABLED,\n TAB_CONSTANTS.attributes.ACTIVE,\n TAB_CONSTANTS.attributes.STRETCH\n ];\n }\n\n private _foundation: TabFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new TabFoundation(new TabAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case TAB_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.ACTIVE:\n this.active = coerceBoolean(newValue);\n break;\n case TAB_CONSTANTS.attributes.STRETCH:\n this.stretch = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare disabled: boolean;\n \n @FoundationProperty()\n public declare active: boolean;\n \n @FoundationProperty()\n public declare stretch: boolean;\n\n public activate(previousIndicatorClientRect?: DOMRect): void {\n this._foundation.activate(previousIndicatorClientRect);\n }\n\n public deactivate(): void {\n this._foundation.deactivate();\n }\n \n public computeIndicatorBounds(): DOMRect | undefined {\n return this._foundation.computeIndicatorBounds();\n }\n\n public computeDimensions(): ITabDimensions {\n return this._foundation.computeDimensions();\n }\n\n public setTabIndex(value: number): void {\n this._foundation.setTabIndex(value);\n }\n}\n"],
|
|
5
|
+
"mappings": "uaAEA,IAAMA,EAA2C,GAAGC,OAE9CC,EAAa,CACjB,SAAU,WACV,OAAQ,SACR,QAAS,SACX,EAEMC,EAAY,CAChB,KAAM,aACN,OAAQ,qBACR,UAAW,qBACX,QAAS,sBACT,aAAc,kBAChB,EAEMC,EAAU,CACd,SAAU,sBACV,OAAQ,mBACV,EAEMC,EAAS,CACb,WAAY,GAAGL,cACjB,EAEaM,EAAgB,CAC3B,YAAAN,EACA,WAAAE,EACA,UAAAC,EACA,QAAAC,EACA,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YAAY,SAASA,CAA2B,CACvD,CAEO,YAAmB,CACxB,KAAK,YAAY,WAAW,CAC9B,CAEO,wBAA8C,CACnD,OAAO,KAAK,YAAY,uBAAuB,CACjD,CAEO,mBAAoC,CACzC,OAAO,KAAK,YAAY,kBAAkB,CAC5C,CAEO,YAAYC,EAAqB,CACtC,KAAK,YAAY,YAAYA,CAAK,CACpC,CACF,EA3BiBC,EAAA,CADdC,EAAmB,GAvCTb,EAwCI,wBAGAY,EAAA,CADdC,EAAmB,GA1CTb,EA2CI,sBAGAY,EAAA,CADdC,EAAmB,GA7CTb,EA8CI,uBA9CJA,EAANY,EAAA,CAHNE,EAAc,CACb,KAAMT,EAAc,WACtB,CAAC,GACYL",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "selectors", "classes", "events", "TAB_CONSTANTS", "cssClasses", "strings", "MDCTabIndicatorFoundation", "_super", "__extends", "adapter", "__assign", "cssClasses", "strings", "MDCFoundation", "MDCFadingTabIndicatorFoundation", "_super", "__extends", "MDCTabIndicatorFoundation", "MDCSlidingTabIndicatorFoundation", "_super", "__extends", "previousIndicatorClientRect", "MDCTabIndicatorFoundation", "currentClientRect", "widthDelta", "xPosition", "MDCTabIndicator", "_super", "__extends", "root", "MDCTabIndicatorFoundation", "_this", "adapter", "className", "prop", "value", "MDCFadingTabIndicatorFoundation", "MDCSlidingTabIndicatorFoundation", "previousIndicatorClientRect", "MDCComponent", "TabRippleSurface", "_root", "TabAdapter", "BaseAdapter", "component", "getShadowElement", "TAB_CONSTANTS", "rippleCapableSurface", "rippleAdapter", "__spreadProps", "__spreadValues", "ForgeRipple", "className", "varName", "value", "rippleFoundation", "ForgeRippleFoundation", "MDCTabIndicator", "previousIndicatorClientRect", "type", "listener", "toggleClass", "TabFoundation", "_adapter", "evt", "TAB_CONSTANTS", "isActive", "previousIndicatorClientRect", "rootWidth", "rootLeft", "contentWidth", "contentLeft", "value", "template", "styles", "TabComponent", "BaseComponent", "attachShadowTemplate", "TabFoundation", "TabAdapter", "TAB_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "previousIndicatorClientRect", "value", "__decorateClass", "FoundationProperty", "CustomElement"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{d as Po}from"./chunk.JFAOCIGZ.js";import{f as To}from"./chunk.WYUMHNVZ.js";import{b as go}from"./chunk.4LQ2NTZ6.js";import{h as uo}from"./chunk.TLXWXBQO.js";import{f as So}from"./chunk.4KKMVMPN.js";import{d as Bo}from"./chunk.OML7MHH6.js";import{q as so}from"./chunk.XINI6PNZ.js";import{c as ao}from"./chunk.FIZVVCUB.js";import{e as Ao}from"./chunk.AM65KICK.js";import{d as co}from"./chunk.M5AHW6YM.js";import{d as lo}from"./chunk.POYFRYFF.js";import{b as xo}from"./chunk.VLGCUBD3.js";import{d as fo}from"./chunk.KGMCBPGV.js";import{d as eo}from"./chunk.6NARYF7U.js";import{d as no}from"./chunk.MKHU4IPO.js";import{b as to}from"./chunk.SGTKZRDH.js";import{d as mo}from"./chunk.UNFOIEF6.js";import{d as io}from"./chunk.XEZ7QJES.js";import{d as Co}from"./chunk.OBBYRQCY.js";import{b as po}from"./chunk.WEE3TIAW.js";import{b as ro}from"./chunk.EUUVSENP.js";import{b as Q}from"./chunk.MKMYJBTE.js";import{b as U}from"./chunk.CPK2WOYA.js";import{j as _}from"./chunk.CYRAGLUX.js";import{d as j}from"./chunk.XYK4TAXA.js";import{b as G}from"./chunk.AERZO3JD.js";import{b as H}from"./chunk.Y37FW3B4.js";import{d as N}from"./chunk.KUVFKOVR.js";import{d as K}from"./chunk.CYLDP7ML.js";import{d as y}from"./chunk.OJ54J4L3.js";import{e as v}from"./chunk.AH4YGLZ4.js";import{d as R}from"./chunk.TDWRBHQW.js";import{b as O}from"./chunk.6LRCYRAL.js";import{f as V}from"./chunk.3MMDUUTN.js";import{d as F}from"./chunk.TRIZ4QJI.js";import{d as E}from"./chunk.RDETMQHP.js";import{E as L}from"./chunk.LFBYFJTX.js";import{i as d}from"./chunk.N6MAUMFI.js";import{b as e}from"./chunk.H5IFZCUL.js";import{c as l}from"./chunk.VDF5MWGC.js";import{d as B}from"./chunk.OZPV5ZJC.js";import{c as u}from"./chunk.MA573DEE.js";import{e as c}from"./chunk.IY43YPCQ.js";import{d as A}from"./chunk.WF24FWAT.js";import{d as D}from"./chunk.BRBYFLUJ.js";import{a as w}from"./chunk.XKX2BE6Z.js";import{a as k}from"./chunk.AFW54X3W.js";import{c as h}from"./chunk.YVXZ753Q.js";import{d as M}from"./chunk.Z7Y2RA4P.js";import{d as s}from"./chunk.7C7XCT32.js";import{d as ho}from"./chunk.5SM7UG6C.js";import{d as p}from"./chunk.MBJGQYCF.js";import{d as t}from"./chunk.SXQ22MNR.js";import{d as m}from"./chunk.47EUT2BJ.js";import{e as z}from"./chunk.VFWFNY53.js";import{d as Y}from"./chunk.6DVJ22IK.js";import{d as q}from"./chunk.TMEYQXRR.js";import{b as a}from"./chunk.RQG6GVOI.js";import{c as C}from"./chunk.K57IO236.js";import{e as i}from"./chunk.AJTQHK25.js";import{d as I}from"./chunk.B3LPXCVL.js";import{b as n}from"./chunk.P73BXRKY.js";import{b as W}from"./chunk.C3G25JFG.js";import{d as X}from"./chunk.QIGNMZRL.js";import{d as P}from"./chunk.BNIUTBJV.js";import{d as oo}from"./chunk.W3DFKTAX.js";import{d as $}from"./chunk.FEU4FTVQ.js";import{b as Z}from"./chunk.EOZITZSP.js";import{d as S}from"./chunk.6D5ERZ3Y.js";import{c as b}from"./chunk.RHXQ2GMV.js";import{e as x}from"./chunk.WCSVKQR2.js";import{a as g}from"./chunk.E3K6KM57.js";import{f}from"./chunk.EC5JFSHR.js";import{e as J}from"./chunk.ZVPPLZUU.js";import{d as T}from"./chunk.TEHQWMFI.js";import{l as r}from"./chunk.WHQZNZHW.js";import{b as o}from"./chunk.LJLEPTLU.js";var ko=[p,S,s,P,A,D,M,b,ho,E,F,L,O,h,c,u,B,I,V,y,v,R,e,G,H,N,t,K,Q,io,r,g,U,_,j,n,C,i,q,z,J,W,X,Y,oo,$,m,mo,to,ro,fo,x,Co,k,f,po,no,eo,a,xo,ao,Ao,co,lo,w,So,Bo,uo,l,so,Po,Z,T,To,go,d];function Or(){o(ko)}export{Or as a};
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright (c) 2022 Tyler Technologies, Inc.
|
|
10
|
+
* License: Apache-2.0
|
|
11
|
+
*/
|
|
12
|
+
//# sourceMappingURL=chunk.OUORLMTZ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as u,d as A}from"./chunk.BNIUTBJV.js";import{a as E}from"./chunk.E3K6KM57.js";import{y as I}from"./chunk.MZLPUI6R.js";import{d as O}from"./chunk.TEHQWMFI.js";import{a as T,d as N,l as C}from"./chunk.WHQZNZHW.js";import{a as f}from"./chunk.UWYANU5D.js";import{a as s}from"./chunk.KTGSZEAG.js";import{a as _,b as B}from"./chunk.DL7NX432.js";import{a as h,d as b,h as c,l as g}from"./chunk.LJLEPTLU.js";import{u as m}from"./chunk.4LA6HEA7.js";import{k as p}from"./chunk.J2M2MXP2.js";import{f as n}from"./chunk.MCIQXNKY.js";var r=class extends f{constructor(i){super(i)}setIcon(i){this._iconElement.name=i}initialize(){this._badgeElement=c(this._component,u.elementName),this._iconElement=c(this._component,T.elementName)}setCount(i){this._badgeElement.textContent=i!=null?String(i):""}setBadgeType(i){this._badgeElement.dot=i}setBadgeTheme(i){m(this._badgeElement,!!i,u.attributes.THEME,i)}setBadgeVisible(i){this._badgeElement.open=i}};var v=`${B}app-bar-notification-button`,x={COUNT:"count",DOT:"dot",THEME:"theme",SHOW_BADGE:"show-badge",ICON:"icon"},t={elementName:v,attributes:x};var d=class{constructor(e){this._adapter=e;this._count=0;this._dot=!1;this._showBadge=!1;this._isInitialized=!1;this._icon="notifications"}initialize(){this._adapter.initialize(),this._adapter.setCount(this._count),this._adapter.setBadgeType(this._dot),this._adapter.setBadgeTheme(this._theme),this._adapter.setBadgeVisible(this._showBadge),this._adapter.setIcon(this._icon),this._isInitialized=!0}disconnect(){this._isInitialized=!1}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._isInitialized&&(this._adapter.setIcon(this._icon),this._adapter.setHostAttribute(t.attributes.ICON,this._icon)))}get count(){return this._count}set count(e){this._count!==e&&(this._count=e,this._isInitialized&&(this._dot||this._adapter.setCount(this._count),typeof this._count=="string"?this._adapter.setHostAttribute(t.attributes.COUNT,this._count):e==null&&this._adapter.removeHostAttribute(t.attributes.COUNT)))}get dot(){return this._dot}set dot(e){this._dot!==e&&(this._dot=e,this._isInitialized&&(this._adapter.setBadgeType(this._dot),this._dot?this._adapter.setCount(null):this._adapter.setCount(this._count),this._adapter.toggleHostAttribute(t.attributes.DOT,this._dot)))}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this._isInitialized&&(this._adapter.setBadgeTheme(this._theme),this._adapter.setHostAttribute(t.attributes.THEME,this._theme)))}get showBadge(){return this._showBadge}set showBadge(e){this._showBadge!==e&&(this._showBadge=e,this._isInitialized&&(this._adapter.setBadgeVisible(this._showBadge),this._adapter.setHostAttribute(t.attributes.SHOW_BADGE,this._showBadge)))}};var H='<template><forge-icon-button class="forge-icon-button--with-badge"><button type="button" aria-label="Show notifications"><forge-icon></forge-icon></button><forge-tooltip delay="500" position="bottom">Notifications</forge-tooltip><forge-badge positioned app-bar-context></forge-badge></forge-icon-button></template>',o=class extends g{constructor(){super();N.define(I),this._foundation=new d(new r(this))}static get observedAttributes(){return[t.attributes.COUNT,t.attributes.DOT,t.attributes.THEME,t.attributes.SHOW_BADGE,t.attributes.ICON]}initializedCallback(){b(this,H)}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(i,S,a){switch(i){case t.attributes.COUNT:this.count=a;break;case t.attributes.DOT:this.dot=p(a);break;case t.attributes.THEME:this.theme=a;break;case t.attributes.ICON:this.icon=a;break;case t.attributes.SHOW_BADGE:this.showBadge=p(a);break}}};n([s()],o.prototype,"count",2),n([s()],o.prototype,"dot",2),n([s()],o.prototype,"theme",2),n([s()],o.prototype,"icon",2),n([s()],o.prototype,"showBadge",2),o=n([_({name:t.elementName,dependencies:[E,O,A,C]})],o);function nt(){h(o)}export{r as a,t as b,d as c,o as d,nt as e};
|
|
7
|
+
//# sourceMappingURL=chunk.QIGNMZRL.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/app-bar/notification-button/app-bar-notification-button-adapter.ts", "../../src/app-bar/notification-button/app-bar-notification-button-constants.ts", "../../src/app-bar/notification-button/app-bar-notification-button-foundation.ts", "../../src/app-bar/notification-button/app-bar-notification-button.ts", "../../src/app-bar/notification-button/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { getLightElement, toggleAttribute } from '@tylertech/forge-core';\nimport { BADGE_CONSTANTS, IBadgeComponent } from '../../badge';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { IAppBarNotificationButtonComponent } from './app-bar-notification-button';\nimport { ICON_CONSTANTS, IIconComponent } from '../../icon';\n\nexport interface IAppBarNotificationButtonAdapter extends IBaseAdapter {\n initialize(): void;\n setIcon(icon: string): void;\n setCount(value: string | number | null | undefined): void;\n setBadgeType(dot: boolean): void;\n setBadgeTheme(theme: string): void;\n setBadgeVisible(isVisible: boolean): void;\n}\n\nexport class AppBarNotificationButtonAdapter extends BaseAdapter<IAppBarNotificationButtonComponent> implements IAppBarNotificationButtonAdapter {\n private _badgeElement: IBadgeComponent;\n private _iconElement: IIconComponent;\n\n constructor(component: IAppBarNotificationButtonComponent) {\n super(component);\n }\n\n public setIcon(icon: string): void {\n this._iconElement.name = icon;\n }\n\n public initialize(): void {\n this._badgeElement = getLightElement(this._component, BADGE_CONSTANTS.elementName) as IBadgeComponent;\n this._iconElement = getLightElement(this._component, ICON_CONSTANTS.elementName) as IIconComponent;\n }\n\n public setCount(value: string | number | undefined | null): void {\n this._badgeElement.textContent = value != null ? String(value) : '';\n }\n\n public setBadgeType(dot: boolean): void {\n this._badgeElement.dot = dot;\n }\n\n public setBadgeTheme(theme: string): void {\n toggleAttribute(this._badgeElement, !!theme, BADGE_CONSTANTS.attributes.THEME, theme);\n }\n\n public setBadgeVisible(isVisible: boolean): void {\n this._badgeElement.open = isVisible;\n }\n}\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}app-bar-notification-button`;\n\nconst attributes = {\n COUNT: 'count',\n DOT: 'dot',\n THEME: 'theme',\n SHOW_BADGE: 'show-badge',\n ICON: 'icon'\n};\n\nexport const APP_BAR_NOTIFICATION_BUTTON_CONSTANTS = {\n elementName,\n attributes\n};\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IAppBarNotificationButtonAdapter } from './app-bar-notification-button-adapter';\nimport { APP_BAR_NOTIFICATION_BUTTON_CONSTANTS } from './app-bar-notification-button-constants';\n\nexport interface IAppBarNotificationButtonFoundation extends ICustomElementFoundation {\n count: string | number | null | undefined;\n dot: boolean;\n theme: string;\n showBadge: boolean;\n icon: string;\n}\n\nexport class AppBarNotificationButtonFoundation implements IAppBarNotificationButtonFoundation {\n private _count: string | number | null | undefined = 0;\n private _dot = false;\n private _theme: string;\n private _showBadge = false;\n private _isInitialized = false;\n private _icon = 'notifications';\n\n constructor(private _adapter: IAppBarNotificationButtonAdapter) {}\n\n public initialize(): void {\n this._adapter.initialize();\n this._adapter.setCount(this._count);\n this._adapter.setBadgeType(this._dot);\n this._adapter.setBadgeTheme(this._theme);\n this._adapter.setBadgeVisible(this._showBadge);\n this._adapter.setIcon(this._icon);\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._isInitialized = false;\n }\n\n public get icon(): string {\n return this._icon;\n }\n public set icon(value: string) {\n if (this._icon !== value) {\n this._icon = value;\n if (this._isInitialized) {\n this._adapter.setIcon(this._icon);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.ICON, this._icon);\n }\n }\n }\n\n public get count(): string | number | null | undefined {\n return this._count;\n }\n public set count(value: string | number | null | undefined) {\n if (this._count !== value) {\n this._count = value;\n if (this._isInitialized) {\n if (!this._dot) {\n this._adapter.setCount(this._count);\n }\n\n if (typeof this._count === 'string') {\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT, this._count);\n } else if (value == null) {\n this._adapter.removeHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT);\n }\n }\n }\n }\n\n public get dot(): boolean {\n return this._dot;\n }\n public set dot(value: boolean) {\n if (this._dot !== value) {\n this._dot = value;\n if (this._isInitialized) {\n this._adapter.setBadgeType(this._dot);\n if (this._dot) {\n this._adapter.setCount(null);\n } else {\n this._adapter.setCount(this._count);\n }\n this._adapter.toggleHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT, this._dot);\n }\n }\n }\n\n public get theme(): string {\n return this._theme;\n }\n public set theme(value: string) {\n if (this._theme !== value) {\n this._theme = value;\n if (this._isInitialized) {\n this._adapter.setBadgeTheme(this._theme);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.THEME, this._theme);\n }\n }\n }\n\n public get showBadge(): boolean {\n return this._showBadge;\n }\n public set showBadge(value: boolean) {\n if (this._showBadge !== value) {\n this._showBadge = value;\n if (this._isInitialized) {\n this._adapter.setBadgeVisible(this._showBadge);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.SHOW_BADGE, this._showBadge as any);\n }\n }\n }\n}\n", "import { attachLightTemplate, coerceBoolean, coerceNumber, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconNotifications } from '@tylertech/tyler-icons/standard';\nimport { BadgeComponent } from '../../badge';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { IconComponent, IconRegistry } from '../../icon';\nimport { IconButtonComponent } from '../../icon-button';\nimport { TooltipComponent } from '../../tooltip';\nimport { AppBarNotificationButtonAdapter } from './app-bar-notification-button-adapter';\nimport { APP_BAR_NOTIFICATION_BUTTON_CONSTANTS } from './app-bar-notification-button-constants';\nimport { AppBarNotificationButtonFoundation } from './app-bar-notification-button-foundation';\n\nconst template = '<template><forge-icon-button class=\\\"forge-icon-button--with-badge\\\"><button type=\\\"button\\\" aria-label=\\\"Show notifications\\\"><forge-icon></forge-icon></button><forge-tooltip delay=\\\"500\\\" position=\\\"bottom\\\">Notifications</forge-tooltip><forge-badge positioned app-bar-context></forge-badge></forge-icon-button></template>';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-app-bar-notification-button': IAppBarNotificationButtonComponent;\n }\n}\n\nexport interface IAppBarNotificationButtonComponent extends IBaseComponent {\n count: string | number | null | undefined;\n dot: boolean;\n showBadge: boolean;\n theme: string;\n icon: string;\n}\n/**\n * The web component class behind the `<forge-app-bar-notification-button>` custom element.\n * \n * @tag forge-app-bar-notification-button\n */\n@CustomElement({\n name: APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.elementName,\n dependencies: [\n IconButtonComponent,\n TooltipComponent,\n BadgeComponent,\n IconComponent\n ]\n})\nexport class AppBarNotificationButtonComponent extends BaseComponent implements IAppBarNotificationButtonComponent {\n public static get observedAttributes(): string[] {\n return [\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.THEME,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.SHOW_BADGE,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.ICON\n ];\n }\n\n private _foundation: AppBarNotificationButtonFoundation;\n\n constructor() {\n super();\n IconRegistry.define(tylIconNotifications);\n this._foundation = new AppBarNotificationButtonFoundation(new AppBarNotificationButtonAdapter(this));\n }\n\n public initializedCallback(): void {\n attachLightTemplate(this, template);\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT:\n this.count = newValue;\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT:\n this.dot = coerceBoolean(newValue);\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.THEME:\n this.theme = newValue;\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.ICON:\n this.icon = newValue;\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.SHOW_BADGE:\n this.showBadge = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare count: string | number | null | undefined;\n\n @FoundationProperty()\n public declare dot: boolean;\n\n @FoundationProperty()\n public declare theme: string;\n\n @FoundationProperty()\n public declare icon: string;\n\n @FoundationProperty()\n public declare showBadge: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { AppBarNotificationButtonComponent } from './app-bar-notification-button';\n\nexport * from './app-bar-notification-button-adapter';\nexport * from './app-bar-notification-button-constants';\nexport * from './app-bar-notification-button-foundation';\nexport * from './app-bar-notification-button';\n\nexport function defineAppBarNotificationButtonComponent(): void {\n defineCustomElement(AppBarNotificationButtonComponent);\n}\n"],
|
|
5
|
+
"mappings": "ihBAeO,IAAMA,EAAN,cAA8CC,CAA4F,CAI/I,Y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ACZ,MAAM,EACNC,EAAa,OAAOC,CAAoB,EACxC,KAAK,YAAc,IAAIC,EAAmC,IAAIC,EAAgC,IAAI,CAAC,CACrG,CAhBA,WAAkB,oBAA+B,CAC/C,MAAO,CACLC,EAAsC,WAAW,MACjDA,EAAsC,WAAW,IACjDA,EAAsC,WAAW,MACjDA,EAAsC,WAAW,WACjDA,EAAsC,WAAW,IACnD,CACF,CAUO,qBAA4B,CACjCC,EAAoB,KAAMR,CAAQ,CACpC,CAEO,mBAA0B,CAC/B,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBS,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,QACDF,EAAsC,WAAW,MACpD,KAAK,MAAQI,EACb,WACGJ,EAAsC,WAAW,IACpD,KAAK,IAAMK,EAAcD,CAAQ,EACjC,WACGJ,EAAsC,WAAW,MACpD,KAAK,MAAQI,EACb,WACGJ,EAAsC,WAAW,KACpD,KAAK,KAAOI,EACZ,WACGJ,EAAsC,WAAW,WACpD,KAAK,UAAYK,EAAcD,CAAQ,EACvC,MAEN,CAgBF,EAbiBE,EAAA,CADdC,EAAmB,GA/CTb,EAgDI,qBAGAY,EAAA,CADdC,EAAmB,GAlDTb,EAmDI,mBAGAY,EAAA,CADdC,EAAmB,GArDTb,EAsDI,qBAGAY,EAAA,CADdC,EAAmB,GAxDTb,EAyDI,oBAGAY,EAAA,CADdC,EAAmB,GA3DTb,EA4DI,yBA5DJA,EAANY,EAAA,CATNE,EAAc,CACb,KAAMR,EAAsC,YAC5C,aAAc,CACZS,EACAC,EACAC,EACAC,CACF,CACF,CAAC,GACYlB,GC/BN,SAASmB,IAAgD,CAC9DC,EAAoBC,CAAiC,CACvD",
|
|
6
|
+
"names": ["AppBarNotificationButtonAdapter", "BaseAdapter", "component", "icon", "getLightElement", "BADGE_CONSTANTS", "ICON_CONSTANTS", "value", "dot", "theme", "toggleAttribute", "isVisible", "elementName", "COMPONENT_NAME_PREFIX", "attributes", "APP_BAR_NOTIFICATION_BUTTON_CONSTANTS", "AppBarNotificationButtonFoundation", "_adapter", "value", "APP_BAR_NOTIFICATION_BUTTON_CONSTANTS", "template", "AppBarNotificationButtonComponent", "BaseComponent", "IconRegistry", "tylIconNotifications", "AppBarNotificationButtonFoundation", "AppBarNotificationButtonAdapter", "APP_BAR_NOTIFICATION_BUTTON_CONSTANTS", "attachLightTemplate", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "IconButtonComponent", "TooltipComponent", "BadgeComponent", "IconComponent", "defineAppBarNotificationButtonComponent", "defineCustomElement", "AppBarNotificationButtonComponent"]
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{b as E}from"./chunk.EC5JFSHR.js";import{
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{b as E}from"./chunk.EC5JFSHR.js";import{c as h}from"./chunk.KYH5GKVI.js";import{a as _}from"./chunk.BESB4RGK.js";import{a as d,b}from"./chunk.DL7NX432.js";import{a as c,l as m}from"./chunk.LJLEPTLU.js";import{l as u,u as p}from"./chunk.4LA6HEA7.js";import{f as l}from"./chunk.MCIQXNKY.js";var I=`${b}button`,a=["button","a"],r={BUTTON:"forge-button",LABEL:"forge-button__label",ICON:"forge-button__icon",BUTTON_RAISED:"forge-button--raised",BUTTON_UNELEVATED:"forge-button--unelevated",BUTTON_OUTLINED:"forge-button--outlined",BUTTON_DENSE:"forge-button--dense",RIPPLE:"forge-button__ripple"},L={BUTTON:a.join(","),LABEL:`span:not(.${r.RIPPLE})`,ICON:"i,forge-icon,[data-forge-button-icon]",RIPPLE:`.${r.RIPPLE}`},B={TYPE:"type",DISABLED:"disabled"},e={elementName:I,classes:r,selectors:L,attributes:B};var s=class extends m{constructor(){super()}static get observedAttributes(){return[e.attributes.TYPE]}connectedCallback(){this.children.length?this._initialize():u(this).then(()=>this._initialize())}attributeChangedCallback(t,n,i){switch(t){case e.attributes.TYPE:this.type=i;break}}disconnectedCallback(){typeof this._destroyUserInteractionListener=="function"&&(this._destroyUserInteractionListener(),this._destroyUserInteractionListener=void 0),this._rippleInstance&&this._rippleInstance.destroy(),this._mutationObserver&&this._mutationObserver.disconnect(),this._buttonAttrMutationObserver&&this._buttonAttrMutationObserver.disconnect()}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,this._applyType(t),this.setAttribute(e.attributes.TYPE,this._type))}_applyType(t){this._buttonElement&&(this._buttonElement.classList.remove(e.classes.BUTTON_RAISED),this._buttonElement.classList.remove(e.classes.BUTTON_UNELEVATED),this._buttonElement.classList.remove(e.classes.BUTTON_OUTLINED),this._buttonElement.classList.remove(e.classes.BUTTON_DENSE),t.includes("raised")&&this._buttonElement.classList.add(e.classes.BUTTON_RAISED),t.includes("unelevated")&&this._buttonElement.classList.add(e.classes.BUTTON_UNELEVATED),t.includes("outlined")&&this._buttonElement.classList.add(e.classes.BUTTON_OUTLINED),t.includes("dense")&&this._buttonElement.classList.add(e.classes.BUTTON_DENSE))}_initialize(){this._initializeButton(),this._initializeMutationObserver()}_initializeButton(){this._buttonElement=this.querySelector(e.selectors.BUTTON),this._buttonElement&&(this.hasAttribute(e.attributes.TYPE)&&(this._type=this.getAttribute(e.attributes.TYPE),this._applyType(this._type)),this._buttonElement.classList.add(e.classes.BUTTON),this._syncDisabledState(),this._initializeButtonChildren(),this._deferRippleInitialization())}async _deferRippleInitialization(){typeof this._destroyUserInteractionListener=="function"&&this._destroyUserInteractionListener();let{userInteraction:t,destroy:n}=h(this._buttonElement);this._destroyUserInteractionListener=n;let{type:i}=await t;this._destroyUserInteractionListener=void 0,this.isConnected&&(this._rippleInstance=this._createRipple(),i==="focusin"&&this._rippleInstance.handleFocus())}_createRipple(){return this._rippleInstance&&this._rippleInstance.destroy(),new E(this._buttonElement)}_initializeButtonChildren(){if(!this._buttonElement.querySelector(e.selectors.RIPPLE)){let i=document.createElement("span");i.classList.add(e.classes.RIPPLE),this._buttonElement.appendChild(i)}let t=this.querySelector(e.selectors.LABEL);t&&t.classList.add(e.classes.LABEL),Array.from(this.querySelectorAll(e.selectors.ICON)).forEach(i=>{i.classList.add(e.classes.ICON),i.hasAttribute("aria-hidden")||i.setAttribute("aria-hidden","true")})}_initializeMutationObserver(){if(!this._mutationObserver){let t={childList:!0,subtree:!0},n=i=>{this._buttonWasAdded(i)?this._initializeButton():i.some(o=>o.addedNodes.length)&&this._initializeButtonChildren()};this._mutationObserver=new MutationObserver(n),this._mutationObserver.observe(this,t),this._buttonElement&&(this._buttonAttrMutationObserver=new MutationObserver(i=>{i.some(o=>o.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonElement,{attributes:!0,attributeFilter:["disabled"]}))}}_buttonWasAdded(t){return t.some(n=>Array.from(n.addedNodes).some(i=>a.includes(i.nodeName.toLowerCase())))}_syncDisabledState(){p(this,this._buttonElement.disabled,e.attributes.DISABLED)}};s=l([d({name:e.elementName})],s);var f=class extends _{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var n,i;let t=document.createElement(e.elementName);return this._buttonElement=document.createElement("button"),this._buttonElement.type=((n=this._config.options)==null?void 0:n.type)||"button",this._buttonElement.textContent=((i=this._config.options)==null?void 0:i.text)||"",t.appendChild(this._buttonElement),t}onClick(t){var n;(n=this._buttonElement)==null||n.addEventListener("click",t)}onFocus(t){var n;(n=this._buttonElement)==null||n.addEventListener("focus",i=>t(i))}onBlur(t){var n;(n=this._buttonElement)==null||n.addEventListener("blur",i=>t(i))}};function F(){c(s)}export{a,e as b,s as c,f as d,F as e};
|
|
7
|
+
//# sourceMappingURL=chunk.RHXQ2GMV.js.map
|