@tylertech/forge 2.12.0 → 2.13.0-next.0

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.
Files changed (80) hide show
  1. package/custom-elements.json +91 -25
  2. package/dist/esm/app-bar/help-button/index.js +1 -1
  3. package/dist/esm/app-bar/index.js +1 -1
  4. package/dist/esm/app-bar/profile-button/index.js +1 -1
  5. package/dist/esm/autocomplete/index.js +1 -1
  6. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  7. package/dist/esm/calendar/index.js +1 -1
  8. package/dist/esm/chunks/{chunk.2VFX652S.js → chunk.2ZSAAJDN.js} +2 -2
  9. package/dist/esm/chunks/{chunk.2VFX652S.js.map → chunk.2ZSAAJDN.js.map} +0 -0
  10. package/dist/esm/chunks/{chunk.KKF2ZZMD.js → chunk.32SMESZX.js} +2 -2
  11. package/dist/esm/chunks/{chunk.KKF2ZZMD.js.map → chunk.32SMESZX.js.map} +0 -0
  12. package/dist/esm/chunks/chunk.3UMBCR4P.js +7 -0
  13. package/dist/esm/chunks/chunk.3UMBCR4P.js.map +7 -0
  14. package/dist/esm/chunks/{chunk.OPTMTRWL.js → chunk.4T5TGQFG.js} +2 -2
  15. package/dist/esm/chunks/{chunk.OPTMTRWL.js.map → chunk.4T5TGQFG.js.map} +0 -0
  16. package/dist/esm/chunks/{chunk.77FVTUTL.js → chunk.5D6UB4DL.js} +2 -2
  17. package/dist/esm/chunks/{chunk.77FVTUTL.js.map → chunk.5D6UB4DL.js.map} +0 -0
  18. package/dist/esm/chunks/{chunk.4HI4HGZ6.js → chunk.CYJBOJMX.js} +2 -2
  19. package/dist/esm/chunks/{chunk.4HI4HGZ6.js.map → chunk.CYJBOJMX.js.map} +0 -0
  20. package/dist/esm/chunks/{chunk.CVJTQY2T.js → chunk.E4ZTNVXI.js} +2 -2
  21. package/dist/esm/chunks/{chunk.CVJTQY2T.js.map → chunk.E4ZTNVXI.js.map} +0 -0
  22. package/dist/esm/chunks/{chunk.4WFU5CVF.js → chunk.F3W3XMGT.js} +2 -2
  23. package/dist/esm/chunks/{chunk.4WFU5CVF.js.map → chunk.F3W3XMGT.js.map} +0 -0
  24. package/dist/esm/chunks/{chunk.7TKJAZTM.js → chunk.G5Q2CUUE.js} +2 -2
  25. package/dist/esm/chunks/{chunk.7TKJAZTM.js.map → chunk.G5Q2CUUE.js.map} +0 -0
  26. package/dist/esm/chunks/{chunk.23VA56ZY.js → chunk.J3NHIF6W.js} +2 -2
  27. package/dist/esm/chunks/{chunk.23VA56ZY.js.map → chunk.J3NHIF6W.js.map} +0 -0
  28. package/dist/esm/chunks/{chunk.ZHXPL2MS.js → chunk.JB2N65SR.js} +2 -2
  29. package/dist/esm/chunks/{chunk.ZHXPL2MS.js.map → chunk.JB2N65SR.js.map} +0 -0
  30. package/dist/esm/chunks/{chunk.YX5SWK3O.js → chunk.K32ME33N.js} +2 -2
  31. package/dist/esm/chunks/{chunk.YX5SWK3O.js.map → chunk.K32ME33N.js.map} +0 -0
  32. package/dist/esm/chunks/{chunk.QBDE7M3E.js → chunk.KGW63HJX.js} +2 -2
  33. package/dist/esm/chunks/{chunk.QBDE7M3E.js.map → chunk.KGW63HJX.js.map} +0 -0
  34. package/dist/esm/chunks/{chunk.UHVCXKB4.js → chunk.NTFA7FCB.js} +2 -2
  35. package/dist/esm/chunks/{chunk.UHVCXKB4.js.map → chunk.NTFA7FCB.js.map} +0 -0
  36. package/dist/esm/chunks/{chunk.7PHGAX6P.js → chunk.PFD2SVJ4.js} +2 -2
  37. package/dist/esm/chunks/{chunk.7PHGAX6P.js.map → chunk.PFD2SVJ4.js.map} +0 -0
  38. package/dist/esm/chunks/{chunk.SVHVGMKS.js → chunk.RKKJB3EE.js} +2 -2
  39. package/dist/esm/chunks/{chunk.SVHVGMKS.js.map → chunk.RKKJB3EE.js.map} +0 -0
  40. package/dist/esm/chunks/{chunk.K6LZM6DS.js → chunk.SZL74RTY.js} +2 -2
  41. package/dist/esm/chunks/{chunk.K6LZM6DS.js.map → chunk.SZL74RTY.js.map} +0 -0
  42. package/dist/esm/chunks/{chunk.ZFUVXYDL.js → chunk.TCCPCDJK.js} +2 -2
  43. package/dist/esm/chunks/{chunk.ZFUVXYDL.js.map → chunk.TCCPCDJK.js.map} +0 -0
  44. package/dist/esm/chunks/{chunk.WALEAV54.js → chunk.VH3PVW2V.js} +2 -2
  45. package/dist/esm/chunks/{chunk.WALEAV54.js.map → chunk.VH3PVW2V.js.map} +0 -0
  46. package/dist/esm/chunks/chunk.VQKRN5IQ.js +7 -0
  47. package/dist/esm/chunks/chunk.VQKRN5IQ.js.map +7 -0
  48. package/dist/esm/chunks/{chunk.SLZFPWOH.js → chunk.WUIIZZQD.js} +2 -2
  49. package/dist/esm/chunks/{chunk.SLZFPWOH.js.map → chunk.WUIIZZQD.js.map} +0 -0
  50. package/dist/esm/chunks/{chunk.7GTCDP5H.js → chunk.YK2PXI6D.js} +2 -2
  51. package/dist/esm/chunks/{chunk.7GTCDP5H.js.map → chunk.YK2PXI6D.js.map} +1 -1
  52. package/dist/esm/date-picker/index.js +1 -1
  53. package/dist/esm/date-range-picker/index.js +1 -1
  54. package/dist/esm/dialog/index.js +1 -1
  55. package/dist/esm/index.js +1 -1
  56. package/dist/esm/list-dropdown/index.js +1 -1
  57. package/dist/esm/menu/index.js +1 -1
  58. package/dist/esm/paginator/index.js +1 -1
  59. package/dist/esm/popup/index.js +1 -1
  60. package/dist/esm/select/core/index.js +1 -1
  61. package/dist/esm/select/index.js +1 -1
  62. package/dist/esm/select/select/index.js +1 -1
  63. package/dist/esm/select/select-dropdown/index.js +1 -1
  64. package/dist/esm/split-view/index.js +1 -1
  65. package/dist/esm/split-view/split-view/index.js +1 -1
  66. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  67. package/dist/esm/time-picker/index.js +1 -1
  68. package/esm/dialog/dialog-adapter.d.ts +5 -5
  69. package/esm/dialog/dialog-adapter.js +30 -31
  70. package/esm/dialog/dialog-foundation.d.ts +4 -2
  71. package/esm/dialog/dialog-foundation.js +55 -38
  72. package/esm/dialog/dialog.d.ts +4 -0
  73. package/esm/dialog/dialog.js +7 -1
  74. package/esm/popup/popup-adapter.js +5 -0
  75. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  76. package/package.json +1 -1
  77. package/dist/esm/chunks/chunk.DRFU6POI.js +0 -7
  78. package/dist/esm/chunks/chunk.DRFU6POI.js.map +0 -7
  79. package/dist/esm/chunks/chunk.YSE5EMB3.js +0 -7
  80. package/dist/esm/chunks/chunk.YSE5EMB3.js.map +0 -7
@@ -20,9 +20,6 @@ export class DialogFoundation {
20
20
  this._moveTarget = DIALOG_CONSTANTS.selectors.DFEAULT_MOVE_TARGET;
21
21
  this._isAnimating = false;
22
22
  this._isMoving = false;
23
- // Event handler states
24
- this._attachedDocumentKeydownHandler = false;
25
- this._attachedBackdropClickHandler = false;
26
23
  this._transitionEndHandler = (evt) => this._onTransitionEnd();
27
24
  this._documentKeydownHandler = (evt) => this._onDocumentKeydown(evt);
28
25
  this._backdropClickHandler = (evt) => this._onBackdropClick(evt);
@@ -43,12 +40,8 @@ export class DialogFoundation {
43
40
  if (this._open) {
44
41
  this._removeDragHandlers();
45
42
  this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);
46
- if (this._attachedDocumentKeydownHandler) {
47
- this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);
48
- }
49
- if (this._attachedBackdropClickHandler) {
50
- this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);
51
- }
43
+ this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);
44
+ this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);
52
45
  }
53
46
  }
