@tylertech/forge 2.12.1 → 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.
@@ -3,5 +3,5 @@
3
3
  * Copyright 2022 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as b,b as c,c as d,d as e}from"../../chunks/chunk.MUY647D6.js";import{u as a}from"../../chunks/chunk.SALQP6J3.js";import"../../chunks/chunk.E37HEAJ5.js";import"../../chunks/chunk.QXLPBYMX.js";import"../../chunks/chunk.PYG4YVBA.js";import"../../chunks/chunk.QZHEP4X2.js";import"../../chunks/chunk.LZMYHIO2.js";import"../../chunks/chunk.YAJT3P6V.js";import"../../chunks/chunk.6KTLOA7V.js";import"../../chunks/chunk.SKLCDWYQ.js";import"../../chunks/chunk.24D46RLZ.js";import"../../chunks/chunk.7ZS4N2FT.js";import"../../chunks/chunk.U6FJJGO3.js";import"../../chunks/chunk.KYCC3C3M.js";import"../../chunks/chunk.GVQVA7P3.js";import"../../chunks/chunk.MIYZJUXH.js";import"../../chunks/chunk.A23NSEWA.js";import"../../chunks/chunk.B3IJU6XJ.js";import"../../chunks/chunk.BSZ2LBJX.js";import"../../chunks/chunk.3E5QKMHL.js";import"../../chunks/chunk.HN4PXH3D.js";import"../../chunks/chunk.R4NDFXVA.js";import"../../chunks/chunk.G76HB2FK.js";import"../../chunks/chunk.MCIQXNKY.js";export{a as SPLIT_VIEW_CONSTANTS,b as SplitViewAdapter,d as SplitViewComponent,c as SplitViewFoundation,e as defineSplitViewComponent};
6
+ import{a as b,b as c,c as d,d as e}from"../../chunks/chunk.E4ZTNVXI.js";import{u as a}from"../../chunks/chunk.YK2PXI6D.js";import"../../chunks/chunk.E37HEAJ5.js";import"../../chunks/chunk.QXLPBYMX.js";import"../../chunks/chunk.PYG4YVBA.js";import"../../chunks/chunk.QZHEP4X2.js";import"../../chunks/chunk.LZMYHIO2.js";import"../../chunks/chunk.YAJT3P6V.js";import"../../chunks/chunk.6KTLOA7V.js";import"../../chunks/chunk.SKLCDWYQ.js";import"../../chunks/chunk.24D46RLZ.js";import"../../chunks/chunk.7ZS4N2FT.js";import"../../chunks/chunk.U6FJJGO3.js";import"../../chunks/chunk.KYCC3C3M.js";import"../../chunks/chunk.GVQVA7P3.js";import"../../chunks/chunk.MIYZJUXH.js";import"../../chunks/chunk.A23NSEWA.js";import"../../chunks/chunk.B3IJU6XJ.js";import"../../chunks/chunk.BSZ2LBJX.js";import"../../chunks/chunk.3E5QKMHL.js";import"../../chunks/chunk.HN4PXH3D.js";import"../../chunks/chunk.R4NDFXVA.js";import"../../chunks/chunk.G76HB2FK.js";import"../../chunks/chunk.MCIQXNKY.js";export{a as SPLIT_VIEW_CONSTANTS,b as SplitViewAdapter,d as SplitViewComponent,c as SplitViewFoundation,e as defineSplitViewComponent};
7
7
  //# sourceMappingURL=index.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2022 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,v as u,w as v,x as w}from"../../chunks/chunk.SALQP6J3.js";import"../../chunks/chunk.E37HEAJ5.js";import"../../chunks/chunk.QXLPBYMX.js";import"../../chunks/chunk.PYG4YVBA.js";import"../../chunks/chunk.QZHEP4X2.js";import"../../chunks/chunk.LZMYHIO2.js";import"../../chunks/chunk.YAJT3P6V.js";import"../../chunks/chunk.6KTLOA7V.js";import"../../chunks/chunk.SKLCDWYQ.js";import"../../chunks/chunk.24D46RLZ.js";import"../../chunks/chunk.7ZS4N2FT.js";import"../../chunks/chunk.U6FJJGO3.js";import"../../chunks/chunk.KYCC3C3M.js";import"../../chunks/chunk.GVQVA7P3.js";import"../../chunks/chunk.MIYZJUXH.js";import"../../chunks/chunk.A23NSEWA.js";import"../../chunks/chunk.B3IJU6XJ.js";import"../../chunks/chunk.BSZ2LBJX.js";import"../../chunks/chunk.3E5QKMHL.js";import"../../chunks/chunk.HN4PXH3D.js";import"../../chunks/chunk.R4NDFXVA.js";import"../../chunks/chunk.G76HB2FK.js";import"../../chunks/chunk.MCIQXNKY.js";export{a as SPLIT_VIEW_PANEL_CONSTANTS,b as SplitViewAnimatingLayer,u as SplitViewPanelAdapter,v as SplitViewPanelComponent,t as SplitViewPanelFoundation,k as clampSize,e as clearState,w as defineSplitViewPanelComponent,o as getCursor,p as getHandleIcon,s as getPixelDimension,q as getSplitViewPanelSibling,n as getValuenow,m as handleBoundariesAfterResize,l as handleBoundariesDuringResize,c as initState,g as keyboardResize,i as maxResize,h as minResize,r as parseSize,f as pointerResize,j as resizeSibling,d as setState};
