@genesislcap/foundation-ui 14.348.0 → 14.349.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.
- package/dist/custom-elements.json +1955 -1827
- package/dist/dts/dialog/dialog.d.ts +8 -0
- package/dist/dts/dialog/dialog.d.ts.map +1 -1
- package/dist/esm/dialog/dialog.js +26 -4
- package/package.json +18 -18
|
@@ -31,6 +31,14 @@ export declare abstract class DialogElement extends FoundationElement {
|
|
|
31
31
|
* Minimum height for the dialog
|
|
32
32
|
*/
|
|
33
33
|
minHeight: number;
|
|
34
|
+
/**
|
|
35
|
+
* Initial width for the dialog (cannot exceed viewport width)
|
|
36
|
+
*/
|
|
37
|
+
initialWidth?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Initial height for the dialog (cannot exceed viewport height)
|
|
40
|
+
*/
|
|
41
|
+
initialHeight?: number;
|
|
34
42
|
/**
|
|
35
43
|
* Callback to run *before* HTMLDialogElement is shown
|
|
36
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAK/D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAWjE,eAAO,MAAM,6BAA6B,EAAE,cAG3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,IAAK,CAAC;AAEtC,8BAAsB,aAAc,SAAQ,iBAAiB;IAC3D;;;OAGG;IACH,WAAW,EAAG,iBAAiB,CAAC;IAChC,UAAU,EAAG,WAAW,CAAC;IACzB,cAAc,EAAG,eAAe,CAAC;IACrB,YAAY,EAAG,qBAAqB,CAAC;IACjD,mBAAmB;IAIU,IAAI,EAAE,UAAU,CAAa;IAEpD,QAAQ,E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IAEpD,iBAAiB;IAoBjB,oBAAoB;IAKpB,OAAO,CAAC,mBAAmB;IAgD3B,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,qBAAqB;IAiD7B,OAAO,CAAC,iBAAiB;IAsEzB,OAAO,CAAC,gBAAgB;IA6IxB,OAAO,CAAC,eAAe;IA8BvB;;OAEG;IACH,IACI,IAAI,IAAI,OAAO,CAElB;IAED;;OAEG;IACH,IACI,cAAc,IAAI,MAAM,CAE3B;IAED;;OAEG;IACH,QAAQ,CAAC,IAAI,IAAI,IAAI;IAErB;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACI,OAAO;IAOd;;OAEG;IACI,WAAW,IAAI,IAAI;IAS1B;;;OAGG;IACH,OAAO,CAAC,QAAQ;IAoBhB;;;OAGG;IACI,SAAS,IAAI,IAAI;CAyBzB;AAED;;GAEG;AACH,qBAAa,MAAO,SAAQ,aAAa;IACvC,IAAI,IAAI,IAAI;CAIb;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAM3B,CAAC"}
|
|
@@ -86,16 +86,32 @@ export class DialogElement extends FoundationElement {
|
|
|
86
86
|
setupResizeHandlers() {
|
|
87
87
|
if (!this.resizable)
|
|
88
88
|
return;
|
|
89
|
+
// Get viewport dimensions
|
|
90
|
+
const viewportWidth = window.innerWidth;
|
|
91
|
+
const viewportHeight = window.innerHeight;
|
|
92
|
+
// Calculate effective initial dimensions, ensuring they don't exceed viewport
|
|
93
|
+
// and are at least the minimum values
|
|
94
|
+
let effectiveWidth = this.minWidth;
|
|
95
|
+
let effectiveHeight = this.minHeight;
|
|
96
|
+
if (this.initialWidth !== undefined) {
|
|
97
|
+
// Ensure initial width doesn't exceed viewport width and is at least minWidth
|
|
98
|
+
effectiveWidth = Math.max(this.minWidth, Math.min(this.initialWidth, viewportWidth));
|
|
99
|
+
}
|
|
100
|
+
if (this.initialHeight !== undefined) {
|
|
101
|
+
// Ensure initial height doesn't exceed viewport height and is at least minHeight
|
|
102
|
+
effectiveHeight = Math.max(this.minHeight, Math.min(this.initialHeight, viewportHeight));
|
|
103
|
+
}
|
|
89
104
|
// Store original dimensions and position for reset
|
|
90
|
-
this.originalWidth = this.mainElement.style.width || `${
|
|
91
|
-
this.originalHeight = this.mainElement.style.height || `${
|
|
105
|
+
this.originalWidth = this.mainElement.style.width || `${effectiveWidth}px`;
|
|
106
|
+
this.originalHeight = this.mainElement.style.height || `${effectiveHeight}px`;
|
|
92
107
|
this.originalPosition = this.mainElement.style.position || '';
|
|
93
108
|
this.originalLeft = this.mainElement.style.left || '';
|
|
94
109
|
this.originalTop = this.mainElement.style.top || '';
|
|
95
110
|
this.originalMargin = this.mainElement.style.margin || '';
|
|
96
|
-
|
|
111
|
+
// Set the dialog dimensions
|
|
112
|
+
this.mainElement.style.height = `${effectiveHeight}px`;
|
|
97
113
|
this.mainElement.style.minHeight = `${this.minHeight}px`;
|
|
98
|
-
this.mainElement.style.width = `${
|
|
114
|
+
this.mainElement.style.width = `${effectiveWidth}px`;
|
|
99
115
|
this.mainElement.style.minWidth = `${this.minWidth}px`;
|
|
100
116
|
// Update original values after setting initial size
|
|
101
117
|
this.originalWidth = this.mainElement.style.width;
|
|
@@ -478,6 +494,12 @@ __decorate([
|
|
|
478
494
|
__decorate([
|
|
479
495
|
attr({ attribute: 'min-height' })
|
|
480
496
|
], DialogElement.prototype, "minHeight", void 0);
|
|
497
|
+
__decorate([
|
|
498
|
+
attr({ attribute: 'initial-width' })
|
|
499
|
+
], DialogElement.prototype, "initialWidth", void 0);
|
|
500
|
+
__decorate([
|
|
501
|
+
attr({ attribute: 'initial-height' })
|
|
502
|
+
], DialogElement.prototype, "initialHeight", void 0);
|
|
481
503
|
__decorate([
|
|
482
504
|
observable
|
|
483
505
|
], DialogElement.prototype, "onShowCallback", void 0);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-ui",
|
|
3
3
|
"description": "Genesis Foundation UI",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.349.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@genesislcap/foundation-testing": "14.
|
|
87
|
-
"@genesislcap/genx": "14.
|
|
88
|
-
"@genesislcap/rollup-builder": "14.
|
|
89
|
-
"@genesislcap/ts-builder": "14.
|
|
90
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
91
|
-
"@genesislcap/vite-builder": "14.
|
|
92
|
-
"@genesislcap/webpack-builder": "14.
|
|
86
|
+
"@genesislcap/foundation-testing": "14.349.0",
|
|
87
|
+
"@genesislcap/genx": "14.349.0",
|
|
88
|
+
"@genesislcap/rollup-builder": "14.349.0",
|
|
89
|
+
"@genesislcap/ts-builder": "14.349.0",
|
|
90
|
+
"@genesislcap/uvu-playwright-builder": "14.349.0",
|
|
91
|
+
"@genesislcap/vite-builder": "14.349.0",
|
|
92
|
+
"@genesislcap/webpack-builder": "14.349.0",
|
|
93
93
|
"copyfiles": "^2.4.1"
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
@@ -98,15 +98,15 @@
|
|
|
98
98
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
99
99
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
100
100
|
"@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
|
|
101
|
-
"@genesislcap/expression-builder": "14.
|
|
102
|
-
"@genesislcap/foundation-comms": "14.
|
|
103
|
-
"@genesislcap/foundation-criteria": "14.
|
|
104
|
-
"@genesislcap/foundation-errors": "14.
|
|
105
|
-
"@genesislcap/foundation-events": "14.
|
|
106
|
-
"@genesislcap/foundation-logger": "14.
|
|
107
|
-
"@genesislcap/foundation-notifications": "14.
|
|
108
|
-
"@genesislcap/foundation-user": "14.
|
|
109
|
-
"@genesislcap/foundation-utils": "14.
|
|
101
|
+
"@genesislcap/expression-builder": "14.349.0",
|
|
102
|
+
"@genesislcap/foundation-comms": "14.349.0",
|
|
103
|
+
"@genesislcap/foundation-criteria": "14.349.0",
|
|
104
|
+
"@genesislcap/foundation-errors": "14.349.0",
|
|
105
|
+
"@genesislcap/foundation-events": "14.349.0",
|
|
106
|
+
"@genesislcap/foundation-logger": "14.349.0",
|
|
107
|
+
"@genesislcap/foundation-notifications": "14.349.0",
|
|
108
|
+
"@genesislcap/foundation-user": "14.349.0",
|
|
109
|
+
"@genesislcap/foundation-utils": "14.349.0",
|
|
110
110
|
"@microsoft/fast-colors": "5.3.1",
|
|
111
111
|
"@microsoft/fast-components": "2.30.6",
|
|
112
112
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"access": "public"
|
|
129
129
|
},
|
|
130
130
|
"customElements": "dist/custom-elements.json",
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "c3744b60b23bbca7f48211f925f23bcf1bc3ec8a"
|
|
132
132
|
}
|