@educarehq/solaris-ui 0.17.1 → 0.17.2

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, PLATFORM_ID, Injectable, Pipe, Directive, signal, DestroyRef, DOCUMENT, input, computed, ChangeDetectionStrategy, Component, output, ElementRef, EnvironmentInjector, effect, createComponent, HostListener, model, TemplateRef, ViewContainerRef, contentChild, forwardRef, ViewChild, ViewEncapsulation, Renderer2, contentChildren, NgZone, Injector, viewChild, isDevMode, ChangeDetectorRef, booleanAttribute, numberAttribute, afterNextRender, viewChildren, ApplicationRef } from '@angular/core';
2
+ import { InjectionToken, inject, PLATFORM_ID, Injectable, Pipe, Directive, signal, DestroyRef, DOCUMENT, input, computed, ChangeDetectionStrategy, Component, output, ElementRef, EnvironmentInjector, effect, createComponent, HostListener, model, TemplateRef, ViewContainerRef, contentChild, forwardRef, ViewChild, ViewEncapsulation, contentChildren, NgZone, Injector, viewChild, isDevMode, ChangeDetectorRef, booleanAttribute, numberAttribute, afterNextRender, viewChildren, ApplicationRef } from '@angular/core';
3
3
  import { isPlatformBrowser, DOCUMENT as DOCUMENT$1, NgTemplateOutlet } from '@angular/common';
4
4
  import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
5
5
  import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
@@ -3673,7 +3673,7 @@ class SolarisMegaMenuComponent {
3673
3673
  provide: SOLARIS_MEGA_MENU,
3674
3674
  useExisting: forwardRef(() => SolarisMegaMenuComponent),
3675
3675
  },