6
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,v as u,w as v,x as w}from"../../chunks/chunk.YK2PXI6D.js";import"../../chunks/chunk.E37HEAJ5.js";import"../../chunks/chunk.QXLPBYMX.js";import"../../chunks/chunk.PYG4YVBA.js";import"../../chunks/chunk.QZHEP4X2.js";import"../../chunks/chunk.LZMYHIO2.js";import"../../chunks/chunk.YAJT3P6V.js";import"../../chunks/chunk.6KTLOA7V.js";import"../../chunks/chunk.SKLCDWYQ.js";import"../../chunks/chunk.24D46RLZ.js";import"../../chunks/chunk.7ZS4N2FT.js";import"../../chunks/chunk.U6FJJGO3.js";import"../../chunks/chunk.KYCC3C3M.js";import"../../chunks/chunk.GVQVA7P3.js";import"../../chunks/chunk.MIYZJUXH.js";import"../../chunks/chunk.A23NSEWA.js";import"../../chunks/chunk.B3IJU6XJ.js";import"../../chunks/chunk.BSZ2LBJX.js";import"../../chunks/chunk.3E5QKMHL.js";import"../../chunks/chunk.HN4PXH3D.js";import"../../chunks/chunk.R4NDFXVA.js";import"../../chunks/chunk.G76HB2FK.js";import"../../chunks/chunk.MCIQXNKY.js";export{a as SPLIT_VIEW_PANEL_CONSTANTS,b as SplitViewAnimatingLayer,u as SplitViewPanelAdapter,v as SplitViewPanelComponent,t as SplitViewPanelFoundation,k as clampSize,e as clearState,w as defineSplitViewPanelComponent,o as getCursor,p as getHandleIcon,s as getPixelDimension,q as getSplitViewPanelSibling,n as getValuenow,m as handleBoundariesAfterResize,l as handleBoundariesDuringResize,c as initState,g as keyboardResize,i as maxResize,h as minResize,r as parseSize,f as pointerResize,j as resizeSibling,d as setState};
7
7
  //# sourceMappingURL=index.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2022 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../chunks/chunk.3LZEQWAL.js";import"../chunks/chunk.E37HEAJ5.js";import"../chunks/chunk.YSE5EMB3.js";import"../chunks/chunk.DML4YNQF.js";import"../chunks/chunk.IMK2LFWR.js";import"../chunks/chunk.RPPBBBYG.js";import"../chunks/chunk.AWCBH5KW.js";import"../chunks/chunk.F5I55MXD.js";import"../chunks/chunk.Y6FFG7XO.js";import"../chunks/chunk.DGOV5RDW.js";import"../chunks/chunk.NGIBMR3Q.js";import"../chunks/chunk.7NXPOEXV.js";import"../chunks/chunk.QJPH24V4.js";import"../chunks/chunk.KGW63HJX.js";import"../chunks/chunk.54QFNVMG.js";import"../chunks/chunk.FZQCBRPK.js";import"../chunks/chunk.D3DLVPPE.js";import"../chunks/chunk.7JTKKFL4.js";import"../chunks/chunk.AMFXGOSA.js";import"../chunks/chunk.EC6JSIQW.js";import"../chunks/chunk.XYBFFTXS.js";import"../chunks/chunk.STS5TIUV.js";import"../chunks/chunk.3UMBCR4P.js";import"../chunks/chunk.BOENNFXE.js";import"../chunks/chunk.QXLPBYMX.js";import"../chunks/chunk.PYG4YVBA.js";import"../chunks/chunk.QZHEP4X2.js";import"../chunks/chunk.LZMYHIO2.js";import"../chunks/chunk.D4SNVKDA.js";import"../chunks/chunk.UUX4QJ4D.js";import"../chunks/chunk.YAJT3P6V.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SKLCDWYQ.js";import"../chunks/chunk.24D46RLZ.js";import"../chunks/chunk.7ZS4N2FT.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.KYCC3C3M.js";import"../chunks/chunk.GVQVA7P3.js";import"../chunks/chunk.MIYZJUXH.js";import"../chunks/chunk.A23NSEWA.js";import"../chunks/chunk.B3IJU6XJ.js";import"../chunks/chunk.BSZ2LBJX.js";import"../chunks/chunk.3E5QKMHL.js";import"../chunks/chunk.HN4PXH3D.js";import"../chunks/chunk.R4NDFXVA.js";import"../chunks/chunk.G76HB2FK.js";import"../chunks/chunk.MCIQXNKY.js";export{a as TIME_PICKER_CONSTANTS,b as TimePickerAdapter,q as TimePickerComponent,r as TimePickerComponentDelegate,p as TimePickerFoundation,s as defineTimePickerComponent,n as getCurrentTimeOfDayMillis,j as hoursToMillis,o as mergeDateWithTime,e as millisToHours,g as millisToMinutes,f as millisToMinutesClamped,i as millisToSeconds,h as millisToSecondsClamped,d as millisToTimeString,k as minutesToMillis,l as secondsToMillis,m as stripSecondsFromMillis,c as timeStringToMillis};
