@4sh/ui-kit 0.6.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.fr.md +47 -22
  2. package/README.md +46 -23
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +1 -1
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +5 -3
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  8. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +439 -0
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -0
  10. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +111 -10
  12. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +14 -6
  14. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  16. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +655 -92
  17. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  18. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1107 -0
  19. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -0
  20. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +43 -3
  21. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  22. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +5 -3
  23. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  24. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  25. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +8 -2
  26. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +15 -2
  28. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +8 -4
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  32. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +40 -4
  33. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  34. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +282 -0
  35. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -0
  36. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +2 -2
  37. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  38. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  40. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  42. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +6 -4
  43. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  44. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +8 -3
  45. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  46. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +317 -0
  48. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -0
  49. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +8 -2
  50. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +374 -0
  52. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -0
  53. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  54. package/fesm2022/4sh-ui-kit-forms.mjs +49 -14
  55. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  56. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  58. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  60. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +2 -2
  61. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  62. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +2 -2
  63. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  64. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  66. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  68. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  70. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +2 -2
  72. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  74. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +2 -2
  75. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  76. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  78. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +45 -4
  79. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  80. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  82. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +370 -0
  83. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -0
  84. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +2 -2
  85. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  86. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +5 -3
  87. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  88. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +5 -3
  89. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  90. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +5 -3
  91. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  92. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +22 -10
  93. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  94. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +19 -4
  95. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  96. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-ripple.mjs +298 -0
  98. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -0
  99. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +5 -3
  100. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2 -2
  102. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  104. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  105. package/mcp/data/text-search-docs.json +1083 -83
  106. package/mcp/data/ui-config.json +5592 -2586
  107. package/mcp/index.js +682 -410
  108. package/mcp/package.json +1 -1
  109. package/package.json +29 -1
  110. package/schematics/index.cjs +1 -1
  111. package/styles/base/_ripple.scss +53 -0
  112. package/styles/component-vars.scss +177 -2
  113. package/styles/generated/_tokens-breakpoint.scss +1 -1
  114. package/styles/generated/_tokens-metrics.scss +1 -1
  115. package/styles/generated/_tokens-primitives.scss +1 -1
  116. package/styles/generated/_tokens-responsive.scss +17 -17
  117. package/styles/generated/_tokens-semantics.scss +15 -15
  118. package/styles/generated/_tokens-styles.scss +1 -1
  119. package/styles/generated/_tokens-transitions.scss +1 -1
  120. package/styles/generated/_tokens-typography.scss +1 -1
  121. package/styles/generated/_tokens.scss +1 -1
  122. package/styles/index.scss +1 -0
  123. package/styles/settings/_ui-config.scss +9 -0
  124. package/styles/utils/_helpers.scss +15 -0
  125. package/styles/utils/_mixins.scss +17 -1
  126. package/styles.css +1 -1
  127. package/types/4sh-ui-kit-actions-ui-button.d.ts +3 -1
  128. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +234 -0
  129. package/types/4sh-ui-kit-base-ui-image.d.ts +16 -3
  130. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +7 -2
  131. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +242 -37
  132. package/types/4sh-ui-kit-forms-ui-editor.d.ts +481 -0
  133. package/types/4sh-ui-kit-forms-ui-field.d.ts +32 -2
  134. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +3 -1
  135. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +4 -0
  136. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +9 -0
  137. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +4 -1
  138. package/types/4sh-ui-kit-forms-ui-input.d.ts +28 -2
  139. package/types/4sh-ui-kit-forms-ui-knob.d.ts +93 -0
  140. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +3 -1
  141. package/types/4sh-ui-kit-forms-ui-select.d.ts +5 -1
  142. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +126 -0
  143. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +4 -0
  144. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +222 -0
  145. package/types/4sh-ui-kit-forms.d.ts +38 -7
  146. package/types/4sh-ui-kit-layout-ui-modal.d.ts +7 -0
  147. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +201 -0
  148. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +3 -1
  149. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +3 -1
  150. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +3 -1
  151. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +8 -3
  152. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +16 -3
  153. package/types/4sh-ui-kit-ripple.d.ts +156 -0
  154. package/types/4sh-ui-kit-table-ui-paginator.d.ts +3 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { model, input, booleanAttribute, numberAttribute, contentChild, output, viewChild, inject, PLATFORM_ID, signal, computed, DestroyRef, effect, untracked, isDevMode, Component } from '@angular/core';
2
+ import { model, input, booleanAttribute, numberAttribute, contentChild, output, viewChild, signal, inject, PLATFORM_ID, computed, DestroyRef, effect, untracked, isDevMode, Component } from '@angular/core';
3
3
  import { DOCUMENT, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
4
4
  import * as i1 from '@angular/cdk/a11y';
5
5
  import { A11yModule } from '@angular/cdk/a11y';
@@ -175,6 +175,13 @@ class UiModal {
175
175
  this.dragEnd = output();
176
176
  /** Emitted when a resize gesture ends. */
177
177
  this.resizeEnd = output();
178
+ /** @ignore Scrollable body region (see `contentNeedsFocus`). */
179
+ this.contentRef = viewChild('contentEl', /* @ts-ignore */
180
+ ...(ngDevMode ? [{ debugName: "contentRef" }] : /* istanbul ignore next */ []));
181
+ /** @ignore The body overflows and holds no focusable element of its own — it then needs to be
182
+ * focusable itself so the scroll is keyboard-reachable (axe `scrollable-region-focusable`). */
183
+ this.contentNeedsFocus = signal(false, /* @ts-ignore */
184
+ ...(ngDevMode ? [{ debugName: "contentNeedsFocus" }] : /* istanbul ignore next */ []));
178
185
  /** @ignore */
179
186
  this.dialogRef = viewChild('dialog', /* @ts-ignore */
180
187
  ...(ngDevMode ? [{ debugName: "dialogRef" }] : /* istanbul ignore next */ []));
@@ -333,6 +340,29 @@ class UiModal {
333
340
  }
334
341
  });
335
342
  });
343
+ // Watch the body region: it only earns a tab stop once it actually overflows and holds no
344
+ // focusable element of its own. Measured rather than derived: the content is projected, so
345
+ // neither its height nor what it contains is known from the inputs.
346
+ if (this.isBrowser && typeof ResizeObserver !== 'undefined') {
347
+ let observed = null;
348
+ const ro = new ResizeObserver(() => this.measureContentFocusability());
349
+ effect(() => {
350
+ const el = this.contentRef()?.nativeElement ?? null;
351
+ if (el === observed)
352
+ return;
353
+ if (observed)
354
+ ro.unobserve(observed);
355
+ observed = el;
356
+ if (el) {
357
+ ro.observe(el);
358
+ this.measureContentFocusability();
359
+ }
360
+ else {
361
+ this.contentNeedsFocus.set(false);
362
+ }
363
+ });
364
+ destroyRef.onDestroy(() => ro.disconnect());
365
+ }
336
366
  // Rebuild the responsive width stylesheet when `breakpoints` changes.