3676
- ], queries: [{ propertyName: "panel", first: true, predicate: SolarisMegaMenuPanelDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: ["overlayPanel"], descendants: true, static: true }], ngImport: i0, template: "<ng-content select=\"[solaris-mega-menu-trigger]\" />\n<ng-content select=\"ng-template[solaris-mega-menu-panel]\" />\n\n<ng-template #overlayPanel>\n <section\n class=\"solaris-mega-menu__panel\"\n [id]=\"panelId\"\n tabindex=\"-1\"\n (pointerenter)=\"onPanelPointerEnter()\"\n (pointerleave)=\"onPanelPointerLeave()\"\n (focusout)=\"onPanelFocusOut()\"\n (keydown.escape)=\"onPanelEscape($event)\"\n >\n <ng-container *ngTemplateOutlet=\"panel()?.templateRef\" />\n </section>\n</ng-template>\n", styles: ["solaris-mega-menu{display:inline-block}[solaris-mega-menu-trigger]{display:inline-flex;align-items:center;gap:var(--solaris-spacing-2);transition:color var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard)}.solaris-mega-menu-trigger__chevron{order:1;flex:0 0 auto;transform:rotate(45deg);margin-inline-start:auto;width:var(--solaris-spacing-2);height:var(--solaris-spacing-2);border-right:var(--solaris-border-width-sm) solid currentcolor;border-bottom:var(--solaris-border-width-sm) solid currentcolor;transition:transform var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard)}[solaris-mega-menu-trigger][data-open] .solaris-mega-menu-trigger__chevron{transform:rotate(-135deg)}[solaris-mega-menu-trigger][data-appearance=underline]{border-bottom:2px solid transparent}[solaris-mega-menu-trigger][data-appearance=underline][data-open]{border-bottom-color:transparent}[solaris-mega-menu-anchor]{position:relative}.solaris-mega-menu-anchor__underline{bottom:1px;height:2px;position:absolute;pointer-events:none;z-index:var(--solaris-z-index-raised);background:var(--solaris-primary-base);transition:left var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard),width var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard)}[solaris-mega-menu-trigger][data-appearance=underline]:hover,[solaris-mega-menu-trigger][data-appearance=underline]:focus-visible{background:transparent}[solaris-mega-menu-trigger][data-appearance=text]{color:var(--solaris-text-muted)}[solaris-mega-menu-trigger][data-appearance=text][data-open]{color:var(--solaris-text-strong)}.solaris-mega-menu__panel{--solaris-mega-menu-shadow: var(--solaris-shadow-lg);--solaris-mega-menu-color: var(--solaris-text-default);--solaris-mega-menu-background: var(--solaris-surface-raised);width:100%;box-sizing:border-box;color:var(--solaris-mega-menu-color);box-shadow:var(--solaris-mega-menu-shadow);background:var(--solaris-mega-menu-background);animation:solaris-mega-menu-enter var(--solaris-motion-duration-fast) var(--solaris-motion-easing-decelerate)}.cdk-overlay-backdrop.solaris-mega-menu-backdrop{pointer-events:none;background:transparent}.solaris-mega-menu-backdrop__region{display:block;position:absolute;pointer-events:auto;background:var(--solaris-backdrop)}.solaris-mega-menu-backdrop__region--top,.solaris-mega-menu-backdrop__region--bottom{right:0;left:0}.solaris-mega-menu-backdrop__region--top{top:0}.solaris-mega-menu-backdrop__region--bottom{bottom:0}.solaris-mega-menu-backdrop__region--left{left:0}.solaris-mega-menu-backdrop__region--right{right:0}@keyframes solaris-mega-menu-enter{0%{opacity:0;transform:translateY(calc(-1 * var(--solaris-spacing-1)))}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){[solaris-mega-menu-trigger],.solaris-mega-menu-anchor__underline,.solaris-mega-menu-trigger__chevron,.solaris-mega-menu__panel{animation:none;transition:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
3676
+ ], queries: [{ propertyName: "panel", first: true, predicate: SolarisMegaMenuPanelDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: ["overlayPanel"], descendants: true, static: true }], ngImport: i0, template: "<ng-content select=\"[solaris-mega-menu-trigger]\" />\n<ng-content select=\"ng-template[solaris-mega-menu-panel]\" />\n\n<ng-template #overlayPanel>\n <section\n class=\"solaris-mega-menu__panel\"\n [id]=\"panelId\"\n tabindex=\"-1\"\n (pointerenter)=\"onPanelPointerEnter()\"\n (pointerleave)=\"onPanelPointerLeave()\"\n (focusout)=\"onPanelFocusOut()\"\n (keydown.escape)=\"onPanelEscape($event)\"\n >\n <ng-container *ngTemplateOutlet=\"panel()?.templateRef\" />\n </section>\n</ng-template>\n", styles: ["solaris-mega-menu{display:inline-block}[solaris-mega-menu-trigger]{display:inline-flex;align-items:center;gap:var(--solaris-spacing-2);transition:color var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}[solaris-mega-menu-trigger]:after{content:\"\";flex:0 0 auto;width:var(--solaris-spacing-4);height:var(--solaris-spacing-4);background:currentcolor;transform:rotate(0);transform-origin:center;transition:transform var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard);mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\") center/contain no-repeat;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\") center/contain no-repeat}[solaris-mega-menu-trigger][data-open]:after{transform:rotate(180deg)}[solaris-mega-menu-trigger][data-appearance=underline]{border-bottom:2px solid transparent}[solaris-mega-menu-trigger][data-appearance=underline][data-open]{border-bottom-color:transparent}[solaris-mega-menu-anchor]{position:relative}.solaris-mega-menu-anchor__underline{bottom:1px;height:2px;position:absolute;pointer-events:none;z-index:var(--solaris-z-index-raised);background:var(--solaris-primary-base);transition:left var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard),width var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}[solaris-mega-menu-trigger][data-appearance=underline]:hover,[solaris-mega-menu-trigger][data-appearance=underline]:focus-visible{background:transparent}[solaris-mega-menu-trigger][data-appearance=text]{color:var(--solaris-text-muted)}[solaris-mega-menu-trigger][data-appearance=text][data-open]{color:var(--solaris-text-strong)}.solaris-mega-menu__panel{--solaris-mega-menu-shadow: var(--solaris-shadow-lg);--solaris-mega-menu-color: var(--solaris-text-default);--solaris-mega-menu-background: var(--solaris-surface-raised);width:100%;box-sizing:border-box;color:var(--solaris-mega-menu-color);box-shadow:var(--solaris-mega-menu-shadow);background:var(--solaris-mega-menu-background);animation:solaris-mega-menu-enter var(--solaris-motion-duration-fast) var(--solaris-motion-easing-decelerate)}.cdk-overlay-backdrop.solaris-mega-menu-backdrop{pointer-events:none;background:transparent}.solaris-mega-menu-backdrop__region{display:block;position:absolute;pointer-events:auto;background:var(--solaris-backdrop)}.solaris-mega-menu-backdrop__region--top,.solaris-mega-menu-backdrop__region--bottom{right:0;left:0}.solaris-mega-menu-backdrop__region--top{top:0}.solaris-mega-menu-backdrop__region--bottom{bottom:0}.solaris-mega-menu-backdrop__region--left{left:0}.solaris-mega-menu-backdrop__region--right{right:0}@keyframes solaris-mega-menu-enter{0%{opacity:0;transform:translateY(calc(-1 * var(--solaris-spacing-1)))}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){[solaris-mega-menu-trigger],.solaris-mega-menu-anchor__underline,[solaris-mega-menu-trigger]:after,.solaris-mega-menu__panel{animation:none;transition:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
3677
3677
  }
