@gilav21/shadcn-angular-data-table 0.3.3 → 0.3.4

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,7 +1,7 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { twMerge } from 'tailwind-merge';
3
3
  import * as i0 from '@angular/core';
4
- import { signal, inject, ElementRef, Renderer2, input, Directive, viewChild, computed, ChangeDetectionStrategy, Component, output, InjectionToken, Injector, Injectable, effect, untracked, DestroyRef, model, forwardRef, afterNextRender, contentChild, afterRenderEffect, ApplicationRef, EnvironmentInjector, createComponent, HostListener, ViewChild, ViewContainerRef, viewChildren, booleanAttribute, ErrorHandler } from '@angular/core';
4
+ import { signal, inject, ElementRef, Renderer2, input, Directive, viewChild, computed, ChangeDetectionStrategy, Component, output, InjectionToken, Injector, Injectable, effect, untracked, DestroyRef, model, forwardRef, afterNextRender, contentChild, afterRenderEffect, ApplicationRef, EnvironmentInjector, createComponent, HostListener, ViewChild, ChangeDetectorRef, ViewContainerRef, viewChildren, booleanAttribute, ErrorHandler } from '@angular/core';
5
5
  import * as i1$1 from '@angular/common';
6
6
  import { DOCUMENT, CommonModule, NgTemplateOutlet } from '@angular/common';
7
7
  import { cva } from 'class-variance-authority';
@@ -1155,8 +1155,10 @@ class UiRippleDirective {
1155
1155
  return;
1156
1156
  const host = this.el.nativeElement;
1157
1157
  const rect = host.getBoundingClientRect();
1158
- const x = event.clientX - rect.left;
1159
- const y = event.clientY - rect.top;
1158
+ // A keyboard-initiated click has no pointer position (detail 0, coords 0,0).
1159
+ const noPointer = event.detail === 0 && event.clientX === 0 && event.clientY === 0;
1160
+ const x = noPointer ? rect.width / 2 : event.clientX - rect.left;
1161
+ const y = noPointer ? rect.height / 2 : event.clientY - rect.top;
1160
1162
  const diameter = Math.max(rect.width, rect.height) * 2;
1161
1163
  const ripple = this.renderer.createElement('span');
1162
1164
  this.renderer.setStyle(ripple, 'position', 'absolute');
@@ -1273,6 +1275,8 @@ class SpinnerComponent {
1273
1275
  * rendered instead.
1274
1276
  */
1275
1277
  this.variant = input('ring', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1278
+ /** Accessible name announced by assistive technology (applies to every variant). Set it to say what is loading, or to localize it. */
1279
+ this.label = input('Loading', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1276
1280
  this.contentWrapper = viewChild('contentWrapper', ...(ngDevMode ? [{ debugName: "contentWrapper" }] : /* istanbul ignore next */ []));
1277
1281
  this._hasCustomContent = signal(false, ...(ngDevMode ? [{ debugName: "_hasCustomContent" }] : /* istanbul ignore next */ []));
1278
1282
  this.hasCustomContent = this._hasCustomContent.asReadonly();
@@ -1300,12 +1304,12 @@ class SpinnerComponent {
1300
1304
  this._hasCustomContent.set((this.contentWrapper()?.nativeElement?.children?.length ?? 0) > 0);
1301
1305
  }
1302
1306
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1303
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SpinnerComponent, isStandalone: true, selector: "ui-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customSize: { classPropertyName: "customSize", publicName: "customSize", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n aria-label=\"Loading\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1307
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SpinnerComponent, isStandalone: true, selector: "ui-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customSize: { classPropertyName: "customSize", publicName: "customSize", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n [attr.aria-label]=\"label()\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1304
1308
  }
1305
1309
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SpinnerComponent, decorators: [{
1306
1310
  type: Component,
1307
- args: [{ selector: 'ui-spinner', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n aria-label=\"Loading\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n" }]
1308
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], customSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "customSize", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { isSignal: true }] }] } });
1311
+ args: [{ selector: 'ui-spinner', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n [attr.aria-label]=\"label()\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n" }]
1312
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], customSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "customSize", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { isSignal: true }] }] } });
1309
1313
 
1310
1314
  /**
1311
1315
  * PageSpinner - Full page loading overlay
@@ -1327,7 +1331,7 @@ class PageSpinnerComponent {
1327
1331
  this.classes = computed(() => cn('fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
1328
1332
  }
1329
1333
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PageSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1330
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PageSpinnerComponent, isStandalone: true, selector: "ui-page-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'page-spinner'\">\n <div class=\"flex flex-col items-center gap-4\">\n <ui-spinner size=\"page\" />\n @if (message()) {\n <p class=\"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none\">{{ message() }}</p>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1334
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PageSpinnerComponent, isStandalone: true, selector: "ui-page-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'page-spinner'\">\n <div class=\"flex flex-col items-center gap-4\">\n <ui-spinner size=\"page\" />\n @if (message()) {\n <p class=\"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none\">{{ message() }}</p>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1331
1335
  }
1332
1336
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PageSpinnerComponent, decorators: [{
1333
1337
  type: Component,
@@ -1349,7 +1353,7 @@ class SkeletonComponent {
1349
1353
  * entirely under `prefers-reduced-motion: reduce`.
1350
1354
  */
