@praxisui/dialog 9.0.7 → 9.0.9
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/README.md +2 -0
- package/ai/component-registry.json +2 -2
- package/fesm2022/praxisui-dialog.mjs +17 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -154,6 +154,8 @@ Component-specific dialog variables remain available for deliberate local custom
|
|
|
154
154
|
|
|
155
155
|
`PraxisDialog` configures dialog roles, backdrop behavior, Escape handling, focus restoration and `aria-*` fields. Use `ariaRole: 'alertdialog'` for destructive or blocking confirmations, and always provide a visible title or accessible label.
|
|
156
156
|
|
|
157
|
+
Overlay sizing is applied to the CDK pane and to the dialog panel. `width` and `height` therefore remain centered when constrained by `minWidth`, `maxWidth`, `minHeight` or `maxHeight` on narrow viewports; hosts should not add local overlay-positioning CSS for this behavior.
|
|
158
|
+
|
|
157
159
|
Closable dialogs with role `dialog` also expose an accessible close button in the title bar. It follows the same `disableClose` policy as Escape and backdrop interactions. The runtime does not add this shortcut to `alertdialog`, whose explicit governed actions remain the required decision path. Hosts that override `PRAXIS_DIALOG_I18N` may provide `close`; older providers remain compatible and fall back to their localized `cancel` label.
|
|
158
160
|
|
|
159
161
|
## Official Links
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-08-
|
|
3
|
+
"generatedAt": "2026-08-21T12:18:09.223Z",
|
|
4
4
|
"packageName": "@praxisui/dialog",
|
|
5
|
-
"packageVersion": "9.0.
|
|
5
|
+
"packageVersion": "9.0.9",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 1,
|
|
@@ -660,6 +660,7 @@ const PraxisDialogDirectives = [];
|
|
|
660
660
|
|
|
661
661
|
class DialogOverlayService {
|
|
662
662
|
overlay = inject(Overlay);
|
|
663
|
+
defaults = inject(PRAXIS_DIALOG_DEFAULTS);
|
|
663
664
|
createOverlay(cfg) {
|
|
664
665
|
const overlayConfig = this.buildOverlayConfig(cfg);
|
|
665
666
|
return this.overlay.create(overlayConfig);
|
|
@@ -709,6 +710,10 @@ class DialogOverlayService {
|
|
|
709
710
|
scrollStrategy,
|
|
710
711
|
width: coerceCssUnit(cfg?.width),
|
|
711
712
|
height: coerceCssUnit(cfg?.height),
|
|
713
|
+
minWidth: coerceCssUnit(cfg?.minWidth),
|
|
714
|
+
maxWidth: coerceCssUnit(cfg?.maxWidth ?? this.defaults.maxWidth),
|
|
715
|
+
minHeight: coerceCssUnit(cfg?.minHeight),
|
|
716
|
+
maxHeight: coerceCssUnit(cfg?.maxHeight ?? this.defaults.maxHeight),
|
|
712
717
|
});
|
|
713
718
|
if (cfg?.zIndex != null) {
|
|
714
719
|
overlayConfig.zIndex = cfg.zIndex;
|
|
@@ -1256,6 +1261,12 @@ function buildDialogConfig(payload, injector) {
|
|
|
1256
1261
|
injector,
|
|
1257
1262
|
};
|
|
1258
1263
|
}
|
|
1264
|
+
function resolveRuntimeInjector(context, fallback) {
|
|
1265
|
+
const candidate = context?.runtime?.injector;
|
|
1266
|
+
return candidate && typeof candidate.get === 'function'
|
|
1267
|
+
? candidate
|
|
1268
|
+
: fallback;
|
|
1269
|
+
}
|
|
1259
1270
|
function buildHostInputs(payload, context, options) {
|
|
1260
1271
|
return {
|
|
1261
1272
|
subtitle: options?.includeSubtitle === false ? undefined : payload.subtitle,
|
|
@@ -1428,12 +1439,15 @@ function providePraxisSurfaceGlobalActions() {
|
|
|
1428
1439
|
const injector = inject(Injector);
|
|
1429
1440
|
const materializer = inject(SurfaceOpenMaterializerService);
|
|
1430
1441
|
const logger = inject(LoggerService, { optional: true });
|
|
1431
|
-
const
|
|
1442
|
+
const defaultSurfaceDrawer = inject(SURFACE_DRAWER_BRIDGE, {
|
|
1432
1443
|
optional: true,
|
|
1433
1444
|
});
|
|
1434
1445
|
return {
|
|
1435
1446
|
open: async (payload, context) => {
|
|
1436
|
-
const
|
|
1447
|
+
const runtimeInjector = resolveRuntimeInjector(context, injector);
|
|
1448
|
+
const contextualMaterializer = runtimeInjector.get(SurfaceOpenMaterializerService, materializer);
|
|
1449
|
+
const surfaceDrawer = runtimeInjector.get(SURFACE_DRAWER_BRIDGE, defaultSurfaceDrawer);
|
|
1450
|
+
const materializedPayload = await contextualMaterializer.materialize(payload, context);
|
|
1437
1451
|
const focusOrigin = resolveRuntimeFocusOrigin(context);
|
|
1438
1452
|
if (materializedPayload.presentation === 'drawer') {
|
|
1439
1453
|
if (!surfaceDrawer) {
|
|
@@ -1490,7 +1504,7 @@ function providePraxisSurfaceGlobalActions() {
|
|
|
1490
1504
|
restoreRuntimeFocusOnClose(ref.closed$, focusOrigin);
|
|
1491
1505
|
return ref;
|
|
1492
1506
|
}
|
|
1493
|
-
const ref = dialog.open(PraxisSurfaceHostComponent, buildDialogConfig(materializedPayload,
|
|
1507
|
+
const ref = dialog.open(PraxisSurfaceHostComponent, buildDialogConfig(materializedPayload, runtimeInjector));
|
|
1494
1508
|
restoreRuntimeFocusOnClose(ref.afterClosed(), focusOrigin);
|
|
1495
1509
|
const resultSubject = new Subject();
|
|
1496
1510
|
let terminalOutcomeEmitted = false;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dialog",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.9",
|
|
4
4
|
"description": "Dialog helpers and components for Praxis UI with Angular Material integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
8
|
"@angular/cdk": "^21.0.0",
|
|
9
9
|
"@angular/forms": "^21.0.0",
|
|
10
|
-
"@praxisui/core": "^9.0.
|
|
10
|
+
"@praxisui/core": "^9.0.9",
|
|
11
11
|
"@angular/material": "^21.0.0",
|
|
12
12
|
"@angular/platform-browser": "^21.0.0",
|
|
13
13
|
"rxjs": "~7.8.0"
|