6
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../chunks/chunk.32SMESZX.js";import"../chunks/chunk.E37HEAJ5.js";import"../chunks/chunk.VQKRN5IQ.js";import"../chunks/chunk.DML4YNQF.js";import"../chunks/chunk.IMK2LFWR.js";import"../chunks/chunk.RPPBBBYG.js";import"../chunks/chunk.AWCBH5KW.js";import"../chunks/chunk.F5I55MXD.js";import"../chunks/chunk.Y6FFG7XO.js";import"../chunks/chunk.DGOV5RDW.js";import"../chunks/chunk.NGIBMR3Q.js";import"../chunks/chunk.7NXPOEXV.js";import"../chunks/chunk.QJPH24V4.js";import"../chunks/chunk.KGW63HJX.js";import"../chunks/chunk.54QFNVMG.js";import"../chunks/chunk.FZQCBRPK.js";import"../chunks/chunk.D3DLVPPE.js";import"../chunks/chunk.7JTKKFL4.js";import"../chunks/chunk.AMFXGOSA.js";import"../chunks/chunk.EC6JSIQW.js";import"../chunks/chunk.XYBFFTXS.js";import"../chunks/chunk.STS5TIUV.js";import"../chunks/chunk.3UMBCR4P.js";import"../chunks/chunk.BOENNFXE.js";import"../chunks/chunk.QXLPBYMX.js";import"../chunks/chunk.PYG4YVBA.js";import"../chunks/chunk.QZHEP4X2.js";import"../chunks/chunk.LZMYHIO2.js";import"../chunks/chunk.D4SNVKDA.js";import"../chunks/chunk.UUX4QJ4D.js";import"../chunks/chunk.YAJT3P6V.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SKLCDWYQ.js";import"../chunks/chunk.24D46RLZ.js";import"../chunks/chunk.7ZS4N2FT.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.KYCC3C3M.js";import"../chunks/chunk.GVQVA7P3.js";import"../chunks/chunk.MIYZJUXH.js";import"../chunks/chunk.A23NSEWA.js";import"../chunks/chunk.B3IJU6XJ.js";import"../chunks/chunk.BSZ2LBJX.js";import"../chunks/chunk.3E5QKMHL.js";import"../chunks/chunk.HN4PXH3D.js";import"../chunks/chunk.R4NDFXVA.js";import"../chunks/chunk.G76HB2FK.js";import"../chunks/chunk.MCIQXNKY.js";export{a as TIME_PICKER_CONSTANTS,b as TimePickerAdapter,q as TimePickerComponent,r as TimePickerComponentDelegate,p as TimePickerFoundation,s as defineTimePickerComponent,n as getCurrentTimeOfDayMillis,j as hoursToMillis,o as mergeDateWithTime,e as millisToHours,g as millisToMinutes,f as millisToMinutesClamped,i as millisToSeconds,h as millisToSecondsClamped,d as millisToTimeString,k as minutesToMillis,l as secondsToMillis,m as stripSecondsFromMillis,c as timeStringToMillis};
7
7
  //# sourceMappingURL=index.js.map