54
47
  async _applyOpen(value) {
@@ -93,6 +86,26 @@ export class DialogFoundation {
93
86
  resetPosition() {
94
87
  this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);
95
88
  }
89
+ async show(parent) {
90
+ if (this._open) {
91
+ return;
92
+ }
93
+ this._open = true;
94
+ if (!this._adapter.isConnected) {
95
+ this._adapter.attach(parent);
96
+ }
97
+ await this._openDialog();
98
+ }
99
+ async hide(remove) {
100
+ if (!this._open) {
101
+ return;
102
+ }
103
+ this._open = false;
104
+ await this._closeDialog();
105
+ if (remove) {
106
+ this._adapter.detach();
107
+ }
108
+ }
96
109
  _normalizePositionValue(value) {
97
110
  if (isNumber(value)) {
98
111
  return `${value}px`;
@@ -103,25 +116,24 @@ export class DialogFoundation {
103
116
  return null;
104
117
  }
105
118
  _openDialog() {
106
- this._adapter.attach();
107
119
  if (!this._fullscreen) {
108
120
  if (this._moveable) {
109
121
  this._adapter.setMoveable(this._moveable);
110
122
  }
111
- if (this._positionX != null || this._positionY != null) {
123
+ if (this._positionX !== null || this._positionY !== null) {
112
124
  this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);
113
125
  }
114
126
  }
115
127
  this._adapter.setBodyAttribute(DIALOG_CONSTANTS.attributes.OPEN, 'true');
116
128
  this._adapter.registerTransitionEndHandler(this._transitionEndHandler);
117
129
  this._setDocumentKeydownListener(this._escapeClose);
118
- this._setBackdropClickListener(this._backdropClose);
119
130
  this._adapter.setAnimating(true);
120
131
  this._isAnimating = true;
121
132
  // Ensure transitions are triggered properly
122
133
  window.requestAnimationFrame(() => {
123
134
  window.requestAnimationFrame(() => {
124
135
  this._adapter.setVisibility(true);
136
+ this._setBackdropClickListener(this._backdropClose); // Must come after setting visibility because the backdrop may not yet exist
125
137
  this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.OPEN);
126
138
  this._adapter.trySetInitialFocus();
127
139
  if (this._adapter.isScrollable()) {
@@ -129,37 +141,46 @@ export class DialogFoundation {
129
141
  }
130
142
  });
131
143
  });
132
- // Wait for the dialog to finish animating open, then emit the ready event and attach any listeners
133
- setTimeout(() => {
134
- window.requestAnimationFrame(() => {
135
- if (this._open && this._isAnimating) {
136
- this._onTransitionEnd();
137
- }
138
- });
139
- }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);
144
+ return new Promise(resolve => {
145
+ // Wait for the dialog to finish animating open, then emit the ready event and attach any listeners
146
+ window.setTimeout(() => {
147
+ window.requestAnimationFrame(() => {
148
+ if (this._open && this._isAnimating) {
149
+ this._onTransitionEnd();
150
+ resolve();
151
+ }
152
+ });
153
+ }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);
154
+ });
140
155
  }
141
156
  _closeDialog() {
142
157
  if (this._moveTarget) {
143
158
  this._removeDragHandlers();
144
159
  }
145
160
  this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);
146
- if (this._attachedDocumentKeydownHandler) {
161
+ if (this._escapeClose) {
147
162
  this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);
148
163
  }
149
- if (this._attachedBackdropClickHandler) {
164
+ if (this._backdropClose) {
150
165
  this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);
151
166
  }
152
167
  this._isAnimating = false;
168
+ this._moveContext = undefined;
169
+ this._lastPosition = undefined;
153
170
  this._adapter.setAnimating(true);
154
171
  this._adapter.setVisibility(false);
155
- setTimeout(() => {
156
- this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.CLOSE);
157
- this._adapter.detach();
158
- const openDialogs = this._adapter.getOpenDialogs(DIALOG_CONSTANTS.elementName);
159
- if (!openDialogs.length) {
160
- this._adapter.removeBodyAttribute(DIALOG_CONSTANTS.attributes.OPEN);
161
- }
162
- }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);
172
+ this._adapter.setSurfacePosition(null, null, null);
173
+ return new Promise(resolve => {
174
+ setTimeout(() => {
175
+ this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.CLOSE);
176
+ const openDialogs = this._adapter.getOpenDialogs(`${DIALOG_CONSTANTS.elementName}[${DIALOG_CONSTANTS.attributes.OPEN}]`);
177
+ if (!openDialogs.length) {
178
+ this._adapter.removeBodyAttribute(DIALOG_CONSTANTS.attributes.OPEN);
179
+ }
180
+ this._adapter.setAnimating(false);
181
+ resolve();
182
+ }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);
183
+ });
163
184
  }
