@tylertech/forge 2.14.0 → 3.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +182 -28
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/chunks/chunk.242YUZKU.js +7 -0
- package/dist/esm/chunks/chunk.242YUZKU.js.map +7 -0
- package/dist/esm/chunks/{chunk.RHFNK6EE.js → chunk.5WNKQTXX.js} +2 -2
- package/dist/esm/chunks/{chunk.LFLREB3C.js → chunk.7BOXIJAM.js} +2 -2
- package/dist/esm/chunks/{chunk.DYRY2HWZ.js → chunk.ABLKZXJ3.js} +2 -2
- package/dist/esm/chunks/{chunk.DQJPIDVW.js → chunk.CKYHP5MC.js} +2 -2
- package/dist/esm/chunks/{chunk.DQJPIDVW.js.map → chunk.CKYHP5MC.js.map} +3 -3
- package/dist/esm/chunks/chunk.CLM6MNKC.js +7 -0
- package/dist/esm/chunks/chunk.CLM6MNKC.js.map +7 -0
- package/dist/esm/chunks/{chunk.DFJUCHEO.js → chunk.IUOBRBDZ.js} +2 -2
- package/dist/esm/chunks/{chunk.6RSRYR55.js → chunk.M2QU3LUR.js} +2 -2
- package/dist/esm/chunks/{chunk.HU27X3IT.js → chunk.MSF55AA3.js} +2 -2
- package/dist/esm/chunks/chunk.Q7LFOS2I.js +7 -0
- package/dist/esm/chunks/chunk.Q7LFOS2I.js.map +7 -0
- package/dist/esm/chunks/{chunk.OZ5BPXNV.js → chunk.SSRQFKNH.js} +2 -2
- package/dist/esm/chunks/chunk.XQ2EQIDS.js +7 -0
- package/dist/esm/chunks/chunk.XQ2EQIDS.js.map +7 -0
- package/dist/esm/chunks/chunk.Y5A7RQ5M.js +7 -0
- package/dist/esm/chunks/chunk.Y5A7RQ5M.js.map +7 -0
- package/dist/esm/chunks/{chunk.J6P3GKZM.js → chunk.ZFHPUAYX.js} +2 -2
- package/dist/esm/chunks/{chunk.J6P3GKZM.js.map → chunk.ZFHPUAYX.js.map} +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stack/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.d.ts +2 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.js +13 -1
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.d.ts +2 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.js +1 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.d.ts +4 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.js +15 -1
- package/esm/app-bar/profile-button/app-bar-profile-button.d.ts +2 -0
- package/esm/app-bar/profile-button/app-bar-profile-button.js +9 -0
- package/esm/autocomplete/autocomplete-foundation.js +7 -1
- package/esm/dialog/dialog-adapter.d.ts +5 -5
- package/esm/dialog/dialog-adapter.js +30 -31
- package/esm/dialog/dialog-foundation.d.ts +4 -2
- package/esm/dialog/dialog-foundation.js +62 -54
- package/esm/dialog/dialog.d.ts +4 -0
- package/esm/dialog/dialog.js +7 -1
- package/esm/profile-card/profile-card-adapter.d.ts +2 -0
- package/esm/profile-card/profile-card-adapter.js +12 -1
- package/esm/profile-card/profile-card-constants.d.ts +1 -0
- package/esm/profile-card/profile-card-constants.js +1 -0
- package/esm/profile-card/profile-card-foundation.d.ts +4 -0
- package/esm/profile-card/profile-card-foundation.js +9 -0
- package/esm/profile-card/profile-card.d.ts +2 -0
- package/esm/profile-card/profile-card.js +7 -0
- package/esm/select/core/base-select-foundation.js +8 -3
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/stack/stack-constants.d.ts +2 -0
- package/esm/stack/stack-constants.js +1 -0
- package/esm/stack/stack-foundation.d.ts +4 -4
- package/esm/stack/stack-foundation.js +2 -2
- package/esm/stack/stack.d.ts +3 -3
- package/esm/stack/stack.js +1 -1
- package/package.json +1 -1
- package/styles/stack/_mixins.scss +1 -1
- package/styles/stack/stack.scss +4 -1
- package/dist/esm/chunks/chunk.4X2OFZDL.js +0 -7
- package/dist/esm/chunks/chunk.4X2OFZDL.js.map +0 -7
- package/dist/esm/chunks/chunk.73AYD2BF.js +0 -7
- package/dist/esm/chunks/chunk.73AYD2BF.js.map +0 -7
- package/dist/esm/chunks/chunk.PYIFIHDK.js +0 -7
- package/dist/esm/chunks/chunk.PYIFIHDK.js.map +0 -7
- package/dist/esm/chunks/chunk.U724KSZU.js +0 -7
- package/dist/esm/chunks/chunk.U724KSZU.js.map +0 -7
- package/dist/esm/chunks/chunk.ULIFS3UR.js +0 -7
- package/dist/esm/chunks/chunk.ULIFS3UR.js.map +0 -7
- /package/dist/esm/chunks/{chunk.RHFNK6EE.js.map → chunk.5WNKQTXX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LFLREB3C.js.map → chunk.7BOXIJAM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DYRY2HWZ.js.map → chunk.ABLKZXJ3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DFJUCHEO.js.map → chunk.IUOBRBDZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6RSRYR55.js.map → chunk.M2QU3LUR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HU27X3IT.js.map → chunk.MSF55AA3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OZ5BPXNV.js.map → chunk.SSRQFKNH.js.map} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { isNumber, isString } from '@tylertech/forge-core';
|
|
7
7
|
import { DIALOG_CONSTANTS } from './dialog-constants';
|
|
8
8
|
export class DialogFoundation {
|
|
9
9
|
constructor(_adapter) {
|
|
@@ -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
|
-
|
|
47
|
-
|
|
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
|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
window.
|
|
135
|
-
|
|
136
|
-
this.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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.
|
|
161
|
+
if (this._escapeClose) {
|
|
147
162
|
this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);
|
|
148
163
|
}
|
|
149
|
-
if (this.
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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) {
|
|
@@ -269,26 +290,22 @@ export class DialogFoundation {
|
|
|
269
290
|
if (!this._open) {
|
|
270
291
|
return;
|
|
271
292
|
}
|
|
272
|
-
if (attach &&
|
|
293
|
+
if (attach && this._backdropClose) {
|
|
273
294
|
this._adapter.registerBackdropClickHandler(this._backdropClickHandler);
|
|
274
|
-
this._attachedBackdropClickHandler = true;
|
|
275
295
|
}
|
|
276
|
-
else if (!attach
|
|
296
|
+
else if (!attach) {
|
|
277
297
|
this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);
|
|
278
|
-
this._attachedBackdropClickHandler = false;
|
|
279
298
|
}
|
|
280
299
|
}
|
|
281
300
|
_setDocumentKeydownListener(attach) {
|
|
282
301
|
if (!this._open) {
|
|
283
302
|
return;
|
|
284
303
|
}
|
|
285
|
-
if (attach &&
|
|
304
|
+
if (attach && this._escapeClose) {
|
|
286
305
|
this._adapter.setDocumentListener('keydown', this._documentKeydownHandler);
|
|
287
|
-
this._attachedDocumentKeydownHandler = true;
|
|
288
306
|
}
|
|
289
|
-
else if (!attach
|
|
307
|
+
else if (!attach) {
|
|
290
308
|
this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);
|
|
291
|
-
this._attachedDocumentKeydownHandler = false;
|
|
292
309
|
}
|
|
293
310
|
}
|
|
294
311
|
_calculateOffsetPosition(pageX, pageY, context) {
|
|
@@ -324,12 +341,7 @@ export class DialogFoundation {
|
|
|
324
341
|
if (this._backdropClose !== value) {
|
|
325
342
|
this._backdropClose = value;
|
|
326
343
|
this._setBackdropClickListener(this._backdropClose);
|
|
327
|
-
|
|
328
|
-
this._adapter.setHostAttribute(DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE, this._backdropClose.toString());
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
this._adapter.removeHostAttribute(DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE);
|
|
332
|
-
}
|
|
344
|
+
this._adapter.toggleHostAttribute(DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE, this._backdropClose);
|
|
333
345
|
}
|
|
334
346
|
}
|
|
335
347
|
get backdropClose() {
|
|
@@ -339,14 +351,9 @@ export class DialogFoundation {
|
|
|
339
351
|
set escapeClose(value) {
|
|
340
352
|
value = Boolean(value);
|
|
341
353
|
if (this._escapeClose !== value) {
|
|
342
|
-
this._escapeClose = value;
|
|
354
|
+
this._escapeClose = !!value;
|
|
343
355
|
this._setDocumentKeydownListener(this._escapeClose);
|
|
344
|
-
|
|
345
|
-
this._adapter.setHostAttribute(DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE, this._escapeClose.toString());
|
|
346
|
-
}
|
|
347
|
-
else {
|
|
348
|
-
this._adapter.removeHostAttribute(DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE);
|
|
349
|
-
}
|
|
356
|
+
this._adapter.toggleHostAttribute(DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE, this._escapeClose);
|
|
350
357
|
}
|
|
351
358
|
}
|
|
352
359
|
get escapeClose() {
|
|
@@ -370,7 +377,7 @@ export class DialogFoundation {
|
|
|
370
377
|
if (this._fullscreen !== value) {
|
|
371
378
|
this._fullscreen = !!value;
|
|
372
379
|
this._adapter.setFullscreen(this._fullscreen);
|
|
373
|
-
this._adapter.
|
|
380
|
+
this._adapter.toggleHostAttribute(DIALOG_CONSTANTS.attributes.FULLSCREEN, this._fullscreen);
|
|
374
381
|
}
|
|
375
382
|
}
|
|
376
383
|
get openCallback() {
|
|
@@ -429,7 +436,7 @@ export class DialogFoundation {
|
|
|
429
436
|
}
|
|
430
437
|
set moveable(value) {
|
|
431
438
|
if (this._moveable !== value) {
|
|
432
|
-
this._moveable = value;
|
|
439
|
+
this._moveable = !!value;
|
|
433
440
|
if (this._open) {
|
|
434
441
|
this._adapter.setMoveable(this._moveable);
|
|
435
442
|
if (this._moveable) {
|
|
@@ -440,6 +447,7 @@ export class DialogFoundation {
|
|
|
440
447
|
this._isMoving = false;
|
|
441
448
|
}
|
|
442
449
|
}
|
|
450
|
+
this._adapter.toggleHostAttribute(DIALOG_CONSTANTS.attributes.MOVEABLE, this._moveable);
|
|
443
451
|
}
|
|
444
452
|
}
|
|
445
453
|
get moveTarget() {
|
package/esm/dialog/dialog.d.ts
CHANGED
|
@@ -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
|
}
|
package/esm/dialog/dialog.js
CHANGED
|
@@ -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\"><
|
|
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()
|
|
@@ -9,6 +9,7 @@ export interface IProfileCardAdapter extends IBaseAdapter {
|
|
|
9
9
|
setFullName(value: string): void;
|
|
10
10
|
setEmail(value: string): void;
|
|
11
11
|
setAvatarText(value: string): void;
|
|
12
|
+
setAvatarIcon(value: string): void;
|
|
12
13
|
setAvatarImageUrl(value: string): void;
|
|
13
14
|
setAvatarLetterCount(count: number): void;
|
|
14
15
|
setActionToolbarVisibility(isVisible: boolean): void;
|
|
@@ -34,6 +35,7 @@ export declare class ProfileCardAdapter extends BaseAdapter<IProfileCardComponen
|
|
|
34
35
|
setFullName(value: string): void;
|
|
35
36
|
setEmail(value: string): void;
|
|
36
37
|
setAvatarText(value: string): void;
|
|
38
|
+
setAvatarIcon(value: string): void;
|
|
37
39
|
setAvatarImageUrl(value: string): void;
|
|
38
40
|
setAvatarLetterCount(count: number): void;
|
|
39
41
|
setActionToolbarVisibility(isVisible: boolean): void;
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { getShadowElement } from '@tylertech/forge-core';
|
|
6
|
+
import { getShadowElement, removeAllChildren } from '@tylertech/forge-core';
|
|
7
7
|
import { BaseAdapter } from '../core/base/base-adapter';
|
|
8
|
+
import { IconComponentDelegate } from '../icon';
|
|
8
9
|
import { PROFILE_CARD_CONSTANTS } from './profile-card-constants';
|
|
9
10
|
export class ProfileCardAdapter extends BaseAdapter {
|
|
10
11
|
constructor(component) {
|
|
@@ -27,6 +28,16 @@ export class ProfileCardAdapter extends BaseAdapter {
|
|
|
27
28
|
setAvatarText(value) {
|
|
28
29
|
this._component.setAttribute(PROFILE_CARD_CONSTANTS.attributes.AVATAR_TEXT, value);
|
|
29
30
|
this._avatarElement.text = value;
|
|
31
|
+
removeAllChildren(this._avatarElement);
|
|
32
|
+
}
|
|
33
|
+
setAvatarIcon(value) {
|
|
34
|
+
if (value) {
|
|
35
|
+
const iconDelegate = new IconComponentDelegate({ props: { name: value } });
|
|
36
|
+
this._avatarElement.replaceChildren(iconDelegate.element);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
removeAllChildren(this._avatarElement);
|
|
40
|
+
}
|
|
30
41
|
}
|
|
31
42
|
setAvatarImageUrl(value) {
|
|
32
43
|
this._component.setAttribute(PROFILE_CARD_CONSTANTS.attributes.AVATAR_IMAGE_URL, value);
|
|
@@ -11,6 +11,7 @@ export interface IProfileCardFoundation extends ICustomElementFoundation {
|
|
|
11
11
|
signOut: boolean;
|
|
12
12
|
profile: boolean;
|
|
13
13
|
avatarText: string;
|
|
14
|
+
avatarIcon: string;
|
|
14
15
|
avatarImageUrl: string;
|
|
15
16
|
avatarLetterCount: number;
|
|
16
17
|
}
|
|
@@ -19,6 +20,7 @@ export declare class ProfileCardFoundation implements IProfileCardFoundation {
|
|
|
19
20
|
private _fullName;
|
|
20
21
|
private _email;
|
|
21
22
|
private _avatarText;
|
|
23
|
+
private _avatarIcon;
|
|
22
24
|
private _avatarImageUrl;
|
|
23
25
|
private _avatarLetterCount;
|
|
24
26
|
private _showSignOutButton;
|
|
@@ -39,6 +41,8 @@ export declare class ProfileCardFoundation implements IProfileCardFoundation {
|
|
|
39
41
|
set email(value: string);
|
|
40
42
|
get avatarText(): string;
|
|
41
43
|
set avatarText(value: string);
|
|
44
|
+
get avatarIcon(): string;
|
|
45
|
+
set avatarIcon(value: string);
|
|
42
46
|
get avatarImageUrl(): string;
|
|
43
47
|
set avatarImageUrl(value: string);
|
|
44
48
|
get avatarLetterCount(): number;
|
|
@@ -73,6 +73,15 @@ export class ProfileCardFoundation {
|
|
|
73
73
|
this._adapter.setAvatarText(this._avatarText);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
+
get avatarIcon() {
|
|
77
|
+
return this._avatarIcon;
|
|
78
|
+
}
|
|
79
|
+
set avatarIcon(value) {
|
|
80
|
+
if (this._avatarIcon !== value) {
|
|
81
|
+
this._avatarIcon = value;
|
|
82
|
+
this._adapter.setAvatarIcon(this._avatarIcon);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
76
85
|
get avatarImageUrl() {
|
|
77
86
|
return this._avatarImageUrl;
|
|
78
87
|
}
|
|
@@ -12,6 +12,7 @@ export interface IProfileCardComponent extends IBaseComponent {
|
|
|
12
12
|
signOutText: string;
|
|
13
13
|
profileText: string;
|
|
14
14
|
avatarText: string;
|
|
15
|
+
avatarIcon: string;
|
|
15
16
|
avatarImageUrl: string;
|
|
16
17
|
avatarLetterCount: number;
|
|
17
18
|
}
|
|
@@ -42,6 +43,7 @@ export declare class ProfileCardComponent extends BaseComponent implements IProf
|
|
|
42
43
|
signOutText: string;
|
|
43
44
|
profileText: string;
|
|
44
45
|
avatarText: string;
|
|
46
|
+
avatarIcon: string;
|
|
45
47
|
avatarImageUrl: string;
|
|
46
48
|
avatarLetterCount: number;
|
|
47
49
|
}
|
|
@@ -34,6 +34,7 @@ let ProfileCardComponent = class ProfileCardComponent extends BaseComponent {
|
|
|
34
34
|
PROFILE_CARD_CONSTANTS.attributes.SIGN_OUT_TEXT,
|
|
35
35
|
PROFILE_CARD_CONSTANTS.attributes.PROFILE_TEXT,
|
|
36
36
|
PROFILE_CARD_CONSTANTS.attributes.AVATAR_TEXT,
|
|
37
|
+
PROFILE_CARD_CONSTANTS.attributes.AVATAR_ICON,
|
|
37
38
|
PROFILE_CARD_CONSTANTS.attributes.AVATAR_IMAGE_URL,
|
|
38
39
|
PROFILE_CARD_CONSTANTS.attributes.AVATAR_LETTER_COUNT
|
|
39
40
|
];
|
|
@@ -64,6 +65,9 @@ let ProfileCardComponent = class ProfileCardComponent extends BaseComponent {
|
|
|
64
65
|
case PROFILE_CARD_CONSTANTS.attributes.AVATAR_TEXT:
|
|
65
66
|
this.avatarText = newValue;
|
|
66
67
|
break;
|
|
68
|
+
case PROFILE_CARD_CONSTANTS.attributes.AVATAR_ICON:
|
|
69
|
+
this.avatarIcon = newValue;
|
|
70
|
+
break;
|
|
67
71
|
case PROFILE_CARD_CONSTANTS.attributes.AVATAR_IMAGE_URL:
|
|
68
72
|
this.avatarImageUrl = newValue;
|
|
69
73
|
break;
|
|
@@ -94,6 +98,9 @@ __decorate([
|
|
|
94
98
|
__decorate([
|
|
95
99
|
FoundationProperty()
|
|
96
100
|
], ProfileCardComponent.prototype, "avatarText", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
FoundationProperty()
|
|
103
|
+
], ProfileCardComponent.prototype, "avatarIcon", void 0);
|
|
97
104
|
__decorate([
|
|
98
105
|
FoundationProperty()
|
|
99
106
|
], ProfileCardComponent.prototype, "avatarImageUrl", void 0);
|
|
@@ -291,7 +291,12 @@ export class BaseSelectFoundation extends ListDropdownAwareFoundation {
|
|
|
291
291
|
}
|
|
292
292
|
if (this._multiple) {
|
|
293
293
|
if (this._selectedLabels.length) {
|
|
294
|
-
|
|
294
|
+
if (this._selectedLabels.length === 1) {
|
|
295
|
+
return this._selectedLabels[0];
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
return `${this._selectedLabels.length} options selected`;
|
|
299
|
+
}
|
|
295
300
|
}
|
|
296
301
|
else {
|
|
297
302
|
return '';
|
|
@@ -439,8 +444,8 @@ export class BaseSelectFoundation extends ListDropdownAwareFoundation {
|
|
|
439
444
|
this._filterTimeout = undefined;
|
|
440
445
|
}, 300);
|
|
441
446
|
this._options = this._adapter.getOptions();
|
|
442
|
-
// TODO
|
|
443
|
-
const matchedOption = this._flatOptions.find(option => !option.disabled && option.label.toLowerCase().startsWith(this._filterString));
|
|
447
|
+
// TODO: Enhance this to cycle through closest matches (see the native select)
|
|
448
|
+
const matchedOption = this._flatOptions.find(option => !option.disabled && option.label.toLowerCase().startsWith(this._filterString.toLowerCase()));
|
|
444
449
|
if (matchedOption) {
|
|
445
450
|
const optionIndex = this._flatOptions.indexOf(matchedOption);
|
|
446
451
|
if (this._open) {
|
|
@@ -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:udzy8qi;animation-name:udzy8qi;-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 udzy8qi{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes udzy8qi{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:udzy8qq;animation-name:udzy8qq;-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 udzy8qq{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes udzy8qq{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:udzy8r2;animation-name:udzy8r2;-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 udzy8r2{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes udzy8r2{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:udzy8rw;animation-name:udzy8rw;-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 udzy8rw{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes udzy8rw{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:udzy8sk;animation-name:udzy8sk;-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 udzy8sk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes udzy8sk{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:udzy8sn;animation-name:udzy8sn;-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 udzy8sn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes udzy8sn{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:udzy8t5;animation-name:udzy8t5;-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 udzy8t5{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes udzy8t5{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:udzy8ts;animation-name:udzy8ts;-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 udzy8ts{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes udzy8ts{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:ukq4pci;animation-name:ukq4pci;-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 ukq4pci{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ukq4pci{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:ukq4pd4;animation-name:ukq4pd4;-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 ukq4pd4{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ukq4pd4{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:ukq4pdj;animation-name:ukq4pdj;-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 ukq4pdj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ukq4pdj{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:ukq4pdr;animation-name:ukq4pdr;-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 ukq4pdr{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ukq4pdr{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:ukq4pel;animation-name:ukq4pel;-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 ukq4pel{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ukq4pel{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:ukq4pf4;animation-name:ukq4pf4;-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 ukq4pf4{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ukq4pf4{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:ukq4pfe;animation-name:ukq4pfe;-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 ukq4pfe{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ukq4pfe{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:ukq4pg8;animation-name:ukq4pg8;-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 ukq4pg8{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ukq4pg8{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
|
*
|
|
@@ -22,6 +22,8 @@ export declare const STACK_CONSTANTS: {
|
|
|
22
22
|
DEFAULT_GAP: string;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
+
export declare type StackAlignment = 'start' | 'center' | 'end';
|
|
26
|
+
/** @deprecated Use `StackAlignment` instead. */
|
|
25
27
|
export declare enum StackAlignMode {
|
|
26
28
|
Start = "start",
|
|
27
29
|
Center = "center",
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ICustomElementFoundation } from '@tylertech/forge-core';
|
|
7
7
|
import { IStackAdapter } from './stack-adapter';
|
|
8
|
-
import {
|
|
8
|
+
import { StackAlignment } from './stack-constants';
|
|
9
9
|
export interface IStackFoundation extends ICustomElementFoundation {
|
|
10
10
|
inline: boolean;
|
|
11
11
|
wrap: boolean;
|
|
12
12
|
stretch: boolean;
|
|
13
13
|
gap: string;
|
|
14
|
-
alignment:
|
|
14
|
+
alignment: StackAlignment;
|
|
15
15
|
}
|
|
16
16
|
export declare class StackFoundation implements IStackFoundation {
|
|
17
17
|
private _adapter;
|
|
@@ -34,6 +34,6 @@ export declare class StackFoundation implements IStackFoundation {
|
|
|
34
34
|
get gap(): string;
|
|
35
35
|
set gap(value: string);
|
|
36
36
|
/** Controls the alignment of children */
|
|
37
|
-
get alignment():
|
|
38
|
-
set alignment(value:
|
|
37
|
+
get alignment(): StackAlignment;
|
|
38
|
+
set alignment(value: StackAlignment);
|
|
39
39
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { STACK_CONSTANTS
|
|
6
|
+
import { STACK_CONSTANTS } from './stack-constants';
|
|
7
7
|
export class StackFoundation {
|
|
8
8
|
constructor(_adapter) {
|
|
9
9
|
this._adapter = _adapter;
|
|
@@ -11,7 +11,7 @@ export class StackFoundation {
|
|
|
11
11
|
this._wrap = false;
|
|
12
12
|
this._stretch = false;
|
|
13
13
|
this._gap = STACK_CONSTANTS.strings.DEFAULT_GAP;
|
|
14
|
-
this._alignment =
|
|
14
|
+
this._alignment = 'start';
|
|
15
15
|
}
|
|
16
16
|
/** Controls the direction of the stack. */
|
|
17
17
|
get inline() {
|
package/esm/stack/stack.d.ts
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { ICustomElement } from '@tylertech/forge-core';
|
|
7
|
-
import { StackAlignMode } from './stack-constants';
|
|
7
|
+
import { StackAlignMode, StackAlignment } from './stack-constants';
|
|
8
8
|
import { BaseComponent } from '../core/base/base-component';
|
|
9
9
|
export interface IStackComponent extends ICustomElement {
|
|
10
10
|
inline: boolean;
|
|
11
11
|
wrap: boolean;
|
|
12
12
|
stretch: boolean;
|
|
13
13
|
gap: string;
|
|
14
|
-
alignment: StackAlignMode;
|
|
14
|
+
alignment: StackAlignMode | StackAlignment;
|
|
15
15
|
}
|
|
16
16
|
declare global {
|
|
17
17
|
interface HTMLElementTagNameMap {
|
|
@@ -37,5 +37,5 @@ export declare class StackComponent extends BaseComponent implements IStackCompo
|
|
|
37
37
|
/** Controls the gap between the children within the stack */
|
|
38
38
|
gap: string;
|
|
39
39
|
/** Controls if stack items are at the end of the row or column */
|
|
40
|
-
alignment: StackAlignMode;
|
|
40
|
+
alignment: StackAlignMode | StackAlignment;
|
|
41
41
|
}
|
package/esm/stack/stack.js
CHANGED
|
@@ -10,7 +10,7 @@ import { StackFoundation } from './stack-foundation';
|
|
|
10
10
|
import { STACK_CONSTANTS } from './stack-constants';
|
|
11
11
|
import { BaseComponent } from '../core/base/base-component';
|
|
12
12
|
const template = '<template><div class=\"forge-stack\" part=\"root\"><slot></slot></div></template>';
|
|
13
|
-
const styles = '.forge-stack{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;width:100%;gap:16px;gap:var(--forge-stack-gap,16px);height:100%;height:var(--forge-stack-height,100%)}.forge-stack ::slotted(*){-webkit-box-flex:var(--forge-stack-stretch,
|
|
13
|
+
const styles = '.forge-stack{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;width:100%;gap:16px;gap:var(--forge-stack-gap,16px);height:100%;height:var(--forge-stack-height,100%)}.forge-stack ::slotted(*){-webkit-box-flex:var(--forge-stack-stretch,initial);flex:var(--forge-stack-stretch,initial)}:host{display:block}:host([inline]) .forge-stack{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;--forge-stack-height:auto}:host([inline][wrap]) .forge-stack{flex-wrap:wrap}:host([stretch]:not([inline])){height:100%}:host([stretch]){--forge-stack-stretch:1}:host([alignment=start]) .forge-stack{-webkit-box-pack:start;justify-content:start}:host([alignment=center]) .forge-stack{-webkit-box-pack:center;justify-content:center}:host([alignment=end]) .forge-stack{-webkit-box-pack:end;justify-content:end}';
|
|
14
14
|
/**
|
|
15
15
|
* The custom element class behind the `<forge-stack>` component.
|
|
16
16
|
*
|