@@ -10,7 +10,7 @@ export interface IDialogAdapter extends IBaseAdapter {
10
10
  initializeAccessibility(): void;
11
11
  setAnimating(animating: boolean): void;
12
12
  setVisibility(visible: boolean): void;
13
- attach(): void;
13
+ attach(parent?: HTMLElement): void;
14
14
  detach(): void;
15
15
  setDocumentListener(type: string, listener: (evt: Event) => void): void;
16
16
  removeDocumentListener(type: string, listener: (evt: Event) => void): void;
@@ -31,7 +31,7 @@ export interface IDialogAdapter extends IBaseAdapter {
31
31
  setMoveTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;
32
32
  removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;
33
33
  getSurfaceBounds(): DOMRect;
34
- setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType): void;
34
+ setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType | null): void;
35
35
  captureActiveElement(): void;
36
36
  tryRestoreActiveElement(): void;
37
37
  }
@@ -39,7 +39,7 @@ export interface IDialogAdapter extends IBaseAdapter {
39
39
  * Provides facilities for interacting with the internal DOM of `DialogComponent`.
40
40
  */
41
41
  export declare class DialogAdapter extends BaseAdapter<IDialogComponent> implements IDialogAdapter {
42
- private _backdropElement;
42
+ private _backdropElement?;
43
43
  private _containerElement;
44
44
  private _surfaceElement;
45
45
  private _moveTargetElement;
@@ -48,7 +48,7 @@ export declare class DialogAdapter extends BaseAdapter<IDialogComponent> impleme
48
48
  initializeAccessibility(): void;
49
49
  setAnimating(animating: boolean): void;
50
50
  setVisibility(visible: boolean): void;
51
- attach(): void;
51
+ attach(parent?: HTMLElement): void;
52
52
  detach(): void;
53
53
  registerTransitionEndHandler(handler: (evt: TransitionEvent) => void): void;
54
54
  deregisterTransitionEndHandler(handler: (evt: TransitionEvent) => void): void;
@@ -69,7 +69,7 @@ export declare class DialogAdapter extends BaseAdapter<IDialogComponent> impleme
69
69
  setMoveTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;
70
70
  removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;
71
71
  getSurfaceBounds(): DOMRect;
72
- setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType): void;
72
+ setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType | null): void;
73
73
  captureActiveElement(): void;
74
74
  tryRestoreActiveElement(): void;
75
75
  }