164
185
  _onTransitionEnd() {
165
186
  if (!this._isAnimating) {
@@ -270,26 +291,22 @@ export class DialogFoundation {
270
291
  if (!this._open) {
271
292
  return;
272
293
  }
273
- if (attach && !this._attachedBackdropClickHandler) {
294
+ if (attach && this._backdropClose) {
274
295
  this._adapter.registerBackdropClickHandler(this._backdropClickHandler);
275
- this._attachedBackdropClickHandler = true;
276
296
  }
277
- else if (!attach && this._attachedBackdropClickHandler) {
297
+ else if (!attach) {
278
298
  this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);
279
- this._attachedBackdropClickHandler = false;
280
299
  }
281
300
  }
282
301
  _setDocumentKeydownListener(attach) {
283
302
  if (!this._open) {
284
303
  return;
285
304
  }
286
- if (attach && !this._attachedDocumentKeydownHandler) {
305
+ if (attach && this._escapeClose) {
287
306
  this._adapter.setDocumentListener('keydown', this._documentKeydownHandler);
288
- this._attachedDocumentKeydownHandler = true;
289
307
  }
290
- else if (!attach && this._attachedDocumentKeydownHandler) {
308
+ else if (!attach) {
291
309
  this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);
292
- this._attachedDocumentKeydownHandler = false;
293
310
  }
294
311
  }
295
312
  _calculateOffsetPosition(pageX, pageY, context) {
@@ -20,6 +20,8 @@ export interface IDialogComponent extends IBaseComponent {
20
20
  moveTarget: string;
21
21
  initializeMoveTarget(): void;
22
22
  resetPosition(): void;
23
+ show(parent?: HTMLElement): Promise<void>;
24
+ hide(remove?: boolean): Promise<void>;
23
25
  }
24
26
  declare global {
25
27
  interface HTMLElementTagNameMap {
@@ -73,4 +75,6 @@ export declare class DialogComponent extends BaseComponent implements IDialogCom
73
75
  moveTarget: string;
74
76
  initializeMoveTarget(): void;
75
77
  resetPosition(): void;
78
+ show(parent?: HTMLElement): Promise<void>;
79
+ hide(remove?: boolean): Promise<void>;
76
80
  }
@@ -10,7 +10,7 @@ import { DialogAdapter } from './dialog-adapter';
10
10
  import { DIALOG_CONSTANTS } from './dialog-constants';
11
11
  import { BackdropComponent } from '../backdrop';
12
12
  import { BaseComponent } from '../core/base/base-component';
13
- const template = '<template><div class=\"forge-dialog\" part=\"root\"><forge-backdrop part=\"scrim\"></forge-backdrop><div class=\"forge-dialog__surface\" part=\"surface\"><slot></slot></div></div></template>';
13
+ const template = '<template><div class=\"forge-dialog\" part=\"root\"><div class=\"forge-dialog__surface\" part=\"surface\"><slot></slot></div></div></template>';
14
14
  const styles = '.forge-dialog{position:fixed;top:0;bottom:0;left:0;right:0;z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-dialog-align-items,center);align-items:var(--forge-dialog-align-items,center);top:0;top:var(--forge-dialog-top,0);padding:24px;padding:var(--forge-dialog-padding,24px);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;visibility:hidden}@media (max-width:599px){.forge-dialog{padding:0}}.forge-dialog--moveable:not(.forge-dialog--fullscreen) ::slotted([forge-dialog-move-target]){cursor:move}.forge-dialog--animating{visibility:visible}.forge-dialog--animating .forge-dialog--open .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--animating .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--scrollable .forge-dialog__footer,.forge-dialog--scrollable .forge-dialog__title{border-color:rgba(0,0,0,.12)}.forge-dialog--open{visibility:visible!important}.forge-dialog--open .forge-dialog__surface{-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-dialog__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);width:auto;width:var(--forge-dialog-width,auto);height:auto;height:var(--forge-dialog-height,auto);min-width:280px;min-width:var(--forge-dialog-min-width,280px);max-width:100%;max-width:var(--forge-dialog-max-width,100%);max-height:100%;max-height:var(--forge-dialog-max-height,100%);border-radius:4px;border-radius:var(--forge-dialog-border-radius,var(--mdc-shape-medium,4px));display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:scale(.8);transform:scale(.8);opacity:0;overflow:hidden;z-index:inherit}.forge-dialog__header{margin:0;padding:0 24px 9px;border-bottom:1px solid transparent}.forge-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.25rem;font-size:var(--forge-typography-title-font-size, 1.25rem);line-height:2rem;line-height:var(--forge-typography-title-line-height, 2rem);font-weight:400;font-weight:var(--forge-typography-title-font-weight,400);letter-spacing:.0125em;letter-spacing:var(--forge-typography-title-letter-spacing, .0125em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-title-text-decoration,inherit);text-decoration:var(--forge-typography-title-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-title-text-transform,inherit);-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.forge-dialog__title::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}.forge-dialog__body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);padding-top:20px;padding:0 24px 24px;overflow:auto}.forge-dialog__body--scrollable{max-height:195px;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);overflow-x:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch}.forge-dialog__footer{display:-webkit-box;display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.forge-dialog--fullscreen{padding:0}.forge-dialog--fullscreen .forge-dialog__surface{height:100%;width:100%;min-width:auto;max-width:100%;border-radius:0}:host{display:block}:host([hidden]){display:none}';
15
15
  /**
16
16
  * The web component class behind the `<forge-dialog>` custom element.
@@ -79,6 +79,12 @@ let DialogComponent = class DialogComponent extends BaseComponent {
79
79
  resetPosition() {
80
80
  this._foundation.resetPosition();
81
81
  }
82
+ show(parent) {
83
+ return this._foundation.show(parent);
84
+ }
85
+ hide(remove) {
86
+ return this._foundation.hide(remove);
87
+ }
82
88
  };
83
89
  __decorate([
84
90
  FoundationProperty()
@@ -43,6 +43,11 @@ export class PopupAdapter extends BaseAdapter {
43
43
  addPopup(targetElement, manageFocus) {
44
44
  this._component.setAttribute('tabindex', '-1');
45
45
  this._component.setAttribute(POPUP_CONSTANTS.attributes.HOST, '');
46
+ // Set initial position to top-left of the host element while we wait for positioning.
47
+ // This ensures that the element is not visible, nor does it affect layouts before it
48
+ // is properly moved into its expected location.
49
+ this._component.style.top = '0';
50
+ this._component.style.left = '0';
46
51
  const hostDocument = targetElement.ownerDocument || document;
47
52
  this._hostElement = closestElement(POPUP_CONSTANTS.selectors.HOST, targetElement) || hostDocument.body;
48
53
  this._hostElement.appendChild(this._component);
@@ -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:uys0ncu;animation-name:uys0ncu;-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 uys0ncu{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uys0ncu{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:uys0ndo;animation-name:uys0ndo;-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 uys0ndo{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uys0ndo{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:uys0nen;animation-name:uys0nen;-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 uys0nen{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uys0nen{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:uys0nf0;animation-name:uys0nf0;-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 uys0nf0{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uys0nf0{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:uys0nfj;animation-name:uys0nfj;-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 uys0nfj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uys0nfj{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:uys0nfq;animation-name:uys0nfq;-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 uys0nfq{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uys0nfq{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:uys0ng5;animation-name:uys0ng5;-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 uys0ng5{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uys0ng5{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:uys0ngq;animation-name:uys0ngq;-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 uys0ngq{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uys0ngq{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:ul3ec85;animation-name:ul3ec85;-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 ul3ec85{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ul3ec85{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:ul3ec8z;animation-name:ul3ec8z;-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 ul3ec8z{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ul3ec8z{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:ul3ec9t;animation-name:ul3ec9t;-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 ul3ec9t{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ul3ec9t{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:ul3eca1;animation-name:ul3eca1;-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 ul3eca1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ul3eca1{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:ul3ecaa;animation-name:ul3ecaa;-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 ul3ecaa{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ul3ecaa{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:ul3ecaz;animation-name:ul3ecaz;-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 ul3ecaz{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ul3ecaz{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:ul3ecbk;animation-name:ul3ecbk;-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 ul3ecbk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ul3ecbk{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:ul3ecch;animation-name:ul3ecch;-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 ul3ecch{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ul3ecch{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
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tylertech/forge",
3
3
  "description": "Forge Web Components library",
4
- "version": "2.12.0",
4
+ "version": "2.13.0-next.0",
5
5
  "author": "Tyler Technologies, Inc.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{a as k}from"./chunk.UUX4QJ4D.js";import{a as L}from"./chunk.A23NSEWA.js";import{a as r}from"./chunk.B3IJU6XJ.js";import{a as I,b as N}from"./chunk.BSZ2LBJX.js";import{a as A}from"./chunk.3E5QKMHL.js";import{a as T,e as x,g as y,i as h,k as w}from"./chunk.HN4PXH3D.js";import{a as u,c as E,f as m,g,i as P,r as C,s as b}from"./chunk.R4NDFXVA.js";import{b as _,k as l}from"./chunk.G76HB2FK.js";import{f as s}from"./chunk.MCIQXNKY.js";var p=`${N}popup`,f={CONTAINER:"forge-popup",OPEN:"open",PLACEMENT:"placement",MANAGE_FOCUS:"manage-focus",ANIMATION_TYPE:"animation-type",STATIC:"static",HIDE_WHEN_CLIPPED:"hide-when-clipped",HOST:"forge-popup-host",INITIAL_FOCUS:"forge-popup-focus"},M={OPEN:"forge-popup--open",OPENING:"forge-popup--opening",CLOSED:"forge-popup--closed",SELECT:"forge-popup--select"},F={HOST:`.forge-popup-host, [${f.HOST}]`,CONTAINER:".forge-popup",INITIAL_FOCUS:`[${f.INITIAL_FOCUS}]`},H={OPEN:`${p}-open`,CLOSE:`${p}-close`,POSITION:`${p}-position`,BLUR:`${p}-blur`},B={ANIMATION_DURATION:120},o={elementName:p,classes:M,selectors:F,attributes:f,events:H,numbers:B},O=(i=>(i.None="none",i.Menu="menu",i.Dropdown="dropdown",i))(O||{});var c=class extends L{constructor(e){super(e);this._rootElement=y(e,o.selectors.CONTAINER)}setAttribute(e,i,a){a?a.setAttribute(e,i):this._component.setAttribute(e,i)}removeAttribute(e,i){i?i.removeAttribute(e):this._component.removeAttribute(e)}async positionPopup(){let e={element:this._component,targetElement:this._component.targetElement,placement:this._component.placement,hide:this._component.hideWhenClipped};this._component.offset&&(e.offset=this._component.offset);let i=await k(e);h(this._component,o.events.POSITION,i)}addPopup(e,i){this._component.setAttribute("tabindex","-1"),this._component.setAttribute(o.attributes.HOST,"");let a=e.ownerDocument||document;this._hostElement=w(o.selectors.HOST,e)||a.body,this._hostElement.appendChild(this._component),this.positionPopup(),i&&(this._previouslyFocusedElement=b(),this._component.focus())}removePopup(e){P(this._component),e&&window.requestAnimationFrame(()=>{if(this._previouslyFocusedElement){let i=b();(!i||i===document.body)&&this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=void 0}}),this._hostElement=void 0}manageWindowEvents(e=!1){e?(this._windowEventCallback=i=>this._windowInteraction(i),window.addEventListener("scroll",this._windowEventCallback,!0),window.addEventListener("resize",this._windowEventCallback,!0)):this._windowEventCallback&&(window.removeEventListener("scroll",this._windowEventCallback,!0),window.removeEventListener("resize",this._windowEventCallback,!0),this._windowEventCallback=void 0)}dispatchEvent(e,i,a,S){return this._component.targetElement?!h(this._component.targetElement,e,i,a,S):!1}addClass(e){m(e,this._rootElement)}removeClass(e){g(e,this._rootElement)}setAnimationEndListener(e,i){window.requestAnimationFrame(()=>{i&&i.length&&m(i,this._rootElement),this._rootElement.addEventListener("transitionend",e)})}removeEventListener(e,i){this._rootElement.removeEventListener(e,i)}setBlurListener(e){return E(this._component,i=>{this._component.contains(i)||e()},!0)}trySetInitialFocus(){window.requestAnimationFrame(()=>{let e=C(this._component,o.selectors.INITIAL_FOCUS);e&&e.length&&e[e.length-1].focus()})}_windowInteraction(e){if(!!this._component.open)switch(e.type){case"scroll":case"resize":this.positionPopup();break;default:break}}};var d=class{constructor(t){this._adapter=t;this._placement="bottom-start";this._open=!1;this._manageFocus=!1;this._animationType="none";this._static=!1;this._hideWhenClipped=!1;this._blurListener=()=>this._onBlur()}disconnect(){this.open&&(this.open=!1)}_openPopup(){this._animationType!=="none"?(this._applyOpenAnimation(),this._animationType==="dropdown"&&this._adapter.addClass(o.classes.SELECT)):this._adapter.addClass(o.classes.OPEN),this._adapter.setAttribute(o.attributes.OPEN,""),this._adapter.addPopup(this.targetElement,this._manageFocus),this._adapter.trySetInitialFocus(),this._destroyBlurListener&&this._destroyBlurListener(),this._static||(this._destroyBlurListener=this._adapter.setBlurListener(this._blurListener)),this._adapter.manageWindowEvents(!0),this._adapter.dispatchEvent(o.events.OPEN)}_closePopup(){this._destroyBlurListener&&(this._destroyBlurListener(),this._destroyBlurListener=void 0),this._animationType!=="none"?this._applyCloseAnimation():this._destroyPopup()}_destroyPopup(){this._adapter.manageWindowEvents(!1),this._adapter.removePopup(this._manageFocus),this._adapter.dispatchEvent(o.events.CLOSE),this._adapter.removeAttribute(o.attributes.OPEN)}_applyOpenAnimation(){switch(this._animationType){case"dropdown":case"menu":this._adapter.addClass(o.classes.OPENING);let t=e=>{e.propertyName==="transform"&&(this._adapter.removeClass(o.classes.OPENING),this._adapter.removeEventListener("transitionend",t))};this._adapter.setAnimationEndListener(t,o.classes.OPEN);break}}_applyCloseAnimation(){switch(this._animationType){case"dropdown":case"menu":this._adapter.removeClass(o.classes.OPEN),this._adapter.addClass(o.classes.CLOSED);let t=i=>{i.propertyName==="opacity"&&(e&&clearTimeout(e),this._destroyPopup())};this._adapter.setAnimationEndListener(t);let e=setTimeout(()=>this._destroyPopup(),o.numbers.ANIMATION_DURATION);break}}_onBlur(){this._adapter.dispatchEvent(o.events.BLUR,void 0,!0,!0)||(this.open=!1)}_applyOpen(){if(this._open){if(!this.targetElement||!u(this.targetElement))throw new Error("targetElement on Popup component must be an HTMLElement");typeof this._openCallback=="function"?this._executeOpenCallback():this._openPopup()}else typeof this._closeCallback=="function"?this._executeCloseCallback():this._closePopup()}async _executeOpenCallback(){try{await Promise.resolve(this._openCallback())!==!1?this._openPopup():this._open=!1}catch(t){this._open=!1}}async _executeCloseCallback(){try{await Promise.resolve(this._closeCallback())!==!1?this._closePopup():this._open=!0}catch(t){this._open=!0}}get targetElement(){return this._targetElement}set targetElement(t){if(!t||!u(t))throw new Error("targetElement on Popup component must be an HTMLElement");this._targetElement=t}get placement(){return this._placement}set placement(t){this._placement!==t&&(this._placement=t||"bottom-start",this._adapter.setAttribute(o.attributes.PLACEMENT,this._placement))}get open(){return this._open}set open(t){t=Boolean(t),this._open!==t&&(this._open=t,this._applyOpen())}get manageFocus(){return this._manageFocus}set manageFocus(t){this._manageFocus!==t&&(this._manageFocus=t)}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t)}get static(){return this._static}set static(t){this._static!==t&&(this._static=t,this._static&&this._destroyBlurListener&&(this._destroyBlurListener(),this._destroyBlurListener=void 0))}get hideWhenClipped(){return this._hideWhenClipped}set hideWhenClipped(t){this._hideWhenClipped!==t&&(this._hideWhenClipped=t)}get offset(){var t;return(t=this._offset)!=null?t:{x:0,y:0}}set offset(t){var e,i;t?this._offset={x:(e=t.x)!=null?e:0,y:(i=t.y)!=null?i:0}:this._offset=void 0,this._open&&this._adapter.positionPopup()}get openCallback(){return this._openCallback}set openCallback(t){this._openCallback=t}get closeCallback(){return this._closeCallback}set closeCallback(t){this._closeCallback=t}position(){this._adapter.positionPopup()}};var D='<template><div class="forge-popup" part="root"><slot></slot></div></template>',W=".forge-popup{min-width:112px;min-width:var(--min-width,112px);background-color:#fff;background-color:var(--forge-theme-elevated-surface,#fff);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-box-shadow:var(--forge-theme-popup-elevation,0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12));box-shadow:var(--forge-theme-popup-elevation,0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12));color:#000;color:var(--mdc-theme-on-surface,#000);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);display:none;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:100%;margin:0;padding:0;-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 24px 0;transform-origin:50% 24px 0;opacity:0;will-change:transform,opacity;-webkit-transition:opacity 120ms linear,-webkit-transform 120ms cubic-bezier(0, 0, .2, 1);transition:opacity 120ms linear,-webkit-transform 120ms cubic-bezier(0, 0, .2, 1);transition:opacity 120ms linear,transform 120ms cubic-bezier(0, 0, .2, 1);transition:opacity 120ms linear,transform 120ms cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms cubic-bezier(0, 0, .2, 1)}.forge-popup::-webkit-scrollbar{width:16px;width:var(--forge-scrollbar-width,16px);height:16px;height:var(--forge-scrollbar-height,16px)}.forge-popup::-webkit-scrollbar-corner{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-popup::-webkit-scrollbar-track{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-popup::-webkit-scrollbar-track:hover{background-color:#ececec;background-color:var(--forge-theme-scrollbar-track-hover,#ececec)}.forge-popup::-webkit-scrollbar-thumb{background-color:#bdbdbd;background-color:var(--forge-theme-scrollbar-thumb,#bdbdbd);height:32px;height:var(--forge-scrollbar-min-height,32px);width:32px;width:var(--forge-scrollbar-min-width,32px);border-radius:10px;border-radius:var(--forge-scrollbar-border-radius,10px);border-width:3px;border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-clip:content-box}.forge-popup::-webkit-scrollbar-thumb:hover{background-color:#9e9e9e;background-color:var(--forge-theme-scrollbar-thumb-hover,#9e9e9e)}.forge-popup--opening{display:block;-webkit-transform:scale(.8);transform:scale(.8);opacity:0}.forge-popup--closed{display:block;opacity:0;-webkit-transition:opacity 120ms linear;transition:opacity 120ms linear}.forge-popup--open{display:block;-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-popup--select{border-top-left-radius:0;border-top-right-radius:0;max-height:256px;overflow-y:auto}:host{z-index:10;z-index:var(--forge-z-index-popup,10);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;position:absolute;overflow:visible}:host([hidden]){display:none}",n=class extends A{constructor(){super();x(this,D,W),this._foundation=new d(new c(this))}static get observedAttributes(){return[o.attributes.OPEN,o.attributes.PLACEMENT,o.attributes.MANAGE_FOCUS,o.attributes.ANIMATION_TYPE,o.attributes.STATIC,o.attributes.HIDE_WHEN_CLIPPED]}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,a){switch(e){case o.attributes.OPEN:this.open=_(a);break;case o.attributes.PLACEMENT:this.placement=a;break;case o.attributes.MANAGE_FOCUS:this.manageFocus=l(a);break;case o.attributes.ANIMATION_TYPE:this.animationType=a;break;case o.attributes.STATIC:this.static=l(a);break;case o.attributes.HIDE_WHEN_CLIPPED:this.hideWhenClipped=l(a);break}}position(){this._foundation.position()}};s([r()],n.prototype,"targetElement",2),s([r()],n.prototype,"placement",2),s([r()],n.prototype,"open",2),s([r()],n.prototype,"manageFocus",2),s([r()],n.prototype,"animationType",2),s([r()],n.prototype,"static",2),s([r()],n.prototype,"hideWhenClipped",2),s([r()],n.prototype,"openCallback",2),s([r()],n.prototype,"closeCallback",2),s([r()],n.prototype,"offset",2),n=s([I({name:o.elementName})],n);function fe(){T(n)}export{o as a,O as b,c,d,n as e,fe as f};
7
- //# sourceMappingURL=chunk.DRFU6POI.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/popup/popup-constants.ts", "../../src/popup/popup-adapter.ts", "../../src/popup/popup-foundation.ts", "../../src/popup/popup.ts", "../../src/popup/index.ts"],
4
- "sourcesContent": ["import { PositionPlacement } from '@tylertech/forge-core';\nimport { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}popup`;\n\nconst attributes = {\n CONTAINER: 'forge-popup',\n OPEN: 'open',\n PLACEMENT: 'placement',\n MANAGE_FOCUS: 'manage-focus',\n ANIMATION_TYPE: 'animation-type',\n STATIC: 'static',\n HIDE_WHEN_CLIPPED: 'hide-when-clipped',\n HOST: 'forge-popup-host',\n INITIAL_FOCUS: 'forge-popup-focus'\n};\n\nconst classes = {\n OPEN: 'forge-popup--open',\n OPENING: 'forge-popup--opening',\n CLOSED: 'forge-popup--closed',\n SELECT: 'forge-popup--select'\n};\n\nconst selectors = {\n HOST: `.forge-popup-host, [${attributes.HOST}]`,\n CONTAINER: '.forge-popup',\n INITIAL_FOCUS: `[${attributes.INITIAL_FOCUS}]`\n};\n\nconst events = {\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n POSITION: `${elementName}-position`,\n BLUR: `${elementName}-blur`\n};\n\nconst numbers = {\n ANIMATION_DURATION: 120\n};\n\nexport const POPUP_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events,\n numbers\n};\n\nexport interface IPopupPosition {\n x: number;\n y: number;\n}\n\nexport type PopupPlacement = PositionPlacement;\n\nexport enum PopupAnimationType {\n None = 'none',\n Menu = 'menu',\n Dropdown = 'dropdown'\n}\n\nexport interface IPopupPositionEventData extends IPopupPosition {\n visibility: 'visible' | 'hidden';\n}\n\nexport type PopupStateCallback = () => boolean | void | Promise<boolean | void>;\n", "import { addClass, closestElement, emitEvent, getShadowElement, IPositionElementConfig, notChildEventListener, positionElementAsync, removeClass, removeElement, deepQuerySelectorAll, getActiveElement } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IPopupComponent } from './popup';\nimport { IPopupPositionEventData, POPUP_CONSTANTS } from './popup-constants';\n\nexport interface IPopupAdapter extends IBaseAdapter {\n setAttribute(attribute: string, value: string, element?: HTMLElement): void;\n removeAttribute(attribute: string, element?: HTMLElement): void;\n positionPopup(): void;\n addPopup(targetElement: HTMLElement, manageFocus: boolean): void;\n removePopup(manageFocus: boolean): void;\n manageWindowEvents(add: boolean): void;\n dispatchEvent(type: string, data?: any, bubbles?: boolean, cancellable?: boolean): boolean;\n addClass(classes: string | string[]): void;\n removeClass(classes: string | string[]): void;\n setAnimationEndListener(listener: (evt: TransitionEvent) => void, classes?: string | string[]): void;\n removeEventListener(type: string, listener: (evt: Event) => void): void;\n setBlurListener(listener: () => void): () => void;\n trySetInitialFocus(): void;\n}\n\nexport class PopupAdapter extends BaseAdapter<IPopupComponent> implements IPopupAdapter {\n private _windowEventCallback?: (evt: Event) => void;\n private _previouslyFocusedElement?: HTMLElement;\n private _hostElement?: HTMLElement;\n private _rootElement: HTMLElement;\n\n constructor(component: IPopupComponent) {\n super(component);\n this._rootElement = getShadowElement(component, POPUP_CONSTANTS.selectors.CONTAINER);\n }\n\n public setAttribute(attribute: string, value: string, element?: HTMLElement): void {\n if (element) {\n element.setAttribute(attribute, value);\n } else {\n this._component.setAttribute(attribute, value);\n }\n }\n\n public removeAttribute(attribute: string, element?: HTMLElement): void {\n if (element) {\n element.removeAttribute(attribute);\n } else {\n this._component.removeAttribute(attribute);\n }\n }\n\n public async positionPopup(): Promise<void> {\n const config: IPositionElementConfig = {\n element: this._component,\n targetElement: this._component.targetElement,\n placement: this._component.placement,\n hide: this._component.hideWhenClipped\n };\n if (this._component.offset) {\n config.offset = this._component.offset;\n }\n const data: IPopupPositionEventData = await positionElementAsync(config);\n emitEvent(this._component, POPUP_CONSTANTS.events.POSITION, data);\n }\n\n public addPopup(targetElement: HTMLElement, manageFocus: boolean): void {\n this._component.setAttribute('tabindex', '-1');\n this._component.setAttribute(POPUP_CONSTANTS.attributes.HOST, '');\n const hostDocument = targetElement.ownerDocument || document;\n this._hostElement = (closestElement(POPUP_CONSTANTS.selectors.HOST, targetElement) as HTMLElement) || hostDocument.body;\n this._hostElement.appendChild(this._component);\n this.positionPopup();\n\n if (manageFocus) {\n this._previouslyFocusedElement = getActiveElement() as HTMLElement;\n this._component.focus();\n }\n }\n\n public removePopup(manageFocus: boolean): void {\n removeElement(this._component);\n\n if (manageFocus) {\n window.requestAnimationFrame(() => {\n if (this._previouslyFocusedElement) {\n const activeElement = getActiveElement();\n if (!activeElement || activeElement === document.body) {\n this._previouslyFocusedElement.focus();\n }\n this._previouslyFocusedElement = undefined;\n }\n });\n }\n\n this._hostElement = undefined;\n }\n\n public manageWindowEvents(add = false): void {\n if (add) {\n this._windowEventCallback = evt => this._windowInteraction(evt);\n window.addEventListener('scroll', this._windowEventCallback, true);\n window.addEventListener('resize', this._windowEventCallback, true);\n } else {\n if (this._windowEventCallback) {\n window.removeEventListener('scroll', this._windowEventCallback, true);\n window.removeEventListener('resize', this._windowEventCallback, true);\n this._windowEventCallback = undefined;\n }\n }\n }\n\n public dispatchEvent(type: string, data?: any, bubbles?: boolean, cancelable?: boolean): boolean {\n if (this._component.targetElement) {\n return !emitEvent(this._component.targetElement, type, data, bubbles, cancelable);\n }\n return false;\n }\n\n public addClass(classes: string | string[]): void {\n addClass(classes, this._rootElement);\n }\n\n public removeClass(classes: string | string[]): void {\n removeClass(classes, this._rootElement);\n }\n\n public setAnimationEndListener(listener: (evt: TransitionEvent) => void, classes?: string | string[]): void {\n window.requestAnimationFrame(() => {\n if (classes && classes.length) {\n addClass(classes, this._rootElement);\n }\n this._rootElement.addEventListener('transitionend', listener);\n });\n }\n\n public removeEventListener(type: string, listener: (evt: Event) => void): void {\n this._rootElement.removeEventListener(type, listener);\n }\n\n public setBlurListener(listener: () => void): () => void {\n return notChildEventListener(this._component, activeElement => {\n if (!this._component.contains(activeElement)) {\n listener();\n }\n }, true );\n }\n\n public trySetInitialFocus(): void {\n window.requestAnimationFrame(() => {\n const elements = deepQuerySelectorAll(this._component, POPUP_CONSTANTS.selectors.INITIAL_FOCUS);\n if (elements && elements.length) {\n const initialElement = elements[elements.length - 1] as HTMLElement;\n initialElement.focus();\n }\n });\n }\n\n private _windowInteraction(evt: Event): void {\n if (!this._component.open) {\n return;\n }\n\n switch (evt.type) {\n case 'scroll':\n case 'resize':\n this.positionPopup();\n break;\n default:\n break;\n }\n }\n}\n", "import { ICustomElementFoundation, isElement } from '@tylertech/forge-core';\nimport { IPopupAdapter } from './popup-adapter';\nimport { IPopupPosition, PopupAnimationType, PopupPlacement, PopupStateCallback, POPUP_CONSTANTS as constants, POPUP_CONSTANTS } from './popup-constants';\n\nexport interface IPopupFoundation extends ICustomElementFoundation {\n targetElement: HTMLElement;\n placement: PopupPlacement;\n open: boolean;\n manageFocus: boolean;\n animationType: PopupAnimationType;\n static: boolean;\n offset: IPopupPosition;\n hideWhenClipped: boolean;\n position(): void;\n openCallback: PopupStateCallback;\n closeCallback: PopupStateCallback;\n}\n\nexport class PopupFoundation implements IPopupFoundation {\n private _targetElement: HTMLElement;\n private _placement: PopupPlacement = 'bottom-start';\n private _open = false;\n private _manageFocus = false;\n private _animationType = PopupAnimationType.None;\n private _static = false;\n private _offset?: IPopupPosition;\n private _hideWhenClipped = false;\n private _destroyBlurListener: (() => void) | undefined;\n private _openCallback: PopupStateCallback;\n private _closeCallback: PopupStateCallback;\n private _blurListener: () => void;\n\n constructor(private _adapter: IPopupAdapter) {\n this._blurListener = () => this._onBlur();\n }\n\n public disconnect(): void {\n if (this.open) {\n this.open = false;\n }\n }\n\n private _openPopup(): void {\n if (this._animationType !== PopupAnimationType.None) {\n this._applyOpenAnimation();\n\n if (this._animationType === PopupAnimationType.Dropdown) {\n this._adapter.addClass(POPUP_CONSTANTS.classes.SELECT);\n }\n } else {\n this._adapter.addClass(POPUP_CONSTANTS.classes.OPEN);\n }\n\n this._adapter.setAttribute(POPUP_CONSTANTS.attributes.OPEN, '');\n this._adapter.addPopup(this.targetElement, this._manageFocus);\n this._adapter.trySetInitialFocus();\n\n if (this._destroyBlurListener) {\n this._destroyBlurListener();\n }\n\n if (!this._static) {\n this._destroyBlurListener = this._adapter.setBlurListener(this._blurListener);\n }\n\n this._adapter.manageWindowEvents(true);\n this._adapter.dispatchEvent(constants.events.OPEN);\n }\n\n private _closePopup(): void {\n if (this._destroyBlurListener) {\n this._destroyBlurListener();\n this._destroyBlurListener = undefined;\n }\n\n if (this._animationType !== PopupAnimationType.None) {\n this._applyCloseAnimation();\n } else {\n this._destroyPopup();\n }\n }\n\n private _destroyPopup(): void {\n this._adapter.manageWindowEvents(false);\n this._adapter.removePopup(this._manageFocus);\n this._adapter.dispatchEvent(constants.events.CLOSE);\n this._adapter.removeAttribute(POPUP_CONSTANTS.attributes.OPEN);\n }\n\n private _applyOpenAnimation(): void {\n switch (this._animationType) {\n case PopupAnimationType.Dropdown:\n case PopupAnimationType.Menu:\n this._adapter.addClass(POPUP_CONSTANTS.classes.OPENING);\n const transitionEndListener = (evt: TransitionEvent): void => {\n if (evt.propertyName === 'transform') {\n this._adapter.removeClass(POPUP_CONSTANTS.classes.OPENING);\n this._adapter.removeEventListener('transitionend', transitionEndListener);\n }\n };\n this._adapter.setAnimationEndListener(transitionEndListener, POPUP_CONSTANTS.classes.OPEN);\n break;\n }\n }\n\n private _applyCloseAnimation(): void {\n switch (this._animationType) {\n case PopupAnimationType.Dropdown:\n case PopupAnimationType.Menu:\n this._adapter.removeClass(POPUP_CONSTANTS.classes.OPEN);\n this._adapter.addClass(POPUP_CONSTANTS.classes.CLOSED);\n const transitionEndListener = (evt: TransitionEvent): void => {\n if (evt.propertyName === 'opacity') {\n if (fallbackTimer) {\n clearTimeout(fallbackTimer);\n }\n this._destroyPopup();\n }\n };\n this._adapter.setAnimationEndListener(transitionEndListener);\n const fallbackTimer = setTimeout(() => this._destroyPopup(), POPUP_CONSTANTS.numbers.ANIMATION_DURATION);\n break;\n }\n }\n\n private _onBlur(): void {\n const cancelled = this._adapter.dispatchEvent(POPUP_CONSTANTS.events.BLUR, undefined, true, true);\n if (!cancelled) {\n this.open = false;\n }\n }\n\n private _applyOpen(): void {\n if (this._open) {\n if (!this.targetElement || !isElement(this.targetElement)) {\n throw new Error('targetElement on Popup component must be an HTMLElement');\n }\n\n if (typeof this._openCallback === 'function') {\n this._executeOpenCallback();\n } else {\n this._openPopup();\n }\n } else {\n if (typeof this._closeCallback === 'function') {\n this._executeCloseCallback();\n } else {\n this._closePopup();\n }\n }\n }\n\n private async _executeOpenCallback(): Promise<void> {\n try {\n if (await Promise.resolve(this._openCallback()) !== false) {\n this._openPopup();\n } else {\n this._open = false;\n }\n } catch (e) {\n this._open = false;\n }\n }\n\n private async _executeCloseCallback(): Promise<void> {\n try {\n if (await Promise.resolve(this._closeCallback()) !== false) {\n this._closePopup();\n } else {\n this._open = true;\n }\n } catch (e) {\n this._open = true;\n }\n }\n\n public get targetElement(): HTMLElement {\n return this._targetElement;\n }\n public set targetElement(element: HTMLElement) {\n if (!element || !isElement(element)) {\n throw new Error('targetElement on Popup component must be an HTMLElement');\n }\n this._targetElement = element;\n }\n\n public get placement(): PopupPlacement {\n return this._placement;\n }\n public set placement(value: PopupPlacement) {\n if (this._placement !== value) {\n this._placement = value || 'bottom-start';\n this._adapter.setAttribute(POPUP_CONSTANTS.attributes.PLACEMENT, this._placement);\n }\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n value = Boolean(value);\n if (this._open !== value) {\n this._open = value;\n this._applyOpen();\n }\n }\n\n public get manageFocus(): boolean {\n return this._manageFocus;\n }\n public set manageFocus(value: boolean) {\n if (this._manageFocus !== value) {\n this._manageFocus = value;\n }\n }\n\n public get animationType(): PopupAnimationType {\n return this._animationType;\n }\n public set animationType(value: PopupAnimationType) {\n if (this._animationType !== value) {\n this._animationType = value;\n }\n }\n\n public get static(): boolean {\n return this._static;\n }\n public set static(value: boolean) {\n if (this._static !== value) {\n this._static = value;\n if (this._static && this._destroyBlurListener) {\n this._destroyBlurListener();\n this._destroyBlurListener = undefined;\n }\n }\n }\n\n public get hideWhenClipped(): boolean {\n return this._hideWhenClipped;\n }\n public set hideWhenClipped(value: boolean) {\n if (this._hideWhenClipped !== value) {\n this._hideWhenClipped = value;\n }\n }\n\n public get offset(): IPopupPosition {\n return this._offset ?? { x: 0, y: 0 };\n }\n public set offset(value: IPopupPosition) {\n if (!value) {\n this._offset = undefined;\n } else {\n this._offset = {\n x: value.x ?? 0,\n y: value.y ?? 0\n };\n }\n if (this._open) {\n this._adapter.positionPopup();\n }\n }\n\n public get openCallback(): PopupStateCallback {\n return this._openCallback;\n }\n public set openCallback(callback: PopupStateCallback) {\n this._openCallback = callback;\n }\n\n public get closeCallback(): PopupStateCallback {\n return this._closeCallback;\n }\n public set closeCallback(callback: PopupStateCallback) {\n this._closeCallback = callback;\n }\n\n public position(): void {\n this._adapter.positionPopup();\n }\n}\n", "import { attachShadowTemplate, coerceBoolean, CustomElement, FoundationProperty, isDefined } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\nimport { PopupAdapter } from './popup-adapter';\nimport { IPopupPosition, IPopupPositionEventData, PopupAnimationType, PopupPlacement, PopupStateCallback, POPUP_CONSTANTS } from './popup-constants';\nimport { PopupFoundation } from './popup-foundation';\n\n\nconst template = '<template><div class=\\\"forge-popup\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = '.forge-popup{min-width:112px;min-width:var(--min-width,112px);background-color:#fff;background-color:var(--forge-theme-elevated-surface,#fff);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-box-shadow:var(--forge-theme-popup-elevation,0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12));box-shadow:var(--forge-theme-popup-elevation,0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12));color:#000;color:var(--mdc-theme-on-surface,#000);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);display:none;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:100%;margin:0;padding:0;-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 24px 0;transform-origin:50% 24px 0;opacity:0;will-change:transform,opacity;-webkit-transition:opacity 120ms linear,-webkit-transform 120ms cubic-bezier(0, 0, .2, 1);transition:opacity 120ms linear,-webkit-transform 120ms cubic-bezier(0, 0, .2, 1);transition:opacity 120ms linear,transform 120ms cubic-bezier(0, 0, .2, 1);transition:opacity 120ms linear,transform 120ms cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms cubic-bezier(0, 0, .2, 1)}.forge-popup::-webkit-scrollbar{width:16px;width:var(--forge-scrollbar-width,16px);height:16px;height:var(--forge-scrollbar-height,16px)}.forge-popup::-webkit-scrollbar-corner{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-popup::-webkit-scrollbar-track{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-popup::-webkit-scrollbar-track:hover{background-color:#ececec;background-color:var(--forge-theme-scrollbar-track-hover,#ececec)}.forge-popup::-webkit-scrollbar-thumb{background-color:#bdbdbd;background-color:var(--forge-theme-scrollbar-thumb,#bdbdbd);height:32px;height:var(--forge-scrollbar-min-height,32px);width:32px;width:var(--forge-scrollbar-min-width,32px);border-radius:10px;border-radius:var(--forge-scrollbar-border-radius,10px);border-width:3px;border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-clip:content-box}.forge-popup::-webkit-scrollbar-thumb:hover{background-color:#9e9e9e;background-color:var(--forge-theme-scrollbar-thumb-hover,#9e9e9e)}.forge-popup--opening{display:block;-webkit-transform:scale(.8);transform:scale(.8);opacity:0}.forge-popup--closed{display:block;opacity:0;-webkit-transition:opacity 120ms linear;transition:opacity 120ms linear}.forge-popup--open{display:block;-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-popup--select{border-top-left-radius:0;border-top-right-radius:0;max-height:256px;overflow-y:auto}:host{z-index:10;z-index:var(--forge-z-index-popup,10);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;position:absolute;overflow:visible}:host([hidden]){display:none}';\n\nexport interface IPopupComponent extends IBaseComponent {\n targetElement: HTMLElement;\n placement: PopupPlacement;\n open: boolean;\n manageFocus: boolean;\n animationType: `${PopupAnimationType}`;\n static: boolean;\n offset: IPopupPosition;\n hideWhenClipped: boolean;\n position(): void;\n openCallback: PopupStateCallback;\n closeCallback: PopupStateCallback;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-popup': IPopupComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-popup-open': CustomEvent<void>;\n 'forge-popup-close': CustomEvent<void>;\n 'forge-popup-position': CustomEvent<IPopupPositionEventData>;\n 'forge-popup-blur': CustomEvent<void>;\n }\n}\n\n/**\n * The web component class behind the `<forge-popup>` custom element.\n * \n * @tag forge-popup\n */\n@CustomElement({\n name: POPUP_CONSTANTS.elementName\n})\nexport class PopupComponent extends BaseComponent implements IPopupComponent {\n private _foundation: PopupFoundation;\n\n public static get observedAttributes(): string[] {\n return [\n POPUP_CONSTANTS.attributes.OPEN,\n POPUP_CONSTANTS.attributes.PLACEMENT,\n POPUP_CONSTANTS.attributes.MANAGE_FOCUS,\n POPUP_CONSTANTS.attributes.ANIMATION_TYPE,\n POPUP_CONSTANTS.attributes.STATIC,\n POPUP_CONSTANTS.attributes.HIDE_WHEN_CLIPPED\n ];\n }\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new PopupFoundation(new PopupAdapter(this));\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 POPUP_CONSTANTS.attributes.OPEN:\n this.open = isDefined(newValue);\n break;\n case POPUP_CONSTANTS.attributes.PLACEMENT:\n this.placement = newValue as PopupPlacement;\n break;\n case POPUP_CONSTANTS.attributes.MANAGE_FOCUS:\n this.manageFocus = coerceBoolean(newValue);\n break;\n case POPUP_CONSTANTS.attributes.ANIMATION_TYPE:\n this.animationType = newValue as PopupAnimationType;\n break;\n case POPUP_CONSTANTS.attributes.STATIC:\n this.static = coerceBoolean(newValue);\n break;\n case POPUP_CONSTANTS.attributes.HIDE_WHEN_CLIPPED:\n this.hideWhenClipped = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public targetElement: HTMLElement;\n\n @FoundationProperty()\n public placement: `${PopupPlacement}`;\n\n @FoundationProperty()\n public open: boolean;\n\n @FoundationProperty()\n public manageFocus: boolean;\n\n @FoundationProperty()\n public animationType: `${PopupAnimationType}`;\n\n @FoundationProperty()\n public static: boolean;\n\n @FoundationProperty()\n public hideWhenClipped: boolean;\n\n @FoundationProperty()\n public openCallback: PopupStateCallback;\n\n @FoundationProperty()\n public closeCallback: PopupStateCallback;\n\n @FoundationProperty()\n public offset: IPopupPosition;\n\n public position(): void {\n this._foundation.position();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { PopupComponent } from './popup';\n\nexport * from './popup-adapter';\nexport * from './popup-constants';\nexport * from './popup-foundation';\nexport * from './popup';\n\nexport function definePopupComponent(): void {\n defineCustomElement(PopupComponent);\n}\n"],
5
- "mappings": "ubAGA,GAAM,GAA2C,GAAG,SAE9C,EAAa,CACjB,UAAW,cACX,KAAM,OACN,UAAW,YACX,aAAc,eACd,eAAgB,iBAChB,OAAQ,SACR,kBAAmB,oBACnB,KAAM,mBACN,cAAe,mBACjB,EAEM,EAAU,CACd,KAAM,oBACN,QAAS,uBACT,OAAQ,sBACR,OAAQ,qBACV,EAEM,EAAY,CAChB,KAAM,uBAAuB,EAAW,QACxC,UAAW,eACX,cAAe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W,KAC9B,KAAK,KAAO,EAAU,CAAQ,EAC9B,UACG,GAAgB,WAAW,UAC9B,KAAK,UAAY,EACjB,UACG,GAAgB,WAAW,aAC9B,KAAK,YAAc,EAAc,CAAQ,EACzC,UACG,GAAgB,WAAW,eAC9B,KAAK,cAAgB,EACrB,UACG,GAAgB,WAAW,OAC9B,KAAK,OAAS,EAAc,CAAQ,EACpC,UACG,GAAgB,WAAW,kBAC9B,KAAK,gBAAkB,EAAc,CAAQ,EAC7C,MAEN,CAgCA,AAAO,UAAiB,CACtB,KAAK,YAAY,SAAS,CAC5B,CACF,EAhCS,GADP,AAAC,EAAmB,GACb,AAhDI,EAgDJ,6BAGA,GADP,AAAC,EAAmB,GACb,AAnDI,EAmDJ,yBAGA,GADP,AAAC,EAAmB,GACb,AAtDI,EAsDJ,oBAGA,GADP,AAAC,EAAmB,GACb,AAzDI,EAyDJ,2BAGA,GADP,AAAC,EAAmB,GACb,AA5DI,EA4DJ,6BAGA,GADP,AAAC,EAAmB,GACb,AA/DI,EA+DJ,sBAGA,GADP,AAAC,EAAmB,GACb,AAlEI,EAkEJ,+BAGA,GADP,AAAC,EAAmB,GACb,AArEI,EAqEJ,4BAGA,GADP,AAAC,EAAmB,GACb,AAxEI,EAwEJ,6BAGA,GADP,AAAC,EAAmB,GACb,AA3EI,EA2EJ,sBA3EI,EAAN,GAHP,AAAC,EAAc,CACb,KAAM,EAAgB,WACxB,CAAC,GACY,GCpCN,aAAsC,CAC3C,EAAoB,CAAc,CACpC",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{a as I}from"./chunk.DGOV5RDW.js";import{a as P}from"./chunk.NGIBMR3Q.js";import{c as H}from"./chunk.7NXPOEXV.js";import{a as p,d as w}from"./chunk.QJPH24V4.js";import{a as L}from"./chunk.BOENNFXE.js";import{a as O}from"./chunk.A23NSEWA.js";import{a as n}from"./chunk.B3IJU6XJ.js";import{a as M,b as S}from"./chunk.BSZ2LBJX.js";import{a as A}from"./chunk.3E5QKMHL.js";import{a as D,e as x,g as m}from"./chunk.HN4PXH3D.js";import{i as C,r as T,s as y,t as k}from"./chunk.R4NDFXVA.js";import{b,c as f,d as E,k as c}from"./chunk.G76HB2FK.js";import{a as _,f as s}from"./chunk.MCIQXNKY.js";var l=`${S}dialog`,B={ANIMATING:"forge-dialog--animating",OPEN:"forge-dialog--open",ACTION_BUTTON:"forge-dialog__action__button",BUTTON_TEXT:"forge-button__text",SCROLLABLE:"forge-dialog--scrollable",FULLSCREEN:"forge-dialog--fullscreen",MOVEABLE:"forge-dialog--moveable"},v={BACKDROP_CLOSE:"backdrop-close",ESCAPE_CLOSE:"escape-close",FULLSCREEN:"fullscreen",POSITION_TYPE:"position-type",POSITION_X:"position-x",POSITION_Y:"position-y",MOVEABLE:"moveable",MOVE_TARGET:"move-target",OPEN:"forge-dialog-open",INITIAL_FOCUS:"forge-dialog-focus",DFEAULT_MOVE_TARGET:"forge-dialog-move-target"},R={CONTAINER:".forge-dialog",SURFACE:".forge-dialog__surface",BACKDROP:p.elementName,INITIAL_FOCUS:`[${v.INITIAL_FOCUS}]`,DFEAULT_MOVE_TARGET:`[${v.DFEAULT_MOVE_TARGET}]`,CONTENT:".forge-dialog__body"},z={BEFORE_CLOSE:`${l}-before-close`,OPEN:`${l}-open`,CLOSE:`${l}-close`,READY:`${l}-ready`,MOVE_START:`${l}-move-start`,MOVED:`${l}-move`,MOVE_END:`${l}-move-end`},K={ANIMATION_DURATION:150,BACKDROP_MAX_OPACITY:.3},i={elementName:l,classes:B,selectors:R,attributes:v,events:z,numbers:K};var g=class{constructor(e){this._adapter=e;this._open=!1;this._backdropClose=!0;this._escapeClose=!0;this._fullscreen=!1;this._positionType="absolute";this._positionX=null;this._positionY=null;this._moveable=!1;this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET;this._isAnimating=!1;this._isMoving=!1;this._attachedDocumentKeydownHandler=!1;this._attachedBackdropClickHandler=!1;this._transitionEndHandler=t=>this._onTransitionEnd(),this._documentKeydownHandler=t=>this._onDocumentKeydown(t),this._backdropClickHandler=t=>this._onBackdropClick(t),this._moveTargetMouseDownHandler=t=>this._onMoveTargetMouseDown(t),this._moveTargetMouseMoveHandler=t=>this._onMoveTargetMouseMove(t),this._moveTargetMouseUpHandler=t=>this._onMoveTargetMouseUp(t)}initialize(){this._adapter.initializeAccessibility(),this._open&&this._moveable&&(this._adapter.setMoveable(this._moveable),this._initMoveTarget())}destroy(){this._open&&(this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._attachedDocumentKeydownHandler&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedBackdropClickHandler&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}async _applyOpen(e){if(e){if(typeof this._openCallback=="function"&&!await this._executeOpenCallback())return;this._open=e,this._openDialog()}else{if(typeof this._closeCallback=="function"&&!await this._executeCloseCallback())return;this._open=e,this._closeDialog()}this._adapter.toggleHostAttribute(i.attributes.OPEN,this._open)}async _executeOpenCallback(){try{return await Promise.resolve(this._openCallback())!==!1}catch(e){return!1}}async _executeCloseCallback(){try{return await Promise.resolve(this._closeCallback())!==!1}catch(e){return!1}}initializeMoveTarget(){this._moveTarget||(this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET),this._initMoveTarget()}resetPosition(){this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)}_normalizePositionValue(e){return E(e)?`${e}px`:f(e)?e:null}_openDialog(){this._adapter.attach(),this._fullscreen||(this._moveable&&this._adapter.setMoveable(this._moveable),(this._positionX!=null||this._positionY!=null)&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)),this._adapter.setBodyAttribute(i.attributes.OPEN,"true"),this._adapter.registerTransitionEndHandler(this._transitionEndHandler),this._setDocumentKeydownListener(this._escapeClose),this._setBackdropClickListener(this._backdropClose),this._adapter.setAnimating(!0),this._isAnimating=!0,window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.setVisibility(!0),this._adapter.emitHostEvent(i.events.OPEN),this._adapter.trySetInitialFocus(),this._adapter.isScrollable()&&this._adapter.addRootClass(i.classes.SCROLLABLE)})}),setTimeout(()=>{window.requestAnimationFrame(()=>{this._open&&this._isAnimating&&this._onTransitionEnd()})},i.numbers.ANIMATION_DURATION)}_closeDialog(){this._moveTarget&&this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._attachedDocumentKeydownHandler&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedBackdropClickHandler&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._isAnimating=!1,this._adapter.setAnimating(!0),this._adapter.setVisibility(!1),setTimeout(()=>{this._adapter.emitHostEvent(i.events.CLOSE),this._adapter.detach(),this._adapter.getOpenDialogs(i.elementName).length||this._adapter.removeBodyAttribute(i.attributes.OPEN)},i.numbers.ANIMATION_DURATION)}_onTransitionEnd(){!this._isAnimating||(this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._adapter.setAnimating(!1),this._adapter.emitHostEvent(i.events.READY),this._adapter.tryLayoutChildren(),this._moveable&&this._initMoveTarget(),this._isAnimating=!1)}_initMoveTarget(){!this._fullscreen&&this._moveable&&this._moveTarget&&this._adapter.setMoveTarget(this._moveTarget)&&this._adapter.setMoveTargetHandler("mousedown",this._moveTargetMouseDownHandler)}_removeDragHandlers(){this._adapter.removeDragTargetHandler("mousedown",this._moveTargetMouseDownHandler),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseDown(e){e.preventDefault(),this._adapter.captureActiveElement();let t=this._adapter.getSurfaceBounds();this._moveContext={top:e.clientY-t.top,left:e.clientX-t.left,height:t.height,width:t.width},this._adapter.setDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.setDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseMove(e){e.preventDefault();let t=this._calculateOffsetPosition(e.pageX,e.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,!this._adapter.emitHostEvent(i.events.MOVE_START,t,!0,!0)))return;let o=this._clampPosition(t,this._moveContext);if((!this._lastPosition||o.x!==this._lastPosition.x||o.y!==this._lastPosition.y)&&this._adapter.emitHostEvent(i.events.MOVED,o,!0,!0)){this._lastPosition=_({},o);let d=this._normalizePositionValue(o.x),N=this._normalizePositionValue(o.y);this._adapter.setSurfacePosition(d,N,"absolute")}}_onMoveTargetMouseUp(e){this._isMoving&&this._adapter.emitHostEvent(i.events.MOVE_END),this._moveComplete()}_moveComplete(){this._adapter.tryRestoreActiveElement(),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler),this._lastPosition=void 0,this._moveContext=void 0,this._isMoving=!1}_onDocumentKeydown(e){e.stopPropagation(),e.key&&(e.key==="Escape"||e.key==="Esc")&&this._tryClose()}_onBackdropClick(e){e.stopPropagation(),this._tryClose()}async _tryClose(){if(!!this._adapter.emitHostEvent(i.events.BEFORE_CLOSE,void 0,void 0,!0)){if(!this._beforeCloseCallback){this.open=!1;return}try{if(await Promise.resolve(this._beforeCloseCallback())!==!1){this.open=!1;return}}catch(t){return}}}_setBackdropClickListener(e){!this._open||(e&&!this._attachedBackdropClickHandler?(this._adapter.registerBackdropClickHandler(this._backdropClickHandler),this._attachedBackdropClickHandler=!0):!e&&this._attachedBackdropClickHandler&&(this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._attachedBackdropClickHandler=!1))}_setDocumentKeydownListener(e){!this._open||(e&&!this._attachedDocumentKeydownHandler?(this._adapter.setDocumentListener("keydown",this._documentKeydownHandler),this._attachedDocumentKeydownHandler=!0):!e&&this._attachedDocumentKeydownHandler&&(this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedDocumentKeydownHandler=!1))}_calculateOffsetPosition(e,t,o){return{x:e-((o==null?void 0:o.left)||0),y:t-((o==null?void 0:o.top)||0)}}_clampPosition({x:e,y:t},o){let a=0,d=0;return o&&(a=o.width,d=o.height),e<=0?e=0:e+a>=window.innerWidth&&(e=window.innerWidth-a),t<=0?t=0:t+d>=window.innerHeight&&(t=window.innerHeight-d),{x:e,y:t}}set backdropClose(e){e=Boolean(e),this._backdropClose!==e&&(this._backdropClose=e,this._setBackdropClickListener(this._backdropClose),b(this._backdropClose)?this._adapter.setHostAttribute(i.attributes.BACKDROP_CLOSE,this._backdropClose.toString()):this._adapter.removeHostAttribute(i.attributes.BACKDROP_CLOSE))}get backdropClose(){return this._backdropClose}set escapeClose(e){e=Boolean(e),this._escapeClose!==e&&(this._escapeClose=e,this._setDocumentKeydownListener(this._escapeClose),b(this._escapeClose)?this._adapter.setHostAttribute(i.attributes.ESCAPE_CLOSE,this._escapeClose.toString()):this._adapter.removeHostAttribute(i.attributes.ESCAPE_CLOSE))}get escapeClose(){return this._escapeClose}get open(){return this._open}set open(e){this._open!==e&&(e=Boolean(e),e!==this._open&&this._applyOpen(e))}get fullscreen(){return this._fullscreen}set fullscreen(e){this._fullscreen!==e&&(this._fullscreen=e,this._adapter.setFullscreen(this._fullscreen))}get openCallback(){return this._openCallback}set openCallback(e){this._openCallback=e}get closeCallback(){return this._closeCallback}set closeCallback(e){this._closeCallback=e}get beforeCloseCallback(){return this._beforeCloseCallback}set beforeCloseCallback(e){this._beforeCloseCallback=e}get positionType(){return this._positionType}set positionType(e){this._positionType!==e&&(this._positionType=e,this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionX(){return this._positionX}set positionX(e){this._positionX!==e&&(this._positionX=this._normalizePositionValue(e),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionY(){return this._positionY}set positionY(e){this._positionY!==e&&(this._positionY=this._normalizePositionValue(e),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get moveable(){return this._moveable}set moveable(e){this._moveable!==e&&(this._moveable=e,this._open&&(this._adapter.setMoveable(this._moveable),this._moveable?this._initMoveTarget():(this._removeDragHandlers(),this._isMoving=!1)))}get moveTarget(){return this._moveTarget}set moveTarget(e){this._moveTarget=e}};var u=class extends O{constructor(t){super(t);this._backdropElement=m(t,i.selectors.BACKDROP),this._containerElement=m(t,i.selectors.CONTAINER),this._surfaceElement=m(t,i.selectors.SURFACE)}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","dialog"),this._component.setAttribute("aria-modal","true")}setAnimating(t){t?this._containerElement.classList.add(i.classes.ANIMATING):this._containerElement.classList.remove(i.classes.ANIMATING)}setVisibility(t){t?this._containerElement.classList.add(i.classes.OPEN):this._containerElement.classList.remove(i.classes.OPEN)}attach(){document.body.appendChild(this._component)}detach(){this._activeElement&&(this._activeElement=void 0),C(this._component)}registerTransitionEndHandler(t){this._surfaceElement.addEventListener("transitionend",t)}deregisterTransitionEndHandler(t){this._surfaceElement.removeEventListener("transitionend",t)}setDocumentListener(t,o){document.addEventListener(t,o)}removeDocumentListener(t,o){document.removeEventListener(t,o)}registerBackdropClickHandler(t){this._backdropElement.addEventListener(p.events.BACKDROP_CLICK,t)}deregisterBackdropClickHandler(t){this._backdropElement.removeEventListener(p.events.BACKDROP_CLICK,t)}getOpenDialogs(t){return document.querySelectorAll(t)}setBodyAttribute(t,o){document.body.setAttribute(t,o)}removeBodyAttribute(t){document.body.removeAttribute(t)}trySetInitialFocus(){let t=T(this._component,i.selectors.INITIAL_FOCUS);t&&t.length&&t[t.length-1].focus()}isScrollable(){let t=this._component.querySelector(i.selectors.CONTENT);return t?t.scrollHeight>t.offsetHeight:!1}addRootClass(t){this._component.classList.add(t)}setFullscreen(t){t?this._containerElement.classList.add(i.classes.FULLSCREEN):this._containerElement.classList.remove(i.classes.FULLSCREEN)}setMoveable(t){k(this._containerElement,t,i.classes.MOVEABLE)}tryLayoutChildren(){let t=[L.elementName,I.elementName,H.elementName,P.elementName];Array.from(this._component.querySelectorAll(t.join(","))).filter(a=>typeof a.layout=="function").forEach(a=>a.layout())}setMoveTarget(t){return t?(this._moveTargetElement=this._component.querySelector(t),!!this._moveTargetElement):!1}setMoveTargetHandler(t,o){this._moveTargetElement&&this._moveTargetElement.addEventListener(t,o)}removeDragTargetHandler(t,o){this._moveTargetElement&&this._moveTargetElement.removeEventListener(t,o)}getSurfaceBounds(){return this._surfaceElement.getBoundingClientRect()}setSurfacePosition(t,o,a){this._surfaceElement.style.position=a==="absolute"?a:"relative",o!=null?this._surfaceElement.style.top=o:this._surfaceElement.style.removeProperty("top"),t!=null?this._surfaceElement.style.left=t:this._surfaceElement.style.removeProperty("left")}captureActiveElement(){this._activeElement=y(),this._activeElement&&this._activeElement.blur()}tryRestoreActiveElement(){this._activeElement&&(this._activeElement.isConnected&&this._activeElement.focus(),this._activeElement=void 0)}};var F='<template><div class="forge-dialog" part="root"><forge-backdrop part="scrim"></forge-backdrop><div class="forge-dialog__surface" part="surface"><slot></slot></div></div></template>',U='.forge-dialog{position:fixed;top:0;bottom:0;left:0;right:0;z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-dialog-align-items,center);align-items:var(--forge-dialog-align-items,center);top:0;top:var(--forge-dialog-top,0);padding:24px;padding:var(--forge-dialog-padding,24px);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;visibility:hidden}@media (max-width:599px){.forge-dialog{padding:0}}.forge-dialog--moveable:not(.forge-dialog--fullscreen) ::slotted([forge-dialog-move-target]){cursor:move}.forge-dialog--animating{visibility:visible}.forge-dialog--animating .forge-dialog--open .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--animating .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--scrollable .forge-dialog__footer,.forge-dialog--scrollable .forge-dialog__title{border-color:rgba(0,0,0,.12)}.forge-dialog--open{visibility:visible!important}.forge-dialog--open .forge-dialog__surface{-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-dialog__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);width:auto;width:var(--forge-dialog-width,auto);height:auto;height:var(--forge-dialog-height,auto);min-width:280px;min-width:var(--forge-dialog-min-width,280px);max-width:100%;max-width:var(--forge-dialog-max-width,100%);max-height:100%;max-height:var(--forge-dialog-max-height,100%);border-radius:4px;border-radius:var(--forge-dialog-border-radius,var(--mdc-shape-medium,4px));display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:scale(.8);transform:scale(.8);opacity:0;overflow:hidden;z-index:inherit}.forge-dialog__header{margin:0;padding:0 24px 9px;border-bottom:1px solid transparent}.forge-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.25rem;font-size:var(--forge-typography-title-font-size, 1.25rem);line-height:2rem;line-height:var(--forge-typography-title-line-height, 2rem);font-weight:400;font-weight:var(--forge-typography-title-font-weight,400);letter-spacing:.0125em;letter-spacing:var(--forge-typography-title-letter-spacing, .0125em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-title-text-decoration,inherit);text-decoration:var(--forge-typography-title-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-title-text-transform,inherit);-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.forge-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.forge-dialog__body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);padding-top:20px;padding:0 24px 24px;overflow:auto}.forge-dialog__body--scrollable{max-height:195px;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);overflow-x:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch}.forge-dialog__footer{display:-webkit-box;display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.forge-dialog--fullscreen{padding:0}.forge-dialog--fullscreen .forge-dialog__surface{height:100%;width:100%;min-width:auto;max-width:100%;border-radius:0}:host{display:block}:host([hidden]){display:none}',r=class extends A{constructor(){super();x(this,F,U),this._foundation=new g(new u(this))}static get observedAttributes(){return[i.attributes.BACKDROP_CLOSE,i.attributes.ESCAPE_CLOSE,i.attributes.OPEN,i.attributes.FULLSCREEN,i.attributes.POSITION_TYPE,i.attributes.POSITION_X,i.attributes.POSITION_Y,i.attributes.MOVEABLE,i.attributes.MOVE_TARGET]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(t,o,a){switch(t){case i.attributes.BACKDROP_CLOSE:this.backdropClose=a==="true";break;case i.attributes.ESCAPE_CLOSE:this.escapeClose=a==="true";break;case i.attributes.OPEN:this.open=c(a);break;case i.attributes.FULLSCREEN:this.fullscreen=c(a);break;case i.attributes.POSITION_TYPE:this.positionType=a;break;case i.attributes.POSITION_X:this.positionX=a;break;case i.attributes.POSITION_Y:this.positionY=a;break;case i.attributes.MOVEABLE:this.moveable=c(a);break;case i.attributes.MOVE_TARGET:this.moveTarget=a;break}}initializeMoveTarget(){this._foundation.initializeMoveTarget()}resetPosition(){this._foundation.resetPosition()}};s([n()],r.prototype,"backdropClose",2),s([n()],r.prototype,"escapeClose",2),s([n()],r.prototype,"open",2),s([n()],r.prototype,"fullscreen",2),s([n()],r.prototype,"openCallback",2),s([n()],r.prototype,"closeCallback",2),s([n()],r.prototype,"beforeCloseCallback",2),s([n()],r.prototype,"positionType",2),s([n()],r.prototype,"positionX",2),s([n()],r.prototype,"positionY",2),s([n()],r.prototype,"moveable",2),s([n()],r.prototype,"moveTarget",2),r=s([M({name:i.elementName,dependencies:[w]})],r);function xe(){D(r)}export{i as a,g as b,u as c,r as d,xe as e};
7
- //# sourceMappingURL=chunk.YSE5EMB3.js.map