337
367
  effect(() => {
338
368
  const bps = this.breakpoints();
@@ -505,6 +535,17 @@ class UiModal {
505
535
  this.document.removeEventListener('pointerup', this.resizeUpHandler);
506
536
  }
507
537
  // --- Internals -------------------------------------------------------
538
+ /** @ignore Recomputes `contentNeedsFocus` from the rendered body. */
539
+ measureContentFocusability() {
540
+ const el = this.contentRef()?.nativeElement;
541
+ if (!el) {
542
+ this.contentNeedsFocus.set(false);
543
+ return;
544
+ }
545
+ const overflows = el.scrollHeight > el.clientHeight + 1;
546
+ const hasFocusable = !!el.querySelector('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])');
547
+ this.contentNeedsFocus.set(overflows && !hasFocusable);
548
+ }
508
549
  /** @ignore Release this instance's scroll lock, if held. */
509
550
  releaseLock() {
510
551
  if (this.locked) {
@@ -536,12 +577,12 @@ class UiModal {
536
577
  this.styleEl = null;
537
578
  }
538
579
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiModal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
539
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: UiModal, isStandalone: true, selector: "ui-modal", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, dismissableMask: { classPropertyName: "dismissableMask", publicName: "dismissableMask", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, blockScroll: { classPropertyName: "blockScroll", publicName: "blockScroll", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, keepInViewport: { classPropertyName: "keepInViewport", publicName: "keepInViewport", isSignal: true, isRequired: false, transformFunction: null }, minX: { classPropertyName: "minX", publicName: "minX", isSignal: true, isRequired: false, transformFunction: null }, minY: { classPropertyName: "minY", publicName: "minY", isSignal: true, isRequired: false, transformFunction: null }, maximizable: { classPropertyName: "maximizable", publicName: "maximizable", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, contained: { classPropertyName: "contained", publicName: "contained", isSignal: true, isRequired: false, transformFunction: null }, focusOnShow: { classPropertyName: "focusOnShow", publicName: "focusOnShow", isSignal: true, isRequired: false, transformFunction: null }, focusTrap: { classPropertyName: "focusTrap", publicName: "focusTrap", isSignal: true, isRequired: false, transformFunction: null }, closeIcon: { classPropertyName: "closeIcon", publicName: "closeIcon", isSignal: true, isRequired: false, transformFunction: null }, maximizeIcon: { classPropertyName: "maximizeIcon", publicName: "maximizeIcon", isSignal: true, isRequired: false, transformFunction: null }, minimizeIcon: { classPropertyName: "minimizeIcon", publicName: "minimizeIcon", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, maximizeAriaLabel: { classPropertyName: "maximizeAriaLabel", publicName: "maximizeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, maskStyleClass: { classPropertyName: "maskStyleClass", publicName: "maskStyleClass", isSignal: true, isRequired: false, transformFunction: null }, dialogStyle: { classPropertyName: "dialogStyle", publicName: "dialogStyle", isSignal: true, isRequired: false, transformFunction: null }, breakpoints: { classPropertyName: "breakpoints", publicName: "breakpoints", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, motionDisabled: { classPropertyName: "motionDisabled", publicName: "motionDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", shown: "shown", hidden: "hidden", maximizedChange: "maximizedChange", dragEnd: "dragEnd", resizeEnd: "resizeEnd" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "closeIconTemplate", first: true, predicate: ["closeicon"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dialogRef", first: true, predicate: ["dialog"], descendants: true, isSignal: true }, { propertyName: "scrimRef", first: true, predicate: ["scrim"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n <!-- Scrim + frame are SIBLINGS (both direct @if children) so each animates its own\n leave independently \u2014 a nested animated element would deadlock the removal.\n The frame carries the dialog's zoom; the dialog itself has no leave binding. -->\n @if (modal()) {\n <div\n #scrim\n class=\"ui-modal-scrim\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #scrimMotion=\"uiMotion\"\n [animate.enter]=\"scrimMotion.enter()\"\n [animate.leave]=\"scrimMotion.leave()\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives in the\n content (CDK focus-trap). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-modal-frame\"\n [class._modal]=\"modal()\"\n [class._contained]=\"contained()\"\n [style.align-items]=\"alignItems()\"\n [style.justify-content]=\"justifyContent()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motion()\"\n [motionDisabled]=\"motionDisabled()\"\n #frameMotion=\"uiMotion\"\n [animate.enter]=\"frameMotion.enter()\"\n [animate.leave]=\"frameMotion.leave()\"\n (pointerdown)=\"onMaskPointerdown($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #dialog\n [class]=\"dialogClasses()\"\n [attr.data-modal-uid]=\"uid\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [style]=\"resolvedDialogStyle()\"\n [style.translate]=\"dragTranslate()\"\n [cdkTrapFocus]=\"focusTrap()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n @if (showHeader()) {\n <div\n class=\"ui-modal-header\"\n [class._draggable]=\"headerDraggable()\"\n (pointerdown)=\"onHeaderPointerdown($event)\"\n >\n <div [attr.id]=\"titleId\" class=\"ui-modal-title\">\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ header() }}\n }\n </div>\n\n <div class=\"ui-modal-header-actions\">\n @if (maximizable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"maximizeAriaLabel()\"\n [attr.aria-pressed]=\"maximized()\"\n (click)=\"toggleMaximize()\"\n >\n <ui-icon [name]=\"maximized() ? minimizeIcon() : maximizeIcon()\" size=\"sm\" />\n </button>\n }\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n @if (closeIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n }\n </button>\n }\n </div>\n </div>\n }\n\n <!-- Body: long content scrolls inside this region. -->\n <div class=\"ui-modal-content\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-modal-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (showResizeHandle()) {\n <!-- Corner resize grip (pointer only, like a native textarea corner). -->\n <span\n class=\"ui-modal-resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event)\"\n ></span>\n }\n </div>\n </div>\n}\n", styles: [".ui-modal-scrim{position:fixed;inset:0;z-index:var(--ui-modal-z-index, 1100);pointer-events:none;background-color:var(--ui-modal-mask-background, var(--primitives-black-50))}.ui-modal-scrim._contained{position:absolute}.ui-modal-frame{position:fixed;inset:0;z-index:var(--ui-modal-z-index, 1100);display:flex;padding:var(--ui-modal-mask-padding, var(--units-lg));pointer-events:none}.ui-modal-frame._modal{pointer-events:auto}.ui-modal-frame._contained{position:absolute}.ui-modal{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex-direction:column;max-width:min(90vw,35rem);max-height:90vh;border:var(--ui-modal-stroke-width, var(--stroke-sm)) solid var(--global-border-subtle);border-radius:var(--ui-modal-dialog-radius, var(--radius-md));background-color:var(--global-background-default);color:var(--global-text-default);box-shadow:var(--shadow-default-lg);font-family:var(--fontfamily-base);outline:none}.ui-modal._contained{max-width:100%;max-height:100%}.ui-modal._maximized{width:100vw;height:100vh;max-width:100vw;max-height:100vh;border-radius:0}.ui-modal._maximized._contained{width:100%;height:100%;max-width:100%;max-height:100%}.ui-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--ui-modal-header-gap, var(--units-sm));padding:var(--ui-modal-dialog-padding, var(--units-lg)) var(--ui-modal-dialog-padding, var(--units-lg)) var(--units-sm)}.ui-modal-header._draggable{cursor:move;-webkit-user-select:none;user-select:none}.ui-modal-title{flex:1 1 auto;min-width:0;font-family:var(--fontfamily-title);font-size:var(--size-typography-title-default);font-weight:var(--weight-bold);line-height:1.3;overflow-wrap:break-word}.ui-modal-header-actions{flex:0 0 auto;display:inline-flex;align-items:center;gap:var(--units-2xs)}.ui-modal-action{display:inline-flex;align-items:center;justify-content:center;width:var(--ui-modal-action-size, 2rem);height:var(--ui-modal-action-size, 2rem);padding:0;border:none;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-modal-action:hover{background-color:var(--global-background-muted-hover);color:var(--global-text-muted-hover)}.ui-modal-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-modal-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--global-border-focus)}@media(prefers-reduced-motion:reduce){.ui-modal-action{transition-duration:.01ms}}:root[data-motion=off] .ui-modal-action{transition-duration:.01ms}.ui-modal-content{flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--ui-modal-dialog-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5}.ui-modal-header+.ui-modal-content{padding-top:0}.ui-modal-footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--units-sm);padding:var(--units-md) var(--ui-modal-dialog-padding, var(--units-lg)) var(--ui-modal-dialog-padding, var(--units-lg));border-top:var(--ui-modal-stroke-width, var(--stroke-sm)) solid var(--global-border-subtle)}.ui-modal-resize-handle{position:absolute;right:0;bottom:0;width:var(--ui-modal-resize-handle-size, 16px);height:var(--ui-modal-resize-handle-size, 16px);cursor:nwse-resize;touch-action:none;color:var(--global-text-muted);background-image:repeating-linear-gradient(-45deg,currentColor 0 1px,transparent 1px 3px);-webkit-mask-image:linear-gradient(-45deg,transparent 0 45%,#000 55%);mask-image:linear-gradient(-45deg,transparent 0 45%,#000 55%);opacity:.5}.ui-modal-resize-handle:hover{opacity:.8}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
580
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: UiModal, isStandalone: true, selector: "ui-modal", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, dismissableMask: { classPropertyName: "dismissableMask", publicName: "dismissableMask", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, blockScroll: { classPropertyName: "blockScroll", publicName: "blockScroll", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, keepInViewport: { classPropertyName: "keepInViewport", publicName: "keepInViewport", isSignal: true, isRequired: false, transformFunction: null }, minX: { classPropertyName: "minX", publicName: "minX", isSignal: true, isRequired: false, transformFunction: null }, minY: { classPropertyName: "minY", publicName: "minY", isSignal: true, isRequired: false, transformFunction: null }, maximizable: { classPropertyName: "maximizable", publicName: "maximizable", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, contained: { classPropertyName: "contained", publicName: "contained", isSignal: true, isRequired: false, transformFunction: null }, focusOnShow: { classPropertyName: "focusOnShow", publicName: "focusOnShow", isSignal: true, isRequired: false, transformFunction: null }, focusTrap: { classPropertyName: "focusTrap", publicName: "focusTrap", isSignal: true, isRequired: false, transformFunction: null }, closeIcon: { classPropertyName: "closeIcon", publicName: "closeIcon", isSignal: true, isRequired: false, transformFunction: null }, maximizeIcon: { classPropertyName: "maximizeIcon", publicName: "maximizeIcon", isSignal: true, isRequired: false, transformFunction: null }, minimizeIcon: { classPropertyName: "minimizeIcon", publicName: "minimizeIcon", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, maximizeAriaLabel: { classPropertyName: "maximizeAriaLabel", publicName: "maximizeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, maskStyleClass: { classPropertyName: "maskStyleClass", publicName: "maskStyleClass", isSignal: true, isRequired: false, transformFunction: null }, dialogStyle: { classPropertyName: "dialogStyle", publicName: "dialogStyle", isSignal: true, isRequired: false, transformFunction: null }, breakpoints: { classPropertyName: "breakpoints", publicName: "breakpoints", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, motionDisabled: { classPropertyName: "motionDisabled", publicName: "motionDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", shown: "shown", hidden: "hidden", maximizedChange: "maximizedChange", dragEnd: "dragEnd", resizeEnd: "resizeEnd" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "closeIconTemplate", first: true, predicate: ["closeicon"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentEl"], descendants: true, isSignal: true }, { propertyName: "dialogRef", first: true, predicate: ["dialog"], descendants: true, isSignal: true }, { propertyName: "scrimRef", first: true, predicate: ["scrim"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n <!-- Scrim + frame are SIBLINGS (both direct @if children) so each animates its own\n leave independently \u2014 a nested animated element would deadlock the removal.\n The frame carries the dialog's zoom; the dialog itself has no leave binding. -->\n @if (modal()) {\n <div\n #scrim\n class=\"ui-modal-scrim\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #scrimMotion=\"uiMotion\"\n [animate.enter]=\"scrimMotion.enter()\"\n [animate.leave]=\"scrimMotion.leave()\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives in the\n content (CDK focus-trap). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-modal-frame\"\n [class._modal]=\"modal()\"\n [class._contained]=\"contained()\"\n [style.align-items]=\"alignItems()\"\n [style.justify-content]=\"justifyContent()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motion()\"\n [motionDisabled]=\"motionDisabled()\"\n #frameMotion=\"uiMotion\"\n [animate.enter]=\"frameMotion.enter()\"\n [animate.leave]=\"frameMotion.leave()\"\n (pointerdown)=\"onMaskPointerdown($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #dialog\n [class]=\"dialogClasses()\"\n [attr.data-modal-uid]=\"uid\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [style]=\"resolvedDialogStyle()\"\n [style.translate]=\"dragTranslate()\"\n [cdkTrapFocus]=\"focusTrap()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n @if (showHeader()) {\n <div\n class=\"ui-modal-header\"\n [class._draggable]=\"headerDraggable()\"\n (pointerdown)=\"onHeaderPointerdown($event)\"\n >\n <div [attr.id]=\"titleId\" class=\"ui-modal-title\">\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ header() }}\n }\n </div>\n\n <div class=\"ui-modal-header-actions\">\n @if (maximizable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"maximizeAriaLabel()\"\n [attr.aria-pressed]=\"maximized()\"\n (click)=\"toggleMaximize()\"\n >\n <ui-icon [name]=\"maximized() ? minimizeIcon() : maximizeIcon()\" size=\"sm\" />\n </button>\n }\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n @if (closeIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n }\n </button>\n }\n </div>\n </div>\n }\n\n <!-- Body: long content scrolls inside this region. It becomes focusable ONLY once it\n actually overflows AND holds nothing focusable of its own: a keyboard user must be able\n to reach the scrollbar (the footer buttons sit outside this region), but an unconditional\n tab stop would insert itself into the focus order of every dialog. -->\n <div #contentEl class=\"ui-modal-content\" [attr.tabindex]=\"contentNeedsFocus() ? 0 : null\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-modal-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (showResizeHandle()) {\n <!-- Corner resize grip (pointer only, like a native textarea corner). -->\n <span\n class=\"ui-modal-resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event)\"\n ></span>\n }\n </div>\n </div>\n}\n", styles: [".ui-modal-scrim{position:fixed;inset:0;z-index:var(--ui-modal-z-index, 1100);pointer-events:none;background-color:var(--ui-modal-mask-background, var(--primitives-black-50))}.ui-modal-scrim._contained{position:absolute}.ui-modal-frame{position:fixed;inset:0;z-index:var(--ui-modal-z-index, 1100);display:flex;padding:var(--ui-modal-mask-padding, var(--units-lg));pointer-events:none}.ui-modal-frame._modal{pointer-events:auto}.ui-modal-frame._contained{position:absolute}.ui-modal{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex-direction:column;max-width:min(90vw,35rem);max-height:90vh;border:var(--ui-modal-stroke-width, var(--stroke-sm)) solid var(--global-border-subtle);border-radius:var(--ui-modal-dialog-radius, var(--radius-md));background-color:var(--global-background-default);color:var(--global-text-default);box-shadow:var(--shadow-default-lg);font-family:var(--fontfamily-base);outline:none}.ui-modal._contained{max-width:100%;max-height:100%}.ui-modal._maximized{width:100vw;height:100vh;max-width:100vw;max-height:100vh;border-radius:0}.ui-modal._maximized._contained{width:100%;height:100%;max-width:100%;max-height:100%}.ui-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--ui-modal-header-gap, var(--units-sm));padding:var(--ui-modal-dialog-padding, var(--units-lg)) var(--ui-modal-dialog-padding, var(--units-lg)) var(--units-sm)}.ui-modal-header._draggable{cursor:move;-webkit-user-select:none;user-select:none}.ui-modal-title{flex:1 1 auto;min-width:0;font-family:var(--fontfamily-title);font-size:var(--size-typography-title-default);font-weight:var(--weight-bold);line-height:1.3;overflow-wrap:break-word}.ui-modal-header-actions{flex:0 0 auto;display:inline-flex;align-items:center;gap:var(--units-2xs)}.ui-modal-action{display:inline-flex;align-items:center;justify-content:center;width:var(--ui-modal-action-size, 2rem);height:var(--ui-modal-action-size, 2rem);padding:0;border:none;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-modal-action:hover{background-color:var(--global-background-muted-hover);color:var(--global-text-muted-hover)}.ui-modal-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-modal-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--global-border-focus)}@media(prefers-reduced-motion:reduce){.ui-modal-action{transition-duration:.01ms}}:root[data-motion=off] .ui-modal-action{transition-duration:.01ms}.ui-modal-content{flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--ui-modal-dialog-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5}.ui-modal-header+.ui-modal-content{padding-top:0}.ui-modal-footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--units-sm);padding:var(--units-md) var(--ui-modal-dialog-padding, var(--units-lg)) var(--ui-modal-dialog-padding, var(--units-lg));border-top:var(--ui-modal-stroke-width, var(--stroke-sm)) solid var(--global-border-subtle)}.ui-modal-resize-handle{position:absolute;right:0;bottom:0;width:var(--ui-modal-resize-handle-size, 16px);height:var(--ui-modal-resize-handle-size, 16px);cursor:nwse-resize;touch-action:none;color:var(--global-text-muted);background-image:repeating-linear-gradient(-45deg,currentColor 0 1px,transparent 1px 3px);-webkit-mask-image:linear-gradient(-45deg,transparent 0 45%,#000 55%);mask-image:linear-gradient(-45deg,transparent 0 45%,#000 55%);opacity:.5}.ui-modal-resize-handle:hover{opacity:.8}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
540
581
  }
541
582
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiModal, decorators: [{
542
583
  type: Component,
543
- args: [{ selector: 'ui-modal', imports: [NgTemplateOutlet, A11yModule, UiMotion, UiIcon], template: "@if (visible()) {\n <!-- Scrim + frame are SIBLINGS (both direct @if children) so each animates its own\n leave independently \u2014 a nested animated element would deadlock the removal.\n The frame carries the dialog's zoom; the dialog itself has no leave binding. -->\n @if (modal()) {\n <div\n #scrim\n class=\"ui-modal-scrim\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #scrimMotion=\"uiMotion\"\n [animate.enter]=\"scrimMotion.enter()\"\n [animate.leave]=\"scrimMotion.leave()\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives in the\n content (CDK focus-trap). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-modal-frame\"\n [class._modal]=\"modal()\"\n [class._contained]=\"contained()\"\n [style.align-items]=\"alignItems()\"\n [style.justify-content]=\"justifyContent()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motion()\"\n [motionDisabled]=\"motionDisabled()\"\n #frameMotion=\"uiMotion\"\n [animate.enter]=\"frameMotion.enter()\"\n [animate.leave]=\"frameMotion.leave()\"\n (pointerdown)=\"onMaskPointerdown($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #dialog\n [class]=\"dialogClasses()\"\n [attr.data-modal-uid]=\"uid\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [style]=\"resolvedDialogStyle()\"\n [style.translate]=\"dragTranslate()\"\n [cdkTrapFocus]=\"focusTrap()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n @if (showHeader()) {\n <div\n class=\"ui-modal-header\"\n [class._draggable]=\"headerDraggable()\"\n (pointerdown)=\"onHeaderPointerdown($event)\"\n >\n <div [attr.id]=\"titleId\" class=\"ui-modal-title\">\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ header() }}\n }\n </div>\n\n <div class=\"ui-modal-header-actions\">\n @if (maximizable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"maximizeAriaLabel()\"\n [attr.aria-pressed]=\"maximized()\"\n (click)=\"toggleMaximize()\"\n >\n <ui-icon [name]=\"maximized() ? minimizeIcon() : maximizeIcon()\" size=\"sm\" />\n </button>\n }\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n @if (closeIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n }\n </button>\n }\n </div>\n </div>\n }\n\n <!-- Body: long content scrolls inside this region. -->\n <div class=\"ui-modal-content\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-modal-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (showResizeHandle()) {\n <!-- Corner resize grip (pointer only, like a native textarea corner). -->\n <span\n class=\"ui-modal-resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event)\"\n ></span>\n }\n </div>\n </div>\n}\n", styles: [".ui-modal-scrim{position:fixed;inset:0;z-index:var(--ui-modal-z-index, 1100);pointer-events:none;background-color:var(--ui-modal-mask-background, var(--primitives-black-50))}.ui-modal-scrim._contained{position:absolute}.ui-modal-frame{position:fixed;inset:0;z-index:var(--ui-modal-z-index, 1100);display:flex;padding:var(--ui-modal-mask-padding, var(--units-lg));pointer-events:none}.ui-modal-frame._modal{pointer-events:auto}.ui-modal-frame._contained{position:absolute}.ui-modal{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex-direction:column;max-width:min(90vw,35rem);max-height:90vh;border:var(--ui-modal-stroke-width, var(--stroke-sm)) solid var(--global-border-subtle);border-radius:var(--ui-modal-dialog-radius, var(--radius-md));background-color:var(--global-background-default);color:var(--global-text-default);box-shadow:var(--shadow-default-lg);font-family:var(--fontfamily-base);outline:none}.ui-modal._contained{max-width:100%;max-height:100%}.ui-modal._maximized{width:100vw;height:100vh;max-width:100vw;max-height:100vh;border-radius:0}.ui-modal._maximized._contained{width:100%;height:100%;max-width:100%;max-height:100%}.ui-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--ui-modal-header-gap, var(--units-sm));padding:var(--ui-modal-dialog-padding, var(--units-lg)) var(--ui-modal-dialog-padding, var(--units-lg)) var(--units-sm)}.ui-modal-header._draggable{cursor:move;-webkit-user-select:none;user-select:none}.ui-modal-title{flex:1 1 auto;min-width:0;font-family:var(--fontfamily-title);font-size:var(--size-typography-title-default);font-weight:var(--weight-bold);line-height:1.3;overflow-wrap:break-word}.ui-modal-header-actions{flex:0 0 auto;display:inline-flex;align-items:center;gap:var(--units-2xs)}.ui-modal-action{display:inline-flex;align-items:center;justify-content:center;width:var(--ui-modal-action-size, 2rem);height:var(--ui-modal-action-size, 2rem);padding:0;border:none;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-modal-action:hover{background-color:var(--global-background-muted-hover);color:var(--global-text-muted-hover)}.ui-modal-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-modal-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--global-border-focus)}@media(prefers-reduced-motion:reduce){.ui-modal-action{transition-duration:.01ms}}:root[data-motion=off] .ui-modal-action{transition-duration:.01ms}.ui-modal-content{flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--ui-modal-dialog-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5}.ui-modal-header+.ui-modal-content{padding-top:0}.ui-modal-footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--units-sm);padding:var(--units-md) var(--ui-modal-dialog-padding, var(--units-lg)) var(--ui-modal-dialog-padding, var(--units-lg));border-top:var(--ui-modal-stroke-width, var(--stroke-sm)) solid var(--global-border-subtle)}.ui-modal-resize-handle{position:absolute;right:0;bottom:0;width:var(--ui-modal-resize-handle-size, 16px);height:var(--ui-modal-resize-handle-size, 16px);cursor:nwse-resize;touch-action:none;color:var(--global-text-muted);background-image:repeating-linear-gradient(-45deg,currentColor 0 1px,transparent 1px 3px);-webkit-mask-image:linear-gradient(-45deg,transparent 0 45%,#000 55%);mask-image:linear-gradient(-45deg,transparent 0 45%,#000 55%);opacity:.5}.ui-modal-resize-handle:hover{opacity:.8}\n"] }]
544
- }], ctorParameters: () => [], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], dismissableMask: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissableMask", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], blockScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "blockScroll", required: false }] }], showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], keepInViewport: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepInViewport", required: false }] }], minX: [{ type: i0.Input, args: [{ isSignal: true, alias: "minX", required: false }] }], minY: [{ type: i0.Input, args: [{ isSignal: true, alias: "minY", required: false }] }], maximizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizable", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], contained: [{ type: i0.Input, args: [{ isSignal: true, alias: "contained", required: false }] }], focusOnShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnShow", required: false }] }], focusTrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusTrap", required: false }] }], closeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIcon", required: false }] }], maximizeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizeIcon", required: false }] }], minimizeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimizeIcon", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], maximizeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizeAriaLabel", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], maskStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "maskStyleClass", required: false }] }], dialogStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogStyle", required: false }] }], breakpoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoints", required: false }] }], autoZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoZIndex", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], motionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionDisabled", required: false }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], closeIconTemplate: [{ type: i0.ContentChild, args: ['closeicon', { isSignal: true }] }], shown: [{ type: i0.Output, args: ["shown"] }], hidden: [{ type: i0.Output, args: ["hidden"] }], maximizedChange: [{ type: i0.Output, args: ["maximizedChange"] }], dragEnd: [{ type: i0.Output, args: ["dragEnd"] }], resizeEnd: [{ type: i0.Output, args: ["resizeEnd"] }], dialogRef: [{ type: i0.ViewChild, args: ['dialog', { isSignal: true }] }], scrimRef: [{ type: i0.ViewChild, args: ['scrim', { isSignal: true }] }] } });
584
+ args: [{ selector: 'ui-modal', imports: [NgTemplateOutlet, A11yModule, UiMotion, UiIcon], template: "@if (visible()) {\n <!-- Scrim + frame are SIBLINGS (both direct @if children) so each animates its own\n leave independently \u2014 a nested animated element would deadlock the removal.\n The frame carries the dialog's zoom; the dialog itself has no leave binding. -->\n @if (modal()) {\n <div\n #scrim\n class=\"ui-modal-scrim\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #scrimMotion=\"uiMotion\"\n [animate.enter]=\"scrimMotion.enter()\"\n [animate.leave]=\"scrimMotion.leave()\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives in the\n content (CDK focus-trap). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-modal-frame\"\n [class._modal]=\"modal()\"\n [class._contained]=\"contained()\"\n [style.align-items]=\"alignItems()\"\n [style.justify-content]=\"justifyContent()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motion()\"\n [motionDisabled]=\"motionDisabled()\"\n #frameMotion=\"uiMotion\"\n [animate.enter]=\"frameMotion.enter()\"\n [animate.leave]=\"frameMotion.leave()\"\n (pointerdown)=\"onMaskPointerdown($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #dialog\n [class]=\"dialogClasses()\"\n [attr.data-modal-uid]=\"uid\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [style]=\"resolvedDialogStyle()\"\n [style.translate]=\"dragTranslate()\"\n [cdkTrapFocus]=\"focusTrap()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n @if (showHeader()) {\n <div\n class=\"ui-modal-header\"\n [class._draggable]=\"headerDraggable()\"\n (pointerdown)=\"onHeaderPointerdown($event)\"\n >\n <div [attr.id]=\"titleId\" class=\"ui-modal-title\">\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ header() }}\n }\n </div>\n\n <div class=\"ui-modal-header-actions\">\n @if (maximizable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"maximizeAriaLabel()\"\n [attr.aria-pressed]=\"maximized()\"\n (click)=\"toggleMaximize()\"\n >\n <ui-icon [name]=\"maximized() ? minimizeIcon() : maximizeIcon()\" size=\"sm\" />\n </button>\n }\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n @if (closeIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n }\n </button>\n }\n </div>\n </div>\n }\n\n <!-- Body: long content scrolls inside this region. It becomes focusable ONLY once it\n actually overflows AND holds nothing focusable of its own: a keyboard user must be able\n to reach the scrollbar (the footer buttons sit outside this region), but an unconditional\n tab stop would insert itself into the focus order of every dialog. -->\n <div #contentEl class=\"ui-modal-content\" [attr.tabindex]=\"contentNeedsFocus() ? 0 : null\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-modal-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (showResizeHandle()) {\n <!-- Corner resize grip (pointer only, like a native textarea corner). -->\n <span\n class=\"ui-modal-resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event)\"\n ></span>\n }\n </div>\n </div>\n}\n", styles: [".ui-modal-scrim{position:fixed;inset:0;z-index:var(--ui-modal-z-index, 1100);pointer-events:none;background-color:var(--ui-modal-mask-background, var(--primitives-black-50))}.ui-modal-scrim._contained{position:absolute}.ui-modal-frame{position:fixed;inset:0;z-index:var(--ui-modal-z-index, 1100);display:flex;padding:var(--ui-modal-mask-padding, var(--units-lg));pointer-events:none}.ui-modal-frame._modal{pointer-events:auto}.ui-modal-frame._contained{position:absolute}.ui-modal{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex-direction:column;max-width:min(90vw,35rem);max-height:90vh;border:var(--ui-modal-stroke-width, var(--stroke-sm)) solid var(--global-border-subtle);border-radius:var(--ui-modal-dialog-radius, var(--radius-md));background-color:var(--global-background-default);color:var(--global-text-default);box-shadow:var(--shadow-default-lg);font-family:var(--fontfamily-base);outline:none}.ui-modal._contained{max-width:100%;max-height:100%}.ui-modal._maximized{width:100vw;height:100vh;max-width:100vw;max-height:100vh;border-radius:0}.ui-modal._maximized._contained{width:100%;height:100%;max-width:100%;max-height:100%}.ui-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--ui-modal-header-gap, var(--units-sm));padding:var(--ui-modal-dialog-padding, var(--units-lg)) var(--ui-modal-dialog-padding, var(--units-lg)) var(--units-sm)}.ui-modal-header._draggable{cursor:move;-webkit-user-select:none;user-select:none}.ui-modal-title{flex:1 1 auto;min-width:0;font-family:var(--fontfamily-title);font-size:var(--size-typography-title-default);font-weight:var(--weight-bold);line-height:1.3;overflow-wrap:break-word}.ui-modal-header-actions{flex:0 0 auto;display:inline-flex;align-items:center;gap:var(--units-2xs)}.ui-modal-action{display:inline-flex;align-items:center;justify-content:center;width:var(--ui-modal-action-size, 2rem);height:var(--ui-modal-action-size, 2rem);padding:0;border:none;border-radius:var(--radius-xs);background:transparent;color:inherit;line-height:0;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-modal-action:hover{background-color:var(--global-background-muted-hover);color:var(--global-text-muted-hover)}.ui-modal-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-modal-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--global-border-focus)}@media(prefers-reduced-motion:reduce){.ui-modal-action{transition-duration:.01ms}}:root[data-motion=off] .ui-modal-action{transition-duration:.01ms}.ui-modal-content{flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--ui-modal-dialog-padding, var(--units-lg));font-size:var(--size-typography-text-md);line-height:1.5}.ui-modal-header+.ui-modal-content{padding-top:0}.ui-modal-footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--units-sm);padding:var(--units-md) var(--ui-modal-dialog-padding, var(--units-lg)) var(--ui-modal-dialog-padding, var(--units-lg));border-top:var(--ui-modal-stroke-width, var(--stroke-sm)) solid var(--global-border-subtle)}.ui-modal-resize-handle{position:absolute;right:0;bottom:0;width:var(--ui-modal-resize-handle-size, 16px);height:var(--ui-modal-resize-handle-size, 16px);cursor:nwse-resize;touch-action:none;color:var(--global-text-muted);background-image:repeating-linear-gradient(-45deg,currentColor 0 1px,transparent 1px 3px);-webkit-mask-image:linear-gradient(-45deg,transparent 0 45%,#000 55%);mask-image:linear-gradient(-45deg,transparent 0 45%,#000 55%);opacity:.5}.ui-modal-resize-handle:hover{opacity:.8}\n"] }]
585
+ }], ctorParameters: () => [], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], dismissableMask: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissableMask", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], blockScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "blockScroll", required: false }] }], showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], keepInViewport: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepInViewport", required: false }] }], minX: [{ type: i0.Input, args: [{ isSignal: true, alias: "minX", required: false }] }], minY: [{ type: i0.Input, args: [{ isSignal: true, alias: "minY", required: false }] }], maximizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizable", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], contained: [{ type: i0.Input, args: [{ isSignal: true, alias: "contained", required: false }] }], focusOnShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnShow", required: false }] }], focusTrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusTrap", required: false }] }], closeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIcon", required: false }] }], maximizeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizeIcon", required: false }] }], minimizeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimizeIcon", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], maximizeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizeAriaLabel", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], maskStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "maskStyleClass", required: false }] }], dialogStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogStyle", required: false }] }], breakpoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoints", required: false }] }], autoZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoZIndex", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], motionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionDisabled", required: false }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], closeIconTemplate: [{ type: i0.ContentChild, args: ['closeicon', { isSignal: true }] }], shown: [{ type: i0.Output, args: ["shown"] }], hidden: [{ type: i0.Output, args: ["hidden"] }], maximizedChange: [{ type: i0.Output, args: ["maximizedChange"] }], dragEnd: [{ type: i0.Output, args: ["dragEnd"] }], resizeEnd: [{ type: i0.Output, args: ["resizeEnd"] }], contentRef: [{ type: i0.ViewChild, args: ['contentEl', { isSignal: true }] }], dialogRef: [{ type: i0.ViewChild, args: ['dialog', { isSignal: true }] }], scrimRef: [{ type: i0.ViewChild, args: ['scrim', { isSignal: true }] }] } });
545
586
 