@@ -17,7 +17,6 @@ import { DIALOG_CONSTANTS } from './dialog-constants';
17
17
  export class DialogAdapter extends BaseAdapter {
18
18
  constructor(component) {
19
19
  super(component);
20
- this._backdropElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.BACKDROP);
21
20
  this._containerElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.CONTAINER);
22
21
  this._surfaceElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.SURFACE);
23
22
  }
@@ -28,23 +27,24 @@ export class DialogAdapter extends BaseAdapter {
28
27
  this._component.setAttribute('aria-modal', 'true');
29
28
  }
30
29
  setAnimating(animating) {
31
- if (animating) {
32
- this._containerElement.classList.add(DIALOG_CONSTANTS.classes.ANIMATING);
33
- }
34
- else {
35
- this._containerElement.classList.remove(DIALOG_CONSTANTS.classes.ANIMATING);
36
- }
30
+ toggleClass(this._containerElement, animating, DIALOG_CONSTANTS.classes.ANIMATING);
37
31
  }
38
32
  setVisibility(visible) {
33
+ toggleClass(this._containerElement, visible, DIALOG_CONSTANTS.classes.OPEN);
34
+ if (!this._backdropElement) {
35
+ this._backdropElement = document.createElement('forge-backdrop');
36
+ this._backdropElement.setAttribute('part', 'scrim');
37
+ this._containerElement.appendChild(this._backdropElement);
38
+ }
39
39
  if (visible) {
40
- this._containerElement.classList.add(DIALOG_CONSTANTS.classes.OPEN);
40
+ this._backdropElement.fadeIn();
41
41
  }
42
42
  else {
43
- this._containerElement.classList.remove(DIALOG_CONSTANTS.classes.OPEN);
43
+ this._backdropElement.fadeOut();
44
44
  }
45
45
  }
46
- attach() {
47
- document.body.appendChild(this._component);
46
+ attach(parent = document.body) {
47
+ parent.appendChild(this._component);
48
48
  }
49
49
  detach() {
50
50
  if (this._activeElement) {
@@ -65,10 +65,12 @@ export class DialogAdapter extends BaseAdapter {
65
65
  document.removeEventListener(type, listener);
66
66
  }
67
67
  registerBackdropClickHandler(handler) {
68
- this._backdropElement.addEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);
68
+ var _a;
69
+ (_a = this._backdropElement) === null || _a === void 0 ? void 0 : _a.addEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);
69
70
  }
70
71
  deregisterBackdropClickHandler(handler) {
71
- this._backdropElement.removeEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);
72
+ var _a;
73
+ (_a = this._backdropElement) === null || _a === void 0 ? void 0 : _a.removeEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);
72
74
  }
