@frame-kit/ui-ng 0.1.17 → 0.1.18

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.
@@ -170,11 +170,11 @@ class DialogComponent {
170
170
  }
171
171
  }
172
172
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
173
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DialogComponent, isStandalone: true, selector: "fk-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, preventClose: { classPropertyName: "preventClose", publicName: "preventClose", isSignal: true, isRequired: false, transformFunction: null }, canClose: { classPropertyName: "canClose", publicName: "canClose", isSignal: true, isRequired: false, transformFunction: null }, fullscreenMobile: { classPropertyName: "fullscreenMobile", publicName: "fullscreenMobile", isSignal: true, isRequired: false, transformFunction: null }, flexBody: { classPropertyName: "flexBody", publicName: "flexBody", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange", beforeOpen: "beforeOpen", opened: "opened", beforeClose: "beforeClose", closed: "closed" }, host: { properties: { "class": "this.hostClass", "attr.id": "this.hostId" } }, queries: [{ propertyName: "customHeader", first: true, predicate: FkDialogHeaderDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n <div\n class=\"fk-dialog__panel\"\n [class.fk-dialog__animate-panel--scale-fade]=\"\n animation() === 'scale-fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--fade]=\"\n animation() === 'fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-up]=\"\n animation() === 'slide-up' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-down]=\"\n animation() === 'slide-down' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--scale-fade]=\"\n animation() === 'scale-fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--fade]=\"\n animation() === 'fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-up]=\"\n animation() === 'slide-up' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-down]=\"\n animation() === 'slide-down' && animatingOut()\n \"\n [class.fk-dialog__panel--sm]=\"size() === 'sm'\"\n [class.fk-dialog__panel--md]=\"size() === 'md'\"\n [class.fk-dialog__panel--lg]=\"size() === 'lg'\"\n [class.fk-dialog__panel--xl]=\"size() === 'xl'\"\n [class.fk-dialog__panel--fullscreen]=\"size() === 'fullscreen'\"\n [class.fk-dialog__panel--fullscreen-auto]=\"fullscreenMobile()\"\n [class.fk-dialog__panel--top]=\"position() === 'top'\"\n role=\"dialog\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [cdkTrapFocus]=\"modal()\"\n [cdkTrapFocusAutoCapture]=\"autoFocus()\"\n (animationend)=\"onExitAnimationDone()\"\n >\n @if (customHeader() || header() || closable()) {\n <div class=\"fk-dialog__header\">\n <ng-content select=\"[fkDialogHeader]\" />\n\n @if (!customHeader() && header()) {\n <span class=\"fk-dialog__title\" [id]=\"titleId\">{{ header() }}</span>\n }\n\n @if (closable()) {\n <button\n class=\"fk-dialog__close\"\n type=\"button\"\n aria-label=\"Close dialog\"\n (click)=\"close()\"\n >\n &times;\n </button>\n }\n </div>\n }\n\n <div class=\"fk-dialog__body\" [class.fk-dialog__body--flex]=\"flexBody()\">\n <ng-content />\n </div>\n\n <ng-content select=\"[libDialogFooter]\" />\n </div>\n}\n", styles: [":host{display:contents}.fk-dialog__panel{display:flex;flex-direction:column;background:var(--fk-dialog-panel-bg, var(--fk-color-surface, #ffffff));border:var(--fk-dialog-panel-border, none);border-radius:var(--fk-dialog-panel-border-radius, var(--fk-radius-lg, .75rem));box-shadow:var(--fk-dialog-panel-shadow, 0 8px 32px rgba(0, 0, 0, .12));max-height:var(--fk-dialog-panel-max-height, 85vh);width:calc(100vw - 2 * var(--fk-dialog-panel-margin, var(--fk-rhythm-4, 1rem)));overflow:clip}.fk-dialog__panel--sm{max-width:var(--fk-dialog-width-sm, 24rem)}.fk-dialog__panel--md{max-width:var(--fk-dialog-width-md, 32rem)}.fk-dialog__panel--lg{max-width:var(--fk-dialog-width-lg, 40rem)}.fk-dialog__panel--xl{max-width:var(--fk-dialog-width-xl, 52rem)}.fk-dialog__panel--fullscreen{max-width:none;max-height:none;width:100%;height:100%;border-radius:0}@media(max-width:47.999em){.fk-dialog__panel--fullscreen-auto{max-width:none;max-height:none;width:100%;height:100%;border-radius:0}}.fk-dialog__panel--top{align-self:flex-start}.fk-dialog__panel.fk-dialog__animate-panel--scale-fade{animation:fk-dialog-scale-fade-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--scale-fade{animation:fk-dialog-scale-fade-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--fade{animation:fk-dialog-fade-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--fade{animation:fk-dialog-fade-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--slide-up{animation:fk-dialog-slide-up-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--slide-up{animation:fk-dialog-slide-up-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--slide-down{animation:fk-dialog-slide-down-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--slide-down{animation:fk-dialog-slide-down-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__header{display:flex;align-items:center;justify-content:center;position:relative;padding:var(--fk-dialog-header-padding, var(--fk-rhythm-4, 1rem) var(--fk-dialog-header-padding-inline, var(--fk-rhythm-6, 1.5rem)));flex-shrink:0}.fk-dialog__title{font-family:var(--fk-dialog-title-font-family, var(--fk-font-family-display, var(--fk-font-family-base, sans-serif)));font-size:var(--fk-typography-h4-font-size, 1.125rem);font-weight:var(--fk-font-weight-semibold, 600);color:var(--fk-color-text, #1f2d3d);line-height:var(--fk-typography-h4-line-height, 1.25);padding-inline-end:var(--fk-rhythm-7, 2rem)}.fk-dialog__close{position:absolute;right:var(--fk-dialog-header-padding-inline, var(--fk-rhythm-6, 1.5rem));display:flex;align-items:center;justify-content:center;width:var(--fk-dialog-close-size, 2rem);height:var(--fk-dialog-close-size, 2rem);padding:0;border:none;border-radius:var(--fk-radius-sm, .25rem);background:transparent;color:var(--fk-dialog-close-color, var(--fk-color-muted, #8a98a8));font-size:var(--fk-font-size-xl, 1.25rem);line-height:1;cursor:pointer;transition:color .15s ease,background-color .15s ease}.fk-dialog__close:hover{color:var(--fk-dialog-close-color-hover, var(--fk-color-text, #1f2d3d));background-color:var(--fk-color-surface-muted, #f7f9fb)}.fk-dialog__close:focus-visible{outline:none;box-shadow:var(--fk-focus-ring, 0 0 0 3px rgba(10, 132, 255, .18))}.fk-dialog__body{flex:1;padding:var(--fk-dialog-body-padding, var(--fk-rhythm-6, 1.5rem));overflow-y:auto;overscroll-behavior:contain;container-type:inline-size}.fk-dialog__body--flex{display:flex;flex-direction:column;overflow:hidden}::ng-deep [libDialogFooter]{display:flex;align-items:center;justify-content:center;gap:var(--fk-dialog-footer-gap, .75rem);padding:var(--fk-dialog-footer-padding, var(--fk-rhythm-4, 1rem) var(--fk-rhythm-6, 1.5rem));border-top:var(--fk-dialog-footer-border, 1px solid var(--fk-color-border, #d9e2ee));flex-shrink:0}::ng-deep [libDialogFooter]>*{flex:1 1 0;min-width:0}::ng-deep [fkDialogActions]{display:flex;gap:var(--fk-dialog-actions-gap, var(--fk-rhythm-3, .75rem));margin-top:var(--fk-dialog-actions-margin-top, var(--fk-rhythm-5, 1.25rem))}::ng-deep [fkDialogActions]>*{flex:1 1 0;min-width:0}@container (max-width: 24rem){::ng-deep [fkDialogActions]{flex-direction:column-reverse}::ng-deep [fkDialogActions]>*{flex:none;width:100%}}@keyframes fk-dialog-scale-fade-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes fk-dialog-scale-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes fk-dialog-fade-in{0%{opacity:0}to{opacity:1}}@keyframes fk-dialog-fade-out{0%{opacity:1}to{opacity:0}}@keyframes fk-dialog-slide-up-in{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}@keyframes fk-dialog-slide-up-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(1rem)}}@keyframes fk-dialog-slide-down-in{0%{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}@keyframes fk-dialog-slide-down-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-1rem)}}@media(prefers-reduced-motion:reduce){.fk-dialog__animate-panel--scale-fade,.fk-dialog__animate-panel--fade,.fk-dialog__animate-panel--slide-up,.fk-dialog__animate-panel--slide-down,.fk-dialog__animate-panel-out--scale-fade,.fk-dialog__animate-panel-out--fade,.fk-dialog__animate-panel-out--slide-up,.fk-dialog__animate-panel-out--slide-down{animation:none}}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
173
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DialogComponent, isStandalone: true, selector: "fk-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, preventClose: { classPropertyName: "preventClose", publicName: "preventClose", isSignal: true, isRequired: false, transformFunction: null }, canClose: { classPropertyName: "canClose", publicName: "canClose", isSignal: true, isRequired: false, transformFunction: null }, fullscreenMobile: { classPropertyName: "fullscreenMobile", publicName: "fullscreenMobile", isSignal: true, isRequired: false, transformFunction: null }, flexBody: { classPropertyName: "flexBody", publicName: "flexBody", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange", beforeOpen: "beforeOpen", opened: "opened", beforeClose: "beforeClose", closed: "closed" }, host: { properties: { "class": "this.hostClass", "attr.id": "this.hostId" } }, queries: [{ propertyName: "customHeader", first: true, predicate: FkDialogHeaderDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n <div\n class=\"fk-dialog__panel\"\n [class.fk-dialog__animate-panel--scale-fade]=\"\n animation() === 'scale-fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--fade]=\"\n animation() === 'fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-up]=\"\n animation() === 'slide-up' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-down]=\"\n animation() === 'slide-down' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--scale-fade]=\"\n animation() === 'scale-fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--fade]=\"\n animation() === 'fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-up]=\"\n animation() === 'slide-up' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-down]=\"\n animation() === 'slide-down' && animatingOut()\n \"\n [class.fk-dialog__panel--sm]=\"size() === 'sm'\"\n [class.fk-dialog__panel--md]=\"size() === 'md'\"\n [class.fk-dialog__panel--lg]=\"size() === 'lg'\"\n [class.fk-dialog__panel--xl]=\"size() === 'xl'\"\n [class.fk-dialog__panel--fullscreen]=\"size() === 'fullscreen'\"\n [class.fk-dialog__panel--fullscreen-auto]=\"fullscreenMobile()\"\n [class.fk-dialog__panel--top]=\"position() === 'top'\"\n role=\"dialog\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [cdkTrapFocus]=\"modal()\"\n [cdkTrapFocusAutoCapture]=\"autoFocus()\"\n (animationend)=\"onExitAnimationDone()\"\n >\n @if (customHeader() || header() || closable()) {\n <div class=\"fk-dialog__header\">\n <ng-content select=\"[fkDialogHeader]\" />\n\n @if (!customHeader() && header()) {\n <span class=\"fk-dialog__title\" [id]=\"titleId\">{{ header() }}</span>\n }\n\n @if (closable()) {\n <button\n class=\"fk-dialog__close\"\n type=\"button\"\n aria-label=\"Close dialog\"\n (click)=\"close()\"\n >\n &times;\n </button>\n }\n </div>\n }\n\n <div class=\"fk-dialog__body\" [class.fk-dialog__body--flex]=\"flexBody()\">\n <ng-content />\n </div>\n\n <ng-content select=\"[libDialogFooter]\" />\n </div>\n}\n", styles: [":host{display:contents}.fk-dialog__panel{display:flex;flex-direction:column;background:var(--fk-dialog-panel-bg, var(--fk-color-surface, #ffffff));border:var(--fk-dialog-panel-border, none);border-radius:var(--fk-dialog-panel-border-radius, var(--fk-radius-lg, .75rem));box-shadow:var(--fk-dialog-panel-shadow, 0 8px 32px rgba(0, 0, 0, .12));max-height:var(--fk-dialog-panel-max-height, 85vh);width:calc(100vw - 2 * var(--fk-dialog-panel-margin, var(--fk-rhythm-4, 1rem)));overflow:clip}.fk-dialog__panel--sm{max-width:var(--fk-dialog-width-sm, 24rem)}.fk-dialog__panel--md{max-width:var(--fk-dialog-width-md, 32rem)}.fk-dialog__panel--lg{max-width:var(--fk-dialog-width-lg, 40rem)}.fk-dialog__panel--xl{max-width:var(--fk-dialog-width-xl, 52rem)}.fk-dialog__panel--fullscreen{max-width:none;max-height:none;width:100vw;height:100dvh;border-radius:0}@media(max-width:47.999em){.fk-dialog__panel--fullscreen-auto{max-width:none;max-height:none;width:100vw;height:100dvh;border-radius:0}}.fk-dialog__panel--top{align-self:flex-start}.fk-dialog__panel.fk-dialog__animate-panel--scale-fade{animation:fk-dialog-scale-fade-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--scale-fade{animation:fk-dialog-scale-fade-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--fade{animation:fk-dialog-fade-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--fade{animation:fk-dialog-fade-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--slide-up{animation:fk-dialog-slide-up-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--slide-up{animation:fk-dialog-slide-up-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--slide-down{animation:fk-dialog-slide-down-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--slide-down{animation:fk-dialog-slide-down-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__header{display:flex;align-items:center;justify-content:center;position:relative;padding:var(--fk-dialog-header-padding, var(--fk-rhythm-4, 1rem) var(--fk-dialog-header-padding-inline, var(--fk-rhythm-6, 1.5rem)));flex-shrink:0}.fk-dialog__title{font-family:var(--fk-dialog-title-font-family, var(--fk-font-family-display, var(--fk-font-family-base, sans-serif)));font-size:var(--fk-typography-h4-font-size, 1.125rem);font-weight:var(--fk-font-weight-semibold, 600);color:var(--fk-color-text, #1f2d3d);line-height:var(--fk-typography-h4-line-height, 1.25);padding-inline-end:var(--fk-rhythm-7, 2rem)}.fk-dialog__close{position:absolute;right:var(--fk-dialog-header-padding-inline, var(--fk-rhythm-6, 1.5rem));display:flex;align-items:center;justify-content:center;width:var(--fk-dialog-close-size, 2rem);height:var(--fk-dialog-close-size, 2rem);padding:0;border:none;border-radius:var(--fk-radius-sm, .25rem);background:transparent;color:var(--fk-dialog-close-color, var(--fk-color-muted, #8a98a8));font-size:var(--fk-font-size-xl, 1.25rem);line-height:1;cursor:pointer;transition:color .15s ease,background-color .15s ease}.fk-dialog__close:hover{color:var(--fk-dialog-close-color-hover, var(--fk-color-text, #1f2d3d));background-color:var(--fk-color-surface-muted, #f7f9fb)}.fk-dialog__close:focus-visible{outline:none;box-shadow:var(--fk-focus-ring, 0 0 0 3px rgba(10, 132, 255, .18))}.fk-dialog__body{flex:1;padding:var(--fk-dialog-body-padding, var(--fk-rhythm-6, 1.5rem));overflow-y:auto;overscroll-behavior:contain;container-type:inline-size}.fk-dialog__body--flex{display:flex;flex-direction:column;overflow:hidden}::ng-deep [libDialogFooter]{display:flex;align-items:center;justify-content:center;gap:var(--fk-dialog-footer-gap, .75rem);padding:var(--fk-dialog-footer-padding, var(--fk-rhythm-4, 1rem) var(--fk-rhythm-6, 1.5rem));border-top:var(--fk-dialog-footer-border, 1px solid var(--fk-color-border, #d9e2ee));flex-shrink:0}::ng-deep [libDialogFooter]>*{flex:1 1 0;min-width:0}::ng-deep [fkDialogActions]{display:flex;gap:var(--fk-dialog-actions-gap, var(--fk-rhythm-3, .75rem));margin-top:var(--fk-dialog-actions-margin-top, var(--fk-rhythm-5, 1.25rem))}::ng-deep [fkDialogActions]>*{flex:1 1 0;min-width:0}@container (max-width: 24rem){::ng-deep [fkDialogActions]{flex-direction:column-reverse}::ng-deep [fkDialogActions]>*{flex:none;width:100%}}@keyframes fk-dialog-scale-fade-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes fk-dialog-scale-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes fk-dialog-fade-in{0%{opacity:0}to{opacity:1}}@keyframes fk-dialog-fade-out{0%{opacity:1}to{opacity:0}}@keyframes fk-dialog-slide-up-in{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}@keyframes fk-dialog-slide-up-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(1rem)}}@keyframes fk-dialog-slide-down-in{0%{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}@keyframes fk-dialog-slide-down-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-1rem)}}@media(prefers-reduced-motion:reduce){.fk-dialog__animate-panel--scale-fade,.fk-dialog__animate-panel--fade,.fk-dialog__animate-panel--slide-up,.fk-dialog__animate-panel--slide-down,.fk-dialog__animate-panel-out--scale-fade,.fk-dialog__animate-panel-out--fade,.fk-dialog__animate-panel-out--slide-up,.fk-dialog__animate-panel-out--slide-down{animation:none}}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
174
174
  }
175
175
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogComponent, decorators: [{
176
176
  type: Component,
177
- args: [{ selector: 'fk-dialog', standalone: true, imports: [A11yModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (visible()) {\n <div\n class=\"fk-dialog__panel\"\n [class.fk-dialog__animate-panel--scale-fade]=\"\n animation() === 'scale-fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--fade]=\"\n animation() === 'fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-up]=\"\n animation() === 'slide-up' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-down]=\"\n animation() === 'slide-down' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--scale-fade]=\"\n animation() === 'scale-fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--fade]=\"\n animation() === 'fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-up]=\"\n animation() === 'slide-up' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-down]=\"\n animation() === 'slide-down' && animatingOut()\n \"\n [class.fk-dialog__panel--sm]=\"size() === 'sm'\"\n [class.fk-dialog__panel--md]=\"size() === 'md'\"\n [class.fk-dialog__panel--lg]=\"size() === 'lg'\"\n [class.fk-dialog__panel--xl]=\"size() === 'xl'\"\n [class.fk-dialog__panel--fullscreen]=\"size() === 'fullscreen'\"\n [class.fk-dialog__panel--fullscreen-auto]=\"fullscreenMobile()\"\n [class.fk-dialog__panel--top]=\"position() === 'top'\"\n role=\"dialog\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [cdkTrapFocus]=\"modal()\"\n [cdkTrapFocusAutoCapture]=\"autoFocus()\"\n (animationend)=\"onExitAnimationDone()\"\n >\n @if (customHeader() || header() || closable()) {\n <div class=\"fk-dialog__header\">\n <ng-content select=\"[fkDialogHeader]\" />\n\n @if (!customHeader() && header()) {\n <span class=\"fk-dialog__title\" [id]=\"titleId\">{{ header() }}</span>\n }\n\n @if (closable()) {\n <button\n class=\"fk-dialog__close\"\n type=\"button\"\n aria-label=\"Close dialog\"\n (click)=\"close()\"\n >\n &times;\n </button>\n }\n </div>\n }\n\n <div class=\"fk-dialog__body\" [class.fk-dialog__body--flex]=\"flexBody()\">\n <ng-content />\n </div>\n\n <ng-content select=\"[libDialogFooter]\" />\n </div>\n}\n", styles: [":host{display:contents}.fk-dialog__panel{display:flex;flex-direction:column;background:var(--fk-dialog-panel-bg, var(--fk-color-surface, #ffffff));border:var(--fk-dialog-panel-border, none);border-radius:var(--fk-dialog-panel-border-radius, var(--fk-radius-lg, .75rem));box-shadow:var(--fk-dialog-panel-shadow, 0 8px 32px rgba(0, 0, 0, .12));max-height:var(--fk-dialog-panel-max-height, 85vh);width:calc(100vw - 2 * var(--fk-dialog-panel-margin, var(--fk-rhythm-4, 1rem)));overflow:clip}.fk-dialog__panel--sm{max-width:var(--fk-dialog-width-sm, 24rem)}.fk-dialog__panel--md{max-width:var(--fk-dialog-width-md, 32rem)}.fk-dialog__panel--lg{max-width:var(--fk-dialog-width-lg, 40rem)}.fk-dialog__panel--xl{max-width:var(--fk-dialog-width-xl, 52rem)}.fk-dialog__panel--fullscreen{max-width:none;max-height:none;width:100%;height:100%;border-radius:0}@media(max-width:47.999em){.fk-dialog__panel--fullscreen-auto{max-width:none;max-height:none;width:100%;height:100%;border-radius:0}}.fk-dialog__panel--top{align-self:flex-start}.fk-dialog__panel.fk-dialog__animate-panel--scale-fade{animation:fk-dialog-scale-fade-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--scale-fade{animation:fk-dialog-scale-fade-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--fade{animation:fk-dialog-fade-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--fade{animation:fk-dialog-fade-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--slide-up{animation:fk-dialog-slide-up-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--slide-up{animation:fk-dialog-slide-up-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--slide-down{animation:fk-dialog-slide-down-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--slide-down{animation:fk-dialog-slide-down-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__header{display:flex;align-items:center;justify-content:center;position:relative;padding:var(--fk-dialog-header-padding, var(--fk-rhythm-4, 1rem) var(--fk-dialog-header-padding-inline, var(--fk-rhythm-6, 1.5rem)));flex-shrink:0}.fk-dialog__title{font-family:var(--fk-dialog-title-font-family, var(--fk-font-family-display, var(--fk-font-family-base, sans-serif)));font-size:var(--fk-typography-h4-font-size, 1.125rem);font-weight:var(--fk-font-weight-semibold, 600);color:var(--fk-color-text, #1f2d3d);line-height:var(--fk-typography-h4-line-height, 1.25);padding-inline-end:var(--fk-rhythm-7, 2rem)}.fk-dialog__close{position:absolute;right:var(--fk-dialog-header-padding-inline, var(--fk-rhythm-6, 1.5rem));display:flex;align-items:center;justify-content:center;width:var(--fk-dialog-close-size, 2rem);height:var(--fk-dialog-close-size, 2rem);padding:0;border:none;border-radius:var(--fk-radius-sm, .25rem);background:transparent;color:var(--fk-dialog-close-color, var(--fk-color-muted, #8a98a8));font-size:var(--fk-font-size-xl, 1.25rem);line-height:1;cursor:pointer;transition:color .15s ease,background-color .15s ease}.fk-dialog__close:hover{color:var(--fk-dialog-close-color-hover, var(--fk-color-text, #1f2d3d));background-color:var(--fk-color-surface-muted, #f7f9fb)}.fk-dialog__close:focus-visible{outline:none;box-shadow:var(--fk-focus-ring, 0 0 0 3px rgba(10, 132, 255, .18))}.fk-dialog__body{flex:1;padding:var(--fk-dialog-body-padding, var(--fk-rhythm-6, 1.5rem));overflow-y:auto;overscroll-behavior:contain;container-type:inline-size}.fk-dialog__body--flex{display:flex;flex-direction:column;overflow:hidden}::ng-deep [libDialogFooter]{display:flex;align-items:center;justify-content:center;gap:var(--fk-dialog-footer-gap, .75rem);padding:var(--fk-dialog-footer-padding, var(--fk-rhythm-4, 1rem) var(--fk-rhythm-6, 1.5rem));border-top:var(--fk-dialog-footer-border, 1px solid var(--fk-color-border, #d9e2ee));flex-shrink:0}::ng-deep [libDialogFooter]>*{flex:1 1 0;min-width:0}::ng-deep [fkDialogActions]{display:flex;gap:var(--fk-dialog-actions-gap, var(--fk-rhythm-3, .75rem));margin-top:var(--fk-dialog-actions-margin-top, var(--fk-rhythm-5, 1.25rem))}::ng-deep [fkDialogActions]>*{flex:1 1 0;min-width:0}@container (max-width: 24rem){::ng-deep [fkDialogActions]{flex-direction:column-reverse}::ng-deep [fkDialogActions]>*{flex:none;width:100%}}@keyframes fk-dialog-scale-fade-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes fk-dialog-scale-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes fk-dialog-fade-in{0%{opacity:0}to{opacity:1}}@keyframes fk-dialog-fade-out{0%{opacity:1}to{opacity:0}}@keyframes fk-dialog-slide-up-in{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}@keyframes fk-dialog-slide-up-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(1rem)}}@keyframes fk-dialog-slide-down-in{0%{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}@keyframes fk-dialog-slide-down-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-1rem)}}@media(prefers-reduced-motion:reduce){.fk-dialog__animate-panel--scale-fade,.fk-dialog__animate-panel--fade,.fk-dialog__animate-panel--slide-up,.fk-dialog__animate-panel--slide-down,.fk-dialog__animate-panel-out--scale-fade,.fk-dialog__animate-panel-out--fade,.fk-dialog__animate-panel-out--slide-up,.fk-dialog__animate-panel-out--slide-down{animation:none}}\n"] }]
177
+ args: [{ selector: 'fk-dialog', standalone: true, imports: [A11yModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (visible()) {\n <div\n class=\"fk-dialog__panel\"\n [class.fk-dialog__animate-panel--scale-fade]=\"\n animation() === 'scale-fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--fade]=\"\n animation() === 'fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-up]=\"\n animation() === 'slide-up' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-down]=\"\n animation() === 'slide-down' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--scale-fade]=\"\n animation() === 'scale-fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--fade]=\"\n animation() === 'fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-up]=\"\n animation() === 'slide-up' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-down]=\"\n animation() === 'slide-down' && animatingOut()\n \"\n [class.fk-dialog__panel--sm]=\"size() === 'sm'\"\n [class.fk-dialog__panel--md]=\"size() === 'md'\"\n [class.fk-dialog__panel--lg]=\"size() === 'lg'\"\n [class.fk-dialog__panel--xl]=\"size() === 'xl'\"\n [class.fk-dialog__panel--fullscreen]=\"size() === 'fullscreen'\"\n [class.fk-dialog__panel--fullscreen-auto]=\"fullscreenMobile()\"\n [class.fk-dialog__panel--top]=\"position() === 'top'\"\n role=\"dialog\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [cdkTrapFocus]=\"modal()\"\n [cdkTrapFocusAutoCapture]=\"autoFocus()\"\n (animationend)=\"onExitAnimationDone()\"\n >\n @if (customHeader() || header() || closable()) {\n <div class=\"fk-dialog__header\">\n <ng-content select=\"[fkDialogHeader]\" />\n\n @if (!customHeader() && header()) {\n <span class=\"fk-dialog__title\" [id]=\"titleId\">{{ header() }}</span>\n }\n\n @if (closable()) {\n <button\n class=\"fk-dialog__close\"\n type=\"button\"\n aria-label=\"Close dialog\"\n (click)=\"close()\"\n >\n &times;\n </button>\n }\n </div>\n }\n\n <div class=\"fk-dialog__body\" [class.fk-dialog__body--flex]=\"flexBody()\">\n <ng-content />\n </div>\n\n <ng-content select=\"[libDialogFooter]\" />\n </div>\n}\n", styles: [":host{display:contents}.fk-dialog__panel{display:flex;flex-direction:column;background:var(--fk-dialog-panel-bg, var(--fk-color-surface, #ffffff));border:var(--fk-dialog-panel-border, none);border-radius:var(--fk-dialog-panel-border-radius, var(--fk-radius-lg, .75rem));box-shadow:var(--fk-dialog-panel-shadow, 0 8px 32px rgba(0, 0, 0, .12));max-height:var(--fk-dialog-panel-max-height, 85vh);width:calc(100vw - 2 * var(--fk-dialog-panel-margin, var(--fk-rhythm-4, 1rem)));overflow:clip}.fk-dialog__panel--sm{max-width:var(--fk-dialog-width-sm, 24rem)}.fk-dialog__panel--md{max-width:var(--fk-dialog-width-md, 32rem)}.fk-dialog__panel--lg{max-width:var(--fk-dialog-width-lg, 40rem)}.fk-dialog__panel--xl{max-width:var(--fk-dialog-width-xl, 52rem)}.fk-dialog__panel--fullscreen{max-width:none;max-height:none;width:100vw;height:100dvh;border-radius:0}@media(max-width:47.999em){.fk-dialog__panel--fullscreen-auto{max-width:none;max-height:none;width:100vw;height:100dvh;border-radius:0}}.fk-dialog__panel--top{align-self:flex-start}.fk-dialog__panel.fk-dialog__animate-panel--scale-fade{animation:fk-dialog-scale-fade-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--scale-fade{animation:fk-dialog-scale-fade-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--fade{animation:fk-dialog-fade-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--fade{animation:fk-dialog-fade-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--slide-up{animation:fk-dialog-slide-up-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--slide-up{animation:fk-dialog-slide-up-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel--slide-down{animation:fk-dialog-slide-down-in .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__panel.fk-dialog__animate-panel-out--slide-down{animation:fk-dialog-slide-down-out .2s cubic-bezier(.4,0,.2,1) both}.fk-dialog__header{display:flex;align-items:center;justify-content:center;position:relative;padding:var(--fk-dialog-header-padding, var(--fk-rhythm-4, 1rem) var(--fk-dialog-header-padding-inline, var(--fk-rhythm-6, 1.5rem)));flex-shrink:0}.fk-dialog__title{font-family:var(--fk-dialog-title-font-family, var(--fk-font-family-display, var(--fk-font-family-base, sans-serif)));font-size:var(--fk-typography-h4-font-size, 1.125rem);font-weight:var(--fk-font-weight-semibold, 600);color:var(--fk-color-text, #1f2d3d);line-height:var(--fk-typography-h4-line-height, 1.25);padding-inline-end:var(--fk-rhythm-7, 2rem)}.fk-dialog__close{position:absolute;right:var(--fk-dialog-header-padding-inline, var(--fk-rhythm-6, 1.5rem));display:flex;align-items:center;justify-content:center;width:var(--fk-dialog-close-size, 2rem);height:var(--fk-dialog-close-size, 2rem);padding:0;border:none;border-radius:var(--fk-radius-sm, .25rem);background:transparent;color:var(--fk-dialog-close-color, var(--fk-color-muted, #8a98a8));font-size:var(--fk-font-size-xl, 1.25rem);line-height:1;cursor:pointer;transition:color .15s ease,background-color .15s ease}.fk-dialog__close:hover{color:var(--fk-dialog-close-color-hover, var(--fk-color-text, #1f2d3d));background-color:var(--fk-color-surface-muted, #f7f9fb)}.fk-dialog__close:focus-visible{outline:none;box-shadow:var(--fk-focus-ring, 0 0 0 3px rgba(10, 132, 255, .18))}.fk-dialog__body{flex:1;padding:var(--fk-dialog-body-padding, var(--fk-rhythm-6, 1.5rem));overflow-y:auto;overscroll-behavior:contain;container-type:inline-size}.fk-dialog__body--flex{display:flex;flex-direction:column;overflow:hidden}::ng-deep [libDialogFooter]{display:flex;align-items:center;justify-content:center;gap:var(--fk-dialog-footer-gap, .75rem);padding:var(--fk-dialog-footer-padding, var(--fk-rhythm-4, 1rem) var(--fk-rhythm-6, 1.5rem));border-top:var(--fk-dialog-footer-border, 1px solid var(--fk-color-border, #d9e2ee));flex-shrink:0}::ng-deep [libDialogFooter]>*{flex:1 1 0;min-width:0}::ng-deep [fkDialogActions]{display:flex;gap:var(--fk-dialog-actions-gap, var(--fk-rhythm-3, .75rem));margin-top:var(--fk-dialog-actions-margin-top, var(--fk-rhythm-5, 1.25rem))}::ng-deep [fkDialogActions]>*{flex:1 1 0;min-width:0}@container (max-width: 24rem){::ng-deep [fkDialogActions]{flex-direction:column-reverse}::ng-deep [fkDialogActions]>*{flex:none;width:100%}}@keyframes fk-dialog-scale-fade-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes fk-dialog-scale-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes fk-dialog-fade-in{0%{opacity:0}to{opacity:1}}@keyframes fk-dialog-fade-out{0%{opacity:1}to{opacity:0}}@keyframes fk-dialog-slide-up-in{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}@keyframes fk-dialog-slide-up-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(1rem)}}@keyframes fk-dialog-slide-down-in{0%{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}@keyframes fk-dialog-slide-down-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-1rem)}}@media(prefers-reduced-motion:reduce){.fk-dialog__animate-panel--scale-fade,.fk-dialog__animate-panel--fade,.fk-dialog__animate-panel--slide-up,.fk-dialog__animate-panel--slide-down,.fk-dialog__animate-panel-out--scale-fade,.fk-dialog__animate-panel-out--fade,.fk-dialog__animate-panel-out--slide-up,.fk-dialog__animate-panel-out--slide-down{animation:none}}\n"] }]
178
178
  }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], restoreFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreFocus", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "animation", required: false }] }], preventClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventClose", required: false }] }], canClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "canClose", required: false }] }], fullscreenMobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullscreenMobile", required: false }] }], flexBody: [{ type: i0.Input, args: [{ isSignal: true, alias: "flexBody", required: false }] }], customHeader: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FkDialogHeaderDirective), { isSignal: true }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], openChange: [{ type: i0.Output, args: ["openChange"] }], beforeOpen: [{ type: i0.Output, args: ["beforeOpen"] }], opened: [{ type: i0.Output, args: ["opened"] }], beforeClose: [{ type: i0.Output, args: ["beforeClose"] }], closed: [{ type: i0.Output, args: ["closed"] }], hostClass: [{
