@tylertech/forge 2.17.0 → 2.18.1
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 +178 -10
- 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/calendar/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.S2N5KJ7S.js → chunk.23QPY6PU.js} +2 -2
- package/dist/esm/chunks/{chunk.65II7E54.js → chunk.2NA4LVTZ.js} +2 -2
- package/dist/esm/chunks/{chunk.NOO2ZZKZ.js → chunk.3DYMGITQ.js} +2 -2
- package/dist/esm/chunks/{chunk.UW2HWAVL.js → chunk.42QTJZSF.js} +2 -2
- package/dist/esm/chunks/{chunk.LLK7YGQW.js → chunk.54KXJVRY.js} +2 -2
- package/dist/esm/chunks/{chunk.BKAZC53W.js → chunk.55HRCXPA.js} +2 -2
- package/dist/esm/chunks/{chunk.T6NVM7TN.js → chunk.67G7HT5S.js} +2 -2
- package/dist/esm/chunks/{chunk.AEKZWVNO.js → chunk.7G53ACL4.js} +2 -2
- package/dist/esm/chunks/{chunk.AEKZWVNO.js.map → chunk.7G53ACL4.js.map} +3 -3
- package/dist/esm/chunks/{chunk.YMBLWKRP.js → chunk.7IHNVPY5.js} +2 -2
- package/dist/esm/chunks/{chunk.RGAPFLQE.js → chunk.7LX3X2DU.js} +2 -2
- package/dist/esm/chunks/{chunk.XFAOB6LU.js → chunk.7NHFZL6J.js} +2 -2
- package/dist/esm/chunks/{chunk.D24CE6KE.js → chunk.AZFF62ZK.js} +2 -2
- package/dist/esm/chunks/chunk.BINM3NUA.js +7 -0
- package/dist/esm/chunks/chunk.BINM3NUA.js.map +7 -0
- package/dist/esm/chunks/{chunk.IWMA7NUU.js → chunk.D43PPRFO.js} +2 -2
- package/dist/esm/chunks/{chunk.SATUJNQX.js → chunk.ETJMASRZ.js} +2 -2
- package/dist/esm/chunks/{chunk.FOLQAW63.js → chunk.F7ZYEFH5.js} +2 -2
- package/dist/esm/chunks/chunk.GBUXAJPY.js +7 -0
- package/dist/esm/chunks/chunk.GBUXAJPY.js.map +7 -0
- package/dist/esm/chunks/{chunk.6CAOHLX6.js → chunk.GEWDZDXN.js} +2 -2
- package/dist/esm/chunks/{chunk.6CAOHLX6.js.map → chunk.GEWDZDXN.js.map} +2 -2
- package/dist/esm/chunks/{chunk.MSFGXRCM.js → chunk.IV2GMOPB.js} +2 -2
- package/dist/esm/chunks/chunk.IWICN773.js +7 -0
- package/dist/esm/chunks/chunk.IWICN773.js.map +7 -0
- package/dist/esm/chunks/{chunk.H4ZMVM5H.js → chunk.J2FXLTZT.js} +2 -2
- package/dist/esm/chunks/{chunk.H4ZMVM5H.js.map → chunk.J2FXLTZT.js.map} +1 -1
- package/dist/esm/chunks/{chunk.HTH3CEDN.js → chunk.J2PHUKSR.js} +2 -2
- package/dist/esm/chunks/{chunk.BKNYDA4V.js → chunk.JCDIPDQR.js} +2 -2
- package/dist/esm/chunks/{chunk.BAVLVCGK.js → chunk.JOLJ7WVN.js} +2 -2
- package/dist/esm/chunks/{chunk.BAVLVCGK.js.map → chunk.JOLJ7WVN.js.map} +2 -2
- package/dist/esm/chunks/chunk.KCC3C3WH.js +7 -0
- package/dist/esm/chunks/chunk.KCC3C3WH.js.map +7 -0
- package/dist/esm/chunks/{chunk.XIZILH2M.js → chunk.KNVCEYY2.js} +2 -2
- package/dist/esm/chunks/chunk.KQK2XX5H.js +7 -0
- package/dist/esm/chunks/chunk.KQK2XX5H.js.map +7 -0
- package/dist/esm/chunks/{chunk.PYXKGV4Z.js → chunk.MXVJSEF3.js} +2 -2
- package/dist/esm/chunks/{chunk.PYXKGV4Z.js.map → chunk.MXVJSEF3.js.map} +2 -2
- package/dist/esm/chunks/{chunk.SQTM36C3.js → chunk.N6XHXCZE.js} +2 -2
- package/dist/esm/chunks/{chunk.AB5XER3E.js → chunk.NOXJK2U7.js} +2 -2
- package/dist/esm/chunks/{chunk.JDLEPQKN.js → chunk.OEZZ2NEY.js} +2 -2
- package/dist/esm/chunks/{chunk.MS77SPS4.js → chunk.QZ2NXIGY.js} +2 -2
- package/dist/esm/chunks/{chunk.MS77SPS4.js.map → chunk.QZ2NXIGY.js.map} +2 -2
- package/dist/esm/chunks/{chunk.CG5CVENX.js → chunk.RLWX5BFQ.js} +2 -2
- package/dist/esm/chunks/{chunk.274MFEUZ.js → chunk.SFTWKDQV.js} +2 -2
- package/dist/esm/chunks/{chunk.Q5YD3PKM.js → chunk.TH7RLTJK.js} +2 -2
- package/dist/esm/chunks/{chunk.USXO7YKN.js → chunk.TOM77CWD.js} +2 -2
- package/dist/esm/chunks/chunk.U773QUMB.js +12 -0
- package/dist/esm/chunks/{chunk.K6LBO4KJ.js → chunk.UVL4TIK2.js} +2 -2
- package/dist/esm/chunks/chunk.WOTVTBJS.js +7 -0
- package/dist/esm/chunks/chunk.WOTVTBJS.js.map +7 -0
- package/dist/esm/chunks/chunk.WPJEXVHM.js +7 -0
- package/dist/esm/chunks/{chunk.NQZXAC65.js.map → chunk.WPJEXVHM.js.map} +2 -2
- package/dist/esm/chunks/{chunk.NX4EECNP.js → chunk.XTMXGKUO.js} +2 -2
- package/dist/esm/chunks/{chunk.2DAPNN6B.js → chunk.Y2I2VRMF.js} +2 -2
- package/dist/esm/chunks/{chunk.ERO7T6WC.js → chunk.Z4HBPQ42.js} +2 -2
- package/dist/esm/color-picker/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/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/keyboard-shortcut/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/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/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/table/index.js +1 -1
- package/dist/esm/tabs/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/autocomplete/autocomplete-constants.d.ts +3 -0
- package/esm/autocomplete/autocomplete-foundation.d.ts +3 -1
- package/esm/autocomplete/autocomplete-foundation.js +14 -0
- package/esm/autocomplete/autocomplete.d.ts +7 -1
- package/esm/autocomplete/autocomplete.js +7 -0
- package/esm/calendar/calendar-foundation.js +6 -0
- package/esm/chip-field/chip-field-adapter.js +1 -1
- package/esm/chip-field/chip-field.js +2 -2
- package/esm/date-picker/base/base-date-picker-foundation.js +1 -1
- package/esm/date-range-picker/date-range-picker-foundation.js +2 -2
- package/esm/icon/icon-adapter.d.ts +0 -2
- package/esm/icon/icon-adapter.js +4 -5
- package/esm/icon/icon-foundation.js +0 -1
- package/esm/keyboard-shortcut/keyboard-shortcut-constants.d.ts +1 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.d.ts +6 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.js +9 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.d.ts +4 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.js +3 -0
- package/esm/list-dropdown/list-dropdown-constants.d.ts +4 -0
- package/esm/list-dropdown/list-dropdown-utils.js +14 -3
- package/esm/paginator/paginator-adapter.d.ts +2 -0
- package/esm/paginator/paginator-adapter.js +57 -0
- package/esm/select/core/base-select-adapter.js +3 -0
- package/esm/select/option/option-constants.d.ts +1 -0
- package/esm/select/option/option-constants.js +1 -0
- package/esm/select/option/option-foundation.d.ts +13 -0
- package/esm/select/option/option-foundation.js +28 -0
- package/esm/select/option/option.d.ts +7 -0
- package/esm/select/option/option.js +13 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/time-picker/time-picker-foundation.js +3 -3
- package/package.json +1 -1
- package/styles/chip-field/_base.scss +1 -0
- package/styles/chip-field/_selector.scss +2 -2
- package/dist/esm/chunks/chunk.A4UN74PV.js +0 -7
- package/dist/esm/chunks/chunk.A4UN74PV.js.map +0 -7
- package/dist/esm/chunks/chunk.FFVZ6JMP.js +0 -7
- package/dist/esm/chunks/chunk.FFVZ6JMP.js.map +0 -7
- package/dist/esm/chunks/chunk.IMEODSRH.js +0 -7
- package/dist/esm/chunks/chunk.IMEODSRH.js.map +0 -7
- package/dist/esm/chunks/chunk.NQZXAC65.js +0 -7
- package/dist/esm/chunks/chunk.S2YVOMLW.js +0 -7
- package/dist/esm/chunks/chunk.S2YVOMLW.js.map +0 -7
- package/dist/esm/chunks/chunk.S7ZU6JKB.js +0 -7
- package/dist/esm/chunks/chunk.S7ZU6JKB.js.map +0 -7
- package/dist/esm/chunks/chunk.W3GR3VDN.js +0 -12
- package/dist/esm/chunks/chunk.XY45YU7I.js +0 -7
- package/dist/esm/chunks/chunk.XY45YU7I.js.map +0 -7
- /package/dist/esm/chunks/{chunk.S2N5KJ7S.js.map → chunk.23QPY6PU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.65II7E54.js.map → chunk.2NA4LVTZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NOO2ZZKZ.js.map → chunk.3DYMGITQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UW2HWAVL.js.map → chunk.42QTJZSF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LLK7YGQW.js.map → chunk.54KXJVRY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BKAZC53W.js.map → chunk.55HRCXPA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.T6NVM7TN.js.map → chunk.67G7HT5S.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YMBLWKRP.js.map → chunk.7IHNVPY5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RGAPFLQE.js.map → chunk.7LX3X2DU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XFAOB6LU.js.map → chunk.7NHFZL6J.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.D24CE6KE.js.map → chunk.AZFF62ZK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IWMA7NUU.js.map → chunk.D43PPRFO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SATUJNQX.js.map → chunk.ETJMASRZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FOLQAW63.js.map → chunk.F7ZYEFH5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MSFGXRCM.js.map → chunk.IV2GMOPB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HTH3CEDN.js.map → chunk.J2PHUKSR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BKNYDA4V.js.map → chunk.JCDIPDQR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XIZILH2M.js.map → chunk.KNVCEYY2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SQTM36C3.js.map → chunk.N6XHXCZE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AB5XER3E.js.map → chunk.NOXJK2U7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JDLEPQKN.js.map → chunk.OEZZ2NEY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CG5CVENX.js.map → chunk.RLWX5BFQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.274MFEUZ.js.map → chunk.SFTWKDQV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q5YD3PKM.js.map → chunk.TH7RLTJK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.USXO7YKN.js.map → chunk.TOM77CWD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W3GR3VDN.js.map → chunk.U773QUMB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.K6LBO4KJ.js.map → chunk.UVL4TIK2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NX4EECNP.js.map → chunk.XTMXGKUO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2DAPNN6B.js.map → chunk.Y2I2VRMF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ERO7T6WC.js.map → chunk.Z4HBPQ42.js.map} +0 -0
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { ICustomElement } from '@tylertech/forge-core';
|
|
7
|
+
import { IIconComponent } from '../../icon';
|
|
7
8
|
import { BaseComponent } from '../../core/base/base-component';
|
|
8
9
|
import { IBaseListDropdownOption, ListDropdownIconType } from '../../list-dropdown/list-dropdown-constants';
|
|
9
10
|
export interface IOptionComponent extends ICustomElement, Required<IBaseListDropdownOption> {
|
|
@@ -28,6 +29,8 @@ export declare class OptionComponent extends BaseComponent implements IOptionCom
|
|
|
28
29
|
value: any;
|
|
29
30
|
/** Gets/sets the label of this option. */
|
|
30
31
|
label: string;
|
|
32
|
+
/** Gets/sets the secondary label of this option. */
|
|
33
|
+
secondaryLabel: string;
|
|
31
34
|
/** Gets/sets the disabled status of this option. */
|
|
32
35
|
disabled: boolean;
|
|
33
36
|
/** Gets/sets the whether this option is a divider. */
|
|
@@ -40,12 +43,16 @@ export declare class OptionComponent extends BaseComponent implements IOptionCom
|
|
|
40
43
|
leadingIconClass: string;
|
|
41
44
|
/** Gets/sets the leading icon type of this option. */
|
|
42
45
|
leadingIconType: ListDropdownIconType;
|
|
46
|
+
/** Gets/sets properties on leading icon component. */
|
|
47
|
+
leadingIconComponentProps: Partial<IIconComponent>;
|
|
43
48
|
/** Gets/sets the trailing icon of this option. */
|
|
44
49
|
trailingIcon: string;
|
|
45
50
|
/** Gets/sets the trailing icon class of this option. */
|
|
46
51
|
trailingIconClass: string;
|
|
47
52
|
/** Gets/sets the trailing icon type of this option. */
|
|
48
53
|
trailingIconType: ListDropdownIconType;
|
|
54
|
+
/** Gets/sets properties on trailing icon component. */
|
|
55
|
+
trailingIconComponentProps: Partial<IIconComponent>;
|
|
49
56
|
/** Gets/sets the leading builder of this option. */
|
|
50
57
|
leadingBuilder: () => HTMLElement;
|
|
51
58
|
/** Gets/sets the trailing builder of this option. */
|
|
@@ -23,6 +23,7 @@ let OptionComponent = class OptionComponent extends BaseComponent {
|
|
|
23
23
|
return [
|
|
24
24
|
OPTION_CONSTANTS.attributes.VALUE,
|
|
25
25
|
OPTION_CONSTANTS.attributes.LABEL,
|
|
26
|
+
OPTION_CONSTANTS.attributes.SECONDARY_LABEL,
|
|
26
27
|
OPTION_CONSTANTS.attributes.DISABLED,
|
|
27
28
|
OPTION_CONSTANTS.attributes.DIVIDER,
|
|
28
29
|
OPTION_CONSTANTS.attributes.OPTION_CLASS,
|
|
@@ -47,6 +48,9 @@ let OptionComponent = class OptionComponent extends BaseComponent {
|
|
|
47
48
|
case OPTION_CONSTANTS.attributes.LABEL:
|
|
48
49
|
this.label = newValue;
|
|
49
50
|
break;
|
|
51
|
+
case OPTION_CONSTANTS.attributes.SECONDARY_LABEL:
|
|
52
|
+
this.secondaryLabel = newValue;
|
|
53
|
+
break;
|
|
50
54
|
case OPTION_CONSTANTS.attributes.DISABLED:
|
|
51
55
|
this.disabled = coerceBoolean(newValue);
|
|
52
56
|
break;
|
|
@@ -83,6 +87,9 @@ __decorate([
|
|
|
83
87
|
__decorate([
|
|
84
88
|
FoundationProperty()
|
|
85
89
|
], OptionComponent.prototype, "label", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
FoundationProperty()
|
|
92
|
+
], OptionComponent.prototype, "secondaryLabel", void 0);
|
|
86
93
|
__decorate([
|
|
87
94
|
FoundationProperty()
|
|
88
95
|
], OptionComponent.prototype, "disabled", void 0);
|
|
@@ -101,6 +108,9 @@ __decorate([
|
|
|
101
108
|
__decorate([
|
|
102
109
|
FoundationProperty()
|
|
103
110
|
], OptionComponent.prototype, "leadingIconType", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
FoundationProperty()
|
|
113
|
+
], OptionComponent.prototype, "leadingIconComponentProps", void 0);
|
|
104
114
|
__decorate([
|
|
105
115
|
FoundationProperty()
|
|
106
116
|
], OptionComponent.prototype, "trailingIcon", void 0);
|
|
@@ -110,6 +120,9 @@ __decorate([
|
|
|
110
120
|
__decorate([
|
|
111
121
|
FoundationProperty()
|
|
112
122
|
], OptionComponent.prototype, "trailingIconType", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
FoundationProperty()
|
|
125
|
+
], OptionComponent.prototype, "trailingIconComponentProps", void 0);
|
|
113
126
|
__decorate([
|
|
114
127
|
FoundationProperty()
|
|
115
128
|
], OptionComponent.prototype, "leadingBuilder", void 0);
|
|
@@ -14,7 +14,7 @@ import { SplitViewPanelAdapter } from './split-view-panel-adapter';
|
|
|
14
14
|
import { IconComponent, IconRegistry } from '../../icon';
|
|
15
15
|
import { RippleComponent } from '../../ripple';
|
|
16
16
|
const template = '<template><div class=\"forge-split-view-panel\" id=\"root\" part=\"root\"><div class=\"forge-split-view-panel__handle\" id=\"handle\" part=\"handle\" role=\"separator\" aria-controls=\"content\" aria-grabbed=\"false\" tabindex=\"0\"><forge-icon class=\"forge-split-view-panel__icon\" id=\"icon\" part=\"icon\"></forge-icon><forge-ripple id=\"ripple\" part=\"ripple\"></forge-ripple></div><div class=\"forge-split-view-panel__content\" id=\"content\" part=\"content\" role=\"group\"><slot></slot></div></div></template>';
|
|
17
|
-
const 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)}.forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u8e1g9t;animation-name:u8e1g9t;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u8e1g9t{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes u8e1g9t{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:u8e1ga3;animation-name:u8e1ga3;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u8e1ga3{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes u8e1ga3{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u8e1ga9;animation-name:u8e1ga9;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u8e1ga9{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes u8e1ga9{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:u8e1gad;animation-name:u8e1gad;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u8e1gad{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes u8e1gad{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u8e1gaj;animation-name:u8e1gaj;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u8e1gaj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes u8e1gaj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:u8e1gar;animation-name:u8e1gar;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u8e1gar{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes u8e1gar{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u8e1gb9;animation-name:u8e1gb9;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u8e1gb9{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes u8e1gb9{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:u8e1gbm;animation-name:u8e1gbm;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u8e1gbm{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes u8e1gbm{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}';
|
|
17
|
+
const 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)}.forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u9yss7j;animation-name:u9yss7j;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u9yss7j{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes u9yss7j{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:u9yss81;animation-name:u9yss81;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u9yss81{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes u9yss81{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u9yss87;animation-name:u9yss87;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u9yss87{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes u9yss87{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:u9yss93;animation-name:u9yss93;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u9yss93{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes u9yss93{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u9yss95;animation-name:u9yss95;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u9yss95{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes u9yss95{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:u9yssa3;animation-name:u9yssa3;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u9yssa3{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes u9yssa3{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u9yssaj;animation-name:u9yssaj;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u9yssaj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes u9yssaj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:u9yssaq;animation-name:u9yssaq;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u9yssaq{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes u9yssaq{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}';
|
|
18
18
|
/**
|
|
19
19
|
* The custom element class behind the `<forge-split-view-panel>` element.
|
|
20
20
|
*
|
|
@@ -220,12 +220,12 @@ export class TimePickerFoundation {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
_onInputFocus(evt) {
|
|
223
|
-
if (this._allowInput) {
|
|
224
|
-
this._adapter.selectInputText();
|
|
225
|
-
}
|
|
226
223
|
if (this.masked && this._showMaskFormat) {
|
|
227
224
|
this._applyMask();
|
|
228
225
|
}
|
|
226
|
+
if (this._allowInput) {
|
|
227
|
+
this._adapter.selectInputText();
|
|
228
|
+
}
|
|
229
229
|
}
|
|
230
230
|
_onInputBlur(evt) {
|
|
231
231
|
if (this.masked && this._showMaskFormat) {
|
package/package.json
CHANGED
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
@mixin leading {
|
|
167
167
|
// Core
|
|
168
|
-
|
|
168
|
+
&--leading .forge-field__leading-container {
|
|
169
169
|
@include base.leading-core;
|
|
170
170
|
}
|
|
171
171
|
// Margin
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
|
|
177
177
|
@mixin trailing {
|
|
178
178
|
// Core
|
|
179
|
-
|
|
179
|
+
&--trailing .forge-field__trailing-container {
|
|
180
180
|
@include base.trailing-core;
|
|
181
181
|
}
|
|
182
182
|
// Margin
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as _}from"./chunk.5KC43VFL.js";import{a as r}from"./chunk.KTGSZEAG.js";import{a as d,b}from"./chunk.QOA2O575.js";import{a as p,l as g}from"./chunk.HOXFK44F.js";import{k as c}from"./chunk.J2M2MXP2.js";import{f as s}from"./chunk.MCIQXNKY.js";var o=class extends _{constructor(t){super(t)}};var u=`${b}option`,h={DISABLED:"disabled",DIVIDER:"divider",LABEL:"label",LEADING_ICON_CLASS:"leading-icon-class",LEADING_ICON_TYPE:"leading-icon-type",LEADING_ICON:"leading-icon",OPTION_CLASS:"option-class",TRAILING_ICON_CLASS:"trailing-icon-class",TRAILING_ICON_TYPE:"trailing-icon-type",TRAILING_ICON:"trailing-icon",VALUE:"value"},L={VALUE_CHANGE:`${u}-value-change`},i={elementName:u,attributes:h,events:L};var l=class{constructor(t){this._adapter=t;this._disabled=!1;this._divider=!1;this._optionClass=[]}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.emitHostEvent(i.events.VALUE_CHANGE,this._value))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.toggleHostAttribute(i.attributes.LABEL,!!this._label,this._label))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get divider(){return this._divider}set divider(t){this._divider!==t&&(this._divider=t,this._adapter.toggleHostAttribute(i.attributes.DIVIDER,this._divider))}get optionClass(){return this._optionClass}set optionClass(t){t?typeof t=="string"&&(t=t.split(" ")):t=[],t=t.filter(a=>a&&!/\s+/.test(a)),this._optionClass.toString()!==t.toString()&&(this._optionClass=t,this._adapter.toggleHostAttribute(i.attributes.OPTION_CLASS,this._optionClass&&!!this._optionClass.length,this._optionClass.join(" ")))}get leadingIcon(){return this._leadingIcon}set leadingIcon(t){this._leadingIcon!==t&&(this._leadingIcon=t,this._adapter.toggleHostAttribute(i.attributes.LEADING_ICON,!!this._leadingIcon,this._leadingIcon))}get leadingIconClass(){return this._leadingIconClass}set leadingIconClass(t){this._leadingIconClass!==t&&(this._leadingIconClass=t,this._adapter.toggleHostAttribute(i.attributes.LEADING_ICON_CLASS,!!this._leadingIconClass,this._leadingIconClass))}get leadingIconType(){return this._leadingIconType}set leadingIconType(t){this._leadingIconType!==t&&(this._leadingIconType=t,this._adapter.toggleHostAttribute(i.attributes.LEADING_ICON_TYPE,!!this._leadingIconType,this._leadingIconType))}get trailingIcon(){return this._trailingIcon}set trailingIcon(t){this._trailingIcon!==t&&(this._trailingIcon=t,this._adapter.toggleHostAttribute(i.attributes.TRAILING_ICON,!!this._trailingIcon,this._trailingIcon))}get trailingIconClass(){return this._trailingIconClass}set trailingIconClass(t){this._trailingIconClass!==t&&(this._trailingIconClass=t,this._adapter.toggleHostAttribute(i.attributes.TRAILING_ICON_CLASS,!!this._trailingIconClass,this._trailingIconClass))}get trailingIconType(){return this._trailingIconType}set trailingIconType(t){this._trailingIconType!==t&&(this._trailingIconType=t,this._adapter.toggleHostAttribute(i.attributes.TRAILING_ICON_TYPE,!!this._trailingIconType,this._trailingIconType))}get leadingBuilder(){return this._leadingBuilder}set leadingBuilder(t){this._leadingBuilder!==t&&(this._leadingBuilder=t)}get trailingBuilder(){return this._trailingBuilder}set trailingBuilder(t){this._trailingBuilder!==t&&(this._trailingBuilder=t)}};var e=class extends g{constructor(){super();this._foundation=new l(new o(this))}static get observedAttributes(){return[i.attributes.VALUE,i.attributes.LABEL,i.attributes.DISABLED,i.attributes.DIVIDER,i.attributes.OPTION_CLASS,i.attributes.LEADING_ICON,i.attributes.LEADING_ICON_CLASS,i.attributes.LEADING_ICON_TYPE,i.attributes.TRAILING_ICON,i.attributes.TRAILING_ICON_CLASS,i.attributes.TRAILING_ICON_TYPE]}initializedCallback(){this.hasAttribute("role")||this.setAttribute("role","option")}attributeChangedCallback(a,T,n){switch(a){case i.attributes.VALUE:this.value=n;break;case i.attributes.LABEL:this.label=n;break;case i.attributes.DISABLED:this.disabled=c(n);break;case i.attributes.DIVIDER:this.divider=this.hasAttribute(i.attributes.DIVIDER);break;case i.attributes.OPTION_CLASS:this.optionClass=n;break;case i.attributes.LEADING_ICON:this.leadingIcon=n;break;case i.attributes.LEADING_ICON_CLASS:this.leadingIconClass=n;break;case i.attributes.LEADING_ICON_TYPE:this.leadingIconType=n;break;case i.attributes.TRAILING_ICON:this.trailingIcon=n;break;case i.attributes.TRAILING_ICON_CLASS:this.trailingIconClass=n;break;case i.attributes.TRAILING_ICON_TYPE:this.trailingIconType=n;break}}};s([r()],e.prototype,"value",2),s([r()],e.prototype,"label",2),s([r()],e.prototype,"disabled",2),s([r()],e.prototype,"divider",2),s([r()],e.prototype,"optionClass",2),s([r()],e.prototype,"leadingIcon",2),s([r()],e.prototype,"leadingIconClass",2),s([r()],e.prototype,"leadingIconType",2),s([r()],e.prototype,"trailingIcon",2),s([r()],e.prototype,"trailingIconClass",2),s([r()],e.prototype,"trailingIconType",2),s([r()],e.prototype,"leadingBuilder",2),s([r()],e.prototype,"trailingBuilder",2),e=s([d({name:i.elementName})],e);function x(){p(e)}export{o as a,i as b,l as c,e as d,x as e};
|
|
7
|
-
//# sourceMappingURL=chunk.A4UN74PV.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/select/option/option-adapter.ts", "../../src/select/option/option-constants.ts", "../../src/select/option/option-foundation.ts", "../../src/select/option/option.ts", "../../src/select/option/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { IOptionComponent } from './option';\n\nexport interface IOptionAdapter extends IBaseAdapter {\n setHostAttribute(name: string, value: string): void;\n removeHostAttribute(name: string): void;\n}\n\n/**\n * The DOM adapter behind the `<forge-option>` element.\n */\nexport class OptionAdapter extends BaseAdapter<IOptionComponent> {\n constructor(component: IOptionComponent) {\n super(component);\n }\n}\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}option`;\n\nconst attributes = {\n DISABLED: 'disabled',\n DIVIDER: 'divider',\n LABEL: 'label',\n LEADING_ICON_CLASS: 'leading-icon-class',\n LEADING_ICON_TYPE: 'leading-icon-type',\n LEADING_ICON: 'leading-icon',\n OPTION_CLASS: 'option-class',\n TRAILING_ICON_CLASS: 'trailing-icon-class',\n TRAILING_ICON_TYPE: 'trailing-icon-type',\n TRAILING_ICON: 'trailing-icon',\n VALUE: 'value'\n};\n\nconst events = {\n VALUE_CHANGE: `${elementName}-value-change`\n};\n\nexport const OPTION_CONSTANTS = {\n elementName,\n attributes,\n events\n};\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IBaseListDropdownOption, ListDropdownIconType } from '../../list-dropdown/list-dropdown-constants';\nimport { IOptionAdapter } from './option-adapter';\nimport { OPTION_CONSTANTS } from './option-constants';\n\nexport interface IOptionFoundation extends ICustomElementFoundation, Required<IBaseListDropdownOption> {}\n\n/** The foundation class behind the `<forge-option>` element. */\nexport class OptionFoundation implements IOptionFoundation {\n private _value: any;\n private _label: string;\n private _disabled = false;\n private _divider = false;\n private _optionClass: string[] = [];\n private _leadingIcon: string;\n private _leadingIconClass: string;\n private _leadingIconType: ListDropdownIconType;\n private _trailingIcon: string;\n private _trailingIconClass: string;\n private _trailingIconType: ListDropdownIconType;\n private _leadingBuilder: () => HTMLElement;\n private _trailingBuilder: () => HTMLElement;\n\n constructor(private _adapter: IOptionAdapter) {}\n\n /** Gets/sets the value of this option. */\n public get value(): any {\n return this._value;\n }\n public set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n this._adapter.emitHostEvent(OPTION_CONSTANTS.events.VALUE_CHANGE, this._value);\n }\n }\n\n /** Gets/sets the label of this option. */\n public get label(): string {\n return this._label;\n }\n public set label(value: string) {\n if (this._label !== value) {\n this._label = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.LABEL, !!this._label, this._label);\n }\n }\n\n /** Gets/sets the disabled status of this option. */\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.toggleHostAttribute(OPTION_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n /** Gets/sets the whether this option is a divider. */\n public get divider(): boolean {\n return this._divider;\n }\n public set divider(value: boolean) {\n if (this._divider !== value) {\n this._divider = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.DIVIDER, this._divider);\n }\n }\n\n /** Gets/sets the classes of this option. */\n public get optionClass(): string | string[] {\n return this._optionClass;\n }\n public set optionClass(value: string | string[]) {\n if (!value) {\n value = [];\n } else if (typeof value === 'string') {\n value = value.split(' ');\n }\n\n value = value.filter(v => v && !/\\s+/.test(v));\n\n if (this._optionClass.toString() !== value.toString()) {\n this._optionClass = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.OPTION_CLASS, this._optionClass && !!this._optionClass.length, this._optionClass.join(' '));\n }\n }\n\n /** Gets/sets the leading icon of this option. */\n public get leadingIcon(): string {\n return this._leadingIcon;\n }\n public set leadingIcon(value: string) {\n if (this._leadingIcon !== value) {\n this._leadingIcon = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON, !!this._leadingIcon, this._leadingIcon);\n }\n }\n\n /** Gets/sets the leading icon class of this option. */\n public get leadingIconClass(): string {\n return this._leadingIconClass;\n }\n public set leadingIconClass(value: string) {\n if (this._leadingIconClass !== value) {\n this._leadingIconClass = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS, !!this._leadingIconClass, this._leadingIconClass);\n }\n }\n\n /** Gets/sets the leading icon type of this option. */\n public get leadingIconType(): ListDropdownIconType {\n return this._leadingIconType;\n }\n public set leadingIconType(value: ListDropdownIconType) {\n if (this._leadingIconType !== value) {\n this._leadingIconType = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE, !!this._leadingIconType, this._leadingIconType);\n }\n }\n\n /** Gets/sets the trailing icon of this option. */\n public get trailingIcon(): string {\n return this._trailingIcon;\n }\n public set trailingIcon(value: string) {\n if (this._trailingIcon !== value) {\n this._trailingIcon = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON, !!this._trailingIcon, this._trailingIcon);\n }\n }\n\n /** Gets/sets the trailing icon class of this option. */\n public get trailingIconClass(): string {\n return this._trailingIconClass;\n }\n public set trailingIconClass(value: string) {\n if (this._trailingIconClass !== value) {\n this._trailingIconClass = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS, !!this._trailingIconClass, this._trailingIconClass);\n }\n }\n\n /** Gets/sets the trailing icon type of this option. */\n public get trailingIconType(): ListDropdownIconType {\n return this._trailingIconType;\n }\n public set trailingIconType(value: ListDropdownIconType) {\n if (this._trailingIconType !== value) {\n this._trailingIconType = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE, !!this._trailingIconType, this._trailingIconType);\n }\n }\n\n /** Gets/sets the leading builder of this option. */\n public get leadingBuilder(): (() => HTMLElement) {\n return this._leadingBuilder;\n }\n public set leadingBuilder(value: (() => HTMLElement)) {\n if (this._leadingBuilder !== value) {\n this._leadingBuilder = value;\n }\n }\n\n /** Gets/sets the trailing builder of this option. */\n public get trailingBuilder(): (() => HTMLElement) {\n return this._trailingBuilder;\n }\n public set trailingBuilder(value: (() => HTMLElement)) {\n if (this._trailingBuilder !== value) {\n this._trailingBuilder = value;\n }\n }\n}\n", "import { coerceBoolean, CustomElement, FoundationProperty, ICustomElement } from '@tylertech/forge-core';\nimport { BaseComponent } from '../../core/base/base-component';\nimport { IBaseListDropdownOption, ListDropdownIconType } from '../../list-dropdown/list-dropdown-constants';\nimport { OptionAdapter } from './option-adapter';\nimport { OPTION_CONSTANTS } from './option-constants';\nimport { OptionFoundation } from './option-foundation';\n\nexport interface IOptionComponent extends ICustomElement, Required<IBaseListDropdownOption> {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-option': IOptionComponent;\n }\n}\n\n/**\n * The custom element class behind the `<forge-option>` element.\n * \n * @tag forge-option\n */\n@CustomElement({\n name: OPTION_CONSTANTS.elementName\n})\nexport class OptionComponent extends BaseComponent implements IOptionComponent {\n public static get observedAttributes(): string[] {\n return [\n OPTION_CONSTANTS.attributes.VALUE,\n OPTION_CONSTANTS.attributes.LABEL,\n OPTION_CONSTANTS.attributes.DISABLED,\n OPTION_CONSTANTS.attributes.DIVIDER,\n OPTION_CONSTANTS.attributes.OPTION_CLASS,\n OPTION_CONSTANTS.attributes.LEADING_ICON,\n OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS,\n OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE,\n OPTION_CONSTANTS.attributes.TRAILING_ICON,\n OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS,\n OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE\n ];\n }\n\n private _foundation: OptionFoundation;\n\n constructor() {\n super();\n this._foundation = new OptionFoundation(new OptionAdapter(this));\n }\n\n public initializedCallback(): void {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'option');\n }\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case OPTION_CONSTANTS.attributes.VALUE:\n this.value = newValue;\n break;\n case OPTION_CONSTANTS.attributes.LABEL:\n this.label = newValue;\n break;\n case OPTION_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case OPTION_CONSTANTS.attributes.DIVIDER:\n this.divider = this.hasAttribute(OPTION_CONSTANTS.attributes.DIVIDER);\n break;\n case OPTION_CONSTANTS.attributes.OPTION_CLASS:\n this.optionClass = newValue;\n break;\n case OPTION_CONSTANTS.attributes.LEADING_ICON:\n this.leadingIcon = newValue;\n break;\n case OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS:\n this.leadingIconClass = newValue;\n break;\n case OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE:\n this.leadingIconType = newValue as ListDropdownIconType;\n break;\n case OPTION_CONSTANTS.attributes.TRAILING_ICON:\n this.trailingIcon = newValue;\n break;\n case OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS:\n this.trailingIconClass = newValue;\n break;\n case OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE:\n this.trailingIconType = newValue as ListDropdownIconType;\n break;\n }\n }\n\n /** Gets/sets the value of this option. */\n @FoundationProperty()\n public declare value: any;\n\n /** Gets/sets the label of this option. */\n @FoundationProperty()\n public declare label: string;\n\n /** Gets/sets the disabled status of this option. */\n @FoundationProperty()\n public declare disabled: boolean;\n\n /** Gets/sets the whether this option is a divider. */\n @FoundationProperty()\n public declare divider: boolean;\n\n /** Gets/sets the classes of this option. */\n @FoundationProperty()\n public declare optionClass: string | string[];\n\n /** Gets/sets the leading icon of this option. */\n @FoundationProperty()\n public declare leadingIcon: string;\n\n /** Gets/sets the leading icon class of this option. */\n @FoundationProperty()\n public declare leadingIconClass: string;\n\n /** Gets/sets the leading icon type of this option. */\n @FoundationProperty()\n public declare leadingIconType: ListDropdownIconType;\n\n /** Gets/sets the trailing icon of this option. */\n @FoundationProperty()\n public declare trailingIcon: string;\n\n /** Gets/sets the trailing icon class of this option. */\n @FoundationProperty()\n public declare trailingIconClass: string;\n\n /** Gets/sets the trailing icon type of this option. */\n @FoundationProperty()\n public declare trailingIconType: ListDropdownIconType;\n\n /** Gets/sets the leading builder of this option. */\n @FoundationProperty()\n public declare leadingBuilder: () => HTMLElement;\n\n /** Gets/sets the trailing builder of this option. */\n @FoundationProperty()\n public declare trailingBuilder: () => HTMLElement;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { OptionComponent } from './option';\n\nexport * from './option-adapter';\nexport * from './option-constants';\nexport * from './option-foundation';\nexport * from './option';\n\nexport function defineOptionComponent(): void {\n defineCustomElement(OptionComponent);\n}\n"],
|
|
5
|
-
"mappings": "yPAWO,IAAMA,EAAN,cAA4BC,CAA8B,CAC/D,YAAYC,EAA6B,CACvC,MAAMA,CAAS,CACjB,CACF,ECbA,IAAMC,EAA2C,GAAGC,UAE9CC,EAAa,CACjB,SAAU,WACV,QAAS,UACT,MAAO,QACP,mBAAoB,qBACpB,kBAAmB,oBACnB,aAAc,eACd,aAAc,eACd,oBAAqB,sBACrB,mBAAoB,qBACpB,cAAe,gBACf,MAAO,OACT,EAEMC,EAAS,CACb,aAAc,GAAGH,gBACnB,EAEaI,EAAmB,CAC9B,YAAAJ,EACA,WAAAE,EACA,OAAAC,CACF,EClBO,IAAME,EAAN,KAAoD,CAezD,YAAoBC,EAA0B,CAA1B,cAAAA,EAZpB,KAAQ,UAAY,GACpB,KAAQ,SAAW,GACnB,KAAQ,aAAyB,CAAC,CAUa,CAG/C,IAAW,OAAa,CACtB,OAAO,KAAK,MACd,CACA,IAAW,MAAMC,EAAY,CACvB,KAAK,SAAWA,IAClB,KAAK,OAASA,EACd,KAAK,SAAS,cAAcC,EAAiB,OAAO,aAAc,KAAK,MAAM,EAEj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ETV,EA8EI,wBAIAS,EAAA,CADdC,EAAmB,GAjFTV,EAkFI,uBAIAS,EAAA,CADdC,EAAmB,GArFTV,EAsFI,2BAIAS,EAAA,CADdC,EAAmB,GAzFTV,EA0FI,2BAIAS,EAAA,CADdC,EAAmB,GA7FTV,EA8FI,gCAIAS,EAAA,CADdC,EAAmB,GAjGTV,EAkGI,+BAIAS,EAAA,CADdC,EAAmB,GArGTV,EAsGI,4BAIAS,EAAA,CADdC,EAAmB,GAzGTV,EA0GI,iCAIAS,EAAA,CADdC,EAAmB,GA7GTV,EA8GI,gCAIAS,EAAA,CADdC,EAAmB,GAjHTV,EAkHI,8BAIAS,EAAA,CADdC,EAAmB,GArHTV,EAsHI,+BAtHJA,EAANS,EAAA,CAHNE,EAAc,CACb,KAAMP,EAAiB,WACzB,CAAC,GACYJ,GCdN,SAASY,GAA8B,CAC5CC,EAAoBC,CAAe,CACrC",
|
|
6
|
-
"names": ["OptionAdapter", "BaseAdapter", "component", "elementName", "COMPONENT_NAME_PREFIX", "attributes", "events", "OPTION_CONSTANTS", "OptionFoundation", "_adapter", "value", "OPTION_CONSTANTS", "v", "OptionComponent", "BaseComponent", "OptionFoundation", "OptionAdapter", "OPTION_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "defineOptionComponent", "defineCustomElement", "OptionComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as _}from"./chunk.5KC43VFL.js";import{a as p}from"./chunk.KTGSZEAG.js";import{a as g,b as f}from"./chunk.QOA2O575.js";import{a as m,l as h}from"./chunk.HOXFK44F.js";import{q as c}from"./chunk.4LA6HEA7.js";import{k as d}from"./chunk.J2M2MXP2.js";import{f as l}from"./chunk.MCIQXNKY.js";var A=`${f}keyboard-shortcut`,L={KEY:"key",TARGET:"target",GLOBAL:"global",ALLOW_WHILE_TYPING:"allow-while-typing",USE_CODE:"use-code",PREVENT_DEFAULT:"prevent-default",CAPTURE:"capture",DISABLED:"disabled"},k={TOOLTIP:"forge-tooltip"},K={ACTIVATE:"forge-keyboard-shortcut-activate"},t={elementName:A,attributes:L,selectors:k,events:K},E=["date","datetime","datetime-local","email","month","number","password","search","tel","text","time","url","week"];var u=class extends _{constructor(r){super(r);this.component=r}hasTargetElement(){return!!this._targetElement}destroy(){this._targetElement=null}addTargetEventListener(r,a,i){var s;(s=this._targetElement)==null||s.addEventListener(r,a,{capture:i})}removeTargetEventListener(r,a,i){var s;(s=this._targetElement)==null||s.removeEventListener(r,a,{capture:i})}setHostStyles(){this.component.style.display="none"}setTargetElement(r,a){if(a){let i=this._component.ownerDocument||document;this._targetElement=i.documentElement;return}if(r){if(this._component.parentElement){if(c(this._component.parentElement,r)){this._targetElement=this._component.parentElement;return}this._targetElement=this._component.parentElement.querySelector(r);return}}else{let i=this._component.previousElementSibling;for(;i;){if(!c(i,t.selectors.TOOLTIP)){this._targetElement=i;return}i=i.previousElementSibling}this._targetElement=this._component.parentElement;return}}};function y(n){return n instanceof HTMLInputElement?E.includes(n.type):!1}function T(n,e=!1){return!n||!n.length?[]:n.split(" ").map(a=>a.trim()).map(a=>{let i=a.split("+"),s=e?i.pop()||"":D((i.pop()||"").toLowerCase()),C=i.sort().join("").toLowerCase();return{key:s,modifier:C}})}function v(n,e,r=!1){let a=r?n.code:n.key.toLowerCase(),i=I(n);return e.some(s=>a===s.key&&i===s.modifier)}function I(n){let e="";return n.altKey&&(e+="alt"),n.ctrlKey&&(e+="control"),n.metaKey&&(e+="meta"),n.shiftKey&&(e+="shift"),e}function D(n){switch(n){case"plus":return"+";case"space":return" ";default:return n}}var b=class{constructor(e){this._adapter=e;this._global=!1;this._allowWhileTyping=!1;this._preventDefault=!0;this._capture=!1;this._useCode=!1;this._disabled=!1;this._keyDownListener=r=>this._onKeyDown(r)}initialize(){this._initializeTargetElement(),this._adapter.setHostStyles()}disconnect(){this._disconnectTargetElement(),this._adapter.destroy()}_initializeTargetElement(){if(this._disconnectTargetElement(),this._adapter.setTargetElement(this._target,this._global),!this._adapter.hasTargetElement())throw new Error("Unable to locate the target element.");this._disabled||this._connectTargetElement()}_connectTargetElement(){!this._adapter.hasTargetElement||this._adapter.addTargetEventListener("keydown",this._keyDownListener,this._capture)}_disconnectTargetElement(){!this._adapter.hasTargetElement||this._adapter.removeTargetEventListener("keydown",this._keyDownListener,this._capture)}_onKeyDown(e){!this._allowWhileTyping&&y(e.target)||v(e,this._keyCombinations,this._useCode)&&(this._preventDefault&&e.preventDefault(),this._adapter.emitHostEvent(t.events.ACTIVATE,e))}_setKeyCombinations(){this._keyCombinations=T(this._key,this._useCode)}get key(){return this._key}set key(e){this._key!==e&&(this._key=e,this._adapter.toggleHostAttribute(t.attributes.KEY,!!this.key,this._key||""),this._setKeyCombinations())}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this._adapter.setHostAttribute(t.attributes.TARGET,this._target),this._adapter.isConnected&&this._initializeTargetElement())}get global(){return this._global}set global(e){this._global!==e&&(this._global=e,this._adapter.toggleHostAttribute(t.attributes.GLOBAL,this._global),this._adapter.isConnected&&this._initializeTargetElement())}get allowWhileTyping(){return this._allowWhileTyping}set allowWhileTyping(e){this._allowWhileTyping!==e&&(this._allowWhileTyping=e,this._adapter.toggleHostAttribute(t.attributes.ALLOW_WHILE_TYPING,this._allowWhileTyping))}get preventDefault(){return this._preventDefault}set preventDefault(e){this._preventDefault!==e&&(this._preventDefault=e,this._adapter.toggleHostAttribute(t.attributes.PREVENT_DEFAULT,this._preventDefault))}get capture(){return this._capture}set capture(e){this._capture!==e&&(this._disconnectTargetElement(),this._capture=e,this._adapter.toggleHostAttribute(t.attributes.CAPTURE,this.capture),this._connectTargetElement())}get useCode(){return this._useCode}set useCode(e){this._useCode!==e&&(this._useCode=e,this._adapter.toggleHostAttribute(t.attributes.USE_CODE,this._useCode),this._setKeyCombinations())}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._adapter.toggleHostAttribute(t.attributes.DISABLED,this._disabled),this._disabled?this._disconnectTargetElement():this._connectTargetElement())}};var o=class extends h{constructor(){super();this._foundation=new b(new u(this))}static get observedAttributes(){return[t.attributes.KEY,t.attributes.TARGET,t.attributes.GLOBAL,t.attributes.ALLOW_WHILE_TYPING,t.attributes.PREVENT_DEFAULT,t.attributes.CAPTURE,t.attributes.USE_CODE,t.attributes.DISABLED]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(r,a,i){switch(r){case t.attributes.KEY:this.key=i;break;case t.attributes.TARGET:this.target=i;break;case t.attributes.GLOBAL:this.global=d(i);break;case t.attributes.ALLOW_WHILE_TYPING:this.allowWhileTyping=d(i);break;case t.attributes.PREVENT_DEFAULT:this.preventDefault=d(i);break;case t.attributes.CAPTURE:this.capture=d(i);break;case t.attributes.USE_CODE:this.useCode=d(i);break;case t.attributes.DISABLED:this.disabled=d(i);break}}get keyBinding(){return this.key}set keyBinding(r){this.key=r}};l([p()],o.prototype,"key",2),l([p()],o.prototype,"target",2),l([p()],o.prototype,"global",2),l([p()],o.prototype,"allowWhileTyping",2),l([p()],o.prototype,"preventDefault",2),l([p()],o.prototype,"capture",2),l([p()],o.prototype,"useCode",2),l([p()],o.prototype,"disabled",2),o=l([g({name:t.elementName})],o);function Z(){m(o)}export{t as a,E as b,u as c,y as d,T as e,v as f,I as g,D as h,b as i,o as j,Z as k};
|
|
7
|
-
//# sourceMappingURL=chunk.FFVZ6JMP.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/keyboard-shortcut/keyboard-shortcut-constants.ts", "../../src/keyboard-shortcut/keyboard-shortcut-adapter.ts", "../../src/keyboard-shortcut/keyboard-shortcut-utils.ts", "../../src/keyboard-shortcut/keyboard-shortcut-foundation.ts", "../../src/keyboard-shortcut/keyboard-shortcut.ts", "../../src/keyboard-shortcut/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}keyboard-shortcut`;\n\nconst attributes = {\n KEY: 'key',\n TARGET: 'target',\n GLOBAL: 'global',\n ALLOW_WHILE_TYPING: 'allow-while-typing',\n USE_CODE: 'use-code',\n PREVENT_DEFAULT: 'prevent-default',\n CAPTURE: 'capture',\n DISABLED: 'disabled'\n};\n\nconst selectors = {\n TOOLTIP: 'forge-tooltip'\n};\n\nconst events = {\n ACTIVATE: `forge-keyboard-shortcut-activate`\n};\n\nexport const KEYBOARD_SHORTCUT_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n events\n};\n\nexport const textInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'email',\n 'month',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week'\n];\n\nexport interface IKeyCombination {\n key: string;\n modifier?: string;\n}\n", "import { matchesSelectors } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base';\nimport { IKeyboardShortcutComponent } from './keyboard-shortcut';\nimport { KEYBOARD_SHORTCUT_CONSTANTS } from './keyboard-shortcut-constants';\n\nexport interface IKeyboardShortcutAdapter extends IBaseAdapter {\n hasTargetElement(): boolean;\n destroy(): void;\n addTargetEventListener(type: string, listener: (evt: KeyboardEvent) => void, capture?: boolean): void;\n removeTargetEventListener(type: string, listener: (evt: KeyboardEvent) => void, capture?: boolean): void;\n setHostStyles(): void;\n setTargetElement(target: string | undefined, global: boolean): void;\n}\n\nexport class KeyboardShortcutAdapter extends BaseAdapter<IKeyboardShortcutComponent> implements IKeyboardShortcutAdapter {\n private _targetElement: HTMLElement | null;\n\n constructor(public component: IKeyboardShortcutComponent) {\n super(component);\n }\n\n public hasTargetElement(): boolean {\n return !!this._targetElement;\n }\n\n public destroy(): void {\n this._targetElement = null;\n }\n\n /**\n * Adds an event listener to the target element.\n * @param type The event type.\n * @param listener The event listener.\n */\n public addTargetEventListener(type: string, listener: (evt: KeyboardEvent) => void, capture?: boolean): void {\n this._targetElement?.addEventListener(type, listener, { capture });\n }\n\n /**\n * Removes an event listener from the target element.\n * @param type The event type.\n * @param listener The event listener.\n */\n public removeTargetEventListener(type: string, listener: (evt: KeyboardEvent) => void, capture?: boolean): void {\n this._targetElement?.removeEventListener(type, listener, { capture });\n }\n\n /**\n * Sets the host element's display to none\n */\n public setHostStyles(): void {\n this.component.style.display = 'none';\n }\n\n /**\n * Sets the target element based on the provided CSS selector.\n * @param {string | undefined} selector The target element selector.\n * @param {boolean} global Whether to target the document element.\n */\n public setTargetElement(selector: string | undefined, global: boolean): void {\n if (global) {\n const doc = this._component.ownerDocument || document;\n this._targetElement = doc.documentElement;\n return;\n }\n \n if (selector) {\n if (this._component.parentElement) {\n if (matchesSelectors(this._component.parentElement, selector)) {\n this._targetElement = this._component.parentElement;\n return;\n }\n this._targetElement = this._component.parentElement.querySelector(selector);\n return;\n }\n } else {\n let sibling = this._component.previousElementSibling;\n while (sibling) {\n // Ignore <forge-tooltip> elements\n if (!matchesSelectors(sibling, KEYBOARD_SHORTCUT_CONSTANTS.selectors.TOOLTIP)) {\n this._targetElement = sibling as HTMLElement;\n return;\n }\n sibling = sibling.previousElementSibling;\n }\n this._targetElement = this._component.parentElement as HTMLElement;\n return;\n }\n }\n}\n", "import { textInputTypes, IKeyCombination } from './keyboard-shortcut-constants';\n\n/** Checks if an HTML element allows text input */\nexport function elementAcceptsTextInput(el: any): boolean {\n if (el instanceof HTMLInputElement) {\n return textInputTypes.includes(el.type);\n }\n return false;\n}\n\n/** Parses a string of key combinations into an array of keys and modifiers */\nexport function parseKeyCombinations(keys: string | null | undefined, useCode = false): IKeyCombination[] {\n if (!keys || !keys.length) {\n return [];\n }\n\n const separatedKeys = keys.split(' ').map(key => key.trim());\n return separatedKeys.map(key => {\n const keyParts = key.split('+');\n const fixedKey = useCode ? keyParts.pop() || '' : fixKey((keyParts.pop() || '').toLowerCase());\n const modifiers = keyParts.sort().join('').toLowerCase();\n return { key: fixedKey, modifier: modifiers };\n });\n}\n\n/** Checks a keyboard event for a matching key combination */\nexport function matchKeyCombination(evt: KeyboardEvent, keyCombinations: IKeyCombination[], useCode = false): boolean {\n const eventKey = useCode ? evt.code : evt.key.toLowerCase();\n const modifierKeys = getModiferKeysString(evt);\n return keyCombinations.some(combination => eventKey === combination.key && modifierKeys === combination.modifier);\n}\n\n/** Returns an array of active modifier keys from a keyboard event */\nexport function getModiferKeysString(evt: KeyboardEvent): string {\n // Ensure the modifier keys are appended in alphabetical order\n let modifierString = '';\n if (evt.altKey) {\n modifierString += 'alt';\n }\n if (evt.ctrlKey) {\n modifierString += 'control';\n }\n if (evt.metaKey) {\n modifierString += 'meta';\n }\n if (evt.shiftKey) {\n modifierString += 'shift';\n }\n return modifierString;\n}\n\n/** Returns a reserved key character from its alias */\nexport function fixKey(key: string): string {\n switch (key) {\n case 'plus':\n return '+';\n case 'space':\n return ' ';\n default:\n return key;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { IKeyboardShortcutAdapter } from './keyboard-shortcut-adapter';\nimport { IKeyCombination, KEYBOARD_SHORTCUT_CONSTANTS } from './keyboard-shortcut-constants';\nimport { elementAcceptsTextInput, matchKeyCombination, parseKeyCombinations } from './keyboard-shortcut-utils';\n\nexport interface IKeyboardShortcutFoundation extends ICustomElementFoundation {\n key: string | null | undefined;\n target: string;\n global: boolean;\n allowWhileTyping: boolean;\n preventDefault: boolean;\n capture: boolean;\n useCode: boolean;\n disabled: boolean;\n}\n\nexport class KeyboardShortcutFoundation implements IKeyboardShortcutFoundation {\n private _key: string | null | undefined;\n private _target: string;\n private _global = false;\n private _allowWhileTyping = false;\n private _preventDefault = true;\n private _capture = false;\n private _useCode = false;\n private _disabled = false;\n private _keyCombinations: IKeyCombination[];\n private _keyDownListener: (evt: KeyboardEvent) => void;\n \n constructor(private _adapter: IKeyboardShortcutAdapter) {\n this._keyDownListener = evt => this._onKeyDown(evt);\n }\n\n public initialize(): void {\n this._initializeTargetElement();\n this._adapter.setHostStyles();\n }\n\n public disconnect(): void {\n this._disconnectTargetElement();\n this._adapter.destroy();\n }\n\n private _initializeTargetElement(): void {\n this._disconnectTargetElement();\n this._adapter.setTargetElement(this._target, this._global);\n \n if (!this._adapter.hasTargetElement()) {\n throw new Error('Unable to locate the target element.');\n }\n\n if (!this._disabled) {\n this._connectTargetElement();\n }\n }\n\n private _connectTargetElement(): void {\n if (!this._adapter.hasTargetElement) {\n return;\n }\n this._adapter.addTargetEventListener('keydown', this._keyDownListener, this._capture);\n }\n\n private _disconnectTargetElement(): void {\n if (!this._adapter.hasTargetElement) {\n return;\n }\n this._adapter.removeTargetEventListener('keydown', this._keyDownListener, this._capture);\n }\n\n private _onKeyDown(evt: KeyboardEvent): void {\n // Here we may check if the target element is disabled, but disabled elements typically can't receive focus anyway\n\n // Ignore the event if it originates from a text field\n // TODO: bypass this and allow it if a modifier key is used?\n if (!this._allowWhileTyping && elementAcceptsTextInput(evt.target)) {\n return;\n }\n\n if (matchKeyCombination(evt, this._keyCombinations, this._useCode)) {\n if (this._preventDefault) {\n evt.preventDefault();\n }\n this._adapter.emitHostEvent(KEYBOARD_SHORTCUT_CONSTANTS.events.ACTIVATE, evt);\n }\n }\n\n /** Sets the key combinations. */\n private _setKeyCombinations(): void {\n this._keyCombinations = parseKeyCombinations(this._key, this._useCode);\n }\n\n /** Gets/sets the key binding. */\n public get key(): string | null | undefined {\n return this._key;\n }\n public set key(value: string| null | undefined) {\n if (this._key !== value) {\n this._key = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.KEY, !!this.key, this._key || '');\n this._setKeyCombinations();\n }\n // TODO: prevent multiple shortcuts with the same keys on an element (possible?)\n }\n\n /** Gets/sets the target element selector. */\n public get target(): string {\n return this._target;\n }\n public set target(value: string) {\n if (this._target !== value) {\n this._target = value;\n this._adapter.setHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.TARGET, this._target);\n if (this._adapter.isConnected) {\n this._initializeTargetElement();\n }\n }\n }\n\n /** Gets/sets the global listener state. */\n public get global(): boolean {\n return this._global;\n }\n public set global(value: boolean) {\n if (this._global !== value) {\n this._global = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.GLOBAL, this._global);\n if (this._adapter.isConnected) {\n this._initializeTargetElement();\n }\n }\n }\n\n /** Gets/sets whether the callback will be trigger while a text input has focus. */\n public get allowWhileTyping(): boolean {\n return this._allowWhileTyping;\n }\n public set allowWhileTyping(value: boolean) {\n if (this._allowWhileTyping !== value) {\n this._allowWhileTyping = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.ALLOW_WHILE_TYPING, this._allowWhileTyping);\n }\n }\n\n /** Gets/sets whether to prevent default on keyboard events. */\n public get preventDefault(): boolean {\n return this._preventDefault;\n }\n public set preventDefault(value: boolean) {\n if (this._preventDefault !== value) {\n this._preventDefault = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.PREVENT_DEFAULT, this._preventDefault);\n }\n }\n\n /** Gets/sets whether to use capturing on keyboard events. */\n public get capture(): boolean {\n return this._capture;\n }\n public set capture(value: boolean) {\n if (this._capture !== value) {\n this._disconnectTargetElement(); // We need to disconnect first to ensure our listener is removed properly based on capturing state\n this._capture = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.CAPTURE, this.capture);\n this._connectTargetElement();\n }\n }\n\n /** Gets/sets whether to match codes instead of keys on keyboard events. */\n public get useCode(): boolean{\n return this._useCode;\n }\n public set useCode(value: boolean) {\n if (this._useCode !== value) {\n this._useCode = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.USE_CODE, this._useCode);\n this._setKeyCombinations();\n }\n }\n\n /** Gets/sets whether the event will be emitted. */\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.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.DISABLED, this._disabled);\n\n if (this._disabled) {\n this._disconnectTargetElement();\n } else {\n this._connectTargetElement();\n }\n }\n }\n}\n", "import { coerceBoolean, CustomElement, FoundationProperty } from '@tylertech/forge-core';\n\nimport { KeyboardShortcutAdapter } from './keyboard-shortcut-adapter';\nimport { KeyboardShortcutFoundation } from './keyboard-shortcut-foundation';\nimport { KEYBOARD_SHORTCUT_CONSTANTS } from './keyboard-shortcut-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nexport interface IKeyboardShortcutComponent extends IBaseComponent {\n key: string | null | undefined;\n keyBinding: string | null | undefined;\n target: string;\n global: boolean;\n allowWhileTyping: boolean;\n preventDefault: boolean;\n capture: boolean;\n useCode: boolean;\n disabled: boolean;\n}\n\ndeclare global {\n // tslint:disable-next-line: interface-name\n interface HTMLElementTagNameMap {\n 'forge-keyboard-shortcut': IKeyboardShortcutComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-keyboard-shortcut-activate': CustomEvent<KeyboardEvent>;\n }\n}\n\n/**\n * The web component class behind the `<forge-keyboard-shortcut>` custom element.\n * \n * @tag forge-keyboard-shortcut\n */\n@CustomElement({\n name: KEYBOARD_SHORTCUT_CONSTANTS.elementName\n})\nexport class KeyboardShortcutComponent extends BaseComponent implements IKeyboardShortcutComponent {\n public static get observedAttributes(): string[] {\n return [\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.KEY,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.TARGET,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.GLOBAL,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.ALLOW_WHILE_TYPING,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.PREVENT_DEFAULT,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.CAPTURE,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.USE_CODE,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.DISABLED\n ];\n }\n\n private _foundation: KeyboardShortcutFoundation;\n\n constructor() {\n super();\n this._foundation = new KeyboardShortcutFoundation(new KeyboardShortcutAdapter(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 KEYBOARD_SHORTCUT_CONSTANTS.attributes.KEY:\n this.key = newValue;\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.TARGET:\n this.target = newValue;\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.GLOBAL:\n this.global = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.ALLOW_WHILE_TYPING:\n this.allowWhileTyping = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.PREVENT_DEFAULT:\n this.preventDefault = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.CAPTURE:\n this.capture = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.USE_CODE:\n this.useCode = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n }\n }\n\n /** Gets/sets the key binding. */\n @FoundationProperty()\n public declare key: string | null | undefined;\n\n /** Alias for key. */\n public get keyBinding(): string | null | undefined {\n return this.key;\n }\n public set keyBinding(value: string | null | undefined) {\n this.key = value;\n }\n\n /** Gets/sets the target element selector. */\n @FoundationProperty()\n public declare target: string;\n\n /** Gets/sets the global listener state. */\n @FoundationProperty()\n public declare global: boolean;\n\n /** Gets/sets whether the callback will be called while in a text entry field. */\n @FoundationProperty()\n public declare allowWhileTyping: boolean;\n \n /** Gets/sets whether to prevent default on keyboard events */\n @FoundationProperty()\n public declare preventDefault: boolean;\n \n /** Gets/sets whether to use capturing on keyboard events */\n @FoundationProperty()\n public declare capture: boolean;\n \n /** Gets/sets whether to match codes instead of keys on keyboard events */\n @FoundationProperty()\n public declare useCode: boolean;\n\n /** Gets/sets whether the callback will be called. */\n @FoundationProperty()\n public declare disabled: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { KeyboardShortcutComponent } from './keyboard-shortcut';\n\nexport * from './keyboard-shortcut-adapter';\nexport * from './keyboard-shortcut-constants';\nexport * from './keyboard-shortcut-foundation';\nexport * from './keyboard-shortcut-utils';\nexport * from './keyboard-shortcut';\n\nexport function defineKeyboardShortcutComponent(): void {\n defineCustomElement(KeyboardShortcutComponent);\n}\n"],
|
|
5
|
-
"mappings": "sSAEA,IAAMA,EAA2C,GAAGC,qBAE9CC,EAAa,CACjB,IAAK,MACL,OAAQ,SACR,OAAQ,SACR,mBAAoB,qBACpB,SAAU,WACV,gBAAiB,kBACjB,QAAS,UACT,SAAU,UACZ,EAEMC,EAAY,CAChB,QAAS,eACX,EAEMC,EAAS,CACb,SAAU,kCACZ,EAEaC,EAA8B,CACzC,YAAAL,EACA,WAAAE,EACA,UAAAC,EACA,OAAAC,CACF,EAEaE,EAAiB,CAC5B,OACA,WACA,iBACA,QACA,QACA,SACA,WACA,SACA,MACA,OACA,OACA,MACA,MACF,EC9BO,IAAMC,EAAN,cAAsCC,CAA4E,CAGvH,YAAmBC,EAAuC,CACxD,MAAMA,CAAS,EADE,eAAAA,CAEnB,CAEO,kBAA4B,CACjC,MAAO,CAAC,CAAC,KAAK,cAChB,CAEO,SAAgB,CACrB,KAAK,eAAiB,IACxB,CAOO,uBAAuBC,EAAcC,EAAwCC,EAAyB,CAlC/G,IAAAC,GAmCIA,EAAA,KAA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HORTCUT_CONSTANTS", "textInputTypes", "KeyboardShortcutAdapter", "BaseAdapter", "component", "type", "listener", "capture", "_a", "selector", "global", "doc", "matchesSelectors", "sibling", "KEYBOARD_SHORTCUT_CONSTANTS", "elementAcceptsTextInput", "el", "textInputTypes", "parseKeyCombinations", "keys", "useCode", "key", "keyParts", "fixedKey", "fixKey", "modifiers", "matchKeyCombination", "evt", "keyCombinations", "eventKey", "modifierKeys", "getModiferKeysString", "combination", "modifierString", "KeyboardShortcutFoundation", "_adapter", "evt", "elementAcceptsTextInput", "matchKeyCombination", "KEYBOARD_SHORTCUT_CONSTANTS", "parseKeyCombinations", "value", "KeyboardShortcutComponent", "BaseComponent", "KeyboardShortcutFoundation", "KeyboardShortcutAdapter", "KEYBOARD_SHORTCUT_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "value", "__decorateClass", "FoundationProperty", "CustomElement", "defineKeyboardShortcutComponent", "defineCustomElement", "KeyboardShortcutComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as w,b as k,c as C}from"./chunk.K4SWLH26.js";import{e as L}from"./chunk.K6LBO4KJ.js";import{a as E}from"./chunk.2KXSGD3S.js";import{a as _,b as y}from"./chunk.QOA2O575.js";import{a as v,e as x,g as s}from"./chunk.HOXFK44F.js";import{s as u}from"./chunk.4LA6HEA7.js";import{f as h}from"./chunk.MCIQXNKY.js";var g=`${y}chip-field`,M={ROOT:"forge-chip-field"},n={LABEL:"label",HELPER_TEXT:"helper-text",MEMBER:"member"},I={ROOT:`.${M.ROOT}`,INPUT_CONTAINER:".forge-field__input-container",INPUT:"input",LABEL:`[slot=${n.LABEL}]`,HELPER_TEXT:`[slot=${n.HELPER_TEXT}]`,MEMBER:`[slot=${n.MEMBER}]`,LABEL_SLOT:`slot[name=${n.LABEL}]`,MEMBER_SLOT:`slot[name=${n.MEMBER}]`},z={MEMBER_ADDED:`${g}-member-added`,MEMBER_REMOVED:`${g}-member-removed`},o={elementName:g,classes:M,slots:n,selectors:I,events:z};var d=class extends w{constructor(e){super(e)}initialize(){super.initialize(o.selectors.ROOT),this._memberSlot=s(this._component,o.selectors.MEMBER_SLOT),this._inputContainerElement=s(this._component,o.selectors.INPUT_CONTAINER)}addRootListener(e,t){this._rootElement.addEventListener(e,t)}removeRootListener(e,t){this._rootElement.removeEventListener(e,t)}addMemberSlotListener(e){this._memberSlot.addEventListener("slotchange",e)}removeMemberSlotListener(e){this._memberSlot&&this._memberSlot.removeEventListener("slotchange",e)}addInputContainerListener(e,t){this._inputContainerElement.addEventListener(e,t)}removeInputContainerListener(e,t){this._inputContainerElement.removeEventListener(e,t)}fieldHasValue(){return!!this._component.querySelector(o.selectors.MEMBER)||super.inputHasValue()}focusInput(){var e;(e=this._inputElement)==null||e.focus()}tryPropagateClick(e){var t;e instanceof HTMLElement&&e.matches(o.selectors.INPUT_CONTAINER)&&((t=this._inputElement)==null||t.dispatchEvent(new MouseEvent("click")))}getSlottedMemberElements(){return this._component.querySelectorAll(o.selectors.MEMBER)}};var a=class extends k{constructor(e){super(e);this._adapter=e;this._memberSlotListener=()=>this._onMemberSlotChanged(),this._inputContainerMouseDownListener=t=>this._onInputContainerMouseDown(t),this._handleRootKeyDown=t=>this._onRootKeyDown(t),this._handleKeyDown=t=>this._onKeyDown(t)}initialize(){super.initialize(),this._adapter.addMemberSlotListener(this._memberSlotListener),this._adapter.addInputContainerListener("mousedown",this._inputContainerMouseDownListener),this._adapter.addRootListener("keydown",this._handleRootKeyDown),this._adapter.addInputListener("keydown",this._handleKeyDown)}disconnect(){super.disconnect(),this._adapter.removeMemberSlotListener(this._memberSlotListener),this._adapter.removeInputContainerListener("mousedown",this._inputContainerMouseDownListener),this._adapter.removeRootListener("keydown",this._handleRootKeyDown),this._adapter.removeInputListener("keydown",this._handleKeyDown)}_onInputContainerMouseDown(e){e.preventDefault(),this._adapter.focusInput(),this._adapter.tryPropagateClick(e.target)}_onBlur(e){let t=e.target;t.value="",super._onBlur(e)}_onRootKeyDown(e){if(!this._adapter.inputHasValue())switch(e.key){case"Right":case"ArrowRight":this._focusNextMember();break;case"Left":case"ArrowLeft":this._focusPreviousMember();break;case"Backspace":case"Delete":case"Del":this._removeMember();break;default:break}}_onKeyDown(e){let t=e.target;switch(e.key){case"Enter":this._addMember(t);break;case"Esc":case"Escape":case"Tab":t.value="";break;default:break}}_focusNextMember(){let e=this._adapter.getSlottedMemberElements();if(!(e.length<1||this._adapter.inputHasFocus()))for(let t=0;t<e.length;t++){let i=e.item(t),r=e.item(t+1);if(this._memberIsActive(i))if(r){r.focus();break}else this._adapter.focusInput()}}_focusPreviousMember(){let e=this._adapter.getSlottedMemberElements();if(!(e.length<1)){if(this._adapter.inputHasFocus()){e[e.length-1].focus();return}for(let t=0;t<e.length;t++){let i=e.item(t-1),r=e.item(t);if(this._memberIsActive(r)&&i){i.focus();break}}}}_memberIsActive(e){return u(e.ownerDocument)===e||e.hasAttribute("focused")}_getActiveMember(){let e=this._adapter.getSlottedMemberElements();for(let t=0;t<e.length;t++){let i=e.item(t);if(this._memberIsActive(i))return i}return null}_addMember(e){let t=e.value.trim();t&&t.length>0&&this._adapter.emitHostEvent(o.events.MEMBER_ADDED,t),e.value=""}_removeMember(){let e=this._getActiveMember();if(!e){let t=this._adapter.getSlottedMemberElements();e=t.item(t.length-1)}!e||(this._focusNextMember(),this._adapter.emitHostEvent(o.events.MEMBER_REMOVED,e))}_onMemberSlotChanged(){this.floatLabel(this._adapter.fieldHasValue()||this._adapter.inputHasFocus()),this._adapter.getSlottedMemberElements().forEach(e=>e.tabIndex=-1)}};var F='<template><div class="forge-chip-field__wrapper" part="root"><div class="forge-chip-field forge-field" part="container"><slot name="leading"></slot><div class="forge-field__label-input-container" part="label-input-container"><slot name="label"></slot><div class="forge-field__input-container" part="input-container"><slot name="member"></slot><slot></slot></div></div><slot name="trailing"></slot><div class="forge-field__addon-end-container" part="addon-end-container"><slot name="addon-end"></slot></div></div><slot name="helper-text"></slot></div></template>',D='.forge-field::before{content:"";display:-webkit-box;display:flex;position:absolute;top:0;right:0;left:0;z-index:-1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;height:100%;pointer-events:none;border-style:solid;border-style:var(--forge-chip-field-border-style,solid);border-width:1px;-webkit-transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);background-color:transparent;background-color:var(--forge-chip-field-theme-background,transparent);text-align:left}.forge-field[dir=rtl]::before,[dir=rtl] .forge-field::before{text-align:right}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused)::before{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused):hover::before{border-color:rgba(0,0,0,.87);border-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled)::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-field--invalid:not(.forge-field--disabled)::before{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.forge-field--invalid:not(.forge-field--disabled):not(.forge-field--focused):hover::before{border-color:#db8a98;border-color:var(--forge-theme-error-hover,#db8a98)}.forge-field--disabled::before{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--shape-rounded){border-radius:4px}.forge-field:not(.forge-field--shape-rounded)::before{border-radius:4px}.forge-field--shape-rounded{border-radius:28px}.forge-field--shape-rounded::before{border-radius:28px}.forge-field--disabled::before{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-field--focused::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);border-width:2px}.forge-field__label-input-container{position:relative;-webkit-box-flex:1;flex:1 1 0.0001px;height:100%;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;min-width:0}.forge-field ::slotted(label){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65));pointer-events:none;right:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);font-size:var(--mdc-typography-subtitle1-font-size, 1rem);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.1rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;-webkit-transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field ::slotted(label[dir=rtl]),[dir=rtl] .forge-field ::slotted(label){right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.forge-field--dense:not(.forge-field--roomy) ::slotted(label){display:none}.forge-field--required ::slotted(label)::after{content:none}.forge-field--required ::slotted(label)::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:"*";margin-right:4px}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){font-size:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){font-size:1rem}.forge-field--disabled ::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){top:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){top:1.285rem}.forge-field:not(.forge-field--shape-rounded):not(.forge-field--leading) ::slotted(label){left:12px!important}.forge-field--shape-rounded:not(.forge-field--leading) ::slotted(label){left:32px!important}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end):not(.forge-field--shape-rounded) ::slotted(label){padding-right:12px}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end).forge-field--shape-rounded ::slotted(label){padding-right:32px}.forge-field ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65))}.forge-field--disabled ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.54rem) scale(.8125);transform:translateY(-.54rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.72rem) scale(.8125);transform:translateY(-.72rem) scale(.8125);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.62rem) scale(1);transform:translateY(-.62rem) scale(1);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.8rem) scale(1);transform:translateY(-.8rem) scale(1);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.62rem) scale(.8125);transform:translateY(-.62rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.8rem) scale(.8125);transform:translateY(-.8rem) scale(.8125);cursor:auto}.forge-field~::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;min-height:1.5rem;line-height:normal;padding-top:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field:not(.forge-field--dense):not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field--roomy:not(.forge-field--dense)~::slotted([slot=helper-text]){font-size:.875rem}.forge-field--dense:not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field~::slotted([slot=helper-text]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled)~::slotted([slot=helper-text]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field:not(.forge-field--shape-rounded)~::slotted([slot=helper-text]){margin-left:12px}.forge-field--shape-rounded~::slotted([slot=helper-text]){margin-left:32px}.forge-field ::slotted([slot=leading]){display:-webkit-box;display:flex;align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=leading]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=leading]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=leading]){margin:0 4px}.forge-field ::slotted([slot=leading]:not(forge-icon-button)){padding:6px}.forge-field ::slotted([slot=trailing]){align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=trailing]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=trailing]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=trailing]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=trailing]){margin:0 4px}.forge-field ::slotted([slot=trailing]:not(forge-icon-button)){padding:6px}.forge-field__addon-end-container{display:none}.forge-field--addon-end .forge-field__addon-end-container{height:100%;width:auto;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;padding:0 4px;border-left-width:1px;border-left-style:solid;-webkit-transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.54);border-left-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container:hover{border-left-color:rgba(0,0,0,.87);border-left-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#3f51b5;border-left-color:var(--mdc-theme-primary,#3f51b5)}.forge-field.forge-field--invalid:not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#b00020;border-left-color:var(--mdc-theme-error,#b00020)}.forge-field.forge-field--invalid:not(.forge-field--focused):not(.forge-field--disabled) .forge-field__addon-end-container:hover{border-left-color:#db8a98;border-left-color:var(--forge-theme-error-hover,#db8a98)}.forge-field.forge-field--disabled .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.12);border-left-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=addon-end]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=addon-end]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=addon-end]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-chip-field{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;z-index:1;z-index:var(--forge-z-index-surface,1);margin-top:0;margin-top:var(--forge-chip-field-margin-top,0);display:grid;grid-template-columns:[leading] -webkit-min-content [input] 1fr [trailing] -webkit-min-content [addon-end] -webkit-min-content [end];grid-template-columns:[leading] min-content [input] 1fr [trailing] min-content [addon-end] min-content [end]}.forge-chip-field.forge-field--disabled{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);cursor:not-allowed}.forge-chip-field:not(.forge-field--dense):not(.forge-field--roomy){height:auto;min-height:46px;min-height:var(--forge-chip-field-height,46px)}.forge-chip-field.forge-field--roomy:not(.forge-field--dense){height:auto;min-height:3.5rem;min-height:var(--forge-chip-field-height,3.5rem)}.forge-chip-field.forge-field--dense:not(.forge-field--roomy){height:auto;min-height:1.5rem;min-height:var(--forge-chip-field-height,1.5rem)}.forge-field__label-input-container{grid-column-start:input;grid-column-end:trailing}.forge-field__input-container{-webkit-box-flex:1;flex:1 1 0.0001px;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:wrap;-webkit-box-align:start;align-items:flex-start;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field__input-container{padding:2px 12px}.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--shape-rounded:not(.forge-field--leading) .forge-field__input-container{padding-left:32px}.forge-field--leading:not(.forge-field--shape-rounded) .forge-field__input-container{padding-left:0}.forge-field--shape-rounded.forge-field--leading .forge-field__input-container{padding-left:0}.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--shape-rounded:not(.forge-field--trailing):not(.forge-field--addon-end) .forge-field__input-container{padding-right:32px}.forge-field--addon-end:not(.forge-field--shape-rounded) .forge-field__input-container,.forge-field--trailing:not(.forge-field--shape-rounded) .forge-field__input-container{padding-right:0}.forge-field--shape-rounded.forge-field--addon-end .forge-field__input-container,.forge-field--shape-rounded.forge-field--trailing .forge-field__input-container{padding-right:0}.forge-field ::slotted([slot=member]){display:block}.forge-field--disabled ::slotted([slot=member]){--mdc-theme-primary:rgba(0, 0, 0, 0.38);--mdc-theme-primary:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38));cursor:not-allowed;pointer-events:none}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 8px 2px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=member]){margin:6px 12px 6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 6px 2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:20px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:16px}.forge-field ::slotted(input){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);border:none;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;line-height:normal;min-width:0}.forge-field ::slotted(input)::-webkit-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-moz-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):invalid{-webkit-box-shadow:none;box-shadow:none}.forge-field ::slotted(input):-webkit-autofill{z-index:auto!important}.forge-field:not(.forge-field--disabled) ::slotted(input){color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--disabled ::slotted(input){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6));cursor:not-allowed}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){font-size:.875rem;font-size:var(--forge-chip-field-font-size, .875rem)}.forge-field ::slotted(input){-webkit-box-flex:1;flex:1 1 0.0001px;min-width:40px;display:block;align-self:flex-start;padding:0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){margin:4px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){margin:6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){margin:2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){height:1.25rem;line-height:1.25rem}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field ::slotted([slot=leading]){grid-column-start:leading;grid-column-end:input;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=leading]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){padding-top:0;padding-bottom:0}.forge-field ::slotted([slot=trailing]){grid-column-start:trailing;grid-column-end:addon-end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=trailing]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){padding-top:0;padding-bottom:0}.forge-field--addon-end .forge-field__addon-end-container{grid-column-start:addon-end;grid-column-end:end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=addon-end]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:0;margin-bottom:0}.forge-field ::slotted(forge-icon-button){display:-webkit-inline-box!important;display:inline-flex!important}:host{display:block;contain:layout}:host([hidden]){display:none}',l=class extends C{constructor(){super(),x(this,F,D),this._foundation=new a(new d(this))}};l=h([_({name:o.elementName,dependencies:[L]})],l);var T=class extends E{constructor(e){super(e)}_build(){var t,i;let e=document.createElement(o.elementName);return this._inputElement=this._buildInputElement(e),(t=this._config.options)!=null&&t.leadingElement&&(this._config.options.leadingElement.slot="leading",e.appendChild(this._config.options.leadingElement)),(i=this._config.options)!=null&&i.trailingElement&&(this._config.options.trailingElement.slot="trailing",e.appendChild(this._config.options.trailingElement)),e.appendChild(this._inputElement),e}_configure(){var e,t;(e=this._config.options)!=null&&e.helperText&&this.setHelperText(this._config.options.helperText),typeof((t=this._config.options)==null?void 0:t.label)=="string"&&this._createLabel(this._config.options.label)}get value(){return this._inputElement.value}set value(e){this._inputElement.value=e}get disabled(){return this._inputElement.disabled}set disabled(e){this._inputElement.disabled=e}get invalid(){return this._element.invalid||!1}set invalid(e){this._element.invalid=e}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(e){this._inputElement.addEventListener("input",t=>e(t.target.value))}onFocus(e){this._inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._inputElement.addEventListener("blur",t=>e(t))}setLabel(e){e?this._labelElement?this._labelElement.textContent=e:this._createLabel(e):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(e){e?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=e):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}floatLabel(e){this._element.floatLabel(e)}_createLabel(e){var t;this._labelElement=document.createElement("label"),this._labelElement.textContent=e,(t=this._config.options)!=null&&t.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_buildInputElement(e){var i,r,p,b,c;let t=document.createElement("input");return t.type=((i=this._config.options)==null?void 0:i.type)||"text",((r=this._config.options)==null?void 0:r.value)!==void 0&&(t.value=this._config.options.value),(p=this._config.options)!=null&&p.id&&(t.id=this._config.options.id),typeof((b=this._config.options)==null?void 0:b.placeholder)=="string"&&(t.placeholder=(c=this._config.options)==null?void 0:c.placeholder),e.appendChild(t),t}};function le(){v(l)}export{o as a,d as b,a as c,l as d,T as e,le as f};
|
|
7
|
-
//# sourceMappingURL=chunk.IMEODSRH.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/chip-field/chip-field-constants.ts", "../../src/chip-field/chip-field-adapter.ts", "../../src/chip-field/chip-field-foundation.ts", "../../src/chip-field/chip-field.ts", "../../src/chip-field/chip-field-component-delegate.ts", "../../src/chip-field/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}chip-field`;\n\nconst classes = {\n ROOT: 'forge-chip-field'\n};\n\nconst slots = {\n LABEL: 'label',\n HELPER_TEXT: 'helper-text',\n MEMBER: 'member'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n INPUT_CONTAINER: '.forge-field__input-container',\n INPUT: 'input',\n LABEL: `[slot=${slots.LABEL}]`,\n HELPER_TEXT: `[slot=${slots.HELPER_TEXT}]`,\n MEMBER: `[slot=${slots.MEMBER}]`,\n LABEL_SLOT: `slot[name=${slots.LABEL}]`,\n MEMBER_SLOT: `slot[name=${slots.MEMBER}]`\n};\n\nconst events = {\n MEMBER_ADDED: `${elementName}-member-added`,\n MEMBER_REMOVED: `${elementName}-member-removed`\n};\n\nexport const CHIP_FIELD_CONSTANTS = {\n elementName,\n classes,\n slots,\n selectors,\n events\n};\n\nexport {\n type FieldDensityType as ChipFieldDensityType,\n type FieldFloatLabelType as ChipFieldFloatLabelType,\n type FieldShapeType as ChipFieldShapeType\n} from '../field/field-constants';\n", "import { IChipFieldComponent } from './chip-field';\nimport { getShadowElement } from '@tylertech/forge-core';\nimport { CHIP_FIELD_CONSTANTS } from './chip-field-constants';\nimport { FieldAdapter, IFieldAdapter } from '../field/field-adapter';\n\nexport interface IChipFieldAdapter extends IFieldAdapter {\n // root\n addRootListener(type: string, callback: (event: Event) => void): void;\n removeRootListener(type: string, callback: (event: Event) => void): void;\n\n // member\n addMemberSlotListener(listener: (evt: Event) => void): void;\n removeMemberSlotListener(listener: (evt: Event) => void): void;\n\n addInputContainerListener(type: string, callback: (event: Event) => void): void;\n removeInputContainerListener(type: string, callback: (event: Event) => void): void;\n\n // state selectors\n getSlottedMemberElements(): NodeListOf<HTMLElement>;\n\n // state actions\n focusInput(): void;\n tryPropagateClick(target: EventTarget | null): void;\n}\n\nexport class ChipFieldAdapter extends FieldAdapter implements IChipFieldAdapter {\n protected _memberSlot: HTMLSlotElement;\n protected _inputContainerElement: HTMLElement;\n\n constructor(component: IChipFieldComponent) {\n super(component);\n }\n\n public initialize(): void {\n super.initialize(CHIP_FIELD_CONSTANTS.selectors.ROOT);\n this._memberSlot = getShadowElement(this._component, CHIP_FIELD_CONSTANTS.selectors.MEMBER_SLOT) as HTMLSlotElement;\n this._inputContainerElement = getShadowElement(this._component, CHIP_FIELD_CONSTANTS.selectors.INPUT_CONTAINER) as HTMLElement;\n }\n\n public addRootListener(type: string, callback: (event: Event) => void): void {\n this._rootElement.addEventListener(type, callback);\n }\n\n public removeRootListener(type: string, callback: (event: Event) => void): void {\n this._rootElement.removeEventListener(type, callback);\n }\n\n public addMemberSlotListener(listener: (evt: Event) => void): void {\n this._memberSlot.addEventListener('slotchange', listener);\n }\n\n public removeMemberSlotListener(listener: (evt: Event) => void): void {\n if (this._memberSlot) {\n this._memberSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addInputContainerListener(type: string, callback: (event: Event) => void): void {\n this._inputContainerElement.addEventListener(type, callback);\n }\n\n public removeInputContainerListener(type: string, callback: (event: Event) => void): void {\n this._inputContainerElement.removeEventListener(type, callback);\n }\n\n public override fieldHasValue(): boolean {\n const aMemberExists = !!this._component.querySelector(CHIP_FIELD_CONSTANTS.selectors.MEMBER);\n return aMemberExists || super.inputHasValue();\n }\n\n public focusInput(): void {\n this._inputElement?.focus();\n }\n \n public tryPropagateClick(target: EventTarget | null): void {\n // We only propagate the click to the input if it originated from our internal input container\n if (target instanceof HTMLElement && target.matches(CHIP_FIELD_CONSTANTS.selectors.INPUT_CONTAINER)) {\n this._inputElement?.dispatchEvent(new MouseEvent('click'));\n }\n }\n\n public getSlottedMemberElements(): NodeListOf<HTMLElement> {\n return this._component.querySelectorAll<HTMLElement>(CHIP_FIELD_CONSTANTS.selectors.MEMBER);\n }\n}\n", "import { getActiveElement } from '@tylertech/forge-core';\nimport { IChipFieldAdapter } from './chip-field-adapter';\nimport { CHIP_FIELD_CONSTANTS } from './chip-field-constants';\nimport { IFieldFoundation, FieldFoundation } from '../field/field-foundation';\n\nexport interface IChipFieldFoundation extends IFieldFoundation {}\n\nexport class ChipFieldFoundation extends FieldFoundation implements IChipFieldFoundation {\n private _memberSlotListener: () => void;\n private _inputContainerMouseDownListener: (evt: MouseEvent) => void;\n private _handleRootKeyDown: (event: KeyboardEvent) => void;\n private _handleKeyDown: (event: KeyboardEvent) => void;\n\n constructor(protected _adapter: IChipFieldAdapter) {\n super(_adapter);\n this._memberSlotListener = () => this._onMemberSlotChanged();\n this._inputContainerMouseDownListener = evt => this._onInputContainerMouseDown(evt);\n this._handleRootKeyDown = evt => this._onRootKeyDown(evt);\n this._handleKeyDown = evt => this._onKeyDown(evt);\n }\n\n public initialize(): void {\n super.initialize();\n this._adapter.addMemberSlotListener(this._memberSlotListener);\n this._adapter.addInputContainerListener('mousedown', this._inputContainerMouseDownListener);\n this._adapter.addRootListener('keydown', this._handleRootKeyDown);\n this._adapter.addInputListener('keydown', this._handleKeyDown);\n }\n\n public disconnect(): void {\n super.disconnect();\n this._adapter.removeMemberSlotListener(this._memberSlotListener);\n this._adapter.removeInputContainerListener('mousedown', this._inputContainerMouseDownListener);\n this._adapter.removeRootListener('keydown', this._handleRootKeyDown);\n this._adapter.removeInputListener('keydown', this._handleKeyDown);\n }\n\n private _onInputContainerMouseDown(evt: MouseEvent): void {\n evt.preventDefault();\n this._adapter.focusInput();\n this._adapter.tryPropagateClick(evt.target);\n }\n\n protected _onBlur(event: FocusEvent): void {\n const input = event.target as HTMLInputElement;\n input.value = '';\n super._onBlur(event);\n }\n\n private _onRootKeyDown(event: KeyboardEvent): void {\n if (this._adapter.inputHasValue()) {\n return;\n }\n\n switch (event.key) {\n case 'Right':\n case 'ArrowRight':\n this._focusNextMember();\n break;\n case 'Left':\n case 'ArrowLeft':\n this._focusPreviousMember();\n break;\n case 'Backspace':\n case 'Delete':\n case 'Del':\n this._removeMember();\n break;\n default:\n break;\n }\n }\n\n private _onKeyDown(event: KeyboardEvent): void {\n const input = event.target as HTMLInputElement;\n switch (event.key) {\n case 'Enter':\n this._addMember(input);\n break;\n case 'Esc':\n case 'Escape':\n case 'Tab':\n input.value = '';\n break;\n default:\n break;\n }\n }\n\n private _focusNextMember(): void {\n const members = this._adapter.getSlottedMemberElements();\n if (members.length < 1 || this._adapter.inputHasFocus()) {\n return;\n }\n\n for (let i = 0; i < members.length; i++) {\n const member = members.item(i);\n const nextMember = members.item(i + 1);\n\n if (this._memberIsActive(member)) {\n if (nextMember) {\n nextMember.focus();\n break;\n } else {\n this._adapter.focusInput();\n }\n }\n }\n }\n\n private _focusPreviousMember(): void {\n const members = this._adapter.getSlottedMemberElements();\n if (members.length < 1) {\n return;\n }\n\n if (this._adapter.inputHasFocus()) {\n members[members.length - 1].focus();\n return;\n }\n\n for (let i = 0; i < members.length; i++) {\n const previousMember = members.item(i - 1);\n const member = members.item(i);\n\n if (this._memberIsActive(member) && previousMember) {\n previousMember.focus();\n break;\n }\n }\n }\n\n private _memberIsActive(ele: HTMLElement): boolean {\n return getActiveElement(ele.ownerDocument) === ele || ele.hasAttribute('focused');\n }\n\n private _getActiveMember(): HTMLElement | null {\n const members = this._adapter.getSlottedMemberElements();\n\n for (let i = 0; i < members.length; i++) {\n const member = members.item(i);\n if (this._memberIsActive(member)) {\n return member;\n }\n }\n\n return null;\n }\n\n private _addMember(input: HTMLInputElement): void {\n const cleanInputValue = input.value.trim();\n if (cleanInputValue && cleanInputValue.length > 0) {\n this._adapter.emitHostEvent(CHIP_FIELD_CONSTANTS.events.MEMBER_ADDED, cleanInputValue);\n }\n\n input.value = '';\n }\n\n private _removeMember(): void {\n let memberToRemove = this._getActiveMember();\n if (!memberToRemove) {\n const members = this._adapter.getSlottedMemberElements();\n memberToRemove = members.item(members.length - 1);\n }\n\n if (!memberToRemove) {\n return;\n }\n\n this._focusNextMember();\n this._adapter.emitHostEvent(CHIP_FIELD_CONSTANTS.events.MEMBER_REMOVED, memberToRemove);\n }\n\n private _onMemberSlotChanged(): void {\n this.floatLabel(this._adapter.fieldHasValue() || this._adapter.inputHasFocus());\n this._adapter.getSlottedMemberElements().forEach(x => x.tabIndex = -1);\n }\n}\n", "import { CustomElement, attachShadowTemplate } from '@tylertech/forge-core';\nimport { ChipFieldAdapter } from './chip-field-adapter';\nimport { ChipFieldFoundation } from './chip-field-foundation';\nimport { CHIP_FIELD_CONSTANTS } from './chip-field-constants';\nimport { ChipComponent } from '../chips';\nimport { FieldComponent, IFieldComponent } from '../field/field';\n\nconst template = '<template><div class=\\\"forge-chip-field__wrapper\\\" part=\\\"root\\\"><div class=\\\"forge-chip-field forge-field\\\" part=\\\"container\\\"><slot name=\\\"leading\\\"></slot><div class=\\\"forge-field__label-input-container\\\" part=\\\"label-input-container\\\"><slot name=\\\"label\\\"></slot><div class=\\\"forge-field__input-container\\\" part=\\\"input-container\\\"><slot name=\\\"member\\\"></slot><slot></slot></div></div><slot name=\\\"trailing\\\"></slot><div class=\\\"forge-field__addon-end-container\\\" part=\\\"addon-end-container\\\"><slot name=\\\"addon-end\\\"></slot></div></div><slot name=\\\"helper-text\\\"></slot></div></template>';\nconst styles = '.forge-field::before{content:\\\"\\\";display:-webkit-box;display:flex;position:absolute;top:0;right:0;left:0;z-index:-1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;height:100%;pointer-events:none;border-style:solid;border-style:var(--forge-chip-field-border-style,solid);border-width:1px;-webkit-transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);background-color:transparent;background-color:var(--forge-chip-field-theme-background,transparent);text-align:left}.forge-field[dir=rtl]::before,[dir=rtl] .forge-field::before{text-align:right}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused)::before{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused):hover::before{border-color:rgba(0,0,0,.87);border-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled)::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-field--invalid:not(.forge-field--disabled)::before{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.forge-field--invalid:not(.forge-field--disabled):not(.forge-field--focused):hover::before{border-color:#db8a98;border-color:var(--forge-theme-error-hover,#db8a98)}.forge-field--disabled::before{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--shape-rounded){border-radius:4px}.forge-field:not(.forge-field--shape-rounded)::before{border-radius:4px}.forge-field--shape-rounded{border-radius:28px}.forge-field--shape-rounded::before{border-radius:28px}.forge-field--disabled::before{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-field--focused::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);border-width:2px}.forge-field__label-input-container{position:relative;-webkit-box-flex:1;flex:1 1 0.0001px;height:100%;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;min-width:0}.forge-field ::slotted(label){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65));pointer-events:none;right:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);font-size:var(--mdc-typography-subtitle1-font-size, 1rem);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.1rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;-webkit-transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field ::slotted(label[dir=rtl]),[dir=rtl] .forge-field ::slotted(label){right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.forge-field--dense:not(.forge-field--roomy) ::slotted(label){display:none}.forge-field--required ::slotted(label)::after{content:none}.forge-field--required ::slotted(label)::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:\\\"*\\\";margin-right:4px}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){font-size:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){font-size:1rem}.forge-field--disabled ::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){top:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){top:1.285rem}.forge-field:not(.forge-field--shape-rounded):not(.forge-field--leading) ::slotted(label){left:12px!important}.forge-field--shape-rounded:not(.forge-field--leading) ::slotted(label){left:32px!important}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end):not(.forge-field--shape-rounded) ::slotted(label){padding-right:12px}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end).forge-field--shape-rounded ::slotted(label){padding-right:32px}.forge-field ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65))}.forge-field--disabled ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.54rem) scale(.8125);transform:translateY(-.54rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.72rem) scale(.8125);transform:translateY(-.72rem) scale(.8125);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.62rem) scale(1);transform:translateY(-.62rem) scale(1);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.8rem) scale(1);transform:translateY(-.8rem) scale(1);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.62rem) scale(.8125);transform:translateY(-.62rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.8rem) scale(.8125);transform:translateY(-.8rem) scale(.8125);cursor:auto}.forge-field~::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;min-height:1.5rem;line-height:normal;padding-top:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field:not(.forge-field--dense):not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field--roomy:not(.forge-field--dense)~::slotted([slot=helper-text]){font-size:.875rem}.forge-field--dense:not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field~::slotted([slot=helper-text]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled)~::slotted([slot=helper-text]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field:not(.forge-field--shape-rounded)~::slotted([slot=helper-text]){margin-left:12px}.forge-field--shape-rounded~::slotted([slot=helper-text]){margin-left:32px}.forge-field ::slotted([slot=leading]){display:-webkit-box;display:flex;align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=leading]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=leading]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=leading]){margin:0 4px}.forge-field ::slotted([slot=leading]:not(forge-icon-button)){padding:6px}.forge-field ::slotted([slot=trailing]){align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=trailing]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=trailing]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=trailing]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=trailing]){margin:0 4px}.forge-field ::slotted([slot=trailing]:not(forge-icon-button)){padding:6px}.forge-field__addon-end-container{display:none}.forge-field--addon-end .forge-field__addon-end-container{height:100%;width:auto;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;padding:0 4px;border-left-width:1px;border-left-style:solid;-webkit-transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.54);border-left-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container:hover{border-left-color:rgba(0,0,0,.87);border-left-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#3f51b5;border-left-color:var(--mdc-theme-primary,#3f51b5)}.forge-field.forge-field--invalid:not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#b00020;border-left-color:var(--mdc-theme-error,#b00020)}.forge-field.forge-field--invalid:not(.forge-field--focused):not(.forge-field--disabled) .forge-field__addon-end-container:hover{border-left-color:#db8a98;border-left-color:var(--forge-theme-error-hover,#db8a98)}.forge-field.forge-field--disabled .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.12);border-left-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=addon-end]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=addon-end]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=addon-end]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-chip-field{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;z-index:1;z-index:var(--forge-z-index-surface,1);margin-top:0;margin-top:var(--forge-chip-field-margin-top,0);display:grid;grid-template-columns:[leading] -webkit-min-content [input] 1fr [trailing] -webkit-min-content [addon-end] -webkit-min-content [end];grid-template-columns:[leading] min-content [input] 1fr [trailing] min-content [addon-end] min-content [end]}.forge-chip-field.forge-field--disabled{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);cursor:not-allowed}.forge-chip-field:not(.forge-field--dense):not(.forge-field--roomy){height:auto;min-height:46px;min-height:var(--forge-chip-field-height,46px)}.forge-chip-field.forge-field--roomy:not(.forge-field--dense){height:auto;min-height:3.5rem;min-height:var(--forge-chip-field-height,3.5rem)}.forge-chip-field.forge-field--dense:not(.forge-field--roomy){height:auto;min-height:1.5rem;min-height:var(--forge-chip-field-height,1.5rem)}.forge-field__label-input-container{grid-column-start:input;grid-column-end:trailing}.forge-field__input-container{-webkit-box-flex:1;flex:1 1 0.0001px;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:wrap;-webkit-box-align:start;align-items:flex-start;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field__input-container{padding:2px 12px}.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--shape-rounded:not(.forge-field--leading) .forge-field__input-container{padding-left:32px}.forge-field--leading:not(.forge-field--shape-rounded) .forge-field__input-container{padding-left:0}.forge-field--shape-rounded.forge-field--leading .forge-field__input-container{padding-left:0}.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--shape-rounded:not(.forge-field--trailing):not(.forge-field--addon-end) .forge-field__input-container{padding-right:32px}.forge-field--addon-end:not(.forge-field--shape-rounded) .forge-field__input-container,.forge-field--trailing:not(.forge-field--shape-rounded) .forge-field__input-container{padding-right:0}.forge-field--shape-rounded.forge-field--addon-end .forge-field__input-container,.forge-field--shape-rounded.forge-field--trailing .forge-field__input-container{padding-right:0}.forge-field ::slotted([slot=member]){display:block}.forge-field--disabled ::slotted([slot=member]){--mdc-theme-primary:rgba(0, 0, 0, 0.38);--mdc-theme-primary:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38));cursor:not-allowed;pointer-events:none}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 8px 2px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=member]){margin:6px 12px 6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 6px 2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:20px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:16px}.forge-field ::slotted(input){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);border:none;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;line-height:normal;min-width:0}.forge-field ::slotted(input)::-webkit-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-moz-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):invalid{-webkit-box-shadow:none;box-shadow:none}.forge-field ::slotted(input):-webkit-autofill{z-index:auto!important}.forge-field:not(.forge-field--disabled) ::slotted(input){color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--disabled ::slotted(input){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6));cursor:not-allowed}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){font-size:.875rem;font-size:var(--forge-chip-field-font-size, .875rem)}.forge-field ::slotted(input){-webkit-box-flex:1;flex:1 1 0.0001px;min-width:40px;display:block;align-self:flex-start;padding:0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){margin:4px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){margin:6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){margin:2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){height:1.25rem;line-height:1.25rem}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field ::slotted([slot=leading]){grid-column-start:leading;grid-column-end:input;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=leading]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){padding-top:0;padding-bottom:0}.forge-field ::slotted([slot=trailing]){grid-column-start:trailing;grid-column-end:addon-end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=trailing]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){padding-top:0;padding-bottom:0}.forge-field--addon-end .forge-field__addon-end-container{grid-column-start:addon-end;grid-column-end:end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=addon-end]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:0;margin-bottom:0}.forge-field ::slotted(forge-icon-button){display:-webkit-inline-box!important;display:inline-flex!important}:host{display:block;contain:layout}:host([hidden]){display:none}';\n\nexport interface IChipFieldComponent extends IFieldComponent { }\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-chip-field': IChipFieldComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-chip-field-member-added': CustomEvent<string>;\n 'forge-chip-field-member-removed': CustomEvent<HTMLElement>;\n }\n}\n\n/**\n * The web component class behind the `<forge-chip-field>` custom element.\n * \n * @tag forge-chip-field\n */\n@CustomElement({\n name: CHIP_FIELD_CONSTANTS.elementName,\n dependencies: [ChipComponent]\n})\nexport class ChipFieldComponent extends FieldComponent<ChipFieldFoundation> implements IChipFieldComponent {\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new ChipFieldFoundation(new ChipFieldAdapter(this));\n }\n}\n", "import { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core/delegates/form-field-component-delegate';\nimport { IChipFieldComponent } from './chip-field';\nimport { CHIP_FIELD_CONSTANTS } from './chip-field-constants';\n\nexport type ChipFieldComponentDelegateProps = Partial<IChipFieldComponent>;\nexport interface IChipFieldComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n id?: string;\n label?: string;\n type?: string;\n value?: string;\n helperText?: string;\n placeholder?: string;\n leadingElement?: HTMLElement;\n trailingElement?: HTMLElement;\n}\nexport interface IChipFieldComponentDelegateConfig extends IBaseComponentDelegateConfig<IChipFieldComponent, IChipFieldComponentDelegateOptions> {}\n\nexport class ChipFieldComponentDelegate extends FormFieldComponentDelegate<IChipFieldComponent, IChipFieldComponentDelegateOptions> {\n private _inputElement: HTMLInputElement;\n private _labelElement: HTMLLabelElement | undefined;\n private _helperTextElement: HTMLSpanElement | undefined;\n\n constructor(config?: IChipFieldComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IChipFieldComponent {\n const chipField = document.createElement(CHIP_FIELD_CONSTANTS.elementName);\n\n this._inputElement = this._buildInputElement(chipField);\n\n if (this._config.options?.leadingElement) {\n this._config.options.leadingElement.slot = 'leading';\n chipField.appendChild(this._config.options.leadingElement);\n }\n if (this._config.options?.trailingElement) {\n this._config.options.trailingElement.slot = 'trailing';\n chipField.appendChild(this._config.options.trailingElement);\n }\n\n chipField.appendChild(this._inputElement);\n return chipField;\n }\n\n protected override _configure(): void {\n if (this._config.options?.helperText) {\n this.setHelperText(this._config.options.helperText);\n }\n if (typeof this._config.options?.label === 'string') {\n this._createLabel(this._config.options.label);\n }\n }\n\n public get value(): string {\n return this._inputElement.value;\n }\n public set value(value: string) {\n this._inputElement.value = value;\n }\n\n public get disabled(): boolean {\n return this._inputElement.disabled;\n }\n public set disabled(value: boolean) {\n this._inputElement.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._element.invalid || false;\n }\n public set invalid(value: boolean) {\n this._element.invalid = value;\n }\n\n public get inputElement(): HTMLInputElement {\n return this._inputElement;\n }\n\n public get labelElement(): HTMLLabelElement | undefined {\n return this._labelElement;\n }\n\n public onChange(listener: (value: string) => void): void {\n this._inputElement.addEventListener('input', evt => listener((evt.target as HTMLInputElement).value));\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._inputElement.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._inputElement.addEventListener('blur', evt => listener(evt));\n }\n\n public setLabel(text: string | null): void {\n if (text) {\n if (this._labelElement) {\n this._labelElement.textContent = text;\n } else {\n this._createLabel(text);\n }\n } else if (this._labelElement) {\n this._element.removeChild(this._labelElement);\n this._labelElement = undefined;\n }\n }\n\n public setHelperText(text: string | null): void {\n if (text) {\n if (!this._helperTextElement) {\n this._helperTextElement = document.createElement('span');\n this._helperTextElement.slot = 'helper-text';\n this._element.appendChild(this._helperTextElement);\n }\n this._helperTextElement.textContent = text;\n } else if (this._helperTextElement) {\n this._element.removeChild(this._helperTextElement);\n this._helperTextElement = undefined;\n }\n }\n\n public floatLabel(value: boolean): void {\n this._element.floatLabel(value);\n }\n\n private _createLabel(text: string): void {\n this._labelElement = document.createElement('label');\n this._labelElement.textContent = text;\n if (this._config.options?.id) {\n this._labelElement.setAttribute('for', this._config.options.id);\n }\n this._element.appendChild(this._labelElement);\n }\n\n private _buildInputElement(chipField: IChipFieldComponent): HTMLInputElement {\n const inputElement = document.createElement('input');\n inputElement.type = this._config.options?.type || 'text';\n\n if (this._config.options?.value !== undefined) {\n inputElement.value = this._config.options.value;\n }\n if (this._config.options?.id) {\n inputElement.id = this._config.options.id;\n }\n if (typeof this._config.options?.placeholder === 'string') {\n inputElement.placeholder = this._config.options?.placeholder;\n }\n\n chipField.appendChild(inputElement);\n return inputElement;\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { ChipFieldComponent } from './chip-field';\n\nexport * from './chip-field-adapter';\nexport * from './chip-field-component-delegate';\nexport * from './chip-field-constants';\nexport * from './chip-field-foundation';\nexport * from './chip-field';\n\nexport function defineChipFieldComponent(): void {\n defineCustomElement(ChipFieldComponent);\n}\n"],
|
|
5
|
-
"mappings": "2TAEA,IAAMA,EAA2C,GAAGC,cAE9CC,EAAU,CACd,KAAM,kBACR,EAEMC,EAAQ,CACZ,MAAO,QACP,YAAa,cACb,OAAQ,QACV,EAEMC,EAAY,CAChB,KAAM,IAAIF,EAAQ,OAClB,gBAAiB,gCACjB,MAAO,QACP,MAAO,SAASC,EAAM,SACtB,YAAa,SAASA,EAAM,eAC5B,OAAQ,SAASA,EAAM,UACvB,WAAY,aAAaA,EAAM,SAC/B,YAAa,aAAaA,EAAM,SAClC,EAEME,EAAS,CACb,aAAc,GAAGL,iBACjB,eAAgB,GAAGA,kBACrB,EAEaM,EAAuB,CAClC,YAAAN,EACA,QAAAE,EACA,MAAAC,EACA,UAAAC,EACA,OAAAC,CACF,ECXO,IAAME,EAAN,cAA+BC,CAA0C,CAI9E,YAAYC,EAAgC,CAC1C,MAAMA,CAAS,CACjB,CAEO,YAAmB,CACxB,MAAM,WAAWC,EAAqB,UAAU,IAAI,EACpD,KAAK,YAAcC,EAAiB,KAAK,WAAYD,EAAqB,UAAU,WAAW,EAC/F,KAAK,uBAAyBC,EAAiB,KAAK,WAAYD,EAAqB,UAAU,eAAe,CAChH,CAEO,gBAAgBE,EAAcC,EAAwC,CAC3E,KAAK,aAAa,iBAAiBD,EAAMC,CAAQ,CACnD,CAEO,mBAAm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K,QAAQ,QAAQ,EAAE,EAEhE,KAAK,SAAS,YAAY,KAAK,aAAa,CAC9C,CAEQ,mBAAmBE,EAAkD,CAvI/E,IAAAF,EAAAC,EAAAO,EAAAC,EAAAC,EAwII,IAAMC,EAAe,SAAS,cAAc,OAAO,EACnD,OAAAA,EAAa,OAAOX,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,OAAQ,SAE9CC,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,SAAU,SAClCU,EAAa,MAAQ,KAAK,QAAQ,QAAQ,QAExCH,EAAA,KAAK,QAAQ,UAAb,MAAAA,EAAsB,KACxBG,EAAa,GAAK,KAAK,QAAQ,QAAQ,IAErC,QAAOF,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,cAAgB,WAC/CE,EAAa,aAAcD,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,aAGnDR,EAAU,YAAYS,CAAY,EAC3BA,CACT,CACF,EC9IO,SAASC,IAAiC,CAC/CC,EAAoBC,CAAkB,CACxC",
|
|
6
|
-
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "slots", "selectors", "events", "CHIP_FIELD_CONSTANTS", "ChipFieldAdapter", "FieldAdapter", "component", "CHIP_FIELD_CONSTANTS", "getShadowElement", "type", "callback", "listener", "_a", "target", "ChipFieldFoundation", "FieldFoundation", "_adapter", "evt", "event", "input", "members", "i", "member", "nextMember", "previousMember", "ele", "getActiveElement", "cleanInputValue", "CHIP_FIELD_CONSTANTS", "memberToRemove", "x", "template", "styles", "ChipFieldComponent", "FieldComponent", "attachShadowTemplate", "ChipFieldFoundation", "ChipFieldAdapter", "__decorateClass", "CustomElement", "CHIP_FIELD_CONSTANTS", "ChipComponent", "ChipFieldComponentDelegate", "FormFieldComponentDelegate", "config", "_a", "_b", "chipField", "CHIP_FIELD_CONSTANTS", "value", "listener", "evt", "text", "_c", "_d", "_e", "inputElement", "defineChipFieldComponent", "defineCustomElement", "ChipFieldComponent"]
|
|
7
|
-
}
|