73
75
  getOpenDialogs(selector) {
74
76
  return document.querySelectorAll(selector);
@@ -97,12 +99,7 @@ export class DialogAdapter extends BaseAdapter {
97
99
  this._component.classList.add(name);
98
100
  }
99
101
  setFullscreen(value) {
100
- if (value) {
101
- this._containerElement.classList.add(DIALOG_CONSTANTS.classes.FULLSCREEN);
102
- }
103
- else {
104
- this._containerElement.classList.remove(DIALOG_CONSTANTS.classes.FULLSCREEN);
105
- }
102
+ toggleClass(this._containerElement, value, DIALOG_CONSTANTS.classes.FULLSCREEN);
106
103
  }
107
104
  setMoveable(value) {
108
105
  toggleClass(this._containerElement, value, DIALOG_CONSTANTS.classes.MOVEABLE);
@@ -120,27 +117,30 @@ export class DialogAdapter extends BaseAdapter {
120
117
  return !!this._moveTargetElement;
121
118
  }
122
119
  setMoveTargetHandler(type, listener) {
123
- if (this._moveTargetElement) {
124
- this._moveTargetElement.addEventListener(type, listener);
125
- }
120
+ var _a;
121
+ (_a = this._moveTargetElement) === null || _a === void 0 ? void 0 : _a.addEventListener(type, listener);
126
122
  }
127
123
  removeDragTargetHandler(type, listener) {
128
- if (this._moveTargetElement) {
129
- this._moveTargetElement.removeEventListener(type, listener);
130
- }
124
+ var _a;
125
+ (_a = this._moveTargetElement) === null || _a === void 0 ? void 0 : _a.removeEventListener(type, listener);
131
126
  }
132
127
  getSurfaceBounds() {
133
128
  return this._surfaceElement.getBoundingClientRect();
134
129
  }
135
130
  setSurfacePosition(x, y, positionType) {
136
- this._surfaceElement.style.position = positionType === 'absolute' ? positionType : 'relative';
137
- if (y != null) {
131
+ if (positionType) {
132
+ this._surfaceElement.style.position = positionType === 'absolute' ? positionType : 'relative';
133
+ }
134
+ else {
135
+ this._surfaceElement.style.removeProperty('position');
136
+ }
137
+ if (y !== null) {
138
138
  this._surfaceElement.style.top = y;
139
139
  }
140
140
  else {
141
141
  this._surfaceElement.style.removeProperty('top');
142
142
  }
143
- if (x != null) {
143
+ if (x !== null) {
144
144
  this._surfaceElement.style.left = x;
145
145
  }
146
146
  else {
@@ -148,10 +148,9 @@ export class DialogAdapter extends BaseAdapter {
148
148
  }
149
149
  }
150
150
  captureActiveElement() {
151
+ var _a;
151
152
  this._activeElement = getActiveElement();
152
- if (this._activeElement) {
153
- this._activeElement.blur();
154
- }
153
+ (_a = this._activeElement) === null || _a === void 0 ? void 0 : _a.blur();
155
154
  }
156
155
  tryRestoreActiveElement() {
157
156
  if (this._activeElement) {
@@ -21,6 +21,8 @@ export interface IDialogFoundation extends ICustomElementFoundation {
21
21
  moveTarget: string;
22
22
  initializeMoveTarget(): void;
23
23
  resetPosition(): void;
24
+ show(parent?: HTMLElement): Promise<void>;
25
+ hide(remove?: boolean): Promise<void>;
24
26
  }
25
27
  export declare class DialogFoundation implements IDialogFoundation {
26
28
  _adapter: IDialogAdapter;
@@ -46,8 +48,6 @@ export declare class DialogFoundation implements IDialogFoundation {
46
48
  private _moveTargetMouseDownHandler;
47
49
  private _moveTargetMouseMoveHandler;
48
50
  private _moveTargetMouseUpHandler;
49
- private _attachedDocumentKeydownHandler;
50
- private _attachedBackdropClickHandler;
51
51
  constructor(_adapter: IDialogAdapter);
52
52
  initialize(): void;
53
53
  destroy(): void;
@@ -56,6 +56,8 @@ export declare class DialogFoundation implements IDialogFoundation {
56
56
  private _executeCloseCallback;
57
57
  initializeMoveTarget(): void;
58
58
  resetPosition(): void;
59
+ show(parent?: HTMLElement): Promise<void>;
60
+ hide(remove?: boolean): Promise<void>;
59
61
  private _normalizePositionValue;
60
62
  private _openDialog;
61
63
  private _closeDialog;
@@ -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()
@@ -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:uhvgm1d;animation-name:uhvgm1d;-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 uhvgm1d{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uhvgm1d{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:uhvgm27;animation-name:uhvgm27;-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 uhvgm27{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uhvgm27{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:uhvgm36;animation-name:uhvgm36;-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 uhvgm36{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uhvgm36{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:uhvgm3j;animation-name:uhvgm3j;-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 uhvgm3j{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uhvgm3j{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:uhvgm49;animation-name:uhvgm49;-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 uhvgm49{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uhvgm49{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:uhvgm4e;animation-name:uhvgm4e;-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 uhvgm4e{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uhvgm4e{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:uhvgm4l;animation-name:uhvgm4l;-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 uhvgm4l{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uhvgm4l{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:uhvgm4r;animation-name:uhvgm4r;-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 uhvgm4r{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uhvgm4r{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.1",
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 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