179
179
  type: HostBinding,
180
180
  args: ['class']
@@ -207,15 +207,41 @@ class DialogRef {
207
207
  afterOpenedSubject = new Subject();
208
208
  beforeCloseSubject = new Subject();
209
209
  afterClosedSubject = new Subject();
210
+ sizeSignal;
210
211
  closed = false;
211
212
  closeGuard = null;
213
+ sizeUpdater = null;
212
214
  config;
215
+ /**
216
+ * The dialog's current panel size. Starts at the opening config's size
217
+ * and tracks every `updateSize` call — chrome components (e.g. an
218
+ * expand/collapse toggle) can render their state from it.
219
+ */
220
+ size;
213
221
  constructor(config = {}) {
214
222
  this.config = config;
223
+ this.sizeSignal = signal(config.size ?? 'md', ...(ngDevMode ? [{ debugName: "sizeSignal" }] : /* istanbul ignore next */ []));
224
+ this.size = this.sizeSignal.asReadonly();
215
225
  if (config.canClose) {
216
226
  this.closeGuard = config.canClose;
217
227
  }
218
228
  }
229
+ /**
230
+ * Resize the open dialog in place — e.g. toggle between the opened
231
+ * size and `"fullscreen"` from an expand button in custom chrome. The
232
+ * panel transitions its size classes reactively; no reopen needed.
233
+ */
234
+ updateSize(size) {
235
+ this.sizeSignal.set(size);
236
+ this.sizeUpdater?.(size);
237
+ }
238
+ /**
239
+ * @internal Wired by DialogService after the host is created so
240
+ * `updateSize` can reach the host component's `size` input.
241
+ */
242
+ bindSizeUpdater(updater) {
243
+ this.sizeUpdater = updater;
244
+ }
219
245
  get data() {
220
246
  return this.config.data;
221
247
  }
@@ -333,6 +359,11 @@ class DialogService {
333
359
  };
334
360
  this.activeDialogs.push(entry);
335
361
  this.applyConfig(hostRef, mergedConfig);
362
+ // Let ref.updateSize() reach the live host — `size` is a reactive
363
+ // input, so the panel restyles in place without reopening.
364
+ dialogRef.bindSizeUpdater((size) => {
365
+ hostRef.setInput('size', size);
366
+ });
336
367
  // CDK dispatches these to the top overlay only, so Escape / an outside
337
368
  // press dismisses the topmost dialog. `dialogRef.close()` runs the
338
369
  // preventClose + canClose guards.
@@ -1 +1 @@
1
- {"version":3,"file":"frame-kit-ui-ng-ui-dialog.mjs","sources":["../../../../packages/ui-ng/ui/dialog/dialog-header.directive.ts","../../../../packages/ui-ng/ui/dialog/dialog.component.ts","../../../../packages/ui-ng/ui/dialog/dialog.component.html","../../../../packages/ui-ng/ui/dialog/dialog.config.ts","../../../../packages/ui-ng/ui/dialog/dialog-ref.ts","../../../../packages/ui-ng/ui/dialog/dialog.service.ts","../../../../packages/ui-ng/ui/dialog/dialog-actions.directive.ts","../../../../packages/ui-ng/ui/dialog/frame-kit-ui-ng-ui-dialog.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[fkDialogHeader]',\n standalone: true,\n})\nexport class FkDialogHeaderDirective {}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n HostBinding,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport type {\n CanCloseFn,\n DialogAnimation,\n DialogPosition,\n DialogSize,\n} from './dialog.types';\nimport { FkDialogHeaderDirective } from './dialog-header.directive';\n\nlet nextDialogId = 0;\n\n/**\n * Dialog panel chrome.\n *\n * Hosted inside a CDK overlay by `DialogService`, so the overlay layer owns\n * the backdrop, scroll blocking, positioning, stacking, and Escape / outside\n * dispatch. This component renders the panel itself: header / body / footer\n * projection, sizing, the enter animation, focus trapping, and the close\n * guard.\n */\n@Component({\n selector: 'fk-dialog',\n standalone: true,\n imports: [A11yModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './dialog.component.html',\n styleUrl: './dialog.component.scss',\n})\nexport class DialogComponent {\n // ===== INPUTS =====\n /** Controls whether the dialog is open. */\n readonly open = input(false);\n /** When true, marks the panel `aria-modal` and traps focus. */\n readonly modal = input(true);\n /** When true, shows the close button in the dialog header. */\n readonly closable = input(true);\n /** Size variant that controls the dialog's max-width. */\n readonly size = input<DialogSize>('md');\n /** Where the dialog is anchored on screen. */\n readonly position = input<DialogPosition>('center');\n /** Optional title text rendered in the dialog header and used for `aria-labelledby`. */\n readonly header = input<string | null>(null);\n /** When true, focus returns to the previously focused element when the dialog closes. */\n readonly restoreFocus = input(true);\n /** When true, CDK auto-focus is applied when the dialog opens. */\n readonly autoFocus = input(true);\n /** Entry/exit animation applied to the dialog panel. */\n readonly animation = input<DialogAnimation>('scale-fade');\n /** When true, all close mechanisms (Escape, backdrop, button) are blocked. */\n readonly preventClose = input(false);\n /** Async guard function called before closing; return false to cancel the close. */\n readonly canClose = input<CanCloseFn | null>(null);\n /** When true, the dialog expands to full-screen on mobile viewports. */\n readonly fullscreenMobile = input(false);\n /** When true, the dialog body uses a flex column layout. */\n readonly flexBody = input(false);\n\n // ===== CONTENT CHILDREN =====\n readonly customHeader = contentChild(FkDialogHeaderDirective);\n\n // ===== BASE PROPS =====\n readonly className = input<string>('');\n readonly id = input<string | null>(null);\n readonly ariaLabel = input<string | null>(null);\n readonly ariaDescribedBy = input<string | null>(null);\n\n // ===== OUTPUTS =====\n /** Fires when the dialog's open state should change, emitting the new boolean. */\n readonly openChange = output<boolean>();\n /** Fires immediately before the dialog begins its open animation. */\n readonly beforeOpen = output<void>();\n /** Fires after the dialog is fully open and visible. */\n readonly opened = output<void>();\n /** Fires immediately before the dialog begins its close animation. */\n readonly beforeClose = output<void>();\n /** Fires after the dialog is fully closed. */\n readonly closed = output<void>();\n\n // ===== INTERNAL STATE =====\n private readonly doc = inject(DOCUMENT);\n readonly titleId = `fk-dialog-title-${nextDialogId++}`;\n private previouslyFocusedElement: HTMLElement | null = null;\n private closeGuardRunning = false;\n\n /** Whether the dialog DOM is rendered (stays true during exit animation). */\n readonly visible = signal(false);\n\n /** Whether the dialog is animating out. */\n readonly animatingOut = signal(false);\n\n // ===== COMPUTED =====\n readonly classes = computed(() => {\n return ['fk-dialog', this.className()].filter(Boolean).join(' ');\n });\n\n readonly ariaLabelledBy = computed(() => {\n if (this.ariaLabel()) {\n return null;\n }\n\n return this.header() ? this.titleId : null;\n });\n\n constructor() {\n effect(() => {\n const isOpen = this.open();\n\n if (isOpen) {\n this.onDialogOpen();\n } else {\n this.onDialogClose();\n }\n });\n }\n\n @HostBinding('class')\n get hostClass() {\n return this.classes();\n }\n\n @HostBinding('attr.id')\n get hostId() {\n return this.id();\n }\n\n // ===== ACTIONS =====\n /** Closes the dialog, running any `canClose` guard first; no-ops when `preventClose` is true. */\n async close() {\n if (this.closeGuardRunning) {\n return;\n }\n\n if (this.preventClose()) {\n return;\n }\n\n const guard = this.canClose();\n\n if (guard) {\n this.closeGuardRunning = true;\n\n try {\n const allowed = await Promise.resolve(guard());\n\n if (!allowed) {\n return;\n }\n } finally {\n this.closeGuardRunning = false;\n }\n }\n\n this.beforeClose.emit();\n this.openChange.emit(false);\n this.closed.emit();\n }\n\n /** Called when the panel exit animation finishes. */\n onExitAnimationDone() {\n if (this.animatingOut()) {\n this.animatingOut.set(false);\n this.visible.set(false);\n }\n }\n\n // ===== LIFECYCLE =====\n private onDialogOpen() {\n this.previouslyFocusedElement =\n (this.doc.activeElement as HTMLElement) ?? null;\n\n this.beforeOpen.emit();\n this.animatingOut.set(false);\n this.visible.set(true);\n this.opened.emit();\n }\n\n private onDialogClose() {\n if (this.visible()) {\n if (this.animation() !== 'none') {\n this.animatingOut.set(true);\n } else {\n this.visible.set(false);\n }\n }\n\n if (this.restoreFocus() && this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus();\n this.previouslyFocusedElement = null;\n }\n }\n}\n","@if (visible()) {\n <div\n class=\"fk-dialog__panel\"\n [class.fk-dialog__animate-panel--scale-fade]=\"\n animation() === 'scale-fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--fade]=\"\n animation() === 'fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-up]=\"\n animation() === 'slide-up' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-down]=\"\n animation() === 'slide-down' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--scale-fade]=\"\n animation() === 'scale-fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--fade]=\"\n animation() === 'fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-up]=\"\n animation() === 'slide-up' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-down]=\"\n animation() === 'slide-down' && animatingOut()\n \"\n [class.fk-dialog__panel--sm]=\"size() === 'sm'\"\n [class.fk-dialog__panel--md]=\"size() === 'md'\"\n [class.fk-dialog__panel--lg]=\"size() === 'lg'\"\n [class.fk-dialog__panel--xl]=\"size() === 'xl'\"\n [class.fk-dialog__panel--fullscreen]=\"size() === 'fullscreen'\"\n [class.fk-dialog__panel--fullscreen-auto]=\"fullscreenMobile()\"\n [class.fk-dialog__panel--top]=\"position() === 'top'\"\n role=\"dialog\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [cdkTrapFocus]=\"modal()\"\n [cdkTrapFocusAutoCapture]=\"autoFocus()\"\n (animationend)=\"onExitAnimationDone()\"\n >\n @if (customHeader() || header() || closable()) {\n <div class=\"fk-dialog__header\">\n <ng-content select=\"[fkDialogHeader]\" />\n\n @if (!customHeader() && header()) {\n <span class=\"fk-dialog__title\" [id]=\"titleId\">{{ header() }}</span>\n }\n\n @if (closable()) {\n <button\n class=\"fk-dialog__close\"\n type=\"button\"\n aria-label=\"Close dialog\"\n (click)=\"close()\"\n >\n &times;\n </button>\n }\n </div>\n }\n\n <div class=\"fk-dialog__body\" [class.fk-dialog__body--flex]=\"flexBody()\">\n <ng-content />\n </div>\n\n <ng-content select=\"[libDialogFooter]\" />\n </div>\n}\n","import type {\n CanCloseFn,\n DialogAnimation,\n DialogPosition,\n DialogSize,\n} from './dialog.types';\n\nexport interface DialogConfig<TData = unknown> {\n modal?: boolean;\n closable?: boolean;\n closeOnEscape?: boolean;\n closeOnBackdrop?: boolean;\n size?: DialogSize;\n position?: DialogPosition;\n animation?: DialogAnimation;\n header?: string | null;\n restoreFocus?: boolean;\n autoFocus?: boolean;\n preventClose?: boolean;\n canClose?: CanCloseFn;\n fullscreenMobile?: boolean;\n flexBody?: boolean;\n className?: string;\n ariaLabel?: string | null;\n ariaDescribedBy?: string | null;\n data?: TData;\n}\n\nexport const DEFAULT_DIALOG_CONFIG: DialogConfig = {\n modal: true,\n closable: true,\n closeOnEscape: true,\n closeOnBackdrop: false,\n size: 'md',\n position: 'center',\n animation: 'scale-fade',\n header: null,\n restoreFocus: true,\n autoFocus: true,\n preventClose: false,\n fullscreenMobile: false,\n flexBody: false,\n className: '',\n ariaLabel: null,\n ariaDescribedBy: null,\n};\n","import { Observable, Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport type { DialogConfig } from './dialog.config';\nimport type { CanCloseFn } from './dialog.types';\n\nexport class DialogRef<TResult = unknown, TData = unknown> {\n private readonly beforeOpenSubject = new Subject<void>();\n private readonly afterOpenedSubject = new Subject<void>();\n private readonly beforeCloseSubject = new Subject<void>();\n private readonly afterClosedSubject = new Subject<TResult | undefined>();\n private closed = false;\n private closeGuard: CanCloseFn | null = null;\n\n readonly config: DialogConfig<TData>;\n\n constructor(config: DialogConfig<TData> = {} as DialogConfig<TData>) {\n this.config = config;\n\n if (config.canClose) {\n this.closeGuard = config.canClose;\n }\n }\n\n get data(): TData | undefined {\n return this.config.data;\n }\n\n setCanClose(guard: CanCloseFn | null) {\n this.closeGuard = guard;\n }\n\n async close(result?: TResult) {\n if (this.closed) {\n return;\n }\n\n if (this.config.preventClose) {\n return;\n }\n\n if (this.closeGuard) {\n const allowed = await Promise.resolve(this.closeGuard());\n\n if (!allowed) {\n return;\n }\n }\n\n this.beforeCloseSubject.next();\n this.beforeCloseSubject.complete();\n\n this.closed = true;\n this.afterClosedSubject.next(result);\n this.afterClosedSubject.complete();\n }\n\n beforeOpen(): Observable<void> {\n return this.beforeOpenSubject.asObservable().pipe(take(1));\n }\n\n afterOpened(): Observable<void> {\n return this.afterOpenedSubject.asObservable().pipe(take(1));\n }\n\n beforeClose(): Observable<void> {\n return this.beforeCloseSubject.asObservable().pipe(take(1));\n }\n\n afterClosed(): Observable<TResult | undefined> {\n return this.afterClosedSubject.asObservable().pipe(take(1));\n }\n\n /** @internal */\n markBeforeOpen() {\n this.beforeOpenSubject.next();\n this.beforeOpenSubject.complete();\n }\n\n /** @internal */\n markOpened() {\n this.afterOpenedSubject.next();\n this.afterOpenedSubject.complete();\n }\n}\n","import { ESCAPE } from '@angular/cdk/keycodes';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ApplicationRef,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n Injector,\n Type,\n} from '@angular/core';\n\nimport { DialogComponent } from './dialog.component';\nimport { DEFAULT_DIALOG_CONFIG, DialogConfig } from './dialog.config';\nimport { DialogRef } from './dialog-ref';\n\nexport const DIALOG_DATA = Symbol('DIALOG_DATA');\nexport const DIALOG_REF = Symbol('DIALOG_REF');\n\ninterface DialogEntry {\n ref: DialogRef;\n overlayRef: OverlayRef;\n hostRef: ComponentRef<DialogComponent>;\n contentRef: ComponentRef<unknown>;\n}\n\n/**\n * Opens dialogs as CDK overlays.\n *\n * CDK owns the cross-cutting overlay concerns — backdrop, scroll blocking,\n * centered positioning, z-index stacking (overlays layer by open order), and\n * top-of-stack dispatch of Escape / outside clicks. The `DialogComponent` it\n * hosts is just the panel chrome (header / body / footer, sizing, enter\n * animation, focus trap). There is no global \"opening X closes lower overlays\"\n * rule: a dialog opened over a drawer stacks on top of it, and Escape / an\n * outside press dismisses whichever overlay is on top.\n */\n@Injectable({ providedIn: 'root' })\nexport class DialogService {\n private readonly overlay = inject(Overlay);\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n private readonly doc = inject(DOCUMENT);\n\n private activeDialogs: DialogEntry[] = [];\n\n get openCount(): number {\n return this.activeDialogs.length;\n }\n\n open<TResult = unknown, TData = unknown>(\n content: Type<unknown>,\n config?: DialogConfig<TData>,\n ): DialogRef<TResult, TData> {\n const mergedConfig = {\n ...DEFAULT_DIALOG_CONFIG,\n ...config,\n } as DialogConfig<TData>;\n const dialogRef = new DialogRef<TResult, TData>(mergedConfig);\n\n const positionStrategy = this.overlay\n .position()\n .global()\n .centerHorizontally();\n\n if (mergedConfig.position === 'top') {\n positionStrategy.top('10vh');\n } else {\n positionStrategy.centerVertically();\n }\n\n const overlayRef = this.overlay.create({\n hasBackdrop: mergedConfig.modal ?? true,\n backdropClass: 'fk-dialog__backdrop',\n panelClass: 'fk-dialog__pane',\n scrollStrategy: this.overlay.scrollStrategies.block(),\n positionStrategy,\n disposeOnNavigation: true,\n });\n\n const childInjector = Injector.create({\n parent: this.injector,\n providers: [\n { provide: DIALOG_DATA as never, useValue: mergedConfig.data },\n { provide: DIALOG_REF as never, useValue: dialogRef },\n ],\n });\n\n const hostRef = overlayRef.attach(\n new ComponentPortal(DialogComponent, null, childInjector),\n );\n\n const contentRef = createComponent(content, {\n environmentInjector: this.injector,\n elementInjector: childInjector,\n hostElement: this.doc.createElement('div'),\n });\n\n this.appRef.attachView(contentRef.hostView);\n\n const entry: DialogEntry = {\n ref: dialogRef as DialogRef<unknown, unknown>,\n overlayRef,\n hostRef,\n contentRef,\n };\n\n this.activeDialogs.push(entry);\n\n this.applyConfig(hostRef, mergedConfig);\n\n // CDK dispatches these to the top overlay only, so Escape / an outside\n // press dismisses the topmost dialog. `dialogRef.close()` runs the\n // preventClose + canClose guards.\n overlayRef.keydownEvents().subscribe((event) => {\n if (event.keyCode === ESCAPE && mergedConfig.closeOnEscape) {\n dialogRef.close();\n }\n });\n\n overlayRef.backdropClick().subscribe(() => {\n if (mergedConfig.closeOnBackdrop) {\n dialogRef.close();\n }\n });\n\n hostRef.instance.beforeOpen.subscribe(() => {\n dialogRef.markBeforeOpen();\n });\n\n hostRef.instance.opened.subscribe(() => {\n dialogRef.markOpened();\n });\n\n hostRef.instance.closed.subscribe(() => {\n dialogRef.close();\n });\n\n dialogRef.afterClosed().subscribe(() => {\n this.destroyDialog(entry);\n });\n\n hostRef.setInput('open', true);\n hostRef.changeDetectorRef.detectChanges();\n\n const panelBody =\n overlayRef.overlayElement.querySelector('.fk-dialog__body');\n\n if (panelBody) {\n panelBody.appendChild(contentRef.location.nativeElement);\n contentRef.changeDetectorRef.detectChanges();\n\n // Move [libDialogFooter] elements out of the body to the panel root so\n // they render in the pinned footer area (after fk-dialog__body).\n const panel = panelBody.closest('.fk-dialog__panel');\n const footerEls = panelBody.querySelectorAll('[libDialogFooter]');\n\n footerEls.forEach((el: Element) => {\n panel?.appendChild(el);\n });\n }\n\n return dialogRef;\n }\n\n closeAll() {\n [...this.activeDialogs].forEach((entry) => entry.ref.close());\n }\n\n private applyConfig(\n hostRef: ComponentRef<DialogComponent>,\n config: DialogConfig,\n ) {\n hostRef.setInput('modal', config.modal ?? true);\n hostRef.setInput('closable', config.closable ?? true);\n hostRef.setInput('size', config.size ?? 'md');\n hostRef.setInput('position', config.position ?? 'center');\n hostRef.setInput('animation', config.animation ?? 'scale-fade');\n hostRef.setInput('header', config.header ?? null);\n hostRef.setInput('restoreFocus', config.restoreFocus ?? true);\n hostRef.setInput('autoFocus', config.autoFocus ?? true);\n hostRef.setInput('className', config.className ?? '');\n hostRef.setInput('preventClose', config.preventClose ?? false);\n hostRef.setInput('canClose', config.canClose ?? null);\n hostRef.setInput('fullscreenMobile', config.fullscreenMobile ?? false);\n hostRef.setInput('flexBody', config.flexBody ?? false);\n hostRef.setInput('ariaLabel', config.ariaLabel ?? null);\n hostRef.setInput('ariaDescribedBy', config.ariaDescribedBy ?? null);\n }\n\n private destroyDialog(entry: DialogEntry) {\n const idx = this.activeDialogs.indexOf(entry);\n\n if (idx > -1) {\n this.activeDialogs.splice(idx, 1);\n }\n\n // Let the component restore focus before the overlay (and its hosted\n // component) are torn down.\n entry.hostRef.setInput('open', false);\n entry.hostRef.changeDetectorRef.detectChanges();\n\n this.appRef.detachView(entry.contentRef.hostView);\n entry.contentRef.destroy();\n\n // Disposing the overlay detaches + destroys the hosted DialogComponent,\n // removes the backdrop, and releases the scroll-block strategy.\n entry.overlayRef.dispose();\n }\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[fkDialogActions]',\n standalone: true,\n})\nexport class FkDialogActionsDirective {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAMa,uBAAuB,CAAA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C,MAAM,EAAE,KAAK,CAAC;AACrC,QAAA,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,aAAa,EAAE;QAE/C,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC;AACjD,QAAA,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE;;;AAI1B,QAAA,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE;IAC5B;uGA1KW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAb,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cADA,MAAM,EAAA,CAAA;;2FACnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;MClCrB,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"frame-kit-ui-ng-ui-dialog.mjs","sources":["../../../../packages/ui-ng/ui/dialog/dialog-header.directive.ts","../../../../packages/ui-ng/ui/dialog/dialog.component.ts","../../../../packages/ui-ng/ui/dialog/dialog.component.html","../../../../packages/ui-ng/ui/dialog/dialog.config.ts","../../../../packages/ui-ng/ui/dialog/dialog-ref.ts","../../../../packages/ui-ng/ui/dialog/dialog.service.ts","../../../../packages/ui-ng/ui/dialog/dialog-actions.directive.ts","../../../../packages/ui-ng/ui/dialog/frame-kit-ui-ng-ui-dialog.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[fkDialogHeader]',\n standalone: true,\n})\nexport class FkDialogHeaderDirective {}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n HostBinding,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport type {\n CanCloseFn,\n DialogAnimation,\n DialogPosition,\n DialogSize,\n} from './dialog.types';\nimport { FkDialogHeaderDirective } from './dialog-header.directive';\n\nlet nextDialogId = 0;\n\n/**\n * Dialog panel chrome.\n *\n * Hosted inside a CDK overlay by `DialogService`, so the overlay layer owns\n * the backdrop, scroll blocking, positioning, stacking, and Escape / outside\n * dispatch. This component renders the panel itself: header / body / footer\n * projection, sizing, the enter animation, focus trapping, and the close\n * guard.\n */\n@Component({\n selector: 'fk-dialog',\n standalone: true,\n imports: [A11yModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './dialog.component.html',\n styleUrl: './dialog.component.scss',\n})\nexport class DialogComponent {\n // ===== INPUTS =====\n /** Controls whether the dialog is open. */\n readonly open = input(false);\n /** When true, marks the panel `aria-modal` and traps focus. */\n readonly modal = input(true);\n /** When true, shows the close button in the dialog header. */\n readonly closable = input(true);\n /** Size variant that controls the dialog's max-width. */\n readonly size = input<DialogSize>('md');\n /** Where the dialog is anchored on screen. */\n readonly position = input<DialogPosition>('center');\n /** Optional title text rendered in the dialog header and used for `aria-labelledby`. */\n readonly header = input<string | null>(null);\n /** When true, focus returns to the previously focused element when the dialog closes. */\n readonly restoreFocus = input(true);\n /** When true, CDK auto-focus is applied when the dialog opens. */\n readonly autoFocus = input(true);\n /** Entry/exit animation applied to the dialog panel. */\n readonly animation = input<DialogAnimation>('scale-fade');\n /** When true, all close mechanisms (Escape, backdrop, button) are blocked. */\n readonly preventClose = input(false);\n /** Async guard function called before closing; return false to cancel the close. */\n readonly canClose = input<CanCloseFn | null>(null);\n /** When true, the dialog expands to full-screen on mobile viewports. */\n readonly fullscreenMobile = input(false);\n /** When true, the dialog body uses a flex column layout. */\n readonly flexBody = input(false);\n\n // ===== CONTENT CHILDREN =====\n readonly customHeader = contentChild(FkDialogHeaderDirective);\n\n // ===== BASE PROPS =====\n readonly className = input<string>('');\n readonly id = input<string | null>(null);\n readonly ariaLabel = input<string | null>(null);\n readonly ariaDescribedBy = input<string | null>(null);\n\n // ===== OUTPUTS =====\n /** Fires when the dialog's open state should change, emitting the new boolean. */\n readonly openChange = output<boolean>();\n /** Fires immediately before the dialog begins its open animation. */\n readonly beforeOpen = output<void>();\n /** Fires after the dialog is fully open and visible. */\n readonly opened = output<void>();\n /** Fires immediately before the dialog begins its close animation. */\n readonly beforeClose = output<void>();\n /** Fires after the dialog is fully closed. */\n readonly closed = output<void>();\n\n // ===== INTERNAL STATE =====\n private readonly doc = inject(DOCUMENT);\n readonly titleId = `fk-dialog-title-${nextDialogId++}`;\n private previouslyFocusedElement: HTMLElement | null = null;\n private closeGuardRunning = false;\n\n /** Whether the dialog DOM is rendered (stays true during exit animation). */\n readonly visible = signal(false);\n\n /** Whether the dialog is animating out. */\n readonly animatingOut = signal(false);\n\n // ===== COMPUTED =====\n readonly classes = computed(() => {\n return ['fk-dialog', this.className()].filter(Boolean).join(' ');\n });\n\n readonly ariaLabelledBy = computed(() => {\n if (this.ariaLabel()) {\n return null;\n }\n\n return this.header() ? this.titleId : null;\n });\n\n constructor() {\n effect(() => {\n const isOpen = this.open();\n\n if (isOpen) {\n this.onDialogOpen();\n } else {\n this.onDialogClose();\n }\n });\n }\n\n @HostBinding('class')\n get hostClass() {\n return this.classes();\n }\n\n @HostBinding('attr.id')\n get hostId() {\n return this.id();\n }\n\n // ===== ACTIONS =====\n /** Closes the dialog, running any `canClose` guard first; no-ops when `preventClose` is true. */\n async close() {\n if (this.closeGuardRunning) {\n return;\n }\n\n if (this.preventClose()) {\n return;\n }\n\n const guard = this.canClose();\n\n if (guard) {\n this.closeGuardRunning = true;\n\n try {\n const allowed = await Promise.resolve(guard());\n\n if (!allowed) {\n return;\n }\n } finally {\n this.closeGuardRunning = false;\n }\n }\n\n this.beforeClose.emit();\n this.openChange.emit(false);\n this.closed.emit();\n }\n\n /** Called when the panel exit animation finishes. */\n onExitAnimationDone() {\n if (this.animatingOut()) {\n this.animatingOut.set(false);\n this.visible.set(false);\n }\n }\n\n // ===== LIFECYCLE =====\n private onDialogOpen() {\n this.previouslyFocusedElement =\n (this.doc.activeElement as HTMLElement) ?? null;\n\n this.beforeOpen.emit();\n this.animatingOut.set(false);\n this.visible.set(true);\n this.opened.emit();\n }\n\n private onDialogClose() {\n if (this.visible()) {\n if (this.animation() !== 'none') {\n this.animatingOut.set(true);\n } else {\n this.visible.set(false);\n }\n }\n\n if (this.restoreFocus() && this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus();\n this.previouslyFocusedElement = null;\n }\n }\n}\n","@if (visible()) {\n <div\n class=\"fk-dialog__panel\"\n [class.fk-dialog__animate-panel--scale-fade]=\"\n animation() === 'scale-fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--fade]=\"\n animation() === 'fade' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-up]=\"\n animation() === 'slide-up' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel--slide-down]=\"\n animation() === 'slide-down' && !animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--scale-fade]=\"\n animation() === 'scale-fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--fade]=\"\n animation() === 'fade' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-up]=\"\n animation() === 'slide-up' && animatingOut()\n \"\n [class.fk-dialog__animate-panel-out--slide-down]=\"\n animation() === 'slide-down' && animatingOut()\n \"\n [class.fk-dialog__panel--sm]=\"size() === 'sm'\"\n [class.fk-dialog__panel--md]=\"size() === 'md'\"\n [class.fk-dialog__panel--lg]=\"size() === 'lg'\"\n [class.fk-dialog__panel--xl]=\"size() === 'xl'\"\n [class.fk-dialog__panel--fullscreen]=\"size() === 'fullscreen'\"\n [class.fk-dialog__panel--fullscreen-auto]=\"fullscreenMobile()\"\n [class.fk-dialog__panel--top]=\"position() === 'top'\"\n role=\"dialog\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [cdkTrapFocus]=\"modal()\"\n [cdkTrapFocusAutoCapture]=\"autoFocus()\"\n (animationend)=\"onExitAnimationDone()\"\n >\n @if (customHeader() || header() || closable()) {\n <div class=\"fk-dialog__header\">\n <ng-content select=\"[fkDialogHeader]\" />\n\n @if (!customHeader() && header()) {\n <span class=\"fk-dialog__title\" [id]=\"titleId\">{{ header() }}</span>\n }\n\n @if (closable()) {\n <button\n class=\"fk-dialog__close\"\n type=\"button\"\n aria-label=\"Close dialog\"\n (click)=\"close()\"\n >\n &times;\n </button>\n }\n </div>\n }\n\n <div class=\"fk-dialog__body\" [class.fk-dialog__body--flex]=\"flexBody()\">\n <ng-content />\n </div>\n\n <ng-content select=\"[libDialogFooter]\" />\n </div>\n}\n","import type {\n CanCloseFn,\n DialogAnimation,\n DialogPosition,\n DialogSize,\n} from './dialog.types';\n\nexport interface DialogConfig<TData = unknown> {\n modal?: boolean;\n closable?: boolean;\n closeOnEscape?: boolean;\n closeOnBackdrop?: boolean;\n size?: DialogSize;\n position?: DialogPosition;\n animation?: DialogAnimation;\n header?: string | null;\n restoreFocus?: boolean;\n autoFocus?: boolean;\n preventClose?: boolean;\n canClose?: CanCloseFn;\n fullscreenMobile?: boolean;\n flexBody?: boolean;\n className?: string;\n ariaLabel?: string | null;\n ariaDescribedBy?: string | null;\n data?: TData;\n}\n\nexport const DEFAULT_DIALOG_CONFIG: DialogConfig = {\n modal: true,\n closable: true,\n closeOnEscape: true,\n closeOnBackdrop: false,\n size: 'md',\n position: 'center',\n animation: 'scale-fade',\n header: null,\n restoreFocus: true,\n autoFocus: true,\n preventClose: false,\n fullscreenMobile: false,\n flexBody: false,\n className: '',\n ariaLabel: null,\n ariaDescribedBy: null,\n};\n","import type { Signal } from '@angular/core';\nimport { signal } from '@angular/core';\n\nimport { Observable, Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport type { DialogConfig } from './dialog.config';\nimport type { CanCloseFn, DialogSize } from './dialog.types';\n\nexport class DialogRef<TResult = unknown, TData = unknown> {\n private readonly beforeOpenSubject = new Subject<void>();\n private readonly afterOpenedSubject = new Subject<void>();\n private readonly beforeCloseSubject = new Subject<void>();\n private readonly afterClosedSubject = new Subject<TResult | undefined>();\n private readonly sizeSignal;\n private closed = false;\n private closeGuard: CanCloseFn | null = null;\n private sizeUpdater: ((size: DialogSize) => void) | null = null;\n\n readonly config: DialogConfig<TData>;\n\n /**\n * The dialog's current panel size. Starts at the opening config's size\n * and tracks every `updateSize` call — chrome components (e.g. an\n * expand/collapse toggle) can render their state from it.\n */\n readonly size: Signal<DialogSize>;\n\n constructor(config: DialogConfig<TData> = {} as DialogConfig<TData>) {\n this.config = config;\n this.sizeSignal = signal<DialogSize>(config.size ?? 'md');\n this.size = this.sizeSignal.asReadonly();\n\n if (config.canClose) {\n this.closeGuard = config.canClose;\n }\n }\n\n /**\n * Resize the open dialog in place — e.g. toggle between the opened\n * size and `\"fullscreen\"` from an expand button in custom chrome. The\n * panel transitions its size classes reactively; no reopen needed.\n */\n updateSize(size: DialogSize): void {\n this.sizeSignal.set(size);\n this.sizeUpdater?.(size);\n }\n\n /**\n * @internal Wired by DialogService after the host is created so\n * `updateSize` can reach the host component's `size` input.\n */\n bindSizeUpdater(updater: (size: DialogSize) => void): void {\n this.sizeUpdater = updater;\n }\n\n get data(): TData | undefined {\n return this.config.data;\n }\n\n setCanClose(guard: CanCloseFn | null) {\n this.closeGuard = guard;\n }\n\n async close(result?: TResult) {\n if (this.closed) {\n return;\n }\n\n if (this.config.preventClose) {\n return;\n }\n\n if (this.closeGuard) {\n const allowed = await Promise.resolve(this.closeGuard());\n\n if (!allowed) {\n return;\n }\n }\n\n this.beforeCloseSubject.next();\n this.beforeCloseSubject.complete();\n\n this.closed = true;\n this.afterClosedSubject.next(result);\n this.afterClosedSubject.complete();\n }\n\n beforeOpen(): Observable<void> {\n return this.beforeOpenSubject.asObservable().pipe(take(1));\n }\n\n afterOpened(): Observable<void> {\n return this.afterOpenedSubject.asObservable().pipe(take(1));\n }\n\n beforeClose(): Observable<void> {\n return this.beforeCloseSubject.asObservable().pipe(take(1));\n }\n\n afterClosed(): Observable<TResult | undefined> {\n return this.afterClosedSubject.asObservable().pipe(take(1));\n }\n\n /** @internal */\n markBeforeOpen() {\n this.beforeOpenSubject.next();\n this.beforeOpenSubject.complete();\n }\n\n /** @internal */\n markOpened() {\n this.afterOpenedSubject.next();\n this.afterOpenedSubject.complete();\n }\n}\n","import { ESCAPE } from '@angular/cdk/keycodes';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ApplicationRef,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n Injector,\n Type,\n} from '@angular/core';\n\nimport { DialogComponent } from './dialog.component';\nimport { DEFAULT_DIALOG_CONFIG, DialogConfig } from './dialog.config';\nimport { DialogRef } from './dialog-ref';\n\nexport const DIALOG_DATA = Symbol('DIALOG_DATA');\nexport const DIALOG_REF = Symbol('DIALOG_REF');\n\ninterface DialogEntry {\n ref: DialogRef;\n overlayRef: OverlayRef;\n hostRef: ComponentRef<DialogComponent>;\n contentRef: ComponentRef<unknown>;\n}\n\n/**\n * Opens dialogs as CDK overlays.\n *\n * CDK owns the cross-cutting overlay concerns — backdrop, scroll blocking,\n * centered positioning, z-index stacking (overlays layer by open order), and\n * top-of-stack dispatch of Escape / outside clicks. The `DialogComponent` it\n * hosts is just the panel chrome (header / body / footer, sizing, enter\n * animation, focus trap). There is no global \"opening X closes lower overlays\"\n * rule: a dialog opened over a drawer stacks on top of it, and Escape / an\n * outside press dismisses whichever overlay is on top.\n */\n@Injectable({ providedIn: 'root' })\nexport class DialogService {\n private readonly overlay = inject(Overlay);\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n private readonly doc = inject(DOCUMENT);\n\n private activeDialogs: DialogEntry[] = [];\n\n get openCount(): number {\n return this.activeDialogs.length;\n }\n\n open<TResult = unknown, TData = unknown>(\n content: Type<unknown>,\n config?: DialogConfig<TData>,\n ): DialogRef<TResult, TData> {\n const mergedConfig = {\n ...DEFAULT_DIALOG_CONFIG,\n ...config,\n } as DialogConfig<TData>;\n const dialogRef = new DialogRef<TResult, TData>(mergedConfig);\n\n const positionStrategy = this.overlay\n .position()\n .global()\n .centerHorizontally();\n\n if (mergedConfig.position === 'top') {\n positionStrategy.top('10vh');\n } else {\n positionStrategy.centerVertically();\n }\n\n const overlayRef = this.overlay.create({\n hasBackdrop: mergedConfig.modal ?? true,\n backdropClass: 'fk-dialog__backdrop',\n panelClass: 'fk-dialog__pane',\n scrollStrategy: this.overlay.scrollStrategies.block(),\n positionStrategy,\n disposeOnNavigation: true,\n });\n\n const childInjector = Injector.create({\n parent: this.injector,\n providers: [\n { provide: DIALOG_DATA as never, useValue: mergedConfig.data },\n { provide: DIALOG_REF as never, useValue: dialogRef },\n ],\n });\n\n const hostRef = overlayRef.attach(\n new ComponentPortal(DialogComponent, null, childInjector),\n );\n\n const contentRef = createComponent(content, {\n environmentInjector: this.injector,\n elementInjector: childInjector,\n hostElement: this.doc.createElement('div'),\n });\n\n this.appRef.attachView(contentRef.hostView);\n\n const entry: DialogEntry = {\n ref: dialogRef as DialogRef<unknown, unknown>,\n overlayRef,\n hostRef,\n contentRef,\n };\n\n this.activeDialogs.push(entry);\n\n this.applyConfig(hostRef, mergedConfig);\n\n // Let ref.updateSize() reach the live host — `size` is a reactive\n // input, so the panel restyles in place without reopening.\n dialogRef.bindSizeUpdater((size) => {\n hostRef.setInput('size', size);\n });\n\n // CDK dispatches these to the top overlay only, so Escape / an outside\n // press dismisses the topmost dialog. `dialogRef.close()` runs the\n // preventClose + canClose guards.\n overlayRef.keydownEvents().subscribe((event) => {\n if (event.keyCode === ESCAPE && mergedConfig.closeOnEscape) {\n dialogRef.close();\n }\n });\n\n overlayRef.backdropClick().subscribe(() => {\n if (mergedConfig.closeOnBackdrop) {\n dialogRef.close();\n }\n });\n\n hostRef.instance.beforeOpen.subscribe(() => {\n dialogRef.markBeforeOpen();\n });\n\n hostRef.instance.opened.subscribe(() => {\n dialogRef.markOpened();\n });\n\n hostRef.instance.closed.subscribe(() => {\n dialogRef.close();\n });\n\n dialogRef.afterClosed().subscribe(() => {\n this.destroyDialog(entry);\n });\n\n hostRef.setInput('open', true);\n hostRef.changeDetectorRef.detectChanges();\n\n const panelBody =\n overlayRef.overlayElement.querySelector('.fk-dialog__body');\n\n if (panelBody) {\n panelBody.appendChild(contentRef.location.nativeElement);\n contentRef.changeDetectorRef.detectChanges();\n\n // Move [libDialogFooter] elements out of the body to the panel root so\n // they render in the pinned footer area (after fk-dialog__body).\n const panel = panelBody.closest('.fk-dialog__panel');\n const footerEls = panelBody.querySelectorAll('[libDialogFooter]');\n\n footerEls.forEach((el: Element) => {\n panel?.appendChild(el);\n });\n }\n\n return dialogRef;\n }\n\n closeAll() {\n [...this.activeDialogs].forEach((entry) => entry.ref.close());\n }\n\n private applyConfig(\n hostRef: ComponentRef<DialogComponent>,\n config: DialogConfig,\n ) {\n hostRef.setInput('modal', config.modal ?? true);\n hostRef.setInput('closable', config.closable ?? true);\n hostRef.setInput('size', config.size ?? 'md');\n hostRef.setInput('position', config.position ?? 'center');\n hostRef.setInput('animation', config.animation ?? 'scale-fade');\n hostRef.setInput('header', config.header ?? null);\n hostRef.setInput('restoreFocus', config.restoreFocus ?? true);\n hostRef.setInput('autoFocus', config.autoFocus ?? true);\n hostRef.setInput('className', config.className ?? '');\n hostRef.setInput('preventClose', config.preventClose ?? false);\n hostRef.setInput('canClose', config.canClose ?? null);\n hostRef.setInput('fullscreenMobile', config.fullscreenMobile ?? false);\n hostRef.setInput('flexBody', config.flexBody ?? false);\n hostRef.setInput('ariaLabel', config.ariaLabel ?? null);\n hostRef.setInput('ariaDescribedBy', config.ariaDescribedBy ?? null);\n }\n\n private destroyDialog(entry: DialogEntry) {\n const idx = this.activeDialogs.indexOf(entry);\n\n if (idx > -1) {\n this.activeDialogs.splice(idx, 1);\n }\n\n // Let the component restore focus before the overlay (and its hosted\n // component) are torn down.\n entry.hostRef.setInput('open', false);\n entry.hostRef.changeDetectorRef.detectChanges();\n\n this.appRef.detachView(entry.contentRef.hostView);\n entry.contentRef.destroy();\n\n // Disposing the overlay detaches + destroys the hosted DialogComponent,\n // removes the backdrop, and releases the scroll-block strategy.\n entry.overlayRef.dispose();\n }\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[fkDialogActions]',\n standalone: true,\n})\nexport class FkDialogActionsDirective {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAMa,uBAAuB,CAAA;uGAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B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AAA,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACLD;;AAEG;;;;"}
@@ -115,6 +115,21 @@ class WizardDialogRef {
115
115
  afterClosed() {
116
116
  return this.dialogRef.afterClosed();
117
117
  }
118
+ /**
119
+ * The underlying dialog's current panel size — see `DialogRef.size`.
120
+ * Custom chrome renders expand/collapse state from it.
121
+ */
122
+ size() {
123
+ return this.dialogRef.size();
124
+ }
125
+ /**
126
+ * Resize the open wizard in place — see `DialogRef.updateSize`.
127
+ * Typically toggled between the opened size and `"fullscreen"` by an
128
+ * expand button in custom header chrome.
129
+ */
130
+ updateSize(size) {
131
+ this.dialogRef.updateSize(size);
132
+ }
118
133
  // ===== INTERNAL =====
119
134
  /** @internal Called by container when submit button is clicked. */
120
135
  emitSubmit() {
@@ -1 +1 @@
1
- {"version":3,"file":"frame-kit-ui-ng-ui-wizard-dialog.mjs","sources":["../../../../packages/ui-ng/ui/wizard-dialog/wizard-dialog-ref.ts","../../../../packages/ui-ng/ui/wizard-dialog/wizard-dialog-container.component.ts","../../../../packages/ui-ng/ui/wizard-dialog/wizard-dialog-container.component.html","../../../../packages/ui-ng/ui/wizard-dialog/wizard-dialog.service.ts","../../../../packages/ui-ng/ui/wizard-dialog/frame-kit-ui-ng-ui-wizard-dialog.ts"],"sourcesContent":["import type { Type } from '@angular/core';\nimport { computed, signal } from '@angular/core';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport type { DialogRef } from '@frame-kit/ui-ng/ui/dialog';\nimport type {\n WizardDialogConfig,\n WizardDialogStep,\n} from './wizard-dialog.types';\n\n/**\n * Optional extra footer button the consumer can surface on any step\n * — typically a \"View X\" jump-off on the results/last step. Sits\n * between Back and Submit in the wizard's footer. Set via\n * `WizardDialogRef.extraAction.set(...)` on step entry; clear with\n * `null` on step exit (or just rely on swapping it out).\n */\nexport interface WizardExtraAction {\n /** Button label, e.g. \"View Identities\". */\n label: string;\n /** Visual variant. Defaults to `\"outline\"` so the extra action\n * doesn't compete with the primary Submit button. */\n variant?: 'primary' | 'outline' | 'secondary' | 'danger';\n /** Click handler — typically closes the wizard with a sentinel. */\n onClick: () => void;\n}\n\nexport const WIZARD_DIALOG_REF = Symbol('WIZARD_DIALOG_REF');\n\nexport class WizardDialogRef<TResult = unknown, TData = unknown> {\n private dialogRef!: DialogRef<TResult>;\n private readonly consumerData: TData | undefined;\n private readonly submitSubject = new Subject<void>();\n private readonly stepChangeSubject = new Subject<number>();\n\n // ===== CONFIG =====\n\n readonly steps: WizardDialogStep[];\n readonly linear: boolean;\n readonly submitLabel: string;\n readonly cancelLabel: string;\n readonly nextLabel: string;\n readonly backLabel: string;\n\n /** Optional consumer-supplied header rendered above the stepper. */\n readonly headerComponent: Type<unknown> | null;\n\n /** Inputs applied to `headerComponent` when it is created. */\n readonly headerInputs: Record<string, unknown>;\n\n /** Optional consumer-supplied footer, replacing the built-in buttons. */\n readonly footerComponent: Type<unknown> | null;\n\n /** Inputs applied to `footerComponent` when it is created. */\n readonly footerInputs: Record<string, unknown>;\n\n /** Optional consumer-supplied stepper, replacing the built-in pill row. */\n readonly stepperComponent: Type<unknown> | null;\n\n /** Inputs applied to `stepperComponent` when it is created. */\n readonly stepperInputs: Record<string, unknown>;\n\n // ===== NAVIGATION STATE =====\n\n readonly currentIndex = signal(0);\n readonly highestVisitedIndex = signal(0);\n\n readonly totalSteps = computed(() => this.steps.length);\n\n readonly isFirstStep = computed(() => this.currentIndex() === 0);\n\n readonly isLastStep = computed(\n () => this.currentIndex() === this.steps.length - 1,\n );\n\n readonly currentStep = computed(() => this.steps[this.currentIndex()]);\n\n // ===== CONSUMER-CONTROLLED STATE =====\n\n readonly submitDisabled = signal(false);\n readonly nextDisabled = signal(false);\n readonly chromeVisible = signal(true);\n /**\n * Optional third footer button. When non-null, the wizard chrome\n * renders an additional `<fk-button>` between Back and Submit\n * using this metadata. Consumers typically wire this in an\n * `effect` keyed on `currentIndex` so the button only appears on\n * the step(s) that need it.\n */\n readonly extraAction = signal<WizardExtraAction | null>(null);\n\n // ===== OBSERVABLES =====\n\n readonly submitted: Observable<void> = this.submitSubject.asObservable();\n readonly stepChanged: Observable<number> =\n this.stepChangeSubject.asObservable();\n\n constructor(config: WizardDialogConfig<TData>) {\n this.steps = config.steps;\n this.linear = config.linear ?? true;\n this.submitLabel = config.submitLabel ?? 'Submit';\n this.cancelLabel = config.cancelLabel ?? 'Cancel';\n this.nextLabel = config.nextLabel ?? 'Next';\n this.backLabel = config.backLabel ?? 'Back';\n this.headerComponent = config.headerComponent ?? null;\n this.headerInputs = config.headerInputs ?? {};\n this.footerComponent = config.footerComponent ?? null;\n this.footerInputs = config.footerInputs ?? {};\n this.stepperComponent = config.stepperComponent ?? null;\n this.stepperInputs = config.stepperInputs ?? {};\n this.consumerData = config.data;\n }\n\n get data(): TData | undefined {\n return this.consumerData;\n }\n\n // ===== NAVIGATION =====\n\n next(): boolean {\n if (this.isLastStep()) {\n return false;\n }\n\n this.currentIndex.update((i) => i + 1);\n this.updateHighestVisited();\n this.stepChangeSubject.next(this.currentIndex());\n\n return true;\n }\n\n previous(): boolean {\n if (this.isFirstStep()) {\n return false;\n }\n\n this.currentIndex.update((i) => i - 1);\n this.stepChangeSubject.next(this.currentIndex());\n\n return true;\n }\n\n goTo(index: number): boolean {\n if (index < 0 || index >= this.steps.length) {\n return false;\n }\n\n if (this.linear && index > this.highestVisitedIndex()) {\n return false;\n }\n\n if (index > this.currentIndex() && this.nextDisabled()) {\n return false;\n }\n\n this.currentIndex.set(index);\n this.updateHighestVisited();\n this.stepChangeSubject.next(index);\n\n return true;\n }\n\n private updateHighestVisited(): void {\n const current = this.currentIndex();\n\n if (current > this.highestVisitedIndex()) {\n this.highestVisitedIndex.set(current);\n }\n }\n\n // ===== DIALOG LIFECYCLE =====\n\n close(result?: TResult): void {\n this.dialogRef.close(result);\n }\n\n afterClosed(): Observable<TResult | undefined> {\n return this.dialogRef.afterClosed();\n }\n\n // ===== INTERNAL =====\n\n /** @internal Called by container when submit button is clicked. */\n emitSubmit(): void {\n this.submitSubject.next();\n }\n\n /** @internal Called by WizardDialogService after dialog is opened. */\n setDialogRef(ref: DialogRef<TResult>): void {\n this.dialogRef = ref;\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n HostBinding,\n inject,\n Injector,\n viewChild,\n Type,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { ButtonComponent } from '@frame-kit/ui-ng/ui/button';\nimport { DIALOG_DATA } from '@frame-kit/ui-ng/ui/dialog';\nimport type { WizardDialogContainerData } from './wizard-dialog.service';\nimport { WIZARD_DIALOG_REF, WizardDialogRef } from './wizard-dialog-ref';\n\n@Component({\n selector: 'fk-wizard-dialog-container',\n standalone: true,\n imports: [ButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './wizard-dialog-container.component.html',\n styleUrl: './wizard-dialog-container.component.scss',\n})\nexport class WizardDialogContainerComponent implements AfterViewInit {\n private readonly data = inject(\n DIALOG_DATA as never,\n ) as WizardDialogContainerData;\n private readonly injector = inject(Injector);\n private readonly bodyOutlet = viewChild('bodyOutlet', {\n read: ViewContainerRef,\n });\n private readonly headerOutlet = viewChild('headerOutlet', {\n read: ViewContainerRef,\n });\n private readonly footerOutlet = viewChild('footerOutlet', {\n read: ViewContainerRef,\n });\n private readonly stepperOutlet = viewChild('stepperOutlet', {\n read: ViewContainerRef,\n });\n\n readonly ref: WizardDialogRef = this.data.wizardRef;\n\n readonly classes = computed(() => 'fk-wizard-dialog');\n\n @HostBinding('class')\n get hostClass() {\n return this.classes();\n }\n\n ngAfterViewInit(): void {\n // One injector for both regions so a consumer-supplied header can inject\n // WIZARD_DIALOG_REF exactly like the step content does.\n const childInjector = Injector.create({\n parent: this.injector,\n providers: [{ provide: WIZARD_DIALOG_REF as never, useValue: this.ref }],\n });\n\n this.mountRegion(\n this.headerOutlet(),\n this.ref.headerComponent,\n this.ref.headerInputs,\n childInjector,\n );\n\n this.mountRegion(\n this.footerOutlet(),\n this.ref.footerComponent,\n this.ref.footerInputs,\n childInjector,\n );\n\n this.mountRegion(\n this.stepperOutlet(),\n this.ref.stepperComponent,\n this.ref.stepperInputs,\n childInjector,\n );\n\n const outlet = this.bodyOutlet();\n\n if (!outlet) {\n return;\n }\n\n outlet.createComponent(this.data.contentComponent, {\n injector: childInjector,\n });\n }\n\n /**\n * Render an optional consumer-supplied region (header or footer) into its\n * fixed outlet, applying the configured inputs so consumers configure it\n * declaratively from the wizard config. Shares the wizard injector, so the\n * component can inject `WIZARD_DIALOG_REF`.\n */\n private mountRegion(\n outlet: ViewContainerRef | undefined,\n component: Type<unknown> | null,\n inputs: Record<string, unknown>,\n injector: Injector,\n ): void {\n if (!component || !outlet) {\n return;\n }\n\n const componentRef = outlet.createComponent(component, { injector });\n\n for (const [name, value] of Object.entries(inputs)) {\n componentRef.setInput(name, value);\n }\n\n componentRef.changeDetectorRef.detectChanges();\n }\n\n onCancel(): void {\n this.ref.close();\n }\n\n onSubmit(): void {\n this.ref.emitSubmit();\n }\n}\n","<!-- Consumer-supplied header (fixed, above the stepper) -->\n@if (ref.headerComponent) {\n <div class=\"fk-wizard-dialog__header\">\n <ng-template #headerOutlet />\n </div>\n}\n\n<!-- Stepper -->\n@if (ref.stepperComponent) {\n <div\n class=\"fk-wizard-dialog__stepper\"\n [class.fk-wizard-dialog__stepper--hidden]=\"!ref.chromeVisible()\"\n >\n <ng-template #stepperOutlet />\n </div>\n} @else {\n <div\n class=\"fk-wizard-dialog__stepper\"\n [class.fk-wizard-dialog__stepper--hidden]=\"!ref.chromeVisible()\"\n role=\"tablist\"\n >\n @for (step of ref.steps; track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"fk-wizard-dialog__step\"\n [class.fk-wizard-dialog__step--active]=\"$index === ref.currentIndex()\"\n [class.fk-wizard-dialog__step--completed]=\"$index < ref.currentIndex()\"\n [attr.aria-selected]=\"$index === ref.currentIndex()\"\n [disabled]=\"ref.linear && $index > ref.highestVisitedIndex()\"\n (click)=\"ref.goTo($index)\"\n >\n <span class=\"fk-wizard-dialog__step-number\">{{ $index + 1 }}</span>\n <span class=\"fk-wizard-dialog__step-title\">{{ step.title }}</span>\n @if (step.optional) {\n <span class=\"fk-wizard-dialog__step-optional\">(Optional)</span>\n }\n </button>\n }\n </div>\n\n <!-- Scrollable body -->\n}\n\n<div class=\"fk-wizard-dialog__body\">\n <ng-template #bodyOutlet />\n</div>\n\n<!-- Footer (moved to dialog footer by DialogService) -->\n<div\n class=\"fk-wizard-dialog__footer\"\n [class.fk-wizard-dialog__footer--hidden]=\"!ref.chromeVisible()\"\n libDialogFooter\n>\n @if (ref.footerComponent) {\n <ng-template #footerOutlet />\n } @else {\n @if (ref.isFirstStep()) {\n <fk-button variant=\"outline\" type=\"button\" (click)=\"onCancel()\">\n {{ ref.cancelLabel }}\n </fk-button>\n } @else {\n <fk-button variant=\"outline\" type=\"button\" (click)=\"ref.previous()\">\n {{ ref.backLabel }}\n </fk-button>\n }\n\n @if (ref.extraAction(); as action) {\n <fk-button\n [variant]=\"action.variant ?? 'outline'\"\n type=\"button\"\n (click)=\"action.onClick()\"\n >\n {{ action.label }}\n </fk-button>\n }\n\n @if (ref.isLastStep()) {\n <fk-button\n variant=\"primary\"\n type=\"button\"\n [disabled]=\"ref.submitDisabled()\"\n (click)=\"onSubmit()\"\n >\n {{ ref.submitLabel }}\n </fk-button>\n } @else {\n <fk-button\n variant=\"primary\"\n type=\"button\"\n [disabled]=\"ref.nextDisabled()\"\n (click)=\"ref.next()\"\n >\n {{ ref.nextLabel }}\n </fk-button>\n }\n }\n</div>\n","import { inject, Injectable, Type } from '@angular/core';\n\nimport { DialogService } from '@frame-kit/ui-ng/ui/dialog';\nimport type { DialogRef } from '@frame-kit/ui-ng/ui/dialog';\nimport type { WizardDialogConfig } from './wizard-dialog.types';\nimport { WizardDialogContainerComponent } from './wizard-dialog-container.component';\nimport { WizardDialogRef } from './wizard-dialog-ref';\n\nexport interface WizardDialogContainerData {\n wizardRef: WizardDialogRef;\n contentComponent: Type<unknown>;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class WizardDialogService {\n private readonly dialogService = inject(DialogService);\n\n open<TResult = unknown, TData = unknown>(\n content: Type<unknown>,\n config: WizardDialogConfig<TData>,\n ): WizardDialogRef<TResult, TData> {\n const wizardRef = new WizardDialogRef<TResult, TData>(config);\n\n const dialogRef = this.dialogService.open<\n TResult,\n WizardDialogContainerData\n >(WizardDialogContainerComponent, {\n header: config.header,\n size: config.size ?? 'lg',\n closable: config.closable,\n closeOnEscape: config.closeOnEscape,\n closeOnBackdrop: config.closeOnBackdrop,\n animation: config.animation,\n fullscreenMobile: config.fullscreenMobile,\n className: ['fk-wizard-dialog-host', config.className]\n .filter(Boolean)\n .join(' '),\n ariaLabel: config.ariaLabel,\n ariaDescribedBy: config.ariaDescribedBy,\n flexBody: true,\n data: {\n wizardRef: wizardRef as WizardDialogRef,\n contentComponent: content,\n },\n });\n\n wizardRef.setDialogRef(dialogRef as DialogRef<TResult>);\n\n return wizardRef;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA4Ba,iBAAiB,GAAG,MAAM,CAAC,mBAAmB;MAE9C,eAAe,CAAA;AAClB,IAAA,SAAS;AACA,IAAA,YAAY;AACZ,IAAA,aAAa,GAAG,IAAI,OAAO,EAAQ;AACnC,IAAA,iBAAiB,GAAG,IAAI,OAAO,EAAU;;AAIjD,IAAA,KAAK;AACL,IAAA,MAAM;AACN,IAAA,WAAW;AACX,IAAA,WAAW;AACX,IAAA,SAAS;AACT,IAAA,SAAS;;AAGT,IAAA,eAAe;;AAGf,IAAA,YAAY;;AAGZ,IAAA,eAAe;;AAGf,IAAA,YAAY;;AAGZ,IAAA,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AM,CAAC,aAAa;YACnC,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;AACzC,YAAA,SAAS,EAAE,CAAC,uBAAuB,EAAE,MAAM,CAAC,SAAS;iBAClD,MAAM,CAAC,OAAO;iBACd,IAAI,CAAC,GAAG,CAAC;YACZ,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,eAAe,EAAE,MAAM,CAAC,eAAe;AACvC,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,IAAI,EAAE;AACJ,gBAAA,SAAS,EAAE,SAA4B;AACvC,gBAAA,gBAAgB,EAAE,OAAO;AAC1B,aAAA;AACF,SAAA,CAAC;AAEF,QAAA,SAAS,CAAC,YAAY,CAAC,SAA+B,CAAC;AAEvD,QAAA,OAAO,SAAS;IAClB;uGAnCW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cADN,MAAM,EAAA,CAAA;;2FACnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACblC;;AAEG;;;;"}
1
+ {"version":3,"file":"frame-kit-ui-ng-ui-wizard-dialog.mjs","sources":["../../../../packages/ui-ng/ui/wizard-dialog/wizard-dialog-ref.ts","../../../../packages/ui-ng/ui/wizard-dialog/wizard-dialog-container.component.ts","../../../../packages/ui-ng/ui/wizard-dialog/wizard-dialog-container.component.html","../../../../packages/ui-ng/ui/wizard-dialog/wizard-dialog.service.ts","../../../../packages/ui-ng/ui/wizard-dialog/frame-kit-ui-ng-ui-wizard-dialog.ts"],"sourcesContent":["import type { Type } from '@angular/core';\nimport { computed, signal } from '@angular/core';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport type { DialogRef, DialogSize } from '@frame-kit/ui-ng/ui/dialog';\nimport type {\n WizardDialogConfig,\n WizardDialogStep,\n} from './wizard-dialog.types';\n\n/**\n * Optional extra footer button the consumer can surface on any step\n * — typically a \"View X\" jump-off on the results/last step. Sits\n * between Back and Submit in the wizard's footer. Set via\n * `WizardDialogRef.extraAction.set(...)` on step entry; clear with\n * `null` on step exit (or just rely on swapping it out).\n */\nexport interface WizardExtraAction {\n /** Button label, e.g. \"View Identities\". */\n label: string;\n /** Visual variant. Defaults to `\"outline\"` so the extra action\n * doesn't compete with the primary Submit button. */\n variant?: 'primary' | 'outline' | 'secondary' | 'danger';\n /** Click handler — typically closes the wizard with a sentinel. */\n onClick: () => void;\n}\n\nexport const WIZARD_DIALOG_REF = Symbol('WIZARD_DIALOG_REF');\n\nexport class WizardDialogRef<TResult = unknown, TData = unknown> {\n private dialogRef!: DialogRef<TResult>;\n private readonly consumerData: TData | undefined;\n private readonly submitSubject = new Subject<void>();\n private readonly stepChangeSubject = new Subject<number>();\n\n // ===== CONFIG =====\n\n readonly steps: WizardDialogStep[];\n readonly linear: boolean;\n readonly submitLabel: string;\n readonly cancelLabel: string;\n readonly nextLabel: string;\n readonly backLabel: string;\n\n /** Optional consumer-supplied header rendered above the stepper. */\n readonly headerComponent: Type<unknown> | null;\n\n /** Inputs applied to `headerComponent` when it is created. */\n readonly headerInputs: Record<string, unknown>;\n\n /** Optional consumer-supplied footer, replacing the built-in buttons. */\n readonly footerComponent: Type<unknown> | null;\n\n /** Inputs applied to `footerComponent` when it is created. */\n readonly footerInputs: Record<string, unknown>;\n\n /** Optional consumer-supplied stepper, replacing the built-in pill row. */\n readonly stepperComponent: Type<unknown> | null;\n\n /** Inputs applied to `stepperComponent` when it is created. */\n readonly stepperInputs: Record<string, unknown>;\n\n // ===== NAVIGATION STATE =====\n\n readonly currentIndex = signal(0);\n readonly highestVisitedIndex = signal(0);\n\n readonly totalSteps = computed(() => this.steps.length);\n\n readonly isFirstStep = computed(() => this.currentIndex() === 0);\n\n readonly isLastStep = computed(\n () => this.currentIndex() === this.steps.length - 1,\n );\n\n readonly currentStep = computed(() => this.steps[this.currentIndex()]);\n\n // ===== CONSUMER-CONTROLLED STATE =====\n\n readonly submitDisabled = signal(false);\n readonly nextDisabled = signal(false);\n readonly chromeVisible = signal(true);\n /**\n * Optional third footer button. When non-null, the wizard chrome\n * renders an additional `<fk-button>` between Back and Submit\n * using this metadata. Consumers typically wire this in an\n * `effect` keyed on `currentIndex` so the button only appears on\n * the step(s) that need it.\n */\n readonly extraAction = signal<WizardExtraAction | null>(null);\n\n // ===== OBSERVABLES =====\n\n readonly submitted: Observable<void> = this.submitSubject.asObservable();\n readonly stepChanged: Observable<number> =\n this.stepChangeSubject.asObservable();\n\n constructor(config: WizardDialogConfig<TData>) {\n this.steps = config.steps;\n this.linear = config.linear ?? true;\n this.submitLabel = config.submitLabel ?? 'Submit';\n this.cancelLabel = config.cancelLabel ?? 'Cancel';\n this.nextLabel = config.nextLabel ?? 'Next';\n this.backLabel = config.backLabel ?? 'Back';\n this.headerComponent = config.headerComponent ?? null;\n this.headerInputs = config.headerInputs ?? {};\n this.footerComponent = config.footerComponent ?? null;\n this.footerInputs = config.footerInputs ?? {};\n this.stepperComponent = config.stepperComponent ?? null;\n this.stepperInputs = config.stepperInputs ?? {};\n this.consumerData = config.data;\n }\n\n get data(): TData | undefined {\n return this.consumerData;\n }\n\n // ===== NAVIGATION =====\n\n next(): boolean {\n if (this.isLastStep()) {\n return false;\n }\n\n this.currentIndex.update((i) => i + 1);\n this.updateHighestVisited();\n this.stepChangeSubject.next(this.currentIndex());\n\n return true;\n }\n\n previous(): boolean {\n if (this.isFirstStep()) {\n return false;\n }\n\n this.currentIndex.update((i) => i - 1);\n this.stepChangeSubject.next(this.currentIndex());\n\n return true;\n }\n\n goTo(index: number): boolean {\n if (index < 0 || index >= this.steps.length) {\n return false;\n }\n\n if (this.linear && index > this.highestVisitedIndex()) {\n return false;\n }\n\n if (index > this.currentIndex() && this.nextDisabled()) {\n return false;\n }\n\n this.currentIndex.set(index);\n this.updateHighestVisited();\n this.stepChangeSubject.next(index);\n\n return true;\n }\n\n private updateHighestVisited(): void {\n const current = this.currentIndex();\n\n if (current > this.highestVisitedIndex()) {\n this.highestVisitedIndex.set(current);\n }\n }\n\n // ===== DIALOG LIFECYCLE =====\n\n close(result?: TResult): void {\n this.dialogRef.close(result);\n }\n\n afterClosed(): Observable<TResult | undefined> {\n return this.dialogRef.afterClosed();\n }\n\n /**\n * The underlying dialog's current panel size — see `DialogRef.size`.\n * Custom chrome renders expand/collapse state from it.\n */\n size(): DialogSize {\n return this.dialogRef.size();\n }\n\n /**\n * Resize the open wizard in place — see `DialogRef.updateSize`.\n * Typically toggled between the opened size and `\"fullscreen\"` by an\n * expand button in custom header chrome.\n */\n updateSize(size: DialogSize): void {\n this.dialogRef.updateSize(size);\n }\n\n // ===== INTERNAL =====\n\n /** @internal Called by container when submit button is clicked. */\n emitSubmit(): void {\n this.submitSubject.next();\n }\n\n /** @internal Called by WizardDialogService after dialog is opened. */\n setDialogRef(ref: DialogRef<TResult>): void {\n this.dialogRef = ref;\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n HostBinding,\n inject,\n Injector,\n viewChild,\n Type,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { ButtonComponent } from '@frame-kit/ui-ng/ui/button';\nimport { DIALOG_DATA } from '@frame-kit/ui-ng/ui/dialog';\nimport type { WizardDialogContainerData } from './wizard-dialog.service';\nimport { WIZARD_DIALOG_REF, WizardDialogRef } from './wizard-dialog-ref';\n\n@Component({\n selector: 'fk-wizard-dialog-container',\n standalone: true,\n imports: [ButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './wizard-dialog-container.component.html',\n styleUrl: './wizard-dialog-container.component.scss',\n})\nexport class WizardDialogContainerComponent implements AfterViewInit {\n private readonly data = inject(\n DIALOG_DATA as never,\n ) as WizardDialogContainerData;\n private readonly injector = inject(Injector);\n private readonly bodyOutlet = viewChild('bodyOutlet', {\n read: ViewContainerRef,\n });\n private readonly headerOutlet = viewChild('headerOutlet', {\n read: ViewContainerRef,\n });\n private readonly footerOutlet = viewChild('footerOutlet', {\n read: ViewContainerRef,\n });\n private readonly stepperOutlet = viewChild('stepperOutlet', {\n read: ViewContainerRef,\n });\n\n readonly ref: WizardDialogRef = this.data.wizardRef;\n\n readonly classes = computed(() => 'fk-wizard-dialog');\n\n @HostBinding('class')\n get hostClass() {\n return this.classes();\n }\n\n ngAfterViewInit(): void {\n // One injector for both regions so a consumer-supplied header can inject\n // WIZARD_DIALOG_REF exactly like the step content does.\n const childInjector = Injector.create({\n parent: this.injector,\n providers: [{ provide: WIZARD_DIALOG_REF as never, useValue: this.ref }],\n });\n\n this.mountRegion(\n this.headerOutlet(),\n this.ref.headerComponent,\n this.ref.headerInputs,\n childInjector,\n );\n\n this.mountRegion(\n this.footerOutlet(),\n this.ref.footerComponent,\n this.ref.footerInputs,\n childInjector,\n );\n\n this.mountRegion(\n this.stepperOutlet(),\n this.ref.stepperComponent,\n this.ref.stepperInputs,\n childInjector,\n );\n\n const outlet = this.bodyOutlet();\n\n if (!outlet) {\n return;\n }\n\n outlet.createComponent(this.data.contentComponent, {\n injector: childInjector,\n });\n }\n\n /**\n * Render an optional consumer-supplied region (header or footer) into its\n * fixed outlet, applying the configured inputs so consumers configure it\n * declaratively from the wizard config. Shares the wizard injector, so the\n * component can inject `WIZARD_DIALOG_REF`.\n */\n private mountRegion(\n outlet: ViewContainerRef | undefined,\n component: Type<unknown> | null,\n inputs: Record<string, unknown>,\n injector: Injector,\n ): void {\n if (!component || !outlet) {\n return;\n }\n\n const componentRef = outlet.createComponent(component, { injector });\n\n for (const [name, value] of Object.entries(inputs)) {\n componentRef.setInput(name, value);\n }\n\n componentRef.changeDetectorRef.detectChanges();\n }\n\n onCancel(): void {\n this.ref.close();\n }\n\n onSubmit(): void {\n this.ref.emitSubmit();\n }\n}\n","<!-- Consumer-supplied header (fixed, above the stepper) -->\n@if (ref.headerComponent) {\n <div class=\"fk-wizard-dialog__header\">\n <ng-template #headerOutlet />\n </div>\n}\n\n<!-- Stepper -->\n@if (ref.stepperComponent) {\n <div\n class=\"fk-wizard-dialog__stepper\"\n [class.fk-wizard-dialog__stepper--hidden]=\"!ref.chromeVisible()\"\n >\n <ng-template #stepperOutlet />\n </div>\n} @else {\n <div\n class=\"fk-wizard-dialog__stepper\"\n [class.fk-wizard-dialog__stepper--hidden]=\"!ref.chromeVisible()\"\n role=\"tablist\"\n >\n @for (step of ref.steps; track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"fk-wizard-dialog__step\"\n [class.fk-wizard-dialog__step--active]=\"$index === ref.currentIndex()\"\n [class.fk-wizard-dialog__step--completed]=\"$index < ref.currentIndex()\"\n [attr.aria-selected]=\"$index === ref.currentIndex()\"\n [disabled]=\"ref.linear && $index > ref.highestVisitedIndex()\"\n (click)=\"ref.goTo($index)\"\n >\n <span class=\"fk-wizard-dialog__step-number\">{{ $index + 1 }}</span>\n <span class=\"fk-wizard-dialog__step-title\">{{ step.title }}</span>\n @if (step.optional) {\n <span class=\"fk-wizard-dialog__step-optional\">(Optional)</span>\n }\n </button>\n }\n </div>\n\n <!-- Scrollable body -->\n}\n\n<div class=\"fk-wizard-dialog__body\">\n <ng-template #bodyOutlet />\n</div>\n\n<!-- Footer (moved to dialog footer by DialogService) -->\n<div\n class=\"fk-wizard-dialog__footer\"\n [class.fk-wizard-dialog__footer--hidden]=\"!ref.chromeVisible()\"\n libDialogFooter\n>\n @if (ref.footerComponent) {\n <ng-template #footerOutlet />\n } @else {\n @if (ref.isFirstStep()) {\n <fk-button variant=\"outline\" type=\"button\" (click)=\"onCancel()\">\n {{ ref.cancelLabel }}\n </fk-button>\n } @else {\n <fk-button variant=\"outline\" type=\"button\" (click)=\"ref.previous()\">\n {{ ref.backLabel }}\n </fk-button>\n }\n\n @if (ref.extraAction(); as action) {\n <fk-button\n [variant]=\"action.variant ?? 'outline'\"\n type=\"button\"\n (click)=\"action.onClick()\"\n >\n {{ action.label }}\n </fk-button>\n }\n\n @if (ref.isLastStep()) {\n <fk-button\n variant=\"primary\"\n type=\"button\"\n [disabled]=\"ref.submitDisabled()\"\n (click)=\"onSubmit()\"\n >\n {{ ref.submitLabel }}\n </fk-button>\n } @else {\n <fk-button\n variant=\"primary\"\n type=\"button\"\n [disabled]=\"ref.nextDisabled()\"\n (click)=\"ref.next()\"\n >\n {{ ref.nextLabel }}\n </fk-button>\n }\n }\n</div>\n","import { inject, Injectable, Type } from '@angular/core';\n\nimport { DialogService } from '@frame-kit/ui-ng/ui/dialog';\nimport type { DialogRef } from '@frame-kit/ui-ng/ui/dialog';\nimport type { WizardDialogConfig } from './wizard-dialog.types';\nimport { WizardDialogContainerComponent } from './wizard-dialog-container.component';\nimport { WizardDialogRef } from './wizard-dialog-ref';\n\nexport interface WizardDialogContainerData {\n wizardRef: WizardDialogRef;\n contentComponent: Type<unknown>;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class WizardDialogService {\n private readonly dialogService = inject(DialogService);\n\n open<TResult = unknown, TData = unknown>(\n content: Type<unknown>,\n config: WizardDialogConfig<TData>,\n ): WizardDialogRef<TResult, TData> {\n const wizardRef = new WizardDialogRef<TResult, TData>(config);\n\n const dialogRef = this.dialogService.open<\n TResult,\n WizardDialogContainerData\n >(WizardDialogContainerComponent, {\n header: config.header,\n size: config.size ?? 'lg',\n closable: config.closable,\n closeOnEscape: config.closeOnEscape,\n closeOnBackdrop: config.closeOnBackdrop,\n animation: config.animation,\n fullscreenMobile: config.fullscreenMobile,\n className: ['fk-wizard-dialog-host', config.className]\n .filter(Boolean)\n .join(' '),\n ariaLabel: config.ariaLabel,\n ariaDescribedBy: config.ariaDescribedBy,\n flexBody: true,\n data: {\n wizardRef: wizardRef as WizardDialogRef,\n contentComponent: content,\n },\n });\n\n wizardRef.setDialogRef(dialogRef as DialogRef<TResult>);\n\n return wizardRef;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA4Ba,iBAAiB,GAAG,MAAM,CAAC,mBAAmB;MAE9C,eAAe,CAAA;AAClB,IAAA,SAAS;AACA,IAAA,YAAY;AACZ,IAAA,aAAa,GAAG,IAAI,OAAO,EAAQ;AACnC,IAAA,iBAAiB,GAAG,IAAI,OAAO,EAAU;;AAIjD,IAAA,KAAK;AACL,IAAA,MAAM;AACN,IAAA,WAAW;AACX,IAAA,WAAW;AACX,IAAA,SAAS;AACT,IAAA,SAAS;;AAGT,IAAA,eAAe;;AAGf,IAAA,YAAY;;AAGZ,IAAA,eAAe;;AAGf,IAAA,YAAY;;AAGZ,IAAA,gBAAgB;;AAGhB,IAAA,aAAa;;AAIb,IAAA,YAAY,GAAG,MAAM,CAAC,CAAC,mFAAC;AACxB,IAAA,mBAAmB,GAAG,MAAM,CAAC,CAAC,0FAAC;AAE/B,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;AAE9C,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,kFAAC;AAEvD,IAAA,UAAU,GAAG,QAAQ,CAC5B,MAAM,IAAI,CAAC,YAAY,EAAE,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,iFACpD;AAEQ,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,kFAAC;;AAI7D,IAAA,cAAc,GAAG,MAAM,CAAC,KAAK,qFAAC;AAC9B,IAA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C;AAEF,QAAA,SAAS,CAAC,YAAY,CAAC,SAA+B,CAAC;AAEvD,QAAA,OAAO,SAAS;IAClB;uGAnCW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cADN,MAAM,EAAA,CAAA;;2FACnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACblC;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frame-kit/ui-ng",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Style-agnostic, token-driven Angular UI component library for FrameKit.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Type } from '@angular/core';
2
+ import { Signal, Type } from '@angular/core';
3
3
  import { Observable } from 'rxjs';
4
4
 
5
5
  type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
@@ -113,10 +113,29 @@ declare class DialogRef<TResult = unknown, TData = unknown> {
113
113
  private readonly afterOpenedSubject;
114
114
  private readonly beforeCloseSubject;
115
115
  private readonly afterClosedSubject;
116
+ private readonly sizeSignal;
116
117
  private closed;
117
118
  private closeGuard;
119
+ private sizeUpdater;
118
120
  readonly config: DialogConfig<TData>;
121
+ /**
122
+ * The dialog's current panel size. Starts at the opening config's size
123
+ * and tracks every `updateSize` call — chrome components (e.g. an
124
+ * expand/collapse toggle) can render their state from it.
125
+ */
126
+ readonly size: Signal<DialogSize>;
119
127
  constructor(config?: DialogConfig<TData>);
128
+ /**
129
+ * Resize the open dialog in place — e.g. toggle between the opened
130
+ * size and `"fullscreen"` from an expand button in custom chrome. The
131
+ * panel transitions its size classes reactively; no reopen needed.
132
+ */
133
+ updateSize(size: DialogSize): void;
134
+ /**
135
+ * @internal Wired by DialogService after the host is created so
136
+ * `updateSize` can reach the host component's `size` input.
137
+ */
138
+ bindSizeUpdater(updater: (size: DialogSize) => void): void;
120
139
  get data(): TData | undefined;
121
140
  setCanClose(guard: CanCloseFn | null): void;
122
141
  close(result?: TResult): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Type, AfterViewInit } from '@angular/core';
3
- import { DialogConfig, DialogRef } from '@frame-kit/ui-ng/ui/dialog';
3
+ import { DialogConfig, DialogSize, DialogRef } from '@frame-kit/ui-ng/ui/dialog';
4
4
  import { Observable } from 'rxjs';
5
5
 
6
6
  interface WizardDialogStep {
@@ -131,6 +131,17 @@ declare class WizardDialogRef<TResult = unknown, TData = unknown> {
131
131
  private updateHighestVisited;
132
132
  close(result?: TResult): void;
133
133
  afterClosed(): Observable<TResult | undefined>;
134
+ /**
135
+ * The underlying dialog's current panel size — see `DialogRef.size`.
136
+ * Custom chrome renders expand/collapse state from it.
137
+ */
138
+ size(): DialogSize;
139
+ /**
140
+ * Resize the open wizard in place — see `DialogRef.updateSize`.
141
+ * Typically toggled between the opened size and `"fullscreen"` by an
142
+ * expand button in custom header chrome.
143
+ */
144
+ updateSize(size: DialogSize): void;
134
145
  /** @internal Called by container when submit button is clicked. */
135
146
  emitSubmit(): void;
136
147
  /** @internal Called by WizardDialogService after dialog is opened. */
@@ -58,6 +58,7 @@ An accessible, token-driven dialog / modal component with focus management, scro
58
58
  - Portalled dialog with backdrop, scroll locking, and focus restoration
59
59
  - Configurable size, position, and animation
60
60
  - Guardable close behavior (`preventClose`, `canClose`)
61
+ - Runtime resizing — `DialogRef.updateSize(size)` restyles the open panel in place (with a readable `size` signal for chrome like expand/collapse toggles)
61
62
  - Escape and backdrop handling
62
63
  - Default header via `header` input, or fully custom header via `[fkDialogHeader]` directive
63
64
  - Footer slot with built-in flex layout
@@ -54,6 +54,8 @@ A service-driven wizard dialog for multi-step workflows. Opens its own dialog vi
54
54
  | `previous()` | `boolean` | Go back one step |
55
55
  | `goTo(index)` | `boolean` | Jump to step (respects linear mode) |
56
56
  | `close(result?)` | `void` | Close the dialog |
57
+ | `size()` | `DialogSize` | Current panel size of the underlying dialog |
58
+ | `updateSize(size)` | `void` | Resize the open wizard in place (e.g. toggle `"fullscreen"` from custom chrome) |
57
59
  | `afterClosed()` | `Observable<TResult>` | Emitted after dialog closes |
58
60
 
59
61
  ### WizardExtraAction