3678
3678
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisMegaMenuComponent, decorators: [{
3679
3679
  type: Component,
@@ -3685,7 +3685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
3685
3685
  ], host: {
3686
3686
  class: 'solaris-mega-menu',
3687
3687
  '[attr.data-open]': 'isOpen() ? "" : null',
3688
- }, template: "<ng-content select=\"[solaris-mega-menu-trigger]\" />\n<ng-content select=\"ng-template[solaris-mega-menu-panel]\" />\n\n<ng-template #overlayPanel>\n <section\n class=\"solaris-mega-menu__panel\"\n [id]=\"panelId\"\n tabindex=\"-1\"\n (pointerenter)=\"onPanelPointerEnter()\"\n (pointerleave)=\"onPanelPointerLeave()\"\n (focusout)=\"onPanelFocusOut()\"\n (keydown.escape)=\"onPanelEscape($event)\"\n >\n <ng-container *ngTemplateOutlet=\"panel()?.templateRef\" />\n </section>\n</ng-template>\n", styles: ["solaris-mega-menu{display:inline-block}[solaris-mega-menu-trigger]{display:inline-flex;align-items:center;gap:var(--solaris-spacing-2);transition:color var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard)}.solaris-mega-menu-trigger__chevron{order:1;flex:0 0 auto;transform:rotate(45deg);margin-inline-start:auto;width:var(--solaris-spacing-2);height:var(--solaris-spacing-2);border-right:var(--solaris-border-width-sm) solid currentcolor;border-bottom:var(--solaris-border-width-sm) solid currentcolor;transition:transform var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard)}[solaris-mega-menu-trigger][data-open] .solaris-mega-menu-trigger__chevron{transform:rotate(-135deg)}[solaris-mega-menu-trigger][data-appearance=underline]{border-bottom:2px solid transparent}[solaris-mega-menu-trigger][data-appearance=underline][data-open]{border-bottom-color:transparent}[solaris-mega-menu-anchor]{position:relative}.solaris-mega-menu-anchor__underline{bottom:1px;height:2px;position:absolute;pointer-events:none;z-index:var(--solaris-z-index-raised);background:var(--solaris-primary-base);transition:left var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard),width var(--solaris-motion-duration-fast) var(--solaris-motion-easing-standard)}[solaris-mega-menu-trigger][data-appearance=underline]:hover,[solaris-mega-menu-trigger][data-appearance=underline]:focus-visible{background:transparent}[solaris-mega-menu-trigger][data-appearance=text]{color:var(--solaris-text-muted)}[solaris-mega-menu-trigger][data-appearance=text][data-open]{color:var(--solaris-text-strong)}.solaris-mega-menu__panel{--solaris-mega-menu-shadow: var(--solaris-shadow-lg);--solaris-mega-menu-color: var(--solaris-text-default);--solaris-mega-menu-background: var(--solaris-surface-raised);width:100%;box-sizing:border-box;color:var(--solaris-mega-menu-color);box-shadow:var(--solaris-mega-menu-shadow);background:var(--solaris-mega-menu-background);animation:solaris-mega-menu-enter var(--solaris-motion-duration-fast) var(--solaris-motion-easing-decelerate)}.cdk-overlay-backdrop.solaris-mega-menu-backdrop{pointer-events:none;background:transparent}.solaris-mega-menu-backdrop__region{display:block;position:absolute;pointer-events:auto;background:var(--solaris-backdrop)}.solaris-mega-menu-backdrop__region--top,.solaris-mega-menu-backdrop__region--bottom{right:0;left:0}.solaris-mega-menu-backdrop__region--top{top:0}.solaris-mega-menu-backdrop__region--bottom{bottom:0}.solaris-mega-menu-backdrop__region--left{left:0}.solaris-mega-menu-backdrop__region--right{right:0}@keyframes solaris-mega-menu-enter{0%{opacity:0;transform:translateY(calc(-1 * var(--solaris-spacing-1)))}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){[solaris-mega-menu-trigger],.solaris-mega-menu-anchor__underline,.solaris-mega-menu-trigger__chevron,.solaris-mega-menu__panel{animation:none;transition:none}}\n"] }]
3688
+ }, template: "<ng-content select=\"[solaris-mega-menu-trigger]\" />\n<ng-content select=\"ng-template[solaris-mega-menu-panel]\" />\n\n<ng-template #overlayPanel>\n <section\n class=\"solaris-mega-menu__panel\"\n [id]=\"panelId\"\n tabindex=\"-1\"\n (pointerenter)=\"onPanelPointerEnter()\"\n (pointerleave)=\"onPanelPointerLeave()\"\n (focusout)=\"onPanelFocusOut()\"\n (keydown.escape)=\"onPanelEscape($event)\"\n >\n <ng-container *ngTemplateOutlet=\"panel()?.templateRef\" />\n </section>\n</ng-template>\n", styles: ["solaris-mega-menu{display:inline-block}[solaris-mega-menu-trigger]{display:inline-flex;align-items:center;gap:var(--solaris-spacing-2);transition:color var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}[solaris-mega-menu-trigger]:after{content:\"\";flex:0 0 auto;width:var(--solaris-spacing-4);height:var(--solaris-spacing-4);background:currentcolor;transform:rotate(0);transform-origin:center;transition:transform var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard);mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\") center/contain no-repeat;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E\") center/contain no-repeat}[solaris-mega-menu-trigger][data-open]:after{transform:rotate(180deg)}[solaris-mega-menu-trigger][data-appearance=underline]{border-bottom:2px solid transparent}[solaris-mega-menu-trigger][data-appearance=underline][data-open]{border-bottom-color:transparent}[solaris-mega-menu-anchor]{position:relative}.solaris-mega-menu-anchor__underline{bottom:1px;height:2px;position:absolute;pointer-events:none;z-index:var(--solaris-z-index-raised);background:var(--solaris-primary-base);transition:left var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard),width var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}[solaris-mega-menu-trigger][data-appearance=underline]:hover,[solaris-mega-menu-trigger][data-appearance=underline]:focus-visible{background:transparent}[solaris-mega-menu-trigger][data-appearance=text]{color:var(--solaris-text-muted)}[solaris-mega-menu-trigger][data-appearance=text][data-open]{color:var(--solaris-text-strong)}.solaris-mega-menu__panel{--solaris-mega-menu-shadow: var(--solaris-shadow-lg);--solaris-mega-menu-color: var(--solaris-text-default);--solaris-mega-menu-background: var(--solaris-surface-raised);width:100%;box-sizing:border-box;color:var(--solaris-mega-menu-color);box-shadow:var(--solaris-mega-menu-shadow);background:var(--solaris-mega-menu-background);animation:solaris-mega-menu-enter var(--solaris-motion-duration-fast) var(--solaris-motion-easing-decelerate)}.cdk-overlay-backdrop.solaris-mega-menu-backdrop{pointer-events:none;background:transparent}.solaris-mega-menu-backdrop__region{display:block;position:absolute;pointer-events:auto;background:var(--solaris-backdrop)}.solaris-mega-menu-backdrop__region--top,.solaris-mega-menu-backdrop__region--bottom{right:0;left:0}.solaris-mega-menu-backdrop__region--top{top:0}.solaris-mega-menu-backdrop__region--bottom{bottom:0}.solaris-mega-menu-backdrop__region--left{left:0}.solaris-mega-menu-backdrop__region--right{right:0}@keyframes solaris-mega-menu-enter{0%{opacity:0;transform:translateY(calc(-1 * var(--solaris-spacing-1)))}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){[solaris-mega-menu-trigger],.solaris-mega-menu-anchor__underline,[solaris-mega-menu-trigger]:after,.solaris-mega-menu__panel{animation:none;transition:none}}\n"] }]
3689
3689
  }], ctorParameters: () => [], propDecorators: { overlayPanel: [{
3690
3690
  type: ViewChild,
3691
3691
  args: ['overlayPanel', { static: true }]
@@ -3754,17 +3754,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
3754
3754
  }]
3755
3755
  }] });