546
587
  /*
547
588
  * Public API Surface of ui-kit/ui-modal
@@ -1 +1 @@
1
- {"version":3,"file":"4sh-ui-kit-layout-ui-modal.mjs","sources":["../../../projects/ui-kit/layout/ui-modal/src/lib/ui-modal.ts","../../../projects/ui-kit/layout/ui-modal/src/lib/ui-modal.html","../../../projects/ui-kit/layout/ui-modal/src/public-api.ts","../../../projects/ui-kit/layout/ui-modal/src/4sh-ui-kit-layout-ui-modal.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n model,\n numberAttribute,\n output,\n PLATFORM_ID,\n signal,\n TemplateRef,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { UiMotion, UiMotionPreset } from '@4sh/ui-kit/motion';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\n\n/** Where the dialog is anchored inside the viewport mask. */\nexport type ModalPosition =\n | 'center'\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'topleft'\n | 'topright'\n | 'bottomleft'\n | 'bottomright';\n\n/** Base stacking level — mirrors `$modal-z-index` in the SCSS. */\nconst MODAL_BASE_Z_INDEX = 1100;\n\n/** Process-wide sequence so `autoZIndex` layers a later dialog above earlier ones. */\nlet zIndexSeq = 0;\n/** Process-wide unique id source (aria wiring + responsive style scoping). */\nlet nextUid = 0;\n\n// --- Body scroll lock (ref-counted, shared across nested dialogs) -------\nlet scrollLockCount = 0;\nlet savedOverflow = '';\nlet savedPaddingRight = '';\n\n/** Freeze background scroll, compensating the scrollbar gutter to avoid a shift. */\nfunction lockBodyScroll(doc: Document): void {\n if (scrollLockCount === 0) {\n const body = doc.body;\n const gap = (doc.defaultView?.innerWidth ?? 0) - doc.documentElement.clientWidth;\n savedOverflow = body.style.overflow;\n savedPaddingRight = body.style.paddingRight;\n body.style.overflow = 'hidden';\n if (gap > 0) body.style.paddingRight = `${gap}px`;\n }\n scrollLockCount++;\n}\n\n/** Release one scroll lock; restore the body when the last dialog closes. */\nfunction unlockBodyScroll(doc: Document): void {\n scrollLockCount = Math.max(0, scrollLockCount - 1);\n if (scrollLockCount === 0) {\n doc.body.style.overflow = savedOverflow;\n doc.body.style.paddingRight = savedPaddingRight;\n }\n}\n\n/**\n * ui-modal — headless dialog / modal window.\n *\n * A token-styled floating surface rendered over a viewport mask, driven by the\n * two-way `visible` model. Enter/leave run through the shared motion system\n * (mask fade + dialog `zoom` by default). Built for accessibility: focus trap\n * with focus restore (`@angular/cdk/a11y`), `aria-modal`, background scroll\n * lock, `Escape` to close, and an optional click-outside dismiss.\n *\n * Composes header / content / footer regions: a plain `header` string (or the\n * `#header` template), the default `<ng-content>` for the body, and a `#footer`\n * template for actions. Supports `draggable`, `maximizable`, nine `position`s,\n * modal / non-modal, and per-breakpoint widths (`breakpoints`).\n *\n * @example\n * ```html\n * <ui-button label=\"Ouvrir\" (buttonClick)=\"open.set(true)\" />\n * <ui-modal [(visible)]=\"open\" header=\"Titre\" [dialogStyle]=\"{ width: '32rem' }\">\n * <p>Contenu…</p>\n * <ng-template #footer>\n * <ui-button label=\"Fermer\" level=\"low\" (buttonClick)=\"open.set(false)\" />\n * </ng-template>\n * </ui-modal>\n * ```\n */\n@Component({\n selector: 'ui-modal',\n imports: [NgTemplateOutlet, A11yModule, UiMotion, UiIcon],\n templateUrl: './ui-modal.html',\n styleUrl: './ui-modal.scss',\n})\nexport class UiModal {\n /** Open state (two-way). Toggling it drives the enter/leave animation. */\n visible = model(false);\n\n /** Simple header text (ignored when a `#header` template is projected). */\n header = input<string>();\n /** ARIA role of the dialog surface. */\n role = input<string>('dialog');\n /** Accessible name when there is no visible header to reference. */\n ariaLabel = input<string>();\n /** Id of an external element naming the dialog (overrides the header title). */\n ariaLabelledBy = input<string>();\n\n /** Show the mask (dim + capture) and block background scroll. */\n modal = input(true, { transform: booleanAttribute });\n /** Close when the mask (outside the dialog) is clicked — modal only. */\n dismissableMask = input(false, { transform: booleanAttribute });\n /** Show the close (×) button and allow `Escape` to close. */\n closable = input(true, { transform: booleanAttribute });\n /** Close the dialog when `Escape` is pressed. */\n closeOnEscape = input(true, { transform: booleanAttribute });\n /** Block background scroll even for a non-modal dialog. */\n blockScroll = input(false, { transform: booleanAttribute });\n /** Render the header region (title + actions). */\n showHeader = input(true, { transform: booleanAttribute });\n\n /** Allow dragging the dialog by its header. */\n draggable = input(false, { transform: booleanAttribute });\n /** Keep the dialog fully inside the viewport while dragging. */\n keepInViewport = input(true, { transform: booleanAttribute });\n /** Minimum left offset kept while dragging (px). */\n minX = input(0, { transform: numberAttribute });\n /** Minimum top offset kept while dragging (px). */\n minY = input(0, { transform: numberAttribute });\n\n /** Show the maximize / restore toggle in the header. */\n maximizable = input(false, { transform: booleanAttribute });\n /** Allow resizing the dialog from its bottom-right corner (pointer only). */\n resizable = input(false, { transform: booleanAttribute });\n /** Minimum dialog width while resizing (px). */\n minWidth = input(150, { transform: numberAttribute });\n /** Minimum dialog height while resizing (px). */\n minHeight = input(100, { transform: numberAttribute });\n /** Anchor position inside the viewport mask. */\n position = input<ModalPosition>('center');\n /**\n * Scope the dialog to the nearest positioned ancestor (`position: absolute`)\n * instead of the viewport (`position: fixed`), and skip the body scroll lock.\n * Useful to embed a dialog inside a bounded container (docs previews, panels).\n */\n contained = input(false, { transform: booleanAttribute });\n\n /** Move focus into the dialog when it opens (auto-captured, restored on close). */\n focusOnShow = input(true, { transform: booleanAttribute });\n /** Trap Tab focus inside the dialog while open. */\n focusTrap = input(true, { transform: booleanAttribute });\n\n /** FontAwesome name of the close button icon. */\n closeIcon = input<string>('xmark');\n /** FontAwesome name of the maximize icon. */\n maximizeIcon = input<string>('expand');\n /** FontAwesome name of the restore (minimize) icon. */\n minimizeIcon = input<string>('compress');\n /** Accessible name of the close button. */\n closeAriaLabel = input<string>('Fermer');\n /** Accessible name of the maximize / restore button. */\n maximizeAriaLabel = input<string>('Agrandir');\n\n /** Extra class(es) merged onto the dialog surface. */\n styleClass = input<string>();\n /** Extra class(es) merged onto the mask. */\n maskStyleClass = input<string>();\n /** Inline styles applied to the dialog (e.g. `{ width: '32rem' }`). */\n dialogStyle = input<Record<string, string>>();\n /** Per-breakpoint widths, keyed by a `max-width` (e.g. `{ '960px': '75vw' }`). */\n breakpoints = input<Record<string, string>>();\n\n /** Layer this dialog above earlier overlays automatically. */\n autoZIndex = input(true, { transform: booleanAttribute });\n /** Floor z-index (added to the auto value, or used as-is when `autoZIndex=false`). */\n baseZIndex = input(0, { transform: numberAttribute });\n\n /** Enter/leave preset for the dialog surface (mask always fades). */\n motion = input<UiMotionPreset>('zoom');\n /** Disable the open/close animation for this dialog. */\n motionDisabled = input(false, { transform: booleanAttribute });\n\n /** Custom header template (replaces the `header` string). */\n protected readonly headerTemplate = contentChild<TemplateRef<unknown>>('header');\n /** Footer template (actions row). */\n protected readonly footerTemplate = contentChild<TemplateRef<unknown>>('footer');\n /** Custom close-icon template (replaces `closeIcon`). */\n protected readonly closeIconTemplate = contentChild<TemplateRef<unknown>>('closeicon');\n\n /** Emitted after the dialog becomes visible. */\n shown = output<void>();\n /** Emitted after the dialog is hidden. */\n hidden = output<void>();\n /** Emitted when the maximize state is toggled. */\n maximizedChange = output<{ maximized: boolean }>();\n /** Emitted when a drag gesture ends. */\n dragEnd = output<void>();\n /** Emitted when a resize gesture ends. */\n resizeEnd = output<{ width: number; height: number }>();\n\n /** @ignore */\n private readonly dialogRef = viewChild<ElementRef<HTMLElement>>('dialog');\n /** @ignore Scrim host (for imperative `maskStyleClass` — a bound `[class]` would\n * fight the motion classes and break the leave animation). */\n private readonly scrimRef = viewChild<ElementRef<HTMLElement>>('scrim');\n /** @ignore Classes currently applied to the scrim by `maskStyleClass`. */\n private appliedMaskClasses: string[] = [];\n\n /** @ignore */\n private readonly document = inject(DOCUMENT);\n /** @ignore */\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n /** @ignore Per-instance layering rank for `autoZIndex`. */\n private readonly zSeq = ++zIndexSeq;\n\n /** @ignore */\n protected readonly uid = `ui-modal-${nextUid++}`;\n /** @ignore */\n protected readonly titleId = `${this.uid}-title`;\n\n /** @ignore Maximized (fills the viewport). */\n protected readonly maximized = signal(false);\n /** @ignore Cumulative drag offset applied via the independent `translate` property\n * (does not clash with the `zoom` animation, which drives `transform`). */\n protected readonly dragOffset = signal<{ x: number; y: number } | null>(null);\n /** @ignore Explicit dialog size while resizing (overrides `dialogStyle` width/height). */\n protected readonly resizeSize = signal<{ w: number; h: number } | null>(null);\n\n /** @ignore This instance currently holds a body scroll lock. */\n private locked = false;\n /** @ignore Runtime `<style>` element backing `breakpoints`. */\n private styleEl: HTMLStyleElement | null = null;\n\n /** @ignore Effective stacking level. */\n protected readonly zIndex = computed(() => {\n const base = this.baseZIndex();\n if (this.autoZIndex()) return MODAL_BASE_Z_INDEX + base + this.zSeq;\n return base > 0 ? base : MODAL_BASE_Z_INDEX;\n });\n\n // NOTE: the scrim and frame carry `animate.enter`/`animate.leave`. They MUST use a\n // static `class` + per-class `[class.x]` toggles (like ui-toast) — a whole-string\n // `[class]=\"expr()\"` binding fights the motion classes Angular adds and restarts the\n // animation every frame (leave never ends → node never removed). Position is applied\n // via `[style]` for the same reason.\n\n /** @ignore Cross-axis alignment of the dialog inside the frame. */\n protected readonly alignItems = computed(() => {\n const p = this.position();\n if (p.startsWith('top')) return 'flex-start';\n if (p.startsWith('bottom')) return 'flex-end';\n return 'center';\n });\n /** @ignore Main-axis alignment of the dialog inside the frame. */\n protected readonly justifyContent = computed(() => {\n const p = this.position();\n if (p.endsWith('left')) return 'flex-start';\n if (p.endsWith('right')) return 'flex-end';\n return 'center';\n });\n\n /** @ignore */\n protected readonly dialogClasses = computed(() => {\n const c = ['ui-modal'];\n if (this.maximized()) c.push('_maximized');\n if (this.contained()) c.push('_contained');\n const extra = this.styleClass();\n if (extra) c.push(extra);\n return c.join(' ');\n });\n\n /** @ignore Header is draggable when enabled and not maximized. */\n protected readonly headerDraggable = computed(() => this.draggable() && !this.maximized());\n\n /** @ignore Drag offset serialised for the `translate` CSS property. */\n protected readonly dragTranslate = computed(() => {\n if (this.maximized()) return null;\n const o = this.dragOffset();\n return o ? `${o.x}px ${o.y}px` : null;\n });\n\n /** @ignore Inline styles for the dialog: `dialogStyle` plus the resize size\n * (which wins), dropped entirely while maximized. */\n protected readonly resolvedDialogStyle = computed(() => {\n if (this.maximized()) return null;\n const base: Record<string, string> = { ...(this.dialogStyle() ?? {}) };\n const size = this.resizeSize();\n if (size) {\n base['width'] = `${size.w}px`;\n base['height'] = `${size.h}px`;\n }\n return Object.keys(base).length ? base : null;\n });\n\n /** @ignore The resize grip shows when resizable and not maximized. */\n protected readonly showResizeHandle = computed(() => this.resizable() && !this.maximized());\n\n /** @ignore Id of the element naming the dialog (header title, or an external id). */\n protected readonly labelledBy = computed(\n () => this.ariaLabelledBy() ?? (this.showHeader() && this.header() ? this.titleId : null),\n );\n /** @ignore Fallback accessible name when nothing is referenced. */\n protected readonly resolvedAriaLabel = computed(() =>\n this.labelledBy() ? null : this.ariaLabel(),\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n let wasVisible = false;\n\n // Open/close side effects: scroll lock, lifecycle events, state reset.\n effect(() => {\n const v = this.visible();\n untracked(() => {\n if (v && !wasVisible) {\n wasVisible = true;\n // A contained dialog is embedded, not a real overlay → never lock the body.\n if (this.isBrowser && !this.contained() && (this.modal() || this.blockScroll())) {\n lockBodyScroll(this.document);\n this.locked = true;\n }\n this.shown.emit();\n } else if (!v && wasVisible) {\n wasVisible = false;\n this.releaseLock();\n this.maximized.set(false);\n this.dragOffset.set(null);\n this.resizeSize.set(null);\n this.hidden.emit();\n }\n });\n });\n\n // Rebuild the responsive width stylesheet when `breakpoints` changes.\n effect(() => {\n const bps = this.breakpoints();\n untracked(() => this.applyBreakpoints(bps));\n });\n\n // Apply `maskStyleClass` imperatively (see scrimRef note).\n effect(() => {\n const el = this.scrimRef()?.nativeElement;\n const raw = this.maskStyleClass();\n untracked(() => {\n for (const c of this.appliedMaskClasses) el?.classList.remove(c);\n this.appliedMaskClasses = el && raw ? raw.split(/\\s+/).filter(Boolean) : [];\n for (const c of this.appliedMaskClasses) el!.classList.add(c);\n });\n });\n\n // A11y safeguard: a dialog must have an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this.visible() && !this.labelledBy() && !this.resolvedAriaLabel()) {\n console.warn(\n '[ui-modal] Dialog has no accessible name: provide `header`, `ariaLabel` or `ariaLabelledBy`.',\n );\n }\n });\n }\n\n destroyRef.onDestroy(() => {\n this.releaseLock();\n this.removeStyleElement();\n this.removeDragListeners();\n this.removeResizeListeners();\n });\n }\n\n /** Close the dialog. */\n close(): void {\n this.visible.set(false);\n }\n\n /** Move focus onto the dialog surface. */\n focus(): void {\n this.dialogRef()?.nativeElement.focus();\n }\n\n /** @ignore Toggle maximized; lock scroll for a non-modal dialog that now fills the screen. */\n protected toggleMaximize(): void {\n const next = !this.maximized();\n this.maximized.set(next);\n if (next) {\n this.dragOffset.set(null);\n this.resizeSize.set(null);\n }\n if (this.isBrowser && !this.contained() && !this.modal() && !this.blockScroll()) {\n if (next) {\n lockBodyScroll(this.document);\n this.locked = true;\n } else {\n this.releaseLock();\n }\n }\n this.maximizedChange.emit({ maximized: next });\n }\n\n /** @ignore Escape-to-close (bubbles from any focused control inside the dialog). */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.closeOnEscape() && this.closable()) {\n event.stopPropagation();\n this.close();\n }\n }\n\n /** @ignore Click-outside dismiss (mask target only, modal + dismissable). */\n protected onMaskPointerdown(event: PointerEvent): void {\n if (!this.modal() || !this.dismissableMask() || !this.closable()) return;\n if (event.target === event.currentTarget) this.close();\n }\n\n // --- Drag (header handle) -------------------------------------------\n\n /** @ignore */\n private dragging = false;\n /** @ignore */\n private lastX = 0;\n /** @ignore */\n private lastY = 0;\n /** @ignore */\n private readonly moveHandler = (e: PointerEvent): void => this.onDrag(e);\n /** @ignore */\n private readonly upHandler = (e: PointerEvent): void => this.endDrag(e);\n\n /** @ignore */\n protected onHeaderPointerdown(event: PointerEvent): void {\n if (!this.headerDraggable() || event.button !== 0) return;\n // Never start a drag from the header action buttons.\n if ((event.target as HTMLElement).closest('button')) return;\n this.dragging = true;\n this.lastX = event.clientX;\n this.lastY = event.clientY;\n this.document.addEventListener('pointermove', this.moveHandler);\n this.document.addEventListener('pointerup', this.upHandler);\n this.document.body.style.userSelect = 'none';\n }\n\n /** @ignore */\n private onDrag(event: PointerEvent): void {\n if (!this.dragging) return;\n const dx = event.clientX - this.lastX;\n const dy = event.clientY - this.lastY;\n const cur = this.dragOffset() ?? { x: 0, y: 0 };\n let nx = cur.x + dx;\n let ny = cur.y + dy;\n\n const el = this.dialogRef()?.nativeElement;\n if (this.keepInViewport() && el) {\n const rect = el.getBoundingClientRect();\n const view = this.document.defaultView;\n const vw = view?.innerWidth ?? rect.right;\n const vh = view?.innerHeight ?? rect.bottom;\n // Reject a delta that would push the dialog past a viewport edge.\n if (rect.left + dx < this.minX() || rect.right + dx > vw) nx = cur.x;\n if (rect.top + dy < this.minY() || rect.bottom + dy > vh) ny = cur.y;\n }\n\n this.lastX = event.clientX;\n this.lastY = event.clientY;\n this.dragOffset.set({ x: nx, y: ny });\n }\n\n /** @ignore */\n private endDrag(_event: PointerEvent): void {\n if (!this.dragging) return;\n this.dragging = false;\n this.removeDragListeners();\n this.document.body.style.userSelect = '';\n this.dragEnd.emit();\n }\n\n /** @ignore */\n private removeDragListeners(): void {\n this.document.removeEventListener('pointermove', this.moveHandler);\n this.document.removeEventListener('pointerup', this.upHandler);\n }\n\n // --- Resize (bottom-right grip) -------------------------------------\n\n /** @ignore */\n private resizing = false;\n /** @ignore Pointer + size captured when the resize gesture starts. */\n private resizeStart = { x: 0, y: 0, w: 0, h: 0 };\n /** @ignore */\n private readonly resizeMoveHandler = (e: PointerEvent): void => this.onResize(e);\n /** @ignore */\n private readonly resizeUpHandler = (e: PointerEvent): void => this.endResize(e);\n\n /** @ignore Start a corner resize (seeds from the current rendered size). */\n protected onResizeStart(event: PointerEvent): void {\n if (!this.showResizeHandle() || event.button !== 0) return;\n // Keep the grip from bubbling to the frame (dismiss) / starting a drag.\n event.preventDefault();\n event.stopPropagation();\n const el = this.dialogRef()?.nativeElement;\n if (!el) return;\n const rect = el.getBoundingClientRect();\n this.resizing = true;\n this.resizeStart = { x: event.clientX, y: event.clientY, w: rect.width, h: rect.height };\n this.document.addEventListener('pointermove', this.resizeMoveHandler);\n this.document.addEventListener('pointerup', this.resizeUpHandler);\n this.document.body.style.userSelect = 'none';\n }\n\n /** @ignore */\n private onResize(event: PointerEvent): void {\n if (!this.resizing) return;\n const view = this.document.defaultView;\n // `|| MAX` (not `??`) so a degenerate 0 viewport never clamps the dialog to nothing.\n const maxW = view?.innerWidth || Number.MAX_SAFE_INTEGER;\n const maxH = view?.innerHeight || Number.MAX_SAFE_INTEGER;\n const w = Math.min(\n maxW,\n Math.max(this.minWidth(), this.resizeStart.w + (event.clientX - this.resizeStart.x)),\n );\n const h = Math.min(\n maxH,\n Math.max(this.minHeight(), this.resizeStart.h + (event.clientY - this.resizeStart.y)),\n );\n this.resizeSize.set({ w, h });\n }\n\n /** @ignore */\n private endResize(_event: PointerEvent): void {\n if (!this.resizing) return;\n this.resizing = false;\n this.removeResizeListeners();\n this.document.body.style.userSelect = '';\n const size = this.resizeSize();\n if (size) this.resizeEnd.emit({ width: size.w, height: size.h });\n }\n\n /** @ignore */\n private removeResizeListeners(): void {\n this.document.removeEventListener('pointermove', this.resizeMoveHandler);\n this.document.removeEventListener('pointerup', this.resizeUpHandler);\n }\n\n // --- Internals -------------------------------------------------------\n\n /** @ignore Release this instance's scroll lock, if held. */\n private releaseLock(): void {\n if (this.locked) {\n unlockBodyScroll(this.document);\n this.locked = false;\n }\n }\n\n /** @ignore Build the responsive width rules (`max-width` media queries). */\n private applyBreakpoints(bps: Record<string, string> | undefined): void {\n if (!this.isBrowser) return;\n this.removeStyleElement();\n if (!bps || Object.keys(bps).length === 0) return;\n const el = this.document.createElement('style');\n let css = '';\n for (const bp of Object.keys(bps)) {\n css +=\n `@media screen and (max-width: ${bp}) {` +\n ` [data-modal-uid=\"${this.uid}\"]:not(._maximized) { width: ${bps[bp]} !important; } }\\n`;\n }\n el.textContent = css;\n this.document.head.appendChild(el);\n this.styleEl = el;\n }\n\n /** @ignore */\n private removeStyleElement(): void {\n this.styleEl?.remove();\n this.styleEl = null;\n }\n}\n","@if (visible()) {\n <!-- Scrim + frame are SIBLINGS (both direct @if children) so each animates its own\n leave independently — a nested animated element would deadlock the removal.\n The frame carries the dialog's zoom; the dialog itself has no leave binding. -->\n @if (modal()) {\n <div\n #scrim\n class=\"ui-modal-scrim\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #scrimMotion=\"uiMotion\"\n [animate.enter]=\"scrimMotion.enter()\"\n [animate.leave]=\"scrimMotion.leave()\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives in the\n content (CDK focus-trap). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-modal-frame\"\n [class._modal]=\"modal()\"\n [class._contained]=\"contained()\"\n [style.align-items]=\"alignItems()\"\n [style.justify-content]=\"justifyContent()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motion()\"\n [motionDisabled]=\"motionDisabled()\"\n #frameMotion=\"uiMotion\"\n [animate.enter]=\"frameMotion.enter()\"\n [animate.leave]=\"frameMotion.leave()\"\n (pointerdown)=\"onMaskPointerdown($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #dialog\n [class]=\"dialogClasses()\"\n [attr.data-modal-uid]=\"uid\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [style]=\"resolvedDialogStyle()\"\n [style.translate]=\"dragTranslate()\"\n [cdkTrapFocus]=\"focusTrap()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n @if (showHeader()) {\n <div\n class=\"ui-modal-header\"\n [class._draggable]=\"headerDraggable()\"\n (pointerdown)=\"onHeaderPointerdown($event)\"\n >\n <div [attr.id]=\"titleId\" class=\"ui-modal-title\">\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ header() }}\n }\n </div>\n\n <div class=\"ui-modal-header-actions\">\n @if (maximizable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"maximizeAriaLabel()\"\n [attr.aria-pressed]=\"maximized()\"\n (click)=\"toggleMaximize()\"\n >\n <ui-icon [name]=\"maximized() ? minimizeIcon() : maximizeIcon()\" size=\"sm\" />\n </button>\n }\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n @if (closeIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n }\n </button>\n }\n </div>\n </div>\n }\n\n <!-- Body: long content scrolls inside this region. -->\n <div class=\"ui-modal-content\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-modal-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (showResizeHandle()) {\n <!-- Corner resize grip (pointer only, like a native textarea corner). -->\n <span\n class=\"ui-modal-resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event)\"\n ></span>\n }\n </div>\n </div>\n}\n","/*\n * Public API Surface of ui-kit/ui-modal\n */\n\nexport * from './lib/ui-modal';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAqCA;AACA,MAAM,kBAAkB,GAAG,IAAI;AAE/B;AACA,IAAI,SAAS,GAAG,CAAC;AACjB;A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EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,QAAQ,2EAER,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAEL,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAcrB,QAAQ,kEAGT,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpNxE;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"4sh-ui-kit-layout-ui-modal.mjs","sources":["../../../projects/ui-kit/layout/ui-modal/src/lib/ui-modal.ts","../../../projects/ui-kit/layout/ui-modal/src/lib/ui-modal.html","../../../projects/ui-kit/layout/ui-modal/src/public-api.ts","../../../projects/ui-kit/layout/ui-modal/src/4sh-ui-kit-layout-ui-modal.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n model,\n numberAttribute,\n output,\n PLATFORM_ID,\n signal,\n TemplateRef,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { UiMotion, UiMotionPreset } from '@4sh/ui-kit/motion';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\n\n/** Where the dialog is anchored inside the viewport mask. */\nexport type ModalPosition =\n | 'center'\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'topleft'\n | 'topright'\n | 'bottomleft'\n | 'bottomright';\n\n/** Base stacking level — mirrors `$modal-z-index` in the SCSS. */\nconst MODAL_BASE_Z_INDEX = 1100;\n\n/** Process-wide sequence so `autoZIndex` layers a later dialog above earlier ones. */\nlet zIndexSeq = 0;\n/** Process-wide unique id source (aria wiring + responsive style scoping). */\nlet nextUid = 0;\n\n// --- Body scroll lock (ref-counted, shared across nested dialogs) -------\nlet scrollLockCount = 0;\nlet savedOverflow = '';\nlet savedPaddingRight = '';\n\n/** Freeze background scroll, compensating the scrollbar gutter to avoid a shift. */\nfunction lockBodyScroll(doc: Document): void {\n if (scrollLockCount === 0) {\n const body = doc.body;\n const gap = (doc.defaultView?.innerWidth ?? 0) - doc.documentElement.clientWidth;\n savedOverflow = body.style.overflow;\n savedPaddingRight = body.style.paddingRight;\n body.style.overflow = 'hidden';\n if (gap > 0) body.style.paddingRight = `${gap}px`;\n }\n scrollLockCount++;\n}\n\n/** Release one scroll lock; restore the body when the last dialog closes. */\nfunction unlockBodyScroll(doc: Document): void {\n scrollLockCount = Math.max(0, scrollLockCount - 1);\n if (scrollLockCount === 0) {\n doc.body.style.overflow = savedOverflow;\n doc.body.style.paddingRight = savedPaddingRight;\n }\n}\n\n/**\n * ui-modal — headless dialog / modal window.\n *\n * A token-styled floating surface rendered over a viewport mask, driven by the\n * two-way `visible` model. Enter/leave run through the shared motion system\n * (mask fade + dialog `zoom` by default). Built for accessibility: focus trap\n * with focus restore (`@angular/cdk/a11y`), `aria-modal`, background scroll\n * lock, `Escape` to close, and an optional click-outside dismiss.\n *\n * Composes header / content / footer regions: a plain `header` string (or the\n * `#header` template), the default `<ng-content>` for the body, and a `#footer`\n * template for actions. Supports `draggable`, `maximizable`, nine `position`s,\n * modal / non-modal, and per-breakpoint widths (`breakpoints`).\n *\n * @example\n * ```html\n * <ui-button label=\"Ouvrir\" (buttonClick)=\"open.set(true)\" />\n * <ui-modal [(visible)]=\"open\" header=\"Titre\" [dialogStyle]=\"{ width: '32rem' }\">\n * <p>Contenu…</p>\n * <ng-template #footer>\n * <ui-button label=\"Fermer\" level=\"low\" (buttonClick)=\"open.set(false)\" />\n * </ng-template>\n * </ui-modal>\n * ```\n */\n@Component({\n selector: 'ui-modal',\n imports: [NgTemplateOutlet, A11yModule, UiMotion, UiIcon],\n templateUrl: './ui-modal.html',\n styleUrl: './ui-modal.scss',\n})\nexport class UiModal {\n /** Open state (two-way). Toggling it drives the enter/leave animation. */\n visible = model(false);\n\n /** Simple header text (ignored when a `#header` template is projected). */\n header = input<string>();\n /** ARIA role of the dialog surface. */\n role = input<string>('dialog');\n /** Accessible name when there is no visible header to reference. */\n ariaLabel = input<string>();\n /** Id of an external element naming the dialog (overrides the header title). */\n ariaLabelledBy = input<string>();\n\n /** Show the mask (dim + capture) and block background scroll. */\n modal = input(true, { transform: booleanAttribute });\n /** Close when the mask (outside the dialog) is clicked — modal only. */\n dismissableMask = input(false, { transform: booleanAttribute });\n /** Show the close (×) button and allow `Escape` to close. */\n closable = input(true, { transform: booleanAttribute });\n /** Close the dialog when `Escape` is pressed. */\n closeOnEscape = input(true, { transform: booleanAttribute });\n /** Block background scroll even for a non-modal dialog. */\n blockScroll = input(false, { transform: booleanAttribute });\n /** Render the header region (title + actions). */\n showHeader = input(true, { transform: booleanAttribute });\n\n /** Allow dragging the dialog by its header. */\n draggable = input(false, { transform: booleanAttribute });\n /** Keep the dialog fully inside the viewport while dragging. */\n keepInViewport = input(true, { transform: booleanAttribute });\n /** Minimum left offset kept while dragging (px). */\n minX = input(0, { transform: numberAttribute });\n /** Minimum top offset kept while dragging (px). */\n minY = input(0, { transform: numberAttribute });\n\n /** Show the maximize / restore toggle in the header. */\n maximizable = input(false, { transform: booleanAttribute });\n /** Allow resizing the dialog from its bottom-right corner (pointer only). */\n resizable = input(false, { transform: booleanAttribute });\n /** Minimum dialog width while resizing (px). */\n minWidth = input(150, { transform: numberAttribute });\n /** Minimum dialog height while resizing (px). */\n minHeight = input(100, { transform: numberAttribute });\n /** Anchor position inside the viewport mask. */\n position = input<ModalPosition>('center');\n /**\n * Scope the dialog to the nearest positioned ancestor (`position: absolute`)\n * instead of the viewport (`position: fixed`), and skip the body scroll lock.\n * Useful to embed a dialog inside a bounded container (docs previews, panels).\n */\n contained = input(false, { transform: booleanAttribute });\n\n /** Move focus into the dialog when it opens (auto-captured, restored on close). */\n focusOnShow = input(true, { transform: booleanAttribute });\n /** Trap Tab focus inside the dialog while open. */\n focusTrap = input(true, { transform: booleanAttribute });\n\n /** FontAwesome name of the close button icon. */\n closeIcon = input<string>('xmark');\n /** FontAwesome name of the maximize icon. */\n maximizeIcon = input<string>('expand');\n /** FontAwesome name of the restore (minimize) icon. */\n minimizeIcon = input<string>('compress');\n /** Accessible name of the close button. */\n closeAriaLabel = input<string>('Fermer');\n /** Accessible name of the maximize / restore button. */\n maximizeAriaLabel = input<string>('Agrandir');\n\n /** Extra class(es) merged onto the dialog surface. */\n styleClass = input<string>();\n /** Extra class(es) merged onto the mask. */\n maskStyleClass = input<string>();\n /** Inline styles applied to the dialog (e.g. `{ width: '32rem' }`). */\n dialogStyle = input<Record<string, string>>();\n /** Per-breakpoint widths, keyed by a `max-width` (e.g. `{ '960px': '75vw' }`). */\n breakpoints = input<Record<string, string>>();\n\n /** Layer this dialog above earlier overlays automatically. */\n autoZIndex = input(true, { transform: booleanAttribute });\n /** Floor z-index (added to the auto value, or used as-is when `autoZIndex=false`). */\n baseZIndex = input(0, { transform: numberAttribute });\n\n /** Enter/leave preset for the dialog surface (mask always fades). */\n motion = input<UiMotionPreset>('zoom');\n /** Disable the open/close animation for this dialog. */\n motionDisabled = input(false, { transform: booleanAttribute });\n\n /** Custom header template (replaces the `header` string). */\n protected readonly headerTemplate = contentChild<TemplateRef<unknown>>('header');\n /** Footer template (actions row). */\n protected readonly footerTemplate = contentChild<TemplateRef<unknown>>('footer');\n /** Custom close-icon template (replaces `closeIcon`). */\n protected readonly closeIconTemplate = contentChild<TemplateRef<unknown>>('closeicon');\n\n /** Emitted after the dialog becomes visible. */\n shown = output<void>();\n /** Emitted after the dialog is hidden. */\n hidden = output<void>();\n /** Emitted when the maximize state is toggled. */\n maximizedChange = output<{ maximized: boolean }>();\n /** Emitted when a drag gesture ends. */\n dragEnd = output<void>();\n /** Emitted when a resize gesture ends. */\n resizeEnd = output<{ width: number; height: number }>();\n\n /** @ignore Scrollable body region (see `contentNeedsFocus`). */\n private readonly contentRef = viewChild<ElementRef<HTMLElement>>('contentEl');\n /** @ignore The body overflows and holds no focusable element of its own — it then needs to be\n * focusable itself so the scroll is keyboard-reachable (axe `scrollable-region-focusable`). */\n protected readonly contentNeedsFocus = signal(false);\n\n /** @ignore */\n private readonly dialogRef = viewChild<ElementRef<HTMLElement>>('dialog');\n /** @ignore Scrim host (for imperative `maskStyleClass` — a bound `[class]` would\n * fight the motion classes and break the leave animation). */\n private readonly scrimRef = viewChild<ElementRef<HTMLElement>>('scrim');\n /** @ignore Classes currently applied to the scrim by `maskStyleClass`. */\n private appliedMaskClasses: string[] = [];\n\n /** @ignore */\n private readonly document = inject(DOCUMENT);\n /** @ignore */\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n /** @ignore Per-instance layering rank for `autoZIndex`. */\n private readonly zSeq = ++zIndexSeq;\n\n /** @ignore */\n protected readonly uid = `ui-modal-${nextUid++}`;\n /** @ignore */\n protected readonly titleId = `${this.uid}-title`;\n\n /** @ignore Maximized (fills the viewport). */\n protected readonly maximized = signal(false);\n /** @ignore Cumulative drag offset applied via the independent `translate` property\n * (does not clash with the `zoom` animation, which drives `transform`). */\n protected readonly dragOffset = signal<{ x: number; y: number } | null>(null);\n /** @ignore Explicit dialog size while resizing (overrides `dialogStyle` width/height). */\n protected readonly resizeSize = signal<{ w: number; h: number } | null>(null);\n\n /** @ignore This instance currently holds a body scroll lock. */\n private locked = false;\n /** @ignore Runtime `<style>` element backing `breakpoints`. */\n private styleEl: HTMLStyleElement | null = null;\n\n /** @ignore Effective stacking level. */\n protected readonly zIndex = computed(() => {\n const base = this.baseZIndex();\n if (this.autoZIndex()) return MODAL_BASE_Z_INDEX + base + this.zSeq;\n return base > 0 ? base : MODAL_BASE_Z_INDEX;\n });\n\n // NOTE: the scrim and frame carry `animate.enter`/`animate.leave`. They MUST use a\n // static `class` + per-class `[class.x]` toggles (like ui-toast) — a whole-string\n // `[class]=\"expr()\"` binding fights the motion classes Angular adds and restarts the\n // animation every frame (leave never ends → node never removed). Position is applied\n // via `[style]` for the same reason.\n\n /** @ignore Cross-axis alignment of the dialog inside the frame. */\n protected readonly alignItems = computed(() => {\n const p = this.position();\n if (p.startsWith('top')) return 'flex-start';\n if (p.startsWith('bottom')) return 'flex-end';\n return 'center';\n });\n /** @ignore Main-axis alignment of the dialog inside the frame. */\n protected readonly justifyContent = computed(() => {\n const p = this.position();\n if (p.endsWith('left')) return 'flex-start';\n if (p.endsWith('right')) return 'flex-end';\n return 'center';\n });\n\n /** @ignore */\n protected readonly dialogClasses = computed(() => {\n const c = ['ui-modal'];\n if (this.maximized()) c.push('_maximized');\n if (this.contained()) c.push('_contained');\n const extra = this.styleClass();\n if (extra) c.push(extra);\n return c.join(' ');\n });\n\n /** @ignore Header is draggable when enabled and not maximized. */\n protected readonly headerDraggable = computed(() => this.draggable() && !this.maximized());\n\n /** @ignore Drag offset serialised for the `translate` CSS property. */\n protected readonly dragTranslate = computed(() => {\n if (this.maximized()) return null;\n const o = this.dragOffset();\n return o ? `${o.x}px ${o.y}px` : null;\n });\n\n /** @ignore Inline styles for the dialog: `dialogStyle` plus the resize size\n * (which wins), dropped entirely while maximized. */\n protected readonly resolvedDialogStyle = computed(() => {\n if (this.maximized()) return null;\n const base: Record<string, string> = { ...(this.dialogStyle() ?? {}) };\n const size = this.resizeSize();\n if (size) {\n base['width'] = `${size.w}px`;\n base['height'] = `${size.h}px`;\n }\n return Object.keys(base).length ? base : null;\n });\n\n /** @ignore The resize grip shows when resizable and not maximized. */\n protected readonly showResizeHandle = computed(() => this.resizable() && !this.maximized());\n\n /** @ignore Id of the element naming the dialog (header title, or an external id). */\n protected readonly labelledBy = computed(\n () => this.ariaLabelledBy() ?? (this.showHeader() && this.header() ? this.titleId : null),\n );\n /** @ignore Fallback accessible name when nothing is referenced. */\n protected readonly resolvedAriaLabel = computed(() =>\n this.labelledBy() ? null : this.ariaLabel(),\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n let wasVisible = false;\n\n // Open/close side effects: scroll lock, lifecycle events, state reset.\n effect(() => {\n const v = this.visible();\n untracked(() => {\n if (v && !wasVisible) {\n wasVisible = true;\n // A contained dialog is embedded, not a real overlay → never lock the body.\n if (this.isBrowser && !this.contained() && (this.modal() || this.blockScroll())) {\n lockBodyScroll(this.document);\n this.locked = true;\n }\n this.shown.emit();\n } else if (!v && wasVisible) {\n wasVisible = false;\n this.releaseLock();\n this.maximized.set(false);\n this.dragOffset.set(null);\n this.resizeSize.set(null);\n this.hidden.emit();\n }\n });\n });\n\n // Watch the body region: it only earns a tab stop once it actually overflows and holds no\n // focusable element of its own. Measured rather than derived: the content is projected, so\n // neither its height nor what it contains is known from the inputs.\n if (this.isBrowser && typeof ResizeObserver !== 'undefined') {\n let observed: HTMLElement | null = null;\n const ro = new ResizeObserver(() => this.measureContentFocusability());\n effect(() => {\n const el = this.contentRef()?.nativeElement ?? null;\n if (el === observed) return;\n if (observed) ro.unobserve(observed);\n observed = el;\n if (el) {\n ro.observe(el);\n this.measureContentFocusability();\n } else {\n this.contentNeedsFocus.set(false);\n }\n });\n destroyRef.onDestroy(() => ro.disconnect());\n }\n\n // Rebuild the responsive width stylesheet when `breakpoints` changes.\n effect(() => {\n const bps = this.breakpoints();\n untracked(() => this.applyBreakpoints(bps));\n });\n\n // Apply `maskStyleClass` imperatively (see scrimRef note).\n effect(() => {\n const el = this.scrimRef()?.nativeElement;\n const raw = this.maskStyleClass();\n untracked(() => {\n for (const c of this.appliedMaskClasses) el?.classList.remove(c);\n this.appliedMaskClasses = el && raw ? raw.split(/\\s+/).filter(Boolean) : [];\n for (const c of this.appliedMaskClasses) el!.classList.add(c);\n });\n });\n\n // A11y safeguard: a dialog must have an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this.visible() && !this.labelledBy() && !this.resolvedAriaLabel()) {\n console.warn(\n '[ui-modal] Dialog has no accessible name: provide `header`, `ariaLabel` or `ariaLabelledBy`.',\n );\n }\n });\n }\n\n destroyRef.onDestroy(() => {\n this.releaseLock();\n this.removeStyleElement();\n this.removeDragListeners();\n this.removeResizeListeners();\n });\n }\n\n /** Close the dialog. */\n close(): void {\n this.visible.set(false);\n }\n\n /** Move focus onto the dialog surface. */\n focus(): void {\n this.dialogRef()?.nativeElement.focus();\n }\n\n /** @ignore Toggle maximized; lock scroll for a non-modal dialog that now fills the screen. */\n protected toggleMaximize(): void {\n const next = !this.maximized();\n this.maximized.set(next);\n if (next) {\n this.dragOffset.set(null);\n this.resizeSize.set(null);\n }\n if (this.isBrowser && !this.contained() && !this.modal() && !this.blockScroll()) {\n if (next) {\n lockBodyScroll(this.document);\n this.locked = true;\n } else {\n this.releaseLock();\n }\n }\n this.maximizedChange.emit({ maximized: next });\n }\n\n /** @ignore Escape-to-close (bubbles from any focused control inside the dialog). */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.closeOnEscape() && this.closable()) {\n event.stopPropagation();\n this.close();\n }\n }\n\n /** @ignore Click-outside dismiss (mask target only, modal + dismissable). */\n protected onMaskPointerdown(event: PointerEvent): void {\n if (!this.modal() || !this.dismissableMask() || !this.closable()) return;\n if (event.target === event.currentTarget) this.close();\n }\n\n // --- Drag (header handle) -------------------------------------------\n\n /** @ignore */\n private dragging = false;\n /** @ignore */\n private lastX = 0;\n /** @ignore */\n private lastY = 0;\n /** @ignore */\n private readonly moveHandler = (e: PointerEvent): void => this.onDrag(e);\n /** @ignore */\n private readonly upHandler = (e: PointerEvent): void => this.endDrag(e);\n\n /** @ignore */\n protected onHeaderPointerdown(event: PointerEvent): void {\n if (!this.headerDraggable() || event.button !== 0) return;\n // Never start a drag from the header action buttons.\n if ((event.target as HTMLElement).closest('button')) return;\n this.dragging = true;\n this.lastX = event.clientX;\n this.lastY = event.clientY;\n this.document.addEventListener('pointermove', this.moveHandler);\n this.document.addEventListener('pointerup', this.upHandler);\n this.document.body.style.userSelect = 'none';\n }\n\n /** @ignore */\n private onDrag(event: PointerEvent): void {\n if (!this.dragging) return;\n const dx = event.clientX - this.lastX;\n const dy = event.clientY - this.lastY;\n const cur = this.dragOffset() ?? { x: 0, y: 0 };\n let nx = cur.x + dx;\n let ny = cur.y + dy;\n\n const el = this.dialogRef()?.nativeElement;\n if (this.keepInViewport() && el) {\n const rect = el.getBoundingClientRect();\n const view = this.document.defaultView;\n const vw = view?.innerWidth ?? rect.right;\n const vh = view?.innerHeight ?? rect.bottom;\n // Reject a delta that would push the dialog past a viewport edge.\n if (rect.left + dx < this.minX() || rect.right + dx > vw) nx = cur.x;\n if (rect.top + dy < this.minY() || rect.bottom + dy > vh) ny = cur.y;\n }\n\n this.lastX = event.clientX;\n this.lastY = event.clientY;\n this.dragOffset.set({ x: nx, y: ny });\n }\n\n /** @ignore */\n private endDrag(_event: PointerEvent): void {\n if (!this.dragging) return;\n this.dragging = false;\n this.removeDragListeners();\n this.document.body.style.userSelect = '';\n this.dragEnd.emit();\n }\n\n /** @ignore */\n private removeDragListeners(): void {\n this.document.removeEventListener('pointermove', this.moveHandler);\n this.document.removeEventListener('pointerup', this.upHandler);\n }\n\n // --- Resize (bottom-right grip) -------------------------------------\n\n /** @ignore */\n private resizing = false;\n /** @ignore Pointer + size captured when the resize gesture starts. */\n private resizeStart = { x: 0, y: 0, w: 0, h: 0 };\n /** @ignore */\n private readonly resizeMoveHandler = (e: PointerEvent): void => this.onResize(e);\n /** @ignore */\n private readonly resizeUpHandler = (e: PointerEvent): void => this.endResize(e);\n\n /** @ignore Start a corner resize (seeds from the current rendered size). */\n protected onResizeStart(event: PointerEvent): void {\n if (!this.showResizeHandle() || event.button !== 0) return;\n // Keep the grip from bubbling to the frame (dismiss) / starting a drag.\n event.preventDefault();\n event.stopPropagation();\n const el = this.dialogRef()?.nativeElement;\n if (!el) return;\n const rect = el.getBoundingClientRect();\n this.resizing = true;\n this.resizeStart = { x: event.clientX, y: event.clientY, w: rect.width, h: rect.height };\n this.document.addEventListener('pointermove', this.resizeMoveHandler);\n this.document.addEventListener('pointerup', this.resizeUpHandler);\n this.document.body.style.userSelect = 'none';\n }\n\n /** @ignore */\n private onResize(event: PointerEvent): void {\n if (!this.resizing) return;\n const view = this.document.defaultView;\n // `|| MAX` (not `??`) so a degenerate 0 viewport never clamps the dialog to nothing.\n const maxW = view?.innerWidth || Number.MAX_SAFE_INTEGER;\n const maxH = view?.innerHeight || Number.MAX_SAFE_INTEGER;\n const w = Math.min(\n maxW,\n Math.max(this.minWidth(), this.resizeStart.w + (event.clientX - this.resizeStart.x)),\n );\n const h = Math.min(\n maxH,\n Math.max(this.minHeight(), this.resizeStart.h + (event.clientY - this.resizeStart.y)),\n );\n this.resizeSize.set({ w, h });\n }\n\n /** @ignore */\n private endResize(_event: PointerEvent): void {\n if (!this.resizing) return;\n this.resizing = false;\n this.removeResizeListeners();\n this.document.body.style.userSelect = '';\n const size = this.resizeSize();\n if (size) this.resizeEnd.emit({ width: size.w, height: size.h });\n }\n\n /** @ignore */\n private removeResizeListeners(): void {\n this.document.removeEventListener('pointermove', this.resizeMoveHandler);\n this.document.removeEventListener('pointerup', this.resizeUpHandler);\n }\n\n // --- Internals -------------------------------------------------------\n\n /** @ignore Recomputes `contentNeedsFocus` from the rendered body. */\n private measureContentFocusability(): void {\n const el = this.contentRef()?.nativeElement;\n if (!el) {\n this.contentNeedsFocus.set(false);\n return;\n }\n const overflows = el.scrollHeight > el.clientHeight + 1;\n const hasFocusable = !!el.querySelector(\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\n );\n this.contentNeedsFocus.set(overflows && !hasFocusable);\n }\n\n /** @ignore Release this instance's scroll lock, if held. */\n private releaseLock(): void {\n if (this.locked) {\n unlockBodyScroll(this.document);\n this.locked = false;\n }\n }\n\n /** @ignore Build the responsive width rules (`max-width` media queries). */\n private applyBreakpoints(bps: Record<string, string> | undefined): void {\n if (!this.isBrowser) return;\n this.removeStyleElement();\n if (!bps || Object.keys(bps).length === 0) return;\n const el = this.document.createElement('style');\n let css = '';\n for (const bp of Object.keys(bps)) {\n css +=\n `@media screen and (max-width: ${bp}) {` +\n ` [data-modal-uid=\"${this.uid}\"]:not(._maximized) { width: ${bps[bp]} !important; } }\\n`;\n }\n el.textContent = css;\n this.document.head.appendChild(el);\n this.styleEl = el;\n }\n\n /** @ignore */\n private removeStyleElement(): void {\n this.styleEl?.remove();\n this.styleEl = null;\n }\n}\n","@if (visible()) {\n <!-- Scrim + frame are SIBLINGS (both direct @if children) so each animates its own\n leave independently — a nested animated element would deadlock the removal.\n The frame carries the dialog's zoom; the dialog itself has no leave binding. -->\n @if (modal()) {\n <div\n #scrim\n class=\"ui-modal-scrim\"\n [class._contained]=\"contained()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"motionDisabled()\"\n #scrimMotion=\"uiMotion\"\n [animate.enter]=\"scrimMotion.enter()\"\n [animate.leave]=\"scrimMotion.leave()\"\n ></div>\n }\n\n <!-- Dialog: Escape/Tab handled on the container, focus lives in the\n content (CDK focus-trap). -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-modal-frame\"\n [class._modal]=\"modal()\"\n [class._contained]=\"contained()\"\n [style.align-items]=\"alignItems()\"\n [style.justify-content]=\"justifyContent()\"\n [style.z-index]=\"zIndex()\"\n [uiMotion]=\"motion()\"\n [motionDisabled]=\"motionDisabled()\"\n #frameMotion=\"uiMotion\"\n [animate.enter]=\"frameMotion.enter()\"\n [animate.leave]=\"frameMotion.leave()\"\n (pointerdown)=\"onMaskPointerdown($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <div\n #dialog\n [class]=\"dialogClasses()\"\n [attr.data-modal-uid]=\"uid\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n tabindex=\"-1\"\n [style]=\"resolvedDialogStyle()\"\n [style.translate]=\"dragTranslate()\"\n [cdkTrapFocus]=\"focusTrap()\"\n [cdkTrapFocusAutoCapture]=\"focusOnShow()\"\n >\n @if (showHeader()) {\n <div\n class=\"ui-modal-header\"\n [class._draggable]=\"headerDraggable()\"\n (pointerdown)=\"onHeaderPointerdown($event)\"\n >\n <div [attr.id]=\"titleId\" class=\"ui-modal-title\">\n @if (headerTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n {{ header() }}\n }\n </div>\n\n <div class=\"ui-modal-header-actions\">\n @if (maximizable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"maximizeAriaLabel()\"\n [attr.aria-pressed]=\"maximized()\"\n (click)=\"toggleMaximize()\"\n >\n <ui-icon [name]=\"maximized() ? minimizeIcon() : maximizeIcon()\" size=\"sm\" />\n </button>\n }\n @if (closable()) {\n <button\n type=\"button\"\n class=\"ui-modal-action\"\n [attr.aria-label]=\"closeAriaLabel()\"\n (click)=\"close()\"\n >\n @if (closeIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon [name]=\"closeIcon()\" size=\"sm\" />\n }\n </button>\n }\n </div>\n </div>\n }\n\n <!-- Body: long content scrolls inside this region. It becomes focusable ONLY once it\n actually overflows AND holds nothing focusable of its own: a keyboard user must be able\n to reach the scrollbar (the footer buttons sit outside this region), but an unconditional\n tab stop would insert itself into the focus order of every dialog. -->\n <div #contentEl class=\"ui-modal-content\" [attr.tabindex]=\"contentNeedsFocus() ? 0 : null\">\n <ng-content />\n </div>\n\n @if (footerTemplate(); as tpl) {\n <div class=\"ui-modal-footer\">\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n </div>\n }\n\n @if (showResizeHandle()) {\n <!-- Corner resize grip (pointer only, like a native textarea corner). -->\n <span\n class=\"ui-modal-resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event)\"\n ></span>\n }\n </div>\n </div>\n}\n","/*\n * Public API Surface of ui-kit/ui-modal\n */\n\nexport * from './lib/ui-modal';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAqCA;AACA,MAAM,kBAAkB,GAAG,IAAI;AAE/B;AACA,IAAI,SAAS,GAAG,CAAC;AACjB;AACA,IAAI,OAAO,GAAG,CAAC;AAEf;AACA,IAAI,eAAe,GAAG,CAAC;AACvB,IAAI,aAAa,GAAG,EAAE;AACtB,IAAI,iBAAiB,GAAG,EAAE;AAE1B;AACA,SAAS,cAAc,CAAC,GAAa,EAAA;AACnC,IAAA,IAAI,eAAe,KAAK,CAAC,EAAE;AACzB,QAAA,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI;AACrB,QAAA,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,UAAU,IAAI,CAAC,I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;;ACFH;;AAEG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"4sh-ui-kit-layout-ui-popover.mjs","sources":["../../../projects/ui-kit/layout/ui-popover/src/lib/ui-popover.ts","../../../projects/ui-kit/layout/ui-popover/src/lib/ui-popover.html","../../../projects/ui-kit/layout/ui-popover/src/public-api.ts","../../../projects/ui-kit/layout/ui-popover/src/4sh-ui-kit-layout-ui-popover.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedOverlayPositionChange,\n ConnectedPosition,\n OverlayModule,\n} from '@angular/cdk/overlay';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { UiMotion } from '@4sh/ui-kit/motion';\nimport { closeOnNavigation } from '@4sh/ui-kit/overlay';\n\n/** Preferred side of the trigger the panel is displayed on (drives the arrow). */\nexport type PopoverPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/** Accepted shapes for the anchor passed to `show` / `toggle`. */\nexport type PopoverTarget = HTMLElement | ElementRef<HTMLElement>;\n\n/** Gap (px) between the trigger and the panel, leaving room for the arrow — mirrors `$popover-arrow-size` in the SCSS. */\nconst ARROW_GAP = 8;\n\n/** Focusable descendants used to move focus into the panel on open. */\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\n/** Process-wide counter for unique panel ids (aria-controls wiring). */\nlet nextId = 0;\n\n/**\n * ui-popover — headless floating panel anchored to a trigger.\n *\n * A token-styled surface (shared `overlay-panel` shell + `global.*` tokens)\n * rendered in a CDK connected overlay, driven imperatively through the public\n * `show` / `hide` / `toggle` methods. The consumer keeps a template reference\n * variable on the popover and wires a trigger to it; the panel holds arbitrary\n * projected content.\n *\n * Built for accessibility: `role=\"dialog\"`, non-modal WAI-ARIA pattern by\n * default (no `aria-modal`, focus not trapped — see the `modal` input to opt\n * into a blocking dialog with `aria-modal` + a permanent focus trap via\n * `@angular/cdk/a11y`), the first focusable element (or an element carrying\n * `autofocus`) focused on open, `Escape` to close and return focus to the\n * trigger, and `aria-expanded` / `aria-controls` reflected on the trigger.\n *\n * Positioning, viewport flipping and scroll re-alignment are delegated to the\n * CDK connected overlay (no manual geometry); the arrow follows the effective\n * side.\n *\n * @example\n * ```html\n * <!-- Basic: the trigger's click event carries the anchor -->\n * <ui-button label=\"Détails\" (buttonClick)=\"op.toggle($event)\" />\n * <ui-popover #op ariaLabel=\"Détails du produit\">…</ui-popover>\n *\n * <!-- Controlled: pass the trigger element as the second argument -->\n * <span #anchor>Ancre</span>\n * <ui-button label=\"Ouvrir\" (buttonClick)=\"op.show($event, anchor)\" />\n * <ui-popover #op ariaLabel=\"Détails\">…</ui-popover>\n * ```\n */\n@Component({\n selector: 'ui-popover',\n imports: [OverlayModule, A11yModule, UiMotion],\n templateUrl: './ui-popover.html',\n styleUrl: './ui-popover.scss',\n})\nexport class UiPopover {\n /** Hide the panel when a click lands outside it (and outside the trigger). */\n dismissable = input(true, { transform: booleanAttribute });\n /** Preferred side of the trigger; the overlay flips it when space is lacking. */\n position = input<PopoverPosition>('bottom');\n /** Render the arrow pointing back to the trigger. */\n showArrow = input(true, { transform: booleanAttribute });\n /** Make the panel modal: `aria-modal` reflected + permanent focus trap. */\n modal = input(false, { transform: booleanAttribute });\n /** ARIA role of the panel. */\n role = input<string>('dialog');\n /** Accessible name of the panel (recommended). */\n ariaLabel = input<string>();\n /** Id of an external element naming the panel. */\n ariaLabelledBy = input<string>();\n /** Move focus into the panel when it opens. */\n focusOnShow = input(true, { transform: booleanAttribute });\n /** Close the panel when `Escape` is pressed. */\n closeOnEscape = input(true, { transform: booleanAttribute });\n /** Animate the panel entrance (reduced-motion / `data-motion=\"off\"` always win). */\n motion = input(true, { transform: booleanAttribute });\n /** Extra class(es) applied to the panel (scoped custom styling). */\n styleClass = input<string>();\n\n /** Emitted after the panel becomes visible. */\n shown = output<void>();\n /** Emitted after the panel is hidden. */\n hidden = output<void>();\n\n /** @ignore */\n private readonly doc = inject(DOCUMENT);\n /** @ignore Panel root (only present while open — queried after the overlay attaches). */\n private readonly panel = viewChild<ElementRef<HTMLElement>>('panel');\n\n /** @ignore Panel visibility. */\n private readonly _open = signal(false);\n /** Read-only open state (for host bindings / conditional logic). */\n readonly visible = this._open.asReadonly();\n\n /** @ignore Element the overlay is anchored to. */\n protected readonly origin = signal<HTMLElement | null>(null);\n /** @ignore Effective side (updated from the CDK connection pair) — drives the arrow. */\n protected readonly side = signal<PopoverPosition>('bottom');\n /** @ignore Unique panel id, wired to the trigger via `aria-controls`. */\n protected readonly panelId = `ui-popover-${nextId++}`;\n\n /** @ignore Resolved trigger element (kept for focus restore + aria cleanup). */\n private targetEl: HTMLElement | null = null;\n\n constructor() {\n // A popover declared in an app shell outlives the routed view: dismiss it\n // rather than carrying it over to the next page.\n closeOnNavigation(() => this.hide());\n\n // A11y safeguard: an open dialog must have an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this._open() && !this.ariaLabel() && !this.ariaLabelledBy()) {\n console.warn(\n '[ui-popover] Popover has no accessible name: provide `ariaLabel` or `ariaLabelledBy`.',\n );\n }\n });\n }\n }\n\n // --- Public API ---------------------------------------------------------\n\n /**\n * Show the panel anchored to `target` (or the event's `currentTarget`).\n * @param event Browser event whose `currentTarget` is used as a fallback anchor.\n * @param target Explicit anchor element (kept anchored to it).\n */\n show(event?: Event, target?: PopoverTarget): void {\n const anchor = this.resolveTarget(target) ?? this.resolveEventTarget(event);\n if (!anchor) return;\n event?.stopPropagation();\n\n this.targetEl = anchor;\n this.origin.set(anchor);\n if (!this._open()) {\n this._open.set(true);\n this.applyTriggerAria(anchor);\n this.shown.emit();\n }\n if (this.focusOnShow()) this.queueFocus();\n }\n\n /** Hide the panel; returns focus to the trigger when focus was inside it. */\n hide(): void {\n if (!this._open()) return;\n const panelEl = this.panel()?.nativeElement;\n const active = this.doc.activeElement;\n const focusWasInside = !!panelEl && active instanceof Node && panelEl.contains(active);\n\n this._open.set(false);\n this.clearTriggerAria();\n if (focusWasInside) this.targetEl?.focus();\n this.hidden.emit();\n }\n\n /** Toggle the panel, anchoring it like {@link show} when it opens. */\n toggle(event?: Event, target?: PopoverTarget): void {\n this._open() ? this.hide() : this.show(event, target);\n }\n\n // --- Positioning ----------------------------------------------------------\n\n /** @ignore Ordered positions (preferred first, then fallbacks) for CDK auto-flip. */\n protected readonly positions = computed<ConnectedPosition[]>(() => {\n const top: ConnectedPosition = {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -ARROW_GAP,\n };\n const bottom: ConnectedPosition = {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: ARROW_GAP,\n };\n const left: ConnectedPosition = {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -ARROW_GAP,\n };\n const right: ConnectedPosition = {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: ARROW_GAP,\n };\n const order: Record<PopoverPosition, ConnectedPosition[]> = {\n top: [top, bottom, right, left],\n bottom: [bottom, top, right, left],\n left: [left, right, top, bottom],\n right: [right, left, top, bottom],\n };\n return order[this.position()];\n });\n\n /** @ignore */\n protected readonly panelClasses = computed(() => {\n const c = ['ui-popover', `_${this.side()}`];\n if (!this.showArrow()) c.push('_no-arrow');\n const extra = this.styleClass();\n if (extra) c.push(extra);\n return c.join(' ');\n });\n\n /** @ignore Map the active CDK connection pair back to the visual side (for the arrow). */\n protected onPositionChange(change: ConnectedOverlayPositionChange): void {\n // The trigger can be gone while the popover lives on (its page was\n // destroyed): re-positioning on a detached anchor measures 0×0 and would\n // snap the panel to the top-left corner.\n if (this.targetEl && !this.targetEl.isConnected) {\n this.hide();\n return;\n }\n const pair = change.connectionPair;\n if (pair.overlayY === 'bottom') this.side.set('top');\n else if (pair.overlayY === 'top' && pair.originY === 'bottom') this.side.set('bottom');\n else if (pair.overlayX === 'end') this.side.set('left');\n else if (pair.overlayX === 'start' && pair.originX === 'end') this.side.set('right');\n else this.side.set(this.position());\n }\n\n // --- Interactions ---------------------------------------------------------\n\n /** @ignore A click outside the panel closes it — unless it lands on the trigger,\n * whose own handler owns the toggle (avoids close-then-reopen races). */\n protected onOutsideClick(event: MouseEvent): void {\n if (!this.dismissable()) return;\n const target = event.target;\n if (target instanceof Node && this.targetEl?.contains(target)) return;\n this.hide();\n }\n\n /** @ignore */\n protected onEscape(event: Event): void {\n if (!this.closeOnEscape()) return;\n event.stopPropagation();\n this.hide();\n }\n\n // --- Internals ------------------------------------------------------------\n\n /** @ignore */\n private resolveTarget(target?: PopoverTarget): HTMLElement | null {\n if (!target) return null;\n return target instanceof ElementRef ? target.nativeElement : target;\n }\n\n /** @ignore */\n private resolveEventTarget(event?: Event): HTMLElement | null {\n const el = event?.currentTarget ?? event?.target;\n return el instanceof HTMLElement ? el : null;\n }\n\n /** @ignore Reflect the open relationship on the trigger. */\n private applyTriggerAria(el: HTMLElement): void {\n el.setAttribute('aria-expanded', 'true');\n el.setAttribute('aria-controls', this.panelId);\n }\n\n /** @ignore */\n private clearTriggerAria(): void {\n const el = this.targetEl;\n if (!el) return;\n el.setAttribute('aria-expanded', 'false');\n el.removeAttribute('aria-controls');\n }\n\n /** @ignore Focus the first focusable (or `[autofocus]`) once the overlay renders.\n * The overlay attaches after change detection: retry over macrotasks\n * (NOT rAF — it never fires in throttled/background tabs). */\n private queueFocus(attempts = 20): void {\n setTimeout(() => {\n const panelEl = this.panel()?.nativeElement;\n if (panelEl) this.focusFirst(panelEl);\n else if (attempts > 0) this.queueFocus(attempts - 1);\n });\n }\n\n /** @ignore */\n private focusFirst(panelEl: HTMLElement): void {\n const auto = panelEl.querySelector<HTMLElement>('[autofocus]');\n if (auto) {\n auto.focus();\n return;\n }\n const focusable = panelEl.querySelector<HTMLElement>(FOCUSABLE_SELECTOR);\n (focusable ?? panelEl).focus();\n }\n}\n","<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin()!\"\n [cdkConnectedOverlayOpen]=\"visible()\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n [cdkConnectedOverlayPush]=\"false\"\n [cdkConnectedOverlayFlexibleDimensions]=\"false\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (positionChange)=\"onPositionChange($event)\"\n (detach)=\"hide()\"\n>\n <div\n #panel\n [class]=\"panelClasses()\"\n [attr.id]=\"panelId\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n tabindex=\"-1\"\n [cdkTrapFocus]=\"modal()\"\n [uiMotion]=\"'zoom'\"\n [motionDisabled]=\"!motion()\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n (keydown.escape)=\"onEscape($event)\"\n >\n @if (showArrow()) {\n <span class=\"ui-popover-arrow\" aria-hidden=\"true\"></span>\n }\n <div class=\"ui-popover-content\">\n <ng-content />\n </div>\n </div>\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-popover\n */\n\nexport * from './lib/ui-popover';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AA6BA;AACA,MAAM,SAAS,GAAG,CAAC;AAEnB;AACA,MAAM,kBAAkB,GAAG;IACzB,SAAS;IACT,wBAAwB;IACxB,uBAAuB;IACvB,wBAAwB;IACxB,0BAA0B;IAC1B,iCAAiC;AAClC,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX;AACA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,aAAA,EAAA,gBAAA,EAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAIlC,SAAS,EAAA,UAAA,EAAA,CAAA;kBANrB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,WACb,CAAC,aAAa,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAA,QAAA,EAAA,6nCAAA,EAAA,MAAA,EAAA,CAAA,s6DAAA,CAAA,EAAA;qvCAoCc,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnHrE;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"4sh-ui-kit-layout-ui-popover.mjs","sources":["../../../projects/ui-kit/layout/ui-popover/src/lib/ui-popover.ts","../../../projects/ui-kit/layout/ui-popover/src/lib/ui-popover.html","../../../projects/ui-kit/layout/ui-popover/src/public-api.ts","../../../projects/ui-kit/layout/ui-popover/src/4sh-ui-kit-layout-ui-popover.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedOverlayPositionChange,\n ConnectedPosition,\n OverlayModule,\n} from '@angular/cdk/overlay';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { UiMotion } from '@4sh/ui-kit/motion';\nimport { closeOnNavigation } from '@4sh/ui-kit/overlay';\n\n/** Preferred side of the trigger the panel is displayed on (drives the arrow). */\nexport type PopoverPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/** Accepted shapes for the anchor passed to `show` / `toggle`. */\nexport type PopoverTarget = HTMLElement | ElementRef<HTMLElement>;\n\n/** Gap (px) between the trigger and the panel, leaving room for the arrow — mirrors `$popover-arrow-size` in the SCSS. */\nconst ARROW_GAP = 8;\n\n/** Focusable descendants used to move focus into the panel on open. */\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\n/** Process-wide counter for unique panel ids (aria-controls wiring). */\nlet nextId = 0;\n\n/**\n * ui-popover — headless floating panel anchored to a trigger.\n *\n * A token-styled surface (shared `overlay-panel` shell + `global.*` tokens)\n * rendered in a CDK connected overlay, driven imperatively through the public\n * `show` / `hide` / `toggle` methods. The consumer keeps a template reference\n * variable on the popover and wires a trigger to it; the panel holds arbitrary\n * projected content.\n *\n * Built for accessibility: `role=\"dialog\"`, non-modal WAI-ARIA pattern by\n * default (no `aria-modal`, focus not trapped — see the `modal` input to opt\n * into a blocking dialog with `aria-modal` + a permanent focus trap via\n * `@angular/cdk/a11y`), the first focusable element (or an element carrying\n * `autofocus`) focused on open, `Escape` to close and return focus to the\n * trigger, and `aria-expanded` / `aria-controls` reflected on the trigger.\n *\n * Positioning, viewport flipping and scroll re-alignment are delegated to the\n * CDK connected overlay (no manual geometry); the arrow follows the effective\n * side.\n *\n * @example\n * ```html\n * <!-- Basic: the trigger's click event carries the anchor -->\n * <ui-button label=\"Détails\" (buttonClick)=\"op.toggle($event)\" />\n * <ui-popover #op ariaLabel=\"Détails du produit\">…</ui-popover>\n *\n * <!-- Controlled: pass the trigger element as the second argument -->\n * <span #anchor>Ancre</span>\n * <ui-button label=\"Ouvrir\" (buttonClick)=\"op.show($event, anchor)\" />\n * <ui-popover #op ariaLabel=\"Détails\">…</ui-popover>\n * ```\n */\n@Component({\n selector: 'ui-popover',\n imports: [OverlayModule, A11yModule, UiMotion],\n templateUrl: './ui-popover.html',\n styleUrl: './ui-popover.scss',\n})\nexport class UiPopover {\n /** Hide the panel when a click lands outside it (and outside the trigger). */\n dismissable = input(true, { transform: booleanAttribute });\n /** Preferred side of the trigger; the overlay flips it when space is lacking. */\n position = input<PopoverPosition>('bottom');\n /** Render the arrow pointing back to the trigger. */\n showArrow = input(true, { transform: booleanAttribute });\n /** Make the panel modal: `aria-modal` reflected + permanent focus trap. */\n modal = input(false, { transform: booleanAttribute });\n /** ARIA role of the panel. */\n role = input<string>('dialog');\n /** Accessible name of the panel (recommended). */\n ariaLabel = input<string>();\n /** Id of an external element naming the panel. */\n ariaLabelledBy = input<string>();\n /** Move focus into the panel when it opens. */\n focusOnShow = input(true, { transform: booleanAttribute });\n /** Close the panel when `Escape` is pressed. */\n closeOnEscape = input(true, { transform: booleanAttribute });\n /** Animate the panel entrance (reduced-motion / `data-motion=\"off\"` always win). */\n motion = input(true, { transform: booleanAttribute });\n /** Extra class(es) applied to the panel (scoped custom styling). */\n styleClass = input<string>();\n\n /** Emitted after the panel becomes visible. */\n shown = output<void>();\n /** Emitted after the panel is hidden. */\n hidden = output<void>();\n\n /** @ignore */\n private readonly doc = inject(DOCUMENT);\n /** @ignore Panel root (only present while open — queried after the overlay attaches). */\n private readonly panel = viewChild<ElementRef<HTMLElement>>('panel');\n\n /** @ignore Panel visibility. */\n private readonly _open = signal(false);\n /** Read-only open state (for host bindings / conditional logic). */\n readonly visible = this._open.asReadonly();\n\n /** @ignore Element the overlay is anchored to. */\n protected readonly origin = signal<HTMLElement | null>(null);\n /** @ignore Effective side (updated from the CDK connection pair) — drives the arrow. */\n protected readonly side = signal<PopoverPosition>('bottom');\n /** @ignore Unique panel id, wired to the trigger via `aria-controls`. */\n protected readonly panelId = `ui-popover-${nextId++}`;\n\n /** @ignore Resolved trigger element (kept for focus restore + aria cleanup). */\n private targetEl: HTMLElement | null = null;\n\n constructor() {\n // A popover declared in an app shell outlives the routed view: dismiss it\n // rather than carrying it over to the next page.\n closeOnNavigation(() => this.hide());\n\n // A11y safeguard: an open dialog must have an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this._open() && !this.ariaLabel() && !this.ariaLabelledBy()) {\n console.warn(\n '[ui-popover] Popover has no accessible name: provide `ariaLabel` or `ariaLabelledBy`.',\n );\n }\n });\n }\n }\n\n // --- Public API ---------------------------------------------------------\n\n /**\n * Show the panel anchored to `target` (or the event's `currentTarget`).\n * @param event Browser event whose `currentTarget` is used as a fallback anchor.\n * @param target Explicit anchor element (kept anchored to it).\n */\n show(event?: Event, target?: PopoverTarget): void {\n const anchor = this.resolveTarget(target) ?? this.resolveEventTarget(event);\n if (!anchor) return;\n event?.stopPropagation();\n\n this.targetEl = anchor;\n this.origin.set(anchor);\n if (!this._open()) {\n this._open.set(true);\n this.applyTriggerAria(anchor);\n this.shown.emit();\n }\n if (this.focusOnShow()) this.queueFocus();\n }\n\n /** Hide the panel; returns focus to the trigger when focus was inside it. */\n hide(): void {\n if (!this._open()) return;\n const panelEl = this.panel()?.nativeElement;\n const active = this.doc.activeElement;\n const focusWasInside = !!panelEl && active instanceof Node && panelEl.contains(active);\n\n this._open.set(false);\n this.clearTriggerAria();\n if (focusWasInside) this.targetEl?.focus();\n this.hidden.emit();\n }\n\n /** Toggle the panel, anchoring it like {@link show} when it opens. */\n toggle(event?: Event, target?: PopoverTarget): void {\n this._open() ? this.hide() : this.show(event, target);\n }\n\n // --- Positioning ----------------------------------------------------------\n\n /** @ignore Ordered positions (preferred first, then fallbacks) for CDK auto-flip. */\n protected readonly positions = computed<ConnectedPosition[]>(() => {\n const top: ConnectedPosition = {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -ARROW_GAP,\n };\n const bottom: ConnectedPosition = {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: ARROW_GAP,\n };\n const left: ConnectedPosition = {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -ARROW_GAP,\n };\n const right: ConnectedPosition = {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: ARROW_GAP,\n };\n const order: Record<PopoverPosition, ConnectedPosition[]> = {\n top: [top, bottom, right, left],\n bottom: [bottom, top, right, left],\n left: [left, right, top, bottom],\n right: [right, left, top, bottom],\n };\n return order[this.position()];\n });\n\n /** @ignore */\n protected readonly panelClasses = computed(() => {\n const c = ['ui-popover', `_${this.side()}`];\n if (!this.showArrow()) c.push('_no-arrow');\n const extra = this.styleClass();\n if (extra) c.push(extra);\n return c.join(' ');\n });\n\n /** @ignore Map the active CDK connection pair back to the visual side (for the arrow). */\n protected onPositionChange(change: ConnectedOverlayPositionChange): void {\n // The trigger can be gone while the popover lives on (its page was\n // destroyed): re-positioning on a detached anchor measures 0×0 and would\n // snap the panel to the top-left corner.\n if (this.targetEl && !this.targetEl.isConnected) {\n this.hide();\n return;\n }\n const pair = change.connectionPair;\n if (pair.overlayY === 'bottom') this.side.set('top');\n else if (pair.overlayY === 'top' && pair.originY === 'bottom') this.side.set('bottom');\n else if (pair.overlayX === 'end') this.side.set('left');\n else if (pair.overlayX === 'start' && pair.originX === 'end') this.side.set('right');\n else this.side.set(this.position());\n }\n\n // --- Interactions ---------------------------------------------------------\n\n /** @ignore A click outside the panel closes it — unless it lands on the trigger,\n * whose own handler owns the toggle (avoids close-then-reopen races). */\n protected onOutsideClick(event: MouseEvent): void {\n if (!this.dismissable()) return;\n const target = event.target;\n if (target instanceof Node && this.targetEl?.contains(target)) return;\n this.hide();\n }\n\n /** @ignore */\n protected onEscape(event: Event): void {\n if (!this.closeOnEscape()) return;\n event.stopPropagation();\n this.hide();\n }\n\n // --- Internals ------------------------------------------------------------\n\n /** @ignore */\n private resolveTarget(target?: PopoverTarget): HTMLElement | null {\n if (!target) return null;\n return target instanceof ElementRef ? target.nativeElement : target;\n }\n\n /** @ignore */\n private resolveEventTarget(event?: Event): HTMLElement | null {\n const el = event?.currentTarget ?? event?.target;\n return el instanceof HTMLElement ? el : null;\n }\n\n /** @ignore Reflect the open relationship on the trigger. */\n private applyTriggerAria(el: HTMLElement): void {\n el.setAttribute('aria-expanded', 'true');\n el.setAttribute('aria-controls', this.panelId);\n }\n\n /** @ignore */\n private clearTriggerAria(): void {\n const el = this.targetEl;\n if (!el) return;\n el.setAttribute('aria-expanded', 'false');\n el.removeAttribute('aria-controls');\n }\n\n /** @ignore Focus the first focusable (or `[autofocus]`) once the overlay renders.\n * The overlay attaches after change detection: retry over macrotasks\n * (NOT rAF — it never fires in throttled/background tabs). */\n private queueFocus(attempts = 20): void {\n setTimeout(() => {\n const panelEl = this.panel()?.nativeElement;\n if (panelEl) this.focusFirst(panelEl);\n else if (attempts > 0) this.queueFocus(attempts - 1);\n });\n }\n\n /** @ignore */\n private focusFirst(panelEl: HTMLElement): void {\n const auto = panelEl.querySelector<HTMLElement>('[autofocus]');\n if (auto) {\n auto.focus();\n return;\n }\n const focusable = panelEl.querySelector<HTMLElement>(FOCUSABLE_SELECTOR);\n (focusable ?? panelEl).focus();\n }\n}\n","<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin()!\"\n [cdkConnectedOverlayOpen]=\"visible()\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n [cdkConnectedOverlayPush]=\"false\"\n [cdkConnectedOverlayFlexibleDimensions]=\"false\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (positionChange)=\"onPositionChange($event)\"\n (detach)=\"hide()\"\n>\n <div\n #panel\n [class]=\"panelClasses()\"\n [attr.id]=\"panelId\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"modal() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n tabindex=\"-1\"\n [cdkTrapFocus]=\"modal()\"\n [uiMotion]=\"'zoom'\"\n [motionDisabled]=\"!motion()\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n (keydown.escape)=\"onEscape($event)\"\n >\n @if (showArrow()) {\n <span class=\"ui-popover-arrow\" aria-hidden=\"true\"></span>\n }\n <div class=\"ui-popover-content\">\n <ng-content />\n </div>\n </div>\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-popover\n */\n\nexport * from './lib/ui-popover';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AA6BA;AACA,MAAM,SAAS,GAAG,CAAC;AAEnB;AACA,MAAM,kBAAkB,GAAG;IACzB,SAAS;IACT,wBAAwB;IACxB,uBAAuB;IACvB,wBAAwB;IACxB,0BAA0B;IAC1B,iCAAiC;AAClC,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX;AACA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;MAOU,SAAS,CAAA;AAiDpB,IAAA,WAAA,GAAA;;QA/CA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAE1D,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAkB,QAAQ;qFAAC;;QAE3C,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,IAAI,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAExD,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAErD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,QAAQ;iFAAC;;AAE9B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;;AAE3B,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK;sGAAU;;QAEhC,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAE1D,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,IAAI,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAE5D,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,IAAI,8EAAI,SAAS,EAAE,gBAAgB,EAAA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