1351
1355
  this.variant = input('pulse', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1352
- this.classes = computed(() => cn('rounded-md', this.variant() === 'pulse' && 'animate-pulse bg-primary/10', this.variant() === 'shimmer' && 'animate-shimmer', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
1356
+ this.classes = computed(() => cn('block rounded-md', this.variant() === 'pulse' && 'animate-pulse bg-primary/10', this.variant() === 'shimmer' && 'animate-shimmer', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
1353
1357
  }
1354
1358
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1355
1359
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: SkeletonComponent, isStandalone: true, selector: "ui-skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"skeleton\"" } }, ngImport: i0, template: ``, isInline: true, styles: [":host.animate-shimmer{background:#f6f7f8;background:linear-gradient(to right,#f6f7f8 8%,#edeef1 18%,#f6f7f8 33%);background-size:800px 104px;animation:shimmer 2s linear infinite forwards}.dark .animate-shimmer{background:#1e293b;background:linear-gradient(to right,#1e293b 8%,#0f172a 18%,#1e293b 33%);background-size:800px 104px}@keyframes shimmer{0%{background-position:-800px 0}to{background-position:800px 0}}@media(prefers-reduced-motion:reduce){:host.animate-shimmer,.animate-shimmer{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -1456,7 +1460,7 @@ class ButtonComponent {
1456
1460
  this.classes = computed(() => cn(buttonVariants({ variant: this.variant(), size: this.size() }), this.loading() && 'relative', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
1457
1461
  }
1458
1462
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1459
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ui-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "aria-expanded", isSignal: true, isRequired: false, transformFunction: null }, ariaPressed: { classPropertyName: "ariaPressed", publicName: "aria-pressed", isSignal: true, isRequired: false, transformFunction: null }, ariaHaspopup: { classPropertyName: "ariaHaspopup", publicName: "aria-haspopup", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "aria-controls", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, rippleColor: { classPropertyName: "rippleColor", publicName: "rippleColor", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class": "\"contents\"", "attr.data-size": "size()", "attr.aria-label": "null", "attr.aria-expanded": "null", "attr.aria-pressed": "null", "attr.aria-controls": "null", "attr.aria-haspopup": "null" } }, ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-24 rounded-md\" />\n} @else {\n <button\n uiRipple\n [uiRippleDisabled]=\"!ripple()\"\n [uiRippleColor]=\"rippleColor()\"\n [class]=\"classes()\"\n [disabled]=\"disabled() || loading()\"\n [type]=\"type()\"\n [attr.data-slot]=\"'button'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded() ?? null\"\n [attr.aria-pressed]=\"ariaPressed() ?? null\"\n [attr.aria-controls]=\"ariaControls() || null\"\n [attr.aria-haspopup]=\"ariaHaspopup() ?? null\"\n (click)=\"clicked.emit($event)\"\n >\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center\" aria-hidden=\"true\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content />\n }\n </button>\n}\n", styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=button]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d))}:host([data-size=\"sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));padding-inline:calc(.75rem * var(--_d))}:host([data-size=\"lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));padding-inline:calc(2rem * var(--_d))}:host([data-size=\"icon\"]) [data-slot=button]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d));padding:0}:host([data-size=\"icon-sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));width:calc(2rem * var(--_d));padding:0}:host([data-size=\"icon-lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));width:calc(2.5rem * var(--_d));padding:0}}\n"], dependencies: [{ kind: "directive", type: UiRippleDirective, selector: "[uiRipple]", inputs: ["uiRippleColor", "uiRippleDuration", "uiRippleDisabled"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1463
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ui-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "aria-expanded", isSignal: true, isRequired: false, transformFunction: null }, ariaPressed: { classPropertyName: "ariaPressed", publicName: "aria-pressed", isSignal: true, isRequired: false, transformFunction: null }, ariaHaspopup: { classPropertyName: "ariaHaspopup", publicName: "aria-haspopup", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "aria-controls", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, rippleColor: { classPropertyName: "rippleColor", publicName: "rippleColor", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class": "\"contents\"", "attr.data-size": "size()", "attr.aria-label": "null", "attr.aria-expanded": "null", "attr.aria-pressed": "null", "attr.aria-controls": "null", "attr.aria-haspopup": "null" } }, ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-24 rounded-md\" />\n} @else {\n <button\n uiRipple\n [uiRippleDisabled]=\"!ripple()\"\n [uiRippleColor]=\"rippleColor()\"\n [class]=\"classes()\"\n [disabled]=\"disabled() || loading()\"\n [type]=\"type()\"\n [attr.data-slot]=\"'button'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded() ?? null\"\n [attr.aria-pressed]=\"ariaPressed() ?? null\"\n [attr.aria-controls]=\"ariaControls() || null\"\n [attr.aria-haspopup]=\"ariaHaspopup() ?? null\"\n (click)=\"clicked.emit($event)\"\n >\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center\" aria-hidden=\"true\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content />\n }\n </button>\n}\n", styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=button]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d))}:host([data-size=\"sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));padding-inline:calc(.75rem * var(--_d))}:host([data-size=\"lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));padding-inline:calc(2rem * var(--_d))}:host([data-size=\"icon\"]) [data-slot=button]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d));padding:0}:host([data-size=\"icon-sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));width:calc(2rem * var(--_d));padding:0}:host([data-size=\"icon-lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));width:calc(2.5rem * var(--_d));padding:0}}\n"], dependencies: [{ kind: "directive", type: UiRippleDirective, selector: "[uiRipple]", inputs: ["uiRippleColor", "uiRippleDuration", "uiRippleDisabled"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1460
1464
  }
1461
1465
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, decorators: [{
1462
1466
  type: Component,
@@ -2591,7 +2595,7 @@ class AlertDialogContentComponent {
2591
2595
  this.actionClick = output();
2592
2596
  /** The cancel button was pressed. Same simple-mode-only rules as {@link actionClick}. */
2593
2597
  this.cancelClick = output();
2594
- this.classes = computed(() => cn('fixed z-50 grid w-full max-w-[calc(100vw-2rem)] sm:max-w-lg gap-3 sm:gap-4 border bg-background p-4 sm:p-6 shadow-lg duration-200 sm:rounded-lg', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
2598
+ this.classes = computed(() => cn('fixed z-50 grid w-full max-w-[calc(100vw-2rem)] sm:max-w-lg border bg-background shadow-lg duration-200 sm:rounded-lg', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
2595
2599
  /**
2596
2600
  * The two places a title can come from: the one this component renders for the `title` input, and one the
2597
2601
  * author projects. Read by the naming effect so it runs again when either appears, which a title rendered
@@ -2682,22 +2686,18 @@ class AlertDialogContentComponent {
2682
2686
  </div>
2683
2687
  </div>
2684
2688
  }
2685
- `, isInline: true, dependencies: [{ kind: "component", type: AlertDialogHeaderComponent, selector: "ui-alert-dialog-header", inputs: ["class"] }, { kind: "component", type: AlertDialogTitleComponent, selector: "ui-alert-dialog-title", inputs: ["class"] }, { kind: "component", type: AlertDialogDescriptionComponent, selector: "ui-alert-dialog-description", inputs: ["class"] }, { kind: "component", type: AlertDialogFooterComponent, selector: "ui-alert-dialog-footer", inputs: ["class"] }, { kind: "component", type: AlertDialogActionComponent, selector: "ui-alert-dialog-action", inputs: ["class"] }, { kind: "component", type: AlertDialogCancelComponent, selector: "ui-alert-dialog-cancel", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2689
+ `, isInline: true, styles: [":host{--_d: var(--density-alert-dialog, var(--density, 1))}@layer components{[data-slot=alert-dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=alert-dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"], dependencies: [{ kind: "component", type: AlertDialogHeaderComponent, selector: "ui-alert-dialog-header", inputs: ["class"] }, { kind: "component", type: AlertDialogTitleComponent, selector: "ui-alert-dialog-title", inputs: ["class"] }, { kind: "component", type: AlertDialogDescriptionComponent, selector: "ui-alert-dialog-description", inputs: ["class"] }, { kind: "component", type: AlertDialogFooterComponent, selector: "ui-alert-dialog-footer", inputs: ["class"] }, { kind: "component", type: AlertDialogActionComponent, selector: "ui-alert-dialog-action", inputs: ["class"] }, { kind: "component", type: AlertDialogCancelComponent, selector: "ui-alert-dialog-cancel", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2686
2690
  }
2687
2691
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogContentComponent, decorators: [{
2688
2692
  type: Component,
2689
- args: [{
2690
- selector: 'ui-alert-dialog-content',
2691
- changeDetection: ChangeDetectionStrategy.OnPush,
2692
- imports: [
2693
+ args: [{ selector: 'ui-alert-dialog-content', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2693
2694
  AlertDialogHeaderComponent,
2694
2695
  AlertDialogTitleComponent,
2695
2696
  AlertDialogDescriptionComponent,
2696
2697
  AlertDialogFooterComponent,
2697
2698
  AlertDialogActionComponent,
2698
2699
  AlertDialogCancelComponent,
2699
- ],
2700
- template: `
2700
+ ], template: `
2701
2701
  @if (alertDialog?.open()) {
2702
2702
  <div
2703
2703
  class="fixed inset-0 z-50 flex items-center justify-center"
@@ -2734,9 +2734,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2734
2734
  </div>
2735
2735
  </div>
2736
2736
  }
2737
- `,
2738
- host: { class: 'contents' },
2739
- }]
2737
+ `, host: { class: 'contents' }, styles: [":host{--_d: var(--density-alert-dialog, var(--density, 1))}@layer components{[data-slot=alert-dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=alert-dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"] }]
2740
2738
  }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], cancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelText", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], cancelClick: [{ type: i0.Output, args: ["cancelClick"] }], ownTitle: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AlertDialogTitleComponent), { isSignal: true }] }], projectedTitle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AlertDialogTitleComponent), { isSignal: true }] }] } });
2741
2739
 
2742
2740
  class ConfirmDialogComponent {
@@ -4692,6 +4690,8 @@ class SelectComponent {
4692
4690
  }
4693
4691
  break;
4694
4692
  case 'Tab':
4693
+ // Same contract as the projected panel: focus the trigger, close, let the Tab walk on from it.
4694
+ this.restoreFocusFromPanel();
4695
4695
  this.close();
4696
4696
  break;
4697
4697
  }
@@ -4947,7 +4947,7 @@ class SelectTriggerComponent {
4947
4947
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4948
4948
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SelectTriggerComponent, isStandalone: true, selector: "ui-select-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
4949
4949
  @if (skeleton()) {
4950
- <ui-skeleton class="h-9 w-full rounded-md" />
4950
+ <ui-skeleton class="h-9 w-full min-w-32 rounded-md" />
4951
4951
  } @else {
4952
4952
  <button
4953
4953
  type="button"
@@ -4978,13 +4978,13 @@ class SelectTriggerComponent {
4978
4978
  }
4979
4979
  </button>
4980
4980
  }
4981
- `, isInline: true, styles: [":host{--_d: var(--density-select, var(--density, 1))}@layer components{[data-slot=select-trigger]{height:calc(var(--ui-select-trigger-h, 2.25rem) * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4981
+ `, isInline: true, styles: [":host{--_d: var(--density-select, var(--density, 1))}@layer components{[data-slot=select-trigger]{height:calc(var(--ui-select-trigger-h, 2.25rem) * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4982
4982
  }
4983
4983
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectTriggerComponent, decorators: [{
4984
4984
  type: Component,
4985
4985
  args: [{ selector: 'ui-select-trigger', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SpinnerComponent, SkeletonComponent], template: `
4986
4986
  @if (skeleton()) {
4987
- <ui-skeleton class="h-9 w-full rounded-md" />
4987
+ <ui-skeleton class="h-9 w-full min-w-32 rounded-md" />
4988
4988
  } @else {
4989
4989
  <button
4990
4990
  type="button"
@@ -5215,11 +5215,19 @@ class SelectContentComponent {
5215
5215
  /**
5216
5216
  * Roving-focus key handler over the projected `<ui-select-item>` elements:
5217
5217
  * arrows move focus and wrap around the ends, Enter/Space click the focused
5218
- * item. Items marked `data-disabled` are excluded from the ring.
5218
+ * item, Tab closes and returns focus to the trigger. Items marked `data-disabled` are excluded from the ring.
5219
5219
  */
5220
5220
  onKeydown(event) {
5221
5221
  if (!this.contentEl?.nativeElement)
5222
5222
  return;
5223
+ if (event.key === 'Tab') {
5224
+ // The panel unmounts on close, so the Tab must not start from an item about to
5225
+ // disappear. Focus goes to the trigger first and the default Tab then walks on from it:
5226
+ // one press leaves the select, and nothing is committed (only Enter/Space select, as in data-driven mode).
5227
+ this.select?.getTriggerElement()?.focus();
5228
+ this.select?.close();
5229
+ return;
5230
+ }
5223
5231
  const items = Array.from(this.contentEl.nativeElement.querySelectorAll('[data-slot="select-item"]:not([data-disabled])'));
5224
5232
  if (!items.length)
5225
5233
  return;
@@ -5387,7 +5395,7 @@ class SelectLabelComponent {
5387
5395
  constructor() {
5388
5396
  /** Extra classes merged onto the element this component renders, after its built-in styling. */
5389
5397
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
5390
- this.classes = computed(() => cn('text-muted-foreground px-2 py-1.5 text-xs', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5398
+ this.classes = computed(() => cn('block text-muted-foreground px-2 py-1.5 text-xs', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5391
5399
  }
5392
5400
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5393
5401
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: SelectLabelComponent, isStandalone: true, selector: "ui-select-label", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"select-label\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -5409,7 +5417,7 @@ class SelectSeparatorComponent {
5409
5417
  constructor() {
5410
5418
  /** Extra classes merged onto the element this component renders, after its built-in styling. */
5411
5419
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
5412
- this.classes = computed(() => cn('bg-border pointer-events-none -mx-1 my-1 h-px', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5420
+ this.classes = computed(() => cn('block bg-border pointer-events-none -mx-1 my-1 h-px', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5413
5421
  }
5414
5422
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5415
5423
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: SelectSeparatorComponent, isStandalone: true, selector: "ui-select-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"select-separator\"" } }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -5540,8 +5548,8 @@ class PaginationComponent {
5540
5548
  this.t = this.i18n.t;
5541
5549
  this.dir = this.i18n.dir;
5542
5550
  this.classes = computed(() => cn('mx-auto flex w-full justify-center', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5543
- this.navButtonClasses = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50'), ...(ngDevMode ? [{ debugName: "navButtonClasses" }] : /* istanbul ignore next */ []));
5544
- this.pageLinkClasses = (isActive) => cn('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors cursor-pointer h-9 w-9', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', isActive
5551
+ this.navButtonClasses = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50'), ...(ngDevMode ? [{ debugName: "navButtonClasses" }] : /* istanbul ignore next */ []));
5552
+ this.pageLinkClasses = (isActive) => cn('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors cursor-pointer', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', isActive
5545
5553
  ? 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground'
5546
5554
  : 'hover:bg-accent hover:text-accent-foreground');
5547
5555
  /**
@@ -5653,15 +5661,11 @@ class PaginationComponent {
5653
5661
  <ng-content />
5654
5662
  }
5655
5663
  </nav>
5656
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5664
+ `, isInline: true, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-previous],[data-slot=pagination-next]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}[data-slot=pagination-link]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5657
5665
  }
5658
5666
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationComponent, decorators: [{
5659
5667
  type: Component,
5660
- args: [{
5661
- selector: 'ui-pagination',
5662
- providers: [provideComponentLocale(() => PaginationComponent)],
5663
- changeDetection: ChangeDetectionStrategy.OnPush,
5664
- template: `
5668
+ args: [{ selector: 'ui-pagination', providers: [provideComponentLocale(() => PaginationComponent)], changeDetection: ChangeDetectionStrategy.OnPush, template: `
5665
5669
  <nav
5666
5670
  role="navigation"
5667
5671
  [attr.aria-label]="t().pagination"
@@ -5731,9 +5735,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
5731
5735
  <ng-content />
5732
5736
  }
5733
5737
  </nav>
5734
- `,
5735
- host: { class: 'contents' },
5736
- }]
5738
+ `, host: { class: 'contents' }, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-previous],[data-slot=pagination-next]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}[data-slot=pagination-link]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d))}}\n"] }]
5737
5739
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }], totalPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPages", required: false }] }], siblingCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "siblingCount", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }] } });
5738
5740
 
5739
5741
  class PaginationContentComponent {
@@ -5841,7 +5843,7 @@ class PaginationPreviousComponent {
5841
5843
  /** Locale dictionary or registry key. Falls back to `UI_LOCALE_ID` when not set. */
5842
5844
  this.locale = input(...(ngDevMode ? [undefined, { debugName: "locale" }] : /* istanbul ignore next */ []));
5843
5845
  this.t = createLocaleSelector(this.locale, PAGINATION_LOCALES);
5844
- this.classes = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5846
+ this.classes = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5845
5847
  }
5846
5848
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationPreviousComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5847
5849
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PaginationPreviousComponent, isStandalone: true, selector: "ui-pagination-previous", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
@@ -5851,23 +5853,18 @@ class PaginationPreviousComponent {
5851
5853
  </svg>
5852
5854
  <span>{{ t().previous }}</span>
5853
5855
  </button>
5854
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5856
+ `, isInline: true, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-previous]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5855
5857
  }
5856
5858
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationPreviousComponent, decorators: [{
5857
5859
  type: Component,
5858
- args: [{
5859
- selector: 'ui-pagination-previous',
5860
- changeDetection: ChangeDetectionStrategy.OnPush,
5861
- template: `
5860
+ args: [{ selector: 'ui-pagination-previous', changeDetection: ChangeDetectionStrategy.OnPush, template: `
5862
5861
  <button type="button" [class]="classes()" [attr.data-slot]="'pagination-previous'" [disabled]="disabled()">
5863
5862
  <svg class="h-4 w-4 rtl:rotate-180" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
5864
5863
  <path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
5865
5864
  </svg>
5866
5865
  <span>{{ t().previous }}</span>
5867
5866
  </button>
5868
- `,
5869
- host: { class: 'contents' },
5870
- }]
5867
+ `, host: { class: 'contents' }, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-previous]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"] }]
5871
5868
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
5872
5869
 
5873
5870
  class PaginationNextComponent {
@@ -5879,7 +5876,7 @@ class PaginationNextComponent {
5879
5876
  /** Locale dictionary or registry key. Falls back to `UI_LOCALE_ID` when not set. */
5880
5877
  this.locale = input(...(ngDevMode ? [undefined, { debugName: "locale" }] : /* istanbul ignore next */ []));
5881
5878
  this.t = createLocaleSelector(this.locale, PAGINATION_LOCALES);
5882
- this.classes = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5879
+ this.classes = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5883
5880
  }
5884
5881
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationNextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5885
5882
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PaginationNextComponent, isStandalone: true, selector: "ui-pagination-next", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
@@ -5889,23 +5886,18 @@ class PaginationNextComponent {
5889
5886
  <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
5890
5887
  </svg>
5891
5888
  </button>
5892
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5889
+ `, isInline: true, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-next]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5893
5890
  }
5894
5891
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationNextComponent, decorators: [{
5895
5892
  type: Component,
5896
- args: [{
5897
- selector: 'ui-pagination-next',
5898
- changeDetection: ChangeDetectionStrategy.OnPush,
5899
- template: `
5893
+ args: [{ selector: 'ui-pagination-next', changeDetection: ChangeDetectionStrategy.OnPush, template: `
5900
5894
  <button type="button" [class]="classes()" [attr.data-slot]="'pagination-next'" [disabled]="disabled()">
5901
5895
  <span>{{ t().next }}</span>
5902
5896
  <svg class="h-4 w-4 rtl:rotate-180" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
5903
5897
  <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
5904
5898
  </svg>
5905
5899
  </button>
5906
- `,
5907
- host: { class: 'contents' },
5908
- }]
5900
+ `, host: { class: 'contents' }, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-next]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"] }]
5909
5901
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
5910
5902
 
5911
5903
  class PaginationEllipsisComponent {
@@ -7004,7 +6996,9 @@ class InputComponent {
7004
6996
  this.labelIsActive = computed(() => this.isFocused() || !!this.value(), ...(ngDevMode ? [{ debugName: "labelIsActive" }] : /* istanbul ignore next */ []));
7005
6997
  this.classes = computed(() => cn(inputVariants({ variant: this.effectiveVariant() }), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
7006
6998
  this.containerClasses = computed(() => cn('relative flex w-full items-center rounded-lg border border-input shadow-xs', 'transition-[color,box-shadow]', 'has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-[3px] has-[input:focus-visible]:ring-ring/50', 'dark:bg-input/30 bg-transparent', this.isDisabled() && 'opacity-50 pointer-events-none cursor-not-allowed', this.class()), ...(ngDevMode ? [{ debugName: "containerClasses" }] : /* istanbul ignore next */ []));
7007
- this.innerClasses = computed(() => cn(inputVariants({ variant: 'ghost' }), 'flex-1 h-full'), ...(ngDevMode ? [{ debugName: "innerClasses" }] : /* istanbul ignore next */ []));
6999
+ this.innerClasses = computed(() => cn(inputVariants({ variant: 'ghost' }), 'flex-1 h-full',
7000
+ // Ghost is flush (px-0); without a prefix the text would sit on the border. `\_` keeps Tailwind from reading `_` as a space, and String.raw keeps the single backslash its class scanner needs in source.
7001
+ !this.prefix() && String.raw `ps-[calc(0.75rem*var(--\_d))]`), ...(ngDevMode ? [{ debugName: "innerClasses" }] : /* istanbul ignore next */ []));
7008
7002
  this.floatingLabelClasses = computed(() => cn('pointer-events-none absolute select-none text-muted-foreground transition-all duration-150',
7009
7003
  // Resting = uniform placeholder; on float it transforms to the (optionally
7010
7004
  // dev-customized via labelClass) heading font.
@@ -7066,7 +7060,7 @@ class InputComponent {
7066
7060
  useExisting: forwardRef(() => InputComponent),
7067
7061
  multi: true,
7068
7062
  },
7069
- ], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n} @else if (isFloating()) {\n <div class=\"relative\" [attr.data-slot]=\"'input-floating'\" [attr.data-variant]=\"effectiveVariant()\">\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"labelIsActive() ? placeholder() : ''\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <label [for]=\"resolvedId()\" [class]=\"floatingLabelClasses()\" [attr.data-active]=\"labelIsActive() ? '' : null\">{{ label() }}</label>\n </div>\n} @else if (needsContainer()) {\n <div [class]=\"containerClasses()\" [attr.data-slot]=\"'input-container'\">\n @if (prefix()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-3 pe-1 text-sm select-none\">{{ prefix() }}</span>\n }\n <input\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n @if (clearable() && value()) {\n <button\n type=\"button\"\n (click)=\"clearValue()\"\n tabindex=\"-1\"\n class=\"flex shrink-0 items-center justify-center pe-2 text-muted-foreground hover:text-foreground\"\n aria-label=\"Clear\"\n >\n <ui-icon name=\"x\" class=\"size-3.5\" />\n </button>\n }\n @if (loading()) {\n <div class=\"flex shrink-0 items-center pe-2 pointer-events-none\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (suffix() && !loading()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-1 pe-3 text-sm select-none\">{{ suffix() }}</span>\n }\n </div>\n} @else {\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n}\n", styles: [":host{--_d: var(--density-input, var(--density, 1))}@layer components{[data-slot=input]{height:calc(2.25rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}[data-slot=input-container]{height:calc(2.25rem * var(--_d))}[data-slot=input-floating]{padding-top:calc(1.5rem * var(--_d))}[data-slot=input-floating]>label{inset-inline-start:calc(.75rem * var(--_d));top:calc(2.625rem * var(--_d));transform:translateY(-50%)}[data-slot=input-floating][data-variant=underline]>label,[data-slot=input-floating][data-variant=ghost]>label{inset-inline-start:0}[data-slot=input-floating]>label[data-active]{inset-inline-start:0;top:calc(1.125rem * var(--_d));transform:translateY(-100%)}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7063
+ ], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n} @else if (isFloating()) {\n <div class=\"relative\" [attr.data-slot]=\"'input-floating'\" [attr.data-variant]=\"effectiveVariant()\">\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"labelIsActive() ? placeholder() : ''\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <label [for]=\"resolvedId()\" [class]=\"floatingLabelClasses()\" [attr.data-active]=\"labelIsActive() ? '' : null\">{{ label() }}</label>\n </div>\n} @else if (needsContainer()) {\n <div [class]=\"containerClasses()\" [attr.data-slot]=\"'input-container'\">\n @if (prefix()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-3 pe-1 text-sm select-none\">{{ prefix() }}</span>\n }\n <input\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n @if (clearable() && value()) {\n <button\n type=\"button\"\n (click)=\"clearValue()\"\n tabindex=\"-1\"\n class=\"flex shrink-0 items-center justify-center pe-2 text-muted-foreground hover:text-foreground\"\n aria-label=\"Clear\"\n >\n <ui-icon name=\"x\" class=\"size-3.5\" />\n </button>\n }\n @if (loading()) {\n <div class=\"flex shrink-0 items-center pe-2 pointer-events-none\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (suffix() && !loading()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-1 pe-3 text-sm select-none\">{{ suffix() }}</span>\n }\n </div>\n} @else {\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n}\n", styles: [":host{--_d: var(--density-input, var(--density, 1))}@layer components{[data-slot=input]{height:calc(2.25rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}[data-slot=input-container]{height:calc(2.25rem * var(--_d))}[data-slot=input-floating]{padding-top:calc(1.5rem * var(--_d))}[data-slot=input-floating]>label{inset-inline-start:calc(.75rem * var(--_d));top:calc(2.625rem * var(--_d));transform:translateY(-50%)}[data-slot=input-floating][data-variant=underline]>label,[data-slot=input-floating][data-variant=ghost]>label{inset-inline-start:0}[data-slot=input-floating]>label[data-active]{inset-inline-start:0;top:calc(1.125rem * var(--_d));transform:translateY(-100%)}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7070
7064
  }
7071
7065
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: InputComponent, decorators: [{
7072
7066
  type: Component,
@@ -8598,6 +8592,7 @@ class PopoverContentComponent {
8598
8592
  this.popover = inject(POPOVER, { optional: true });
8599
8593
  this.document = inject(DOCUMENT);
8600
8594
  this.hostEl = inject(ElementRef);
8595
+ this.cdr = inject(ChangeDetectorRef);
8601
8596
  /** Extra classes merged onto the panel. Keep a width constraint viewport-aware (`max-w-[calc(100vw-2rem)]`), since the panel is positioned, not laid out by its parent. */
8602
8597
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
8603
8598
  /** Alignment along the chosen {@link side}'s edge: `'start'`, `'center'` or `'end'`. May be flipped at runtime when {@link avoidCollisions} is on. */
@@ -8638,15 +8633,24 @@ class PopoverContentComponent {
8638
8633
  */
8639
8634
  this.triggerRectSig = signal(null, ...(ngDevMode ? [{ debugName: "triggerRectSig" }] : /* istanbul ignore next */ []));
8640
8635
  this.adjustedPosition = signal({ side: 'bottom', align: 'center', offsetX: 0, offsetY: 0 }, ...(ngDevMode ? [{ debugName: "adjustedPosition" }] : /* istanbul ignore next */ []));
8636
+ /**
8637
+ * Width of the trigger, exposed to the content as `--trigger-width` so a
8638
+ * panel can match it (`class="w-(--trigger-width)"`). Re-read on every
8639
+ * open, as the trigger can resize between opens.
8640
+ */
8641
+ this.triggerWidth = computed(() => {
8642
+ if (!this.popover?.open())
8643
+ return null;
8644
+ const rect = this.triggerRectSig() ?? this.popover.getTriggerRect();
8645
+ return rect ? `${rect.width}px` : null;
8646
+ }, ...(ngDevMode ? [{ debugName: "triggerWidth" }] : /* istanbul ignore next */ []));
8641
8647
  this.positionStyles = computed(() => {
8642
8648
  const pos = this.adjustedPosition();
8643
8649
  if (this.strategy() === 'fixed') {
8644
8650
  return this.computeFixedStyles(pos);
8645
8651
  }
8646
- if (pos.offsetX !== 0) {
8647
- return `transform: translateX(${pos.offsetX}px);`;
8648
- }
8649
- return '';
8652
+ const offset = `--popover-offset:${this.sideOffset()}px;`;
8653
+ return pos.offsetX === 0 ? offset : `${offset}transform: translateX(${pos.offsetX}px);`;
8650
8654
  }, ...(ngDevMode ? [{ debugName: "positionStyles" }] : /* istanbul ignore next */ []));
8651
8655
  this.classes = computed(() => {
8652
8656
  const pos = this.adjustedPosition();
@@ -8658,10 +8662,10 @@ class PopoverContentComponent {
8658
8662
  end: 'right-0',
8659
8663
  };
8660
8664
  const sideClasses = {
8661
- top: 'bottom-full mb-1',
8662
- bottom: 'top-full mt-1',
8663
- left: 'right-full me-1 top-0',
8664
- right: 'left-full ms-1 top-0',
8665
+ top: 'bottom-full mb-[var(--popover-offset,4px)]',
8666
+ bottom: 'top-full mt-[var(--popover-offset,4px)]',
8667
+ left: 'right-full me-[var(--popover-offset,4px)] top-0',
8668
+ right: 'left-full ms-[var(--popover-offset,4px)] top-0',
8665
8669
  };
8666
8670
  const isFixed = this.strategy() === 'fixed';
8667
8671
  return cn(isFixed ? 'z-50 w-72 max-w-[calc(100vw-16px)] rounded-md border bg-popover text-popover-foreground shadow-md outline-none' :
@@ -8862,21 +8866,48 @@ class PopoverContentComponent {
8862
8866
  }
8863
8867
  this.adjustCollisionPosition(this.contentEl.nativeElement);
8864
8868
  }
8869
+ /**
8870
+ * Invariant: with `avoidCollisions` on, a fixed top/bottom panel never sits over its trigger
8871
+ * when the opposite side has more room. The absolute strategy flips through
8872
+ * `adjustCollisionPosition`; here the clamp below would otherwise pin an overflowing panel to
8873
+ * the viewport edge on top of the trigger. Flips when the opposite side fits the panel, or —
8874
+ * when neither fits — when it is simply the roomier one; the clamp then trims what is left.
8875
+ * Returns whether the side changed (the styles are re-rendered, so the caller re-measures).
8876
+ */
8877
+ flipFixedSide(rect, vh) {
8878
+ const side = this.adjustedPosition().side;
8879
+ if (!this.avoidCollisions() || (side !== 'top' && side !== 'bottom'))
8880
+ return false;
8881
+ const overflows = side === 'top' ? rect.top < 0 : rect.bottom > vh;
8882
+ const triggerRect = this.popover?.getTriggerRect();
8883
+ if (!overflows || !triggerRect)
8884
+ return false;
8885
+ const boundary = { top: 0, bottom: vh };
8886
+ const opposite = side === 'top' ? 'bottom' : 'top';
8887
+ const roomThere = this.getAvailableSpace(opposite, triggerRect, boundary);
8888
+ const roomHere = this.getAvailableSpace(side, triggerRect, boundary);
8889
+ if (roomThere < rect.height + this.sideOffset() && roomThere <= roomHere)
8890
+ return false;
8891
+ this.adjustedPosition.update(pos => ({ ...pos, side: opposite }));
8892
+ this.cdr.detectChanges();
8893
+ return true;
8894
+ }
8865
8895
  adjustFixedPosition(el) {
8866
- const rect = el.getBoundingClientRect();
8896
+ let rect = el.getBoundingClientRect();
8867
8897
  const vw = globalThis.window.innerWidth;
8868
8898
  const vh = globalThis.window.innerHeight;
8899
+ if (this.flipFixedSide(rect, vh))
8900
+ rect = el.getBoundingClientRect();
8869
8901
  const needsHorizontalFix = rect.right > vw || rect.left < 0;
8870
8902
  const needsVerticalFix = rect.bottom > vh || rect.top < 0;
8871
- if (needsHorizontalFix) {
8872
- const clampedLeft = Math.max(8, Math.min(rect.left, vw - rect.width - 8));
8873
- el.style.left = `${clampedLeft}px`;
8874
- el.style.transform = 'none';
8875
- }
8876
- if (needsVerticalFix) {
8877
- const clampedTop = Math.max(8, Math.min(rect.top, vh - rect.height - 8));
8878
- el.style.top = `${clampedTop}px`;
8879
- }
8903
+ if (!needsHorizontalFix && !needsVerticalFix)
8904
+ return;
8905
+ // The measured rect already includes the placement transform (translateX/Y(-50%|-100%)),
8906
+ // so pin both axes from it and drop the transform; fixing one axis alone would leave the
8907
+ // other shifted by the transform that is being removed.
8908
+ el.style.left = `${Math.max(8, Math.min(rect.left, vw - rect.width - 8))}px`;
8909
+ el.style.top = `${Math.max(8, Math.min(rect.top, vh - rect.height - 8))}px`;
8910
+ el.style.transform = 'none';
8880
8911
  }
8881
8912
  adjustCollisionPosition(content) {
8882
8913
  const contentRect = content.getBoundingClientRect();
@@ -8935,21 +8966,37 @@ class PopoverContentComponent {
8935
8966
  return '';
8936
8967
  const currentSide = this.avoidCollisions() ? pos.side : this.side();
8937
8968
  const currentAlign = this.avoidCollisions() ? pos.align : this.align();
8938
- const top = currentSide === 'bottom' ? triggerRect.bottom + 4 : triggerRect.top - 4;
8939
- let left = this.computeFixedLeft(currentAlign, triggerRect);
8940
- left = Math.max(8, Math.min(left, globalThis.window.innerWidth - 8));
8969
+ const { top, left, transform } = this.computeFixedAnchor(currentSide, currentAlign, triggerRect);
8970
+ const clampedLeft = Math.max(8, Math.min(left, globalThis.window.innerWidth - 8));
8941
8971
  const clampedTop = Math.max(8, Math.min(top, globalThis.window.innerHeight - 8));
8942
8972
  // `inset:auto;margin:0;overflow:visible` neutralize the UA `[popover]`
8943
8973
  // defaults (centered via inset:0 + margin:auto, overflow:auto) so our
8944
8974
  // own fixed coordinates and layout apply when promoted to the top layer.
8945
- let styles = `position:fixed;inset:auto;margin:0;overflow:visible;top:${clampedTop}px;left:${left}px;`;
8946
- if (currentAlign === 'center') {
8947
- styles += 'transform:translateX(-50%);';
8948
- }
8949
- else if (currentAlign === 'end') {
8950
- styles += 'transform:translateX(-100%);';
8975
+ return `position:fixed;inset:auto;margin:0;overflow:visible;top:${clampedTop}px;left:${clampedLeft}px;transform:${transform};`;
8976
+ }
8977
+ /**
8978
+ * The panel's anchor point and the transform that pulls the panel's matching edge onto it.
8979
+ * The transform is what lets the panel sit *before* the anchor (above or left of it) without
8980
+ * knowing its own size: `top` places the panel's bottom edge on the point, `left` its right edge.
8981
+ */
8982
+ computeFixedAnchor(side, align, triggerRect) {
8983
+ const offset = this.sideOffset();
8984
+ const shift = { start: 0, center: -50, end: -100 }[align];
8985
+ if (side === 'top' || side === 'bottom') {
8986
+ const top = side === 'bottom' ? triggerRect.bottom + offset : triggerRect.top - offset;
8987
+ return {
8988
+ top,
8989
+ left: this.computeFixedLeft(align, triggerRect),
8990
+ transform: `translate(${shift}%, ${side === 'top' ? -100 : 0}%)`,
8991
+ };
8951
8992
  }
8952
- return styles;
8993
+ const crossAxis = { start: triggerRect.top, center: triggerRect.top + triggerRect.height / 2, end: triggerRect.bottom }[align];
8994
+ const isLeft = side === 'left';
8995
+ return {
8996
+ top: crossAxis,
8997
+ left: isLeft ? triggerRect.left - offset : triggerRect.right + offset,
8998
+ transform: `translate(${isLeft ? -100 : 0}%, ${shift}%)`,
8999
+ };
8953
9000
  }
8954
9001
  computeFixedLeft(align, triggerRect) {
8955
9002
  if (align === 'start')
@@ -8965,6 +9012,7 @@ class PopoverContentComponent {
8965
9012
  #contentEl
8966
9013
  [class]="classes()"
8967
9014
  [style]="positionStyles()"
9015
+ [style.--trigger-width]="triggerWidth()"
8968
9016
  [style.visibility]="strategy() === 'fixed' && !portalReady() ? 'hidden' : null"
8969
9017
  [attr.data-state]="popover?.open() ? 'open' : 'closed'"
8970
9018
  [attr.data-slot]="'popover-content'"
@@ -8982,6 +9030,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8982
9030
  #contentEl
8983
9031
  [class]="classes()"
8984
9032
  [style]="positionStyles()"
9033
+ [style.--trigger-width]="triggerWidth()"
8985
9034
  [style.visibility]="strategy() === 'fixed' && !portalReady() ? 'hidden' : null"
8986
9035
  [attr.data-state]="popover?.open() ? 'open' : 'closed'"
8987
9036
  [attr.data-slot]="'popover-content'"
@@ -17935,7 +17984,7 @@ class ContextMenuLabelComponent {
17935
17984
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
17936
17985
  /** Adds `ps-8` start padding so the heading aligns with inset items below it; also reflected as `data-inset`. */
17937
17986
  this.inset = input(false, ...(ngDevMode ? [{ debugName: "inset" }] : /* istanbul ignore next */ []));
17938
- this.classes = computed(() => cn('px-2 py-1.5 text-sm font-semibold text-foreground', this.inset() && 'ps-8', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
17987
+ this.classes = computed(() => cn('block px-2 py-1.5 text-sm font-semibold text-foreground', this.inset() && 'ps-8', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
17939
17988
  }
17940
17989
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17941
17990
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ContextMenuLabelComponent, isStandalone: true, selector: "ui-context-menu-label", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"context-menu-label\"", "attr.data-inset": "inset()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -17958,7 +18007,7 @@ class ContextMenuSeparatorComponent {
17958
18007
  constructor() {
17959
18008
  /** Extra classes merged onto the element this component renders, after its built-in styling. */
17960
18009
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
17961
- this.classes = computed(() => cn('-mx-1 my-1 h-px bg-border', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
18010
+ this.classes = computed(() => cn('block -mx-1 my-1 h-px bg-border', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
17962
18011
  }
17963
18012
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17964
18013
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ContextMenuSeparatorComponent, isStandalone: true, selector: "ui-context-menu-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"context-menu-separator\"" } }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -17983,8 +18032,19 @@ class ContextMenuSubComponent {
17983
18032
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
17984
18033
  this.classes = computed(() => cn('relative block w-full', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
17985
18034
  this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
18035
+ this.contextMenu = inject(CONTEXT_MENU, { optional: true });
17986
18036
  this.trigger = null;
17987
18037
  this.content = null;
18038
+ // The flyout is portalled to <body>, so closing the root menu (an item
18039
+ // click, Escape, an outside click) does not tear it down with the root.
18040
+ effect(() => {
18041
+ if (this.contextMenu && !this.contextMenu.open()) {
18042
+ untracked(() => {
18043
+ clearTimeout(this.timeoutId);
18044
+ this.isOpen.set(false);
18045
+ });
18046
+ }
18047
+ });
17988
18048
  }
17989
18049
  /** Cancels a close still pending from {@link leave}, so a sub destroyed inside the grace period leaves no timer behind. */
17990
18050
  ngOnDestroy() {
@@ -18062,7 +18122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
18062
18122
  '[attr.data-slot]': '"context-menu-sub"',
18063
18123
  },
18064
18124
  }]
18065
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
18125
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
18066
18126
 
18067
18127
  class ContextMenuSubTriggerComponent {
18068
18128
  constructor() {