3756
3756
 
3757
- // SECURITY_EXCEPTION_FILE: Native host access sets the semantic button type. Renderer2 creates the decorative chevron for both SSR and browser rendering; directive specs cover trigger semantics and interaction.
3757
+ // SECURITY_EXCEPTION_FILE: Native host access sets the semantic button type; directive specs cover trigger semantics and interaction.
3758
3758
  class SolarisMegaMenuTriggerDirective {
3759
3759
  megaMenu = inject(SOLARIS_MEGA_MENU);
3760
3760
  elementRef = inject(ElementRef);
3761
- renderer = inject(Renderer2);
3762
3761
  isPointerInteraction = false;
3763
3762
  constructor() {
3764
3763
  if (this.elementRef.nativeElement.getAttribute('type') === null) {
3765
3764
  this.elementRef.nativeElement.setAttribute('type', 'button');
3766
3765
  }
3767
- this.ensureChevron();
3768
3766
  }
3769
3767
  onClick() {
3770
3768
  this.megaMenu.toggleFromClick();
@@ -3796,16 +3794,6 @@ class SolarisMegaMenuTriggerDirective {
3796
3794
  event.preventDefault();
3797
3795
  this.megaMenu.close(true);
3798
3796
  }
3799
- ensureChevron() {
3800
- const host = this.elementRef.nativeElement;
3801
- if (host.querySelector('.solaris-mega-menu-trigger__chevron')) {
3802
- return;
3803
- }
3804
- const chevron = this.renderer.createElement('span');
3805
- this.renderer.addClass(chevron, 'solaris-mega-menu-trigger__chevron');
3806
- this.renderer.setAttribute(chevron, 'aria-hidden', 'true');
3807
- this.renderer.appendChild(host, chevron);
3808
- }
3809
3797
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisMegaMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3810
3798
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: SolarisMegaMenuTriggerDirective, isStandalone: true, selector: "button[solaris-mega-menu-trigger]", host: { listeners: { "click": "onClick()", "pointerdown": "onPointerDown()", "pointercancel": "onPointerCancel()", "pointerenter": "onPointerEnter()", "pointerleave": "onPointerLeave()", "focusin": "onFocusIn()", "keydown.arrowdown": "onArrowDown($event)", "keydown.escape": "onEscape($event)" }, properties: { "attr.aria-controls": "megaMenu.panelId", "attr.aria-expanded": "megaMenu.isOpen() ? \"true\" : \"false\"", "attr.aria-haspopup": "\"true\"", "attr.data-open": "megaMenu.isOpen() ? \"\" : null", "attr.data-appearance": "megaMenu.appearance()" }, classAttribute: "solaris-mega-menu-trigger" }, ngImport: i0 });
3811
3799
  }