angular-visuals 0.1.1 → 0.1.3

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,40 +1,235 @@
1
1
  import * as i1 from '@angular/common';
2
2
  import { CommonModule, isPlatformBrowser } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, input, booleanAttribute, output, signal, computed, effect, Component, ElementRef, DestroyRef, PLATFORM_ID, Renderer2, contentChild, HostListener, HostBinding, InjectionToken, makeEnvironmentProviders } from '@angular/core';
5
- import { AvIcon } from '@av/lib/components/base/av-icon/av-icon.component';
6
- export { AvIcon } from '@av/lib/components/base/av-icon/av-icon.component';
7
- import { VISUALS_CONFIG as VISUALS_CONFIG$1 } from '@av/lib/core/tokens';
8
- export { provideAngularVisuals } from '@av/lib/core/tokens';
9
- import { ThemeService } from '@av/lib/core/services/ThemeService.service';
10
- export { ThemeService } from '@av/lib/core/services/ThemeService.service';
4
+ import { inject, Injectable, input, HostBinding, ViewEncapsulation, Component, InjectionToken, makeEnvironmentProviders, signal, computed, effect, booleanAttribute, output, ElementRef, DestroyRef, PLATFORM_ID, Renderer2, contentChild, HostListener, ChangeDetectionStrategy, numberAttribute, Directive, ViewChild, Optional, Self, untracked, forwardRef, model, contentChildren } from '@angular/core';
5
+ import { DomSanitizer } from '@angular/platform-browser';
11
6
  import { RouterLink, RouterLinkActive } from '@angular/router';
12
- export { AvTooltip } from '@av/lib/components/overlay/av-tooltip/av-tooltip';
13
- export { AvTextArea } from '@av/lib/components/form/av-text-area/av-text-area.component';
14
- export { AvFileUpload } from '@av/lib/components/form/av-file-upload/av-file-upload';
15
- export { AvText } from '@av/lib/primitives/av-text/av-text';
16
- export { AvSwitch } from '@av/lib/components/form/av-switch/av-switch.component';
17
- export { AvSlider } from '@av/lib/components/form/av-slider/av-slider';
18
- export { AvSelect } from '@av/lib/components/form/av-select/av-select.component';
19
- export { AvInput } from '@av/lib/components/form/av-input/av-input.component';
20
- export { AvCheckbox } from '@av/lib/components/form/av-checkbox/av-checkbox.component';
21
- export { AvCurrencyInput } from '@av/lib/components/form/av-currency-input/av-currency-input.component';
22
- export { AvDateTimePicker } from '@av/lib/components/form/av-date-time-picker/av-date-time-picker.component';
23
- export { AvForm } from '@av/lib/components/form/av-form/av-form.component';
24
- export { AvMultiSelect } from '@av/lib/components/form/av-multi-select/av-multi-select.component';
25
- export { AvGrid } from '@av/lib/components/layout/av-grid/grid.component';
26
- export { AvIconRegistry } from '@av/lib/core/services/IconRegistry.service';
27
- export { AvPaginator } from '@av/lib/components/layout/av-paginator/av-paginator.component';
28
- export { AvProgressBar, AvProgressBarCircle } from '@av/lib/components/feedback/progress-bars';
29
- export { AvCarousel, AvCarouselItem } from '@av/lib/components/midia/carousel';
30
- export { AvStep, AvStepper } from '@av/lib/components/nav/stepper';
31
- export { AvTab, AvTabs } from '@av/lib/components/nav/tabs';
32
- export { AvTable } from '@av/lib/components/layout/av-table/av-table.component';
33
- export { AvButton } from '@av/lib/components/base/av-button/av-button.component';
34
- export { AvBadge } from '@av/lib/components/base/av-badge/av-badge.component';
7
+ import * as i3 from '@angular/cdk/overlay';
8
+ import { Overlay, OverlayModule } from '@angular/cdk/overlay';
9
+ import { ComponentPortal } from '@angular/cdk/portal';
10
+ import * as i1$1 from '@angular/forms';
11
+ import { ReactiveFormsModule, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
35
12
 
36
- class AvDropdown {
37
- config = inject(VISUALS_CONFIG$1);
13
+ const loaderSeed = {
14
+ "wind-toy": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>wind-toy</title><path fill="currentColor" d="M20.27,4.74a4.93,4.93,0,0,1,1.52,4.61,5.32,5.32,0,0,1-4.1,4.51,5.12,5.12,0,0,1-5.2-1.5,5.53,5.53,0,0,0,6.13-1.48A5.66,5.66,0,0,0,20.27,4.74ZM12.32,11.53a5.49,5.49,0,0,0-1.47-6.2A5.57,5.57,0,0,0,4.71,3.72,5.17,5.17,0,0,1,9.53,2.2,5.52,5.52,0,0,1,13.9,6.45,5.28,5.28,0,0,1,12.32,11.53ZM19.2,20.29a4.92,4.92,0,0,1-4.72,1.49,5.32,5.32,0,0,1-4.34-4.05A5.2,5.2,0,0,1,11.6,12.5a5.6,5.6,0,0,0,1.51,6.13A5.63,5.63,0,0,0,19.2,20.29ZM3.79,19.38A5.18,5.18,0,0,1,2.32,14a5.3,5.3,0,0,1,4.59-4,5,5,0,0,1,4.58,1.61,5.55,5.55,0,0,0-6.32,1.69A5.46,5.46,0,0,0,3.79,19.38ZM12.23,12a5.11,5.11,0,0,0,3.66-5,5.75,5.75,0,0,0-3.18-6,5,5,0,0,1,4.42,2.3,5.21,5.21,0,0,1,.24,5.92A5.4,5.4,0,0,1,12.23,12ZM11.76,12a5.18,5.18,0,0,0-3.68,5.09,5.58,5.58,0,0,0,3.19,5.79c-1,.35-2.9-.46-4-1.68A5.51,5.51,0,0,1,11.76,12ZM23,12.63a5.07,5.07,0,0,1-2.35,4.52,5.23,5.23,0,0,1-5.91.2,5.24,5.24,0,0,1-2.67-4.77,5.51,5.51,0,0,0,5.45,3.33A5.52,5.52,0,0,0,23,12.63ZM1,11.23a5,5,0,0,1,2.49-4.5,5.23,5.23,0,0,1,5.81-.06,5.3,5.3,0,0,1,2.61,4.74A5.56,5.56,0,0,0,6.56,8.06,5.71,5.71,0,0,0,1,11.23Z"><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
15
+ "wifi-fade": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>wifi-fade</title><path fill="currentColor" d="M12,21L15.6,16.2C14.6,15.45 13.35,15 12,15C10.65,15 9.4,15.45 8.4,16.2L12,21" opacity="0"><animate id="SVGkbUu7KtW" fill="freeze" attributeName="opacity" begin="0;SVGAiUxzdjl.end+0.2s" dur="0.25s" values="0;1"/><animate id="SVGAiUxzdjl" fill="freeze" attributeName="opacity" begin="SVGV9fG3lbe.end+0.5s" dur="0.1s" values="1;0"/></path><path fill="currentColor" d="M12,9C9.3,9 6.81,9.89 4.8,11.4L6.6,13.8C8.1,12.67 9.97,12 12,12C14.03,12 15.9,12.67 17.4,13.8L19.2,11.4C17.19,9.89 14.7,9 12,9Z" opacity="0"><animate id="SVG2sZSgdIQ" fill="freeze" attributeName="opacity" begin="SVGkbUu7KtW.end" dur="0.25s" values="0;1"/><animate fill="freeze" attributeName="opacity" begin="SVGV9fG3lbe.end+0.5s" dur="0.1s" values="1;0"/></path><path fill="currentColor" d="M12,3C7.95,3 4.21,4.34 1.2,6.6L3,9C5.5,7.12 8.62,6 12,6C15.38,6 18.5,7.12 21,9L22.8,6.6C19.79,4.34 16.05,3 12,3" opacity="0"><animate id="SVGV9fG3lbe" fill="freeze" attributeName="opacity" begin="SVG2sZSgdIQ.end" dur="0.25s" values="0;1"/><animate fill="freeze" attributeName="opacity" begin="SVGV9fG3lbe.end+0.5s" dur="0.1s" values="1;0"/></path></svg>',
16
+ "wify": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>wifi</title><path fill="currentColor" d="M12,21L15.6,16.2C14.6,15.45 13.35,15 12,15C10.65,15 9.4,15.45 8.4,16.2L12,21" opacity="0"><animate id="SVGKYQAHd9H" fill="freeze" attributeName="opacity" begin="0;SVGiICzmYiD.end+0.2s" calcMode="discrete" dur="0.25s" values="0;1"/><animate id="SVGiICzmYiD" fill="freeze" attributeName="opacity" begin="SVGqTmLtDFc.end+0.5s" dur="0.001s" values="1;0"/></path><path fill="currentColor" d="M12,9C9.3,9 6.81,9.89 4.8,11.4L6.6,13.8C8.1,12.67 9.97,12 12,12C14.03,12 15.9,12.67 17.4,13.8L19.2,11.4C17.19,9.89 14.7,9 12,9Z" opacity="0"><animate id="SVGPRCC2btp" fill="freeze" attributeName="opacity" begin="SVGKYQAHd9H.end" calcMode="discrete" dur="0.25s" values="0;1"/><animate fill="freeze" attributeName="opacity" begin="SVGqTmLtDFc.end+0.5s" dur="0.001s" values="1;0"/></path><path fill="currentColor" d="M12,3C7.95,3 4.21,4.34 1.2,6.6L3,9C5.5,7.12 8.62,6 12,6C15.38,6 18.5,7.12 21,9L22.8,6.6C19.79,4.34 16.05,3 12,3" opacity="0"><animate id="SVGqTmLtDFc" fill="freeze" attributeName="opacity" begin="SVGPRCC2btp.end" calcMode="discrete" dur="0.25s" values="0;1"/><animate fill="freeze" attributeName="opacity" begin="SVGqTmLtDFc.end+0.5s" dur="0.001s" values="1;0"/></path></svg>',
17
+ "tadpole": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>tadpole</title><path fill="currentColor" d="M12,23a9.63,9.63,0,0,1-8-9.5,9.51,9.51,0,0,1,6.79-9.1A1.66,1.66,0,0,0,12,2.81h0a1.67,1.67,0,0,0-1.94-1.64A11,11,0,0,0,12,23Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
18
+ "ring-resize": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>ring-resize</title><g stroke="currentColor"><circle cx="12" cy="12" r="9.5" fill="none" stroke-linecap="round" stroke-width="3"><animate attributeName="stroke-dasharray" calcMode="spline" dur="1.5s" keySplines="0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1" keyTimes="0;0.475;0.95;1" repeatCount="indefinite" values="0 150;42 150;42 150;42 150"/><animate attributeName="stroke-dashoffset" calcMode="spline" dur="1.5s" keySplines="0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1" keyTimes="0;0.475;0.95;1" repeatCount="indefinite" values="0;-16;-59;-59"/></circle><animateTransform attributeName="transform" dur="2s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></g></svg>',
19
+ "pulse-rings-multiple": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>pulse-rings-multiple</title><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z" transform="matrix(0 0 0 0 12 12)"><animateTransform id="SVGBGG9rcpE" attributeName="transform" begin="0;SVGryjChH5y.end" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="translate" values="12 12;0 0"/><animateTransform additive="sum" attributeName="transform" begin="0;SVGryjChH5y.end" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="scale" values="0;1"/><animate attributeName="opacity" begin="0;SVGryjChH5y.end" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></path><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z" transform="matrix(0 0 0 0 12 12)"><animateTransform id="SVG0KQtjdtU" attributeName="transform" begin="SVGBGG9rcpE.begin+0.2s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="translate" values="12 12;0 0"/><animateTransform additive="sum" attributeName="transform" begin="SVGBGG9rcpE.begin+0.2s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="scale" values="0;1"/><animate attributeName="opacity" begin="SVGBGG9rcpE.begin+0.2s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></path><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z" transform="matrix(0 0 0 0 12 12)"><animateTransform id="SVGryjChH5y" attributeName="transform" begin="SVGBGG9rcpE.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="translate" values="12 12;0 0"/><animateTransform additive="sum" attributeName="transform" begin="SVGBGG9rcpE.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="scale" values="0;1"/><animate attributeName="opacity" begin="SVGBGG9rcpE.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></path></svg>',
20
+ "pulse-rings-3": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>pulse-rings-3</title><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z" transform="matrix(0 0 0 0 12 12)"><animateTransform id="SVGr0dxBdJO" attributeName="transform" begin="0;SVG7Xy0ecki.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="translate" values="12 12;0 0"/><animateTransform additive="sum" attributeName="transform" begin="0;SVG7Xy0ecki.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="scale" values="0;1"/><animate attributeName="opacity" begin="0;SVG7Xy0ecki.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></path><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z" transform="matrix(0 0 0 0 12 12)"><animateTransform id="SVGp2dhBhxA" attributeName="transform" begin="SVGr0dxBdJO.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="translate" values="12 12;0 0"/><animateTransform additive="sum" attributeName="transform" begin="SVGr0dxBdJO.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="scale" values="0;1"/><animate attributeName="opacity" begin="SVGr0dxBdJO.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></path><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z" transform="matrix(0 0 0 0 12 12)"><animateTransform id="SVG7Xy0ecki" attributeName="transform" begin="SVGr0dxBdJO.begin+0.8s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="translate" values="12 12;0 0"/><animateTransform additive="sum" attributeName="transform" begin="SVGr0dxBdJO.begin+0.8s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="scale" values="0;1"/><animate attributeName="opacity" begin="SVGr0dxBdJO.begin+0.8s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></path></svg>',
21
+ "pulse-rings-2": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>pulse-rings-2</title><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z" transform="matrix(0 0 0 0 12 12)"><animateTransform id="SVGk7g6Ie5D" attributeName="transform" begin="0;SVGADuEYsSK.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="translate" values="12 12;0 0"/><animateTransform additive="sum" attributeName="transform" begin="0;SVGADuEYsSK.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="scale" values="0;1"/><animate attributeName="opacity" begin="0;SVGADuEYsSK.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></path><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z" transform="matrix(0 0 0 0 12 12)"><animateTransform id="SVGADuEYsSK" attributeName="transform" begin="SVGk7g6Ie5D.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="translate" values="12 12;0 0"/><animateTransform additive="sum" attributeName="transform" begin="SVGk7g6Ie5D.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" type="scale" values="0;1"/><animate attributeName="opacity" begin="SVGk7g6Ie5D.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></path></svg>',
22
+ "pulse-ring": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>pulse-ring</title><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z" transform="matrix(0 0 0 0 12 12)"><animateTransform attributeName="transform" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" repeatCount="indefinite" type="translate" values="12 12;0 0"/><animateTransform additive="sum" attributeName="transform" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" repeatCount="indefinite" type="scale" values="0;1"/><animate attributeName="opacity" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" repeatCount="indefinite" values="1;0"/></path></svg>',
23
+ "pulse-multiple": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>pulse-multiple</title><circle cx="12" cy="12" r="0" fill="currentColor"><animate id="SVGPW9ARccz" fill="freeze" attributeName="r" begin="0;SVGaeu34cWL.end" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="0;11"/><animate fill="freeze" attributeName="opacity" begin="0;SVGaeu34cWL.end" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate id="SVGODvPjeTJ" fill="freeze" attributeName="r" begin="SVGPW9ARccz.begin+0.2s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="0;11"/><animate fill="freeze" attributeName="opacity" begin="SVGPW9ARccz.begin+0.2s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate id="SVGaeu34cWL" fill="freeze" attributeName="r" begin="SVGPW9ARccz.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="0;11"/><animate fill="freeze" attributeName="opacity" begin="SVGPW9ARccz.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></circle></svg>',
24
+ "pulse-3": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>pulse-3</title><circle cx="12" cy="12" r="0" fill="currentColor"><animate id="SVGHRb9bJhy" fill="freeze" attributeName="r" begin="0;SVGUoIUme6Z.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="0;11"/><animate fill="freeze" attributeName="opacity" begin="0;SVGUoIUme6Z.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate id="SVGaun8abat" fill="freeze" attributeName="r" begin="SVGHRb9bJhy.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="0;11"/><animate fill="freeze" attributeName="opacity" begin="SVGHRb9bJhy.begin+0.4s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate id="SVGUoIUme6Z" fill="freeze" attributeName="r" begin="SVGHRb9bJhy.begin+0.8s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="0;11"/><animate fill="freeze" attributeName="opacity" begin="SVGHRb9bJhy.begin+0.8s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></circle></svg>',
25
+ "pulse-2": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>pulse-2</title><circle cx="12" cy="12" r="0" fill="currentColor"><animate id="SVG0cdVlcnN" fill="freeze" attributeName="r" begin="0;SVGftllRbIv.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="0;11"/><animate fill="freeze" attributeName="opacity" begin="0;SVGftllRbIv.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate id="SVGftllRbIv" fill="freeze" attributeName="r" begin="SVG0cdVlcnN.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="0;11"/><animate fill="freeze" attributeName="opacity" begin="SVG0cdVlcnN.begin+0.6s" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" values="1;0"/></circle></svg>',
26
+ "pulse": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>pulse</title><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" repeatCount="indefinite" values="0;11"/><animate attributeName="opacity" calcMode="spline" dur="1.2s" keySplines=".52,.6,.25,.99" repeatCount="indefinite" values="1;0"/></circle></svg>',
27
+ "gooey-balls-2": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>gooey-balls-2</title><defs><filter id="SVGp0LL3caJ"><feGaussianBlur in="SourceGraphic" result="y" stdDeviation="1"/><feColorMatrix in="y" result="z" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"/><feBlend in="SourceGraphic" in2="z"/></filter></defs><g filter="url(#SVGp0LL3caJ)"><circle cx="5" cy="12" r="4" fill="currentColor"><animate attributeName="cx" calcMode="spline" dur="2s" keySplines=".36,.62,.43,.99;.79,0,.58,.57" repeatCount="indefinite" values="5;8;5"/></circle><circle cx="19" cy="12" r="4" fill="currentColor"><animate attributeName="cx" calcMode="spline" dur="2s" keySplines=".36,.62,.43,.99;.79,0,.58,.57" repeatCount="indefinite" values="19;16;19"/></circle><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></g></svg>',
28
+ "gooey-balls-1": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>gooey-balls-1</title><defs><filter id="SVGg4wYRcsm"><feGaussianBlur in="SourceGraphic" result="y" stdDeviation="1.5"/><feColorMatrix in="y" result="z" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"/><feBlend in="SourceGraphic" in2="z"/></filter></defs><g fill="currentColor" filter="url(#SVGg4wYRcsm)"><circle cx="4" cy="12" r="3"><animate attributeName="cx" calcMode="spline" dur="0.75s" keySplines=".56,.52,.17,.98;.56,.52,.17,.98" repeatCount="indefinite" values="4;9;4"/><animate attributeName="r" calcMode="spline" dur="0.75s" keySplines=".56,.52,.17,.98;.56,.52,.17,.98" repeatCount="indefinite" values="3;8;3"/></circle><circle cx="15" cy="12" r="8"><animate attributeName="cx" calcMode="spline" dur="0.75s" keySplines=".56,.52,.17,.98;.56,.52,.17,.98" repeatCount="indefinite" values="15;20;15"/><animate attributeName="r" calcMode="spline" dur="0.75s" keySplines=".56,.52,.17,.98;.56,.52,.17,.98" repeatCount="indefinite" values="8;3;8"/></circle></g></svg>',
29
+ "eclipse-half": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>eclipse-half</title><path fill="currentColor" d="M2,12A10.94,10.94,0,0,1,5,4.65c-.21-.19-.42-.36-.62-.55h0A11,11,0,0,0,12,23c.34,0,.67,0,1-.05C6,23,2,17.74,2,12Z"><animateTransform attributeName="transform" dur="0.6s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
30
+ "eclipse": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>eclipse</title><path fill="currentColor" d="M2,12A11.2,11.2,0,0,1,13,1.05C12.67,1,12.34,1,12,1a11,11,0,0,0,0,22c.34,0,.67,0,1-.05C6,23,2,17.74,2,12Z"><animateTransform attributeName="transform" dur="0.6s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
31
+ "dot-revolve": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>dot-revolve</title><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><circle cx="12" cy="2.5" r="1.5" fill="currentColor"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></circle></svg>',
32
+ "clock": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>clock</title><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z"/><rect width="2" height="7" x="11" y="6" fill="currentColor" rx="1"><animateTransform attributeName="transform" dur="9s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></rect><rect width="2" height="9" x="11" y="11" fill="currentColor" rx="1"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></rect></svg>',
33
+ "bouncing-ball": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>bouncing-ball</title><ellipse cx="12" cy="5" fill="currentColor" rx="4" ry="4"><animate id="SVG2g6X4cnm" fill="freeze" attributeName="cy" begin="0;SVGYUW1Wdmy.end" calcMode="spline" dur="0.375s" keySplines=".33,0,.66,.33" values="5;20"/><animate attributeName="rx" begin="SVG2g6X4cnm.end" calcMode="spline" dur="0.05s" keySplines=".33,0,.66,.33;.33,.66,.66,1" values="4;4.8;4"/><animate attributeName="ry" begin="SVG2g6X4cnm.end" calcMode="spline" dur="0.05s" keySplines=".33,0,.66,.33;.33,.66,.66,1" values="4;3;4"/><animate id="SVGb9s1Jd3o" attributeName="cy" begin="SVG2g6X4cnm.end" calcMode="spline" dur="0.025s" keySplines=".33,0,.66,.33" values="20;20.5"/><animate id="SVGYUW1Wdmy" attributeName="cy" begin="SVGb9s1Jd3o.end" calcMode="spline" dur="0.4s" keySplines=".33,.66,.66,1" values="20.5;5"/></ellipse></svg>',
34
+ "blocks-wave": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>blocks-wave</title><rect width="7.33" height="7.33" x="1" y="1" fill="currentColor"><animate id="SVGzjrPLenI" attributeName="x" begin="0;SVGXAURnSRI.end+0.2s" dur="0.6s" values="1;4;1"/><animate attributeName="y" begin="0;SVGXAURnSRI.end+0.2s" dur="0.6s" values="1;4;1"/><animate attributeName="width" begin="0;SVGXAURnSRI.end+0.2s" dur="0.6s" values="7.33;1.33;7.33"/><animate attributeName="height" begin="0;SVGXAURnSRI.end+0.2s" dur="0.6s" values="7.33;1.33;7.33"/></rect><rect width="7.33" height="7.33" x="8.33" y="1" fill="currentColor"><animate attributeName="x" begin="SVGzjrPLenI.begin+0.1s" dur="0.6s" values="8.33;11.33;8.33"/><animate attributeName="y" begin="SVGzjrPLenI.begin+0.1s" dur="0.6s" values="1;4;1"/><animate attributeName="width" begin="SVGzjrPLenI.begin+0.1s" dur="0.6s" values="7.33;1.33;7.33"/><animate attributeName="height" begin="SVGzjrPLenI.begin+0.1s" dur="0.6s" values="7.33;1.33;7.33"/></rect><rect width="7.33" height="7.33" x="1" y="8.33" fill="currentColor"><animate attributeName="x" begin="SVGzjrPLenI.begin+0.1s" dur="0.6s" values="1;4;1"/><animate attributeName="y" begin="SVGzjrPLenI.begin+0.1s" dur="0.6s" values="8.33;11.33;8.33"/><animate attributeName="width" begin="SVGzjrPLenI.begin+0.1s" dur="0.6s" values="7.33;1.33;7.33"/><animate attributeName="height" begin="SVGzjrPLenI.begin+0.1s" dur="0.6s" values="7.33;1.33;7.33"/></rect><rect width="7.33" height="7.33" x="15.66" y="1" fill="currentColor"><animate attributeName="x" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="15.66;18.66;15.66"/><animate attributeName="y" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="1;4;1"/><animate attributeName="width" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="7.33;1.33;7.33"/><animate attributeName="height" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="7.33;1.33;7.33"/></rect><rect width="7.33" height="7.33" x="8.33" y="8.33" fill="currentColor"><animate attributeName="x" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="8.33;11.33;8.33"/><animate attributeName="y" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="8.33;11.33;8.33"/><animate attributeName="width" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="7.33;1.33;7.33"/><animate attributeName="height" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="7.33;1.33;7.33"/></rect><rect width="7.33" height="7.33" x="1" y="15.66" fill="currentColor"><animate attributeName="x" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="1;4;1"/><animate attributeName="y" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="15.66;18.66;15.66"/><animate attributeName="width" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="7.33;1.33;7.33"/><animate attributeName="height" begin="SVGzjrPLenI.begin+0.2s" dur="0.6s" values="7.33;1.33;7.33"/></rect><rect width="7.33" height="7.33" x="15.66" y="8.33" fill="currentColor"><animate attributeName="x" begin="SVGzjrPLenI.begin+0.3s" dur="0.6s" values="15.66;18.66;15.66"/><animate attributeName="y" begin="SVGzjrPLenI.begin+0.3s" dur="0.6s" values="8.33;11.33;8.33"/><animate attributeName="width" begin="SVGzjrPLenI.begin+0.3s" dur="0.6s" values="7.33;1.33;7.33"/><animate attributeName="height" begin="SVGzjrPLenI.begin+0.3s" dur="0.6s" values="7.33;1.33;7.33"/></rect><rect width="7.33" height="7.33" x="8.33" y="15.66" fill="currentColor"><animate attributeName="x" begin="SVGzjrPLenI.begin+0.3s" dur="0.6s" values="8.33;11.33;8.33"/><animate attributeName="y" begin="SVGzjrPLenI.begin+0.3s" dur="0.6s" values="15.66;18.66;15.66"/><animate attributeName="width" begin="SVGzjrPLenI.begin+0.3s" dur="0.6s" values="7.33;1.33;7.33"/><animate attributeName="height" begin="SVGzjrPLenI.begin+0.3s" dur="0.6s" values="7.33;1.33;7.33"/></rect><rect width="7.33" height="7.33" x="15.66" y="15.66" fill="currentColor"><animate id="SVGXAURnSRI" attributeName="x" begin="SVGzjrPLenI.begin+0.4s" dur="0.6s" values="15.66;18.66;15.66"/><animate attributeName="y" begin="SVGzjrPLenI.begin+0.4s" dur="0.6s" values="15.66;18.66;15.66"/><animate attributeName="width" begin="SVGzjrPLenI.begin+0.4s" dur="0.6s" values="7.33;1.33;7.33"/><animate attributeName="height" begin="SVGzjrPLenI.begin+0.4s" dur="0.6s" values="7.33;1.33;7.33"/></rect></svg>',
35
+ "blocks-shuffle-3": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>blocks-shuffle-3</title><rect width="10" height="10" x="1" y="1" fill="currentColor" rx="1"><animate id="SVG7WybndBt" fill="freeze" attributeName="x" begin="0;SVGo3aOUHlJ.end" dur="0.2s" values="1;13"/><animate id="SVGVoKldbWM" fill="freeze" attributeName="y" begin="SVGFpk9ncYc.end" dur="0.2s" values="1;13"/><animate id="SVGKsXgPbui" fill="freeze" attributeName="x" begin="SVGaI8owdNK.end" dur="0.2s" values="13;1"/><animate id="SVG7JzAfdGT" fill="freeze" attributeName="y" begin="SVG28A4To9L.end" dur="0.2s" values="13;1"/></rect><rect width="10" height="10" x="1" y="13" fill="currentColor" rx="1"><animate id="SVGUiS2jeZq" fill="freeze" attributeName="y" begin="SVG7WybndBt.end" dur="0.2s" values="13;1"/><animate id="SVGU0vu2GEM" fill="freeze" attributeName="x" begin="SVGVoKldbWM.end" dur="0.2s" values="1;13"/><animate id="SVGOIboFeLf" fill="freeze" attributeName="y" begin="SVGKsXgPbui.end" dur="0.2s" values="1;13"/><animate id="SVG14lAaeuv" fill="freeze" attributeName="x" begin="SVG7JzAfdGT.end" dur="0.2s" values="13;1"/></rect><rect width="10" height="10" x="13" y="13" fill="currentColor" rx="1"><animate id="SVGFpk9ncYc" fill="freeze" attributeName="x" begin="SVGUiS2jeZq.end" dur="0.2s" values="13;1"/><animate id="SVGaI8owdNK" fill="freeze" attributeName="y" begin="SVGU0vu2GEM.end" dur="0.2s" values="13;1"/><animate id="SVG28A4To9L" fill="freeze" attributeName="x" begin="SVGOIboFeLf.end" dur="0.2s" values="1;13"/><animate id="SVGo3aOUHlJ" fill="freeze" attributeName="y" begin="SVG14lAaeuv.end" dur="0.2s" values="1;13"/></rect></svg>',
36
+ "blocks-shuffle-2": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>blocks-shuffle-2</title><rect width="10" height="10" x="1" y="1" fill="currentColor" rx="1"><animate id="SVG7JagGz2Y" fill="freeze" attributeName="x" begin="0;SVGgDT19bUV.end" dur="0.2s" values="1;13"/><animate id="SVGpS1BddYk" fill="freeze" attributeName="y" begin="SVGc7yq8dne.end" dur="0.2s" values="1;13"/><animate id="SVGboa7EdFl" fill="freeze" attributeName="x" begin="SVG0ZX9C6Fa.end" dur="0.2s" values="13;1"/><animate id="SVG6rrusL2C" fill="freeze" attributeName="y" begin="SVGTOnnO5Dr.end" dur="0.2s" values="13;1"/></rect><rect width="10" height="10" x="1" y="13" fill="currentColor" rx="1"><animate id="SVGc7yq8dne" fill="freeze" attributeName="y" begin="SVG7JagGz2Y.end" dur="0.2s" values="13;1"/><animate id="SVG0ZX9C6Fa" fill="freeze" attributeName="x" begin="SVGpS1BddYk.end" dur="0.2s" values="1;13"/><animate id="SVGTOnnO5Dr" fill="freeze" attributeName="y" begin="SVGboa7EdFl.end" dur="0.2s" values="1;13"/><animate id="SVGgDT19bUV" fill="freeze" attributeName="x" begin="SVG6rrusL2C.end" dur="0.2s" values="13;1"/></rect></svg>',
37
+ "blocks-scale": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>blocks-scale</title><rect width="9" height="9" x="1.5" y="1.5" fill="currentColor" rx="1"><animate id="SVGvBHXGeBR" attributeName="x" begin="0;SVGBBjjneux.end+0.15s" dur="0.6s" keyTimes="0;.2;1" values="1.5;.5;1.5"/><animate attributeName="y" begin="0;SVGBBjjneux.end+0.15s" dur="0.6s" keyTimes="0;.2;1" values="1.5;.5;1.5"/><animate attributeName="width" begin="0;SVGBBjjneux.end+0.15s" dur="0.6s" keyTimes="0;.2;1" values="9;11;9"/><animate attributeName="height" begin="0;SVGBBjjneux.end+0.15s" dur="0.6s" keyTimes="0;.2;1" values="9;11;9"/></rect><rect width="9" height="9" x="13.5" y="1.5" fill="currentColor" rx="1"><animate attributeName="x" begin="SVGvBHXGeBR.begin+0.15s" dur="0.6s" keyTimes="0;.2;1" values="13.5;12.5;13.5"/><animate attributeName="y" begin="SVGvBHXGeBR.begin+0.15s" dur="0.6s" keyTimes="0;.2;1" values="1.5;.5;1.5"/><animate attributeName="width" begin="SVGvBHXGeBR.begin+0.15s" dur="0.6s" keyTimes="0;.2;1" values="9;11;9"/><animate attributeName="height" begin="SVGvBHXGeBR.begin+0.15s" dur="0.6s" keyTimes="0;.2;1" values="9;11;9"/></rect><rect width="9" height="9" x="13.5" y="13.5" fill="currentColor" rx="1"><animate attributeName="x" begin="SVGvBHXGeBR.begin+0.3s" dur="0.6s" keyTimes="0;.2;1" values="13.5;12.5;13.5"/><animate attributeName="y" begin="SVGvBHXGeBR.begin+0.3s" dur="0.6s" keyTimes="0;.2;1" values="13.5;12.5;13.5"/><animate attributeName="width" begin="SVGvBHXGeBR.begin+0.3s" dur="0.6s" keyTimes="0;.2;1" values="9;11;9"/><animate attributeName="height" begin="SVGvBHXGeBR.begin+0.3s" dur="0.6s" keyTimes="0;.2;1" values="9;11;9"/></rect><rect width="9" height="9" x="1.5" y="13.5" fill="currentColor" rx="1"><animate id="SVGBBjjneux" attributeName="x" begin="SVGvBHXGeBR.begin+0.45s" dur="0.6s" keyTimes="0;.2;1" values="1.5;.5;1.5"/><animate attributeName="y" begin="SVGvBHXGeBR.begin+0.45s" dur="0.6s" keyTimes="0;.2;1" values="13.5;12.5;13.5"/><animate attributeName="width" begin="SVGvBHXGeBR.begin+0.45s" dur="0.6s" keyTimes="0;.2;1" values="9;11;9"/><animate attributeName="height" begin="SVGvBHXGeBR.begin+0.45s" dur="0.6s" keyTimes="0;.2;1" values="9;11;9"/></rect></svg>',
38
+ "bars-scale-middle": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>bars-scale-middle</title><rect width="2.8" height="12" x="1" y="6" fill="currentColor"><animate attributeName="y" begin="SVGKWB9Ob0W.begin+0.4s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="6;1;6"/><animate attributeName="height" begin="SVGKWB9Ob0W.begin+0.4s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="12;22;12"/></rect><rect width="2.8" height="12" x="5.8" y="6" fill="currentColor"><animate attributeName="y" begin="SVGKWB9Ob0W.begin+0.2s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="6;1;6"/><animate attributeName="height" begin="SVGKWB9Ob0W.begin+0.2s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="12;22;12"/></rect><rect width="2.8" height="12" x="10.6" y="6" fill="currentColor"><animate id="SVGKWB9Ob0W" attributeName="y" begin="0;SVGCkSt6baQ.end-0.1s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="6;1;6"/><animate attributeName="height" begin="0;SVGCkSt6baQ.end-0.1s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="12;22;12"/></rect><rect width="2.8" height="12" x="15.4" y="6" fill="currentColor"><animate attributeName="y" begin="SVGKWB9Ob0W.begin+0.2s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="6;1;6"/><animate attributeName="height" begin="SVGKWB9Ob0W.begin+0.2s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="12;22;12"/></rect><rect width="2.8" height="12" x="20.2" y="6" fill="currentColor"><animate id="SVGCkSt6baQ" attributeName="y" begin="SVGKWB9Ob0W.begin+0.4s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="6;1;6"/><animate attributeName="height" begin="SVGKWB9Ob0W.begin+0.4s" calcMode="spline" dur="0.6s" keySplines=".14,.73,.34,1;.65,.26,.82,.45" values="12;22;12"/></rect></svg>',
39
+ "bars-scale-fade": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>bars-scale-fade</title><rect width="6" height="14" x="1" y="4" fill="currentColor"><animate id="SVGBoZ3Ab9F" fill="freeze" attributeName="y" begin="0;SVG0XJl4OCs.end-0.25s" dur="0.75s" values="1;5"/><animate fill="freeze" attributeName="height" begin="0;SVG0XJl4OCs.end-0.25s" dur="0.75s" values="22;14"/><animate fill="freeze" attributeName="opacity" begin="0;SVG0XJl4OCs.end-0.25s" dur="0.75s" values="1;.2"/></rect><rect width="6" height="14" x="9" y="4" fill="currentColor" opacity=".4"><animate fill="freeze" attributeName="y" begin="SVGBoZ3Ab9F.begin+0.15s" dur="0.75s" values="1;5"/><animate fill="freeze" attributeName="height" begin="SVGBoZ3Ab9F.begin+0.15s" dur="0.75s" values="22;14"/><animate fill="freeze" attributeName="opacity" begin="SVGBoZ3Ab9F.begin+0.15s" dur="0.75s" values="1;.2"/></rect><rect width="6" height="14" x="17" y="4" fill="currentColor" opacity=".3"><animate id="SVG0XJl4OCs" fill="freeze" attributeName="y" begin="SVGBoZ3Ab9F.begin+0.3s" dur="0.75s" values="1;5"/><animate fill="freeze" attributeName="height" begin="SVGBoZ3Ab9F.begin+0.3s" dur="0.75s" values="22;14"/><animate fill="freeze" attributeName="opacity" begin="SVGBoZ3Ab9F.begin+0.3s" dur="0.75s" values="1;.2"/></rect></svg>',
40
+ "bars-scale": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>bars-scale</title><rect width="2.8" height="12" x="1" y="6" fill="currentColor"><animate id="SVGLQdHQe4p" attributeName="y" begin="0;SVGg3vsIeGm.end-0.1s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="6;1;6"/><animate attributeName="height" begin="0;SVGg3vsIeGm.end-0.1s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="12;22;12"/></rect><rect width="2.8" height="12" x="5.8" y="6" fill="currentColor"><animate attributeName="y" begin="SVGLQdHQe4p.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="6;1;6"/><animate attributeName="height" begin="SVGLQdHQe4p.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="12;22;12"/></rect><rect width="2.8" height="12" x="10.6" y="6" fill="currentColor"><animate attributeName="y" begin="SVGLQdHQe4p.begin+0.2s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="6;1;6"/><animate attributeName="height" begin="SVGLQdHQe4p.begin+0.2s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="12;22;12"/></rect><rect width="2.8" height="12" x="15.4" y="6" fill="currentColor"><animate attributeName="y" begin="SVGLQdHQe4p.begin+0.3s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="6;1;6"/><animate attributeName="height" begin="SVGLQdHQe4p.begin+0.3s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="12;22;12"/></rect><rect width="2.8" height="12" x="20.2" y="6" fill="currentColor"><animate id="SVGg3vsIeGm" attributeName="y" begin="SVGLQdHQe4p.begin+0.4s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="6;1;6"/><animate attributeName="height" begin="SVGLQdHQe4p.begin+0.4s" calcMode="spline" dur="0.6s" keySplines=".36,.61,.3,.98;.36,.61,.3,.98" values="12;22;12"/></rect></svg>',
41
+ "bars-rotate-fade": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>bars-rotate-fade</title><g><rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".14"/><rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".29" transform="rotate(30 12 12)"/><rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".43" transform="rotate(60 12 12)"/><rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".57" transform="rotate(90 12 12)"/><rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".71" transform="rotate(120 12 12)"/><rect width="2" height="5" x="11" y="1" fill="currentColor" opacity=".86" transform="rotate(150 12 12)"/><rect width="2" height="5" x="11" y="1" fill="currentColor" transform="rotate(180 12 12)"/><animateTransform attributeName="transform" calcMode="discrete" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12"/></g></svg>',
42
+ "bars-fade": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>bars-fade</title><rect width="6" height="14" x="1" y="4" fill="currentColor"><animate id="SVG9ovaHbIP" fill="freeze" attributeName="opacity" begin="0;SVGa89dAd4w.end-0.25s" dur="0.75s" values="1;.2"/></rect><rect width="6" height="14" x="9" y="4" fill="currentColor" opacity=".4"><animate fill="freeze" attributeName="opacity" begin="SVG9ovaHbIP.begin+0.15s" dur="0.75s" values="1;.2"/></rect><rect width="6" height="14" x="17" y="4" fill="currentColor" opacity=".3"><animate id="SVGa89dAd4w" fill="freeze" attributeName="opacity" begin="SVG9ovaHbIP.begin+0.3s" dur="0.75s" values="1;.2"/></rect></svg>',
43
+ "90-ring-with-bg": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>90-ring-with-bg</title><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="currentColor" d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
44
+ "90-ring": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>90-ring</title><path fill="currentColor" d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
45
+ "8-dots-rotate": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>8-dots-rotate</title><g><circle cx="3" cy="12" r="2" fill="currentColor"/><circle cx="21" cy="12" r="2" fill="currentColor"/><circle cx="12" cy="21" r="2" fill="currentColor"/><circle cx="12" cy="3" r="2" fill="currentColor"/><circle cx="5.64" cy="5.64" r="2" fill="currentColor"/><circle cx="18.36" cy="18.36" r="2" fill="currentColor"/><circle cx="5.64" cy="18.36" r="2" fill="currentColor"/><circle cx="18.36" cy="5.64" r="2" fill="currentColor"/><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></g></svg>',
46
+ "6-dots-scale-middle": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>6-dots-scale-middle</title><circle cx="12" cy="3" r="0" fill="currentColor"><animate id="SVGoB2HzdBp" attributeName="r" begin="0;SVGhp5IKccd.end-0.5s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="16.5" cy="4.21" r="0" fill="currentColor"><animate id="SVG13I3L3Mo" attributeName="r" begin="SVGoB2HzdBp.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="7.5" cy="4.21" r="0" fill="currentColor"><animate id="SVGhp5IKccd" attributeName="r" begin="SVGZh5n6c6U.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="19.79" cy="7.5" r="0" fill="currentColor"><animate id="SVGwdpSnbWm" attributeName="r" begin="SVG13I3L3Mo.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="4.21" cy="7.5" r="0" fill="currentColor"><animate id="SVGZh5n6c6U" attributeName="r" begin="SVGZlbpteod.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="21" cy="12" r="0" fill="currentColor"><animate id="SVGtZjtgdeT" attributeName="r" begin="SVGwdpSnbWm.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="3" cy="12" r="0" fill="currentColor"><animate id="SVGZlbpteod" attributeName="r" begin="SVGwTNtvelU.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="19.79" cy="16.5" r="0" fill="currentColor"><animate id="SVGtoLBIbcZ" attributeName="r" begin="SVGtZjtgdeT.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="4.21" cy="16.5" r="0" fill="currentColor"><animate id="SVGwTNtvelU" attributeName="r" begin="SVGk1PzexJH.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="16.5" cy="19.79" r="0" fill="currentColor"><animate id="SVGoTyDPewd" attributeName="r" begin="SVGtoLBIbcZ.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="7.5" cy="19.79" r="0" fill="currentColor"><animate id="SVGk1PzexJH" attributeName="r" begin="SVG0DUTaeRN.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle><circle cx="12" cy="21" r="0" fill="currentColor"><animate id="SVG0DUTaeRN" attributeName="r" begin="SVGoTyDPewd.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="0;2;0"/></circle></svg>',
47
+ "6-dots-scale": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>6-dots-scale</title><circle cx="12" cy="3" r="0" fill="currentColor"><animate id="SVG4G6AvsmK" fill="freeze" attributeName="r" begin="0;SVGvWIhNcAr.end-0.5s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="16.5" cy="4.21" r="0" fill="currentColor"><animate id="SVGeE4wqdhI" fill="freeze" attributeName="r" begin="SVG4G6AvsmK.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="7.5" cy="4.21" r="0" fill="currentColor"><animate id="SVGvWIhNcAr" fill="freeze" attributeName="r" begin="SVG7bFLwcpj.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="19.79" cy="7.5" r="0" fill="currentColor"><animate id="SVGEevPNd9f" fill="freeze" attributeName="r" begin="SVGeE4wqdhI.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="4.21" cy="7.5" r="0" fill="currentColor"><animate id="SVG7bFLwcpj" fill="freeze" attributeName="r" begin="SVGQTNUCd1M.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="21" cy="12" r="0" fill="currentColor"><animate id="SVGuBK1DdeV" fill="freeze" attributeName="r" begin="SVGEevPNd9f.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="3" cy="12" r="0" fill="currentColor"><animate id="SVGQTNUCd1M" fill="freeze" attributeName="r" begin="SVGGpgq51kq.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="19.79" cy="16.5" r="0" fill="currentColor"><animate id="SVG0SGXodLb" fill="freeze" attributeName="r" begin="SVGuBK1DdeV.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="4.21" cy="16.5" r="0" fill="currentColor"><animate id="SVGGpgq51kq" fill="freeze" attributeName="r" begin="SVGlDB0aenh.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="16.5" cy="19.79" r="0" fill="currentColor"><animate id="SVGjNSy9c1D" fill="freeze" attributeName="r" begin="SVG0SGXodLb.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="7.5" cy="19.79" r="0" fill="currentColor"><animate id="SVGlDB0aenh" fill="freeze" attributeName="r" begin="SVGq7gqkb6a.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle><circle cx="12" cy="21" r="0" fill="currentColor"><animate id="SVGq7gqkb6a" fill="freeze" attributeName="r" begin="SVGjNSy9c1D.begin+0.1s" calcMode="spline" dur="0.6s" keySplines="0,1,0,1;.53,0,.61,.73" keyTimes="0;.2;1" values="0;2;0"/></circle></svg>',
48
+ "6-dots-rotate": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>6-dots-rotate</title><g><circle cx="12" cy="2.5" r="1.5" fill="currentColor" opacity=".14"/><circle cx="16.75" cy="3.77" r="1.5" fill="currentColor" opacity=".29"/><circle cx="20.23" cy="7.25" r="1.5" fill="currentColor" opacity=".43"/><circle cx="21.5" cy="12" r="1.5" fill="currentColor" opacity=".57"/><circle cx="20.23" cy="16.75" r="1.5" fill="currentColor" opacity=".71"/><circle cx="16.75" cy="20.23" r="1.5" fill="currentColor" opacity=".86"/><circle cx="12" cy="21.5" r="1.5" fill="currentColor"/><animateTransform attributeName="transform" calcMode="discrete" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12"/></g></svg>',
49
+ "3-dots-scale-middle": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>3-dots-scale-middle</title><circle cx="4" cy="12" r="1.5" fill="currentColor"><animate attributeName="r" dur="0.75s" repeatCount="indefinite" values="1.5;3;1.5"/></circle><circle cx="12" cy="12" r="3" fill="currentColor"><animate attributeName="r" dur="0.75s" repeatCount="indefinite" values="3;1.5;3"/></circle><circle cx="20" cy="12" r="1.5" fill="currentColor"><animate attributeName="r" dur="0.75s" repeatCount="indefinite" values="1.5;3;1.5"/></circle></svg>',
50
+ "3-dots-scale": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>3-dots-scale</title><circle cx="4" cy="12" r="3" fill="currentColor"><animate id="SVG9IgbRbsl" attributeName="r" begin="0;SVGFUNpCWdG.end-0.25s" dur="0.75s" values="3;.2;3"/></circle><circle cx="12" cy="12" r="3" fill="currentColor"><animate attributeName="r" begin="SVG9IgbRbsl.end-0.6s" dur="0.75s" values="3;.2;3"/></circle><circle cx="20" cy="12" r="3" fill="currentColor"><animate id="SVGFUNpCWdG" attributeName="r" begin="SVG9IgbRbsl.end-0.45s" dur="0.75s" values="3;.2;3"/></circle></svg>',
51
+ "3-dots-rotate": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>3-dots-rotate</title><circle cx="12" cy="12" r="3" fill="currentColor"/><g><circle cx="4" cy="12" r="3" fill="currentColor"/><circle cx="20" cy="12" r="3" fill="currentColor"/><animateTransform attributeName="transform" calcMode="spline" dur="1s" keySplines=".36,.6,.31,1;.36,.6,.31,1" repeatCount="indefinite" type="rotate" values="0 12 12;180 12 12;360 12 12"/></g></svg>',
52
+ "3-dots-move": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>3-dots-move</title><circle cx="4" cy="12" r="0" fill="currentColor"><animate fill="freeze" attributeName="r" begin="0;SVGUppsBdVN.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="0;3"/><animate fill="freeze" attributeName="cx" begin="SVGqCgsydxJ.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="4;12"/><animate fill="freeze" attributeName="cx" begin="SVG3PwDNd6F.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="12;20"/><animate id="SVG3V8yEdYE" fill="freeze" attributeName="r" begin="SVG6wCQhd9Q.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="3;0"/><animate id="SVGUppsBdVN" fill="freeze" attributeName="cx" begin="SVG3V8yEdYE.end" dur="0.001s" values="20;4"/></circle><circle cx="4" cy="12" r="3" fill="currentColor"><animate fill="freeze" attributeName="cx" begin="0;SVGUppsBdVN.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="4;12"/><animate fill="freeze" attributeName="cx" begin="SVGqCgsydxJ.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="12;20"/><animate id="SVG4PgJdbds" fill="freeze" attributeName="r" begin="SVG3PwDNd6F.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="3;0"/><animate id="SVG6wCQhd9Q" fill="freeze" attributeName="cx" begin="SVG4PgJdbds.end" dur="0.001s" values="20;4"/><animate fill="freeze" attributeName="r" begin="SVG6wCQhd9Q.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="0;3"/></circle><circle cx="12" cy="12" r="3" fill="currentColor"><animate fill="freeze" attributeName="cx" begin="0;SVGUppsBdVN.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="12;20"/><animate id="SVG38aCdcdI" fill="freeze" attributeName="r" begin="SVGqCgsydxJ.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="3;0"/><animate id="SVG3PwDNd6F" fill="freeze" attributeName="cx" begin="SVG38aCdcdI.end" dur="0.001s" values="20;4"/><animate fill="freeze" attributeName="r" begin="SVG3PwDNd6F.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="0;3"/><animate fill="freeze" attributeName="cx" begin="SVG6wCQhd9Q.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="4;12"/></circle><circle cx="20" cy="12" r="3" fill="currentColor"><animate id="SVGwaWzveSq" fill="freeze" attributeName="r" begin="0;SVGUppsBdVN.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="3;0"/><animate id="SVGqCgsydxJ" fill="freeze" attributeName="cx" begin="SVGwaWzveSq.end" dur="0.001s" values="20;4"/><animate fill="freeze" attributeName="r" begin="SVGqCgsydxJ.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="0;3"/><animate fill="freeze" attributeName="cx" begin="SVG3PwDNd6F.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="4;12"/><animate fill="freeze" attributeName="cx" begin="SVG6wCQhd9Q.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="12;20"/></circle></svg>',
53
+ "3-dots-fade": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>3-dots-fade</title><circle cx="4" cy="12" r="3" fill="currentColor"><animate id="SVG7x14Dcom" fill="freeze" attributeName="opacity" begin="0;SVGqSjG0dUp.end-0.25s" dur="0.75s" values="1;.2"/></circle><circle cx="12" cy="12" r="3" fill="currentColor" opacity=".4"><animate fill="freeze" attributeName="opacity" begin="SVG7x14Dcom.begin+0.15s" dur="0.75s" values="1;.2"/></circle><circle cx="20" cy="12" r="3" fill="currentColor" opacity=".3"><animate id="SVGqSjG0dUp" fill="freeze" attributeName="opacity" begin="SVG7x14Dcom.begin+0.3s" dur="0.75s" values="1;.2"/></circle></svg>',
54
+ "3-dots-bounce": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>3-dots-bounce</title><circle cx="4" cy="12" r="3" fill="currentColor"><animate id="SVGKiXXedfO" attributeName="cy" begin="0;SVGgLulOGrw.end+0.25s" calcMode="spline" dur="0.6s" keySplines=".33,.66,.66,1;.33,0,.66,.33" values="12;6;12"/></circle><circle cx="12" cy="12" r="3" fill="currentColor"><animate attributeName="cy" begin="SVGKiXXedfO.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".33,.66,.66,1;.33,0,.66,.33" values="12;6;12"/></circle><circle cx="20" cy="12" r="3" fill="currentColor"><animate id="SVGgLulOGrw" attributeName="cy" begin="SVGKiXXedfO.begin+0.2s" calcMode="spline" dur="0.6s" keySplines=".33,.66,.66,1;.33,0,.66,.33" values="12;6;12"/></circle></svg>',
55
+ "270-ring-with-bg": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>270-ring-with-bg</title><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="currentColor" d="M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
56
+ "270-ring": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>270-ring</title><path fill="currentColor" d="M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
57
+ "180-ring-with-bg": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>180-ring-with-bg</title><path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="currentColor" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
58
+ "180-ring": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>180-ring</title><path fill="currentColor" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',
59
+ "12-dots-scale-rotate": '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>12-dots-scale-rotate</title><g><circle cx="12" cy="3" r="1" fill="currentColor"><animate id="SVGelgoqhuA" attributeName="r" begin="0;SVGSRzJybSJ.end-0.5s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="16.5" cy="4.21" r="1" fill="currentColor"><animate id="SVGBcQu6cCi" attributeName="r" begin="SVGelgoqhuA.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="7.5" cy="4.21" r="1" fill="currentColor"><animate id="SVGSRzJybSJ" attributeName="r" begin="SVGeZGzNdVZ.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="19.79" cy="7.5" r="1" fill="currentColor"><animate id="SVGG5Q0fe0M" attributeName="r" begin="SVGBcQu6cCi.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="4.21" cy="7.5" r="1" fill="currentColor"><animate id="SVGeZGzNdVZ" attributeName="r" begin="SVGUTnihcal.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="21" cy="12" r="1" fill="currentColor"><animate id="SVG8aQG8dpc" attributeName="r" begin="SVGG5Q0fe0M.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="3" cy="12" r="1" fill="currentColor"><animate id="SVGUTnihcal" attributeName="r" begin="SVGHktsvT5Q.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="19.79" cy="16.5" r="1" fill="currentColor"><animate id="SVGqCF3Scrd" attributeName="r" begin="SVG8aQG8dpc.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="4.21" cy="16.5" r="1" fill="currentColor"><animate id="SVGHktsvT5Q" attributeName="r" begin="SVGSFNCBbxb.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="16.5" cy="19.79" r="1" fill="currentColor"><animate id="SVGMFYo1cJN" attributeName="r" begin="SVGqCF3Scrd.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="7.5" cy="19.79" r="1" fill="currentColor"><animate id="SVGSFNCBbxb" attributeName="r" begin="SVGLSoLpdOI.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><circle cx="12" cy="21" r="1" fill="currentColor"><animate id="SVGLSoLpdOI" attributeName="r" begin="SVGMFYo1cJN.begin+0.1s" calcMode="spline" dur="0.6s" keySplines=".27,.42,.37,.99;.53,0,.61,.73" values="1;2;1"/></circle><animateTransform attributeName="transform" dur="6s" repeatCount="indefinite" type="rotate" values="360 12 12;0 12 12"/></g></svg>'
60
+ };
61
+
62
+ const iconSeed = {
63
+ "search": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/></svg>',
64
+ "menu": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z"/></svg>',
65
+ "check": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path xmlns="http://www.w3.org/2000/svg" d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>',
66
+ "expand_more": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg>',
67
+ "arrow_left": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor" ><path d="M400-80 0-480l400-400 71 71-329 329 329 329-71 71Z" /></svg>',
68
+ "arrow_right": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor" ><path d="m321-80-71-71 329-329-329-329 71-71 400 400L321-80Z" /></svg>',
69
+ "double_arrow_left": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M440-240 200-480l240-240 56 56-183 184 183 184-56 56Zm264 0L464-480l240-240 56 56-183 184 183 184-56 56Z"/></svg>',
70
+ "double_arrow_right": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M383-480 200-664l56-56 240 240-240 240-56-56 183-184Zm264 0L464-664l56-56 240 240-240 240-56-56 183-184Z"/></svg>',
71
+ "close": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>',
72
+ "chevron_left": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"/></svg>',
73
+ "chevron_right": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"/></svg>',
74
+ "calendar_today": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Z"/></svg>',
75
+ "schedule": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/></svg>',
76
+ "payments": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M560-440q-50 0-85-35t-35-85q0-50 35-85t85-35q50 0 85 35t35 85q0 50-35 85t-85 35ZM200-320q-33 0-56.5-23.5T120-400v-320q0-33 23.5-56.5T200-800h720v400q0 33-23.5 56.5T840-320H200Zm0-80h640v-320H200v320Zm-80 240q-33 0-56.5-23.5T40-240v-400h80v400h640v80H120Z"/></svg>',
77
+ "copy": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"/></svg>',
78
+ "code": '<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 -960 960 960" width="1em" fill="currentColor"><path d="M320-240 80-480l240-240 57 57-184 183 184 183-57 57Zm320 0-57-57 184-183-184-183 57-57 240 240-240 240Z"/></svg>',
79
+ };
80
+
81
+ class AvIconRegistry {
82
+ sanitizer = inject(DomSanitizer);
83
+ registry = new Map();
84
+ constructor() {
85
+ this.registerIcons(loaderSeed);
86
+ this.registerIcons(iconSeed);
87
+ }
88
+ /** Registra um único ícone/loader SVG */
89
+ registerIcon(name, svgContent) {
90
+ const normalizedSvg = this.normalizeSvg(svgContent);
91
+ const safeSvg = this.sanitizer.bypassSecurityTrustHtml(normalizedSvg);
92
+ this.registry.set(name, safeSvg);
93
+ }
94
+ /** Registra vários ícones de uma vez */
95
+ registerIcons(icons) {
96
+ Object.entries(icons).forEach(([name, svg]) => this.registerIcon(name, svg));
97
+ }
98
+ /** Retorna o SVG registrado como conteúdo confiável */
99
+ getIcon(name) {
100
+ return this.registry.get(name);
101
+ }
102
+ /** Retorna os nomes de todos os ícones registrados */
103
+ getIconNames() {
104
+ return Array.from(this.registry.keys()).sort((a, b) => a.localeCompare(b));
105
+ }
106
+ /** Retorna todos os ícones registrados, útil para catálogos e icon pickers */
107
+ getIcons() {
108
+ return this.getIconNames().map((name) => ({
109
+ name,
110
+ svg: this.registry.get(name),
111
+ }));
112
+ }
113
+ normalizeSvg(svgContent) {
114
+ const normalizedSvg = svgContent.trim();
115
+ if (!/^<svg(?:\s|>)/i.test(normalizedSvg)) {
116
+ throw new Error('An icon must be registered as an SVG element.');
117
+ }
118
+ return normalizedSvg;
119
+ }
120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvIconRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
121
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvIconRegistry, providedIn: 'root' });
122
+ }
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvIconRegistry, decorators: [{
124
+ type: Injectable,
125
+ args: [{
126
+ providedIn: 'root'
127
+ }]
128
+ }], ctorParameters: () => [] });
129
+
130
+ class AvIcon {
131
+ iconRegistry;
132
+ /** Nome do ícone (ex: 'search', 'user', 'settings') */
133
+ name = input.required(/* @ts-ignore */
134
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
135
+ /** Tamanho em relação ao font-size herdado ou em pixels. */
136
+ size = input('base', /* @ts-ignore */
137
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
138
+ constructor(iconRegistry) {
139
+ this.iconRegistry = iconRegistry;
140
+ }
141
+ get sizeClass() {
142
+ const size = this.size();
143
+ return typeof size === 'number' ? 'av-icon--custom' : `av-icon--${size}`;
144
+ }
145
+ get elementClasses() {
146
+ return `av-icon ${this.sizeClass}`;
147
+ }
148
+ get fontSize() {
149
+ const size = this.size();
150
+ return typeof size === 'number' ? `${size}px` : null;
151
+ }
152
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvIcon, deps: [{ token: AvIconRegistry }], target: i0.ɵɵFactoryTarget.Component });
153
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvIcon, isStandalone: true, selector: "span[av-icon], i[av-icon]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.elementClasses", "style.font-size": "this.fontSize" } }, ngImport: i0, template: "<span\n class=\"av-icon__glyph\"\n [ngClass]=\"sizeClass\"\n [innerHTML]=\"iconRegistry.getIcon(name())\"\n></span>\n", styles: [".av-icon{display:inline-flex;width:1em;height:1em;flex-shrink:0;align-items:center;justify-content:center;line-height:1;vertical-align:middle}.av-icon--xs{font-size:.75rem}.av-icon--sm{font-size:.875rem}.av-icon--base,.av-icon--md{font-size:1rem}.av-icon--lg{font-size:1.25rem}.av-icon--xl{font-size:1.5rem}.av-icon__glyph{display:inline-flex;width:100%;height:100%;-webkit-user-select:none;user-select:none}.av-icon__glyph>svg{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
154
+ }
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvIcon, decorators: [{
156
+ type: Component,
157
+ args: [{ standalone: true, imports: [CommonModule], selector: 'span[av-icon], i[av-icon]', encapsulation: ViewEncapsulation.None, template: "<span\n class=\"av-icon__glyph\"\n [ngClass]=\"sizeClass\"\n [innerHTML]=\"iconRegistry.getIcon(name())\"\n></span>\n", styles: [".av-icon{display:inline-flex;width:1em;height:1em;flex-shrink:0;align-items:center;justify-content:center;line-height:1;vertical-align:middle}.av-icon--xs{font-size:.75rem}.av-icon--sm{font-size:.875rem}.av-icon--base,.av-icon--md{font-size:1rem}.av-icon--lg{font-size:1.25rem}.av-icon--xl{font-size:1.5rem}.av-icon__glyph{display:inline-flex;width:100%;height:100%;-webkit-user-select:none;user-select:none}.av-icon__glyph>svg{display:block;width:100%;height:100%}\n"] }]
158
+ }], ctorParameters: () => [{ type: AvIconRegistry }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], elementClasses: [{
159
+ type: HostBinding,
160
+ args: ['class']
161
+ }], fontSize: [{
162
+ type: HostBinding,
163
+ args: ['style.font-size']
164
+ }] } });
165
+
166
+ const VISUALS_CONFIG = new InjectionToken('VISUALS_CONFIG');
167
+ function provideAngularVisuals(config) {
168
+ const providers = [
169
+ {
170
+ provide: VISUALS_CONFIG,
171
+ useValue: config
172
+ },
173
+ ];
174
+ return makeEnvironmentProviders(providers);
175
+ }
176
+
177
+ class ThemeService {
178
+ config = inject(VISUALS_CONFIG);
179
+ colorIntensities = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
180
+ mode = signal(this.config.theme.mode, /* @ts-ignore */
181
+ ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
182
+ systemDark = signal(false, /* @ts-ignore */
183
+ ...(ngDevMode ? [{ debugName: "systemDark" }] : /* istanbul ignore next */ []));
184
+ dark = computed(() => {
185
+ const mode = this.mode();
186
+ if (mode === 'dark')
187
+ return true;
188
+ if (mode === 'light')
189
+ return false;
190
+ return this.systemDark();
191
+ }, /* @ts-ignore */
192
+ ...(ngDevMode ? [{ debugName: "dark" }] : /* istanbul ignore next */ []));
193
+ constructor() {
194
+ const media = window.matchMedia('(prefers-color-scheme: dark)');
195
+ this.systemDark.set(media.matches);
196
+ this.setPrimaryColorVariables();
197
+ media.addEventListener('change', event => {
198
+ this.systemDark.set(event.matches);
199
+ });
200
+ effect(() => {
201
+ const isDark = this.dark();
202
+ const root = document.documentElement;
203
+ if (isDark) {
204
+ root.setAttribute('data-av-theme', 'dark');
205
+ }
206
+ else {
207
+ root.setAttribute('data-av-theme', 'light');
208
+ }
209
+ });
210
+ }
211
+ setMode(mode) {
212
+ this.mode.set(mode);
213
+ }
214
+ setPrimaryColorVariables() {
215
+ const root = document.documentElement;
216
+ const variant = this.config.theme.defaultVariant;
217
+ for (const intensity of this.colorIntensities) {
218
+ root.style.setProperty(`--av-primary-${intensity}`, `var(--av-${variant}-${intensity})`);
219
+ }
220
+ }
221
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
222
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ThemeService, providedIn: 'root' });
223
+ }
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ThemeService, decorators: [{
225
+ type: Injectable,
226
+ args: [{
227
+ providedIn: 'root'
228
+ }]
229
+ }], ctorParameters: () => [] });
230
+
231
+ class AvNavDropdown {
232
+ config = inject(VISUALS_CONFIG);
38
233
  themeService = inject(ThemeService);
39
234
  badge = input(null, /* @ts-ignore */
40
235
  ...(ngDevMode ? [{ debugName: "badge" }] : /* istanbul ignore next */ []));
@@ -49,20 +244,20 @@ class AvDropdown {
49
244
  expandedChange = output();
50
245
  internalExpanded = signal(false, /* @ts-ignore */
51
246
  ...(ngDevMode ? [{ debugName: "internalExpanded" }] : /* istanbul ignore next */ []));
52
- panelId = `av-dropdown-${Math.random().toString(36).slice(2, 9)}`;
247
+ panelId = `av-nav-dropdown-${Math.random().toString(36).slice(2, 9)}`;
53
248
  isExpanded = computed(() => this.expanded() ?? this.internalExpanded(), /* @ts-ignore */
54
249
  ...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
55
250
  themeVars = computed(() => {
56
251
  const variant = this.variant();
57
252
  const isDark = this.themeService.dark();
58
253
  return {
59
- '--av-dropdown-accent': `var(--av-${variant}-${isDark ? 400 : 500})`,
60
- '--av-dropdown-accent-hover': `var(--av-${variant}-${isDark ? 300 : 700})`,
61
- '--av-dropdown-accent-soft': isDark
254
+ '--av-nav-dropdown-accent': `var(--av-${variant}-${isDark ? 400 : 500})`,
255
+ '--av-nav-dropdown-accent-hover': `var(--av-${variant}-${isDark ? 300 : 700})`,
256
+ '--av-nav-dropdown-accent-soft': isDark
62
257
  ? `color-mix(in srgb, var(--av-${variant}-400) 16%, transparent)`
63
258
  : `var(--av-${variant}-50)`,
64
- '--av-dropdown-text': 'var(--av-color-text-muted)',
65
- '--av-dropdown-text-active': isDark ? `var(--av-${variant}-100)` : `var(--av-${variant}-800)`,
259
+ '--av-nav-dropdown-text': 'var(--av-color-text-muted)',
260
+ '--av-nav-dropdown-text-active': isDark ? `var(--av-${variant}-100)` : `var(--av-${variant}-800)`,
66
261
  };
67
262
  }, /* @ts-ignore */
68
263
  ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
@@ -81,16 +276,16 @@ class AvDropdown {
81
276
  this.internalExpanded.set(next);
82
277
  this.expandedChange.emit(next);
83
278
  }
84
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
85
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvDropdown, isStandalone: true, selector: "av-dropdown", inputs: { badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedChange: "expandedChange" }, ngImport: i0, template: "<div class=\"av-dropdown\" [ngStyle]=\"themeVars()\">\n <button\n type=\"button\"\n class=\"av-dropdown__trigger\"\n [class.av-dropdown__trigger--active]=\"isExpanded()\"\n [disabled]=\"disabled()\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"isExpanded()\"\n (click)=\"toggle()\"\n >\n @if (icon()) {\n <span class=\"av-dropdown__icon\" av-icon [name]=\"icon()\" size=\"md\"></span>\n }\n\n <span class=\"av-dropdown__label\">\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content select=\"[av-dropdown-label]\"></ng-content>\n }\n </span>\n\n @if (badge() !== null && badge() !== undefined) {\n <span class=\"av-dropdown__badge\">{{ badge() }}</span>\n }\n\n <span\n class=\"av-dropdown__chevron\"\n av-icon\n name=\"expand_more\"\n size=\"md\"\n [class.av-dropdown__chevron--open]=\"isExpanded()\"\n ></span>\n </button>\n\n <div\n class=\"av-dropdown__panel\"\n [id]=\"panelId\"\n [class.av-dropdown__panel--open]=\"isExpanded()\"\n [attr.aria-hidden]=\"!isExpanded()\"\n [attr.inert]=\"isExpanded() ? null : ''\"\n >\n <div class=\"av-dropdown__panel-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;min-width:0}.av-dropdown{display:grid;gap:.125rem;min-width:0}.av-dropdown__trigger{align-items:center;background:transparent;border:1px solid transparent;border-radius:var(--av-radius-md);box-sizing:border-box;color:var(--av-dropdown-text, var(--av-color-text-muted));cursor:pointer;display:flex;font:inherit;gap:.625rem;min-height:2.5rem;min-width:0;padding:.625rem .75rem;text-align:left;transition:background-color .18s ease,border-color .18s ease,color .18s ease;width:100%}.av-dropdown__trigger:hover:not(:disabled),.av-dropdown__trigger--active{background:var(--av-dropdown-accent-soft);color:var(--av-dropdown-accent-hover)}.av-dropdown__trigger--active{border-color:color-mix(in srgb,var(--av-dropdown-accent) 24%,transparent);color:var(--av-dropdown-text-active);font-weight:700}.av-dropdown__trigger:disabled{cursor:not-allowed;opacity:.52}.av-dropdown__trigger:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--av-dropdown-accent) 24%,transparent);outline:none}.av-dropdown__icon,.av-dropdown__chevron{color:currentColor;flex:0 0 auto}.av-dropdown__label{flex:1;font-size:.875rem;line-height:1.25;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-dropdown__badge{background:var(--av-dropdown-accent);border-radius:var(--av-radius-full);color:var(--av-white);flex:0 0 auto;font-size:.6875rem;font-weight:700;line-height:1;min-width:1.25rem;padding:.25rem .375rem;text-align:center}.av-dropdown__chevron{transition:transform .18s ease}.av-dropdown__chevron--open{transform:rotate(180deg)}.av-dropdown__panel{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .2s ease,opacity .18s ease}.av-dropdown__panel--open{grid-template-rows:1fr;opacity:1}.av-dropdown__panel-inner{--av-nav-link-padding-left: 1rem;--av-nav-link-padding-y: .5rem;border-left:1px solid var(--av-color-border-soft);display:grid;gap:.125rem;margin-left:1.25rem;overflow:hidden;padding:.125rem 0 .125rem .5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
279
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvNavDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
280
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvNavDropdown, isStandalone: true, selector: "av-nav-dropdown", inputs: { badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedChange: "expandedChange" }, ngImport: i0, template: "<div class=\"av-nav-dropdown\" [ngStyle]=\"themeVars()\">\n <button\n type=\"button\"\n class=\"av-nav-dropdown__trigger\"\n [class.av-nav-dropdown__trigger--active]=\"isExpanded()\"\n [disabled]=\"disabled()\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"isExpanded()\"\n (click)=\"toggle()\"\n >\n @if (icon()) {\n <span class=\"av-nav-dropdown__icon\" av-icon [name]=\"icon()\" size=\"md\"></span>\n }\n\n <span class=\"av-nav-dropdown__label\">\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content select=\"[av-nav-dropdown-label]\"></ng-content>\n }\n </span>\n\n @if (badge() !== null && badge() !== undefined) {\n <span class=\"av-nav-dropdown__badge\">{{ badge() }}</span>\n }\n\n <span\n class=\"av-nav-dropdown__chevron\"\n av-icon\n name=\"expand_more\"\n size=\"md\"\n [class.av-nav-dropdown__chevron--open]=\"isExpanded()\"\n ></span>\n </button>\n\n <div\n class=\"av-nav-dropdown__panel\"\n [id]=\"panelId\"\n [class.av-nav-dropdown__panel--open]=\"isExpanded()\"\n [attr.aria-hidden]=\"!isExpanded()\"\n [attr.inert]=\"isExpanded() ? null : ''\"\n >\n <div class=\"av-nav-dropdown__panel-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;min-width:0}.av-nav-dropdown{display:grid;gap:.125rem;min-width:0}.av-nav-dropdown__trigger{align-items:center;background:transparent;border:1px solid transparent;border-radius:var(--av-radius-md);box-sizing:border-box;color:var(--av-nav-dropdown-text, var(--av-color-text-muted));cursor:pointer;display:flex;font:inherit;gap:.625rem;min-height:2.5rem;min-width:0;padding:.625rem .75rem;text-align:left;transition:background-color .18s ease,border-color .18s ease,color .18s ease;width:100%}.av-nav-dropdown__trigger:hover:not(:disabled),.av-nav-dropdown__trigger--active{background:var(--av-nav-dropdown-accent-soft);color:var(--av-nav-dropdown-accent-hover)}.av-nav-dropdown__trigger--active{border-color:color-mix(in srgb,var(--av-nav-dropdown-accent) 24%,transparent);color:var(--av-nav-dropdown-text-active);font-weight:700}.av-nav-dropdown__trigger:disabled{cursor:not-allowed;opacity:.52}.av-nav-dropdown__trigger:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--av-nav-dropdown-accent) 24%,transparent);outline:none}.av-nav-dropdown__icon,.av-nav-dropdown__chevron{color:currentColor;flex:0 0 auto}.av-nav-dropdown__label{flex:1;font-size:.875rem;line-height:1.25;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-nav-dropdown__badge{background:var(--av-nav-dropdown-accent);border-radius:var(--av-radius-full);color:var(--av-white);flex:0 0 auto;font-size:.6875rem;font-weight:700;line-height:1;min-width:1.25rem;padding:.25rem .375rem;text-align:center}.av-nav-dropdown__chevron{transition:transform .18s ease}.av-nav-dropdown__chevron--open{transform:rotate(180deg)}.av-nav-dropdown__panel{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .2s ease,opacity .18s ease}.av-nav-dropdown__panel--open{grid-template-rows:1fr;opacity:1}.av-nav-dropdown__panel-inner{--av-nav-link-padding-left: 1rem;--av-nav-link-padding-y: .5rem;border-left:1px solid var(--av-color-border-soft);display:grid;gap:.125rem;margin-left:1.25rem;overflow:hidden;padding:.125rem 0 .125rem .5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
86
281
  }
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvDropdown, decorators: [{
282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvNavDropdown, decorators: [{
88
283
  type: Component,
89
- args: [{ imports: [CommonModule, AvIcon], selector: 'av-dropdown', template: "<div class=\"av-dropdown\" [ngStyle]=\"themeVars()\">\n <button\n type=\"button\"\n class=\"av-dropdown__trigger\"\n [class.av-dropdown__trigger--active]=\"isExpanded()\"\n [disabled]=\"disabled()\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"isExpanded()\"\n (click)=\"toggle()\"\n >\n @if (icon()) {\n <span class=\"av-dropdown__icon\" av-icon [name]=\"icon()\" size=\"md\"></span>\n }\n\n <span class=\"av-dropdown__label\">\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content select=\"[av-dropdown-label]\"></ng-content>\n }\n </span>\n\n @if (badge() !== null && badge() !== undefined) {\n <span class=\"av-dropdown__badge\">{{ badge() }}</span>\n }\n\n <span\n class=\"av-dropdown__chevron\"\n av-icon\n name=\"expand_more\"\n size=\"md\"\n [class.av-dropdown__chevron--open]=\"isExpanded()\"\n ></span>\n </button>\n\n <div\n class=\"av-dropdown__panel\"\n [id]=\"panelId\"\n [class.av-dropdown__panel--open]=\"isExpanded()\"\n [attr.aria-hidden]=\"!isExpanded()\"\n [attr.inert]=\"isExpanded() ? null : ''\"\n >\n <div class=\"av-dropdown__panel-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;min-width:0}.av-dropdown{display:grid;gap:.125rem;min-width:0}.av-dropdown__trigger{align-items:center;background:transparent;border:1px solid transparent;border-radius:var(--av-radius-md);box-sizing:border-box;color:var(--av-dropdown-text, var(--av-color-text-muted));cursor:pointer;display:flex;font:inherit;gap:.625rem;min-height:2.5rem;min-width:0;padding:.625rem .75rem;text-align:left;transition:background-color .18s ease,border-color .18s ease,color .18s ease;width:100%}.av-dropdown__trigger:hover:not(:disabled),.av-dropdown__trigger--active{background:var(--av-dropdown-accent-soft);color:var(--av-dropdown-accent-hover)}.av-dropdown__trigger--active{border-color:color-mix(in srgb,var(--av-dropdown-accent) 24%,transparent);color:var(--av-dropdown-text-active);font-weight:700}.av-dropdown__trigger:disabled{cursor:not-allowed;opacity:.52}.av-dropdown__trigger:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--av-dropdown-accent) 24%,transparent);outline:none}.av-dropdown__icon,.av-dropdown__chevron{color:currentColor;flex:0 0 auto}.av-dropdown__label{flex:1;font-size:.875rem;line-height:1.25;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-dropdown__badge{background:var(--av-dropdown-accent);border-radius:var(--av-radius-full);color:var(--av-white);flex:0 0 auto;font-size:.6875rem;font-weight:700;line-height:1;min-width:1.25rem;padding:.25rem .375rem;text-align:center}.av-dropdown__chevron{transition:transform .18s ease}.av-dropdown__chevron--open{transform:rotate(180deg)}.av-dropdown__panel{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .2s ease,opacity .18s ease}.av-dropdown__panel--open{grid-template-rows:1fr;opacity:1}.av-dropdown__panel-inner{--av-nav-link-padding-left: 1rem;--av-nav-link-padding-y: .5rem;border-left:1px solid var(--av-color-border-soft);display:grid;gap:.125rem;margin-left:1.25rem;overflow:hidden;padding:.125rem 0 .125rem .5rem}\n"] }]
284
+ args: [{ imports: [CommonModule, AvIcon], selector: 'av-nav-dropdown', template: "<div class=\"av-nav-dropdown\" [ngStyle]=\"themeVars()\">\n <button\n type=\"button\"\n class=\"av-nav-dropdown__trigger\"\n [class.av-nav-dropdown__trigger--active]=\"isExpanded()\"\n [disabled]=\"disabled()\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"isExpanded()\"\n (click)=\"toggle()\"\n >\n @if (icon()) {\n <span class=\"av-nav-dropdown__icon\" av-icon [name]=\"icon()\" size=\"md\"></span>\n }\n\n <span class=\"av-nav-dropdown__label\">\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content select=\"[av-nav-dropdown-label]\"></ng-content>\n }\n </span>\n\n @if (badge() !== null && badge() !== undefined) {\n <span class=\"av-nav-dropdown__badge\">{{ badge() }}</span>\n }\n\n <span\n class=\"av-nav-dropdown__chevron\"\n av-icon\n name=\"expand_more\"\n size=\"md\"\n [class.av-nav-dropdown__chevron--open]=\"isExpanded()\"\n ></span>\n </button>\n\n <div\n class=\"av-nav-dropdown__panel\"\n [id]=\"panelId\"\n [class.av-nav-dropdown__panel--open]=\"isExpanded()\"\n [attr.aria-hidden]=\"!isExpanded()\"\n [attr.inert]=\"isExpanded() ? null : ''\"\n >\n <div class=\"av-nav-dropdown__panel-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;min-width:0}.av-nav-dropdown{display:grid;gap:.125rem;min-width:0}.av-nav-dropdown__trigger{align-items:center;background:transparent;border:1px solid transparent;border-radius:var(--av-radius-md);box-sizing:border-box;color:var(--av-nav-dropdown-text, var(--av-color-text-muted));cursor:pointer;display:flex;font:inherit;gap:.625rem;min-height:2.5rem;min-width:0;padding:.625rem .75rem;text-align:left;transition:background-color .18s ease,border-color .18s ease,color .18s ease;width:100%}.av-nav-dropdown__trigger:hover:not(:disabled),.av-nav-dropdown__trigger--active{background:var(--av-nav-dropdown-accent-soft);color:var(--av-nav-dropdown-accent-hover)}.av-nav-dropdown__trigger--active{border-color:color-mix(in srgb,var(--av-nav-dropdown-accent) 24%,transparent);color:var(--av-nav-dropdown-text-active);font-weight:700}.av-nav-dropdown__trigger:disabled{cursor:not-allowed;opacity:.52}.av-nav-dropdown__trigger:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--av-nav-dropdown-accent) 24%,transparent);outline:none}.av-nav-dropdown__icon,.av-nav-dropdown__chevron{color:currentColor;flex:0 0 auto}.av-nav-dropdown__label{flex:1;font-size:.875rem;line-height:1.25;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-nav-dropdown__badge{background:var(--av-nav-dropdown-accent);border-radius:var(--av-radius-full);color:var(--av-white);flex:0 0 auto;font-size:.6875rem;font-weight:700;line-height:1;min-width:1.25rem;padding:.25rem .375rem;text-align:center}.av-nav-dropdown__chevron{transition:transform .18s ease}.av-nav-dropdown__chevron--open{transform:rotate(180deg)}.av-nav-dropdown__panel{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .2s ease,opacity .18s ease}.av-nav-dropdown__panel--open{grid-template-rows:1fr;opacity:1}.av-nav-dropdown__panel-inner{--av-nav-link-padding-left: 1rem;--av-nav-link-padding-y: .5rem;border-left:1px solid var(--av-color-border-soft);display:grid;gap:.125rem;margin-left:1.25rem;overflow:hidden;padding:.125rem 0 .125rem .5rem}\n"] }]
90
285
  }], ctorParameters: () => [], propDecorators: { badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }] } });
91
286
 
92
287
  class AvNavLink {
93
- config = inject(VISUALS_CONFIG$1);
288
+ config = inject(VISUALS_CONFIG);
94
289
  elementRef = inject((ElementRef));
95
290
  themeService = inject(ThemeService);
96
291
  active = input(false, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
@@ -170,7 +365,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
170
365
  }], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], route: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], rel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rel", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], routerActiveClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerActiveClass", required: false }] }], routerActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerActiveOptions", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
171
366
 
172
367
  class AvSidenav {
173
- config = inject(VISUALS_CONFIG$1);
368
+ config = inject(VISUALS_CONFIG);
174
369
  destroyRef = inject(DestroyRef);
175
370
  platformId = inject(PLATFORM_ID);
176
371
  renderer = inject(Renderer2);
@@ -438,7 +633,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
438
633
  }], propDecorators: { gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }] } });
439
634
 
440
635
  class AvDivider {
441
- config = inject(VISUALS_CONFIG$1);
636
+ config = inject(VISUALS_CONFIG);
442
637
  size = input(1, /* @ts-ignore */
443
638
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
444
639
  direction = input('hori', /* @ts-ignore */
@@ -487,20 +682,3203 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
487
682
  args: [{ imports: [CommonModule], selector: 'av-stack', template: "<div class=\"av-stack\" [style.--av-stack-gap]=\"gapValue\">\n <ng-content></ng-content>\n</div>\n", styles: [".av-stack{display:flex;flex-wrap:nowrap;overflow-x:auto;align-items:start;flex-direction:column;justify-content:start;gap:var(--av-stack-gap)}\n"] }]
488
683
  }], propDecorators: { gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }] } });
489
684
 
490
- const VISUALS_CONFIG = new InjectionToken('VISUALS_CONFIG');
491
- function provideAngularVisuals(config) {
492
- const providers = [
493
- {
494
- provide: VISUALS_CONFIG,
495
- useValue: config
496
- },
497
- ];
498
- return makeEnvironmentProviders(providers);
685
+ let nextTooltipId = 0;
686
+ class AvTooltipPanel {
687
+ id = signal('', /* @ts-ignore */
688
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
689
+ text = signal('', /* @ts-ignore */
690
+ ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
691
+ position = signal('top', /* @ts-ignore */
692
+ ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
693
+ themeVars = signal({}, /* @ts-ignore */
694
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
695
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTooltipPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
696
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: AvTooltipPanel, isStandalone: true, selector: "av-tooltip-panel", ngImport: i0, template: "<div\n class=\"av-tooltip-panel\"\n role=\"tooltip\"\n [id]=\"id()\"\n [attr.data-position]=\"position()\"\n [ngStyle]=\"themeVars()\"\n>\n <span class=\"av-tooltip-panel__text\">{{ text() }}</span>\n <span class=\"av-tooltip-panel__arrow\" aria-hidden=\"true\"></span>\n</div>\n", styles: [":host{display:block;pointer-events:none}.av-tooltip-panel{--av-tooltip-arrow-size: .48rem;animation:av-tooltip-in .12s cubic-bezier(.2,0,0,1);background:var(--av-tooltip-bg);border:1px solid var(--av-tooltip-border);border-radius:var(--av-radius-md);box-shadow:var(--av-tooltip-shadow);color:var(--av-tooltip-color);font-size:.75rem;font-weight:700;line-height:1.35;max-width:min(18rem,calc(100vw - 2rem));padding:.45rem .6rem;position:relative;white-space:normal;word-break:break-word}.av-tooltip-panel:before{background:var(--av-tooltip-accent);border-radius:var(--av-radius-full);content:\"\";height:2px;inset-inline:.55rem;opacity:.8;position:absolute}.av-tooltip-panel[data-position=top]:before{bottom:0}.av-tooltip-panel[data-position=bottom]:before,.av-tooltip-panel[data-position=left]:before,.av-tooltip-panel[data-position=right]:before{top:0}.av-tooltip-panel__text{display:block}.av-tooltip-panel__arrow{background:var(--av-tooltip-bg);border:solid var(--av-tooltip-border);height:var(--av-tooltip-arrow-size);position:absolute;transform:rotate(45deg);width:var(--av-tooltip-arrow-size)}.av-tooltip-panel[data-position=top] .av-tooltip-panel__arrow{border-width:0 1px 1px 0;bottom:calc(var(--av-tooltip-arrow-size) / -2);left:calc(50% - var(--av-tooltip-arrow-size) / 2)}.av-tooltip-panel[data-position=bottom] .av-tooltip-panel__arrow{border-width:1px 0 0 1px;left:calc(50% - var(--av-tooltip-arrow-size) / 2);top:calc(var(--av-tooltip-arrow-size) / -2)}.av-tooltip-panel[data-position=left] .av-tooltip-panel__arrow{border-width:1px 1px 0 0;right:calc(var(--av-tooltip-arrow-size) / -2);top:calc(50% - var(--av-tooltip-arrow-size) / 2)}.av-tooltip-panel[data-position=right] .av-tooltip-panel__arrow{border-width:0 0 1px 1px;left:calc(var(--av-tooltip-arrow-size) / -2);top:calc(50% - var(--av-tooltip-arrow-size) / 2)}@keyframes av-tooltip-in{0%{opacity:0;transform:translateY(.15rem) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
697
+ }
698
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTooltipPanel, decorators: [{
699
+ type: Component,
700
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], selector: 'av-tooltip-panel', template: "<div\n class=\"av-tooltip-panel\"\n role=\"tooltip\"\n [id]=\"id()\"\n [attr.data-position]=\"position()\"\n [ngStyle]=\"themeVars()\"\n>\n <span class=\"av-tooltip-panel__text\">{{ text() }}</span>\n <span class=\"av-tooltip-panel__arrow\" aria-hidden=\"true\"></span>\n</div>\n", styles: [":host{display:block;pointer-events:none}.av-tooltip-panel{--av-tooltip-arrow-size: .48rem;animation:av-tooltip-in .12s cubic-bezier(.2,0,0,1);background:var(--av-tooltip-bg);border:1px solid var(--av-tooltip-border);border-radius:var(--av-radius-md);box-shadow:var(--av-tooltip-shadow);color:var(--av-tooltip-color);font-size:.75rem;font-weight:700;line-height:1.35;max-width:min(18rem,calc(100vw - 2rem));padding:.45rem .6rem;position:relative;white-space:normal;word-break:break-word}.av-tooltip-panel:before{background:var(--av-tooltip-accent);border-radius:var(--av-radius-full);content:\"\";height:2px;inset-inline:.55rem;opacity:.8;position:absolute}.av-tooltip-panel[data-position=top]:before{bottom:0}.av-tooltip-panel[data-position=bottom]:before,.av-tooltip-panel[data-position=left]:before,.av-tooltip-panel[data-position=right]:before{top:0}.av-tooltip-panel__text{display:block}.av-tooltip-panel__arrow{background:var(--av-tooltip-bg);border:solid var(--av-tooltip-border);height:var(--av-tooltip-arrow-size);position:absolute;transform:rotate(45deg);width:var(--av-tooltip-arrow-size)}.av-tooltip-panel[data-position=top] .av-tooltip-panel__arrow{border-width:0 1px 1px 0;bottom:calc(var(--av-tooltip-arrow-size) / -2);left:calc(50% - var(--av-tooltip-arrow-size) / 2)}.av-tooltip-panel[data-position=bottom] .av-tooltip-panel__arrow{border-width:1px 0 0 1px;left:calc(50% - var(--av-tooltip-arrow-size) / 2);top:calc(var(--av-tooltip-arrow-size) / -2)}.av-tooltip-panel[data-position=left] .av-tooltip-panel__arrow{border-width:1px 1px 0 0;right:calc(var(--av-tooltip-arrow-size) / -2);top:calc(50% - var(--av-tooltip-arrow-size) / 2)}.av-tooltip-panel[data-position=right] .av-tooltip-panel__arrow{border-width:0 0 1px 1px;left:calc(var(--av-tooltip-arrow-size) / -2);top:calc(50% - var(--av-tooltip-arrow-size) / 2)}@keyframes av-tooltip-in{0%{opacity:0;transform:translateY(.15rem) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}\n"] }]
701
+ }] });
702
+ class AvTooltip {
703
+ config = inject(VISUALS_CONFIG);
704
+ elementRef = inject(ElementRef);
705
+ overlay = inject(Overlay);
706
+ renderer = inject(Renderer2);
707
+ themeService = inject(ThemeService);
708
+ text = input('', { ...(ngDevMode ? { debugName: "text" } : /* istanbul ignore next */ {}), alias: 'av-tooltip' });
709
+ textCamel = input('', { ...(ngDevMode ? { debugName: "textCamel" } : /* istanbul ignore next */ {}), alias: 'avTooltip' });
710
+ position = input('top', { ...(ngDevMode ? { debugName: "position" } : /* istanbul ignore next */ {}), alias: 'avTooltipPosition' });
711
+ variant = input(this.config.theme.defaultVariant, { ...(ngDevMode ? { debugName: "variant" } : /* istanbul ignore next */ {}), alias: 'avTooltipVariant' });
712
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'avTooltipDisabled',
713
+ transform: booleanAttribute });
714
+ showDelay = input(120, { ...(ngDevMode ? { debugName: "showDelay" } : /* istanbul ignore next */ {}), alias: 'avTooltipShowDelay',
715
+ transform: numberAttribute });
716
+ hideDelay = input(60, { ...(ngDevMode ? { debugName: "hideDelay" } : /* istanbul ignore next */ {}), alias: 'avTooltipHideDelay',
717
+ transform: numberAttribute });
718
+ offset = input(8, { ...(ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {}), alias: 'avTooltipOffset',
719
+ transform: numberAttribute });
720
+ tooltipId = `av-tooltip-${++nextTooltipId}`;
721
+ overlayRef;
722
+ panel;
723
+ positionStrategy;
724
+ positionSubscription;
725
+ showTimeout;
726
+ hideTimeout;
727
+ previousDescribedBy;
728
+ content = computed(() => this.textCamel() || this.text(), /* @ts-ignore */
729
+ ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
730
+ themeVars = computed(() => {
731
+ const variant = this.variant();
732
+ const isDark = this.themeService.dark();
733
+ const accent = `var(--av-${variant}-${isDark ? 400 : 500})`;
734
+ return {
735
+ '--av-tooltip-bg': isDark
736
+ ? 'var(--av-color-surface-raised)'
737
+ : 'var(--av-slate-950)',
738
+ '--av-tooltip-border': isDark
739
+ ? `color-mix(in srgb, ${accent} 34%, var(--av-color-border-soft))`
740
+ : `color-mix(in srgb, ${accent} 44%, var(--av-slate-800))`,
741
+ '--av-tooltip-color': isDark
742
+ ? 'var(--av-color-text)'
743
+ : 'var(--av-white)',
744
+ '--av-tooltip-shadow': 'var(--av-shadow-raised)',
745
+ '--av-tooltip-accent': accent,
746
+ };
747
+ }, /* @ts-ignore */
748
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
749
+ show() {
750
+ if (this.disabled() || !this.content().trim())
751
+ return;
752
+ clearTimeout(this.hideTimeout);
753
+ clearTimeout(this.showTimeout);
754
+ this.showTimeout = setTimeout(() => {
755
+ this.open();
756
+ }, Math.max(0, this.showDelay()));
757
+ }
758
+ hide() {
759
+ clearTimeout(this.showTimeout);
760
+ clearTimeout(this.hideTimeout);
761
+ this.hideTimeout = setTimeout(() => {
762
+ this.detach();
763
+ }, Math.max(0, this.hideDelay()));
764
+ }
765
+ hideImmediately() {
766
+ clearTimeout(this.showTimeout);
767
+ clearTimeout(this.hideTimeout);
768
+ this.detach();
769
+ }
770
+ open() {
771
+ if (!this.overlayRef) {
772
+ this.createOverlay();
773
+ }
774
+ this.positionStrategy?.withPositions(this.positionsFor(this.safePosition()));
775
+ if (!this.overlayRef?.hasAttached()) {
776
+ const portal = new ComponentPortal(AvTooltipPanel);
777
+ const ref = this.overlayRef?.attach(portal);
778
+ this.panel = ref?.instance;
779
+ this.setAriaDescription();
780
+ }
781
+ this.updatePanel();
782
+ this.overlayRef?.updatePosition();
783
+ }
784
+ createOverlay() {
785
+ this.positionStrategy = this.overlay
786
+ .position()
787
+ .flexibleConnectedTo(this.elementRef)
788
+ .withFlexibleDimensions(false)
789
+ .withPush(true)
790
+ .withViewportMargin(8)
791
+ .withPositions(this.positionsFor(this.safePosition()));
792
+ this.positionSubscription = this.positionStrategy.positionChanges.subscribe(({ connectionPair }) => {
793
+ this.panel?.position.set(this.positionFromConnection(connectionPair));
794
+ });
795
+ this.overlayRef = this.overlay.create({
796
+ panelClass: 'av-tooltip-overlay',
797
+ positionStrategy: this.positionStrategy,
798
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
799
+ });
800
+ }
801
+ updatePanel() {
802
+ if (!this.panel)
803
+ return;
804
+ this.panel.id.set(this.tooltipId);
805
+ this.panel.text.set(this.content());
806
+ this.panel.position.set(this.safePosition());
807
+ this.panel.themeVars.set(this.themeVars());
808
+ }
809
+ detach() {
810
+ this.overlayRef?.detach();
811
+ this.panel = undefined;
812
+ this.restoreAriaDescription();
813
+ }
814
+ setAriaDescription() {
815
+ const host = this.elementRef.nativeElement;
816
+ if (this.previousDescribedBy === undefined) {
817
+ this.previousDescribedBy = host.getAttribute('aria-describedby');
818
+ }
819
+ const ids = [this.previousDescribedBy, this.tooltipId]
820
+ .filter(Boolean)
821
+ .join(' ');
822
+ this.renderer.setAttribute(host, 'aria-describedby', ids);
823
+ }
824
+ restoreAriaDescription() {
825
+ const host = this.elementRef.nativeElement;
826
+ if (this.previousDescribedBy) {
827
+ this.renderer.setAttribute(host, 'aria-describedby', this.previousDescribedBy);
828
+ return;
829
+ }
830
+ this.renderer.removeAttribute(host, 'aria-describedby');
831
+ }
832
+ safePosition() {
833
+ const position = this.position();
834
+ return ['top', 'right', 'bottom', 'left'].includes(position)
835
+ ? position
836
+ : 'top';
837
+ }
838
+ positionsFor(position) {
839
+ const offset = Math.max(0, this.offset());
840
+ const positions = {
841
+ top: [
842
+ { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -offset },
843
+ { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: offset },
844
+ ],
845
+ right: [
846
+ { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: offset },
847
+ { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -offset },
848
+ ],
849
+ bottom: [
850
+ { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: offset },
851
+ { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -offset },
852
+ ],
853
+ left: [
854
+ { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -offset },
855
+ { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: offset },
856
+ ],
857
+ };
858
+ return positions[position];
859
+ }
860
+ positionFromConnection(position) {
861
+ if (position.overlayY === 'bottom' && position.originY === 'top')
862
+ return 'top';
863
+ if (position.overlayY === 'top' && position.originY === 'bottom')
864
+ return 'bottom';
865
+ if (position.overlayX === 'end' && position.originX === 'start')
866
+ return 'left';
867
+ return 'right';
868
+ }
869
+ ngOnDestroy() {
870
+ clearTimeout(this.showTimeout);
871
+ clearTimeout(this.hideTimeout);
872
+ this.positionSubscription?.unsubscribe();
873
+ this.overlayRef?.dispose();
874
+ this.restoreAriaDescription();
875
+ }
876
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTooltip, deps: [], target: i0.ɵɵFactoryTarget.Directive });
877
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: AvTooltip, isStandalone: true, selector: "[av-tooltip], [avTooltip]", inputs: { text: { classPropertyName: "text", publicName: "av-tooltip", isSignal: true, isRequired: false, transformFunction: null }, textCamel: { classPropertyName: "textCamel", publicName: "avTooltip", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "avTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "avTooltipVariant", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "avTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "avTooltipShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "avTooltipHideDelay", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "avTooltipOffset", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "show()", "focusin": "show()", "mouseleave": "hide()", "focusout": "hide()", "keydown.escape": "hideImmediately()" } }, exportAs: ["avTooltip"], ngImport: i0 });
878
+ }
879
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTooltip, decorators: [{
880
+ type: Directive,
881
+ args: [{
882
+ exportAs: 'avTooltip',
883
+ selector: '[av-tooltip], [avTooltip]',
884
+ standalone: true,
885
+ }]
886
+ }], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "av-tooltip", required: false }] }], textCamel: [{ type: i0.Input, args: [{ isSignal: true, alias: "avTooltip", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "avTooltipPosition", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "avTooltipVariant", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "avTooltipDisabled", required: false }] }], showDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "avTooltipShowDelay", required: false }] }], hideDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "avTooltipHideDelay", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "avTooltipOffset", required: false }] }], show: [{
887
+ type: HostListener,
888
+ args: ['mouseenter']
889
+ }, {
890
+ type: HostListener,
891
+ args: ['focusin']
892
+ }], hide: [{
893
+ type: HostListener,
894
+ args: ['mouseleave']
895
+ }, {
896
+ type: HostListener,
897
+ args: ['focusout']
898
+ }], hideImmediately: [{
899
+ type: HostListener,
900
+ args: ['keydown.escape']
901
+ }] } });
902
+
903
+ class AvDropdown {
904
+ config = inject(VISUALS_CONFIG);
905
+ themeService = inject(ThemeService);
906
+ badge = input(null, /* @ts-ignore */
907
+ ...(ngDevMode ? [{ debugName: "badge" }] : /* istanbul ignore next */ []));
908
+ closeOnContentClick = input(true, { ...(ngDevMode ? { debugName: "closeOnContentClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
909
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
910
+ icon = input('', /* @ts-ignore */
911
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
912
+ label = input('', /* @ts-ignore */
913
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
914
+ matchTriggerWidth = input(false, { ...(ngDevMode ? { debugName: "matchTriggerWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
915
+ offset = input(8, { ...(ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {}), transform: numberAttribute });
916
+ open = input(undefined, { ...(ngDevMode ? { debugName: "open" } : /* istanbul ignore next */ {}), transform: (value) => value === undefined ? undefined : booleanAttribute(value) });
917
+ placement = input('bottom-start', /* @ts-ignore */
918
+ ...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
919
+ rounded = input('md', /* @ts-ignore */
920
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
921
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
922
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
923
+ openChange = output();
924
+ triggerEl;
925
+ internalOpen = signal(false, /* @ts-ignore */
926
+ ...(ngDevMode ? [{ debugName: "internalOpen" }] : /* istanbul ignore next */ []));
927
+ panelId = `av-dropdown-${Math.random().toString(36).slice(2, 9)}`;
928
+ isOpen = computed(() => this.open() ?? this.internalOpen(), /* @ts-ignore */
929
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
930
+ overlayPositions = computed(() => this.positionsFor(this.placement()), /* @ts-ignore */
931
+ ...(ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []));
932
+ themeVars = computed(() => {
933
+ const variant = this.variant();
934
+ const isDark = this.themeService.dark();
935
+ const accent = `var(--av-${variant}-${isDark ? 400 : 500})`;
936
+ return {
937
+ '--av-dropdown-accent': accent,
938
+ '--av-dropdown-accent-strong': `var(--av-${variant}-${isDark ? 300 : 600})`,
939
+ '--av-dropdown-accent-soft': isDark
940
+ ? `color-mix(in srgb, var(--av-${variant}-400) 16%, transparent)`
941
+ : `var(--av-${variant}-50)`,
942
+ '--av-dropdown-bg': 'var(--av-color-surface)',
943
+ '--av-dropdown-border': 'var(--av-color-border)',
944
+ '--av-dropdown-panel-bg': 'var(--av-color-surface-raised)',
945
+ '--av-dropdown-panel-border': 'var(--av-color-border-soft)',
946
+ '--av-dropdown-shadow': 'var(--av-shadow-raised)',
947
+ '--av-dropdown-text': 'var(--av-color-text)',
948
+ '--av-dropdown-muted': 'var(--av-color-text-muted)',
949
+ '--av-dropdown-focus-ring': `color-mix(in srgb, ${accent} 24%, transparent)`,
950
+ };
951
+ }, /* @ts-ignore */
952
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
953
+ constructor() {
954
+ effect(() => {
955
+ const controlledOpen = this.open();
956
+ if (controlledOpen !== undefined) {
957
+ this.internalOpen.set(controlledOpen);
958
+ }
959
+ });
960
+ }
961
+ get roundedStyle() {
962
+ if (typeof this.rounded() === 'string') {
963
+ return `var(--av-radius-${this.rounded()})`;
964
+ }
965
+ return `${this.rounded()}px`;
966
+ }
967
+ toggle() {
968
+ if (this.disabled())
969
+ return;
970
+ this.setOpen(!this.isOpen());
971
+ }
972
+ close() {
973
+ this.setOpen(false);
974
+ }
975
+ handleTriggerKeydown(event) {
976
+ if (event.key === 'Escape') {
977
+ this.close();
978
+ return;
979
+ }
980
+ if (event.key !== 'Enter' && event.key !== ' ' && event.key !== 'ArrowDown')
981
+ return;
982
+ event.preventDefault();
983
+ this.setOpen(true);
984
+ }
985
+ handlePanelClick() {
986
+ if (this.closeOnContentClick()) {
987
+ this.close();
988
+ }
989
+ }
990
+ setOpen(open) {
991
+ if (open && this.disabled())
992
+ return;
993
+ if (open === this.isOpen())
994
+ return;
995
+ this.internalOpen.set(open);
996
+ this.openChange.emit(open);
997
+ }
998
+ positionsFor(placement) {
999
+ const offset = Math.max(0, this.offset());
1000
+ const positions = {
1001
+ 'bottom-start': [
1002
+ { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: offset },
1003
+ { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -offset },
1004
+ ],
1005
+ 'bottom-end': [
1006
+ { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: offset },
1007
+ { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -offset },
1008
+ ],
1009
+ 'top-start': [
1010
+ { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -offset },
1011
+ { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: offset },
1012
+ ],
1013
+ 'top-end': [
1014
+ { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -offset },
1015
+ { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: offset },
1016
+ ],
1017
+ };
1018
+ return positions[placement] ?? positions['bottom-start'];
1019
+ }
1020
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
1021
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvDropdown, isStandalone: true, selector: "av-dropdown", inputs: { badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, closeOnContentClick: { classPropertyName: "closeOnContentClick", publicName: "closeOnContentClick", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, matchTriggerWidth: { classPropertyName: "matchTriggerWidth", publicName: "matchTriggerWidth", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange" }, viewQueries: [{ propertyName: "triggerEl", first: true, predicate: ["triggerEl"], descendants: true }], ngImport: i0, template: "<div class=\"av-dropdown\" [ngStyle]=\"themeVars()\">\n <button\n #triggerEl\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n type=\"button\"\n class=\"av-dropdown__trigger\"\n [class.av-dropdown__trigger--open]=\"isOpen()\"\n [disabled]=\"disabled()\"\n [style.border-radius]=\"roundedStyle\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"menu\"\n (click)=\"toggle()\"\n (keydown)=\"handleTriggerKeydown($event)\"\n >\n @if (label() || icon() || (badge() !== null && badge() !== undefined)) {\n @if (icon()) {\n <span class=\"av-dropdown__icon\" av-icon [name]=\"icon()\" size=\"md\"></span>\n }\n\n <span class=\"av-dropdown__label\">\n {{ label() }}\n </span>\n\n @if (badge() !== null && badge() !== undefined) {\n <span class=\"av-dropdown__badge\">{{ badge() }}</span>\n }\n } @else {\n <span class=\"av-dropdown__custom-trigger\">\n <ng-content select=\"[av-dropdown-trigger]\"></ng-content>\n </span>\n }\n\n <span\n class=\"av-dropdown__chevron\"\n av-icon\n name=\"expand_more\"\n size=\"md\"\n [class.av-dropdown__chevron--open]=\"isOpen()\"\n ></span>\n </button>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n class=\"av-dropdown__panel\"\n [id]=\"panelId\"\n [ngStyle]=\"themeVars()\"\n [style.border-radius]=\"roundedStyle\"\n [style.min-width.px]=\"matchTriggerWidth() ? triggerEl.offsetWidth : null\"\n role=\"menu\"\n tabindex=\"-1\"\n (click)=\"handlePanelClick()\"\n (keydown.escape)=\"close()\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: [":host{display:inline-block}.av-dropdown{display:inline-block}.av-dropdown__trigger{align-items:center;background:var(--av-dropdown-bg);border:1px solid var(--av-dropdown-border);color:var(--av-dropdown-text);cursor:pointer;display:inline-flex;font:inherit;font-size:.875rem;font-weight:700;gap:.5rem;justify-content:center;line-height:1.2;min-height:2.5rem;min-width:0;padding:.625rem .75rem;transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,color .18s ease}.av-dropdown__trigger:hover:not(:disabled),.av-dropdown__trigger--open{background:var(--av-dropdown-accent-soft);border-color:color-mix(in srgb,var(--av-dropdown-accent) 36%,var(--av-dropdown-border));color:var(--av-dropdown-accent-strong)}.av-dropdown__trigger:disabled{cursor:not-allowed;opacity:.52}.av-dropdown__trigger:focus-visible{box-shadow:0 0 0 3px var(--av-dropdown-focus-ring);outline:none}.av-dropdown__icon,.av-dropdown__chevron{color:currentColor;flex:0 0 auto}.av-dropdown__label,.av-dropdown__custom-trigger{min-width:0}.av-dropdown__badge{align-items:center;background:var(--av-dropdown-accent);border-radius:var(--av-radius-full);color:var(--av-white);display:inline-flex;flex:0 0 auto;font-size:.6875rem;font-weight:800;justify-content:center;line-height:1;min-width:1.25rem;padding:.25rem .375rem}.av-dropdown__chevron{transition:transform .18s ease}.av-dropdown__chevron--open{transform:rotate(180deg)}.av-dropdown__panel{animation:av-dropdown-panel-in .14s cubic-bezier(.2,0,0,1);background:var(--av-dropdown-panel-bg);border:1px solid var(--av-dropdown-panel-border);box-shadow:var(--av-dropdown-shadow);box-sizing:border-box;color:var(--av-dropdown-text);display:grid;gap:.125rem;max-width:min(24rem,calc(100vw - 2rem));min-width:12rem;padding:.375rem}@keyframes av-dropdown-panel-in{0%{opacity:0;transform:translateY(-.15rem) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
1022
+ }
1023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvDropdown, decorators: [{
1024
+ type: Component,
1025
+ args: [{ imports: [CommonModule, OverlayModule, AvIcon], selector: 'av-dropdown', standalone: true, template: "<div class=\"av-dropdown\" [ngStyle]=\"themeVars()\">\n <button\n #triggerEl\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n type=\"button\"\n class=\"av-dropdown__trigger\"\n [class.av-dropdown__trigger--open]=\"isOpen()\"\n [disabled]=\"disabled()\"\n [style.border-radius]=\"roundedStyle\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"menu\"\n (click)=\"toggle()\"\n (keydown)=\"handleTriggerKeydown($event)\"\n >\n @if (label() || icon() || (badge() !== null && badge() !== undefined)) {\n @if (icon()) {\n <span class=\"av-dropdown__icon\" av-icon [name]=\"icon()\" size=\"md\"></span>\n }\n\n <span class=\"av-dropdown__label\">\n {{ label() }}\n </span>\n\n @if (badge() !== null && badge() !== undefined) {\n <span class=\"av-dropdown__badge\">{{ badge() }}</span>\n }\n } @else {\n <span class=\"av-dropdown__custom-trigger\">\n <ng-content select=\"[av-dropdown-trigger]\"></ng-content>\n </span>\n }\n\n <span\n class=\"av-dropdown__chevron\"\n av-icon\n name=\"expand_more\"\n size=\"md\"\n [class.av-dropdown__chevron--open]=\"isOpen()\"\n ></span>\n </button>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n class=\"av-dropdown__panel\"\n [id]=\"panelId\"\n [ngStyle]=\"themeVars()\"\n [style.border-radius]=\"roundedStyle\"\n [style.min-width.px]=\"matchTriggerWidth() ? triggerEl.offsetWidth : null\"\n role=\"menu\"\n tabindex=\"-1\"\n (click)=\"handlePanelClick()\"\n (keydown.escape)=\"close()\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: [":host{display:inline-block}.av-dropdown{display:inline-block}.av-dropdown__trigger{align-items:center;background:var(--av-dropdown-bg);border:1px solid var(--av-dropdown-border);color:var(--av-dropdown-text);cursor:pointer;display:inline-flex;font:inherit;font-size:.875rem;font-weight:700;gap:.5rem;justify-content:center;line-height:1.2;min-height:2.5rem;min-width:0;padding:.625rem .75rem;transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,color .18s ease}.av-dropdown__trigger:hover:not(:disabled),.av-dropdown__trigger--open{background:var(--av-dropdown-accent-soft);border-color:color-mix(in srgb,var(--av-dropdown-accent) 36%,var(--av-dropdown-border));color:var(--av-dropdown-accent-strong)}.av-dropdown__trigger:disabled{cursor:not-allowed;opacity:.52}.av-dropdown__trigger:focus-visible{box-shadow:0 0 0 3px var(--av-dropdown-focus-ring);outline:none}.av-dropdown__icon,.av-dropdown__chevron{color:currentColor;flex:0 0 auto}.av-dropdown__label,.av-dropdown__custom-trigger{min-width:0}.av-dropdown__badge{align-items:center;background:var(--av-dropdown-accent);border-radius:var(--av-radius-full);color:var(--av-white);display:inline-flex;flex:0 0 auto;font-size:.6875rem;font-weight:800;justify-content:center;line-height:1;min-width:1.25rem;padding:.25rem .375rem}.av-dropdown__chevron{transition:transform .18s ease}.av-dropdown__chevron--open{transform:rotate(180deg)}.av-dropdown__panel{animation:av-dropdown-panel-in .14s cubic-bezier(.2,0,0,1);background:var(--av-dropdown-panel-bg);border:1px solid var(--av-dropdown-panel-border);box-shadow:var(--av-dropdown-shadow);box-sizing:border-box;color:var(--av-dropdown-text);display:grid;gap:.125rem;max-width:min(24rem,calc(100vw - 2rem));min-width:12rem;padding:.375rem}@keyframes av-dropdown-panel-in{0%{opacity:0;transform:translateY(-.15rem) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}\n"] }]
1026
+ }], ctorParameters: () => [], propDecorators: { badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], closeOnContentClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnContentClick", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], matchTriggerWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchTriggerWidth", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], openChange: [{ type: i0.Output, args: ["openChange"] }], triggerEl: [{
1027
+ type: ViewChild,
1028
+ args: ['triggerEl']
1029
+ }] } });
1030
+
1031
+ class AvDropdownItem {
1032
+ danger = input(false, { ...(ngDevMode ? { debugName: "danger" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1033
+ description = input('', /* @ts-ignore */
1034
+ ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
1035
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1036
+ icon = input('', /* @ts-ignore */
1037
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
1038
+ role = input('menuitem', /* @ts-ignore */
1039
+ ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
1040
+ type = input('button', /* @ts-ignore */
1041
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
1042
+ handleClick(event) {
1043
+ if (!this.disabled())
1044
+ return;
1045
+ event.preventDefault();
1046
+ event.stopPropagation();
1047
+ }
1048
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvDropdownItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
1049
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvDropdownItem, isStandalone: true, selector: "button[av-dropdown-item], a[av-dropdown-item]", inputs: { danger: { classPropertyName: "danger", publicName: "danger", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "handleClick($event)" }, properties: { "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.disabled": "disabled() ? \"\" : null", "attr.role": "role()", "attr.tabindex": "disabled() ? -1 : 0", "attr.type": "type()", "class.av-dropdown-item--danger": "danger()", "class.av-dropdown-item--disabled": "disabled()" } }, ngImport: i0, template: "@if (icon()) {\n <span class=\"av-dropdown-item__icon\" av-icon [name]=\"icon()\" size=\"md\"></span>\n}\n\n<span class=\"av-dropdown-item__content\">\n <span class=\"av-dropdown-item__label\">\n <ng-content></ng-content>\n </span>\n\n @if (description()) {\n <span class=\"av-dropdown-item__description\">{{ description() }}</span>\n }\n</span>\n", styles: [":host{align-items:center;background:transparent;border:0;border-radius:var(--av-radius-sm);box-sizing:border-box;color:var(--av-dropdown-text, var(--av-color-text));cursor:pointer;display:flex;font:inherit;gap:.625rem;min-height:2.25rem;min-width:0;padding:.5rem .625rem;text-align:left;text-decoration:none;transition:background-color .16s ease,color .16s ease;width:100%}:host(:hover),:host(:focus-visible){background:var(--av-dropdown-accent-soft, var(--av-color-surface-muted));color:var(--av-dropdown-accent-strong, var(--av-color-text));outline:none}:host(.av-dropdown-item--danger){color:var(--av-red-600, #dc2626)}:host(.av-dropdown-item--danger:hover),:host(.av-dropdown-item--danger:focus-visible){background:color-mix(in srgb,var(--av-red-500, #ef4444) 12%,transparent);color:var(--av-red-700, #b91c1c)}:host(.av-dropdown-item--disabled){cursor:not-allowed;opacity:.52}:host(.av-dropdown-item--disabled:hover),:host(.av-dropdown-item--disabled:focus-visible){background:transparent;color:var(--av-dropdown-text, var(--av-color-text))}.av-dropdown-item__icon{color:currentColor;flex:0 0 auto}.av-dropdown-item__content{display:grid;gap:.125rem;min-width:0}.av-dropdown-item__label{font-size:.875rem;font-weight:700;line-height:1.25;min-width:0}.av-dropdown-item__description{color:var(--av-dropdown-muted, var(--av-color-text-muted));font-size:.75rem;line-height:1.25;min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
1050
+ }
1051
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvDropdownItem, decorators: [{
1052
+ type: Component,
1053
+ args: [{ host: {
1054
+ '[attr.aria-disabled]': 'disabled() ? "true" : null',
1055
+ '[attr.disabled]': 'disabled() ? "" : null',
1056
+ '[attr.role]': 'role()',
1057
+ '[attr.tabindex]': 'disabled() ? -1 : 0',
1058
+ '[attr.type]': 'type()',
1059
+ '[class.av-dropdown-item--danger]': 'danger()',
1060
+ '[class.av-dropdown-item--disabled]': 'disabled()',
1061
+ '(click)': 'handleClick($event)',
1062
+ }, imports: [CommonModule, AvIcon], selector: 'button[av-dropdown-item], a[av-dropdown-item]', standalone: true, template: "@if (icon()) {\n <span class=\"av-dropdown-item__icon\" av-icon [name]=\"icon()\" size=\"md\"></span>\n}\n\n<span class=\"av-dropdown-item__content\">\n <span class=\"av-dropdown-item__label\">\n <ng-content></ng-content>\n </span>\n\n @if (description()) {\n <span class=\"av-dropdown-item__description\">{{ description() }}</span>\n }\n</span>\n", styles: [":host{align-items:center;background:transparent;border:0;border-radius:var(--av-radius-sm);box-sizing:border-box;color:var(--av-dropdown-text, var(--av-color-text));cursor:pointer;display:flex;font:inherit;gap:.625rem;min-height:2.25rem;min-width:0;padding:.5rem .625rem;text-align:left;text-decoration:none;transition:background-color .16s ease,color .16s ease;width:100%}:host(:hover),:host(:focus-visible){background:var(--av-dropdown-accent-soft, var(--av-color-surface-muted));color:var(--av-dropdown-accent-strong, var(--av-color-text));outline:none}:host(.av-dropdown-item--danger){color:var(--av-red-600, #dc2626)}:host(.av-dropdown-item--danger:hover),:host(.av-dropdown-item--danger:focus-visible){background:color-mix(in srgb,var(--av-red-500, #ef4444) 12%,transparent);color:var(--av-red-700, #b91c1c)}:host(.av-dropdown-item--disabled){cursor:not-allowed;opacity:.52}:host(.av-dropdown-item--disabled:hover),:host(.av-dropdown-item--disabled:focus-visible){background:transparent;color:var(--av-dropdown-text, var(--av-color-text))}.av-dropdown-item__icon{color:currentColor;flex:0 0 auto}.av-dropdown-item__content{display:grid;gap:.125rem;min-width:0}.av-dropdown-item__label{font-size:.875rem;font-weight:700;line-height:1.25;min-width:0}.av-dropdown-item__description{color:var(--av-dropdown-muted, var(--av-color-text-muted));font-size:.75rem;line-height:1.25;min-width:0}\n"] }]
1063
+ }], propDecorators: { danger: [{ type: i0.Input, args: [{ isSignal: true, alias: "danger", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
1064
+
1065
+ class AvTextArea {
1066
+ ngControl;
1067
+ config = inject(VISUALS_CONFIG);
1068
+ placeholder = input('', /* @ts-ignore */
1069
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
1070
+ type = input('text', /* @ts-ignore */
1071
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
1072
+ label = input(/* @ts-ignore */
1073
+ ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
1074
+ icon = input(/* @ts-ignore */
1075
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
1076
+ loading = input(false, /* @ts-ignore */
1077
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
1078
+ autoFocus = input(false, /* @ts-ignore */
1079
+ ...(ngDevMode ? [{ debugName: "autoFocus" }] : /* istanbul ignore next */ []));
1080
+ loadingIcon = input('blocks-shuffle-3', /* @ts-ignore */
1081
+ ...(ngDevMode ? [{ debugName: "loadingIcon" }] : /* istanbul ignore next */ []));
1082
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
1083
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1084
+ rounded = input("md", /* @ts-ignore */
1085
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
1086
+ errorMessage = input('', /* @ts-ignore */
1087
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
1088
+ inputEl;
1089
+ value = '';
1090
+ disabled = false;
1091
+ // Funções de callback registradas pelo Angular Forms
1092
+ onChange = () => { };
1093
+ onTouched = () => { };
1094
+ constructor(ngControl) {
1095
+ this.ngControl = ngControl;
1096
+ if (this.ngControl) {
1097
+ this.ngControl.valueAccessor = this;
1098
+ }
1099
+ }
1100
+ ngAfterViewInit() {
1101
+ if (this.autoFocus() && this.inputEl) {
1102
+ setTimeout(() => this.inputEl.nativeElement.focus(), 0);
1103
+ }
1104
+ }
1105
+ get controlClasses() {
1106
+ return [
1107
+ this.isInvalid ? 'av-input__control--invalid' : '',
1108
+ ].filter(Boolean).join(' ');
1109
+ }
1110
+ get isInvalid() {
1111
+ return !!(this.ngControl && this.ngControl.invalid && (this.ngControl.dirty || this.ngControl.touched));
1112
+ }
1113
+ writeValue(value) {
1114
+ this.value = value ?? '';
1115
+ }
1116
+ registerOnChange(fn) {
1117
+ this.onChange = fn;
1118
+ }
1119
+ registerOnTouched(fn) {
1120
+ this.onTouched = fn;
1121
+ }
1122
+ setDisabledState(isDisabled) {
1123
+ this.disabled = isDisabled;
1124
+ }
1125
+ onInput(event) {
1126
+ const target = event.target;
1127
+ this.value = target.value;
1128
+ this.onChange(this.value);
1129
+ }
1130
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTextArea, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1131
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvTextArea, isStandalone: true, selector: "av-text-area", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputRef"], descendants: true }], ngImport: i0, template: "<div class=\"av-text-area\"\n[style.--av-text-area-accent]=\"`var(--av-${variant()}-500)`\"\n[style.--av-text-area-accent-dark]=\"`var(--av-${variant()}-400)`\"\n>\n @if (label()) {\n <label class=\"av-text-area__label\">\n {{ label() }}\n </label>\n }\n\n <div class=\"av-text-area__field\">\n @if (icon() || loading()) {\n <div class=\"av-text-area__icon\">\n <span av-icon [name]=\"loading()? loadingIcon()!: icon()!\"></span>\n </div>\n }\n\n <textarea\n #inputRef\n [value]=\"value\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n class=\"av-text-area__control\"\n [class.av-text-area__control--with-icon]=\"icon()\"\n [class.av-text-area__control--without-icon]=\"!icon()\"\n [ngClass]=\"controlClasses\"\n >\n </textarea>\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-text-area__error\">\n {{ errorMessage() || 'Campo inv\u00E1lido' }}\n </span>\n }\n</div>\n", styles: [".av-text-area{--av-text-area-control-bg: var(--av-color-surface);--av-text-area-color: var(--av-color-text);--av-text-area-muted-color: var(--av-color-text-subtle);--av-text-area-border: var(--av-color-border);--av-text-area-hover-border: var(--av-color-border-hover);--av-text-area-focus-color: var(--av-text-area-accent, var(--av-slate-500));--av-text-area-disabled-bg: var(--av-color-surface-muted);--av-text-area-invalid-color: var(--av-color-danger);--av-text-area-invalid-text: var(--av-color-danger-text);display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-text-area-color)}.av-text-area__label{color:var(--av-text-area-color);font-size:.875rem;font-weight:700;text-align:start}.av-text-area__field{align-items:center;display:flex;position:relative;width:100%}.av-text-area__icon{color:var(--av-text-area-muted-color);display:flex;left:.75rem;pointer-events:none;position:absolute}.av-text-area__control{background-color:var(--av-text-area-control-bg);border:2px solid var(--av-text-area-border);border-radius:var(--av-radius-lg);box-shadow:var(--av-shadow-control);color:var(--av-text-area-color);padding:.5rem 1rem;transition:all .2s ease;width:100%}.av-text-area__control::placeholder{color:var(--av-text-area-muted-color)}.av-text-area__control:hover{border-color:var(--av-text-area-hover-border)}.av-text-area__control:focus{outline:none}.av-text-area__control:disabled{background:var(--av-text-area-disabled-bg);color:var(--av-color-text-muted);opacity:.72;cursor:not-allowed}.av-text-area__control--with-icon{padding-left:2.5rem}.av-text-area__control--without-icon{padding-left:1rem}.av-text-area__control:focus{border-color:var(--av-text-area-focus-color);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-text-area-focus-color);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-text-area-focus-color) 24%,transparent)}.av-text-area__control--invalid,.av-text-area__control--invalid:focus{border-color:var(--av-text-area-invalid-color);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-text-area-invalid-color);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-text-area-invalid-color) 24%,transparent);color:var(--av-text-area-invalid-text);animation:av-text-area-shake .4s ease-in-out}.av-text-area__error{color:var(--av-text-area-invalid-color);font-size:.75rem;font-weight:500}@keyframes av-text-area-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}:host-context([data-av-theme=\"dark\"]) .av-text-area{--av-text-area-focus-color: var(--av-text-area-accent-dark, var(--av-text-area-accent, var(--av-slate-400)))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
1132
+ }
1133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTextArea, decorators: [{
1134
+ type: Component,
1135
+ args: [{ selector: 'av-text-area', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule, AvIcon], template: "<div class=\"av-text-area\"\n[style.--av-text-area-accent]=\"`var(--av-${variant()}-500)`\"\n[style.--av-text-area-accent-dark]=\"`var(--av-${variant()}-400)`\"\n>\n @if (label()) {\n <label class=\"av-text-area__label\">\n {{ label() }}\n </label>\n }\n\n <div class=\"av-text-area__field\">\n @if (icon() || loading()) {\n <div class=\"av-text-area__icon\">\n <span av-icon [name]=\"loading()? loadingIcon()!: icon()!\"></span>\n </div>\n }\n\n <textarea\n #inputRef\n [value]=\"value\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n class=\"av-text-area__control\"\n [class.av-text-area__control--with-icon]=\"icon()\"\n [class.av-text-area__control--without-icon]=\"!icon()\"\n [ngClass]=\"controlClasses\"\n >\n </textarea>\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-text-area__error\">\n {{ errorMessage() || 'Campo inv\u00E1lido' }}\n </span>\n }\n</div>\n", styles: [".av-text-area{--av-text-area-control-bg: var(--av-color-surface);--av-text-area-color: var(--av-color-text);--av-text-area-muted-color: var(--av-color-text-subtle);--av-text-area-border: var(--av-color-border);--av-text-area-hover-border: var(--av-color-border-hover);--av-text-area-focus-color: var(--av-text-area-accent, var(--av-slate-500));--av-text-area-disabled-bg: var(--av-color-surface-muted);--av-text-area-invalid-color: var(--av-color-danger);--av-text-area-invalid-text: var(--av-color-danger-text);display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-text-area-color)}.av-text-area__label{color:var(--av-text-area-color);font-size:.875rem;font-weight:700;text-align:start}.av-text-area__field{align-items:center;display:flex;position:relative;width:100%}.av-text-area__icon{color:var(--av-text-area-muted-color);display:flex;left:.75rem;pointer-events:none;position:absolute}.av-text-area__control{background-color:var(--av-text-area-control-bg);border:2px solid var(--av-text-area-border);border-radius:var(--av-radius-lg);box-shadow:var(--av-shadow-control);color:var(--av-text-area-color);padding:.5rem 1rem;transition:all .2s ease;width:100%}.av-text-area__control::placeholder{color:var(--av-text-area-muted-color)}.av-text-area__control:hover{border-color:var(--av-text-area-hover-border)}.av-text-area__control:focus{outline:none}.av-text-area__control:disabled{background:var(--av-text-area-disabled-bg);color:var(--av-color-text-muted);opacity:.72;cursor:not-allowed}.av-text-area__control--with-icon{padding-left:2.5rem}.av-text-area__control--without-icon{padding-left:1rem}.av-text-area__control:focus{border-color:var(--av-text-area-focus-color);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-text-area-focus-color);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-text-area-focus-color) 24%,transparent)}.av-text-area__control--invalid,.av-text-area__control--invalid:focus{border-color:var(--av-text-area-invalid-color);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-text-area-invalid-color);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-text-area-invalid-color) 24%,transparent);color:var(--av-text-area-invalid-text);animation:av-text-area-shake .4s ease-in-out}.av-text-area__error{color:var(--av-text-area-invalid-color);font-size:.75rem;font-weight:500}@keyframes av-text-area-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}:host-context([data-av-theme=\"dark\"]) .av-text-area{--av-text-area-focus-color: var(--av-text-area-accent-dark, var(--av-text-area-accent, var(--av-slate-400)))}\n"] }]
1136
+ }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
1137
+ type: Optional
1138
+ }, {
1139
+ type: Self
1140
+ }] }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], inputEl: [{
1141
+ type: ViewChild,
1142
+ args: ['inputRef']
1143
+ }] } });
1144
+
1145
+ class AvText {
1146
+ value = input('', /* @ts-ignore */
1147
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
1148
+ animation = input('none', /* @ts-ignore */
1149
+ ...(ngDevMode ? [{ debugName: "animation" }] : /* istanbul ignore next */ []));
1150
+ duration = input(250, /* @ts-ignore */
1151
+ ...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
1152
+ current = signal('', /* @ts-ignore */
1153
+ ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
1154
+ previous = signal(null, /* @ts-ignore */
1155
+ ...(ngDevMode ? [{ debugName: "previous" }] : /* istanbul ignore next */ []));
1156
+ animating = signal(false, /* @ts-ignore */
1157
+ ...(ngDevMode ? [{ debugName: "animating" }] : /* istanbul ignore next */ []));
1158
+ timeout;
1159
+ constructor() {
1160
+ effect(() => {
1161
+ const value = this.value();
1162
+ if (value === this.current()) {
1163
+ return;
1164
+ }
1165
+ this.animateTo(value);
1166
+ });
1167
+ }
1168
+ animateTo(value) {
1169
+ clearTimeout(this.timeout);
1170
+ this.previous.set(this.current());
1171
+ this.current.set(value);
1172
+ this.animating.set(true);
1173
+ this.timeout = setTimeout(() => {
1174
+ this.previous.set(null);
1175
+ this.animating.set(false);
1176
+ }, this.duration());
1177
+ }
1178
+ ngOnDestroy() {
1179
+ clearTimeout(this.timeout);
1180
+ }
1181
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvText, deps: [], target: i0.ɵɵFactoryTarget.Component });
1182
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvText, isStandalone: true, selector: "av-text", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span\n class=\"av-text\"\n [class.av-text--animating]=\"animating()\"\n [class.av-text--fade]=\"animation() === 'fade'\"\n [class.av-text--slide]=\"animation() === 'slide'\"\n [style.--av-text-duration.ms]=\"duration()\"\n>\n <span\n class=\"av-text__measure\"\n aria-hidden=\"true\"\n >\n {{ current() }}\n </span>\n\n @if (previous() !== null) {\n <span class=\"av-text__value av-text__value--old\">\n {{ previous() }}\n </span>\n }\n\n <span class=\"av-text__value av-text__value--new\">\n {{ current() }}\n </span>\n</span>\n", styles: [".av-text{position:relative;display:inline-grid;overflow:hidden;vertical-align:bottom}.av-text__measure{grid-area:1 / 1;visibility:hidden}.av-text__value{grid-area:1 / 1;display:inline-block;transition:transform var(--av-text-duration) cubic-bezier(.2,0,0,1),opacity var(--av-text-duration) ease}.av-text--fade .av-text__value--old{animation:av-text-fade-out var(--av-text-duration) ease forwards}.av-text--fade .av-text__value--new{animation:av-text-fade-in var(--av-text-duration) ease forwards}@keyframes av-text-fade-out{0%{opacity:1}to{opacity:0}}@keyframes av-text-fade-in{0%{opacity:0}to{opacity:1}}.av-text--slide .av-text__value--old{animation:av-text-slide-out var(--av-text-duration) cubic-bezier(.2,0,0,1) forwards}.av-text--slide .av-text__value--new{animation:av-text-slide-in var(--av-text-duration) cubic-bezier(.2,0,0,1) forwards}@keyframes av-text-slide-out{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@keyframes av-text-slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}\n"] });
499
1183
  }
1184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvText, decorators: [{
1185
+ type: Component,
1186
+ args: [{ imports: [], selector: 'av-text', standalone: true, template: "<span\n class=\"av-text\"\n [class.av-text--animating]=\"animating()\"\n [class.av-text--fade]=\"animation() === 'fade'\"\n [class.av-text--slide]=\"animation() === 'slide'\"\n [style.--av-text-duration.ms]=\"duration()\"\n>\n <span\n class=\"av-text__measure\"\n aria-hidden=\"true\"\n >\n {{ current() }}\n </span>\n\n @if (previous() !== null) {\n <span class=\"av-text__value av-text__value--old\">\n {{ previous() }}\n </span>\n }\n\n <span class=\"av-text__value av-text__value--new\">\n {{ current() }}\n </span>\n</span>\n", styles: [".av-text{position:relative;display:inline-grid;overflow:hidden;vertical-align:bottom}.av-text__measure{grid-area:1 / 1;visibility:hidden}.av-text__value{grid-area:1 / 1;display:inline-block;transition:transform var(--av-text-duration) cubic-bezier(.2,0,0,1),opacity var(--av-text-duration) ease}.av-text--fade .av-text__value--old{animation:av-text-fade-out var(--av-text-duration) ease forwards}.av-text--fade .av-text__value--new{animation:av-text-fade-in var(--av-text-duration) ease forwards}@keyframes av-text-fade-out{0%{opacity:1}to{opacity:0}}@keyframes av-text-fade-in{0%{opacity:0}to{opacity:1}}.av-text--slide .av-text__value--old{animation:av-text-slide-out var(--av-text-duration) cubic-bezier(.2,0,0,1) forwards}.av-text--slide .av-text__value--new{animation:av-text-slide-in var(--av-text-duration) cubic-bezier(.2,0,0,1) forwards}@keyframes av-text-slide-out{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@keyframes av-text-slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}\n"] }]
1187
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "animation", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }] } });
1188
+
1189
+ let nextId = 0;
1190
+ class AvFileUpload {
1191
+ config = inject(VISUALS_CONFIG);
1192
+ themeService = inject(ThemeService);
1193
+ fileInput;
1194
+ id = input('', /* @ts-ignore */
1195
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
1196
+ name = input('', /* @ts-ignore */
1197
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
1198
+ label = input('', /* @ts-ignore */
1199
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1200
+ helper = input('', /* @ts-ignore */
1201
+ ...(ngDevMode ? [{ debugName: "helper" }] : /* istanbul ignore next */ []));
1202
+ emptyText = input('Nenhum arquivo selecionado', /* @ts-ignore */
1203
+ ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
1204
+ loadingText = input('Carregando...', /* @ts-ignore */
1205
+ ...(ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []));
1206
+ dropText = input('Solte para anexar', /* @ts-ignore */
1207
+ ...(ngDevMode ? [{ debugName: "dropText" }] : /* istanbul ignore next */ []));
1208
+ browseText = input('Escolher', /* @ts-ignore */
1209
+ ...(ngDevMode ? [{ debugName: "browseText" }] : /* istanbul ignore next */ []));
1210
+ accept = input('', /* @ts-ignore */
1211
+ ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
1212
+ capture = input(undefined, /* @ts-ignore */
1213
+ ...(ngDevMode ? [{ debugName: "capture" }] : /* istanbul ignore next */ []));
1214
+ value = input(null, /* @ts-ignore */
1215
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
1216
+ multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1217
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1218
+ clearable = input(true, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1219
+ showList = input(true, { ...(ngDevMode ? { debugName: "showList" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1220
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
1221
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1222
+ ringColor = input(undefined, /* @ts-ignore */
1223
+ ...(ngDevMode ? [{ debugName: "ringColor" }] : /* istanbul ignore next */ []));
1224
+ rounded = input('lg', /* @ts-ignore */
1225
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
1226
+ errorMessage = input('', /* @ts-ignore */
1227
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
1228
+ valueChange = output();
1229
+ filesChange = output();
1230
+ rejected = output();
1231
+ cleared = output();
1232
+ inputId = `av-file-upload-${++nextId}`;
1233
+ files = signal([], /* @ts-ignore */
1234
+ ...(ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []));
1235
+ dragging = signal(false, /* @ts-ignore */
1236
+ ...(ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []));
1237
+ statusOverride = signal(null, /* @ts-ignore */
1238
+ ...(ngDevMode ? [{ debugName: "statusOverride" }] : /* istanbul ignore next */ []));
1239
+ rejectionMessage = signal('', /* @ts-ignore */
1240
+ ...(ngDevMode ? [{ debugName: "rejectionMessage" }] : /* istanbul ignore next */ []));
1241
+ formDisabled = signal(false, /* @ts-ignore */
1242
+ ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
1243
+ statusTimeout;
1244
+ onChange = () => { };
1245
+ onTouched = () => { };
1246
+ isDisabled = computed(() => this.disabled() || this.formDisabled(), /* @ts-ignore */
1247
+ ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
1248
+ activeVariant = computed(() => this.ringColor() || this.variant(), /* @ts-ignore */
1249
+ ...(ngDevMode ? [{ debugName: "activeVariant" }] : /* istanbul ignore next */ []));
1250
+ displayText = computed(() => {
1251
+ if (this.dragging())
1252
+ return this.dropText();
1253
+ return this.statusOverride() || this.selectedLabel();
1254
+ }, /* @ts-ignore */
1255
+ ...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
1256
+ supportingText = computed(() => {
1257
+ if (this.helper())
1258
+ return this.helper();
1259
+ if (this.accept())
1260
+ return `Aceita: ${this.accept()}`;
1261
+ return this.multiple()
1262
+ ? 'Selecione ou arraste vários arquivos'
1263
+ : 'Selecione ou arraste um arquivo';
1264
+ }, /* @ts-ignore */
1265
+ ...(ngDevMode ? [{ debugName: "supportingText" }] : /* istanbul ignore next */ []));
1266
+ hostId = computed(() => this.id() || this.inputId, /* @ts-ignore */
1267
+ ...(ngDevMode ? [{ debugName: "hostId" }] : /* istanbul ignore next */ []));
1268
+ themeVars = computed(() => {
1269
+ const variant = this.activeVariant();
1270
+ const isDark = this.themeService.dark();
1271
+ const accentStep = isDark ? 400 : 500;
1272
+ return {
1273
+ '--av-file-upload-accent': `var(--av-${variant}-${accentStep})`,
1274
+ '--av-file-upload-accent-soft': isDark
1275
+ ? `color-mix(in srgb, var(--av-${variant}-400) 16%, transparent)`
1276
+ : `color-mix(in srgb, var(--av-${variant}-500) 10%, var(--av-color-surface))`,
1277
+ '--av-file-upload-ring': `color-mix(in srgb, var(--av-${variant}-${accentStep}) 24%, transparent)`,
1278
+ '--av-file-upload-rounded': this.roundedValue(),
1279
+ };
1280
+ }, /* @ts-ignore */
1281
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
1282
+ constructor() {
1283
+ effect(() => {
1284
+ const value = this.value();
1285
+ untracked(() => this.setFiles(this.normalizeInputValue(value), false));
1286
+ });
1287
+ }
1288
+ writeValue(value) {
1289
+ this.setFiles(this.normalizeInputValue(value), false);
1290
+ }
1291
+ registerOnChange(fn) {
1292
+ this.onChange = fn;
1293
+ }
1294
+ registerOnTouched(fn) {
1295
+ this.onTouched = fn;
1296
+ }
1297
+ setDisabledState(disabled) {
1298
+ this.formDisabled.set(disabled);
1299
+ }
1300
+ openPicker(event) {
1301
+ event.preventDefault();
1302
+ if (this.isDisabled())
1303
+ return;
1304
+ this.fileInput?.nativeElement.click();
1305
+ }
1306
+ onNativeChange(event) {
1307
+ const input = event.target;
1308
+ this.handleFileList(input.files);
1309
+ input.value = '';
1310
+ }
1311
+ onDragOver(event) {
1312
+ event.preventDefault();
1313
+ if (this.isDisabled())
1314
+ return;
1315
+ this.dragging.set(true);
1316
+ if (event.dataTransfer) {
1317
+ event.dataTransfer.dropEffect = 'copy';
1318
+ }
1319
+ }
1320
+ onDragLeave() {
1321
+ this.dragging.set(false);
1322
+ }
1323
+ onDrop(event) {
1324
+ event.preventDefault();
1325
+ this.dragging.set(false);
1326
+ if (this.isDisabled())
1327
+ return;
1328
+ this.handleFileList(event.dataTransfer?.files ?? null);
1329
+ }
1330
+ removeFile(fileId) {
1331
+ if (this.isDisabled())
1332
+ return;
1333
+ this.setFiles(this.files().filter((file) => file.id !== fileId), true);
1334
+ this.markTouched();
1335
+ }
1336
+ clear() {
1337
+ if (this.isDisabled())
1338
+ return;
1339
+ this.setFiles([], true);
1340
+ this.cleared.emit();
1341
+ this.markTouched();
1342
+ }
1343
+ markTouched() {
1344
+ this.onTouched();
1345
+ }
1346
+ handleFileList(fileList) {
1347
+ const files = fileList ? Array.from(fileList) : [];
1348
+ this.rejectionMessage.set('');
1349
+ this.statusOverride.set(this.loadingText());
1350
+ clearTimeout(this.statusTimeout);
1351
+ const { accepted, rejections } = this.filterFiles(files);
1352
+ if (rejections.length) {
1353
+ this.rejected.emit(rejections);
1354
+ this.rejectionMessage.set(rejections.length === 1
1355
+ ? rejections[0].message
1356
+ : `${rejections.length} arquivos não correspondem ao filtro permitido.`);
1357
+ }
1358
+ if (accepted.length || !rejections.length) {
1359
+ this.setFiles(this.toEntries(accepted), true);
1360
+ }
1361
+ this.markTouched();
1362
+ this.statusTimeout = setTimeout(() => {
1363
+ this.statusOverride.set(null);
1364
+ }, 260);
1365
+ }
1366
+ setFiles(files, emit) {
1367
+ const nextFiles = this.multiple() ? files : files.slice(0, 1);
1368
+ this.files.set(nextFiles);
1369
+ if (!nextFiles.length) {
1370
+ this.rejectionMessage.set('');
1371
+ }
1372
+ if (emit) {
1373
+ this.onChange(nextFiles);
1374
+ this.valueChange.emit(nextFiles);
1375
+ this.filesChange.emit(nextFiles);
1376
+ }
1377
+ }
1378
+ normalizeInputValue(value) {
1379
+ if (!value)
1380
+ return [];
1381
+ if (this.isFileList(value)) {
1382
+ return this.toEntries(Array.from(value));
1383
+ }
1384
+ if (this.isFile(value)) {
1385
+ return this.toEntries([value]);
1386
+ }
1387
+ if (Array.isArray(value)) {
1388
+ return value.flatMap((item, index) => {
1389
+ if (this.isUploadFile(item))
1390
+ return item;
1391
+ if (this.isFile(item))
1392
+ return [this.toEntry(item, index)];
1393
+ return [];
1394
+ });
1395
+ }
1396
+ if (this.isUploadFile(value)) {
1397
+ return [value];
1398
+ }
1399
+ return [];
1400
+ }
1401
+ filterFiles(files) {
1402
+ const accepted = [];
1403
+ const rejections = [];
1404
+ for (const file of files) {
1405
+ if (this.acceptsFile(file)) {
1406
+ accepted.push(file);
1407
+ }
1408
+ else {
1409
+ rejections.push({
1410
+ file,
1411
+ reason: 'accept',
1412
+ message: `${file.name} não corresponde ao filtro ${this.accept()}.`,
1413
+ });
1414
+ }
1415
+ }
1416
+ return { accepted, rejections };
1417
+ }
1418
+ acceptsFile(file) {
1419
+ const accept = this.accept().trim();
1420
+ if (!accept)
1421
+ return true;
1422
+ return accept.split(',').some((part) => {
1423
+ const rule = part.trim().toLowerCase();
1424
+ const fileName = file.name.toLowerCase();
1425
+ const fileType = file.type.toLowerCase();
1426
+ if (!rule)
1427
+ return true;
1428
+ if (rule.startsWith('.'))
1429
+ return fileName.endsWith(rule);
1430
+ if (rule.endsWith('/*'))
1431
+ return fileType.startsWith(rule.slice(0, -1));
1432
+ return fileType === rule;
1433
+ });
1434
+ }
1435
+ toEntries(files) {
1436
+ return files.map((file, index) => this.toEntry(file, index));
1437
+ }
1438
+ toEntry(file, index) {
1439
+ const extension = file.name.includes('.')
1440
+ ? file.name.split('.').pop()?.toLowerCase() ?? ''
1441
+ : '';
1442
+ return {
1443
+ extension,
1444
+ file,
1445
+ id: `${file.name}-${file.size}-${file.lastModified}-${index}`,
1446
+ lastModified: file.lastModified,
1447
+ name: file.name,
1448
+ readableSize: this.formatBytes(file.size),
1449
+ size: file.size,
1450
+ type: file.type || 'application/octet-stream',
1451
+ };
1452
+ }
1453
+ selectedLabel() {
1454
+ const files = this.files();
1455
+ if (!files.length)
1456
+ return this.emptyText();
1457
+ if (files.length === 1)
1458
+ return files[0].name;
1459
+ return `${files.length} arquivos selecionados`;
1460
+ }
1461
+ formatBytes(bytes) {
1462
+ if (bytes === 0)
1463
+ return '0 B';
1464
+ const units = ['B', 'KB', 'MB', 'GB', 'TB'];
1465
+ const index = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);
1466
+ const value = bytes / 1024 ** index;
1467
+ return `${value.toFixed(value >= 10 || index === 0 ? 0 : 1)} ${units[index]}`;
1468
+ }
1469
+ roundedValue() {
1470
+ const rounded = this.rounded();
1471
+ return typeof rounded === 'string'
1472
+ ? `var(--av-radius-${rounded})`
1473
+ : `${rounded}px`;
1474
+ }
1475
+ isFile(value) {
1476
+ return typeof File !== 'undefined' && value instanceof File;
1477
+ }
1478
+ isFileList(value) {
1479
+ return typeof FileList !== 'undefined' && value instanceof FileList;
1480
+ }
1481
+ isUploadFile(value) {
1482
+ return !!value && typeof value === 'object' && 'file' in value && this.isFile(value.file);
1483
+ }
1484
+ ngOnDestroy() {
1485
+ clearTimeout(this.statusTimeout);
1486
+ }
1487
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvFileUpload, deps: [], target: i0.ɵɵFactoryTarget.Component });
1488
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvFileUpload, isStandalone: true, selector: "av-file-upload", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helper: { classPropertyName: "helper", publicName: "helper", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, dropText: { classPropertyName: "dropText", publicName: "dropText", isSignal: true, isRequired: false, transformFunction: null }, browseText: { classPropertyName: "browseText", publicName: "browseText", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, capture: { classPropertyName: "capture", publicName: "capture", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, showList: { classPropertyName: "showList", publicName: "showList", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ringColor: { classPropertyName: "ringColor", publicName: "ringColor", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", filesChange: "filesChange", rejected: "rejected", cleared: "cleared" }, providers: [
1489
+ {
1490
+ multi: true,
1491
+ provide: NG_VALUE_ACCESSOR,
1492
+ useExisting: forwardRef(() => AvFileUpload),
1493
+ },
1494
+ ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div\n class=\"av-file-upload\"\n [class.av-file-upload--disabled]=\"isDisabled()\"\n [class.av-file-upload--dragging]=\"dragging()\"\n [ngStyle]=\"themeVars()\"\n>\n @if (label()) {\n <label class=\"av-file-upload__label\" [for]=\"hostId()\">\n {{ label() }}\n </label>\n }\n\n <input\n #fileInput\n class=\"av-file-upload__input\"\n type=\"file\"\n [id]=\"hostId()\"\n [attr.name]=\"name() || null\"\n [attr.accept]=\"accept() || null\"\n [attr.capture]=\"capture() || null\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [disabled]=\"isDisabled()\"\n (change)=\"onNativeChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n <label\n class=\"av-file-upload__dropzone\"\n [for]=\"hostId()\"\n [attr.aria-disabled]=\"isDisabled()\"\n tabindex=\"0\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\"\n (keydown.enter)=\"openPicker($event)\"\n (keydown.space)=\"openPicker($event)\"\n >\n <span class=\"av-file-upload__mark\" aria-hidden=\"true\">\n <span class=\"av-file-upload__mark-line\"></span>\n </span>\n\n <span class=\"av-file-upload__content\">\n <span class=\"av-file-upload__headline\">\n <av-text [value]=\"displayText()\" animation=\"slide\" />\n </span>\n\n <span class=\"av-file-upload__helper\">\n <av-text [value]=\"supportingText()\" animation=\"slide\" [duration]=\"180\" />\n </span>\n </span>\n\n <span class=\"av-file-upload__action\">\n {{ browseText() }}\n </span>\n </label>\n\n @if (rejectionMessage() || errorMessage()) {\n <span class=\"av-file-upload__error\">\n {{ rejectionMessage() || errorMessage() }}\n </span>\n }\n\n @if (showList() && files().length) {\n <ul class=\"av-file-upload__list\">\n @for (file of files(); track file.id) {\n <li class=\"av-file-upload__item\">\n <span class=\"av-file-upload__file\">\n <span class=\"av-file-upload__file-name\">{{ file.name }}</span>\n <span class=\"av-file-upload__file-meta\">{{ file.readableSize }} \u00B7 {{ file.extension || file.type }}</span>\n </span>\n\n @if (clearable()) {\n <button\n type=\"button\"\n class=\"av-file-upload__remove\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"'Remover ' + file.name\"\n (click)=\"removeFile(file.id)\"\n >\n \u00D7\n </button>\n }\n </li>\n }\n </ul>\n }\n\n @if (clearable() && files().length > 1) {\n <button\n type=\"button\"\n class=\"av-file-upload__clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\"\n >\n Limpar arquivos\n </button>\n }\n</div>\n", styles: [":host{display:block;width:100%}.av-file-upload{color:var(--av-color-text);display:grid;gap:.35rem;width:100%}.av-file-upload__label{color:var(--av-color-text);font-size:.875rem;font-weight:700}.av-file-upload__input{block-size:1px;inline-size:1px;opacity:0;overflow:hidden;position:absolute}.av-file-upload__dropzone{align-items:center;background:var(--av-color-surface);border:2px dashed var(--av-color-border);border-radius:var(--av-file-upload-rounded);box-shadow:var(--av-shadow-control);cursor:pointer;display:grid;gap:.85rem;grid-template-columns:auto minmax(0,1fr) auto;min-height:5.25rem;padding:1rem;transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease}.av-file-upload__dropzone:hover,.av-file-upload__dropzone:focus-visible,.av-file-upload--dragging .av-file-upload__dropzone{background:var(--av-file-upload-accent-soft);border-color:var(--av-file-upload-accent);box-shadow:var(--av-shadow-control),0 0 0 4px var(--av-file-upload-ring);outline:none}.av-file-upload__mark{background:var(--av-file-upload-accent-soft);border:1px solid color-mix(in srgb,var(--av-file-upload-accent) 28%,transparent);border-radius:var(--av-radius-lg);display:grid;height:2.65rem;place-items:center;position:relative;width:2.65rem}.av-file-upload__mark:before{border:solid var(--av-file-upload-accent);border-width:2px 2px 0 0;content:\"\";height:.62rem;transform:translateY(.12rem) rotate(-45deg);width:.62rem}.av-file-upload__mark-line{background:var(--av-file-upload-accent);border-radius:var(--av-radius-full);height:1rem;position:absolute;width:2px}.av-file-upload__content,.av-file-upload__file{display:grid;gap:.2rem;min-width:0}.av-file-upload__headline{color:var(--av-color-text);font-size:.95rem;font-weight:800;min-width:0}.av-file-upload__helper,.av-file-upload__file-meta{color:var(--av-color-text-muted);font-size:.78rem}.av-file-upload__action{background:var(--av-file-upload-accent);border-radius:var(--av-radius-md);color:var(--av-color-text);font-size:.8125rem;font-weight:800;padding:.48rem .72rem;white-space:nowrap}.av-file-upload__error{color:var(--av-color-danger);font-size:.75rem;font-weight:700}.av-file-upload__list{display:grid;gap:.45rem;list-style:none;margin:.25rem 0 0;padding:0}.av-file-upload__item{align-items:center;background:var(--av-color-surface-muted);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-md);display:flex;gap:.75rem;justify-content:space-between;padding:.62rem .72rem}.av-file-upload__file-name{font-size:.875rem;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-file-upload__remove{background:transparent;border:0;border-radius:var(--av-radius-full);color:var(--av-color-text-muted);cursor:pointer;font-size:1.2rem;height:1.75rem;line-height:1;width:1.75rem}.av-file-upload__remove:hover{background:var(--av-color-danger-soft);color:var(--av-color-danger)}.av-file-upload__clear{justify-self:start;background:transparent;border:0;color:var(--av-file-upload-accent);cursor:pointer;font-weight:800;padding:.2rem 0}.av-file-upload--disabled{opacity:.62}.av-file-upload--disabled .av-file-upload__dropzone,.av-file-upload--disabled .av-file-upload__remove,.av-file-upload--disabled .av-file-upload__clear{cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvText, selector: "av-text", inputs: ["value", "animation", "duration"] }] });
1495
+ }
1496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvFileUpload, decorators: [{
1497
+ type: Component,
1498
+ args: [{ imports: [CommonModule, AvText], providers: [
1499
+ {
1500
+ multi: true,
1501
+ provide: NG_VALUE_ACCESSOR,
1502
+ useExisting: forwardRef(() => AvFileUpload),
1503
+ },
1504
+ ], selector: 'av-file-upload', standalone: true, template: "<div\n class=\"av-file-upload\"\n [class.av-file-upload--disabled]=\"isDisabled()\"\n [class.av-file-upload--dragging]=\"dragging()\"\n [ngStyle]=\"themeVars()\"\n>\n @if (label()) {\n <label class=\"av-file-upload__label\" [for]=\"hostId()\">\n {{ label() }}\n </label>\n }\n\n <input\n #fileInput\n class=\"av-file-upload__input\"\n type=\"file\"\n [id]=\"hostId()\"\n [attr.name]=\"name() || null\"\n [attr.accept]=\"accept() || null\"\n [attr.capture]=\"capture() || null\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [disabled]=\"isDisabled()\"\n (change)=\"onNativeChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n <label\n class=\"av-file-upload__dropzone\"\n [for]=\"hostId()\"\n [attr.aria-disabled]=\"isDisabled()\"\n tabindex=\"0\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\"\n (keydown.enter)=\"openPicker($event)\"\n (keydown.space)=\"openPicker($event)\"\n >\n <span class=\"av-file-upload__mark\" aria-hidden=\"true\">\n <span class=\"av-file-upload__mark-line\"></span>\n </span>\n\n <span class=\"av-file-upload__content\">\n <span class=\"av-file-upload__headline\">\n <av-text [value]=\"displayText()\" animation=\"slide\" />\n </span>\n\n <span class=\"av-file-upload__helper\">\n <av-text [value]=\"supportingText()\" animation=\"slide\" [duration]=\"180\" />\n </span>\n </span>\n\n <span class=\"av-file-upload__action\">\n {{ browseText() }}\n </span>\n </label>\n\n @if (rejectionMessage() || errorMessage()) {\n <span class=\"av-file-upload__error\">\n {{ rejectionMessage() || errorMessage() }}\n </span>\n }\n\n @if (showList() && files().length) {\n <ul class=\"av-file-upload__list\">\n @for (file of files(); track file.id) {\n <li class=\"av-file-upload__item\">\n <span class=\"av-file-upload__file\">\n <span class=\"av-file-upload__file-name\">{{ file.name }}</span>\n <span class=\"av-file-upload__file-meta\">{{ file.readableSize }} \u00B7 {{ file.extension || file.type }}</span>\n </span>\n\n @if (clearable()) {\n <button\n type=\"button\"\n class=\"av-file-upload__remove\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"'Remover ' + file.name\"\n (click)=\"removeFile(file.id)\"\n >\n \u00D7\n </button>\n }\n </li>\n }\n </ul>\n }\n\n @if (clearable() && files().length > 1) {\n <button\n type=\"button\"\n class=\"av-file-upload__clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\"\n >\n Limpar arquivos\n </button>\n }\n</div>\n", styles: [":host{display:block;width:100%}.av-file-upload{color:var(--av-color-text);display:grid;gap:.35rem;width:100%}.av-file-upload__label{color:var(--av-color-text);font-size:.875rem;font-weight:700}.av-file-upload__input{block-size:1px;inline-size:1px;opacity:0;overflow:hidden;position:absolute}.av-file-upload__dropzone{align-items:center;background:var(--av-color-surface);border:2px dashed var(--av-color-border);border-radius:var(--av-file-upload-rounded);box-shadow:var(--av-shadow-control);cursor:pointer;display:grid;gap:.85rem;grid-template-columns:auto minmax(0,1fr) auto;min-height:5.25rem;padding:1rem;transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease}.av-file-upload__dropzone:hover,.av-file-upload__dropzone:focus-visible,.av-file-upload--dragging .av-file-upload__dropzone{background:var(--av-file-upload-accent-soft);border-color:var(--av-file-upload-accent);box-shadow:var(--av-shadow-control),0 0 0 4px var(--av-file-upload-ring);outline:none}.av-file-upload__mark{background:var(--av-file-upload-accent-soft);border:1px solid color-mix(in srgb,var(--av-file-upload-accent) 28%,transparent);border-radius:var(--av-radius-lg);display:grid;height:2.65rem;place-items:center;position:relative;width:2.65rem}.av-file-upload__mark:before{border:solid var(--av-file-upload-accent);border-width:2px 2px 0 0;content:\"\";height:.62rem;transform:translateY(.12rem) rotate(-45deg);width:.62rem}.av-file-upload__mark-line{background:var(--av-file-upload-accent);border-radius:var(--av-radius-full);height:1rem;position:absolute;width:2px}.av-file-upload__content,.av-file-upload__file{display:grid;gap:.2rem;min-width:0}.av-file-upload__headline{color:var(--av-color-text);font-size:.95rem;font-weight:800;min-width:0}.av-file-upload__helper,.av-file-upload__file-meta{color:var(--av-color-text-muted);font-size:.78rem}.av-file-upload__action{background:var(--av-file-upload-accent);border-radius:var(--av-radius-md);color:var(--av-color-text);font-size:.8125rem;font-weight:800;padding:.48rem .72rem;white-space:nowrap}.av-file-upload__error{color:var(--av-color-danger);font-size:.75rem;font-weight:700}.av-file-upload__list{display:grid;gap:.45rem;list-style:none;margin:.25rem 0 0;padding:0}.av-file-upload__item{align-items:center;background:var(--av-color-surface-muted);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-md);display:flex;gap:.75rem;justify-content:space-between;padding:.62rem .72rem}.av-file-upload__file-name{font-size:.875rem;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-file-upload__remove{background:transparent;border:0;border-radius:var(--av-radius-full);color:var(--av-color-text-muted);cursor:pointer;font-size:1.2rem;height:1.75rem;line-height:1;width:1.75rem}.av-file-upload__remove:hover{background:var(--av-color-danger-soft);color:var(--av-color-danger)}.av-file-upload__clear{justify-self:start;background:transparent;border:0;color:var(--av-file-upload-accent);cursor:pointer;font-weight:800;padding:.2rem 0}.av-file-upload--disabled{opacity:.62}.av-file-upload--disabled .av-file-upload__dropzone,.av-file-upload--disabled .av-file-upload__remove,.av-file-upload--disabled .av-file-upload__clear{cursor:not-allowed}\n"] }]
1505
+ }], ctorParameters: () => [], propDecorators: { fileInput: [{
1506
+ type: ViewChild,
1507
+ args: ['fileInput']
1508
+ }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], helper: [{ type: i0.Input, args: [{ isSignal: true, alias: "helper", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], dropText: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropText", required: false }] }], browseText: [{ type: i0.Input, args: [{ isSignal: true, alias: "browseText", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], capture: [{ type: i0.Input, args: [{ isSignal: true, alias: "capture", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], showList: [{ type: i0.Input, args: [{ isSignal: true, alias: "showList", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], ringColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "ringColor", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], filesChange: [{ type: i0.Output, args: ["filesChange"] }], rejected: [{ type: i0.Output, args: ["rejected"] }], cleared: [{ type: i0.Output, args: ["cleared"] }] } });
1509
+
1510
+ class AvSwitch {
1511
+ config = inject(VISUALS_CONFIG);
1512
+ themeService = inject(ThemeService);
1513
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
1514
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1515
+ rounded = input('md', /* @ts-ignore */
1516
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
1517
+ checked = model(false, /* @ts-ignore */
1518
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
1519
+ disabled = input(false, /* @ts-ignore */
1520
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
1521
+ // Disabled vindo do Angular Forms
1522
+ formDisabled = false;
1523
+ isDisabled = computed(() => this.disabled() || this.formDisabled, /* @ts-ignore */
1524
+ ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
1525
+ themeVars = computed(() => {
1526
+ const variant = this.variant();
1527
+ const isDark = this.themeService.dark();
1528
+ return {
1529
+ '--av-switch-active-bg': `var(--av-${variant}-${isDark ? 400 : 500})`,
1530
+ '--av-switch-rounded': typeof this.rounded() === 'string'
1531
+ ? `var(--av-radius-${this.rounded()})`
1532
+ : `${this.rounded()}px`
1533
+ };
1534
+ }, /* @ts-ignore */
1535
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
1536
+ // --------------------------------
1537
+ // ControlValueAccessor
1538
+ // --------------------------------
1539
+ onChange = () => { };
1540
+ onTouched = () => { };
1541
+ writeValue(value) {
1542
+ this.checked.set(value ?? false);
1543
+ }
1544
+ registerOnChange(fn) {
1545
+ this.onChange = fn;
1546
+ }
1547
+ registerOnTouched(fn) {
1548
+ this.onTouched = fn;
1549
+ }
1550
+ setDisabledState(disabled) {
1551
+ this.formDisabled = disabled;
1552
+ }
1553
+ // --------------------------------
1554
+ // Interaction
1555
+ // --------------------------------
1556
+ toggle() {
1557
+ if (this.isDisabled())
1558
+ return;
1559
+ const value = !this.checked();
1560
+ this.checked.set(value);
1561
+ this.onChange(value);
1562
+ this.onTouched();
1563
+ }
1564
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
1565
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvSwitch, isStandalone: true, selector: "av-switch", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
1566
+ {
1567
+ provide: NG_VALUE_ACCESSOR,
1568
+ useExisting: forwardRef(() => AvSwitch),
1569
+ multi: true
1570
+ }
1571
+ ], ngImport: i0, template: "<button\n type=\"button\"\n class=\"av-switch\"\n [ngStyle]=\"themeVars()\"\n [attr.aria-checked]=\"checked()\"\n [attr.data-checked]=\"checked()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\"\n>\n <div class=\"av-switch-thumb\"></div>\n</button>\n", styles: [".av-switch{--av-switch-width: 40px;--av-switch-height: 22px;--av-switch-padding: 2px;--av-switch-thumb-size: 18px;display:inline-flex;position:relative;width:var(--av-switch-width);height:var(--av-switch-height);padding:var(--av-switch-padding);align-items:center;border:none;border-radius:var(--av-switch-rounded);background-color:var(--av-color-surface-muted);cursor:pointer;transition:background-color .18s ease,box-shadow .18s ease}.av-switch-thumb{width:var(--av-switch-thumb-size);height:var(--av-switch-thumb-size);border-radius:var(--av-switch-rounded);background-color:var(--av-white);box-shadow:0 1px 3px #00000040;transform:translate(0);transition:transform .18s cubic-bezier(.2,0,0,1),background-color .18s ease}.av-switch[data-checked=true]{background-color:var(--av-switch-active-bg)}.av-switch[data-checked=true] .av-switch-thumb{transform:translate(calc(var(--av-switch-width) - var(--av-switch-thumb-size) - var(--av-switch-padding) * 2))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
1572
+ }
1573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvSwitch, decorators: [{
1574
+ type: Component,
1575
+ args: [{ selector: 'av-switch', imports: [CommonModule], providers: [
1576
+ {
1577
+ provide: NG_VALUE_ACCESSOR,
1578
+ useExisting: forwardRef(() => AvSwitch),
1579
+ multi: true
1580
+ }
1581
+ ], template: "<button\n type=\"button\"\n class=\"av-switch\"\n [ngStyle]=\"themeVars()\"\n [attr.aria-checked]=\"checked()\"\n [attr.data-checked]=\"checked()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\"\n>\n <div class=\"av-switch-thumb\"></div>\n</button>\n", styles: [".av-switch{--av-switch-width: 40px;--av-switch-height: 22px;--av-switch-padding: 2px;--av-switch-thumb-size: 18px;display:inline-flex;position:relative;width:var(--av-switch-width);height:var(--av-switch-height);padding:var(--av-switch-padding);align-items:center;border:none;border-radius:var(--av-switch-rounded);background-color:var(--av-color-surface-muted);cursor:pointer;transition:background-color .18s ease,box-shadow .18s ease}.av-switch-thumb{width:var(--av-switch-thumb-size);height:var(--av-switch-thumb-size);border-radius:var(--av-switch-rounded);background-color:var(--av-white);box-shadow:0 1px 3px #00000040;transform:translate(0);transition:transform .18s cubic-bezier(.2,0,0,1),background-color .18s ease}.av-switch[data-checked=true]{background-color:var(--av-switch-active-bg)}.av-switch[data-checked=true] .av-switch-thumb{transform:translate(calc(var(--av-switch-width) - var(--av-switch-thumb-size) - var(--av-switch-padding) * 2))}\n"] }]
1582
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
1583
+
1584
+ class AvSlider {
1585
+ config = inject(VISUALS_CONFIG);
1586
+ themeService = inject(ThemeService);
1587
+ label = input('', /* @ts-ignore */
1588
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1589
+ value = input(null, /* @ts-ignore */
1590
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
1591
+ min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute });
1592
+ max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
1593
+ step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
1594
+ range = input(false, { ...(ngDevMode ? { debugName: "range" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1595
+ thumbLabel = input(true, { ...(ngDevMode ? { debugName: "thumbLabel" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1596
+ showValue = input(false, { ...(ngDevMode ? { debugName: "showValue" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1597
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1598
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
1599
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1600
+ ringColor = input(undefined, /* @ts-ignore */
1601
+ ...(ngDevMode ? [{ debugName: "ringColor" }] : /* istanbul ignore next */ []));
1602
+ rounded = input('full', /* @ts-ignore */
1603
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
1604
+ valuePrefix = input('', /* @ts-ignore */
1605
+ ...(ngDevMode ? [{ debugName: "valuePrefix" }] : /* istanbul ignore next */ []));
1606
+ valueSuffix = input('', /* @ts-ignore */
1607
+ ...(ngDevMode ? [{ debugName: "valueSuffix" }] : /* istanbul ignore next */ []));
1608
+ displayWith = input(undefined, /* @ts-ignore */
1609
+ ...(ngDevMode ? [{ debugName: "displayWith" }] : /* istanbul ignore next */ []));
1610
+ ariaLabel = input('Slider', /* @ts-ignore */
1611
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
1612
+ lowerAriaLabel = input('Valor inicial', /* @ts-ignore */
1613
+ ...(ngDevMode ? [{ debugName: "lowerAriaLabel" }] : /* istanbul ignore next */ []));
1614
+ upperAriaLabel = input('Valor final', /* @ts-ignore */
1615
+ ...(ngDevMode ? [{ debugName: "upperAriaLabel" }] : /* istanbul ignore next */ []));
1616
+ valueChange = output();
1617
+ changed = output();
1618
+ lowerValue = signal(50, /* @ts-ignore */
1619
+ ...(ngDevMode ? [{ debugName: "lowerValue" }] : /* istanbul ignore next */ []));
1620
+ upperValue = signal(100, /* @ts-ignore */
1621
+ ...(ngDevMode ? [{ debugName: "upperValue" }] : /* istanbul ignore next */ []));
1622
+ formDisabled = signal(false, /* @ts-ignore */
1623
+ ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
1624
+ activeThumb = signal('lower', /* @ts-ignore */
1625
+ ...(ngDevMode ? [{ debugName: "activeThumb" }] : /* istanbul ignore next */ []));
1626
+ isDisabled = computed(() => this.disabled() || this.formDisabled(), /* @ts-ignore */
1627
+ ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
1628
+ safeMin = computed(() => this.coerceNumber(this.min(), 0), /* @ts-ignore */
1629
+ ...(ngDevMode ? [{ debugName: "safeMin" }] : /* istanbul ignore next */ []));
1630
+ safeMax = computed(() => {
1631
+ const min = this.safeMin();
1632
+ const max = this.coerceNumber(this.max(), min + 100);
1633
+ return max > min ? max : min + 1;
1634
+ }, /* @ts-ignore */
1635
+ ...(ngDevMode ? [{ debugName: "safeMax" }] : /* istanbul ignore next */ []));
1636
+ safeStep = computed(() => {
1637
+ const step = this.coerceNumber(this.step(), 1);
1638
+ return step > 0 ? step : 1;
1639
+ }, /* @ts-ignore */
1640
+ ...(ngDevMode ? [{ debugName: "safeStep" }] : /* istanbul ignore next */ []));
1641
+ roundedStyle = computed(() => {
1642
+ const rounded = this.rounded();
1643
+ return typeof rounded === 'string'
1644
+ ? `var(--av-radius-${rounded})`
1645
+ : `${rounded}px`;
1646
+ }, /* @ts-ignore */
1647
+ ...(ngDevMode ? [{ debugName: "roundedStyle" }] : /* istanbul ignore next */ []));
1648
+ activeVariant = computed(() => this.ringColor() || this.variant(), /* @ts-ignore */
1649
+ ...(ngDevMode ? [{ debugName: "activeVariant" }] : /* istanbul ignore next */ []));
1650
+ lowerPercent = computed(() => this.toPercent(this.lowerValue()), /* @ts-ignore */
1651
+ ...(ngDevMode ? [{ debugName: "lowerPercent" }] : /* istanbul ignore next */ []));
1652
+ upperPercent = computed(() => this.range() ? this.toPercent(this.upperValue()) : this.lowerPercent(), /* @ts-ignore */
1653
+ ...(ngDevMode ? [{ debugName: "upperPercent" }] : /* istanbul ignore next */ []));
1654
+ fillLeft = computed(() => this.range() ? Math.min(this.lowerPercent(), this.upperPercent()) : 0, /* @ts-ignore */
1655
+ ...(ngDevMode ? [{ debugName: "fillLeft" }] : /* istanbul ignore next */ []));
1656
+ fillWidth = computed(() => this.range()
1657
+ ? Math.abs(this.upperPercent() - this.lowerPercent())
1658
+ : this.lowerPercent(), /* @ts-ignore */
1659
+ ...(ngDevMode ? [{ debugName: "fillWidth" }] : /* istanbul ignore next */ []));
1660
+ displayValue = computed(() => {
1661
+ if (this.range()) {
1662
+ return `${this.formatValue(this.lowerValue())} - ${this.formatValue(this.upperValue())}`;
1663
+ }
1664
+ return this.formatValue(this.lowerValue());
1665
+ }, /* @ts-ignore */
1666
+ ...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
1667
+ themeVars = computed(() => {
1668
+ const variant = this.activeVariant();
1669
+ const isDark = this.themeService.dark();
1670
+ const accentStep = isDark ? 400 : 500;
1671
+ const strongStep = isDark ? 300 : 600;
1672
+ return {
1673
+ '--av-slider-accent': `var(--av-${variant}-${accentStep})`,
1674
+ '--av-slider-accent-strong': `var(--av-${variant}-${strongStep})`,
1675
+ '--av-slider-focus-ring': `color-mix(in srgb, var(--av-${variant}-${accentStep}) 26%, transparent)`,
1676
+ '--av-slider-track': isDark
1677
+ ? `color-mix(in srgb, var(--av-${variant}-400) 14%, var(--av-color-surface-muted))`
1678
+ : `color-mix(in srgb, var(--av-${variant}-500) 12%, var(--av-color-surface-muted))`,
1679
+ '--av-slider-rounded': this.roundedStyle(),
1680
+ };
1681
+ }, /* @ts-ignore */
1682
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
1683
+ onChange = () => { };
1684
+ onTouched = () => { };
1685
+ constructor() {
1686
+ effect(() => {
1687
+ this.syncExternalValue(this.value(), this.range(), this.safeMin(), this.safeMax(), this.safeStep());
1688
+ });
1689
+ }
1690
+ writeValue(value) {
1691
+ this.syncExternalValue(value, this.range(), this.safeMin(), this.safeMax(), this.safeStep());
1692
+ }
1693
+ registerOnChange(fn) {
1694
+ this.onChange = fn;
1695
+ }
1696
+ registerOnTouched(fn) {
1697
+ this.onTouched = fn;
1698
+ }
1699
+ setDisabledState(disabled) {
1700
+ this.formDisabled.set(disabled);
1701
+ }
1702
+ onInput(thumb, event) {
1703
+ const target = event.target;
1704
+ this.activeThumb.set(thumb);
1705
+ this.setThumbValue(thumb, target.value, true);
1706
+ }
1707
+ onTrackPointerDown(event) {
1708
+ if (this.isDisabled())
1709
+ return;
1710
+ const target = event.currentTarget;
1711
+ const bounds = target.getBoundingClientRect();
1712
+ const ratio = bounds.width <= 0
1713
+ ? 0
1714
+ : (event.clientX - bounds.left) / bounds.width;
1715
+ const value = this.safeMin() + this.clamp(ratio, 0, 1) * (this.safeMax() - this.safeMin());
1716
+ const thumb = this.closestThumb(value);
1717
+ this.activeThumb.set(thumb);
1718
+ this.setThumbValue(thumb, value, true);
1719
+ this.markTouched();
1720
+ }
1721
+ markTouched() {
1722
+ this.onTouched();
1723
+ }
1724
+ formatValue(value) {
1725
+ const displayWith = this.displayWith();
1726
+ if (displayWith) {
1727
+ return displayWith(value);
1728
+ }
1729
+ return `${this.valuePrefix()}${this.trimValue(value)}${this.valueSuffix()}`;
1730
+ }
1731
+ syncExternalValue(value, range, min, max, step) {
1732
+ if (range) {
1733
+ const [lower, upper] = this.coerceRangeValue(value, min, max, step);
1734
+ this.lowerValue.set(lower);
1735
+ this.upperValue.set(upper);
1736
+ return;
1737
+ }
1738
+ const nextValue = this.coerceSingleValue(value, min, max, step);
1739
+ this.lowerValue.set(nextValue);
1740
+ this.upperValue.set(nextValue);
1741
+ }
1742
+ setThumbValue(thumb, value, emit) {
1743
+ const nextValue = this.normalizeValue(value);
1744
+ if (this.range()) {
1745
+ if (thumb === 'lower') {
1746
+ this.lowerValue.set(Math.min(nextValue, this.upperValue()));
1747
+ }
1748
+ else {
1749
+ this.upperValue.set(Math.max(nextValue, this.lowerValue()));
1750
+ }
1751
+ }
1752
+ else {
1753
+ this.lowerValue.set(nextValue);
1754
+ this.upperValue.set(nextValue);
1755
+ }
1756
+ if (emit) {
1757
+ this.emitValue();
1758
+ }
1759
+ }
1760
+ emitValue() {
1761
+ const value = this.range()
1762
+ ? [this.lowerValue(), this.upperValue()]
1763
+ : this.lowerValue();
1764
+ this.onChange(value);
1765
+ this.valueChange.emit(value);
1766
+ this.changed.emit(value);
1767
+ }
1768
+ closestThumb(value) {
1769
+ if (!this.range())
1770
+ return 'lower';
1771
+ const lowerDistance = Math.abs(value - this.lowerValue());
1772
+ const upperDistance = Math.abs(value - this.upperValue());
1773
+ return lowerDistance <= upperDistance ? 'lower' : 'upper';
1774
+ }
1775
+ coerceSingleValue(value, min, max, step) {
1776
+ if (Array.isArray(value)) {
1777
+ return this.normalizeValue(value[0], min, max, step);
1778
+ }
1779
+ if (typeof value === 'string' && value.includes(',')) {
1780
+ return this.normalizeValue(value.split(',')[0], min, max, step);
1781
+ }
1782
+ if (value === null || value === undefined) {
1783
+ return this.normalizeValue(min + (max - min) / 2, min, max, step);
1784
+ }
1785
+ return this.normalizeValue(value, min, max, step);
1786
+ }
1787
+ coerceRangeValue(value, min, max, step) {
1788
+ let lower = min;
1789
+ let upper = max;
1790
+ if (Array.isArray(value)) {
1791
+ [lower, upper] = value;
1792
+ }
1793
+ else if (typeof value === 'string' && value.includes(',')) {
1794
+ [lower, upper] = value.split(',');
1795
+ }
1796
+ else if (value !== null && value !== undefined) {
1797
+ lower = value;
1798
+ }
1799
+ const normalizedLower = this.normalizeValue(lower, min, max, step);
1800
+ const normalizedUpper = this.normalizeValue(upper, min, max, step);
1801
+ return normalizedLower <= normalizedUpper
1802
+ ? [normalizedLower, normalizedUpper]
1803
+ : [normalizedUpper, normalizedLower];
1804
+ }
1805
+ normalizeValue(value, min = this.safeMin(), max = this.safeMax(), step = this.safeStep()) {
1806
+ const numeric = this.coerceNumber(value, min);
1807
+ const clamped = this.clamp(numeric, min, max);
1808
+ const steps = Math.round((clamped - min) / step);
1809
+ const stepped = min + steps * step;
1810
+ const precision = this.stepPrecision(step);
1811
+ return this.clamp(Number(stepped.toFixed(precision)), min, max);
1812
+ }
1813
+ toPercent(value) {
1814
+ const min = this.safeMin();
1815
+ const max = this.safeMax();
1816
+ return ((this.clamp(value, min, max) - min) / (max - min)) * 100;
1817
+ }
1818
+ coerceNumber(value, fallback) {
1819
+ const numeric = Number(value);
1820
+ return Number.isFinite(numeric) ? numeric : fallback;
1821
+ }
1822
+ clamp(value, min, max) {
1823
+ return Math.min(max, Math.max(min, value));
1824
+ }
1825
+ stepPrecision(step) {
1826
+ const [, decimals = ''] = String(step).split('.');
1827
+ return decimals.length;
1828
+ }
1829
+ trimValue(value) {
1830
+ return Number.isInteger(value)
1831
+ ? String(value)
1832
+ : String(Number(value.toFixed(4)));
1833
+ }
1834
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvSlider, deps: [], target: i0.ɵɵFactoryTarget.Component });
1835
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvSlider, isStandalone: true, selector: "av-slider, lib-av-slider", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, range: { classPropertyName: "range", publicName: "range", isSignal: true, isRequired: false, transformFunction: null }, thumbLabel: { classPropertyName: "thumbLabel", publicName: "thumbLabel", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ringColor: { classPropertyName: "ringColor", publicName: "ringColor", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, valuePrefix: { classPropertyName: "valuePrefix", publicName: "valuePrefix", isSignal: true, isRequired: false, transformFunction: null }, valueSuffix: { classPropertyName: "valueSuffix", publicName: "valueSuffix", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, lowerAriaLabel: { classPropertyName: "lowerAriaLabel", publicName: "lowerAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, upperAriaLabel: { classPropertyName: "upperAriaLabel", publicName: "upperAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", changed: "changed" }, providers: [
1836
+ {
1837
+ multi: true,
1838
+ provide: NG_VALUE_ACCESSOR,
1839
+ useExisting: forwardRef(() => AvSlider),
1840
+ },
1841
+ ], ngImport: i0, template: "<div\n class=\"av-slider\"\n [class.av-slider--disabled]=\"isDisabled()\"\n [ngStyle]=\"themeVars()\"\n>\n @if (label() || showValue()) {\n <div class=\"av-slider__header\">\n @if (label()) {\n <label class=\"av-slider__label\">{{ label() }}</label>\n }\n\n @if (showValue()) {\n <span class=\"av-slider__value\">{{ displayValue() }}</span>\n }\n </div>\n }\n\n <div class=\"av-slider__track\" (pointerdown)=\"onTrackPointerDown($event)\">\n <span class=\"av-slider__rail\"></span>\n <span\n class=\"av-slider__fill\"\n [style.left.%]=\"fillLeft()\"\n [style.width.%]=\"fillWidth()\"\n ></span>\n\n <input\n class=\"av-slider__native av-slider__native--lower\"\n type=\"range\"\n [attr.aria-label]=\"range() ? lowerAriaLabel() : ariaLabel()\"\n [attr.aria-valuetext]=\"formatValue(lowerValue())\"\n [disabled]=\"isDisabled()\"\n [max]=\"safeMax()\"\n [min]=\"safeMin()\"\n [step]=\"safeStep()\"\n [value]=\"lowerValue()\"\n (blur)=\"markTouched()\"\n (change)=\"markTouched()\"\n (focus)=\"activeThumb.set('lower')\"\n (input)=\"onInput('lower', $event)\"\n />\n\n @if (range()) {\n <input\n class=\"av-slider__native av-slider__native--upper\"\n type=\"range\"\n [attr.aria-label]=\"upperAriaLabel()\"\n [attr.aria-valuetext]=\"formatValue(upperValue())\"\n [disabled]=\"isDisabled()\"\n [max]=\"safeMax()\"\n [min]=\"safeMin()\"\n [step]=\"safeStep()\"\n [value]=\"upperValue()\"\n (blur)=\"markTouched()\"\n (change)=\"markTouched()\"\n (focus)=\"activeThumb.set('upper')\"\n (input)=\"onInput('upper', $event)\"\n />\n }\n\n <span\n class=\"av-slider__thumb av-slider__thumb--lower\"\n [class.av-slider__thumb--active]=\"activeThumb() === 'lower'\"\n [style.left.%]=\"lowerPercent()\"\n >\n @if (thumbLabel()) {\n <span class=\"av-slider__bubble\">{{ formatValue(lowerValue()) }}</span>\n }\n </span>\n\n @if (range()) {\n <span\n class=\"av-slider__thumb av-slider__thumb--upper\"\n [class.av-slider__thumb--active]=\"activeThumb() === 'upper'\"\n [style.left.%]=\"upperPercent()\"\n >\n @if (thumbLabel()) {\n <span class=\"av-slider__bubble\">{{ formatValue(upperValue()) }}</span>\n }\n </span>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:100%}.av-slider{--av-slider-track-height: 6px;--av-slider-hit-size: 34px;--av-slider-thumb-size: 20px;--av-slider-thumb-border: var(--av-color-surface);--av-slider-bubble-bg: var(--av-color-surface-raised);--av-slider-bubble-border: var(--av-color-border-soft);--av-slider-bubble-color: var(--av-color-text-muted);color:var(--av-color-text);display:flex;flex-direction:column;gap:.65rem;width:100%}.av-slider__header{align-items:center;display:flex;gap:.75rem;justify-content:space-between}.av-slider__label{color:var(--av-color-text);font-size:.875rem;font-weight:700}.av-slider__value{color:var(--av-color-text-muted);font-size:.8125rem;font-weight:700;white-space:nowrap}.av-slider__track{cursor:pointer;height:var(--av-slider-hit-size);margin-top:1.45rem;position:relative;touch-action:none;width:100%}.av-slider__rail,.av-slider__fill{border-radius:var(--av-slider-rounded);height:var(--av-slider-track-height);left:0;position:absolute;top:50%;transform:translateY(-50%)}.av-slider__rail{background:var(--av-slider-track);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--av-color-border-soft) 55%,transparent);right:0}.av-slider__fill{background:linear-gradient(90deg,var(--av-slider-accent),var(--av-slider-accent-strong));box-shadow:0 0 0 1px color-mix(in srgb,var(--av-slider-accent) 16%,transparent);transition:left .12s ease,width .12s ease}.av-slider__thumb{background:var(--av-slider-accent);border:3px solid var(--av-slider-thumb-border);border-radius:var(--av-radius-full);box-shadow:var(--av-shadow-control),0 6px 14px color-mix(in srgb,var(--av-slider-accent) 25%,transparent);height:var(--av-slider-thumb-size);pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);transition:box-shadow .16s ease,transform .16s ease;width:var(--av-slider-thumb-size);z-index:3}.av-slider__thumb--active{box-shadow:var(--av-shadow-control),0 0 0 5px var(--av-slider-focus-ring),0 9px 18px color-mix(in srgb,var(--av-slider-accent) 28%,transparent);transform:translate(-50%,-50%) scale(1.04)}.av-slider__bubble{background:var(--av-slider-bubble-bg);border:1px solid var(--av-slider-bubble-border);border-radius:var(--av-radius-md);bottom:calc(100% + .6rem);box-shadow:var(--av-shadow-raised);color:var(--av-slider-bubble-color);font-size:.8125rem;font-weight:800;left:50%;line-height:1;min-width:2.9rem;padding:.48rem .62rem;position:absolute;text-align:center;transform:translate(-50%);white-space:nowrap}.av-slider__bubble:after{background:inherit;border-bottom:1px solid var(--av-slider-bubble-border);border-right:1px solid var(--av-slider-bubble-border);bottom:-.27rem;content:\"\";height:.52rem;left:50%;position:absolute;transform:translate(-50%) rotate(45deg);width:.52rem}.av-slider__native{-webkit-appearance:none;appearance:none;background:transparent;cursor:pointer;height:var(--av-slider-hit-size);inset:0;margin:0;opacity:0;pointer-events:none;position:absolute;width:100%;z-index:4}.av-slider__native:focus{outline:none}.av-slider__native::-webkit-slider-runnable-track{background:transparent;border:0;height:var(--av-slider-hit-size)}.av-slider__native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;height:var(--av-slider-thumb-size);pointer-events:auto;width:var(--av-slider-thumb-size)}.av-slider__native::-moz-range-track{background:transparent;border:0;height:var(--av-slider-hit-size)}.av-slider__native::-moz-range-thumb{background:transparent;border:0;height:var(--av-slider-thumb-size);pointer-events:auto;width:var(--av-slider-thumb-size)}.av-slider__native--lower:focus-visible~.av-slider__thumb--lower,.av-slider__native--upper:focus-visible~.av-slider__thumb--upper{box-shadow:var(--av-shadow-control),0 0 0 5px var(--av-slider-focus-ring),0 9px 18px color-mix(in srgb,var(--av-slider-accent) 28%,transparent);transform:translate(-50%,-50%) scale(1.04)}.av-slider--disabled{cursor:not-allowed;opacity:.62}.av-slider--disabled .av-slider__track,.av-slider--disabled .av-slider__native{cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
1842
+ }
1843
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvSlider, decorators: [{
1844
+ type: Component,
1845
+ args: [{ imports: [CommonModule], providers: [
1846
+ {
1847
+ multi: true,
1848
+ provide: NG_VALUE_ACCESSOR,
1849
+ useExisting: forwardRef(() => AvSlider),
1850
+ },
1851
+ ], selector: 'av-slider, lib-av-slider', standalone: true, template: "<div\n class=\"av-slider\"\n [class.av-slider--disabled]=\"isDisabled()\"\n [ngStyle]=\"themeVars()\"\n>\n @if (label() || showValue()) {\n <div class=\"av-slider__header\">\n @if (label()) {\n <label class=\"av-slider__label\">{{ label() }}</label>\n }\n\n @if (showValue()) {\n <span class=\"av-slider__value\">{{ displayValue() }}</span>\n }\n </div>\n }\n\n <div class=\"av-slider__track\" (pointerdown)=\"onTrackPointerDown($event)\">\n <span class=\"av-slider__rail\"></span>\n <span\n class=\"av-slider__fill\"\n [style.left.%]=\"fillLeft()\"\n [style.width.%]=\"fillWidth()\"\n ></span>\n\n <input\n class=\"av-slider__native av-slider__native--lower\"\n type=\"range\"\n [attr.aria-label]=\"range() ? lowerAriaLabel() : ariaLabel()\"\n [attr.aria-valuetext]=\"formatValue(lowerValue())\"\n [disabled]=\"isDisabled()\"\n [max]=\"safeMax()\"\n [min]=\"safeMin()\"\n [step]=\"safeStep()\"\n [value]=\"lowerValue()\"\n (blur)=\"markTouched()\"\n (change)=\"markTouched()\"\n (focus)=\"activeThumb.set('lower')\"\n (input)=\"onInput('lower', $event)\"\n />\n\n @if (range()) {\n <input\n class=\"av-slider__native av-slider__native--upper\"\n type=\"range\"\n [attr.aria-label]=\"upperAriaLabel()\"\n [attr.aria-valuetext]=\"formatValue(upperValue())\"\n [disabled]=\"isDisabled()\"\n [max]=\"safeMax()\"\n [min]=\"safeMin()\"\n [step]=\"safeStep()\"\n [value]=\"upperValue()\"\n (blur)=\"markTouched()\"\n (change)=\"markTouched()\"\n (focus)=\"activeThumb.set('upper')\"\n (input)=\"onInput('upper', $event)\"\n />\n }\n\n <span\n class=\"av-slider__thumb av-slider__thumb--lower\"\n [class.av-slider__thumb--active]=\"activeThumb() === 'lower'\"\n [style.left.%]=\"lowerPercent()\"\n >\n @if (thumbLabel()) {\n <span class=\"av-slider__bubble\">{{ formatValue(lowerValue()) }}</span>\n }\n </span>\n\n @if (range()) {\n <span\n class=\"av-slider__thumb av-slider__thumb--upper\"\n [class.av-slider__thumb--active]=\"activeThumb() === 'upper'\"\n [style.left.%]=\"upperPercent()\"\n >\n @if (thumbLabel()) {\n <span class=\"av-slider__bubble\">{{ formatValue(upperValue()) }}</span>\n }\n </span>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:100%}.av-slider{--av-slider-track-height: 6px;--av-slider-hit-size: 34px;--av-slider-thumb-size: 20px;--av-slider-thumb-border: var(--av-color-surface);--av-slider-bubble-bg: var(--av-color-surface-raised);--av-slider-bubble-border: var(--av-color-border-soft);--av-slider-bubble-color: var(--av-color-text-muted);color:var(--av-color-text);display:flex;flex-direction:column;gap:.65rem;width:100%}.av-slider__header{align-items:center;display:flex;gap:.75rem;justify-content:space-between}.av-slider__label{color:var(--av-color-text);font-size:.875rem;font-weight:700}.av-slider__value{color:var(--av-color-text-muted);font-size:.8125rem;font-weight:700;white-space:nowrap}.av-slider__track{cursor:pointer;height:var(--av-slider-hit-size);margin-top:1.45rem;position:relative;touch-action:none;width:100%}.av-slider__rail,.av-slider__fill{border-radius:var(--av-slider-rounded);height:var(--av-slider-track-height);left:0;position:absolute;top:50%;transform:translateY(-50%)}.av-slider__rail{background:var(--av-slider-track);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--av-color-border-soft) 55%,transparent);right:0}.av-slider__fill{background:linear-gradient(90deg,var(--av-slider-accent),var(--av-slider-accent-strong));box-shadow:0 0 0 1px color-mix(in srgb,var(--av-slider-accent) 16%,transparent);transition:left .12s ease,width .12s ease}.av-slider__thumb{background:var(--av-slider-accent);border:3px solid var(--av-slider-thumb-border);border-radius:var(--av-radius-full);box-shadow:var(--av-shadow-control),0 6px 14px color-mix(in srgb,var(--av-slider-accent) 25%,transparent);height:var(--av-slider-thumb-size);pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);transition:box-shadow .16s ease,transform .16s ease;width:var(--av-slider-thumb-size);z-index:3}.av-slider__thumb--active{box-shadow:var(--av-shadow-control),0 0 0 5px var(--av-slider-focus-ring),0 9px 18px color-mix(in srgb,var(--av-slider-accent) 28%,transparent);transform:translate(-50%,-50%) scale(1.04)}.av-slider__bubble{background:var(--av-slider-bubble-bg);border:1px solid var(--av-slider-bubble-border);border-radius:var(--av-radius-md);bottom:calc(100% + .6rem);box-shadow:var(--av-shadow-raised);color:var(--av-slider-bubble-color);font-size:.8125rem;font-weight:800;left:50%;line-height:1;min-width:2.9rem;padding:.48rem .62rem;position:absolute;text-align:center;transform:translate(-50%);white-space:nowrap}.av-slider__bubble:after{background:inherit;border-bottom:1px solid var(--av-slider-bubble-border);border-right:1px solid var(--av-slider-bubble-border);bottom:-.27rem;content:\"\";height:.52rem;left:50%;position:absolute;transform:translate(-50%) rotate(45deg);width:.52rem}.av-slider__native{-webkit-appearance:none;appearance:none;background:transparent;cursor:pointer;height:var(--av-slider-hit-size);inset:0;margin:0;opacity:0;pointer-events:none;position:absolute;width:100%;z-index:4}.av-slider__native:focus{outline:none}.av-slider__native::-webkit-slider-runnable-track{background:transparent;border:0;height:var(--av-slider-hit-size)}.av-slider__native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;height:var(--av-slider-thumb-size);pointer-events:auto;width:var(--av-slider-thumb-size)}.av-slider__native::-moz-range-track{background:transparent;border:0;height:var(--av-slider-hit-size)}.av-slider__native::-moz-range-thumb{background:transparent;border:0;height:var(--av-slider-thumb-size);pointer-events:auto;width:var(--av-slider-thumb-size)}.av-slider__native--lower:focus-visible~.av-slider__thumb--lower,.av-slider__native--upper:focus-visible~.av-slider__thumb--upper{box-shadow:var(--av-shadow-control),0 0 0 5px var(--av-slider-focus-ring),0 9px 18px color-mix(in srgb,var(--av-slider-accent) 28%,transparent);transform:translate(-50%,-50%) scale(1.04)}.av-slider--disabled{cursor:not-allowed;opacity:.62}.av-slider--disabled .av-slider__track,.av-slider--disabled .av-slider__native{cursor:not-allowed}\n"] }]
1852
+ }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], thumbLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "thumbLabel", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], ringColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "ringColor", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], valuePrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "valuePrefix", required: false }] }], valueSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueSuffix", required: false }] }], displayWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayWith", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], lowerAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "lowerAriaLabel", required: false }] }], upperAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "upperAriaLabel", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
1853
+
1854
+ class AvInput {
1855
+ ngControl;
1856
+ config = inject(VISUALS_CONFIG);
1857
+ placeholder = input('', /* @ts-ignore */
1858
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
1859
+ type = input('text', /* @ts-ignore */
1860
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
1861
+ label = input(/* @ts-ignore */
1862
+ ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
1863
+ icon = input(/* @ts-ignore */
1864
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
1865
+ loading = input(false, /* @ts-ignore */
1866
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
1867
+ autoFocus = input(false, /* @ts-ignore */
1868
+ ...(ngDevMode ? [{ debugName: "autoFocus" }] : /* istanbul ignore next */ []));
1869
+ loadingIcon = input('blocks-shuffle-3', /* @ts-ignore */
1870
+ ...(ngDevMode ? [{ debugName: "loadingIcon" }] : /* istanbul ignore next */ []));
1871
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
1872
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1873
+ rounded = input("md", /* @ts-ignore */
1874
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
1875
+ errorMessage = input('', /* @ts-ignore */
1876
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
1877
+ inputEl;
1878
+ value = '';
1879
+ disabled = false;
1880
+ // Funções de callback registradas pelo Angular Forms
1881
+ onChange = () => { };
1882
+ onTouched = () => { };
1883
+ constructor(ngControl) {
1884
+ this.ngControl = ngControl;
1885
+ if (this.ngControl) {
1886
+ this.ngControl.valueAccessor = this;
1887
+ }
1888
+ }
1889
+ ngAfterViewInit() {
1890
+ if (this.autoFocus() && this.inputEl) {
1891
+ setTimeout(() => this.inputEl.nativeElement.focus(), 0);
1892
+ }
1893
+ }
1894
+ get controlClasses() {
1895
+ return [
1896
+ this.isInvalid ? 'av-input__control--invalid' : '',
1897
+ ].filter(Boolean).join(' ');
1898
+ }
1899
+ get isInvalid() {
1900
+ return !!(this.ngControl && this.ngControl.invalid && (this.ngControl.dirty || this.ngControl.touched));
1901
+ }
1902
+ writeValue(value) {
1903
+ this.value = value ?? '';
1904
+ }
1905
+ registerOnChange(fn) {
1906
+ this.onChange = fn;
1907
+ }
1908
+ registerOnTouched(fn) {
1909
+ this.onTouched = fn;
1910
+ }
1911
+ setDisabledState(isDisabled) {
1912
+ this.disabled = isDisabled;
1913
+ }
1914
+ onInput(event) {
1915
+ const target = event.target;
1916
+ this.value = target.value;
1917
+ this.onChange(this.value);
1918
+ }
1919
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvInput, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1920
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvInput, isStandalone: true, selector: "av-input", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputRef"], descendants: true }], ngImport: i0, template: "<div class=\"av-input\"\n[style.--av-input-accent]=\"`var(--av-${variant()}-500)`\"\n[style.--av-input-accent-dark]=\"`var(--av-${variant()}-400)`\"\n>\n @if (label()) {\n <label class=\"av-input__label\">\n {{ label() }}\n </label>\n }\n\n <div class=\"av-input__field\">\n @if (icon() || loading()) {\n <div class=\"av-input__icon\">\n <span av-icon [name]=\"loading()? loadingIcon()!: icon()!\"></span>\n </div>\n }\n\n <input\n #inputRef\n [type]=\"type()\"\n [value]=\"value\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n class=\"av-input__control\"\n [class.av-input__control--with-icon]=\"icon()\"\n [class.av-input__control--without-icon]=\"!icon()\"\n [ngClass]=\"controlClasses\"\n />\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-input__error\">\n {{ errorMessage() || 'Campo inv\u00E1lido' }}\n </span>\n }\n</div>\n", styles: [".av-input{--av-input-control-bg: var(--av-color-surface);--av-input-color: var(--av-color-text);--av-input-muted-color: var(--av-color-text-subtle);--av-input-border: var(--av-color-border);--av-input-hover-border: var(--av-color-border-hover);--av-input-focus-color: var(--av-input-accent, var(--av-slate-500));--av-input-disabled-bg: var(--av-color-surface-muted);--av-input-invalid-color: var(--av-color-danger);--av-input-invalid-text: var(--av-color-danger-text);display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-input-color)}.av-input__label{color:var(--av-input-color);font-size:.875rem;font-weight:700;text-align:start}.av-input__field{align-items:center;display:flex;position:relative;width:100%}.av-input__icon{color:var(--av-input-muted-color);display:flex;left:.75rem;pointer-events:none;position:absolute}.av-input__control{background-color:var(--av-input-control-bg);border:2px solid var(--av-input-border);border-radius:var(--av-radius-lg);box-shadow:var(--av-shadow-control);color:var(--av-input-color);padding:.5rem 1rem;transition:all .2s ease;width:100%}.av-input__control::placeholder{color:var(--av-input-muted-color)}.av-input__control:hover{border-color:var(--av-input-hover-border)}.av-input__control:focus{outline:none}.av-input__control:disabled{background:var(--av-input-disabled-bg);color:var(--av-color-text-muted);opacity:.72;cursor:not-allowed}.av-input__control--with-icon{padding-left:2.5rem}.av-input__control--without-icon{padding-left:1rem}.av-input__control:focus{border-color:var(--av-input-focus-color);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-input-focus-color);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-input-focus-color) 24%,transparent)}.av-input__control--invalid,.av-input__control--invalid:focus{border-color:var(--av-input-invalid-color);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-input-invalid-color);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-input-invalid-color) 24%,transparent);color:var(--av-input-invalid-text);animation:av-input-shake .4s ease-in-out}.av-input__error{color:var(--av-input-invalid-color);font-size:.75rem;font-weight:500}@keyframes av-input-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}:host-context([data-av-theme=\"dark\"]) .av-input{--av-input-focus-color: var(--av-input-accent-dark, var(--av-input-accent, var(--av-slate-400)))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
1921
+ }
1922
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvInput, decorators: [{
1923
+ type: Component,
1924
+ args: [{ selector: 'av-input', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule, AvIcon], template: "<div class=\"av-input\"\n[style.--av-input-accent]=\"`var(--av-${variant()}-500)`\"\n[style.--av-input-accent-dark]=\"`var(--av-${variant()}-400)`\"\n>\n @if (label()) {\n <label class=\"av-input__label\">\n {{ label() }}\n </label>\n }\n\n <div class=\"av-input__field\">\n @if (icon() || loading()) {\n <div class=\"av-input__icon\">\n <span av-icon [name]=\"loading()? loadingIcon()!: icon()!\"></span>\n </div>\n }\n\n <input\n #inputRef\n [type]=\"type()\"\n [value]=\"value\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n class=\"av-input__control\"\n [class.av-input__control--with-icon]=\"icon()\"\n [class.av-input__control--without-icon]=\"!icon()\"\n [ngClass]=\"controlClasses\"\n />\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-input__error\">\n {{ errorMessage() || 'Campo inv\u00E1lido' }}\n </span>\n }\n</div>\n", styles: [".av-input{--av-input-control-bg: var(--av-color-surface);--av-input-color: var(--av-color-text);--av-input-muted-color: var(--av-color-text-subtle);--av-input-border: var(--av-color-border);--av-input-hover-border: var(--av-color-border-hover);--av-input-focus-color: var(--av-input-accent, var(--av-slate-500));--av-input-disabled-bg: var(--av-color-surface-muted);--av-input-invalid-color: var(--av-color-danger);--av-input-invalid-text: var(--av-color-danger-text);display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-input-color)}.av-input__label{color:var(--av-input-color);font-size:.875rem;font-weight:700;text-align:start}.av-input__field{align-items:center;display:flex;position:relative;width:100%}.av-input__icon{color:var(--av-input-muted-color);display:flex;left:.75rem;pointer-events:none;position:absolute}.av-input__control{background-color:var(--av-input-control-bg);border:2px solid var(--av-input-border);border-radius:var(--av-radius-lg);box-shadow:var(--av-shadow-control);color:var(--av-input-color);padding:.5rem 1rem;transition:all .2s ease;width:100%}.av-input__control::placeholder{color:var(--av-input-muted-color)}.av-input__control:hover{border-color:var(--av-input-hover-border)}.av-input__control:focus{outline:none}.av-input__control:disabled{background:var(--av-input-disabled-bg);color:var(--av-color-text-muted);opacity:.72;cursor:not-allowed}.av-input__control--with-icon{padding-left:2.5rem}.av-input__control--without-icon{padding-left:1rem}.av-input__control:focus{border-color:var(--av-input-focus-color);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-input-focus-color);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-input-focus-color) 24%,transparent)}.av-input__control--invalid,.av-input__control--invalid:focus{border-color:var(--av-input-invalid-color);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-input-invalid-color);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-input-invalid-color) 24%,transparent);color:var(--av-input-invalid-text);animation:av-input-shake .4s ease-in-out}.av-input__error{color:var(--av-input-invalid-color);font-size:.75rem;font-weight:500}@keyframes av-input-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}:host-context([data-av-theme=\"dark\"]) .av-input{--av-input-focus-color: var(--av-input-accent-dark, var(--av-input-accent, var(--av-slate-400)))}\n"] }]
1925
+ }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
1926
+ type: Optional
1927
+ }, {
1928
+ type: Self
1929
+ }] }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], inputEl: [{
1930
+ type: ViewChild,
1931
+ args: ['inputRef']
1932
+ }] } });
1933
+
1934
+ class AvSelect {
1935
+ ngControl;
1936
+ config = inject(VISUALS_CONFIG);
1937
+ themeService = inject(ThemeService);
1938
+ data = input.required(/* @ts-ignore */
1939
+ ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
1940
+ placeholder = input('Selecione uma opção', /* @ts-ignore */
1941
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
1942
+ labelKey = input('label', /* @ts-ignore */
1943
+ ...(ngDevMode ? [{ debugName: "labelKey" }] : /* istanbul ignore next */ []));
1944
+ labelFormat = input('', /* @ts-ignore */
1945
+ ...(ngDevMode ? [{ debugName: "labelFormat" }] : /* istanbul ignore next */ []));
1946
+ valueKey = input('value', /* @ts-ignore */
1947
+ ...(ngDevMode ? [{ debugName: "valueKey" }] : /* istanbul ignore next */ []));
1948
+ label = input('', /* @ts-ignore */
1949
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1950
+ icon = input('', /* @ts-ignore */
1951
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
1952
+ searchPlaceholder = input('Pesquisar...', /* @ts-ignore */
1953
+ ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
1954
+ searchable = input(true, /* @ts-ignore */
1955
+ ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
1956
+ loading = input(false, /* @ts-ignore */
1957
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
1958
+ loadingIcon = input('blocks-shuffle-3', /* @ts-ignore */
1959
+ ...(ngDevMode ? [{ debugName: "loadingIcon" }] : /* istanbul ignore next */ []));
1960
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
1961
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1962
+ rounded = input('md', /* @ts-ignore */
1963
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
1964
+ errorMessage = input('', /* @ts-ignore */
1965
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
1966
+ value = input(null, /* @ts-ignore */
1967
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
1968
+ onSearch = input(/* @ts-ignore */
1969
+ ...(ngDevMode ? [undefined, { debugName: "onSearch" }] : /* istanbul ignore next */ []));
1970
+ valueChange = output();
1971
+ triggerEl;
1972
+ isOpen = signal(false, /* @ts-ignore */
1973
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
1974
+ searchTerm = signal('', /* @ts-ignore */
1975
+ ...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
1976
+ _value = signal(null, /* @ts-ignore */
1977
+ ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
1978
+ disabled = signal(false, /* @ts-ignore */
1979
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
1980
+ onChange = () => { };
1981
+ onTouched = () => { };
1982
+ constructor(ngControl) {
1983
+ this.ngControl = ngControl;
1984
+ if (this.ngControl) {
1985
+ this.ngControl.valueAccessor = this;
1986
+ }
1987
+ effect(() => {
1988
+ if (!this.ngControl) {
1989
+ this._value.set(this.value());
1990
+ }
1991
+ });
1992
+ }
1993
+ get roundedStyle() {
1994
+ if (typeof this.rounded() === 'string') {
1995
+ return `var(--av-radius-${this.rounded()})`;
1996
+ }
1997
+ return `${this.rounded()}px`;
1998
+ }
1999
+ get themeVars() {
2000
+ const isDark = this.themeService.dark();
2001
+ const variant = this.variant();
2002
+ const accent = `var(--av-${variant}-${isDark ? 400 : 500})`;
2003
+ return {
2004
+ // Base
2005
+ '--av-select-color': 'var(--av-color-text)',
2006
+ '--av-select-muted-color': 'var(--av-color-text-subtle)',
2007
+ // Trigger
2008
+ '--av-select-trigger-bg': 'var(--av-color-surface)',
2009
+ '--av-select-trigger-border': 'var(--av-color-border)',
2010
+ '--av-select-trigger-hover-border': isDark
2011
+ ? `var(--av-${variant}-400)`
2012
+ : `var(--av-${variant}-400)`,
2013
+ '--av-select-trigger-focus-border': accent,
2014
+ // Panel
2015
+ '--av-select-panel-bg': 'var(--av-color-surface-raised)',
2016
+ '--av-select-panel-border': 'var(--av-color-border-soft)',
2017
+ '--av-select-panel-shadow': 'var(--av-shadow-raised)',
2018
+ // Search
2019
+ '--av-select-search-border': 'var(--av-color-border-soft)',
2020
+ '--av-select-search-focus-border': accent,
2021
+ '--av-select-search-color': 'var(--av-color-text)',
2022
+ // Options
2023
+ '--av-select-option-hover-bg': isDark
2024
+ ? `color-mix(in srgb, var(--av-${variant}-400) 12%, transparent)`
2025
+ : `var(--av-${variant}-50)`,
2026
+ '--av-select-option-hover-color': isDark
2027
+ ? `var(--av-${variant}-100)`
2028
+ : `var(--av-${variant}-800)`,
2029
+ '--av-select-option-selected-bg': isDark
2030
+ ? `color-mix(in srgb, var(--av-${variant}-400) 18%, transparent)`
2031
+ : `var(--av-${variant}-100)`,
2032
+ '--av-select-option-selected-color': isDark
2033
+ ? `var(--av-${variant}-100)`
2034
+ : `var(--av-${variant}-700)`,
2035
+ '--av-select-option-selected-icon': isDark
2036
+ ? `var(--av-${variant}-400)`
2037
+ : `var(--av-${variant}-600)`,
2038
+ // Empty
2039
+ '--av-select-empty-color': 'var(--av-color-text-subtle)',
2040
+ '--av-select-disabled-bg': 'var(--av-color-surface-muted)',
2041
+ '--av-select-accent': accent,
2042
+ '--av-select-soft': isDark
2043
+ ? `color-mix(in srgb, var(--av-${variant}-400) 18%, transparent)`
2044
+ : `var(--av-${variant}-100)`,
2045
+ };
2046
+ }
2047
+ filteredData = computed(() => {
2048
+ const query = this.searchTerm().toLowerCase().trim();
2049
+ const items = this.data() || [];
2050
+ if (!query || this.onSearch())
2051
+ return items;
2052
+ return items.filter((item) => {
2053
+ const labelValue = this.getItemLabel(item);
2054
+ return String(labelValue).toLowerCase().includes(query);
2055
+ });
2056
+ }, /* @ts-ignore */
2057
+ ...(ngDevMode ? [{ debugName: "filteredData" }] : /* istanbul ignore next */ []));
2058
+ selectedOption = computed(() => {
2059
+ const items = this.data() || [];
2060
+ return items.find((item) => this.getItemValue(item) === this._value());
2061
+ }, /* @ts-ignore */
2062
+ ...(ngDevMode ? [{ debugName: "selectedOption" }] : /* istanbul ignore next */ []));
2063
+ get triggerClasses() {
2064
+ return [
2065
+ this.isOpen() ? 'av-select__trigger--open' : '',
2066
+ this.disabled() ? 'av-select__trigger--disabled' : '',
2067
+ this.isInvalid ? 'av-select__trigger--invalid' : '',
2068
+ ].filter(Boolean).join(' ');
2069
+ }
2070
+ get isInvalid() {
2071
+ return !!(this.ngControl && this.ngControl.invalid && (this.ngControl.dirty || this.ngControl.touched));
2072
+ }
2073
+ getItemLabel(item) {
2074
+ if (typeof item === 'object' && item !== null) {
2075
+ if (!this.labelFormat() || this.labelFormat().trim() === '') {
2076
+ return item[this.labelKey()];
2077
+ }
2078
+ let label = this.labelFormat();
2079
+ Object.keys(item).forEach((key) => {
2080
+ label = label.replaceAll(`{${key}}`, item[key] ?? '');
2081
+ });
2082
+ return label;
2083
+ }
2084
+ return item;
2085
+ }
2086
+ getItemValue(item) {
2087
+ return typeof item === 'object' && item !== null ? item[this.valueKey()] : item;
2088
+ }
2089
+ isSelected(item) {
2090
+ return this.getItemValue(item) === this._value();
2091
+ }
2092
+ toggleDropdown() {
2093
+ if (this.disabled())
2094
+ return;
2095
+ this.isOpen.set(!this.isOpen());
2096
+ if (!this.isOpen()) {
2097
+ this.onTouched();
2098
+ }
2099
+ }
2100
+ closeDropdown() {
2101
+ this.isOpen.set(false);
2102
+ this.searchTerm.set('');
2103
+ this.onTouched();
2104
+ }
2105
+ selectOption(item) {
2106
+ const val = this.getItemValue(item);
2107
+ this._value.set(val);
2108
+ this.onChange(val);
2109
+ this.valueChange.emit(val);
2110
+ this.closeDropdown();
2111
+ }
2112
+ handleSearchInput(event) {
2113
+ const query = event.target.value;
2114
+ this.searchTerm.set(query);
2115
+ if (this.onSearch()) {
2116
+ this.onSearch()(query);
2117
+ }
2118
+ }
2119
+ writeValue(value) {
2120
+ this._value.set(value);
2121
+ }
2122
+ registerOnChange(fn) {
2123
+ this.onChange = fn;
2124
+ }
2125
+ registerOnTouched(fn) {
2126
+ this.onTouched = fn;
2127
+ }
2128
+ setDisabledState(isDisabled) {
2129
+ this.disabled.set(isDisabled);
2130
+ }
2131
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvSelect, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
2132
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvSelect, isStandalone: true, selector: "av-select", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, labelFormat: { classPropertyName: "labelFormat", publicName: "labelFormat", isSignal: true, isRequired: false, transformFunction: null }, valueKey: { classPropertyName: "valueKey", publicName: "valueKey", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, onSearch: { classPropertyName: "onSearch", publicName: "onSearch", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "triggerEl", first: true, predicate: ["triggerEl"], descendants: true }], ngImport: i0, template: "<div\n class=\"av-select\"\n [ngStyle]=\"themeVars\"\n>\n @if (label()) {\n <label class=\"av-select__label\">\n {{ label() }}\n </label>\n }\n\n <div\n #triggerEl\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"toggleDropdown()\"\n tabindex=\"0\"\n class=\"av-select__trigger\"\n [style.border-radius]=\"roundedStyle\"\n [class.av-select__trigger--with-icon]=\"icon() || loading()\"\n [class.av-select__trigger--without-icon]=\"!icon() && !loading()\"\n [ngClass]=\"triggerClasses\"\n >\n @if (icon() || loading()) {\n <div class=\"av-select__icon\">\n <span av-icon [name]=\"loading() ? loadingIcon() : icon()!\"></span>\n </div>\n }\n\n <span class=\"av-select__value\" [class.av-select__value--placeholder]=\"!selectedOption()\">\n {{ selectedOption() ? getItemLabel(selectedOption()) : placeholder() }}\n </span>\n\n <div class=\"av-select__chevron\" [class.av-select__chevron--open]=\"isOpen()\">\n <span av-icon name=\"expand_more\"></span>\n </div>\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-select__error\">\n {{ errorMessage() || 'Sele\u00E7\u00E3o obrigat\u00F3ria' }}\n </span>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeDropdown()\"\n>\n <div\n class=\"av-select__panel\"\n [ngStyle]=\"themeVars\"\n [style.width.px]=\"triggerEl.offsetWidth\"\n [style.border-radius]=\"roundedStyle\"\n >\n @if (searchable()) {\n <div class=\"av-select__search\">\n <av-input\n [autoFocus]=\"true\"\n icon=\"search\"\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n [ngModel]=\"searchTerm()\"\n (input)=\"handleSearchInput($event)\"\n class=\"av-select__search-input\"\n />\n </div>\n }\n\n <ul class=\"av-select__options\">\n @for (item of filteredData(); track getItemValue(item)) {\n <li\n (click)=\"selectOption(item)\"\n class=\"av-select__option\"\n [class.av-select__option--selected]=\"isSelected(item)\"\n >\n <span class=\"av-select__option-label\">{{ getItemLabel(item) }}</span>\n\n @if (isSelected(item)) {\n <span av-icon name=\"check\" class=\"av-select__option-check\"></span>\n }\n </li>\n } @empty {\n <li class=\"av-select__empty\">Nenhuma op\u00E7\u00E3o encontrada</li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: [".av-select{--av-select-color: var(--av-color-text);--av-select-muted-color: var(--av-color-text-subtle);--av-select-trigger-bg: var(--av-color-surface);--av-select-trigger-border: var(--av-color-border);--av-select-trigger-hover-border: var(--av-color-border-hover);--av-select-trigger-focus-border: var(--av-select-accent, var(--av-slate-500));--av-select-panel-bg: var(--av-color-surface-raised);--av-select-panel-border: var(--av-color-border-soft);--av-select-panel-shadow: var(--av-shadow-raised);--av-select-search-border: var(--av-color-border-soft);--av-select-search-color: var(--av-color-text);--av-select-option-hover-bg: var(--av-color-surface-muted);--av-select-option-hover-color: var(--av-select-color);--av-select-option-selected-bg: var(--av-select-soft, #eff6ff);--av-select-option-selected-color: var(--av-select-color);--av-select-option-selected-icon: var(--av-select-accent, #3b82f6);--av-select-empty-color: var(--av-neutral-400);--av-select-disabled-bg: var(--av-color-surface-muted);display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-select-color)}.av-select__label{color:var(--av-select-color);font-size:.875rem;font-weight:700;text-align:start}.av-select__trigger{align-items:center;background:var(--av-select-trigger-bg);border:2px solid var(--av-select-trigger-border);box-shadow:var(--av-shadow-control);color:var(--av-select-color);cursor:pointer;display:flex;font-size:.875rem;padding:.5rem 1rem;position:relative;transition:all .2s ease;width:100%}.av-select__trigger:hover{border-color:var(--av-select-trigger-hover-border)}.av-select__trigger:focus{outline:none}.av-select__trigger:focus,.av-select__trigger--open{border-color:var(--av-select-trigger-focus-border);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-select-trigger-focus-border);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-select-trigger-focus-border) 24%,transparent)}.av-select__trigger--with-icon{padding-left:2.5rem}.av-select__trigger--without-icon{padding-left:1rem}.av-select__trigger--disabled{background:var(--av-select-disabled-bg);cursor:not-allowed;opacity:.72}.av-select__trigger--invalid,.av-select__trigger--invalid:focus{border-color:var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-color-danger) 24%,transparent);color:var(--av-color-danger-text);animation:av-select-shake .4s ease-in-out}.av-select__icon,.av-select__chevron{color:var(--av-neutral-400);display:flex;pointer-events:none;position:absolute}.av-select__icon{left:.75rem}.av-select__chevron{right:.75rem;transition:transform .2s ease}.av-select__chevron--open{transform:rotate(180deg)}.av-select__value,.av-select__option-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.av-select__value--placeholder,.av-select__empty{color:var(--av-select-muted-color)}.av-select__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}.av-select__panel{background:var(--av-select-panel-bg);border:1px solid var(--av-select-panel-border);box-shadow:var(--av-select-panel-shadow);display:flex;flex-direction:column;max-height:15rem;margin-top:.25rem;overflow:hidden;opacity:0;transform:translateY(-6px) scale(.98);animation:av-select-panel-in .18s ease forwards;transition:opacity .18s ease,transform .18s ease}.av-select__search{align-items:center;border-bottom:1px solid var(--av-select-search-border);display:flex;gap:.5rem;padding:.5rem}.av-select__search-icon{color:var(--av-select-muted-color);font-size:.875rem}.av-select__search-input{background:transparent;border:0;color:var(--av-select-search-color);font-size:.875rem;outline:0;width:100%}.av-select__options{flex:1;list-style:none;margin:0;overflow-y:auto;padding:.25rem 0}.av-select__option{align-items:center;color:var(--av-select-color);cursor:pointer;display:flex;font-size:.875rem;justify-content:space-between;padding:.5rem 1rem;transition:background .2s ease}.av-select__option+.av-select__option{border-top:1px solid var(--av-select-panel-border)}.av-select__option:hover{background:var(--av-select-option-hover-bg);color:var(--av-select-option-hover-color)}.av-select__option--selected{background:var(--av-select-option-selected-bg);color:var(--av-select-option-selected-color);font-weight:600}.av-select__option-check{color:var(--av-select-option-selected-icon);font-size:.875rem}.av-select__empty{color:var(--av-select-empty-color);font-size:.875rem;padding:.75rem 1rem;text-align:center}@keyframes av-select-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}@keyframes av-select-panel-in{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.av-select__icon,.av-select__chevron{color:var(--av-select-muted-color)}.av-select__search-input,.av-select__value,.av-select__option-label{color:var(--av-select-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }, { kind: "component", type: AvInput, selector: "av-input", inputs: ["placeholder", "type", "label", "icon", "loading", "autoFocus", "loadingIcon", "variant", "rounded", "errorMessage"] }] });
2133
+ }
2134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvSelect, decorators: [{
2135
+ type: Component,
2136
+ args: [{ selector: 'av-select', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule, OverlayModule, AvIcon, AvInput], template: "<div\n class=\"av-select\"\n [ngStyle]=\"themeVars\"\n>\n @if (label()) {\n <label class=\"av-select__label\">\n {{ label() }}\n </label>\n }\n\n <div\n #triggerEl\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"toggleDropdown()\"\n tabindex=\"0\"\n class=\"av-select__trigger\"\n [style.border-radius]=\"roundedStyle\"\n [class.av-select__trigger--with-icon]=\"icon() || loading()\"\n [class.av-select__trigger--without-icon]=\"!icon() && !loading()\"\n [ngClass]=\"triggerClasses\"\n >\n @if (icon() || loading()) {\n <div class=\"av-select__icon\">\n <span av-icon [name]=\"loading() ? loadingIcon() : icon()!\"></span>\n </div>\n }\n\n <span class=\"av-select__value\" [class.av-select__value--placeholder]=\"!selectedOption()\">\n {{ selectedOption() ? getItemLabel(selectedOption()) : placeholder() }}\n </span>\n\n <div class=\"av-select__chevron\" [class.av-select__chevron--open]=\"isOpen()\">\n <span av-icon name=\"expand_more\"></span>\n </div>\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-select__error\">\n {{ errorMessage() || 'Sele\u00E7\u00E3o obrigat\u00F3ria' }}\n </span>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeDropdown()\"\n>\n <div\n class=\"av-select__panel\"\n [ngStyle]=\"themeVars\"\n [style.width.px]=\"triggerEl.offsetWidth\"\n [style.border-radius]=\"roundedStyle\"\n >\n @if (searchable()) {\n <div class=\"av-select__search\">\n <av-input\n [autoFocus]=\"true\"\n icon=\"search\"\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n [ngModel]=\"searchTerm()\"\n (input)=\"handleSearchInput($event)\"\n class=\"av-select__search-input\"\n />\n </div>\n }\n\n <ul class=\"av-select__options\">\n @for (item of filteredData(); track getItemValue(item)) {\n <li\n (click)=\"selectOption(item)\"\n class=\"av-select__option\"\n [class.av-select__option--selected]=\"isSelected(item)\"\n >\n <span class=\"av-select__option-label\">{{ getItemLabel(item) }}</span>\n\n @if (isSelected(item)) {\n <span av-icon name=\"check\" class=\"av-select__option-check\"></span>\n }\n </li>\n } @empty {\n <li class=\"av-select__empty\">Nenhuma op\u00E7\u00E3o encontrada</li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: [".av-select{--av-select-color: var(--av-color-text);--av-select-muted-color: var(--av-color-text-subtle);--av-select-trigger-bg: var(--av-color-surface);--av-select-trigger-border: var(--av-color-border);--av-select-trigger-hover-border: var(--av-color-border-hover);--av-select-trigger-focus-border: var(--av-select-accent, var(--av-slate-500));--av-select-panel-bg: var(--av-color-surface-raised);--av-select-panel-border: var(--av-color-border-soft);--av-select-panel-shadow: var(--av-shadow-raised);--av-select-search-border: var(--av-color-border-soft);--av-select-search-color: var(--av-color-text);--av-select-option-hover-bg: var(--av-color-surface-muted);--av-select-option-hover-color: var(--av-select-color);--av-select-option-selected-bg: var(--av-select-soft, #eff6ff);--av-select-option-selected-color: var(--av-select-color);--av-select-option-selected-icon: var(--av-select-accent, #3b82f6);--av-select-empty-color: var(--av-neutral-400);--av-select-disabled-bg: var(--av-color-surface-muted);display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-select-color)}.av-select__label{color:var(--av-select-color);font-size:.875rem;font-weight:700;text-align:start}.av-select__trigger{align-items:center;background:var(--av-select-trigger-bg);border:2px solid var(--av-select-trigger-border);box-shadow:var(--av-shadow-control);color:var(--av-select-color);cursor:pointer;display:flex;font-size:.875rem;padding:.5rem 1rem;position:relative;transition:all .2s ease;width:100%}.av-select__trigger:hover{border-color:var(--av-select-trigger-hover-border)}.av-select__trigger:focus{outline:none}.av-select__trigger:focus,.av-select__trigger--open{border-color:var(--av-select-trigger-focus-border);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-select-trigger-focus-border);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-select-trigger-focus-border) 24%,transparent)}.av-select__trigger--with-icon{padding-left:2.5rem}.av-select__trigger--without-icon{padding-left:1rem}.av-select__trigger--disabled{background:var(--av-select-disabled-bg);cursor:not-allowed;opacity:.72}.av-select__trigger--invalid,.av-select__trigger--invalid:focus{border-color:var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-color-danger) 24%,transparent);color:var(--av-color-danger-text);animation:av-select-shake .4s ease-in-out}.av-select__icon,.av-select__chevron{color:var(--av-neutral-400);display:flex;pointer-events:none;position:absolute}.av-select__icon{left:.75rem}.av-select__chevron{right:.75rem;transition:transform .2s ease}.av-select__chevron--open{transform:rotate(180deg)}.av-select__value,.av-select__option-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.av-select__value--placeholder,.av-select__empty{color:var(--av-select-muted-color)}.av-select__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}.av-select__panel{background:var(--av-select-panel-bg);border:1px solid var(--av-select-panel-border);box-shadow:var(--av-select-panel-shadow);display:flex;flex-direction:column;max-height:15rem;margin-top:.25rem;overflow:hidden;opacity:0;transform:translateY(-6px) scale(.98);animation:av-select-panel-in .18s ease forwards;transition:opacity .18s ease,transform .18s ease}.av-select__search{align-items:center;border-bottom:1px solid var(--av-select-search-border);display:flex;gap:.5rem;padding:.5rem}.av-select__search-icon{color:var(--av-select-muted-color);font-size:.875rem}.av-select__search-input{background:transparent;border:0;color:var(--av-select-search-color);font-size:.875rem;outline:0;width:100%}.av-select__options{flex:1;list-style:none;margin:0;overflow-y:auto;padding:.25rem 0}.av-select__option{align-items:center;color:var(--av-select-color);cursor:pointer;display:flex;font-size:.875rem;justify-content:space-between;padding:.5rem 1rem;transition:background .2s ease}.av-select__option+.av-select__option{border-top:1px solid var(--av-select-panel-border)}.av-select__option:hover{background:var(--av-select-option-hover-bg);color:var(--av-select-option-hover-color)}.av-select__option--selected{background:var(--av-select-option-selected-bg);color:var(--av-select-option-selected-color);font-weight:600}.av-select__option-check{color:var(--av-select-option-selected-icon);font-size:.875rem}.av-select__empty{color:var(--av-select-empty-color);font-size:.875rem;padding:.75rem 1rem;text-align:center}@keyframes av-select-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}@keyframes av-select-panel-in{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.av-select__icon,.av-select__chevron{color:var(--av-select-muted-color)}.av-select__search-input,.av-select__value,.av-select__option-label{color:var(--av-select-color)}\n"] }]
2137
+ }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
2138
+ type: Optional
2139
+ }, {
2140
+ type: Self
2141
+ }] }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], labelFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFormat", required: false }] }], valueKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueKey", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], onSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSearch", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], triggerEl: [{
2142
+ type: ViewChild,
2143
+ args: ['triggerEl']
2144
+ }] } });
2145
+
2146
+ class AvCheckbox {
2147
+ ngControl;
2148
+ config = inject(VISUALS_CONFIG);
2149
+ themeService = inject(ThemeService);
2150
+ label = input('', /* @ts-ignore */
2151
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2152
+ icon = input('check', /* @ts-ignore */
2153
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
2154
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
2155
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2156
+ ringColor = input(undefined, /* @ts-ignore */
2157
+ ...(ngDevMode ? [{ debugName: "ringColor" }] : /* istanbul ignore next */ []));
2158
+ rounded = input('md', /* @ts-ignore */
2159
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
2160
+ errorMessage = input('', /* @ts-ignore */
2161
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
2162
+ changed = output();
2163
+ valueChange = output();
2164
+ value = signal(false, /* @ts-ignore */
2165
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
2166
+ disabled = signal(false, /* @ts-ignore */
2167
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
2168
+ onChange = () => { };
2169
+ onTouched = () => { };
2170
+ activeVariant = computed(() => this.ringColor() || this.variant(), /* @ts-ignore */
2171
+ ...(ngDevMode ? [{ debugName: "activeVariant" }] : /* istanbul ignore next */ []));
2172
+ themeVars = computed(() => {
2173
+ const variant = this.activeVariant();
2174
+ const isDark = this.themeService.dark();
2175
+ return {
2176
+ '--av-checkbox-accent': `var(--av-${variant}-500)`,
2177
+ '--av-checkbox-accent-hover': `var(--av-${variant}-${isDark ? 400 : 600})`,
2178
+ '--av-checkbox-accent-soft': isDark
2179
+ ? `color-mix(in srgb, var(--av-${variant}-400) 20%, transparent)`
2180
+ : `var(--av-${variant}-50)`,
2181
+ };
2182
+ }, /* @ts-ignore */
2183
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
2184
+ constructor(ngControl) {
2185
+ this.ngControl = ngControl;
2186
+ if (this.ngControl) {
2187
+ this.ngControl.valueAccessor = this;
2188
+ }
2189
+ }
2190
+ get roundedStyle() {
2191
+ if (typeof this.rounded() === 'string') {
2192
+ return `var(--av-radius-${this.rounded()})`;
2193
+ }
2194
+ return `${this.rounded()}px`;
2195
+ }
2196
+ get isInvalid() {
2197
+ return !!(this.ngControl && this.ngControl.invalid && (this.ngControl.dirty || this.ngControl.touched));
2198
+ }
2199
+ handleChange(event) {
2200
+ const checked = event.target.checked;
2201
+ this.value.set(checked);
2202
+ this.onChange(checked);
2203
+ this.changed.emit(checked);
2204
+ this.valueChange.emit(checked);
2205
+ }
2206
+ writeValue(value) {
2207
+ this.value.set(!!value);
2208
+ }
2209
+ registerOnChange(fn) {
2210
+ this.onChange = fn;
2211
+ }
2212
+ registerOnTouched(fn) {
2213
+ this.onTouched = fn;
2214
+ }
2215
+ setDisabledState(isDisabled) {
2216
+ this.disabled.set(isDisabled);
2217
+ }
2218
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCheckbox, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
2219
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvCheckbox, isStandalone: true, selector: "av-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ringColor: { classPropertyName: "ringColor", publicName: "ringColor", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"av-checkbox\" [ngStyle]=\"themeVars()\">\n <label\n class=\"av-checkbox__label\"\n [class.av-checkbox__label--disabled]=\"disabled()\"\n >\n <input\n type=\"checkbox\"\n class=\"av-checkbox__native\"\n [checked]=\"value()\"\n [disabled]=\"disabled()\"\n (change)=\"handleChange($event)\"\n (blur)=\"onTouched()\"\n />\n\n <span\n class=\"av-checkbox__box\"\n [class.av-checkbox__box--checked]=\"value()\"\n [class.av-checkbox__box--invalid]=\"isInvalid\"\n [style.border-radius]=\"roundedStyle\"\n >\n @if (value()) {\n <span av-icon [name]=\"icon()\" class=\"av-checkbox__icon\"></span>\n }\n </span>\n\n @if (label()) {\n <span class=\"av-checkbox__text\">\n {{ label() }}\n </span>\n }\n </label>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-checkbox__error\">\n {{ errorMessage() || 'Campo obrigat\u00F3rio' }}\n </span>\n }\n</div>\n", styles: [".av-checkbox{display:flex;flex-direction:column;gap:.25rem;color:var(--av-color-text)}.av-checkbox__label{align-items:center;cursor:pointer;display:inline-flex;gap:.625rem;-webkit-user-select:none;user-select:none;width:fit-content}.av-checkbox__label--disabled{cursor:not-allowed;opacity:.72}.av-checkbox__native{height:1px;margin:-1px;opacity:0;overflow:hidden;position:absolute;width:1px}.av-checkbox__box{align-items:center;background:var(--av-color-surface);border:2px solid var(--av-color-border);box-shadow:var(--av-shadow-control);color:var(--av-color-text-inverse);display:flex;flex-shrink:0;height:1.25rem;justify-content:center;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease;width:1.25rem}.av-checkbox__label:hover .av-checkbox__box{border-color:var(--av-color-border-hover)}.av-checkbox__label:focus-within .av-checkbox__box{border-color:var(--av-checkbox-accent);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-checkbox-accent);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-checkbox-accent) 24%,transparent)}.av-checkbox__box--checked{background:var(--av-checkbox-accent);border-color:var(--av-checkbox-accent)}.av-checkbox__label:hover .av-checkbox__box--checked{background:var(--av-checkbox-accent-hover);border-color:var(--av-checkbox-accent-hover)}.av-checkbox__box--invalid{border-color:var(--av-color-danger);animation:av-checkbox-shake .4s ease-in-out}.av-checkbox__icon{color:var(--av-white);font-size:.875rem;line-height:1}.av-checkbox__text{color:var(--av-color-text);font-size:.875rem;font-weight:500;transition:color .2s ease}.av-checkbox__label:hover .av-checkbox__text{color:var(--av-color-text)}.av-checkbox__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}@keyframes av-checkbox-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
2220
+ }
2221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCheckbox, decorators: [{
2222
+ type: Component,
2223
+ args: [{ selector: 'av-checkbox', standalone: true, imports: [CommonModule, AvIcon], template: "<div class=\"av-checkbox\" [ngStyle]=\"themeVars()\">\n <label\n class=\"av-checkbox__label\"\n [class.av-checkbox__label--disabled]=\"disabled()\"\n >\n <input\n type=\"checkbox\"\n class=\"av-checkbox__native\"\n [checked]=\"value()\"\n [disabled]=\"disabled()\"\n (change)=\"handleChange($event)\"\n (blur)=\"onTouched()\"\n />\n\n <span\n class=\"av-checkbox__box\"\n [class.av-checkbox__box--checked]=\"value()\"\n [class.av-checkbox__box--invalid]=\"isInvalid\"\n [style.border-radius]=\"roundedStyle\"\n >\n @if (value()) {\n <span av-icon [name]=\"icon()\" class=\"av-checkbox__icon\"></span>\n }\n </span>\n\n @if (label()) {\n <span class=\"av-checkbox__text\">\n {{ label() }}\n </span>\n }\n </label>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-checkbox__error\">\n {{ errorMessage() || 'Campo obrigat\u00F3rio' }}\n </span>\n }\n</div>\n", styles: [".av-checkbox{display:flex;flex-direction:column;gap:.25rem;color:var(--av-color-text)}.av-checkbox__label{align-items:center;cursor:pointer;display:inline-flex;gap:.625rem;-webkit-user-select:none;user-select:none;width:fit-content}.av-checkbox__label--disabled{cursor:not-allowed;opacity:.72}.av-checkbox__native{height:1px;margin:-1px;opacity:0;overflow:hidden;position:absolute;width:1px}.av-checkbox__box{align-items:center;background:var(--av-color-surface);border:2px solid var(--av-color-border);box-shadow:var(--av-shadow-control);color:var(--av-color-text-inverse);display:flex;flex-shrink:0;height:1.25rem;justify-content:center;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease;width:1.25rem}.av-checkbox__label:hover .av-checkbox__box{border-color:var(--av-color-border-hover)}.av-checkbox__label:focus-within .av-checkbox__box{border-color:var(--av-checkbox-accent);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-checkbox-accent);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-checkbox-accent) 24%,transparent)}.av-checkbox__box--checked{background:var(--av-checkbox-accent);border-color:var(--av-checkbox-accent)}.av-checkbox__label:hover .av-checkbox__box--checked{background:var(--av-checkbox-accent-hover);border-color:var(--av-checkbox-accent-hover)}.av-checkbox__box--invalid{border-color:var(--av-color-danger);animation:av-checkbox-shake .4s ease-in-out}.av-checkbox__icon{color:var(--av-white);font-size:.875rem;line-height:1}.av-checkbox__text{color:var(--av-color-text);font-size:.875rem;font-weight:500;transition:color .2s ease}.av-checkbox__label:hover .av-checkbox__text{color:var(--av-color-text)}.av-checkbox__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}@keyframes av-checkbox-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}\n"] }]
2224
+ }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
2225
+ type: Optional
2226
+ }, {
2227
+ type: Self
2228
+ }] }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], ringColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "ringColor", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
2229
+
2230
+ class AvCurrencyInput {
2231
+ ngControl;
2232
+ config = inject(VISUALS_CONFIG);
2233
+ themeService = inject(ThemeService);
2234
+ label = input('', /* @ts-ignore */
2235
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2236
+ currencySymbol = input('R$', /* @ts-ignore */
2237
+ ...(ngDevMode ? [{ debugName: "currencySymbol" }] : /* istanbul ignore next */ []));
2238
+ locale = input('pt-BR', /* @ts-ignore */
2239
+ ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
2240
+ currencyCode = input('BRL', /* @ts-ignore */
2241
+ ...(ngDevMode ? [{ debugName: "currencyCode" }] : /* istanbul ignore next */ []));
2242
+ placeholder = input('0,00', /* @ts-ignore */
2243
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
2244
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
2245
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2246
+ ringColor = input(undefined, /* @ts-ignore */
2247
+ ...(ngDevMode ? [{ debugName: "ringColor" }] : /* istanbul ignore next */ []));
2248
+ rounded = input('md', /* @ts-ignore */
2249
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
2250
+ autoFocus = input(false, /* @ts-ignore */
2251
+ ...(ngDevMode ? [{ debugName: "autoFocus" }] : /* istanbul ignore next */ []));
2252
+ errorMessage = input('', /* @ts-ignore */
2253
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
2254
+ inputEl;
2255
+ formattedValue = signal('', /* @ts-ignore */
2256
+ ...(ngDevMode ? [{ debugName: "formattedValue" }] : /* istanbul ignore next */ []));
2257
+ rawValue = signal(null, /* @ts-ignore */
2258
+ ...(ngDevMode ? [{ debugName: "rawValue" }] : /* istanbul ignore next */ []));
2259
+ disabled = signal(false, /* @ts-ignore */
2260
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
2261
+ onChange = () => { };
2262
+ onTouched = () => { };
2263
+ activeVariant = computed(() => this.ringColor() || this.variant(), /* @ts-ignore */
2264
+ ...(ngDevMode ? [{ debugName: "activeVariant" }] : /* istanbul ignore next */ []));
2265
+ themeVars = computed(() => {
2266
+ const variant = this.activeVariant();
2267
+ const isDark = this.themeService.dark();
2268
+ return {
2269
+ '--av-currency-accent': `var(--av-${variant}-${isDark ? 400 : 500})`,
2270
+ '--av-currency-symbol-bg': isDark
2271
+ ? `color-mix(in srgb, var(--av-${variant}-400) 12%, transparent)`
2272
+ : `var(--av-${variant}-50)`,
2273
+ };
2274
+ }, /* @ts-ignore */
2275
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
2276
+ constructor(ngControl) {
2277
+ this.ngControl = ngControl;
2278
+ if (this.ngControl) {
2279
+ this.ngControl.valueAccessor = this;
2280
+ }
2281
+ }
2282
+ ngAfterViewInit() {
2283
+ if (this.autoFocus() && this.inputEl) {
2284
+ setTimeout(() => this.inputEl.nativeElement.focus(), 0);
2285
+ }
2286
+ }
2287
+ get roundedStyle() {
2288
+ if (typeof this.rounded() === 'string') {
2289
+ return `var(--av-radius-${this.rounded()})`;
2290
+ }
2291
+ return `${this.rounded()}px`;
2292
+ }
2293
+ get isInvalid() {
2294
+ return !!(this.ngControl && this.ngControl.invalid && (this.ngControl.dirty || this.ngControl.touched));
2295
+ }
2296
+ formatCurrency(value) {
2297
+ if (value === null || Number.isNaN(value))
2298
+ return '';
2299
+ return new Intl.NumberFormat(this.locale(), {
2300
+ style: 'decimal',
2301
+ minimumFractionDigits: 2,
2302
+ maximumFractionDigits: 2,
2303
+ }).format(value);
2304
+ }
2305
+ onInput(event) {
2306
+ const inputNode = event.target;
2307
+ const digits = inputNode.value.replace(/\D/g, '');
2308
+ if (!digits) {
2309
+ this.rawValue.set(null);
2310
+ this.formattedValue.set('');
2311
+ this.onChange(null);
2312
+ return;
2313
+ }
2314
+ const numericValue = Number(digits) / 100;
2315
+ this.rawValue.set(numericValue);
2316
+ this.formattedValue.set(this.formatCurrency(numericValue));
2317
+ inputNode.value = this.formattedValue();
2318
+ this.onChange(numericValue);
2319
+ }
2320
+ handleBlur() {
2321
+ this.formattedValue.set(this.formatCurrency(this.rawValue()));
2322
+ this.onTouched();
2323
+ }
2324
+ writeValue(value) {
2325
+ const numericValue = typeof value === 'number'
2326
+ ? value
2327
+ : typeof value === 'string' && value.trim() !== ''
2328
+ ? Number(value)
2329
+ : null;
2330
+ const normalizedValue = numericValue !== null && !Number.isNaN(numericValue)
2331
+ ? numericValue
2332
+ : null;
2333
+ this.rawValue.set(normalizedValue);
2334
+ this.formattedValue.set(this.formatCurrency(normalizedValue));
2335
+ }
2336
+ registerOnChange(fn) {
2337
+ this.onChange = fn;
2338
+ }
2339
+ registerOnTouched(fn) {
2340
+ this.onTouched = fn;
2341
+ }
2342
+ setDisabledState(isDisabled) {
2343
+ this.disabled.set(isDisabled);
2344
+ }
2345
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCurrencyInput, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
2346
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvCurrencyInput, isStandalone: true, selector: "av-currency-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, currencySymbol: { classPropertyName: "currencySymbol", publicName: "currencySymbol", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, currencyCode: { classPropertyName: "currencyCode", publicName: "currencyCode", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ringColor: { classPropertyName: "ringColor", publicName: "ringColor", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputRef"], descendants: true }], ngImport: i0, template: "<div class=\"av-currency-input\" [ngStyle]=\"themeVars()\">\n @if (label()) {\n <label class=\"av-currency-input__label\">\n {{ label() }}\n </label>\n }\n\n <div class=\"av-currency-input__field\">\n @if (currencySymbol()) {\n <div class=\"av-currency-input__symbol\">\n {{ currencySymbol() }}\n </div>\n }\n\n <input\n #inputRef\n type=\"text\"\n inputmode=\"decimal\"\n [value]=\"formattedValue()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n (input)=\"onInput($event)\"\n (blur)=\"handleBlur()\"\n class=\"av-currency-input__control\"\n [class.av-currency-input__control--with-symbol]=\"currencySymbol()\"\n [class.av-currency-input__control--without-symbol]=\"!currencySymbol()\"\n [class.av-currency-input__control--invalid]=\"isInvalid\"\n [style.border-radius]=\"roundedStyle\"\n />\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-currency-input__error\">\n {{ errorMessage() || 'Valor inv\u00E1lido' }}\n </span>\n }\n</div>\n", styles: [".av-currency-input{display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-color-text)}.av-currency-input__label{color:var(--av-color-text);font-size:.875rem;font-weight:700;text-align:start}.av-currency-input__field{align-items:center;display:flex;position:relative;width:100%}.av-currency-input__symbol{align-items:center;background:var(--av-currency-symbol-bg);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-sm);color:var(--av-color-text-muted);display:flex;font-size:.75rem;font-weight:700;left:.625rem;min-width:1.75rem;padding:.125rem .25rem;pointer-events:none;position:absolute;justify-content:center}.av-currency-input__control{background:var(--av-color-surface);border:2px solid var(--av-color-border);box-shadow:var(--av-shadow-control);color:var(--av-color-text);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-weight:600;padding:.5rem 1rem;text-align:right;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease;width:100%}.av-currency-input__control::placeholder{color:var(--av-color-text-subtle)}.av-currency-input__control:hover{border-color:var(--av-color-border-hover)}.av-currency-input__control:focus{border-color:var(--av-currency-accent);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-currency-accent);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-currency-accent) 24%,transparent);outline:none}.av-currency-input__control:disabled{background:var(--av-color-surface-muted);color:var(--av-color-text-muted);cursor:not-allowed;opacity:.72}.av-currency-input__control--with-symbol{padding-left:3rem}.av-currency-input__control--without-symbol{padding-left:1rem}.av-currency-input__control--invalid,.av-currency-input__control--invalid:focus{border-color:var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-color-danger) 24%,transparent);color:var(--av-color-danger-text);animation:av-currency-input-shake .4s ease-in-out}.av-currency-input__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}@keyframes av-currency-input-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2347
+ }
2348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCurrencyInput, decorators: [{
2349
+ type: Component,
2350
+ args: [{ selector: 'av-currency-input', standalone: true, imports: [CommonModule], template: "<div class=\"av-currency-input\" [ngStyle]=\"themeVars()\">\n @if (label()) {\n <label class=\"av-currency-input__label\">\n {{ label() }}\n </label>\n }\n\n <div class=\"av-currency-input__field\">\n @if (currencySymbol()) {\n <div class=\"av-currency-input__symbol\">\n {{ currencySymbol() }}\n </div>\n }\n\n <input\n #inputRef\n type=\"text\"\n inputmode=\"decimal\"\n [value]=\"formattedValue()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n (input)=\"onInput($event)\"\n (blur)=\"handleBlur()\"\n class=\"av-currency-input__control\"\n [class.av-currency-input__control--with-symbol]=\"currencySymbol()\"\n [class.av-currency-input__control--without-symbol]=\"!currencySymbol()\"\n [class.av-currency-input__control--invalid]=\"isInvalid\"\n [style.border-radius]=\"roundedStyle\"\n />\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-currency-input__error\">\n {{ errorMessage() || 'Valor inv\u00E1lido' }}\n </span>\n }\n</div>\n", styles: [".av-currency-input{display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-color-text)}.av-currency-input__label{color:var(--av-color-text);font-size:.875rem;font-weight:700;text-align:start}.av-currency-input__field{align-items:center;display:flex;position:relative;width:100%}.av-currency-input__symbol{align-items:center;background:var(--av-currency-symbol-bg);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-sm);color:var(--av-color-text-muted);display:flex;font-size:.75rem;font-weight:700;left:.625rem;min-width:1.75rem;padding:.125rem .25rem;pointer-events:none;position:absolute;justify-content:center}.av-currency-input__control{background:var(--av-color-surface);border:2px solid var(--av-color-border);box-shadow:var(--av-shadow-control);color:var(--av-color-text);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-weight:600;padding:.5rem 1rem;text-align:right;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease;width:100%}.av-currency-input__control::placeholder{color:var(--av-color-text-subtle)}.av-currency-input__control:hover{border-color:var(--av-color-border-hover)}.av-currency-input__control:focus{border-color:var(--av-currency-accent);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-currency-accent);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-currency-accent) 24%,transparent);outline:none}.av-currency-input__control:disabled{background:var(--av-color-surface-muted);color:var(--av-color-text-muted);cursor:not-allowed;opacity:.72}.av-currency-input__control--with-symbol{padding-left:3rem}.av-currency-input__control--without-symbol{padding-left:1rem}.av-currency-input__control--invalid,.av-currency-input__control--invalid:focus{border-color:var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-color-danger) 24%,transparent);color:var(--av-color-danger-text);animation:av-currency-input-shake .4s ease-in-out}.av-currency-input__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}@keyframes av-currency-input-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-4px)}40%,80%{transform:translate(4px)}}\n"] }]
2351
+ }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
2352
+ type: Optional
2353
+ }, {
2354
+ type: Self
2355
+ }] }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], currencySymbol: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencySymbol", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], currencyCode: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencyCode", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], ringColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "ringColor", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], inputEl: [{
2356
+ type: ViewChild,
2357
+ args: ['inputRef']
2358
+ }] } });
2359
+
2360
+ class AvDateTimePicker {
2361
+ ngControl;
2362
+ config = inject(VISUALS_CONFIG);
2363
+ themeService = inject(ThemeService);
2364
+ mode = input('datetime', /* @ts-ignore */
2365
+ ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
2366
+ label = input('', /* @ts-ignore */
2367
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2368
+ placeholder = input('Selecione...', /* @ts-ignore */
2369
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
2370
+ locale = input('pt-BR', /* @ts-ignore */
2371
+ ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
2372
+ icon = input('', /* @ts-ignore */
2373
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
2374
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
2375
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2376
+ ringColor = input(undefined, /* @ts-ignore */
2377
+ ...(ngDevMode ? [{ debugName: "ringColor" }] : /* istanbul ignore next */ []));
2378
+ rounded = input('md', /* @ts-ignore */
2379
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
2380
+ errorMessage = input('', /* @ts-ignore */
2381
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
2382
+ triggerEl;
2383
+ isOpen = signal(false, /* @ts-ignore */
2384
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
2385
+ disabled = signal(false, /* @ts-ignore */
2386
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
2387
+ selectedDate = signal(null, /* @ts-ignore */
2388
+ ...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
2389
+ viewDate = signal(new Date(), /* @ts-ignore */
2390
+ ...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
2391
+ activeTab = signal('date', /* @ts-ignore */
2392
+ ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
2393
+ hours = signal(new Date().getHours(), /* @ts-ignore */
2394
+ ...(ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []));
2395
+ minutes = signal(0, /* @ts-ignore */
2396
+ ...(ngDevMode ? [{ debugName: "minutes" }] : /* istanbul ignore next */ []));
2397
+ weekDays = ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'];
2398
+ hourOptions = Array.from({ length: 24 }, (_, index) => index);
2399
+ minuteOptions = Array.from({ length: 12 }, (_, index) => index * 5);
2400
+ onChange = () => { };
2401
+ onTouched = () => { };
2402
+ activeVariant = computed(() => this.ringColor() || this.variant(), /* @ts-ignore */
2403
+ ...(ngDevMode ? [{ debugName: "activeVariant" }] : /* istanbul ignore next */ []));
2404
+ themeVars = computed(() => {
2405
+ const variant = this.activeVariant();
2406
+ const isDark = this.themeService.dark();
2407
+ return {
2408
+ '--av-date-accent': `var(--av-${variant}-${isDark ? 400 : 500})`,
2409
+ '--av-date-accent-strong': `var(--av-${variant}-${isDark ? 300 : 600})`,
2410
+ '--av-date-accent-soft': isDark
2411
+ ? `color-mix(in srgb, var(--av-${variant}-400) 16%, transparent)`
2412
+ : `var(--av-${variant}-50)`,
2413
+ };
2414
+ }, /* @ts-ignore */
2415
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
2416
+ calendarDays = computed(() => {
2417
+ const year = this.viewDate().getFullYear();
2418
+ const month = this.viewDate().getMonth();
2419
+ const firstDayOfMonth = new Date(year, month, 1).getDay();
2420
+ const daysInMonth = new Date(year, month + 1, 0).getDate();
2421
+ const days = [];
2422
+ for (let i = 0; i < firstDayOfMonth; i++) {
2423
+ days.push(null);
2424
+ }
2425
+ for (let day = 1; day <= daysInMonth; day++) {
2426
+ days.push(new Date(year, month, day));
2427
+ }
2428
+ return days;
2429
+ }, /* @ts-ignore */
2430
+ ...(ngDevMode ? [{ debugName: "calendarDays" }] : /* istanbul ignore next */ []));
2431
+ monthLabel = computed(() => {
2432
+ return new Intl.DateTimeFormat(this.locale(), {
2433
+ month: 'long',
2434
+ year: 'numeric',
2435
+ }).format(this.viewDate());
2436
+ }, /* @ts-ignore */
2437
+ ...(ngDevMode ? [{ debugName: "monthLabel" }] : /* istanbul ignore next */ []));
2438
+ displayValue = computed(() => {
2439
+ const date = this.selectedDate();
2440
+ if (!date)
2441
+ return '';
2442
+ const time = `${String(this.hours()).padStart(2, '0')}:${String(this.minutes()).padStart(2, '0')}`;
2443
+ if (this.mode() === 'date') {
2444
+ return date.toLocaleDateString(this.locale());
2445
+ }
2446
+ if (this.mode() === 'time') {
2447
+ return time;
2448
+ }
2449
+ return `${date.toLocaleDateString(this.locale())} ${time}`;
2450
+ }, /* @ts-ignore */
2451
+ ...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
2452
+ constructor(ngControl) {
2453
+ this.ngControl = ngControl;
2454
+ if (this.ngControl) {
2455
+ this.ngControl.valueAccessor = this;
2456
+ }
2457
+ }
2458
+ get roundedStyle() {
2459
+ if (typeof this.rounded() === 'string') {
2460
+ return `var(--av-radius-${this.rounded()})`;
2461
+ }
2462
+ return `${this.rounded()}px`;
2463
+ }
2464
+ get defaultIcon() {
2465
+ if (this.icon())
2466
+ return this.icon();
2467
+ return this.mode() === 'time' ? 'schedule' : 'calendar_today';
2468
+ }
2469
+ get isInvalid() {
2470
+ return !!(this.ngControl && this.ngControl.invalid && (this.ngControl.dirty || this.ngControl.touched));
2471
+ }
2472
+ toggleDropdown() {
2473
+ if (this.disabled())
2474
+ return;
2475
+ this.isOpen.set(!this.isOpen());
2476
+ if (this.isOpen()) {
2477
+ this.activeTab.set(this.mode() === 'time' ? 'time' : 'date');
2478
+ }
2479
+ else {
2480
+ this.onTouched();
2481
+ }
2482
+ }
2483
+ closeDropdown() {
2484
+ this.isOpen.set(false);
2485
+ this.onTouched();
2486
+ }
2487
+ changeMonth(offset) {
2488
+ const current = this.viewDate();
2489
+ this.viewDate.set(new Date(current.getFullYear(), current.getMonth() + offset, 1));
2490
+ }
2491
+ selectDay(day) {
2492
+ if (!day)
2493
+ return;
2494
+ const updated = new Date(day.getFullYear(), day.getMonth(), day.getDate(), this.hours(), this.minutes());
2495
+ this.selectedDate.set(updated);
2496
+ this.emitValue(updated);
2497
+ if (this.mode() === 'datetime') {
2498
+ this.activeTab.set('time');
2499
+ return;
2500
+ }
2501
+ if (this.mode() === 'date') {
2502
+ this.closeDropdown();
2503
+ }
2504
+ }
2505
+ selectHour(hour) {
2506
+ this.hours.set(hour);
2507
+ this.updateTimeInSelectedDate();
2508
+ }
2509
+ selectMinute(minute) {
2510
+ this.minutes.set(minute);
2511
+ this.updateTimeInSelectedDate();
2512
+ }
2513
+ confirmSelection() {
2514
+ if (!this.selectedDate()) {
2515
+ this.updateTimeInSelectedDate();
2516
+ }
2517
+ this.closeDropdown();
2518
+ }
2519
+ updateTimeInSelectedDate() {
2520
+ const current = this.selectedDate() || new Date();
2521
+ const updated = new Date(current.getFullYear(), current.getMonth(), current.getDate(), this.hours(), this.minutes());
2522
+ this.selectedDate.set(updated);
2523
+ this.viewDate.set(updated);
2524
+ this.emitValue(updated);
2525
+ }
2526
+ isDaySelected(day) {
2527
+ if (!day || !this.selectedDate())
2528
+ return false;
2529
+ const selected = this.selectedDate();
2530
+ return day.getDate() === selected.getDate()
2531
+ && day.getMonth() === selected.getMonth()
2532
+ && day.getFullYear() === selected.getFullYear();
2533
+ }
2534
+ emitValue(date) {
2535
+ this.onChange(date.toISOString());
2536
+ }
2537
+ writeValue(value) {
2538
+ if (!value) {
2539
+ this.selectedDate.set(null);
2540
+ return;
2541
+ }
2542
+ const parsedDate = value instanceof Date ? value : new Date(value);
2543
+ if (Number.isNaN(parsedDate.getTime())) {
2544
+ this.selectedDate.set(null);
2545
+ return;
2546
+ }
2547
+ this.selectedDate.set(parsedDate);
2548
+ this.viewDate.set(parsedDate);
2549
+ this.hours.set(parsedDate.getHours());
2550
+ this.minutes.set(parsedDate.getMinutes());
2551
+ }
2552
+ registerOnChange(fn) {
2553
+ this.onChange = fn;
2554
+ }
2555
+ registerOnTouched(fn) {
2556
+ this.onTouched = fn;
2557
+ }
2558
+ setDisabledState(isDisabled) {
2559
+ this.disabled.set(isDisabled);
2560
+ }
2561
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvDateTimePicker, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
2562
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvDateTimePicker, isStandalone: true, selector: "av-date-time-picker, av-date-picker", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ringColor: { classPropertyName: "ringColor", publicName: "ringColor", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "triggerEl", first: true, predicate: ["triggerEl"], descendants: true }], ngImport: i0, template: "<div class=\"av-date-picker\" [ngStyle]=\"themeVars()\">\n @if (label()) {\n <label class=\"av-date-picker__label\">{{ label() }}</label>\n }\n\n <button\n #triggerEl\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n type=\"button\"\n (click)=\"toggleDropdown()\"\n class=\"av-date-picker__trigger\"\n [class.av-date-picker__trigger--open]=\"isOpen()\"\n [class.av-date-picker__trigger--disabled]=\"disabled()\"\n [class.av-date-picker__trigger--invalid]=\"isInvalid\"\n [disabled]=\"disabled()\"\n [style.border-radius]=\"roundedStyle\"\n >\n <span class=\"av-date-picker__trigger-icon\">\n <span av-icon [name]=\"defaultIcon\"></span>\n </span>\n\n <span class=\"av-date-picker__trigger-value\" [class.av-date-picker__trigger-value--placeholder]=\"!selectedDate()\">\n {{ displayValue() || placeholder() }}\n </span>\n </button>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-date-picker__error\">\n {{ errorMessage() || 'Data/Hora inv\u00E1lida' }}\n </span>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeDropdown()\"\n>\n <div\n class=\"av-date-picker__panel\"\n [ngStyle]=\"themeVars()\"\n [style.border-radius]=\"roundedStyle\"\n >\n @if (mode() === 'datetime') {\n <div class=\"av-date-picker__tabs\">\n <button\n type=\"button\"\n (click)=\"activeTab.set('date')\"\n class=\"av-date-picker__tab\"\n [class.av-date-picker__tab--active]=\"activeTab() === 'date'\"\n >\n Data\n </button>\n <button\n type=\"button\"\n (click)=\"activeTab.set('time')\"\n class=\"av-date-picker__tab\"\n [class.av-date-picker__tab--active]=\"activeTab() === 'time'\"\n >\n Hora\n </button>\n </div>\n }\n\n @if (activeTab() === 'date') {\n <div class=\"av-date-picker__calendar\">\n <div class=\"av-date-picker__month-nav\">\n <button\n type=\"button\"\n (click)=\"changeMonth(-1)\"\n class=\"av-date-picker__nav-button\"\n aria-label=\"M\u00EAs anterior\"\n >\n <span av-icon name=\"chevron_left\"></span>\n </button>\n <span class=\"av-date-picker__month-label\">\n {{ monthLabel() }}\n </span>\n <button\n type=\"button\"\n (click)=\"changeMonth(1)\"\n class=\"av-date-picker__nav-button\"\n aria-label=\"Pr\u00F3ximo m\u00EAs\"\n >\n <span av-icon name=\"chevron_right\"></span>\n </button>\n </div>\n\n <div class=\"av-date-picker__weekdays\">\n @for (day of weekDays; track day) {\n <span class=\"av-date-picker__weekday\">{{ day }}</span>\n }\n </div>\n\n <div class=\"av-date-picker__days\">\n @for (day of calendarDays(); track $index) {\n @if (day) {\n <button\n type=\"button\"\n (click)=\"selectDay(day)\"\n class=\"av-date-picker__day\"\n [class.av-date-picker__day--selected]=\"isDaySelected(day)\"\n >\n {{ day.getDate() }}\n </button>\n } @else {\n <span class=\"av-date-picker__day-spacer\"></span>\n }\n }\n </div>\n </div>\n }\n\n @if (activeTab() === 'time') {\n <div class=\"av-date-picker__time\">\n <div class=\"av-date-picker__digital-time\">\n <span>{{ hours().toString().padStart(2, '0') }}</span>\n <span>:</span>\n <span>{{ minutes().toString().padStart(2, '0') }}</span>\n </div>\n\n <div class=\"av-date-picker__time-section\">\n <span class=\"av-date-picker__time-label\">Horas</span>\n <div class=\"av-date-picker__time-grid av-date-picker__time-grid--hours\">\n @for (hour of hourOptions; track hour) {\n <button\n type=\"button\"\n (click)=\"selectHour(hour)\"\n class=\"av-date-picker__time-option\"\n [class.av-date-picker__time-option--selected]=\"hours() === hour\"\n >\n {{ hour.toString().padStart(2, '0') }}\n </button>\n }\n </div>\n </div>\n\n <div class=\"av-date-picker__time-section\">\n <span class=\"av-date-picker__time-label\">Minutos</span>\n <div class=\"av-date-picker__time-grid\">\n @for (minute of minuteOptions; track minute) {\n <button\n type=\"button\"\n (click)=\"selectMinute(minute)\"\n class=\"av-date-picker__time-option\"\n [class.av-date-picker__time-option--selected]=\"minutes() === minute\"\n >\n {{ minute.toString().padStart(2, '0') }}\n </button>\n }\n </div>\n </div>\n\n <button\n type=\"button\"\n (click)=\"confirmSelection()\"\n class=\"av-date-picker__confirm\"\n >\n Confirmar\n </button>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".av-date-picker{display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-color-text)}.av-date-picker__label{color:var(--av-color-text);font-size:.875rem;font-weight:700;text-align:start}.av-date-picker__trigger{align-items:center;background:var(--av-color-surface);border:2px solid var(--av-color-border);box-shadow:var(--av-shadow-control);color:var(--av-color-text);cursor:pointer;display:flex;font-size:.875rem;padding:.5rem 1rem .5rem 2.5rem;position:relative;text-align:left;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease;width:100%}.av-date-picker__trigger:hover{border-color:var(--av-color-border-hover)}.av-date-picker__trigger:focus{outline:none}.av-date-picker__trigger--open,.av-date-picker__trigger:focus{border-color:var(--av-date-accent);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-date-accent);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-date-accent) 24%,transparent)}.av-date-picker__trigger--disabled{background:var(--av-color-surface-muted);color:var(--av-color-text-muted);cursor:not-allowed;opacity:.72}.av-date-picker__trigger--invalid,.av-date-picker__trigger--invalid:focus{border-color:var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-color-danger) 24%,transparent);color:var(--av-color-danger-text)}.av-date-picker__trigger-icon{color:var(--av-color-text-subtle);display:flex;left:.75rem;pointer-events:none;position:absolute}.av-date-picker__trigger-value{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.av-date-picker__trigger-value--placeholder{color:var(--av-color-text-subtle)}.av-date-picker__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}.av-date-picker__panel{background:var(--av-color-surface-raised);border:1px solid var(--av-color-border-soft);box-shadow:var(--av-shadow-raised);color:var(--av-color-text);display:flex;flex-direction:column;margin-top:.25rem;overflow:hidden;width:20rem}.av-date-picker__tabs{background:var(--av-color-surface-muted);border-bottom:1px solid var(--av-color-border-soft);display:flex;gap:.25rem;padding:.25rem}.av-date-picker__tab{border-radius:var(--av-radius-md);color:var(--av-color-text-muted);flex:1;font-size:.75rem;font-weight:600;padding:.375rem 0;transition:background-color .2s ease,color .2s ease}.av-date-picker__tab--active{background:var(--av-color-surface);color:var(--av-date-accent-strong)}.av-date-picker__calendar,.av-date-picker__time{padding:1rem}.av-date-picker__time{display:flex;flex-direction:column;gap:.875rem}.av-date-picker__month-nav{align-items:center;display:flex;justify-content:space-between;margin-bottom:1rem}.av-date-picker__nav-button{align-items:center;border-radius:var(--av-radius-full);color:var(--av-color-text-muted);display:flex;height:2rem;justify-content:center;transition:background-color .2s ease,color .2s ease;width:2rem}.av-date-picker__nav-button:hover{background:var(--av-date-accent-soft);color:var(--av-date-accent-strong)}.av-date-picker__month-label{color:var(--av-color-text);font-size:.875rem;font-weight:600;text-transform:capitalize}.av-date-picker__weekdays,.av-date-picker__days{display:grid;gap:.25rem;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center}.av-date-picker__weekdays{margin-bottom:.5rem}.av-date-picker__weekday{color:var(--av-color-text-subtle);font-size:.75rem;font-weight:600}.av-date-picker__day,.av-date-picker__time-option{align-items:center;border-radius:var(--av-radius-md);color:var(--av-color-text);display:flex;font-size:.75rem;font-weight:600;justify-content:center;transition:background-color .2s ease,color .2s ease}.av-date-picker__day,.av-date-picker__day-spacer{height:2rem;width:2rem}.av-date-picker__day:hover,.av-date-picker__time-option:hover{background:var(--av-date-accent-soft);color:var(--av-date-accent-strong)}.av-date-picker__day--selected,.av-date-picker__time-option--selected{background:var(--av-date-accent);color:var(--av-white)}.av-date-picker__digital-time{align-items:center;background:var(--av-color-surface-muted);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-lg);color:var(--av-color-text);display:flex;font-size:1.5rem;font-weight:700;gap:.25rem;justify-content:center;padding:.5rem 1rem}.av-date-picker__time-section{display:flex;flex-direction:column;gap:.375rem}.av-date-picker__time-label{color:var(--av-color-text-muted);font-size:.75rem;font-weight:700}.av-date-picker__time-grid{display:grid;gap:.375rem;grid-template-columns:repeat(6,minmax(0,1fr))}.av-date-picker__time-grid--hours{grid-template-columns:repeat(6,minmax(0,1fr))}.av-date-picker__time-option{border:1px solid var(--av-color-border-soft);height:2rem}.av-date-picker__confirm{background:var(--av-date-accent);border-radius:var(--av-radius-md);color:var(--av-white);font-size:.875rem;font-weight:600;margin-top:.125rem;padding:.5rem 0;transition:background-color .2s ease;width:100%}.av-date-picker__confirm:hover{background:var(--av-date-accent-strong)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
2563
+ }
2564
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvDateTimePicker, decorators: [{
2565
+ type: Component,
2566
+ args: [{ selector: 'av-date-time-picker, av-date-picker', standalone: true, imports: [CommonModule, OverlayModule, AvIcon], template: "<div class=\"av-date-picker\" [ngStyle]=\"themeVars()\">\n @if (label()) {\n <label class=\"av-date-picker__label\">{{ label() }}</label>\n }\n\n <button\n #triggerEl\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n type=\"button\"\n (click)=\"toggleDropdown()\"\n class=\"av-date-picker__trigger\"\n [class.av-date-picker__trigger--open]=\"isOpen()\"\n [class.av-date-picker__trigger--disabled]=\"disabled()\"\n [class.av-date-picker__trigger--invalid]=\"isInvalid\"\n [disabled]=\"disabled()\"\n [style.border-radius]=\"roundedStyle\"\n >\n <span class=\"av-date-picker__trigger-icon\">\n <span av-icon [name]=\"defaultIcon\"></span>\n </span>\n\n <span class=\"av-date-picker__trigger-value\" [class.av-date-picker__trigger-value--placeholder]=\"!selectedDate()\">\n {{ displayValue() || placeholder() }}\n </span>\n </button>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-date-picker__error\">\n {{ errorMessage() || 'Data/Hora inv\u00E1lida' }}\n </span>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeDropdown()\"\n>\n <div\n class=\"av-date-picker__panel\"\n [ngStyle]=\"themeVars()\"\n [style.border-radius]=\"roundedStyle\"\n >\n @if (mode() === 'datetime') {\n <div class=\"av-date-picker__tabs\">\n <button\n type=\"button\"\n (click)=\"activeTab.set('date')\"\n class=\"av-date-picker__tab\"\n [class.av-date-picker__tab--active]=\"activeTab() === 'date'\"\n >\n Data\n </button>\n <button\n type=\"button\"\n (click)=\"activeTab.set('time')\"\n class=\"av-date-picker__tab\"\n [class.av-date-picker__tab--active]=\"activeTab() === 'time'\"\n >\n Hora\n </button>\n </div>\n }\n\n @if (activeTab() === 'date') {\n <div class=\"av-date-picker__calendar\">\n <div class=\"av-date-picker__month-nav\">\n <button\n type=\"button\"\n (click)=\"changeMonth(-1)\"\n class=\"av-date-picker__nav-button\"\n aria-label=\"M\u00EAs anterior\"\n >\n <span av-icon name=\"chevron_left\"></span>\n </button>\n <span class=\"av-date-picker__month-label\">\n {{ monthLabel() }}\n </span>\n <button\n type=\"button\"\n (click)=\"changeMonth(1)\"\n class=\"av-date-picker__nav-button\"\n aria-label=\"Pr\u00F3ximo m\u00EAs\"\n >\n <span av-icon name=\"chevron_right\"></span>\n </button>\n </div>\n\n <div class=\"av-date-picker__weekdays\">\n @for (day of weekDays; track day) {\n <span class=\"av-date-picker__weekday\">{{ day }}</span>\n }\n </div>\n\n <div class=\"av-date-picker__days\">\n @for (day of calendarDays(); track $index) {\n @if (day) {\n <button\n type=\"button\"\n (click)=\"selectDay(day)\"\n class=\"av-date-picker__day\"\n [class.av-date-picker__day--selected]=\"isDaySelected(day)\"\n >\n {{ day.getDate() }}\n </button>\n } @else {\n <span class=\"av-date-picker__day-spacer\"></span>\n }\n }\n </div>\n </div>\n }\n\n @if (activeTab() === 'time') {\n <div class=\"av-date-picker__time\">\n <div class=\"av-date-picker__digital-time\">\n <span>{{ hours().toString().padStart(2, '0') }}</span>\n <span>:</span>\n <span>{{ minutes().toString().padStart(2, '0') }}</span>\n </div>\n\n <div class=\"av-date-picker__time-section\">\n <span class=\"av-date-picker__time-label\">Horas</span>\n <div class=\"av-date-picker__time-grid av-date-picker__time-grid--hours\">\n @for (hour of hourOptions; track hour) {\n <button\n type=\"button\"\n (click)=\"selectHour(hour)\"\n class=\"av-date-picker__time-option\"\n [class.av-date-picker__time-option--selected]=\"hours() === hour\"\n >\n {{ hour.toString().padStart(2, '0') }}\n </button>\n }\n </div>\n </div>\n\n <div class=\"av-date-picker__time-section\">\n <span class=\"av-date-picker__time-label\">Minutos</span>\n <div class=\"av-date-picker__time-grid\">\n @for (minute of minuteOptions; track minute) {\n <button\n type=\"button\"\n (click)=\"selectMinute(minute)\"\n class=\"av-date-picker__time-option\"\n [class.av-date-picker__time-option--selected]=\"minutes() === minute\"\n >\n {{ minute.toString().padStart(2, '0') }}\n </button>\n }\n </div>\n </div>\n\n <button\n type=\"button\"\n (click)=\"confirmSelection()\"\n class=\"av-date-picker__confirm\"\n >\n Confirmar\n </button>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".av-date-picker{display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-color-text)}.av-date-picker__label{color:var(--av-color-text);font-size:.875rem;font-weight:700;text-align:start}.av-date-picker__trigger{align-items:center;background:var(--av-color-surface);border:2px solid var(--av-color-border);box-shadow:var(--av-shadow-control);color:var(--av-color-text);cursor:pointer;display:flex;font-size:.875rem;padding:.5rem 1rem .5rem 2.5rem;position:relative;text-align:left;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease;width:100%}.av-date-picker__trigger:hover{border-color:var(--av-color-border-hover)}.av-date-picker__trigger:focus{outline:none}.av-date-picker__trigger--open,.av-date-picker__trigger:focus{border-color:var(--av-date-accent);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-date-accent);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-date-accent) 24%,transparent)}.av-date-picker__trigger--disabled{background:var(--av-color-surface-muted);color:var(--av-color-text-muted);cursor:not-allowed;opacity:.72}.av-date-picker__trigger--invalid,.av-date-picker__trigger--invalid:focus{border-color:var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-color-danger) 24%,transparent);color:var(--av-color-danger-text)}.av-date-picker__trigger-icon{color:var(--av-color-text-subtle);display:flex;left:.75rem;pointer-events:none;position:absolute}.av-date-picker__trigger-value{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.av-date-picker__trigger-value--placeholder{color:var(--av-color-text-subtle)}.av-date-picker__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}.av-date-picker__panel{background:var(--av-color-surface-raised);border:1px solid var(--av-color-border-soft);box-shadow:var(--av-shadow-raised);color:var(--av-color-text);display:flex;flex-direction:column;margin-top:.25rem;overflow:hidden;width:20rem}.av-date-picker__tabs{background:var(--av-color-surface-muted);border-bottom:1px solid var(--av-color-border-soft);display:flex;gap:.25rem;padding:.25rem}.av-date-picker__tab{border-radius:var(--av-radius-md);color:var(--av-color-text-muted);flex:1;font-size:.75rem;font-weight:600;padding:.375rem 0;transition:background-color .2s ease,color .2s ease}.av-date-picker__tab--active{background:var(--av-color-surface);color:var(--av-date-accent-strong)}.av-date-picker__calendar,.av-date-picker__time{padding:1rem}.av-date-picker__time{display:flex;flex-direction:column;gap:.875rem}.av-date-picker__month-nav{align-items:center;display:flex;justify-content:space-between;margin-bottom:1rem}.av-date-picker__nav-button{align-items:center;border-radius:var(--av-radius-full);color:var(--av-color-text-muted);display:flex;height:2rem;justify-content:center;transition:background-color .2s ease,color .2s ease;width:2rem}.av-date-picker__nav-button:hover{background:var(--av-date-accent-soft);color:var(--av-date-accent-strong)}.av-date-picker__month-label{color:var(--av-color-text);font-size:.875rem;font-weight:600;text-transform:capitalize}.av-date-picker__weekdays,.av-date-picker__days{display:grid;gap:.25rem;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center}.av-date-picker__weekdays{margin-bottom:.5rem}.av-date-picker__weekday{color:var(--av-color-text-subtle);font-size:.75rem;font-weight:600}.av-date-picker__day,.av-date-picker__time-option{align-items:center;border-radius:var(--av-radius-md);color:var(--av-color-text);display:flex;font-size:.75rem;font-weight:600;justify-content:center;transition:background-color .2s ease,color .2s ease}.av-date-picker__day,.av-date-picker__day-spacer{height:2rem;width:2rem}.av-date-picker__day:hover,.av-date-picker__time-option:hover{background:var(--av-date-accent-soft);color:var(--av-date-accent-strong)}.av-date-picker__day--selected,.av-date-picker__time-option--selected{background:var(--av-date-accent);color:var(--av-white)}.av-date-picker__digital-time{align-items:center;background:var(--av-color-surface-muted);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-lg);color:var(--av-color-text);display:flex;font-size:1.5rem;font-weight:700;gap:.25rem;justify-content:center;padding:.5rem 1rem}.av-date-picker__time-section{display:flex;flex-direction:column;gap:.375rem}.av-date-picker__time-label{color:var(--av-color-text-muted);font-size:.75rem;font-weight:700}.av-date-picker__time-grid{display:grid;gap:.375rem;grid-template-columns:repeat(6,minmax(0,1fr))}.av-date-picker__time-grid--hours{grid-template-columns:repeat(6,minmax(0,1fr))}.av-date-picker__time-option{border:1px solid var(--av-color-border-soft);height:2rem}.av-date-picker__confirm{background:var(--av-date-accent);border-radius:var(--av-radius-md);color:var(--av-white);font-size:.875rem;font-weight:600;margin-top:.125rem;padding:.5rem 0;transition:background-color .2s ease;width:100%}.av-date-picker__confirm:hover{background:var(--av-date-accent-strong)}\n"] }]
2567
+ }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
2568
+ type: Optional
2569
+ }, {
2570
+ type: Self
2571
+ }] }], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], ringColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "ringColor", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], triggerEl: [{
2572
+ type: ViewChild,
2573
+ args: ['triggerEl']
2574
+ }] } });
2575
+
2576
+ class AvForm {
2577
+ glass = input(false, /* @ts-ignore */
2578
+ ...(ngDevMode ? [{ debugName: "glass" }] : /* istanbul ignore next */ []));
2579
+ get elementClasses() {
2580
+ return ['av-form', this.glass() ? 'av-form--glass' : 'av-form--solid'].join(' ');
2581
+ }
2582
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvForm, deps: [], target: i0.ɵɵFactoryTarget.Component });
2583
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvForm, isStandalone: true, selector: "form[av-form]", inputs: { glass: { classPropertyName: "glass", publicName: "glass", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.elementClasses" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host(.av-form){display:block;padding:1rem}:host(.av-form--solid){background:var(--av-color-surface);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-lg);box-shadow:var(--av-shadow-raised)}:host(.av-form--glass){background:color-mix(in srgb,var(--av-color-surface) 72%,transparent);border:1px solid color-mix(in srgb,var(--av-color-border) 70%,transparent);border-radius:var(--av-radius-xl);box-shadow:var(--av-shadow-raised);-webkit-backdrop-filter:blur(3.3px);backdrop-filter:blur(3.3px)}\n"] });
2584
+ }
2585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvForm, decorators: [{
2586
+ type: Component,
2587
+ args: [{ selector: 'form[av-form]', standalone: true, template: "<ng-content></ng-content>\n", styles: [":host(.av-form){display:block;padding:1rem}:host(.av-form--solid){background:var(--av-color-surface);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-lg);box-shadow:var(--av-shadow-raised)}:host(.av-form--glass){background:color-mix(in srgb,var(--av-color-surface) 72%,transparent);border:1px solid color-mix(in srgb,var(--av-color-border) 70%,transparent);border-radius:var(--av-radius-xl);box-shadow:var(--av-shadow-raised);-webkit-backdrop-filter:blur(3.3px);backdrop-filter:blur(3.3px)}\n"] }]
2588
+ }], propDecorators: { glass: [{ type: i0.Input, args: [{ isSignal: true, alias: "glass", required: false }] }], elementClasses: [{
2589
+ type: HostBinding,
2590
+ args: ['class']
2591
+ }] } });
2592
+
2593
+ class AvMultiSelect {
2594
+ ngControl;
2595
+ config = inject(VISUALS_CONFIG);
2596
+ themeService = inject(ThemeService);
2597
+ data = input.required(/* @ts-ignore */
2598
+ ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
2599
+ placeholder = input('Selecione as opções', /* @ts-ignore */
2600
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
2601
+ labelKey = input('label', /* @ts-ignore */
2602
+ ...(ngDevMode ? [{ debugName: "labelKey" }] : /* istanbul ignore next */ []));
2603
+ labelFormat = input('', /* @ts-ignore */
2604
+ ...(ngDevMode ? [{ debugName: "labelFormat" }] : /* istanbul ignore next */ []));
2605
+ valueKey = input('value', /* @ts-ignore */
2606
+ ...(ngDevMode ? [{ debugName: "valueKey" }] : /* istanbul ignore next */ []));
2607
+ label = input('', /* @ts-ignore */
2608
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2609
+ icon = input('', /* @ts-ignore */
2610
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
2611
+ searchPlaceholder = input('Pesquisar...', /* @ts-ignore */
2612
+ ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
2613
+ searchable = input(true, /* @ts-ignore */
2614
+ ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
2615
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
2616
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2617
+ ringColor = input(undefined, /* @ts-ignore */
2618
+ ...(ngDevMode ? [{ debugName: "ringColor" }] : /* istanbul ignore next */ []));
2619
+ rounded = input('md', /* @ts-ignore */
2620
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
2621
+ errorMessage = input('', /* @ts-ignore */
2622
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
2623
+ onSearch = input(/* @ts-ignore */
2624
+ ...(ngDevMode ? [undefined, { debugName: "onSearch" }] : /* istanbul ignore next */ []));
2625
+ valueChange = output();
2626
+ triggerEl;
2627
+ isOpen = signal(false, /* @ts-ignore */
2628
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
2629
+ searchTerm = signal('', /* @ts-ignore */
2630
+ ...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
2631
+ value = signal([], /* @ts-ignore */
2632
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
2633
+ disabled = signal(false, /* @ts-ignore */
2634
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
2635
+ onChange = () => { };
2636
+ onTouched = () => { };
2637
+ activeVariant = computed(() => this.ringColor() || this.variant(), /* @ts-ignore */
2638
+ ...(ngDevMode ? [{ debugName: "activeVariant" }] : /* istanbul ignore next */ []));
2639
+ themeVars = computed(() => {
2640
+ const variant = this.activeVariant();
2641
+ const isDark = this.themeService.dark();
2642
+ const accent = `var(--av-${variant}-${isDark ? 400 : 500})`;
2643
+ return {
2644
+ '--av-multi-accent': accent,
2645
+ '--av-multi-accent-strong': `var(--av-${variant}-${isDark ? 300 : 600})`,
2646
+ '--av-multi-soft': isDark
2647
+ ? `color-mix(in srgb, var(--av-${variant}-400) 16%, transparent)`
2648
+ : `var(--av-${variant}-50)`,
2649
+ '--av-multi-selected-bg': isDark
2650
+ ? `color-mix(in srgb, var(--av-${variant}-400) 20%, transparent)`
2651
+ : `var(--av-${variant}-100)`,
2652
+ '--av-multi-selected-color': isDark
2653
+ ? `var(--av-${variant}-100)`
2654
+ : `var(--av-${variant}-800)`,
2655
+ };
2656
+ }, /* @ts-ignore */
2657
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
2658
+ filteredData = computed(() => {
2659
+ const query = this.searchTerm().toLowerCase().trim();
2660
+ const items = this.data() || [];
2661
+ if (!query || this.onSearch())
2662
+ return items;
2663
+ return items.filter((item) => {
2664
+ const labelValue = this.getItemLabel(item);
2665
+ return String(labelValue).toLowerCase().includes(query);
2666
+ });
2667
+ }, /* @ts-ignore */
2668
+ ...(ngDevMode ? [{ debugName: "filteredData" }] : /* istanbul ignore next */ []));
2669
+ selectedOptions = computed(() => {
2670
+ const items = this.data() || [];
2671
+ const currentValues = this.value() || [];
2672
+ return items.filter((item) => currentValues.includes(this.getItemValue(item)));
2673
+ }, /* @ts-ignore */
2674
+ ...(ngDevMode ? [{ debugName: "selectedOptions" }] : /* istanbul ignore next */ []));
2675
+ constructor(ngControl) {
2676
+ this.ngControl = ngControl;
2677
+ if (this.ngControl) {
2678
+ this.ngControl.valueAccessor = this;
2679
+ }
2680
+ }
2681
+ get roundedStyle() {
2682
+ if (typeof this.rounded() === 'string') {
2683
+ return `var(--av-radius-${this.rounded()})`;
2684
+ }
2685
+ return `${this.rounded()}px`;
2686
+ }
2687
+ get triggerClasses() {
2688
+ return [
2689
+ this.isOpen() ? 'av-multi-select__trigger--open' : '',
2690
+ this.disabled() ? 'av-multi-select__trigger--disabled' : '',
2691
+ this.isInvalid ? 'av-multi-select__trigger--invalid' : '',
2692
+ ].filter(Boolean).join(' ');
2693
+ }
2694
+ get isInvalid() {
2695
+ return !!(this.ngControl && this.ngControl.invalid && (this.ngControl.dirty || this.ngControl.touched));
2696
+ }
2697
+ getItemLabel(item) {
2698
+ if (typeof item === 'object' && item !== null) {
2699
+ if (!this.labelFormat() || this.labelFormat().trim() === '') {
2700
+ return item[this.labelKey()];
2701
+ }
2702
+ let label = this.labelFormat();
2703
+ Object.keys(item).forEach((key) => {
2704
+ label = label.replaceAll(`{${key}}`, item[key] ?? '');
2705
+ });
2706
+ return label;
2707
+ }
2708
+ return item;
2709
+ }
2710
+ getItemValue(item) {
2711
+ return typeof item === 'object' && item !== null ? item[this.valueKey()] : item;
2712
+ }
2713
+ isSelected(item) {
2714
+ return (this.value() || []).includes(this.getItemValue(item));
2715
+ }
2716
+ toggleDropdown() {
2717
+ if (this.disabled())
2718
+ return;
2719
+ this.isOpen.set(!this.isOpen());
2720
+ if (!this.isOpen()) {
2721
+ this.onTouched();
2722
+ }
2723
+ }
2724
+ closeDropdown() {
2725
+ this.isOpen.set(false);
2726
+ this.searchTerm.set('');
2727
+ this.onTouched();
2728
+ }
2729
+ toggleOption(item) {
2730
+ const itemValue = this.getItemValue(item);
2731
+ const currentValues = [...(this.value() || [])];
2732
+ const index = currentValues.indexOf(itemValue);
2733
+ if (index > -1) {
2734
+ currentValues.splice(index, 1);
2735
+ }
2736
+ else {
2737
+ currentValues.push(itemValue);
2738
+ }
2739
+ this.value.set(currentValues);
2740
+ this.onChange(currentValues);
2741
+ this.valueChange.emit(currentValues);
2742
+ }
2743
+ removeOption(event, item) {
2744
+ event.stopPropagation();
2745
+ this.toggleOption(item);
2746
+ }
2747
+ handleSearchInput(event) {
2748
+ const query = event.target.value;
2749
+ this.searchTerm.set(query);
2750
+ if (this.onSearch()) {
2751
+ this.onSearch()(query);
2752
+ }
2753
+ }
2754
+ writeValue(value) {
2755
+ this.value.set(Array.isArray(value) ? value : []);
2756
+ }
2757
+ registerOnChange(fn) {
2758
+ this.onChange = fn;
2759
+ }
2760
+ registerOnTouched(fn) {
2761
+ this.onTouched = fn;
2762
+ }
2763
+ setDisabledState(isDisabled) {
2764
+ this.disabled.set(isDisabled);
2765
+ }
2766
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvMultiSelect, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
2767
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvMultiSelect, isStandalone: true, selector: "av-multiselect, av-multi-select", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, labelFormat: { classPropertyName: "labelFormat", publicName: "labelFormat", isSignal: true, isRequired: false, transformFunction: null }, valueKey: { classPropertyName: "valueKey", publicName: "valueKey", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ringColor: { classPropertyName: "ringColor", publicName: "ringColor", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, onSearch: { classPropertyName: "onSearch", publicName: "onSearch", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "triggerEl", first: true, predicate: ["triggerEl"], descendants: true }], ngImport: i0, template: "<div class=\"av-multi-select\" [ngStyle]=\"themeVars()\">\n @if (label()) {\n <label class=\"av-multi-select__label\">\n {{ label() }}\n </label>\n }\n\n <div\n #triggerEl\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"toggleDropdown()\"\n tabindex=\"0\"\n role=\"combobox\"\n class=\"av-multi-select__trigger\"\n [style.border-radius]=\"roundedStyle\"\n [class.av-multi-select__trigger--with-icon]=\"icon()\"\n [class.av-multi-select__trigger--without-icon]=\"!icon()\"\n [ngClass]=\"triggerClasses\"\n >\n @if (icon()) {\n <div class=\"av-multi-select__icon\">\n <span av-icon [name]=\"icon()\"></span>\n </div>\n }\n\n <div class=\"av-multi-select__chips\">\n @for (item of selectedOptions(); track getItemValue(item)) {\n <span class=\"av-multi-select__chip\">\n {{ getItemLabel(item) }}\n <button\n type=\"button\"\n (click)=\"removeOption($event, item)\"\n class=\"av-multi-select__chip-remove\"\n aria-label=\"Remover op\u00E7\u00E3o\"\n >\n <span av-icon name=\"close\" class=\"av-multi-select__chip-remove-icon\"></span>\n </button>\n </span>\n } @empty {\n <span class=\"av-multi-select__placeholder\">\n {{ placeholder() }}\n </span>\n }\n </div>\n\n <div\n class=\"av-multi-select__chevron\"\n [class.av-multi-select__chevron--open]=\"isOpen()\"\n >\n <span av-icon name=\"expand_more\"></span>\n </div>\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-multi-select__error\">\n {{ errorMessage() || 'Selecione ao menos uma op\u00E7\u00E3o' }}\n </span>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeDropdown()\"\n>\n <div\n class=\"av-multi-select__panel\"\n [ngStyle]=\"themeVars()\"\n [style.width.px]=\"triggerEl.offsetWidth\"\n [style.border-radius]=\"roundedStyle\"\n >\n @if (searchable()) {\n <div class=\"av-multi-select__search\">\n <span av-icon name=\"search\" class=\"av-multi-select__search-icon\"></span>\n <input\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchTerm()\"\n (input)=\"handleSearchInput($event)\"\n class=\"av-multi-select__search-input\"\n />\n </div>\n }\n\n <ul class=\"av-multi-select__options\">\n @for (item of filteredData(); track getItemValue(item)) {\n <li\n (click)=\"toggleOption(item)\"\n class=\"av-multi-select__option\"\n [class.av-multi-select__option--selected]=\"isSelected(item)\"\n >\n <span class=\"av-multi-select__option-label\" [class.av-multi-select__option-label--selected]=\"isSelected(item)\">\n {{ getItemLabel(item) }}\n </span>\n\n <div\n class=\"av-multi-select__option-check\"\n [class.av-multi-select__option-check--selected]=\"isSelected(item)\"\n >\n @if (isSelected(item)) {\n <span av-icon name=\"check\" class=\"av-multi-select__option-check-icon\"></span>\n }\n </div>\n </li>\n } @empty {\n <li class=\"av-multi-select__empty\">Nenhuma op\u00E7\u00E3o encontrada</li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: [".av-multi-select{display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-color-text)}.av-multi-select__label{color:var(--av-color-text);font-size:.875rem;font-weight:700;text-align:start}.av-multi-select__trigger{align-items:center;background:var(--av-color-surface);border:2px solid var(--av-color-border);box-shadow:var(--av-shadow-control);color:var(--av-color-text);cursor:pointer;display:flex;min-height:42px;padding:.375rem 2.5rem .375rem .75rem;position:relative;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease;width:100%}.av-multi-select__trigger:hover{border-color:var(--av-color-border-hover)}.av-multi-select__trigger:focus{outline:none}.av-multi-select__trigger--with-icon{padding-left:2.5rem}.av-multi-select__trigger--without-icon{padding-left:.75rem}.av-multi-select__trigger--disabled{background:var(--av-color-surface-muted);color:var(--av-color-text-muted);cursor:not-allowed;opacity:.72}.av-multi-select__trigger--open,.av-multi-select__trigger:focus{border-color:var(--av-multi-accent);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-multi-accent);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-multi-accent) 24%,transparent)}.av-multi-select__trigger--invalid,.av-multi-select__trigger--invalid:focus{border-color:var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-color-danger) 24%,transparent);color:var(--av-color-danger-text)}.av-multi-select__icon,.av-multi-select__chevron{color:var(--av-color-text-subtle);display:flex;pointer-events:none;position:absolute;top:.625rem}.av-multi-select__icon{left:.75rem}.av-multi-select__chevron{right:.75rem;transition:transform .2s ease}.av-multi-select__chevron--open{transform:rotate(180deg)}.av-multi-select__chips{align-items:center;display:flex;flex-wrap:wrap;gap:.375rem;width:100%}.av-multi-select__chip{align-items:center;background:var(--av-multi-selected-bg);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-md);color:var(--av-multi-selected-color);display:inline-flex;font-size:.75rem;font-weight:600;gap:.25rem;max-width:100%;padding:.125rem .5rem}.av-multi-select__chip-remove{align-items:center;border-radius:var(--av-radius-full);color:inherit;display:inline-flex;justify-content:center;transition:color .2s ease}.av-multi-select__chip-remove:hover{color:var(--av-color-danger)}.av-multi-select__placeholder{color:var(--av-color-text-subtle);font-size:.875rem}.av-multi-select__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}.av-multi-select__panel{background:var(--av-color-surface-raised);border:1px solid var(--av-color-border-soft);box-shadow:var(--av-shadow-raised);color:var(--av-color-text);display:flex;flex-direction:column;margin-top:.25rem;max-height:15rem;overflow:hidden}.av-multi-select__search{align-items:center;background:var(--av-color-surface-muted);border-bottom:1px solid var(--av-color-border-soft);display:flex;gap:.5rem;padding:.5rem}.av-multi-select__search-icon{color:var(--av-color-text-subtle);font-size:.875rem}.av-multi-select__search-input{background:transparent;border:0;color:var(--av-color-text);font-size:.875rem;outline:0;width:100%}.av-multi-select__search-input::placeholder{color:var(--av-color-text-subtle)}.av-multi-select__options{flex:1;list-style:none;margin:0;overflow-y:auto;padding:.25rem 0}.av-multi-select__option{align-items:center;color:var(--av-color-text);cursor:pointer;display:flex;font-size:.875rem;justify-content:space-between;padding:.5rem 1rem;transition:background-color .2s ease,color .2s ease;-webkit-user-select:none;user-select:none}.av-multi-select__option:hover{background:var(--av-multi-soft);color:var(--av-multi-selected-color)}.av-multi-select__option--selected{background:var(--av-multi-selected-bg);color:var(--av-multi-selected-color)}.av-multi-select__option-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-multi-select__option-label--selected{font-weight:600}.av-multi-select__option-check{align-items:center;border:1px solid var(--av-color-border);border-radius:var(--av-radius-sm);display:flex;flex-shrink:0;height:1rem;justify-content:center;width:1rem}.av-multi-select__option-check--selected{background:var(--av-multi-accent);border-color:var(--av-multi-accent);color:var(--av-white)}.av-multi-select__option-check-icon{color:var(--av-white);font-size:.75rem}.av-multi-select__empty{color:var(--av-color-text-subtle);font-size:.875rem;padding:.75rem 1rem;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
2768
+ }
2769
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvMultiSelect, decorators: [{
2770
+ type: Component,
2771
+ args: [{ selector: 'av-multiselect, av-multi-select', standalone: true, imports: [CommonModule, OverlayModule, AvIcon], template: "<div class=\"av-multi-select\" [ngStyle]=\"themeVars()\">\n @if (label()) {\n <label class=\"av-multi-select__label\">\n {{ label() }}\n </label>\n }\n\n <div\n #triggerEl\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"toggleDropdown()\"\n tabindex=\"0\"\n role=\"combobox\"\n class=\"av-multi-select__trigger\"\n [style.border-radius]=\"roundedStyle\"\n [class.av-multi-select__trigger--with-icon]=\"icon()\"\n [class.av-multi-select__trigger--without-icon]=\"!icon()\"\n [ngClass]=\"triggerClasses\"\n >\n @if (icon()) {\n <div class=\"av-multi-select__icon\">\n <span av-icon [name]=\"icon()\"></span>\n </div>\n }\n\n <div class=\"av-multi-select__chips\">\n @for (item of selectedOptions(); track getItemValue(item)) {\n <span class=\"av-multi-select__chip\">\n {{ getItemLabel(item) }}\n <button\n type=\"button\"\n (click)=\"removeOption($event, item)\"\n class=\"av-multi-select__chip-remove\"\n aria-label=\"Remover op\u00E7\u00E3o\"\n >\n <span av-icon name=\"close\" class=\"av-multi-select__chip-remove-icon\"></span>\n </button>\n </span>\n } @empty {\n <span class=\"av-multi-select__placeholder\">\n {{ placeholder() }}\n </span>\n }\n </div>\n\n <div\n class=\"av-multi-select__chevron\"\n [class.av-multi-select__chevron--open]=\"isOpen()\"\n >\n <span av-icon name=\"expand_more\"></span>\n </div>\n </div>\n\n @if (isInvalid || errorMessage()) {\n <span class=\"av-multi-select__error\">\n {{ errorMessage() || 'Selecione ao menos uma op\u00E7\u00E3o' }}\n </span>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeDropdown()\"\n>\n <div\n class=\"av-multi-select__panel\"\n [ngStyle]=\"themeVars()\"\n [style.width.px]=\"triggerEl.offsetWidth\"\n [style.border-radius]=\"roundedStyle\"\n >\n @if (searchable()) {\n <div class=\"av-multi-select__search\">\n <span av-icon name=\"search\" class=\"av-multi-select__search-icon\"></span>\n <input\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchTerm()\"\n (input)=\"handleSearchInput($event)\"\n class=\"av-multi-select__search-input\"\n />\n </div>\n }\n\n <ul class=\"av-multi-select__options\">\n @for (item of filteredData(); track getItemValue(item)) {\n <li\n (click)=\"toggleOption(item)\"\n class=\"av-multi-select__option\"\n [class.av-multi-select__option--selected]=\"isSelected(item)\"\n >\n <span class=\"av-multi-select__option-label\" [class.av-multi-select__option-label--selected]=\"isSelected(item)\">\n {{ getItemLabel(item) }}\n </span>\n\n <div\n class=\"av-multi-select__option-check\"\n [class.av-multi-select__option-check--selected]=\"isSelected(item)\"\n >\n @if (isSelected(item)) {\n <span av-icon name=\"check\" class=\"av-multi-select__option-check-icon\"></span>\n }\n </div>\n </li>\n } @empty {\n <li class=\"av-multi-select__empty\">Nenhuma op\u00E7\u00E3o encontrada</li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: [".av-multi-select{display:flex;flex-direction:column;gap:.25rem;width:100%;color:var(--av-color-text)}.av-multi-select__label{color:var(--av-color-text);font-size:.875rem;font-weight:700;text-align:start}.av-multi-select__trigger{align-items:center;background:var(--av-color-surface);border:2px solid var(--av-color-border);box-shadow:var(--av-shadow-control);color:var(--av-color-text);cursor:pointer;display:flex;min-height:42px;padding:.375rem 2.5rem .375rem .75rem;position:relative;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease;width:100%}.av-multi-select__trigger:hover{border-color:var(--av-color-border-hover)}.av-multi-select__trigger:focus{outline:none}.av-multi-select__trigger--with-icon{padding-left:2.5rem}.av-multi-select__trigger--without-icon{padding-left:.75rem}.av-multi-select__trigger--disabled{background:var(--av-color-surface-muted);color:var(--av-color-text-muted);cursor:not-allowed;opacity:.72}.av-multi-select__trigger--open,.av-multi-select__trigger:focus{border-color:var(--av-multi-accent);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-multi-accent);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-multi-accent) 24%,transparent)}.av-multi-select__trigger--invalid,.av-multi-select__trigger--invalid:focus{border-color:var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 2px var(--av-color-danger);box-shadow:var(--av-shadow-control),0 0 0 3px color-mix(in srgb,var(--av-color-danger) 24%,transparent);color:var(--av-color-danger-text)}.av-multi-select__icon,.av-multi-select__chevron{color:var(--av-color-text-subtle);display:flex;pointer-events:none;position:absolute;top:.625rem}.av-multi-select__icon{left:.75rem}.av-multi-select__chevron{right:.75rem;transition:transform .2s ease}.av-multi-select__chevron--open{transform:rotate(180deg)}.av-multi-select__chips{align-items:center;display:flex;flex-wrap:wrap;gap:.375rem;width:100%}.av-multi-select__chip{align-items:center;background:var(--av-multi-selected-bg);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-md);color:var(--av-multi-selected-color);display:inline-flex;font-size:.75rem;font-weight:600;gap:.25rem;max-width:100%;padding:.125rem .5rem}.av-multi-select__chip-remove{align-items:center;border-radius:var(--av-radius-full);color:inherit;display:inline-flex;justify-content:center;transition:color .2s ease}.av-multi-select__chip-remove:hover{color:var(--av-color-danger)}.av-multi-select__placeholder{color:var(--av-color-text-subtle);font-size:.875rem}.av-multi-select__error{color:var(--av-color-danger);font-size:.75rem;font-weight:500}.av-multi-select__panel{background:var(--av-color-surface-raised);border:1px solid var(--av-color-border-soft);box-shadow:var(--av-shadow-raised);color:var(--av-color-text);display:flex;flex-direction:column;margin-top:.25rem;max-height:15rem;overflow:hidden}.av-multi-select__search{align-items:center;background:var(--av-color-surface-muted);border-bottom:1px solid var(--av-color-border-soft);display:flex;gap:.5rem;padding:.5rem}.av-multi-select__search-icon{color:var(--av-color-text-subtle);font-size:.875rem}.av-multi-select__search-input{background:transparent;border:0;color:var(--av-color-text);font-size:.875rem;outline:0;width:100%}.av-multi-select__search-input::placeholder{color:var(--av-color-text-subtle)}.av-multi-select__options{flex:1;list-style:none;margin:0;overflow-y:auto;padding:.25rem 0}.av-multi-select__option{align-items:center;color:var(--av-color-text);cursor:pointer;display:flex;font-size:.875rem;justify-content:space-between;padding:.5rem 1rem;transition:background-color .2s ease,color .2s ease;-webkit-user-select:none;user-select:none}.av-multi-select__option:hover{background:var(--av-multi-soft);color:var(--av-multi-selected-color)}.av-multi-select__option--selected{background:var(--av-multi-selected-bg);color:var(--av-multi-selected-color)}.av-multi-select__option-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-multi-select__option-label--selected{font-weight:600}.av-multi-select__option-check{align-items:center;border:1px solid var(--av-color-border);border-radius:var(--av-radius-sm);display:flex;flex-shrink:0;height:1rem;justify-content:center;width:1rem}.av-multi-select__option-check--selected{background:var(--av-multi-accent);border-color:var(--av-multi-accent);color:var(--av-white)}.av-multi-select__option-check-icon{color:var(--av-white);font-size:.75rem}.av-multi-select__empty{color:var(--av-color-text-subtle);font-size:.875rem;padding:.75rem 1rem;text-align:center}\n"] }]
2772
+ }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
2773
+ type: Optional
2774
+ }, {
2775
+ type: Self
2776
+ }] }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], labelFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFormat", required: false }] }], valueKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueKey", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], ringColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "ringColor", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], onSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSearch", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], triggerEl: [{
2777
+ type: ViewChild,
2778
+ args: ['triggerEl']
2779
+ }] } });
2780
+
2781
+ class AvGrid {
2782
+ cols = input({
2783
+ xs: 1,
2784
+ sm: 2,
2785
+ md: 3,
2786
+ lg: 4,
2787
+ xl: 5,
2788
+ '2xl': 6,
2789
+ }, /* @ts-ignore */
2790
+ ...(ngDevMode ? [{ debugName: "cols" }] : /* istanbul ignore next */ []));
2791
+ empty = input(false, /* @ts-ignore */
2792
+ ...(ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []));
2793
+ gap = input(.5, /* @ts-ignore */
2794
+ ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
2795
+ gridVars = computed(() => {
2796
+ const cols = this.cols();
2797
+ const xs = this.normalize(cols.xs, 1);
2798
+ const sm = this.normalize(cols.sm, xs);
2799
+ const md = this.normalize(cols.md, sm);
2800
+ const lg = this.normalize(cols.lg, md);
2801
+ const xl = this.normalize(cols.xl, lg);
2802
+ const xxl = this.normalize(cols['2xl'], xl);
2803
+ return {
2804
+ '--av-grid-cols-xs': String(xs),
2805
+ '--av-grid-cols-sm': String(sm),
2806
+ '--av-grid-cols-md': String(md),
2807
+ '--av-grid-cols-lg': String(lg),
2808
+ '--av-grid-cols-xl': String(xl),
2809
+ '--av-grid-cols-2xl': String(xxl),
2810
+ };
2811
+ }, /* @ts-ignore */
2812
+ ...(ngDevMode ? [{ debugName: "gridVars" }] : /* istanbul ignore next */ []));
2813
+ normalize(value, fallback) {
2814
+ if (!value || value < 1)
2815
+ return fallback;
2816
+ return Math.floor(value);
2817
+ }
2818
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvGrid, deps: [], target: i0.ɵɵFactoryTarget.Component });
2819
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvGrid, isStandalone: true, selector: "div[av-grid]", inputs: { cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: false, transformFunction: null }, empty: { classPropertyName: "empty", publicName: "empty", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.av-grid--empty": "empty()", "style.--av-grid-cols-xs": "gridVars()[\"--av-grid-cols-xs\"]", "style.--av-grid-cols-sm": "gridVars()[\"--av-grid-cols-sm\"]", "style.--av-grid-cols-md": "gridVars()[\"--av-grid-cols-md\"]", "style.--av-grid-cols-lg": "gridVars()[\"--av-grid-cols-lg\"]", "style.--av-grid-cols-xl": "gridVars()[\"--av-grid-cols-xl\"]", "style.--av-grid-cols-2xl": "gridVars()[\"--av-grid-cols-2xl\"]", "style.--av-grid-gap": "gap() + \"rem\"" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{align-items:start;display:grid;gap:var(--av-grid-gap, .5rem);grid-template-columns:repeat(var(--av-grid-cols-xs, 1),minmax(0,1fr));justify-content:start;width:100%}:host(.av-grid--empty){align-items:center;display:flex;justify-content:center;min-height:8rem}@media(min-width:640px){:host{grid-template-columns:repeat(var(--av-grid-cols-sm, var(--av-grid-cols-xs, 1)),minmax(0,1fr))}}@media(min-width:768px){:host{grid-template-columns:repeat(var(--av-grid-cols-md, var(--av-grid-cols-sm, 1)),minmax(0,1fr))}}@media(min-width:1024px){:host{grid-template-columns:repeat(var(--av-grid-cols-lg, var(--av-grid-cols-md, 1)),minmax(0,1fr))}}@media(min-width:1280px){:host{grid-template-columns:repeat(var(--av-grid-cols-xl, var(--av-grid-cols-lg, 1)),minmax(0,1fr))}}@media(min-width:1536px){:host{grid-template-columns:repeat(var(--av-grid-cols-2xl, var(--av-grid-cols-xl, 1)),minmax(0,1fr))}}\n"] });
2820
+ }
2821
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvGrid, decorators: [{
2822
+ type: Component,
2823
+ args: [{ selector: 'div[av-grid]', standalone: true, host: {
2824
+ '[class.av-grid--empty]': 'empty()',
2825
+ '[style.--av-grid-cols-xs]': 'gridVars()["--av-grid-cols-xs"]',
2826
+ '[style.--av-grid-cols-sm]': 'gridVars()["--av-grid-cols-sm"]',
2827
+ '[style.--av-grid-cols-md]': 'gridVars()["--av-grid-cols-md"]',
2828
+ '[style.--av-grid-cols-lg]': 'gridVars()["--av-grid-cols-lg"]',
2829
+ '[style.--av-grid-cols-xl]': 'gridVars()["--av-grid-cols-xl"]',
2830
+ '[style.--av-grid-cols-2xl]': 'gridVars()["--av-grid-cols-2xl"]',
2831
+ '[style.--av-grid-gap]': 'gap() + "rem"',
2832
+ }, template: "<ng-content></ng-content>\n", styles: [":host{align-items:start;display:grid;gap:var(--av-grid-gap, .5rem);grid-template-columns:repeat(var(--av-grid-cols-xs, 1),minmax(0,1fr));justify-content:start;width:100%}:host(.av-grid--empty){align-items:center;display:flex;justify-content:center;min-height:8rem}@media(min-width:640px){:host{grid-template-columns:repeat(var(--av-grid-cols-sm, var(--av-grid-cols-xs, 1)),minmax(0,1fr))}}@media(min-width:768px){:host{grid-template-columns:repeat(var(--av-grid-cols-md, var(--av-grid-cols-sm, 1)),minmax(0,1fr))}}@media(min-width:1024px){:host{grid-template-columns:repeat(var(--av-grid-cols-lg, var(--av-grid-cols-md, 1)),minmax(0,1fr))}}@media(min-width:1280px){:host{grid-template-columns:repeat(var(--av-grid-cols-xl, var(--av-grid-cols-lg, 1)),minmax(0,1fr))}}@media(min-width:1536px){:host{grid-template-columns:repeat(var(--av-grid-cols-2xl, var(--av-grid-cols-xl, 1)),minmax(0,1fr))}}\n"] }]
2833
+ }], propDecorators: { cols: [{ type: i0.Input, args: [{ isSignal: true, alias: "cols", required: false }] }], empty: [{ type: i0.Input, args: [{ isSignal: true, alias: "empty", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }] } });
2834
+
2835
+ class AvCard {
2836
+ config = inject(VISUALS_CONFIG);
2837
+ themeService = inject(ThemeService);
2838
+ appearance = input('outlined', /* @ts-ignore */
2839
+ ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
2840
+ padding = input('md', /* @ts-ignore */
2841
+ ...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
2842
+ rounded = input('md', /* @ts-ignore */
2843
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
2844
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
2845
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2846
+ themeVars = computed(() => {
2847
+ const variant = this.variant();
2848
+ const isDark = this.themeService.dark();
2849
+ const accent = `var(--av-${variant}-${isDark ? 400 : 500})`;
2850
+ return {
2851
+ '--av-card-accent': accent,
2852
+ '--av-card-accent-soft': isDark
2853
+ ? `color-mix(in srgb, var(--av-${variant}-400) 14%, transparent)`
2854
+ : `var(--av-${variant}-50)`,
2855
+ '--av-card-bg': 'var(--av-color-surface)',
2856
+ '--av-card-border': 'var(--av-color-border-soft)',
2857
+ '--av-card-muted': 'var(--av-color-text-muted)',
2858
+ '--av-card-padding': this.paddingStyle(),
2859
+ '--av-card-radius': this.roundedStyle(),
2860
+ '--av-card-shadow': 'var(--av-shadow-control)',
2861
+ '--av-card-text': 'var(--av-color-text)',
2862
+ };
2863
+ }, /* @ts-ignore */
2864
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
2865
+ isFilled = computed(() => this.appearance() === 'filled', /* @ts-ignore */
2866
+ ...(ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []));
2867
+ isElevated = computed(() => this.appearance() === 'elevated', /* @ts-ignore */
2868
+ ...(ngDevMode ? [{ debugName: "isElevated" }] : /* istanbul ignore next */ []));
2869
+ paddingStyle() {
2870
+ const padding = this.padding();
2871
+ if (typeof padding === 'number') {
2872
+ return `${padding}px`;
2873
+ }
2874
+ const sizes = {
2875
+ none: '0',
2876
+ xs: '.5rem',
2877
+ sm: '.75rem',
2878
+ md: '1rem',
2879
+ lg: '1.25rem',
2880
+ xl: '1.5rem',
2881
+ };
2882
+ return sizes[padding] ?? sizes.md;
2883
+ }
2884
+ roundedStyle() {
2885
+ const rounded = this.rounded();
2886
+ return typeof rounded === 'string'
2887
+ ? `var(--av-radius-${rounded})`
2888
+ : `${rounded}px`;
2889
+ }
2890
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
2891
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvCard, isStandalone: true, selector: "av-card", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<article\n class=\"av-card\"\n [class.av-card--filled]=\"isFilled()\"\n [class.av-card--elevated]=\"isElevated()\"\n [ngStyle]=\"themeVars()\"\n>\n <div class=\"av-card__header\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"av-card__content\">\n <ng-content select=\"[content]\"></ng-content>\n <ng-content></ng-content>\n </div>\n\n <div class=\"av-card__footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n</article>\n", styles: [":host{display:block;min-width:0}.av-card{background:var(--av-card-bg, var(--av-color-surface));border:1px solid var(--av-card-border, var(--av-color-border-soft));border-radius:var(--av-card-radius, var(--av-radius-md));box-shadow:var(--av-card-shadow, var(--av-shadow-control));color:var(--av-card-text, var(--av-color-text));display:flex;flex-direction:column;min-width:0;overflow:hidden;position:relative;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease}.av-card:before{background:var(--av-card-accent);content:\"\";flex:0 0 3px}.av-card--filled{background:var(--av-card-accent-soft);border-color:color-mix(in srgb,var(--av-card-accent) 26%,var(--av-card-border))}.av-card--elevated{border-color:transparent;box-shadow:var(--av-shadow-raised)}.av-card__header,.av-card__content,.av-card__footer{min-width:0;padding:var(--av-card-padding, 1rem)}.av-card__header{color:var(--av-card-text, var(--av-color-text));font-weight:600}.av-card__footer{color:var(--av-card-muted, var(--av-color-text-muted))}.av-card__header:not(:empty){border-bottom:1px solid var(--av-card-border, var(--av-color-border-soft))}.av-card__footer:not(:empty){border-top:1px solid var(--av-card-border, var(--av-color-border-soft))}.av-card__header:empty,.av-card__content:empty,.av-card__footer:empty{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2892
+ }
2893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCard, decorators: [{
2894
+ type: Component,
2895
+ args: [{ imports: [CommonModule], selector: 'av-card', standalone: true, template: "<article\n class=\"av-card\"\n [class.av-card--filled]=\"isFilled()\"\n [class.av-card--elevated]=\"isElevated()\"\n [ngStyle]=\"themeVars()\"\n>\n <div class=\"av-card__header\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"av-card__content\">\n <ng-content select=\"[content]\"></ng-content>\n <ng-content></ng-content>\n </div>\n\n <div class=\"av-card__footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n</article>\n", styles: [":host{display:block;min-width:0}.av-card{background:var(--av-card-bg, var(--av-color-surface));border:1px solid var(--av-card-border, var(--av-color-border-soft));border-radius:var(--av-card-radius, var(--av-radius-md));box-shadow:var(--av-card-shadow, var(--av-shadow-control));color:var(--av-card-text, var(--av-color-text));display:flex;flex-direction:column;min-width:0;overflow:hidden;position:relative;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease}.av-card:before{background:var(--av-card-accent);content:\"\";flex:0 0 3px}.av-card--filled{background:var(--av-card-accent-soft);border-color:color-mix(in srgb,var(--av-card-accent) 26%,var(--av-card-border))}.av-card--elevated{border-color:transparent;box-shadow:var(--av-shadow-raised)}.av-card__header,.av-card__content,.av-card__footer{min-width:0;padding:var(--av-card-padding, 1rem)}.av-card__header{color:var(--av-card-text, var(--av-color-text));font-weight:600}.av-card__footer{color:var(--av-card-muted, var(--av-color-text-muted))}.av-card__header:not(:empty){border-bottom:1px solid var(--av-card-border, var(--av-color-border-soft))}.av-card__footer:not(:empty){border-top:1px solid var(--av-card-border, var(--av-color-border-soft))}.av-card__header:empty,.av-card__content:empty,.av-card__footer:empty{display:none}\n"] }]
2896
+ }], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
2897
+
2898
+ class AvButton {
2899
+ config = inject(VISUALS_CONFIG);
2900
+ icon = input(/* @ts-ignore */
2901
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
2902
+ loadingIcon = input('blocks-shuffle-3', /* @ts-ignore */
2903
+ ...(ngDevMode ? [{ debugName: "loadingIcon" }] : /* istanbul ignore next */ []));
2904
+ loading = input(false, /* @ts-ignore */
2905
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
2906
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
2907
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2908
+ rounded = input("md", /* @ts-ignore */
2909
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
2910
+ get roundedClass() {
2911
+ if (typeof this.rounded() === "string") {
2912
+ return `var(--av-radius-${this.rounded()})`;
2913
+ }
2914
+ return `${this.rounded()}px`;
2915
+ }
2916
+ get lightBackground() {
2917
+ return `var(--av-${this.variant()}-500)`;
2918
+ }
2919
+ get lightHoverBackground() {
2920
+ return `var(--av-${this.variant()}-600)`;
2921
+ }
2922
+ get darkBackground() {
2923
+ return `var(--av-${this.variant()}-600)`;
2924
+ }
2925
+ get darkHoverBackground() {
2926
+ return `var(--av-${this.variant()}-500)`;
2927
+ }
2928
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
2929
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvButton, isStandalone: true, selector: "button[av-button], a[av-button]", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.border-radius": "this.roundedClass", "style.--av-button-light-bg": "this.lightBackground", "style.--av-button-light-hover-bg": "this.lightHoverBackground", "style.--av-button-dark-bg": "this.darkBackground", "style.--av-button-dark-hover-bg": "this.darkHoverBackground" } }, ngImport: i0, template: "@if(icon() || loading()) {<span av-icon [name]=\"loading()? loadingIcon()!: icon()!\"></span>}\n<div class=\"btn-content\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{--av-button-focus-color: var(--av-button-light-bg);--av-button-shadow: rgba(50, 50, 93, .25) 0 6px 12px -2px, rgba(0, 0, 0, .3) 0 3px 7px -3px;display:inline-flex;width:fit-content;flex-shrink:0;align-items:center;justify-content:center;gap:5px;padding:8px 16px;font-size:14px;font-weight:500;background-color:var(--av-button-light-bg);color:var(--av-white);transition:background-color .15s ease,color .15s ease,transform .15s ease;cursor:pointer;box-shadow:var(--av-button-shadow)}:host:hover{background-color:var(--av-button-light-hover-bg)}:host:active{transform:scale(.95)}:host:focus-visible{outline:none;box-shadow:var(--av-button-shadow),0 0 0 2px var(--av-button-focus-color);box-shadow:var(--av-button-shadow),0 0 0 3px color-mix(in srgb,var(--av-button-focus-color) 28%,transparent)}:host-context([data-av-theme=\"dark\"]){--av-button-focus-color: var(--av-button-dark-hover-bg);--av-button-shadow: 0 12px 24px -12px rgb(0 0 0 / .62), 0 4px 10px -6px rgb(0 0 0 / .5);background-color:var(--av-button-dark-bg)}:host-context([data-av-theme=\"dark\"]):hover{background-color:var(--av-button-dark-hover-bg)}.btn-content{display:flex;align-items:center;justify-content:center}\n"], dependencies: [{ kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
2930
+ }
2931
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvButton, decorators: [{
2932
+ type: Component,
2933
+ args: [{ imports: [AvIcon], selector: 'button[av-button], a[av-button]', template: "@if(icon() || loading()) {<span av-icon [name]=\"loading()? loadingIcon()!: icon()!\"></span>}\n<div class=\"btn-content\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{--av-button-focus-color: var(--av-button-light-bg);--av-button-shadow: rgba(50, 50, 93, .25) 0 6px 12px -2px, rgba(0, 0, 0, .3) 0 3px 7px -3px;display:inline-flex;width:fit-content;flex-shrink:0;align-items:center;justify-content:center;gap:5px;padding:8px 16px;font-size:14px;font-weight:500;background-color:var(--av-button-light-bg);color:var(--av-white);transition:background-color .15s ease,color .15s ease,transform .15s ease;cursor:pointer;box-shadow:var(--av-button-shadow)}:host:hover{background-color:var(--av-button-light-hover-bg)}:host:active{transform:scale(.95)}:host:focus-visible{outline:none;box-shadow:var(--av-button-shadow),0 0 0 2px var(--av-button-focus-color);box-shadow:var(--av-button-shadow),0 0 0 3px color-mix(in srgb,var(--av-button-focus-color) 28%,transparent)}:host-context([data-av-theme=\"dark\"]){--av-button-focus-color: var(--av-button-dark-hover-bg);--av-button-shadow: 0 12px 24px -12px rgb(0 0 0 / .62), 0 4px 10px -6px rgb(0 0 0 / .5);background-color:var(--av-button-dark-bg)}:host-context([data-av-theme=\"dark\"]):hover{background-color:var(--av-button-dark-hover-bg)}.btn-content{display:flex;align-items:center;justify-content:center}\n"] }]
2934
+ }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], roundedClass: [{
2935
+ type: HostBinding,
2936
+ args: ['style.border-radius']
2937
+ }], lightBackground: [{
2938
+ type: HostBinding,
2939
+ args: ['style.--av-button-light-bg']
2940
+ }], lightHoverBackground: [{
2941
+ type: HostBinding,
2942
+ args: ['style.--av-button-light-hover-bg']
2943
+ }], darkBackground: [{
2944
+ type: HostBinding,
2945
+ args: ['style.--av-button-dark-bg']
2946
+ }], darkHoverBackground: [{
2947
+ type: HostBinding,
2948
+ args: ['style.--av-button-dark-hover-bg']
2949
+ }] } });
2950
+
2951
+ class AvPaginator {
2952
+ config = inject(VISUALS_CONFIG);
2953
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
2954
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2955
+ pageIndex = input.required(/* @ts-ignore */
2956
+ ...(ngDevMode ? [{ debugName: "pageIndex" }] : /* istanbul ignore next */ []));
2957
+ totalPages = input.required(/* @ts-ignore */
2958
+ ...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
2959
+ pageChanged = output();
2960
+ safeTotalPages = computed(() => Math.max(0, this.totalPages()), /* @ts-ignore */
2961
+ ...(ngDevMode ? [{ debugName: "safeTotalPages" }] : /* istanbul ignore next */ []));
2962
+ currentPage = computed(() => {
2963
+ if (this.safeTotalPages() <= 0)
2964
+ return 0;
2965
+ return Math.min(Math.max(this.pageIndex(), 0), this.safeTotalPages() - 1);
2966
+ }, /* @ts-ignore */
2967
+ ...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
2968
+ canGoBack = computed(() => this.currentPage() > 0, /* @ts-ignore */
2969
+ ...(ngDevMode ? [{ debugName: "canGoBack" }] : /* istanbul ignore next */ []));
2970
+ canGoForward = computed(() => this.currentPage() + 1 < this.safeTotalPages(), /* @ts-ignore */
2971
+ ...(ngDevMode ? [{ debugName: "canGoForward" }] : /* istanbul ignore next */ []));
2972
+ changePage(page) {
2973
+ if (this.safeTotalPages() <= 0)
2974
+ return;
2975
+ const nextPage = Math.min(Math.max(page, 0), this.safeTotalPages() - 1);
2976
+ if (nextPage === this.currentPage())
2977
+ return;
2978
+ this.pageChanged.emit(nextPage);
2979
+ }
2980
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvPaginator, deps: [], target: i0.ɵɵFactoryTarget.Component });
2981
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvPaginator, isStandalone: true, selector: "av-paginator", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: true, transformFunction: null }, totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { pageChanged: "pageChanged" }, ngImport: i0, template: "<nav class=\"av-paginator\" aria-label=\"Pagina\u00E7\u00E3o\">\n <button\n av-button\n [variant]=\"variant()\"\n type=\"button\"\n (click)=\"changePage(0)\"\n [disabled]=\"!canGoBack()\"\n aria-label=\"Primeira p\u00E1gina\"\n >\n <span av-icon name=\"double_arrow_left\"></span>\n </button>\n\n <button\n av-button\n [variant]=\"variant()\"\n type=\"button\"\n (click)=\"changePage(currentPage() - 1)\"\n [disabled]=\"!canGoBack()\"\n aria-label=\"P\u00E1gina anterior\"\n >\n <span av-icon name=\"arrow_left\" size=\"sm\"></span>\n </button>\n\n <span class=\"av-paginator__page\">\n P\u00E1gina {{ safeTotalPages() === 0 ? 0 : currentPage() + 1 }} de {{ safeTotalPages() }}\n </span>\n\n <button\n av-button\n [variant]=\"variant()\"\n type=\"button\"\n (click)=\"changePage(currentPage() + 1)\"\n [disabled]=\"!canGoForward()\"\n aria-label=\"Pr\u00F3xima p\u00E1gina\"\n >\n <span av-icon name=\"arrow_right\" size=\"sm\"></span>\n </button>\n\n <button\n av-button\n [variant]=\"variant()\"\n type=\"button\"\n (click)=\"changePage(safeTotalPages() - 1)\"\n [disabled]=\"!canGoForward()\"\n aria-label=\"\u00DAltima p\u00E1gina\"\n >\n <span av-icon name=\"double_arrow_right\"></span>\n </button>\n</nav>\n", styles: [":host{display:block;width:100%}.av-paginator{align-items:stretch;display:grid;gap:.25rem;grid-template-columns:auto auto minmax(8rem,1fr) auto auto;width:100%}.av-paginator [av-button]{min-height:2.25rem;padding-inline:.75rem}.av-paginator [av-button]:disabled{cursor:not-allowed;opacity:.48;transform:none}.av-paginator__page{align-items:center;color:var(--av-color-text-muted);display:flex;font-size:.875rem;font-weight:700;justify-content:center;padding-inline:.75rem;text-align:center}\n"], dependencies: [{ kind: "component", type: AvButton, selector: "button[av-button], a[av-button]", inputs: ["icon", "loadingIcon", "loading", "variant", "rounded"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
2982
+ }
2983
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvPaginator, decorators: [{
2984
+ type: Component,
2985
+ args: [{ selector: 'av-paginator', standalone: true, imports: [AvButton, AvIcon], template: "<nav class=\"av-paginator\" aria-label=\"Pagina\u00E7\u00E3o\">\n <button\n av-button\n [variant]=\"variant()\"\n type=\"button\"\n (click)=\"changePage(0)\"\n [disabled]=\"!canGoBack()\"\n aria-label=\"Primeira p\u00E1gina\"\n >\n <span av-icon name=\"double_arrow_left\"></span>\n </button>\n\n <button\n av-button\n [variant]=\"variant()\"\n type=\"button\"\n (click)=\"changePage(currentPage() - 1)\"\n [disabled]=\"!canGoBack()\"\n aria-label=\"P\u00E1gina anterior\"\n >\n <span av-icon name=\"arrow_left\" size=\"sm\"></span>\n </button>\n\n <span class=\"av-paginator__page\">\n P\u00E1gina {{ safeTotalPages() === 0 ? 0 : currentPage() + 1 }} de {{ safeTotalPages() }}\n </span>\n\n <button\n av-button\n [variant]=\"variant()\"\n type=\"button\"\n (click)=\"changePage(currentPage() + 1)\"\n [disabled]=\"!canGoForward()\"\n aria-label=\"Pr\u00F3xima p\u00E1gina\"\n >\n <span av-icon name=\"arrow_right\" size=\"sm\"></span>\n </button>\n\n <button\n av-button\n [variant]=\"variant()\"\n type=\"button\"\n (click)=\"changePage(safeTotalPages() - 1)\"\n [disabled]=\"!canGoForward()\"\n aria-label=\"\u00DAltima p\u00E1gina\"\n >\n <span av-icon name=\"double_arrow_right\"></span>\n </button>\n</nav>\n", styles: [":host{display:block;width:100%}.av-paginator{align-items:stretch;display:grid;gap:.25rem;grid-template-columns:auto auto minmax(8rem,1fr) auto auto;width:100%}.av-paginator [av-button]{min-height:2.25rem;padding-inline:.75rem}.av-paginator [av-button]:disabled{cursor:not-allowed;opacity:.48;transform:none}.av-paginator__page{align-items:center;color:var(--av-color-text-muted);display:flex;font-size:.875rem;font-weight:700;justify-content:center;padding-inline:.75rem;text-align:center}\n"] }]
2986
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], pageIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageIndex", required: true }] }], totalPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPages", required: true }] }], pageChanged: [{ type: i0.Output, args: ["pageChanged"] }] } });
2987
+
2988
+ class AvProgressBarCircle {
2989
+ config = inject(VISUALS_CONFIG);
2990
+ themeService = inject(ThemeService);
2991
+ value = input.required(/* @ts-ignore */
2992
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
2993
+ max = input.required(/* @ts-ignore */
2994
+ ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
2995
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
2996
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2997
+ striped = input(false, /* @ts-ignore */
2998
+ ...(ngDevMode ? [{ debugName: "striped" }] : /* istanbul ignore next */ []));
2999
+ showPercent = input(true, /* @ts-ignore */
3000
+ ...(ngDevMode ? [{ debugName: "showPercent" }] : /* istanbul ignore next */ []));
3001
+ size = input(120, /* @ts-ignore */
3002
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3003
+ strokeWidth = input(12, /* @ts-ignore */
3004
+ ...(ngDevMode ? [{ debugName: "strokeWidth" }] : /* istanbul ignore next */ []));
3005
+ static nextId = 0;
3006
+ stripeId = `av-progress-circle-stripe-${Math.random()}`;
3007
+ radius = computed(() => 50 - this.strokeWidth() / 2, /* @ts-ignore */
3008
+ ...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
3009
+ circumference = computed(() => 2 * Math.PI * this.radius(), /* @ts-ignore */
3010
+ ...(ngDevMode ? [{ debugName: "circumference" }] : /* istanbul ignore next */ []));
3011
+ percentValue = computed(() => {
3012
+ if (this.max() <= 0)
3013
+ return 0;
3014
+ return Math.min(100, Math.max(0, (this.value() / this.max()) * 100));
3015
+ }, /* @ts-ignore */
3016
+ ...(ngDevMode ? [{ debugName: "percentValue" }] : /* istanbul ignore next */ []));
3017
+ percentLabel = computed(() => Math.round(this.percentValue()), /* @ts-ignore */
3018
+ ...(ngDevMode ? [{ debugName: "percentLabel" }] : /* istanbul ignore next */ []));
3019
+ dashOffset = computed(() => this.circumference() * (1 - this.percentValue() / 100), /* @ts-ignore */
3020
+ ...(ngDevMode ? [{ debugName: "dashOffset" }] : /* istanbul ignore next */ []));
3021
+ themeVars = computed(() => {
3022
+ const variant = this.variant();
3023
+ const isDark = this.themeService.dark();
3024
+ return {
3025
+ '--av-progress-circle-fill': `var(--av-${variant}-${isDark ? 400 : 500})`,
3026
+ '--av-progress-circle-track': isDark
3027
+ ? `color-mix(in srgb, var(--av-${variant}-400) 18%, var(--av-color-surface-muted))`
3028
+ : `var(--av-${variant}-100)`,
3029
+ };
3030
+ }, /* @ts-ignore */
3031
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
3032
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvProgressBarCircle, deps: [], target: i0.ɵɵFactoryTarget.Component });
3033
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvProgressBarCircle, isStandalone: true, selector: "av-progress-bar-circle", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, showPercent: { classPropertyName: "showPercent", publicName: "showPercent", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"av-progress-circle\"\n [ngStyle]=\"themeVars()\"\n [style.width.px]=\"size()\"\n [style.height.px]=\"size()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"percentLabel()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n>\n <svg class=\"av-progress-circle__svg\" viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle\n class=\"av-progress-circle__track\"\n cx=\"50\"\n cy=\"50\"\n fill=\"transparent\"\n [attr.r]=\"radius()\"\n [attr.stroke-width]=\"strokeWidth()\"\n ></circle>\n <circle\n class=\"av-progress-circle__fill\"\n [class.av-progress-circle__fill--striped]=\"striped()\"\n cx=\"50\"\n cy=\"50\"\n fill=\"transparent\"\n stroke-linecap=\"round\"\n [attr.r]=\"radius()\"\n [attr.stroke-width]=\"strokeWidth()\"\n [attr.stroke-dasharray]=\"circumference()\"\n [attr.stroke-dashoffset]=\"dashOffset()\"\n ></circle>\n </svg>\n\n @if (showPercent()) {\n <span class=\"av-progress-circle__label\"> {{ percentLabel() }}% </span>\n }\n</div>\n", styles: [":host{display:inline-block}.av-progress-circle{color:var(--av-color-text);position:relative}.av-progress-circle__svg{display:block;height:100%;transform:rotate(-90deg);width:100%}.av-progress-circle__track{stroke:var(--av-progress-circle-track)}.av-progress-circle__fill{stroke:var(--av-progress-circle-fill);transition:stroke .2s ease,stroke-dashoffset .35s ease}.av-progress-circle__fill--striped{animation:av-progress-circle-pulse 1.2s ease-in-out infinite}.av-progress-circle__label{color:var(--av-progress-circle-fill);font-size:1.25rem;font-weight:700;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%)}@keyframes av-progress-circle-pulse{50%{opacity:.72}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
3034
+ }
3035
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvProgressBarCircle, decorators: [{
3036
+ type: Component,
3037
+ args: [{ selector: 'av-progress-bar-circle', standalone: true, imports: [CommonModule], template: "<div\n class=\"av-progress-circle\"\n [ngStyle]=\"themeVars()\"\n [style.width.px]=\"size()\"\n [style.height.px]=\"size()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"percentLabel()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n>\n <svg class=\"av-progress-circle__svg\" viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle\n class=\"av-progress-circle__track\"\n cx=\"50\"\n cy=\"50\"\n fill=\"transparent\"\n [attr.r]=\"radius()\"\n [attr.stroke-width]=\"strokeWidth()\"\n ></circle>\n <circle\n class=\"av-progress-circle__fill\"\n [class.av-progress-circle__fill--striped]=\"striped()\"\n cx=\"50\"\n cy=\"50\"\n fill=\"transparent\"\n stroke-linecap=\"round\"\n [attr.r]=\"radius()\"\n [attr.stroke-width]=\"strokeWidth()\"\n [attr.stroke-dasharray]=\"circumference()\"\n [attr.stroke-dashoffset]=\"dashOffset()\"\n ></circle>\n </svg>\n\n @if (showPercent()) {\n <span class=\"av-progress-circle__label\"> {{ percentLabel() }}% </span>\n }\n</div>\n", styles: [":host{display:inline-block}.av-progress-circle{color:var(--av-color-text);position:relative}.av-progress-circle__svg{display:block;height:100%;transform:rotate(-90deg);width:100%}.av-progress-circle__track{stroke:var(--av-progress-circle-track)}.av-progress-circle__fill{stroke:var(--av-progress-circle-fill);transition:stroke .2s ease,stroke-dashoffset .35s ease}.av-progress-circle__fill--striped{animation:av-progress-circle-pulse 1.2s ease-in-out infinite}.av-progress-circle__label{color:var(--av-progress-circle-fill);font-size:1.25rem;font-weight:700;left:50%;line-height:1;position:absolute;top:50%;transform:translate(-50%,-50%)}@keyframes av-progress-circle-pulse{50%{opacity:.72}}\n"] }]
3038
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], showPercent: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPercent", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }] } });
3039
+
3040
+ class AvProgressBar {
3041
+ config = inject(VISUALS_CONFIG);
3042
+ themeService = inject(ThemeService);
3043
+ value = input.required(/* @ts-ignore */
3044
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
3045
+ max = input.required(/* @ts-ignore */
3046
+ ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
3047
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
3048
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3049
+ striped = input(false, /* @ts-ignore */
3050
+ ...(ngDevMode ? [{ debugName: "striped" }] : /* istanbul ignore next */ []));
3051
+ showPercent = input(true, /* @ts-ignore */
3052
+ ...(ngDevMode ? [{ debugName: "showPercent" }] : /* istanbul ignore next */ []));
3053
+ percentPos = input('center', /* @ts-ignore */
3054
+ ...(ngDevMode ? [{ debugName: "percentPos" }] : /* istanbul ignore next */ []));
3055
+ gradient = input(false, /* @ts-ignore */
3056
+ ...(ngDevMode ? [{ debugName: "gradient" }] : /* istanbul ignore next */ []));
3057
+ from = input('', /* @ts-ignore */
3058
+ ...(ngDevMode ? [{ debugName: "from" }] : /* istanbul ignore next */ []));
3059
+ to = input('', /* @ts-ignore */
3060
+ ...(ngDevMode ? [{ debugName: "to" }] : /* istanbul ignore next */ []));
3061
+ height = input(20, /* @ts-ignore */
3062
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
3063
+ percentValue = computed(() => {
3064
+ if (this.max() <= 0)
3065
+ return 0;
3066
+ return Math.min(100, Math.max(0, (this.value() / this.max()) * 100));
3067
+ }, /* @ts-ignore */
3068
+ ...(ngDevMode ? [{ debugName: "percentValue" }] : /* istanbul ignore next */ []));
3069
+ percentLabel = computed(() => Math.round(this.percentValue()), /* @ts-ignore */
3070
+ ...(ngDevMode ? [{ debugName: "percentLabel" }] : /* istanbul ignore next */ []));
3071
+ themeVars = computed(() => {
3072
+ const variant = this.variant();
3073
+ const isDark = this.themeService.dark();
3074
+ const from = this.from() || `var(--av-${variant}-${isDark ? 400 : 500})`;
3075
+ const to = this.to() || `var(--av-${variant}-${isDark ? 500 : 600})`;
3076
+ return {
3077
+ '--av-progress-fill': `var(--av-${variant}-${isDark ? 400 : 500})`,
3078
+ '--av-progress-fill-strong': `var(--av-${variant}-${isDark ? 300 : 600})`,
3079
+ '--av-progress-gradient-from': from,
3080
+ '--av-progress-gradient-to': to,
3081
+ '--av-progress-track': isDark
3082
+ ? `color-mix(in srgb, var(--av-${variant}-400) 18%, var(--av-color-surface-muted))`
3083
+ : `var(--av-${variant}-100)`,
3084
+ };
3085
+ }, /* @ts-ignore */
3086
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
3087
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvProgressBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
3088
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvProgressBar, isStandalone: true, selector: "av-progress-bar, av-progress-bard", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, showPercent: { classPropertyName: "showPercent", publicName: "showPercent", isSignal: true, isRequired: false, transformFunction: null }, percentPos: { classPropertyName: "percentPos", publicName: "percentPos", isSignal: true, isRequired: false, transformFunction: null }, gradient: { classPropertyName: "gradient", publicName: "gradient", isSignal: true, isRequired: false, transformFunction: null }, from: { classPropertyName: "from", publicName: "from", isSignal: true, isRequired: false, transformFunction: null }, to: { classPropertyName: "to", publicName: "to", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"av-progress\"\n [ngStyle]=\"themeVars()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"percentLabel()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n>\n <div\n class=\"av-progress__track\"\n [style.height.px]=\"height()\"\n >\n <div\n class=\"av-progress__fill\"\n [class.av-progress__fill--gradient]=\"gradient()\"\n [class.av-progress__fill--striped]=\"striped()\"\n [style.width.%]=\"percentValue()\"\n >\n @if (showPercent() && percentPos() === 'fill') {\n <span class=\"av-progress__text av-progress__text--fill\" [style.font-size.px]=\"height() / 1.5\">\n {{ percentLabel() }}%\n </span>\n }\n </div>\n\n @if (showPercent() && percentPos() === 'center') {\n <span class=\"av-progress__text av-progress__text--center\" [style.font-size.px]=\"height() / 1.5\">\n {{ percentLabel() }}%\n </span>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:100%}.av-progress__track{background:var(--av-progress-track);border-radius:var(--av-radius-full);overflow:hidden;position:relative;width:100%}.av-progress__fill{background:var(--av-progress-fill);border-radius:inherit;height:100%;overflow:hidden;position:relative;transition:background-color .2s ease,width .35s ease}.av-progress__fill--gradient{background-image:linear-gradient(to right,var(--av-progress-gradient-from),var(--av-progress-gradient-to))}.av-progress__fill--striped:after{animation:av-progress-stripe .7s linear infinite;background:repeating-linear-gradient(-45deg,rgb(255 255 255 / .18) 0,rgb(255 255 255 / .18) 8px,transparent 8px,transparent 16px);background-size:23px 23px;content:\"\";inset:0;position:absolute}.av-progress__text{color:var(--av-white);font-weight:700;line-height:1;position:absolute;top:50%;transform:translateY(-50%);white-space:nowrap}.av-progress__text--fill{right:.35rem}.av-progress__text--center{left:50%;transform:translate(-50%,-50%)}@keyframes av-progress-stripe{to{background-position:23px 0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
3089
+ }
3090
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvProgressBar, decorators: [{
3091
+ type: Component,
3092
+ args: [{ selector: 'av-progress-bar, av-progress-bard', standalone: true, imports: [CommonModule], template: "<div\n class=\"av-progress\"\n [ngStyle]=\"themeVars()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"percentLabel()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n>\n <div\n class=\"av-progress__track\"\n [style.height.px]=\"height()\"\n >\n <div\n class=\"av-progress__fill\"\n [class.av-progress__fill--gradient]=\"gradient()\"\n [class.av-progress__fill--striped]=\"striped()\"\n [style.width.%]=\"percentValue()\"\n >\n @if (showPercent() && percentPos() === 'fill') {\n <span class=\"av-progress__text av-progress__text--fill\" [style.font-size.px]=\"height() / 1.5\">\n {{ percentLabel() }}%\n </span>\n }\n </div>\n\n @if (showPercent() && percentPos() === 'center') {\n <span class=\"av-progress__text av-progress__text--center\" [style.font-size.px]=\"height() / 1.5\">\n {{ percentLabel() }}%\n </span>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:100%}.av-progress__track{background:var(--av-progress-track);border-radius:var(--av-radius-full);overflow:hidden;position:relative;width:100%}.av-progress__fill{background:var(--av-progress-fill);border-radius:inherit;height:100%;overflow:hidden;position:relative;transition:background-color .2s ease,width .35s ease}.av-progress__fill--gradient{background-image:linear-gradient(to right,var(--av-progress-gradient-from),var(--av-progress-gradient-to))}.av-progress__fill--striped:after{animation:av-progress-stripe .7s linear infinite;background:repeating-linear-gradient(-45deg,rgb(255 255 255 / .18) 0,rgb(255 255 255 / .18) 8px,transparent 8px,transparent 16px);background-size:23px 23px;content:\"\";inset:0;position:absolute}.av-progress__text{color:var(--av-white);font-weight:700;line-height:1;position:absolute;top:50%;transform:translateY(-50%);white-space:nowrap}.av-progress__text--fill{right:.35rem}.av-progress__text--center{left:50%;transform:translate(-50%,-50%)}@keyframes av-progress-stripe{to{background-position:23px 0}}\n"] }]
3093
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], showPercent: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPercent", required: false }] }], percentPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "percentPos", required: false }] }], gradient: [{ type: i0.Input, args: [{ isSignal: true, alias: "gradient", required: false }] }], from: [{ type: i0.Input, args: [{ isSignal: true, alias: "from", required: false }] }], to: [{ type: i0.Input, args: [{ isSignal: true, alias: "to", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }] } });
3094
+
3095
+ class AvCarouselItem {
3096
+ duration = input(undefined, /* @ts-ignore */
3097
+ ...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
3098
+ isActive = signal(false, /* @ts-ignore */
3099
+ ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
3100
+ index = signal(0, /* @ts-ignore */
3101
+ ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
3102
+ transition = signal('fade', /* @ts-ignore */
3103
+ ...(ngDevMode ? [{ debugName: "transition" }] : /* istanbul ignore next */ []));
3104
+ get itemClasses() {
3105
+ return [
3106
+ 'av-carousel-item',
3107
+ `av-carousel-item--${this.transition()}`,
3108
+ this.isActive() ? 'av-carousel-item--active' : 'av-carousel-item--inactive',
3109
+ ].join(' ');
3110
+ }
3111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCarouselItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
3112
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvCarouselItem, isStandalone: true, selector: "av-carousel-item", inputs: { duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"itemClasses\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:contents}.av-carousel-item{height:100%;min-width:100%;width:100%}.av-carousel-item--scroll{flex:0 0 100%}.av-carousel-item--fade{inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .35s ease}.av-carousel-item--fade.av-carousel-item--active{opacity:1;pointer-events:auto;z-index:1}.av-carousel-item--fade.av-carousel-item--inactive{opacity:0;z-index:0}\n"] });
3113
+ }
3114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCarouselItem, decorators: [{
3115
+ type: Component,
3116
+ args: [{ selector: 'av-carousel-item', standalone: true, template: "<div [class]=\"itemClasses\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:contents}.av-carousel-item{height:100%;min-width:100%;width:100%}.av-carousel-item--scroll{flex:0 0 100%}.av-carousel-item--fade{inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .35s ease}.av-carousel-item--fade.av-carousel-item--active{opacity:1;pointer-events:auto;z-index:1}.av-carousel-item--fade.av-carousel-item--inactive{opacity:0;z-index:0}\n"] }]
3117
+ }], propDecorators: { duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }] } });
3118
+
3119
+ class AvCarousel {
3120
+ config = inject(VISUALS_CONFIG);
3121
+ themeService = inject(ThemeService);
3122
+ intervalId = null;
3123
+ contentContainer;
3124
+ auto = input(true, { ...(ngDevMode ? { debugName: "auto" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
3125
+ controls = input(true, { ...(ngDevMode ? { debugName: "controls" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
3126
+ dots = input(true, { ...(ngDevMode ? { debugName: "dots" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
3127
+ transition = input('fade', /* @ts-ignore */
3128
+ ...(ngDevMode ? [{ debugName: "transition" }] : /* istanbul ignore next */ []));
3129
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
3130
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3131
+ transitionDelay = input(undefined, /* @ts-ignore */
3132
+ ...(ngDevMode ? [{ debugName: "transitionDelay" }] : /* istanbul ignore next */ []));
3133
+ indexChange = output();
3134
+ items = contentChildren(AvCarouselItem, { ...(ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {}), descendants: true });
3135
+ currentItem = signal(0, /* @ts-ignore */
3136
+ ...(ngDevMode ? [{ debugName: "currentItem" }] : /* istanbul ignore next */ []));
3137
+ themeVars = computed(() => {
3138
+ const variant = this.variant();
3139
+ const isDark = this.themeService.dark();
3140
+ return {
3141
+ '--av-carousel-accent': `var(--av-${variant}-${isDark ? 400 : 500})`,
3142
+ '--av-carousel-control-bg': isDark ? 'rgb(15 23 42 / .72)' : 'rgb(255 255 255 / .72)',
3143
+ '--av-carousel-control-color': 'var(--av-color-text)',
3144
+ '--av-carousel-dot-bg': isDark ? 'rgb(148 163 184 / .48)' : 'rgb(15 23 42 / .28)',
3145
+ };
3146
+ }, /* @ts-ignore */
3147
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
3148
+ canNavigate = computed(() => this.items().length > 1, /* @ts-ignore */
3149
+ ...(ngDevMode ? [{ debugName: "canNavigate" }] : /* istanbul ignore next */ []));
3150
+ constructor() {
3151
+ effect((onCleanup) => {
3152
+ const itemList = this.items();
3153
+ const currentIndex = this.normalizeIndex(this.currentItem());
3154
+ const transition = this.transition();
3155
+ if (currentIndex !== this.currentItem()) {
3156
+ this.currentItem.set(currentIndex);
3157
+ }
3158
+ itemList.forEach((item, index) => {
3159
+ item.index.set(index);
3160
+ item.transition.set(transition);
3161
+ item.isActive.set(index === currentIndex);
3162
+ });
3163
+ queueMicrotask(() => this.scrollToCurrent());
3164
+ if (this.auto() && itemList.length > 1) {
3165
+ const activeItem = itemList[currentIndex];
3166
+ const delay = activeItem?.duration() ?? this.transitionDelay() ?? 5000;
3167
+ this.intervalId = setInterval(() => this.next(), delay);
3168
+ onCleanup(() => this.clearTimer());
3169
+ }
3170
+ });
3171
+ }
3172
+ ngOnDestroy() {
3173
+ this.clearTimer();
3174
+ }
3175
+ next() {
3176
+ const total = this.items().length;
3177
+ if (total <= 0)
3178
+ return;
3179
+ this.changeTo((this.currentItem() + 1) % total);
3180
+ }
3181
+ previous() {
3182
+ const total = this.items().length;
3183
+ if (total <= 0)
3184
+ return;
3185
+ this.changeTo((this.currentItem() - 1 + total) % total);
3186
+ }
3187
+ changeTo(index) {
3188
+ const nextIndex = this.normalizeIndex(index);
3189
+ this.currentItem.set(nextIndex);
3190
+ this.indexChange.emit(nextIndex);
3191
+ }
3192
+ normalizeIndex(index) {
3193
+ const total = this.items().length;
3194
+ if (total <= 0)
3195
+ return 0;
3196
+ return Math.min(Math.max(index, 0), total - 1);
3197
+ }
3198
+ scrollToCurrent() {
3199
+ if (this.transition() !== 'scroll')
3200
+ return;
3201
+ const container = this.contentContainer?.nativeElement;
3202
+ if (!container)
3203
+ return;
3204
+ container.scrollTo({
3205
+ left: container.clientWidth * this.currentItem(),
3206
+ behavior: 'smooth',
3207
+ });
3208
+ }
3209
+ clearTimer() {
3210
+ if (!this.intervalId)
3211
+ return;
3212
+ clearInterval(this.intervalId);
3213
+ this.intervalId = null;
3214
+ }
3215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCarousel, deps: [], target: i0.ɵɵFactoryTarget.Component });
3216
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvCarousel, isStandalone: true, selector: "av-carousel", inputs: { auto: { classPropertyName: "auto", publicName: "auto", isSignal: true, isRequired: false, transformFunction: null }, controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, dots: { classPropertyName: "dots", publicName: "dots", isSignal: true, isRequired: false, transformFunction: null }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, transitionDelay: { classPropertyName: "transitionDelay", publicName: "transitionDelay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indexChange: "indexChange" }, queries: [{ propertyName: "items", predicate: AvCarouselItem, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<div class=\"av-carousel\" [ngStyle]=\"themeVars()\">\n @if (controls() && canNavigate()) {\n <button\n type=\"button\"\n (click)=\"previous()\"\n class=\"av-carousel__control av-carousel__control--left\"\n aria-label=\"Slide anterior\"\n >\n <span av-icon name=\"chevron_left\" class=\"av-carousel__control-icon\"></span>\n </button>\n\n <button\n type=\"button\"\n (click)=\"next()\"\n class=\"av-carousel__control av-carousel__control--right\"\n aria-label=\"Pr\u00F3ximo slide\"\n >\n <span av-icon name=\"chevron_right\" class=\"av-carousel__control-icon\"></span>\n </button>\n }\n\n <div\n #content\n class=\"av-carousel__content\"\n [class.av-carousel__content--scroll]=\"transition() === 'scroll'\"\n [class.av-carousel__content--fade]=\"transition() === 'fade'\"\n >\n <ng-content></ng-content>\n </div>\n\n @if (dots() && canNavigate()) {\n <div class=\"av-carousel__dots-wrap\">\n <div class=\"av-carousel__dots\">\n @for (item of items(); track $index) {\n <button\n type=\"button\"\n (click)=\"changeTo($index)\"\n class=\"av-carousel__dot\"\n [class.av-carousel__dot--active]=\"currentItem() === $index\"\n [attr.aria-label]=\"'Ir para slide ' + ($index + 1)\"\n ></button>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;height:100%;min-height:12rem;width:100%}.av-carousel{width:100%;height:100%;background:var(--av-color-surface-muted);color:var(--av-color-text);display:flex;overflow:hidden;position:relative}.av-carousel__control{align-items:center;background:var(--av-carousel-control-bg);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-full);color:var(--av-carousel-control-color);cursor:pointer;display:flex;height:2.5rem;justify-content:center;opacity:.78;position:absolute;top:50%;transform:translateY(-50%);transition:background-color .2s ease,opacity .2s ease,transform .2s ease;width:2.5rem;z-index:2}.av-carousel__control:hover{opacity:1;transform:translateY(-50%) scale(1.04)}.av-carousel__control--left{left:.75rem}.av-carousel__control--right{right:.75rem}.av-carousel__control-icon{display:flex;font-size:1.25rem}.av-carousel__content{height:100%;position:relative;width:100%}.av-carousel__content--scroll{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.av-carousel__content--scroll ::ng-deep .av-carousel-item{scroll-snap-align:start}.av-carousel__content--fade{overflow:hidden}.av-carousel__content::-webkit-scrollbar{display:none}.av-carousel__dots-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;padding:.875rem;position:absolute;right:0;z-index:2}.av-carousel__dots{align-items:center;background:#0000002e;border-radius:var(--av-radius-full);display:flex;gap:.375rem;padding:.375rem}.av-carousel__dot{background:var(--av-carousel-dot-bg);border-radius:var(--av-radius-full);cursor:pointer;height:.625rem;transition:background-color .2s ease,width .2s ease;width:.625rem}.av-carousel__dot--active{background:var(--av-carousel-accent);width:1.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
3217
+ }
3218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCarousel, decorators: [{
3219
+ type: Component,
3220
+ args: [{ selector: 'av-carousel', standalone: true, imports: [CommonModule, AvIcon], template: "<div class=\"av-carousel\" [ngStyle]=\"themeVars()\">\n @if (controls() && canNavigate()) {\n <button\n type=\"button\"\n (click)=\"previous()\"\n class=\"av-carousel__control av-carousel__control--left\"\n aria-label=\"Slide anterior\"\n >\n <span av-icon name=\"chevron_left\" class=\"av-carousel__control-icon\"></span>\n </button>\n\n <button\n type=\"button\"\n (click)=\"next()\"\n class=\"av-carousel__control av-carousel__control--right\"\n aria-label=\"Pr\u00F3ximo slide\"\n >\n <span av-icon name=\"chevron_right\" class=\"av-carousel__control-icon\"></span>\n </button>\n }\n\n <div\n #content\n class=\"av-carousel__content\"\n [class.av-carousel__content--scroll]=\"transition() === 'scroll'\"\n [class.av-carousel__content--fade]=\"transition() === 'fade'\"\n >\n <ng-content></ng-content>\n </div>\n\n @if (dots() && canNavigate()) {\n <div class=\"av-carousel__dots-wrap\">\n <div class=\"av-carousel__dots\">\n @for (item of items(); track $index) {\n <button\n type=\"button\"\n (click)=\"changeTo($index)\"\n class=\"av-carousel__dot\"\n [class.av-carousel__dot--active]=\"currentItem() === $index\"\n [attr.aria-label]=\"'Ir para slide ' + ($index + 1)\"\n ></button>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;height:100%;min-height:12rem;width:100%}.av-carousel{width:100%;height:100%;background:var(--av-color-surface-muted);color:var(--av-color-text);display:flex;overflow:hidden;position:relative}.av-carousel__control{align-items:center;background:var(--av-carousel-control-bg);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-full);color:var(--av-carousel-control-color);cursor:pointer;display:flex;height:2.5rem;justify-content:center;opacity:.78;position:absolute;top:50%;transform:translateY(-50%);transition:background-color .2s ease,opacity .2s ease,transform .2s ease;width:2.5rem;z-index:2}.av-carousel__control:hover{opacity:1;transform:translateY(-50%) scale(1.04)}.av-carousel__control--left{left:.75rem}.av-carousel__control--right{right:.75rem}.av-carousel__control-icon{display:flex;font-size:1.25rem}.av-carousel__content{height:100%;position:relative;width:100%}.av-carousel__content--scroll{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.av-carousel__content--scroll ::ng-deep .av-carousel-item{scroll-snap-align:start}.av-carousel__content--fade{overflow:hidden}.av-carousel__content::-webkit-scrollbar{display:none}.av-carousel__dots-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;padding:.875rem;position:absolute;right:0;z-index:2}.av-carousel__dots{align-items:center;background:#0000002e;border-radius:var(--av-radius-full);display:flex;gap:.375rem;padding:.375rem}.av-carousel__dot{background:var(--av-carousel-dot-bg);border-radius:var(--av-radius-full);cursor:pointer;height:.625rem;transition:background-color .2s ease,width .2s ease;width:.625rem}.av-carousel__dot--active{background:var(--av-carousel-accent);width:1.5rem}\n"] }]
3221
+ }], ctorParameters: () => [], propDecorators: { contentContainer: [{
3222
+ type: ViewChild,
3223
+ args: ['content']
3224
+ }], auto: [{ type: i0.Input, args: [{ isSignal: true, alias: "auto", required: false }] }], controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], dots: [{ type: i0.Input, args: [{ isSignal: true, alias: "dots", required: false }] }], transition: [{ type: i0.Input, args: [{ isSignal: true, alias: "transition", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], transitionDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "transitionDelay", required: false }] }], indexChange: [{ type: i0.Output, args: ["indexChange"] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AvCarouselItem), { ...{ descendants: true }, isSignal: true }] }] } });
3225
+
3226
+ class AvStep {
3227
+ title = input.required(/* @ts-ignore */
3228
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
3229
+ icon = input('', /* @ts-ignore */
3230
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
3231
+ hasError = input(false, { ...(ngDevMode ? { debugName: "hasError" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
3232
+ isActive = signal(false, /* @ts-ignore */
3233
+ ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
3234
+ index = signal(0, /* @ts-ignore */
3235
+ ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
3236
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvStep, deps: [], target: i0.ɵɵFactoryTarget.Component });
3237
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvStep, isStandalone: true, selector: "av-step", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"av-step\" [class.av-step--hidden]=\"!isActive()\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:contents}.av-step{height:100%;width:100%}.av-step--hidden{display:none}\n"] });
3238
+ }
3239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvStep, decorators: [{
3240
+ type: Component,
3241
+ args: [{ selector: 'av-step', standalone: true, template: "<div class=\"av-step\" [class.av-step--hidden]=\"!isActive()\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:contents}.av-step{height:100%;width:100%}.av-step--hidden{display:none}\n"] }]
3242
+ }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], hasError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasError", required: false }] }] } });
3243
+
3244
+ class AvStepper {
3245
+ config = inject(VISUALS_CONFIG);
3246
+ themeService = inject(ThemeService);
3247
+ canSetStep = input(false, { ...(ngDevMode ? { debugName: "canSetStep" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
3248
+ noContent = input(false, { ...(ngDevMode ? { debugName: "noContent" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
3249
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
3250
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3251
+ currentStep = input(undefined, /* @ts-ignore */
3252
+ ...(ngDevMode ? [{ debugName: "currentStep" }] : /* istanbul ignore next */ []));
3253
+ stepChange = output();
3254
+ items = contentChildren(AvStep, { ...(ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {}), descendants: true });
3255
+ currentItem = signal(0, /* @ts-ignore */
3256
+ ...(ngDevMode ? [{ debugName: "currentItem" }] : /* istanbul ignore next */ []));
3257
+ themeVars = computed(() => {
3258
+ const variant = this.variant();
3259
+ const isDark = this.themeService.dark();
3260
+ return {
3261
+ '--av-stepper-accent': `var(--av-${variant}-${isDark ? 400 : 500})`,
3262
+ '--av-stepper-accent-soft': isDark
3263
+ ? `color-mix(in srgb, var(--av-${variant}-400) 18%, transparent)`
3264
+ : `var(--av-${variant}-50)`,
3265
+ '--av-stepper-track': 'var(--av-color-border-soft)',
3266
+ };
3267
+ }, /* @ts-ignore */
3268
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
3269
+ constructor() {
3270
+ effect(() => {
3271
+ const selected = this.currentStep();
3272
+ if (selected !== undefined) {
3273
+ this.currentItem.set(this.clampIndex(selected));
3274
+ }
3275
+ });
3276
+ effect(() => {
3277
+ const stepList = this.items();
3278
+ const currentIndex = this.clampIndex(this.currentItem());
3279
+ if (currentIndex !== this.currentItem()) {
3280
+ this.currentItem.set(currentIndex);
3281
+ }
3282
+ stepList.forEach((item, index) => {
3283
+ item.index.set(index);
3284
+ item.isActive.set(index === currentIndex);
3285
+ });
3286
+ });
3287
+ }
3288
+ isDone(index) {
3289
+ return this.currentItem() > index;
3290
+ }
3291
+ isActive(index) {
3292
+ return this.currentItem() === index;
3293
+ }
3294
+ next() {
3295
+ this.changeTo(this.currentItem() + 1);
3296
+ }
3297
+ previous() {
3298
+ this.changeTo(this.currentItem() - 1);
3299
+ }
3300
+ changeTo(index) {
3301
+ if (!this.canSetStep() && index !== this.currentItem() + 1 && index !== this.currentItem() - 1)
3302
+ return;
3303
+ const nextIndex = this.clampIndex(index);
3304
+ if (nextIndex === this.currentItem())
3305
+ return;
3306
+ this.currentItem.set(nextIndex);
3307
+ this.stepChange.emit(nextIndex);
3308
+ }
3309
+ clampIndex(index) {
3310
+ const total = this.items().length;
3311
+ if (total <= 0)
3312
+ return 0;
3313
+ return Math.min(Math.max(index, 0), total - 1);
3314
+ }
3315
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvStepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
3316
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvStepper, isStandalone: true, selector: "av-stepper", inputs: { canSetStep: { classPropertyName: "canSetStep", publicName: "canSetStep", isSignal: true, isRequired: false, transformFunction: null }, noContent: { classPropertyName: "noContent", publicName: "noContent", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, currentStep: { classPropertyName: "currentStep", publicName: "currentStep", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepChange: "stepChange" }, queries: [{ propertyName: "items", predicate: AvStep, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"av-stepper\" [ngStyle]=\"themeVars()\">\n <div class=\"av-stepper__header\">\n @for (item of items(); track $index) {\n <div\n class=\"av-stepper__item\"\n [class.av-stepper__item--stretch]=\"$index + 1 < items().length\"\n >\n <div class=\"av-stepper__row\">\n <button\n type=\"button\"\n (click)=\"changeTo($index)\"\n class=\"av-stepper__bullet\"\n [class.av-stepper__bullet--clickable]=\"canSetStep()\"\n [class.av-stepper__bullet--active]=\"isActive($index)\"\n [class.av-stepper__bullet--done]=\"isDone($index)\"\n [class.av-stepper__bullet--error]=\"item.hasError()\"\n [disabled]=\"!canSetStep() && !isActive($index)\"\n [attr.aria-current]=\"isActive($index) ? 'step' : null\"\n >\n @if (item.hasError()) {\n <span av-icon name=\"close\" size=\"sm\"></span>\n } @else if (isDone($index)) {\n <span av-icon name=\"check\" size=\"sm\"></span>\n } @else if (item.icon()) {\n <span av-icon [name]=\"item.icon()\" size=\"sm\"></span>\n } @else {\n {{ $index + 1 }}\n }\n </button>\n\n <div\n class=\"av-stepper__line\"\n [class.av-stepper__line--hidden]=\"$index + 1 >= items().length\"\n >\n <div class=\"av-stepper__line-track\">\n <div\n class=\"av-stepper__line-fill\"\n [class.av-stepper__line-fill--complete]=\"isDone($index)\"\n [class.av-stepper__line-fill--error]=\"item.hasError()\"\n ></div>\n </div>\n </div>\n </div>\n\n <div class=\"av-stepper__caption\">\n <span>{{ item.title() }}</span>\n </div>\n </div>\n }\n </div>\n\n <div class=\"av-stepper__content\" [class.av-stepper__content--hidden]=\"noContent()\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:block;height:100%;width:100%}.av-stepper{color:var(--av-color-text);display:flex;flex-direction:column;gap:.75rem;height:100%;width:100%}.av-stepper__header,.av-stepper__row{align-items:center;display:flex}.av-stepper__item{display:flex;flex-direction:column;min-width:2.5rem}.av-stepper__item--stretch,.av-stepper__line{flex:1}.av-stepper__bullet{align-items:center;aspect-ratio:1;background:var(--av-color-surface);border:2px solid var(--av-color-border);border-radius:var(--av-radius-full);box-shadow:var(--av-shadow-control);color:var(--av-color-text-muted);display:flex;font-weight:700;height:2.5rem;justify-content:center;transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;z-index:1}.av-stepper__bullet--clickable{cursor:pointer}.av-stepper__bullet:disabled{cursor:default}.av-stepper__bullet--active{background:var(--av-stepper-accent-soft);border-color:var(--av-stepper-accent);color:var(--av-stepper-accent)}.av-stepper__bullet--done{background:var(--av-stepper-accent);border-color:var(--av-stepper-accent);color:var(--av-white)}.av-stepper__bullet--error{background:var(--av-color-danger-soft);border-color:var(--av-color-danger);color:var(--av-color-danger)}.av-stepper__line{height:.5rem;position:relative}.av-stepper__line--hidden,.av-stepper__content--hidden{display:none}.av-stepper__line-track{background:var(--av-stepper-track);border-radius:var(--av-radius-full);height:100%;overflow:hidden;transform:translate(-5%);width:110%}.av-stepper__line-fill{background:var(--av-stepper-accent);height:100%;transform:translate(-100%);transition:transform .2s ease,background-color .2s ease;width:100%}.av-stepper__line-fill--complete{transform:translate(0)}.av-stepper__line-fill--error{background:var(--av-color-danger)}.av-stepper__caption{color:var(--av-color-text-muted);display:flex;flex-direction:column;font-size:.875rem;font-weight:600;line-height:1.25;margin-top:.375rem}.av-stepper__content{height:100%;min-height:0;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
3317
+ }
3318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvStepper, decorators: [{
3319
+ type: Component,
3320
+ args: [{ selector: 'av-stepper', standalone: true, imports: [CommonModule, AvIcon], template: "<div class=\"av-stepper\" [ngStyle]=\"themeVars()\">\n <div class=\"av-stepper__header\">\n @for (item of items(); track $index) {\n <div\n class=\"av-stepper__item\"\n [class.av-stepper__item--stretch]=\"$index + 1 < items().length\"\n >\n <div class=\"av-stepper__row\">\n <button\n type=\"button\"\n (click)=\"changeTo($index)\"\n class=\"av-stepper__bullet\"\n [class.av-stepper__bullet--clickable]=\"canSetStep()\"\n [class.av-stepper__bullet--active]=\"isActive($index)\"\n [class.av-stepper__bullet--done]=\"isDone($index)\"\n [class.av-stepper__bullet--error]=\"item.hasError()\"\n [disabled]=\"!canSetStep() && !isActive($index)\"\n [attr.aria-current]=\"isActive($index) ? 'step' : null\"\n >\n @if (item.hasError()) {\n <span av-icon name=\"close\" size=\"sm\"></span>\n } @else if (isDone($index)) {\n <span av-icon name=\"check\" size=\"sm\"></span>\n } @else if (item.icon()) {\n <span av-icon [name]=\"item.icon()\" size=\"sm\"></span>\n } @else {\n {{ $index + 1 }}\n }\n </button>\n\n <div\n class=\"av-stepper__line\"\n [class.av-stepper__line--hidden]=\"$index + 1 >= items().length\"\n >\n <div class=\"av-stepper__line-track\">\n <div\n class=\"av-stepper__line-fill\"\n [class.av-stepper__line-fill--complete]=\"isDone($index)\"\n [class.av-stepper__line-fill--error]=\"item.hasError()\"\n ></div>\n </div>\n </div>\n </div>\n\n <div class=\"av-stepper__caption\">\n <span>{{ item.title() }}</span>\n </div>\n </div>\n }\n </div>\n\n <div class=\"av-stepper__content\" [class.av-stepper__content--hidden]=\"noContent()\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:block;height:100%;width:100%}.av-stepper{color:var(--av-color-text);display:flex;flex-direction:column;gap:.75rem;height:100%;width:100%}.av-stepper__header,.av-stepper__row{align-items:center;display:flex}.av-stepper__item{display:flex;flex-direction:column;min-width:2.5rem}.av-stepper__item--stretch,.av-stepper__line{flex:1}.av-stepper__bullet{align-items:center;aspect-ratio:1;background:var(--av-color-surface);border:2px solid var(--av-color-border);border-radius:var(--av-radius-full);box-shadow:var(--av-shadow-control);color:var(--av-color-text-muted);display:flex;font-weight:700;height:2.5rem;justify-content:center;transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;z-index:1}.av-stepper__bullet--clickable{cursor:pointer}.av-stepper__bullet:disabled{cursor:default}.av-stepper__bullet--active{background:var(--av-stepper-accent-soft);border-color:var(--av-stepper-accent);color:var(--av-stepper-accent)}.av-stepper__bullet--done{background:var(--av-stepper-accent);border-color:var(--av-stepper-accent);color:var(--av-white)}.av-stepper__bullet--error{background:var(--av-color-danger-soft);border-color:var(--av-color-danger);color:var(--av-color-danger)}.av-stepper__line{height:.5rem;position:relative}.av-stepper__line--hidden,.av-stepper__content--hidden{display:none}.av-stepper__line-track{background:var(--av-stepper-track);border-radius:var(--av-radius-full);height:100%;overflow:hidden;transform:translate(-5%);width:110%}.av-stepper__line-fill{background:var(--av-stepper-accent);height:100%;transform:translate(-100%);transition:transform .2s ease,background-color .2s ease;width:100%}.av-stepper__line-fill--complete{transform:translate(0)}.av-stepper__line-fill--error{background:var(--av-color-danger)}.av-stepper__caption{color:var(--av-color-text-muted);display:flex;flex-direction:column;font-size:.875rem;font-weight:600;line-height:1.25;margin-top:.375rem}.av-stepper__content{height:100%;min-height:0;width:100%}\n"] }]
3321
+ }], ctorParameters: () => [], propDecorators: { canSetStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "canSetStep", required: false }] }], noContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "noContent", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], currentStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentStep", required: false }] }], stepChange: [{ type: i0.Output, args: ["stepChange"] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AvStep), { ...{ descendants: true }, isSignal: true }] }] } });
3322
+
3323
+ class AvTab {
3324
+ title = input('', /* @ts-ignore */
3325
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
3326
+ label = input('', /* @ts-ignore */
3327
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
3328
+ icon = input('', /* @ts-ignore */
3329
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
3330
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
3331
+ isActive = signal(false, /* @ts-ignore */
3332
+ ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
3333
+ index = signal(0, /* @ts-ignore */
3334
+ ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
3335
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
3336
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvTab, isStandalone: true, selector: "av-tab", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"av-tab\" [class.av-tab--hidden]=\"!isActive()\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:contents}.av-tab{height:100%;width:100%}.av-tab--hidden{display:none}\n"] });
3337
+ }
3338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTab, decorators: [{
3339
+ type: Component,
3340
+ args: [{ selector: 'av-tab', standalone: true, template: "<div class=\"av-tab\" [class.av-tab--hidden]=\"!isActive()\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:contents}.av-tab{height:100%;width:100%}.av-tab--hidden{display:none}\n"] }]
3341
+ }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
3342
+
3343
+ class AvTabs {
3344
+ config = inject(VISUALS_CONFIG);
3345
+ themeService = inject(ThemeService);
3346
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
3347
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3348
+ activeTab = input(undefined, /* @ts-ignore */
3349
+ ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
3350
+ tabChange = output();
3351
+ activeTabChange = output();
3352
+ items = contentChildren(AvTab, { ...(ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {}), descendants: true });
3353
+ currentItem = signal(0, /* @ts-ignore */
3354
+ ...(ngDevMode ? [{ debugName: "currentItem" }] : /* istanbul ignore next */ []));
3355
+ themeVars = computed(() => {
3356
+ const variant = this.variant();
3357
+ const isDark = this.themeService.dark();
3358
+ return {
3359
+ '--av-tabs-accent': `var(--av-${variant}-${isDark ? 400 : 500})`,
3360
+ '--av-tabs-accent-soft': isDark
3361
+ ? `color-mix(in srgb, var(--av-${variant}-400) 16%, transparent)`
3362
+ : `var(--av-${variant}-50)`,
3363
+ };
3364
+ }, /* @ts-ignore */
3365
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
3366
+ constructor() {
3367
+ effect(() => {
3368
+ const selected = this.activeTab();
3369
+ if (selected !== undefined) {
3370
+ this.currentItem.set(this.clampIndex(selected));
3371
+ }
3372
+ });
3373
+ effect(() => {
3374
+ const tabList = this.items();
3375
+ const currentIndex = this.clampIndex(this.currentItem());
3376
+ if (currentIndex !== this.currentItem()) {
3377
+ this.currentItem.set(currentIndex);
3378
+ }
3379
+ tabList.forEach((item, index) => {
3380
+ item.index.set(index);
3381
+ item.isActive.set(index === currentIndex);
3382
+ });
3383
+ });
3384
+ }
3385
+ selectTab(index, item) {
3386
+ if (item?.disabled())
3387
+ return;
3388
+ const nextIndex = this.clampIndex(index);
3389
+ this.currentItem.set(nextIndex);
3390
+ this.tabChange.emit(nextIndex);
3391
+ this.activeTabChange.emit(nextIndex);
3392
+ }
3393
+ labelFor(item) {
3394
+ return item.title() || item.label();
3395
+ }
3396
+ clampIndex(index) {
3397
+ const total = this.items().length;
3398
+ if (total <= 0)
3399
+ return 0;
3400
+ return Math.min(Math.max(index, 0), total - 1);
3401
+ }
3402
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
3403
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvTabs, isStandalone: true, selector: "av-tabs, av-tab-container", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, activeTab: { classPropertyName: "activeTab", publicName: "activeTab", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabChange: "tabChange", activeTabChange: "activeTabChange" }, queries: [{ propertyName: "items", predicate: AvTab, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"av-tabs\" [ngStyle]=\"themeVars()\">\n <div\n class=\"av-tabs__header\"\n role=\"tablist\"\n [style.grid-template-columns]=\"'repeat(' + (items().length || 1) + ', minmax(0, 1fr))'\"\n >\n @for (item of items(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"av-tabs__tab\"\n [class.av-tabs__tab--active]=\"currentItem() === $index\"\n [class.av-tabs__tab--inactive]=\"currentItem() !== $index\"\n [class.av-tabs__tab--disabled]=\"item.disabled()\"\n [disabled]=\"item.disabled()\"\n [attr.aria-selected]=\"currentItem() === $index\"\n (click)=\"selectTab($index, item)\"\n >\n @if (item.icon()) {\n <span av-icon [name]=\"item.icon()\" size=\"lg\"></span>\n } @else {\n <span>{{$index}}</span>\n }\n <span class=\"av-tabs__label\">{{ labelFor(item) }}</span>\n </button>\n }\n </div>\n\n <div class=\"av-tabs__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%;width:100%}.av-tabs{background:var(--av-color-surface);color:var(--av-color-text);display:flex;flex-direction:column;height:100%;width:100%}.av-tabs__header{background:var(--av-color-surface-muted);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-lg);display:grid;gap:.25rem;padding:.25rem}.av-tabs__tab{align-items:center;background:transparent;border-radius:var(--av-radius-md);color:var(--av-color-text-muted);cursor:pointer;display:flex;font-weight:600;gap:.5rem;justify-content:center;min-width:0;outline:none;padding:.5rem 1rem;transition:background-color .2s ease,color .2s ease,box-shadow .2s ease}.av-tabs__tab--inactive:hover:not(.av-tabs__tab--disabled){background:var(--av-tabs-accent-soft);color:var(--av-tabs-accent)}.av-tabs__tab--active{background:var(--av-tabs-accent);box-shadow:var(--av-shadow-control);color:var(--av-white)}.av-tabs__tab:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--av-tabs-accent) 24%,transparent)}.av-tabs__tab--disabled{cursor:not-allowed;opacity:.48}.av-tabs__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-tabs__content{flex:1;min-height:0;overflow:auto;padding-top:.75rem;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
3404
+ }
3405
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTabs, decorators: [{
3406
+ type: Component,
3407
+ args: [{ selector: 'av-tabs, av-tab-container', standalone: true, imports: [CommonModule, AvIcon], template: "<div class=\"av-tabs\" [ngStyle]=\"themeVars()\">\n <div\n class=\"av-tabs__header\"\n role=\"tablist\"\n [style.grid-template-columns]=\"'repeat(' + (items().length || 1) + ', minmax(0, 1fr))'\"\n >\n @for (item of items(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"av-tabs__tab\"\n [class.av-tabs__tab--active]=\"currentItem() === $index\"\n [class.av-tabs__tab--inactive]=\"currentItem() !== $index\"\n [class.av-tabs__tab--disabled]=\"item.disabled()\"\n [disabled]=\"item.disabled()\"\n [attr.aria-selected]=\"currentItem() === $index\"\n (click)=\"selectTab($index, item)\"\n >\n @if (item.icon()) {\n <span av-icon [name]=\"item.icon()\" size=\"lg\"></span>\n } @else {\n <span>{{$index}}</span>\n }\n <span class=\"av-tabs__label\">{{ labelFor(item) }}</span>\n </button>\n }\n </div>\n\n <div class=\"av-tabs__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%;width:100%}.av-tabs{background:var(--av-color-surface);color:var(--av-color-text);display:flex;flex-direction:column;height:100%;width:100%}.av-tabs__header{background:var(--av-color-surface-muted);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-lg);display:grid;gap:.25rem;padding:.25rem}.av-tabs__tab{align-items:center;background:transparent;border-radius:var(--av-radius-md);color:var(--av-color-text-muted);cursor:pointer;display:flex;font-weight:600;gap:.5rem;justify-content:center;min-width:0;outline:none;padding:.5rem 1rem;transition:background-color .2s ease,color .2s ease,box-shadow .2s ease}.av-tabs__tab--inactive:hover:not(.av-tabs__tab--disabled){background:var(--av-tabs-accent-soft);color:var(--av-tabs-accent)}.av-tabs__tab--active{background:var(--av-tabs-accent);box-shadow:var(--av-shadow-control);color:var(--av-white)}.av-tabs__tab:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--av-tabs-accent) 24%,transparent)}.av-tabs__tab--disabled{cursor:not-allowed;opacity:.48}.av-tabs__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-tabs__content{flex:1;min-height:0;overflow:auto;padding-top:.75rem;position:relative}\n"] }]
3408
+ }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], activeTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeTab", required: false }] }], tabChange: [{ type: i0.Output, args: ["tabChange"] }], activeTabChange: [{ type: i0.Output, args: ["activeTabChange"] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AvTab), { ...{ descendants: true }, isSignal: true }] }] } });
3409
+
3410
+ class AvTable {
3411
+ config = inject(VISUALS_CONFIG);
3412
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
3413
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3414
+ value = input([], /* @ts-ignore */
3415
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
3416
+ emptyMessage = input('Nenhum registro encontrado.', /* @ts-ignore */
3417
+ ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
3418
+ paginator = input(false, /* @ts-ignore */
3419
+ ...(ngDevMode ? [{ debugName: "paginator" }] : /* istanbul ignore next */ []));
3420
+ pageSize = input(25, /* @ts-ignore */
3421
+ ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
3422
+ pageIndex = input(0, /* @ts-ignore */
3423
+ ...(ngDevMode ? [{ debugName: "pageIndex" }] : /* istanbul ignore next */ []));
3424
+ totalRecords = input(0, /* @ts-ignore */
3425
+ ...(ngDevMode ? [{ debugName: "totalRecords" }] : /* istanbul ignore next */ []));
3426
+ rowsPerPageOptions = input([], /* @ts-ignore */
3427
+ ...(ngDevMode ? [{ debugName: "rowsPerPageOptions" }] : /* istanbul ignore next */ []));
3428
+ currentPageLabel = input('Página {currentPage} de {totalPages} · {totalRecords} itens', /* @ts-ignore */
3429
+ ...(ngDevMode ? [{ debugName: "currentPageLabel" }] : /* istanbul ignore next */ []));
3430
+ sortField = input('', /* @ts-ignore */
3431
+ ...(ngDevMode ? [{ debugName: "sortField" }] : /* istanbul ignore next */ []));
3432
+ sortOrder = input('asc', /* @ts-ignore */
3433
+ ...(ngDevMode ? [{ debugName: "sortOrder" }] : /* istanbul ignore next */ []));
3434
+ onSort = output();
3435
+ onPage = output();
3436
+ headerTemplate = contentChild('header', /* @ts-ignore */
3437
+ ...(ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []));
3438
+ bodyTemplate = contentChild('body', /* @ts-ignore */
3439
+ ...(ngDevMode ? [{ debugName: "bodyTemplate" }] : /* istanbul ignore next */ []));
3440
+ totalPages = computed(() => {
3441
+ const size = this.pageSize();
3442
+ const total = this.totalRecords();
3443
+ if (!size || size <= 0 || total <= 0)
3444
+ return 0;
3445
+ return Math.ceil(total / size);
3446
+ }, /* @ts-ignore */
3447
+ ...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
3448
+ pageSizeOptions = computed(() => {
3449
+ return this.rowsPerPageOptions().map((option) => ({
3450
+ label: String(option),
3451
+ value: option,
3452
+ }));
3453
+ }, /* @ts-ignore */
3454
+ ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
3455
+ formattedPageLabel = computed(() => {
3456
+ const totalPages = this.totalPages();
3457
+ const currentPage = totalPages === 0
3458
+ ? 0
3459
+ : Math.min(Math.max(this.pageIndex(), 0), totalPages - 1) + 1;
3460
+ return this.currentPageLabel()
3461
+ .replace('{currentPage}', String(currentPage))
3462
+ .replace('{totalPages}', String(totalPages))
3463
+ .replace('{totalRecords}', String(this.totalRecords()));
3464
+ }, /* @ts-ignore */
3465
+ ...(ngDevMode ? [{ debugName: "formattedPageLabel" }] : /* istanbul ignore next */ []));
3466
+ sort(field) {
3467
+ const newOrder = this.sortField() === field && this.sortOrder() === 'asc'
3468
+ ? 'desc'
3469
+ : 'asc';
3470
+ this.onSort.emit({ field, order: newOrder });
3471
+ }
3472
+ changePage(newPage) {
3473
+ if (newPage < 0 || newPage >= this.totalPages())
3474
+ return;
3475
+ this.onPage.emit({ page: newPage, pageSize: this.pageSize() });
3476
+ }
3477
+ changePageSize(value) {
3478
+ const newSize = Number(value);
3479
+ if (!Number.isFinite(newSize) || newSize <= 0)
3480
+ return;
3481
+ this.onPage.emit({ page: 0, pageSize: newSize });
3482
+ }
3483
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
3484
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvTable, isStandalone: true, selector: "av-table", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, currentPageLabel: { classPropertyName: "currentPageLabel", publicName: "currentPageLabel", isSignal: true, isRequired: false, transformFunction: null }, sortField: { classPropertyName: "sortField", publicName: "sortField", isSignal: true, isRequired: false, transformFunction: null }, sortOrder: { classPropertyName: "sortOrder", publicName: "sortOrder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSort: "onSort", onPage: "onPage" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "bodyTemplate", first: true, predicate: ["body"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"av-table\">\n <div class=\"av-table__scroll\">\n <table class=\"av-table__table\">\n @if (headerTemplate()) {\n <thead class=\"av-table__header\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\"></ng-container>\n </thead>\n }\n\n <tbody class=\"av-table__body\">\n @if (bodyTemplate()) {\n @for (item of value(); track $index) {\n <ng-container *ngTemplateOutlet=\"bodyTemplate()!; context: { $implicit: item, index: $index }\"></ng-container>\n } @empty {\n <tr>\n <td colspan=\"100%\" class=\"av-table__empty\">\n {{ emptyMessage() }}\n </td>\n </tr>\n }\n } @else {\n <tr>\n <td colspan=\"100%\" class=\"av-table__empty\">\n {{ emptyMessage() }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n @if (paginator()) {\n <div class=\"av-table__pagination\">\n @if (currentPageLabel() !== '') {\n <div class=\"av-table__page-label\">\n <span>{{ formattedPageLabel() }}</span>\n </div>\n }\n\n <div class=\"av-table__pagination-controls\">\n @if (rowsPerPageOptions().length > 0) {\n <div class=\"av-table__page-size\">\n <span>Itens por p\u00E1gina:</span>\n <av-select\n [data]=\"pageSizeOptions()\"\n [searchable]=\"false\"\n [value]=\"pageSize()\"\n [variant]=\"variant()\"\n (valueChange)=\"changePageSize($event)\"\n />\n </div>\n }\n\n <av-paginator\n [variant]=\"variant()\"\n [pageIndex]=\"pageIndex()\"\n [totalPages]=\"totalPages()\"\n (pageChanged)=\"changePage($event)\"\n />\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%}.av-table{background:var(--av-color-surface);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-xl);box-shadow:var(--av-shadow-control);color:var(--av-color-text);display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%}.av-table__header{background:var(--av-color-surface-muted);color:var(--av-color-text-muted);font-size:.75rem;font-weight:700;text-transform:uppercase}.av-table__header tr{border-bottom:1px solid var(--av-color-border-soft)}.av-table__scroll{flex:1;min-height:0;overflow:auto}.av-table__table{border-collapse:collapse;color:var(--av-color-text);font-size:.875rem;text-align:left;width:100%}.av-table__body tr+tr{border-top:1px solid var(--av-color-border-soft)}.av-table__empty{color:var(--av-color-text-subtle);padding:2rem 1.5rem;text-align:center}.av-table__pagination{align-items:center;background:var(--av-color-surface-muted);border-top:1px solid var(--av-color-border-soft);color:var(--av-color-text-muted);display:flex;flex-wrap:wrap;font-size:.75rem;gap:.75rem;justify-content:space-between;padding:.75rem 1rem}.av-table__pagination-controls,.av-table__page-size{align-items:center;display:flex}.av-table__pagination-controls{flex:1;gap:1rem;justify-content:flex-end;min-width:18rem}.av-table__page-size{gap:.5rem;white-space:nowrap}.av-table__page-size av-select{min-width:5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AvSelect, selector: "av-select", inputs: ["data", "placeholder", "labelKey", "labelFormat", "valueKey", "label", "icon", "searchPlaceholder", "searchable", "loading", "loadingIcon", "variant", "rounded", "errorMessage", "value", "onSearch"], outputs: ["valueChange"] }, { kind: "component", type: AvPaginator, selector: "av-paginator", inputs: ["variant", "pageIndex", "totalPages"], outputs: ["pageChanged"] }] });
3485
+ }
3486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvTable, decorators: [{
3487
+ type: Component,
3488
+ args: [{ selector: 'av-table', standalone: true, imports: [CommonModule, AvSelect, AvPaginator], template: "<div class=\"av-table\">\n <div class=\"av-table__scroll\">\n <table class=\"av-table__table\">\n @if (headerTemplate()) {\n <thead class=\"av-table__header\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\"></ng-container>\n </thead>\n }\n\n <tbody class=\"av-table__body\">\n @if (bodyTemplate()) {\n @for (item of value(); track $index) {\n <ng-container *ngTemplateOutlet=\"bodyTemplate()!; context: { $implicit: item, index: $index }\"></ng-container>\n } @empty {\n <tr>\n <td colspan=\"100%\" class=\"av-table__empty\">\n {{ emptyMessage() }}\n </td>\n </tr>\n }\n } @else {\n <tr>\n <td colspan=\"100%\" class=\"av-table__empty\">\n {{ emptyMessage() }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n @if (paginator()) {\n <div class=\"av-table__pagination\">\n @if (currentPageLabel() !== '') {\n <div class=\"av-table__page-label\">\n <span>{{ formattedPageLabel() }}</span>\n </div>\n }\n\n <div class=\"av-table__pagination-controls\">\n @if (rowsPerPageOptions().length > 0) {\n <div class=\"av-table__page-size\">\n <span>Itens por p\u00E1gina:</span>\n <av-select\n [data]=\"pageSizeOptions()\"\n [searchable]=\"false\"\n [value]=\"pageSize()\"\n [variant]=\"variant()\"\n (valueChange)=\"changePageSize($event)\"\n />\n </div>\n }\n\n <av-paginator\n [variant]=\"variant()\"\n [pageIndex]=\"pageIndex()\"\n [totalPages]=\"totalPages()\"\n (pageChanged)=\"changePage($event)\"\n />\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%}.av-table{background:var(--av-color-surface);border:1px solid var(--av-color-border-soft);border-radius:var(--av-radius-xl);box-shadow:var(--av-shadow-control);color:var(--av-color-text);display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%}.av-table__header{background:var(--av-color-surface-muted);color:var(--av-color-text-muted);font-size:.75rem;font-weight:700;text-transform:uppercase}.av-table__header tr{border-bottom:1px solid var(--av-color-border-soft)}.av-table__scroll{flex:1;min-height:0;overflow:auto}.av-table__table{border-collapse:collapse;color:var(--av-color-text);font-size:.875rem;text-align:left;width:100%}.av-table__body tr+tr{border-top:1px solid var(--av-color-border-soft)}.av-table__empty{color:var(--av-color-text-subtle);padding:2rem 1.5rem;text-align:center}.av-table__pagination{align-items:center;background:var(--av-color-surface-muted);border-top:1px solid var(--av-color-border-soft);color:var(--av-color-text-muted);display:flex;flex-wrap:wrap;font-size:.75rem;gap:.75rem;justify-content:space-between;padding:.75rem 1rem}.av-table__pagination-controls,.av-table__page-size{align-items:center;display:flex}.av-table__pagination-controls{flex:1;gap:1rem;justify-content:flex-end;min-width:18rem}.av-table__page-size{gap:.5rem;white-space:nowrap}.av-table__page-size av-select{min-width:5rem}\n"] }]
3489
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], paginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginator", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageIndex", required: false }] }], totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], rowsPerPageOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowsPerPageOptions", required: false }] }], currentPageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPageLabel", required: false }] }], sortField: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortField", required: false }] }], sortOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortOrder", required: false }] }], onSort: [{ type: i0.Output, args: ["onSort"] }], onPage: [{ type: i0.Output, args: ["onPage"] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], bodyTemplate: [{ type: i0.ContentChild, args: ['body', { isSignal: true }] }] } });
3490
+
3491
+ class AvCalendar {
3492
+ config = inject(VISUALS_CONFIG);
3493
+ themeService = inject(ThemeService);
3494
+ events = input([], /* @ts-ignore */
3495
+ ...(ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []));
3496
+ firstDayOfWeek = input(0, { ...(ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {}), transform: numberAttribute });
3497
+ locale = input('pt-BR', /* @ts-ignore */
3498
+ ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
3499
+ maxVisibleEvents = input(3, { ...(ngDevMode ? { debugName: "maxVisibleEvents" } : /* istanbul ignore next */ {}), transform: numberAttribute });
3500
+ rounded = input('md', /* @ts-ignore */
3501
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
3502
+ selectedDate = input(undefined, /* @ts-ignore */
3503
+ ...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
3504
+ showAdjacentDays = input(true, { ...(ngDevMode ? { debugName: "showAdjacentDays" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
3505
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
3506
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3507
+ view = input(undefined, /* @ts-ignore */
3508
+ ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
3509
+ viewDate = input(undefined, /* @ts-ignore */
3510
+ ...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
3511
+ weekdayFormat = input('short', /* @ts-ignore */
3512
+ ...(ngDevMode ? [{ debugName: "weekdayFormat" }] : /* istanbul ignore next */ []));
3513
+ dateSelect = output();
3514
+ eventSelect = output();
3515
+ selectedDateChange = output();
3516
+ viewChange = output();
3517
+ viewDateChange = output();
3518
+ currentView = signal('month', /* @ts-ignore */
3519
+ ...(ngDevMode ? [{ debugName: "currentView" }] : /* istanbul ignore next */ []));
3520
+ currentViewDate = signal(this.startOfMonth(new Date()), /* @ts-ignore */
3521
+ ...(ngDevMode ? [{ debugName: "currentViewDate" }] : /* istanbul ignore next */ []));
3522
+ currentSelectedDate = signal(null, /* @ts-ignore */
3523
+ ...(ngDevMode ? [{ debugName: "currentSelectedDate" }] : /* istanbul ignore next */ []));
3524
+ activeVariant = computed(() => this.variant(), /* @ts-ignore */
3525
+ ...(ngDevMode ? [{ debugName: "activeVariant" }] : /* istanbul ignore next */ []));
3526
+ themeVars = computed(() => {
3527
+ const variant = this.activeVariant();
3528
+ const isDark = this.themeService.dark();
3529
+ const accent = `var(--av-${variant}-${isDark ? 400 : 500})`;
3530
+ return {
3531
+ '--av-calendar-accent': accent,
3532
+ '--av-calendar-accent-strong': `var(--av-${variant}-${isDark ? 300 : 700})`,
3533
+ '--av-calendar-accent-soft': isDark
3534
+ ? `color-mix(in srgb, var(--av-${variant}-400) 16%, transparent)`
3535
+ : `var(--av-${variant}-50)`,
3536
+ '--av-calendar-bg': 'var(--av-color-surface)',
3537
+ '--av-calendar-border': 'var(--av-color-border-soft)',
3538
+ '--av-calendar-cell-bg': 'var(--av-color-surface)',
3539
+ '--av-calendar-cell-muted-bg': 'var(--av-color-surface-muted)',
3540
+ '--av-calendar-panel-bg': 'var(--av-color-surface-raised)',
3541
+ '--av-calendar-shadow': 'var(--av-shadow-raised)',
3542
+ '--av-calendar-text': 'var(--av-color-text)',
3543
+ '--av-calendar-muted': 'var(--av-color-text-muted)',
3544
+ '--av-calendar-radius': this.roundedStyle(),
3545
+ };
3546
+ }, /* @ts-ignore */
3547
+ ...(ngDevMode ? [{ debugName: "themeVars" }] : /* istanbul ignore next */ []));
3548
+ eventEntries = computed(() => {
3549
+ return this.events()
3550
+ .map((event) => this.normalizeEvent(event))
3551
+ .filter((event) => event !== null)
3552
+ .sort((a, b) => a.start.getTime() - b.start.getTime());
3553
+ }, /* @ts-ignore */
3554
+ ...(ngDevMode ? [{ debugName: "eventEntries" }] : /* istanbul ignore next */ []));
3555
+ weekdayLabels = computed(() => {
3556
+ const firstDay = this.safeFirstDayOfWeek();
3557
+ const formatter = new Intl.DateTimeFormat(this.locale(), { weekday: this.weekdayFormat() });
3558
+ const sunday = new Date(2026, 0, 4);
3559
+ return Array.from({ length: 7 }, (_, index) => {
3560
+ const date = this.addDays(sunday, firstDay + index);
3561
+ return formatter.format(date);
3562
+ });
3563
+ }, /* @ts-ignore */
3564
+ ...(ngDevMode ? [{ debugName: "weekdayLabels" }] : /* istanbul ignore next */ []));
3565
+ monthLabel = computed(() => {
3566
+ return new Intl.DateTimeFormat(this.locale(), {
3567
+ month: 'long',
3568
+ year: 'numeric',
3569
+ }).format(this.currentViewDate());
3570
+ }, /* @ts-ignore */
3571
+ ...(ngDevMode ? [{ debugName: "monthLabel" }] : /* istanbul ignore next */ []));
3572
+ yearLabel = computed(() => String(this.currentViewDate().getFullYear()), /* @ts-ignore */
3573
+ ...(ngDevMode ? [{ debugName: "yearLabel" }] : /* istanbul ignore next */ []));
3574
+ monthDays = computed(() => {
3575
+ return this.buildMonthDays(this.currentViewDate());
3576
+ }, /* @ts-ignore */
3577
+ ...(ngDevMode ? [{ debugName: "monthDays" }] : /* istanbul ignore next */ []));
3578
+ yearMonths = computed(() => {
3579
+ const year = this.currentViewDate().getFullYear();
3580
+ const monthFormatter = new Intl.DateTimeFormat(this.locale(), { month: 'long' });
3581
+ return Array.from({ length: 12 }, (_, month) => {
3582
+ const date = new Date(year, month, 1);
3583
+ const days = this.buildMonthDays(date);
3584
+ const events = this.eventEntries().filter(({ start, end }) => {
3585
+ const monthStart = this.startOfMonth(date);
3586
+ const monthEnd = this.endOfMonth(date);
3587
+ return start <= monthEnd && end >= monthStart;
3588
+ });
3589
+ return {
3590
+ date,
3591
+ days,
3592
+ eventCount: events.length,
3593
+ key: `${year}-${month}`,
3594
+ label: monthFormatter.format(date),
3595
+ };
3596
+ });
3597
+ }, /* @ts-ignore */
3598
+ ...(ngDevMode ? [{ debugName: "yearMonths" }] : /* istanbul ignore next */ []));
3599
+ selectedSummary = computed(() => {
3600
+ const selectedDate = this.currentSelectedDate();
3601
+ if (!selectedDate)
3602
+ return null;
3603
+ return {
3604
+ date: selectedDate,
3605
+ events: this.eventsForDate(selectedDate),
3606
+ label: new Intl.DateTimeFormat(this.locale(), {
3607
+ day: '2-digit',
3608
+ month: 'long',
3609
+ year: 'numeric',
3610
+ }).format(selectedDate),
3611
+ };
3612
+ }, /* @ts-ignore */
3613
+ ...(ngDevMode ? [{ debugName: "selectedSummary" }] : /* istanbul ignore next */ []));
3614
+ constructor() {
3615
+ effect(() => {
3616
+ const view = this.view();
3617
+ if (view !== undefined) {
3618
+ this.currentView.set(this.safeView(view));
3619
+ }
3620
+ });
3621
+ effect(() => {
3622
+ const date = this.viewDate();
3623
+ if (date !== undefined) {
3624
+ this.currentViewDate.set(this.startOfMonth(this.toDate(date) ?? new Date()));
3625
+ }
3626
+ });
3627
+ effect(() => {
3628
+ const date = this.selectedDate();
3629
+ if (date !== undefined) {
3630
+ this.currentSelectedDate.set(this.toDate(date));
3631
+ }
3632
+ });
3633
+ }
3634
+ get title() {
3635
+ return this.currentView() === 'year' ? this.yearLabel() : this.monthLabel();
3636
+ }
3637
+ previous() {
3638
+ const current = this.currentViewDate();
3639
+ const next = this.currentView() === 'year'
3640
+ ? new Date(current.getFullYear() - 1, 0, 1)
3641
+ : new Date(current.getFullYear(), current.getMonth() - 1, 1);
3642
+ this.setViewDate(next);
3643
+ }
3644
+ next() {
3645
+ const current = this.currentViewDate();
3646
+ const next = this.currentView() === 'year'
3647
+ ? new Date(current.getFullYear() + 1, 0, 1)
3648
+ : new Date(current.getFullYear(), current.getMonth() + 1, 1);
3649
+ this.setViewDate(next);
3650
+ }
3651
+ goToday() {
3652
+ const today = this.stripTime(new Date());
3653
+ this.setViewDate(today);
3654
+ this.selectDate(today);
3655
+ }
3656
+ setView(view) {
3657
+ const next = this.safeView(view);
3658
+ if (next === this.currentView())
3659
+ return;
3660
+ this.currentView.set(next);
3661
+ this.viewChange.emit(next);
3662
+ }
3663
+ openMonth(date) {
3664
+ this.setViewDate(date);
3665
+ this.setView('month');
3666
+ }
3667
+ selectDay(day) {
3668
+ if (day.isAdjacent && !this.showAdjacentDays())
3669
+ return;
3670
+ this.selectDate(day.date);
3671
+ }
3672
+ handleDayKeydown(event, day) {
3673
+ if (event.key !== 'Enter' && event.key !== ' ')
3674
+ return;
3675
+ event.preventDefault();
3676
+ this.selectDay(day);
3677
+ }
3678
+ selectEvent(event, date, mouseEvent) {
3679
+ mouseEvent.stopPropagation();
3680
+ if (event.disabled)
3681
+ return;
3682
+ this.eventSelect.emit({
3683
+ date: this.cloneDate(date),
3684
+ event,
3685
+ });
3686
+ }
3687
+ visibleEvents(events) {
3688
+ return events.slice(0, this.safeMaxVisibleEvents());
3689
+ }
3690
+ hiddenEventCount(events) {
3691
+ return Math.max(0, events.length - this.safeMaxVisibleEvents());
3692
+ }
3693
+ dotEvents(events) {
3694
+ return events.slice(0, 4);
3695
+ }
3696
+ eventColor(event) {
3697
+ if (event.color)
3698
+ return event.color;
3699
+ const variant = event.variant || this.activeVariant();
3700
+ const shade = this.themeService.dark() ? 400 : 500;
3701
+ return `var(--av-${variant}-${shade})`;
3702
+ }
3703
+ eventTimeLabel(event) {
3704
+ if (event.allDay)
3705
+ return 'Dia todo';
3706
+ const start = this.toDate(event.start);
3707
+ if (!start)
3708
+ return '';
3709
+ return new Intl.DateTimeFormat(this.locale(), {
3710
+ hour: '2-digit',
3711
+ minute: '2-digit',
3712
+ }).format(start);
3713
+ }
3714
+ dayAriaLabel(day) {
3715
+ const label = new Intl.DateTimeFormat(this.locale(), {
3716
+ day: 'numeric',
3717
+ month: 'long',
3718
+ year: 'numeric',
3719
+ }).format(day.date);
3720
+ if (!day.events.length)
3721
+ return label;
3722
+ return `${label}, ${day.events.length} evento${day.events.length === 1 ? '' : 's'}`;
3723
+ }
3724
+ trackEvent(_index, event) {
3725
+ return event.id;
3726
+ }
3727
+ trackDay(_index, day) {
3728
+ return day.key;
3729
+ }
3730
+ selectDate(date) {
3731
+ const selected = this.stripTime(date);
3732
+ const events = this.eventsForDate(selected);
3733
+ this.currentSelectedDate.set(selected);
3734
+ this.selectedDateChange.emit(this.cloneDate(selected));
3735
+ this.dateSelect.emit({
3736
+ date: this.cloneDate(selected),
3737
+ events,
3738
+ });
3739
+ }
3740
+ setViewDate(date) {
3741
+ const next = this.startOfMonth(date);
3742
+ this.currentViewDate.set(next);
3743
+ this.viewDateChange.emit(this.cloneDate(next));
3744
+ }
3745
+ buildMonthDays(date) {
3746
+ const monthStart = this.startOfMonth(date);
3747
+ const monthEnd = this.endOfMonth(date);
3748
+ const start = this.startOfWeek(monthStart);
3749
+ const end = this.endOfWeek(monthEnd);
3750
+ const days = [];
3751
+ for (let day = start; day <= end; day = this.addDays(day, 1)) {
3752
+ const dayDate = this.stripTime(day);
3753
+ const isCurrentMonth = dayDate.getMonth() === monthStart.getMonth();
3754
+ days.push({
3755
+ date: dayDate,
3756
+ events: this.eventsForDate(dayDate),
3757
+ isAdjacent: !isCurrentMonth,
3758
+ isCurrentMonth,
3759
+ isSelected: this.isSameDay(dayDate, this.currentSelectedDate()),
3760
+ isToday: this.isSameDay(dayDate, new Date()),
3761
+ key: this.dateKey(dayDate),
3762
+ });
3763
+ }
3764
+ return days;
3765
+ }
3766
+ eventsForDate(date) {
3767
+ const day = this.stripTime(date);
3768
+ return this.eventEntries()
3769
+ .filter(({ start, end }) => start <= day && end >= day)
3770
+ .map(({ event }) => event);
3771
+ }
3772
+ normalizeEvent(event) {
3773
+ const start = this.toDate(event.start);
3774
+ if (!start)
3775
+ return null;
3776
+ const end = this.toDate(event.end ?? event.start) ?? start;
3777
+ const startDay = this.stripTime(start);
3778
+ const endDay = this.stripTime(end);
3779
+ return {
3780
+ event,
3781
+ start: startDay,
3782
+ end: endDay >= startDay ? endDay : startDay,
3783
+ };
3784
+ }
3785
+ roundedStyle() {
3786
+ const rounded = this.rounded();
3787
+ return typeof rounded === 'string'
3788
+ ? `var(--av-radius-${rounded})`
3789
+ : `${rounded}px`;
3790
+ }
3791
+ safeFirstDayOfWeek() {
3792
+ const firstDay = Math.trunc(Number(this.firstDayOfWeek()));
3793
+ if (!Number.isFinite(firstDay))
3794
+ return 0;
3795
+ return ((firstDay % 7) + 7) % 7;
3796
+ }
3797
+ safeMaxVisibleEvents() {
3798
+ const max = Math.trunc(Number(this.maxVisibleEvents()));
3799
+ return Number.isFinite(max) && max > 0 ? max : 3;
3800
+ }
3801
+ safeView(view) {
3802
+ return view === 'year' ? 'year' : 'month';
3803
+ }
3804
+ startOfMonth(date) {
3805
+ return new Date(date.getFullYear(), date.getMonth(), 1);
3806
+ }
3807
+ endOfMonth(date) {
3808
+ return new Date(date.getFullYear(), date.getMonth() + 1, 0);
3809
+ }
3810
+ startOfWeek(date) {
3811
+ const day = this.stripTime(date);
3812
+ const offset = (day.getDay() - this.safeFirstDayOfWeek() + 7) % 7;
3813
+ return this.addDays(day, -offset);
3814
+ }
3815
+ endOfWeek(date) {
3816
+ return this.addDays(this.startOfWeek(date), 6);
3817
+ }
3818
+ addDays(date, days) {
3819
+ const next = this.cloneDate(date);
3820
+ next.setDate(next.getDate() + days);
3821
+ return next;
3822
+ }
3823
+ stripTime(date) {
3824
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
3825
+ }
3826
+ cloneDate(date) {
3827
+ return new Date(date.getTime());
3828
+ }
3829
+ toDate(value) {
3830
+ if (value === null || value === undefined || value === '')
3831
+ return null;
3832
+ const date = value instanceof Date ? new Date(value.getTime()) : new Date(value);
3833
+ return Number.isNaN(date.getTime()) ? null : date;
3834
+ }
3835
+ isSameDay(first, second) {
3836
+ if (!first || !second)
3837
+ return false;
3838
+ return first.getDate() === second.getDate()
3839
+ && first.getMonth() === second.getMonth()
3840
+ && first.getFullYear() === second.getFullYear();
3841
+ }
3842
+ dateKey(date) {
3843
+ const month = String(date.getMonth() + 1).padStart(2, '0');
3844
+ const day = String(date.getDate()).padStart(2, '0');
3845
+ return `${date.getFullYear()}-${month}-${day}`;
3846
+ }
3847
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
3848
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvCalendar, isStandalone: true, selector: "av-calendar", inputs: { events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, maxVisibleEvents: { classPropertyName: "maxVisibleEvents", publicName: "maxVisibleEvents", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: false, transformFunction: null }, showAdjacentDays: { classPropertyName: "showAdjacentDays", publicName: "showAdjacentDays", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, viewDate: { classPropertyName: "viewDate", publicName: "viewDate", isSignal: true, isRequired: false, transformFunction: null }, weekdayFormat: { classPropertyName: "weekdayFormat", publicName: "weekdayFormat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateSelect: "dateSelect", eventSelect: "eventSelect", selectedDateChange: "selectedDateChange", viewChange: "viewChange", viewDateChange: "viewDateChange" }, ngImport: i0, template: "<div class=\"av-calendar\" [ngStyle]=\"themeVars()\">\n <header class=\"av-calendar__header\">\n <div class=\"av-calendar__nav\">\n <button type=\"button\" class=\"av-calendar__nav-button\" (click)=\"previous()\" aria-label=\"Periodo anterior\">\n <span av-icon name=\"chevron_left\"></span>\n </button>\n\n <h2 class=\"av-calendar__title\">{{ title }}</h2>\n\n <button type=\"button\" class=\"av-calendar__nav-button\" (click)=\"next()\" aria-label=\"Proximo periodo\">\n <span av-icon name=\"chevron_right\"></span>\n </button>\n </div>\n\n <div class=\"av-calendar__actions\">\n <button type=\"button\" class=\"av-calendar__today\" (click)=\"goToday()\">Hoje</button>\n\n <div class=\"av-calendar__view-switch\" role=\"tablist\" aria-label=\"Visualizacao do calendario\">\n <button\n type=\"button\"\n class=\"av-calendar__view-button\"\n [class.av-calendar__view-button--active]=\"currentView() === 'month'\"\n [attr.aria-selected]=\"currentView() === 'month'\"\n role=\"tab\"\n (click)=\"setView('month')\"\n >\n Mes\n </button>\n\n <button\n type=\"button\"\n class=\"av-calendar__view-button\"\n [class.av-calendar__view-button--active]=\"currentView() === 'year'\"\n [attr.aria-selected]=\"currentView() === 'year'\"\n role=\"tab\"\n (click)=\"setView('year')\"\n >\n Ano\n </button>\n </div>\n </div>\n </header>\n\n @if (currentView() === 'month') {\n <section class=\"av-calendar__month\" [attr.aria-label]=\"monthLabel()\">\n <div class=\"av-calendar__weekdays\">\n @for (weekday of weekdayLabels(); track weekday) {\n <span class=\"av-calendar__weekday\">{{ weekday }}</span>\n }\n </div>\n\n <div class=\"av-calendar__month-grid\">\n @for (day of monthDays(); track trackDay($index, day)) {\n <div\n class=\"av-calendar__day\"\n [class.av-calendar__day--adjacent]=\"day.isAdjacent\"\n [class.av-calendar__day--hidden]=\"day.isAdjacent && !showAdjacentDays()\"\n [class.av-calendar__day--selected]=\"day.isSelected\"\n [class.av-calendar__day--today]=\"day.isToday\"\n [attr.aria-label]=\"dayAriaLabel(day)\"\n [attr.tabindex]=\"day.isAdjacent && !showAdjacentDays() ? -1 : 0\"\n role=\"button\"\n (click)=\"selectDay(day)\"\n (keydown)=\"handleDayKeydown($event, day)\"\n >\n <span class=\"av-calendar__day-number\">{{ day.date.getDate() }}</span>\n\n @if (day.events.length) {\n <div class=\"av-calendar__event-list\">\n @for (event of visibleEvents(day.events); track trackEvent($index, event)) {\n <button\n type=\"button\"\n class=\"av-calendar__event\"\n [class.av-calendar__event--disabled]=\"event.disabled\"\n [style.--av-calendar-event-color]=\"eventColor(event)\"\n [title]=\"event.title\"\n (click)=\"selectEvent(event, day.date, $event)\"\n >\n @if (!event.allDay) {\n <span class=\"av-calendar__event-time\">{{ eventTimeLabel(event) }}</span>\n }\n <span class=\"av-calendar__event-title\">{{ event.title }}</span>\n </button>\n }\n\n @if (hiddenEventCount(day.events) > 0) {\n <span class=\"av-calendar__event-more\">+{{ hiddenEventCount(day.events) }}</span>\n }\n </div>\n\n <div class=\"av-calendar__dots\" aria-hidden=\"true\">\n @for (event of dotEvents(day.events); track trackEvent($index, event)) {\n <span class=\"av-calendar__dot\" [style.background]=\"eventColor(event)\"></span>\n }\n </div>\n }\n </div>\n }\n </div>\n </section>\n } @else {\n <section class=\"av-calendar__year\" [attr.aria-label]=\"yearLabel()\">\n @for (month of yearMonths(); track month.key) {\n <article class=\"av-calendar__year-month\">\n <button type=\"button\" class=\"av-calendar__year-month-title\" (click)=\"openMonth(month.date)\">\n <span>{{ month.label }}</span>\n @if (month.eventCount) {\n <span class=\"av-calendar__year-month-count\">{{ month.eventCount }}</span>\n }\n </button>\n\n <div class=\"av-calendar__mini-weekdays\">\n @for (weekday of weekdayLabels(); track weekday) {\n <span>{{ weekday.slice(0, 1) }}</span>\n }\n </div>\n\n <div class=\"av-calendar__mini-grid\">\n @for (day of month.days; track trackDay($index, day)) {\n <button\n type=\"button\"\n class=\"av-calendar__mini-day\"\n [class.av-calendar__mini-day--adjacent]=\"day.isAdjacent\"\n [class.av-calendar__mini-day--selected]=\"day.isSelected\"\n [class.av-calendar__mini-day--today]=\"day.isToday\"\n [disabled]=\"day.isAdjacent\"\n [attr.aria-label]=\"dayAriaLabel(day)\"\n (click)=\"selectDay(day)\"\n >\n @if (!day.isAdjacent) {\n <span class=\"av-calendar__mini-day-number\">{{ day.date.getDate() }}</span>\n\n @if (day.events.length) {\n <span class=\"av-calendar__mini-dots\" aria-hidden=\"true\">\n @for (event of dotEvents(day.events); track trackEvent($index, event)) {\n <span class=\"av-calendar__mini-dot\" [style.background]=\"eventColor(event)\"></span>\n }\n </span>\n }\n }\n </button>\n }\n </div>\n </article>\n }\n </section>\n }\n\n @if (selectedSummary(); as selected) {\n <section class=\"av-calendar__selected\">\n <div class=\"av-calendar__selected-header\">\n <span class=\"av-calendar__selected-date\">{{ selected.label }}</span>\n <span class=\"av-calendar__selected-count\">{{ selected.events.length }}</span>\n </div>\n\n @if (selected.events.length) {\n <div class=\"av-calendar__selected-events\">\n @for (event of selected.events; track trackEvent($index, event)) {\n <button\n type=\"button\"\n class=\"av-calendar__selected-event\"\n [style.--av-calendar-event-color]=\"eventColor(event)\"\n (click)=\"selectEvent(event, selected.date, $event)\"\n >\n <span class=\"av-calendar__selected-event-body\">\n <span class=\"av-calendar__selected-event-title\">{{ event.title }}</span>\n <span class=\"av-calendar__selected-event-time\">{{ eventTimeLabel(event) }}</span>\n </span>\n </button>\n }\n </div>\n } @else {\n <span class=\"av-calendar__empty\">Sem eventos</span>\n }\n </section>\n }\n</div>\n", styles: [":host{container-type:inline-size;display:block}.av-calendar{background:var(--av-calendar-bg);border:1px solid var(--av-calendar-border);border-radius:var(--av-calendar-radius);box-sizing:border-box;color:var(--av-calendar-text);display:grid;gap:1rem;padding:1rem}.av-calendar__header{align-items:center;display:flex;gap:.75rem;justify-content:space-between}.av-calendar__nav,.av-calendar__actions{align-items:center;display:flex;gap:.5rem}.av-calendar__title{color:var(--av-calendar-text);font-size:1.05rem;font-weight:800;line-height:1.2;margin:0;text-transform:capitalize}.av-calendar__nav-button,.av-calendar__today,.av-calendar__view-button{align-items:center;background:var(--av-calendar-cell-bg);border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);color:var(--av-calendar-text);cursor:pointer;display:inline-flex;font:inherit;justify-content:center}.av-calendar__nav-button{height:2.25rem;padding:0;width:2.25rem}.av-calendar__today,.av-calendar__view-button{font-size:.8125rem;font-weight:800;min-height:2.25rem;padding:.45rem .7rem}.av-calendar__nav-button:hover,.av-calendar__today:hover,.av-calendar__view-button:hover,.av-calendar__view-button--active{background:var(--av-calendar-accent-soft);border-color:color-mix(in srgb,var(--av-calendar-accent) 34%,var(--av-calendar-border));color:var(--av-calendar-accent-strong)}.av-calendar__nav-button:focus-visible,.av-calendar__today:focus-visible,.av-calendar__view-button:focus-visible,.av-calendar__day:focus-visible,.av-calendar__mini-day:focus-visible,.av-calendar__event:focus-visible,.av-calendar__selected-event:focus-visible,.av-calendar__year-month-title:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--av-calendar-accent) 24%,transparent);outline:none}.av-calendar__view-switch{background:var(--av-calendar-cell-muted-bg);border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);display:inline-flex;padding:.125rem}.av-calendar__view-button{background:transparent;border-color:transparent;min-height:2rem;padding-inline:.65rem}.av-calendar__weekdays,.av-calendar__month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.av-calendar__weekdays{gap:.25rem;margin-bottom:.25rem}.av-calendar__weekday{color:var(--av-calendar-muted);font-size:.72rem;font-weight:800;padding:.25rem;text-align:center;text-transform:capitalize}.av-calendar__month-grid{background:var(--av-calendar-border);border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);gap:1px;overflow:hidden}.av-calendar__day{background:var(--av-calendar-cell-bg);box-sizing:border-box;cursor:pointer;display:grid;grid-template-rows:auto 1fr auto;min-height:7rem;min-width:0;padding:.5rem}.av-calendar__day:hover{background:var(--av-calendar-accent-soft)}.av-calendar__day--adjacent{background:var(--av-calendar-cell-muted-bg);color:var(--av-calendar-muted)}.av-calendar__day--hidden{cursor:default;opacity:.28}.av-calendar__day--selected{box-shadow:inset 0 0 0 2px var(--av-calendar-accent)}.av-calendar__day--today .av-calendar__day-number,.av-calendar__mini-day--today .av-calendar__mini-day-number{background:var(--av-calendar-accent);color:var(--av-white)}.av-calendar__day-number{align-items:center;border-radius:var(--av-radius-full);display:inline-flex;font-size:.8125rem;font-weight:800;height:1.7rem;justify-content:center;justify-self:end;line-height:1;width:1.7rem}.av-calendar__event-list{align-content:start;display:grid;gap:.25rem;margin-top:.35rem;min-width:0}.av-calendar__event,.av-calendar__event-more{border-radius:var(--av-radius-xs);font-size:.72rem;line-height:1.2;min-width:0}.av-calendar__event{align-items:center;background:color-mix(in srgb,var(--av-calendar-event-color) 12%,transparent);border:0;border-left:3px solid var(--av-calendar-event-color);color:var(--av-calendar-text);cursor:pointer;display:flex;gap:.3rem;padding:.25rem .35rem;text-align:left}.av-calendar__event:hover{background:color-mix(in srgb,var(--av-calendar-event-color) 18%,transparent)}.av-calendar__event--disabled{cursor:not-allowed;opacity:.52}.av-calendar__event-time{color:var(--av-calendar-muted);flex:0 0 auto;font-weight:800}.av-calendar__event-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-calendar__event-more{color:var(--av-calendar-muted);font-weight:800;padding-inline:.35rem}.av-calendar__dots,.av-calendar__mini-dots{align-items:center;display:flex;gap:.16rem;justify-content:center}.av-calendar__dots{display:none;margin-top:.2rem}.av-calendar__dot,.av-calendar__mini-dot{border-radius:var(--av-radius-full);flex:0 0 auto;height:.34rem;width:.34rem}.av-calendar__year{display:grid;gap:.75rem;grid-template-columns:repeat(4,minmax(0,1fr))}.av-calendar__year-month{background:var(--av-calendar-panel-bg);border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);display:grid;gap:.35rem;padding:.625rem}.av-calendar__year-month-title{align-items:center;background:transparent;border:0;border-radius:var(--av-radius-sm);color:var(--av-calendar-text);cursor:pointer;display:flex;font:inherit;font-size:.85rem;font-weight:800;justify-content:space-between;min-height:2rem;padding:.25rem .35rem;text-align:left;text-transform:capitalize}.av-calendar__year-month-count{background:var(--av-calendar-accent);border-radius:var(--av-radius-full);color:var(--av-white);font-size:.68rem;padding:.25rem .35rem}.av-calendar__mini-weekdays,.av-calendar__mini-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.av-calendar__mini-weekdays{color:var(--av-calendar-muted);font-size:.64rem;font-weight:800;text-align:center}.av-calendar__mini-day{align-items:center;aspect-ratio:1;background:transparent;border:0;border-radius:var(--av-radius-sm);color:var(--av-calendar-text);cursor:pointer;display:grid;gap:.08rem;justify-items:center;padding:.12rem}.av-calendar__mini-day:not(:disabled):hover,.av-calendar__mini-day--selected{background:var(--av-calendar-accent-soft);color:var(--av-calendar-accent-strong)}.av-calendar__mini-day-number{align-items:center;border-radius:var(--av-radius-full);display:inline-flex;font-size:.68rem;font-weight:800;height:1.25rem;justify-content:center;line-height:1;width:1.25rem}@container (max-width: 56rem){.av-calendar__year{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (max-width: 42rem){.av-calendar__year{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (max-width: 28rem){.av-calendar__year{grid-template-columns:1fr}}.av-calendar__selected{border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);padding:.75rem}.av-calendar__selected-header,.av-calendar__selected-event{align-items:center;display:flex;gap:.5rem;justify-content:space-between}.av-calendar__selected-date,.av-calendar__selected-event-title{font-weight:800}.av-calendar__selected-event-body{min-width:0}.av-calendar__selected-event{background:transparent;border:0;border-left:3px solid var(--av-calendar-event-color);color:var(--av-calendar-text);cursor:pointer;font:inherit;padding:.4rem;text-align:left;width:100%}.av-calendar__selected-event:hover{background:color-mix(in srgb,var(--av-calendar-event-color) 12%,transparent)}.av-calendar__selected-event-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-calendar__selected-count,.av-calendar__selected-event-time,.av-calendar__empty{color:var(--av-calendar-muted);font-size:.75rem;font-weight:700}@media(max-width:640px){.av-calendar{gap:.75rem;padding:.75rem}.av-calendar__header{align-items:stretch;display:grid}.av-calendar__nav,.av-calendar__actions{justify-content:space-between}.av-calendar__title{font-size:.98rem}.av-calendar__weekday{font-size:.68rem;padding:.2rem 0}.av-calendar__day{align-content:start;aspect-ratio:1;gap:.12rem;min-height:0;padding:.3rem .18rem}.av-calendar__day-number{font-size:.75rem;height:1.45rem;justify-self:center;width:1.45rem}.av-calendar__event-list{display:none}.av-calendar__dots{display:flex}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvIcon, selector: "span[av-icon], i[av-icon]", inputs: ["name", "size"] }] });
3849
+ }
3850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvCalendar, decorators: [{
3851
+ type: Component,
3852
+ args: [{ imports: [CommonModule, AvIcon], selector: 'av-calendar', standalone: true, template: "<div class=\"av-calendar\" [ngStyle]=\"themeVars()\">\n <header class=\"av-calendar__header\">\n <div class=\"av-calendar__nav\">\n <button type=\"button\" class=\"av-calendar__nav-button\" (click)=\"previous()\" aria-label=\"Periodo anterior\">\n <span av-icon name=\"chevron_left\"></span>\n </button>\n\n <h2 class=\"av-calendar__title\">{{ title }}</h2>\n\n <button type=\"button\" class=\"av-calendar__nav-button\" (click)=\"next()\" aria-label=\"Proximo periodo\">\n <span av-icon name=\"chevron_right\"></span>\n </button>\n </div>\n\n <div class=\"av-calendar__actions\">\n <button type=\"button\" class=\"av-calendar__today\" (click)=\"goToday()\">Hoje</button>\n\n <div class=\"av-calendar__view-switch\" role=\"tablist\" aria-label=\"Visualizacao do calendario\">\n <button\n type=\"button\"\n class=\"av-calendar__view-button\"\n [class.av-calendar__view-button--active]=\"currentView() === 'month'\"\n [attr.aria-selected]=\"currentView() === 'month'\"\n role=\"tab\"\n (click)=\"setView('month')\"\n >\n Mes\n </button>\n\n <button\n type=\"button\"\n class=\"av-calendar__view-button\"\n [class.av-calendar__view-button--active]=\"currentView() === 'year'\"\n [attr.aria-selected]=\"currentView() === 'year'\"\n role=\"tab\"\n (click)=\"setView('year')\"\n >\n Ano\n </button>\n </div>\n </div>\n </header>\n\n @if (currentView() === 'month') {\n <section class=\"av-calendar__month\" [attr.aria-label]=\"monthLabel()\">\n <div class=\"av-calendar__weekdays\">\n @for (weekday of weekdayLabels(); track weekday) {\n <span class=\"av-calendar__weekday\">{{ weekday }}</span>\n }\n </div>\n\n <div class=\"av-calendar__month-grid\">\n @for (day of monthDays(); track trackDay($index, day)) {\n <div\n class=\"av-calendar__day\"\n [class.av-calendar__day--adjacent]=\"day.isAdjacent\"\n [class.av-calendar__day--hidden]=\"day.isAdjacent && !showAdjacentDays()\"\n [class.av-calendar__day--selected]=\"day.isSelected\"\n [class.av-calendar__day--today]=\"day.isToday\"\n [attr.aria-label]=\"dayAriaLabel(day)\"\n [attr.tabindex]=\"day.isAdjacent && !showAdjacentDays() ? -1 : 0\"\n role=\"button\"\n (click)=\"selectDay(day)\"\n (keydown)=\"handleDayKeydown($event, day)\"\n >\n <span class=\"av-calendar__day-number\">{{ day.date.getDate() }}</span>\n\n @if (day.events.length) {\n <div class=\"av-calendar__event-list\">\n @for (event of visibleEvents(day.events); track trackEvent($index, event)) {\n <button\n type=\"button\"\n class=\"av-calendar__event\"\n [class.av-calendar__event--disabled]=\"event.disabled\"\n [style.--av-calendar-event-color]=\"eventColor(event)\"\n [title]=\"event.title\"\n (click)=\"selectEvent(event, day.date, $event)\"\n >\n @if (!event.allDay) {\n <span class=\"av-calendar__event-time\">{{ eventTimeLabel(event) }}</span>\n }\n <span class=\"av-calendar__event-title\">{{ event.title }}</span>\n </button>\n }\n\n @if (hiddenEventCount(day.events) > 0) {\n <span class=\"av-calendar__event-more\">+{{ hiddenEventCount(day.events) }}</span>\n }\n </div>\n\n <div class=\"av-calendar__dots\" aria-hidden=\"true\">\n @for (event of dotEvents(day.events); track trackEvent($index, event)) {\n <span class=\"av-calendar__dot\" [style.background]=\"eventColor(event)\"></span>\n }\n </div>\n }\n </div>\n }\n </div>\n </section>\n } @else {\n <section class=\"av-calendar__year\" [attr.aria-label]=\"yearLabel()\">\n @for (month of yearMonths(); track month.key) {\n <article class=\"av-calendar__year-month\">\n <button type=\"button\" class=\"av-calendar__year-month-title\" (click)=\"openMonth(month.date)\">\n <span>{{ month.label }}</span>\n @if (month.eventCount) {\n <span class=\"av-calendar__year-month-count\">{{ month.eventCount }}</span>\n }\n </button>\n\n <div class=\"av-calendar__mini-weekdays\">\n @for (weekday of weekdayLabels(); track weekday) {\n <span>{{ weekday.slice(0, 1) }}</span>\n }\n </div>\n\n <div class=\"av-calendar__mini-grid\">\n @for (day of month.days; track trackDay($index, day)) {\n <button\n type=\"button\"\n class=\"av-calendar__mini-day\"\n [class.av-calendar__mini-day--adjacent]=\"day.isAdjacent\"\n [class.av-calendar__mini-day--selected]=\"day.isSelected\"\n [class.av-calendar__mini-day--today]=\"day.isToday\"\n [disabled]=\"day.isAdjacent\"\n [attr.aria-label]=\"dayAriaLabel(day)\"\n (click)=\"selectDay(day)\"\n >\n @if (!day.isAdjacent) {\n <span class=\"av-calendar__mini-day-number\">{{ day.date.getDate() }}</span>\n\n @if (day.events.length) {\n <span class=\"av-calendar__mini-dots\" aria-hidden=\"true\">\n @for (event of dotEvents(day.events); track trackEvent($index, event)) {\n <span class=\"av-calendar__mini-dot\" [style.background]=\"eventColor(event)\"></span>\n }\n </span>\n }\n }\n </button>\n }\n </div>\n </article>\n }\n </section>\n }\n\n @if (selectedSummary(); as selected) {\n <section class=\"av-calendar__selected\">\n <div class=\"av-calendar__selected-header\">\n <span class=\"av-calendar__selected-date\">{{ selected.label }}</span>\n <span class=\"av-calendar__selected-count\">{{ selected.events.length }}</span>\n </div>\n\n @if (selected.events.length) {\n <div class=\"av-calendar__selected-events\">\n @for (event of selected.events; track trackEvent($index, event)) {\n <button\n type=\"button\"\n class=\"av-calendar__selected-event\"\n [style.--av-calendar-event-color]=\"eventColor(event)\"\n (click)=\"selectEvent(event, selected.date, $event)\"\n >\n <span class=\"av-calendar__selected-event-body\">\n <span class=\"av-calendar__selected-event-title\">{{ event.title }}</span>\n <span class=\"av-calendar__selected-event-time\">{{ eventTimeLabel(event) }}</span>\n </span>\n </button>\n }\n </div>\n } @else {\n <span class=\"av-calendar__empty\">Sem eventos</span>\n }\n </section>\n }\n</div>\n", styles: [":host{container-type:inline-size;display:block}.av-calendar{background:var(--av-calendar-bg);border:1px solid var(--av-calendar-border);border-radius:var(--av-calendar-radius);box-sizing:border-box;color:var(--av-calendar-text);display:grid;gap:1rem;padding:1rem}.av-calendar__header{align-items:center;display:flex;gap:.75rem;justify-content:space-between}.av-calendar__nav,.av-calendar__actions{align-items:center;display:flex;gap:.5rem}.av-calendar__title{color:var(--av-calendar-text);font-size:1.05rem;font-weight:800;line-height:1.2;margin:0;text-transform:capitalize}.av-calendar__nav-button,.av-calendar__today,.av-calendar__view-button{align-items:center;background:var(--av-calendar-cell-bg);border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);color:var(--av-calendar-text);cursor:pointer;display:inline-flex;font:inherit;justify-content:center}.av-calendar__nav-button{height:2.25rem;padding:0;width:2.25rem}.av-calendar__today,.av-calendar__view-button{font-size:.8125rem;font-weight:800;min-height:2.25rem;padding:.45rem .7rem}.av-calendar__nav-button:hover,.av-calendar__today:hover,.av-calendar__view-button:hover,.av-calendar__view-button--active{background:var(--av-calendar-accent-soft);border-color:color-mix(in srgb,var(--av-calendar-accent) 34%,var(--av-calendar-border));color:var(--av-calendar-accent-strong)}.av-calendar__nav-button:focus-visible,.av-calendar__today:focus-visible,.av-calendar__view-button:focus-visible,.av-calendar__day:focus-visible,.av-calendar__mini-day:focus-visible,.av-calendar__event:focus-visible,.av-calendar__selected-event:focus-visible,.av-calendar__year-month-title:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--av-calendar-accent) 24%,transparent);outline:none}.av-calendar__view-switch{background:var(--av-calendar-cell-muted-bg);border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);display:inline-flex;padding:.125rem}.av-calendar__view-button{background:transparent;border-color:transparent;min-height:2rem;padding-inline:.65rem}.av-calendar__weekdays,.av-calendar__month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.av-calendar__weekdays{gap:.25rem;margin-bottom:.25rem}.av-calendar__weekday{color:var(--av-calendar-muted);font-size:.72rem;font-weight:800;padding:.25rem;text-align:center;text-transform:capitalize}.av-calendar__month-grid{background:var(--av-calendar-border);border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);gap:1px;overflow:hidden}.av-calendar__day{background:var(--av-calendar-cell-bg);box-sizing:border-box;cursor:pointer;display:grid;grid-template-rows:auto 1fr auto;min-height:7rem;min-width:0;padding:.5rem}.av-calendar__day:hover{background:var(--av-calendar-accent-soft)}.av-calendar__day--adjacent{background:var(--av-calendar-cell-muted-bg);color:var(--av-calendar-muted)}.av-calendar__day--hidden{cursor:default;opacity:.28}.av-calendar__day--selected{box-shadow:inset 0 0 0 2px var(--av-calendar-accent)}.av-calendar__day--today .av-calendar__day-number,.av-calendar__mini-day--today .av-calendar__mini-day-number{background:var(--av-calendar-accent);color:var(--av-white)}.av-calendar__day-number{align-items:center;border-radius:var(--av-radius-full);display:inline-flex;font-size:.8125rem;font-weight:800;height:1.7rem;justify-content:center;justify-self:end;line-height:1;width:1.7rem}.av-calendar__event-list{align-content:start;display:grid;gap:.25rem;margin-top:.35rem;min-width:0}.av-calendar__event,.av-calendar__event-more{border-radius:var(--av-radius-xs);font-size:.72rem;line-height:1.2;min-width:0}.av-calendar__event{align-items:center;background:color-mix(in srgb,var(--av-calendar-event-color) 12%,transparent);border:0;border-left:3px solid var(--av-calendar-event-color);color:var(--av-calendar-text);cursor:pointer;display:flex;gap:.3rem;padding:.25rem .35rem;text-align:left}.av-calendar__event:hover{background:color-mix(in srgb,var(--av-calendar-event-color) 18%,transparent)}.av-calendar__event--disabled{cursor:not-allowed;opacity:.52}.av-calendar__event-time{color:var(--av-calendar-muted);flex:0 0 auto;font-weight:800}.av-calendar__event-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-calendar__event-more{color:var(--av-calendar-muted);font-weight:800;padding-inline:.35rem}.av-calendar__dots,.av-calendar__mini-dots{align-items:center;display:flex;gap:.16rem;justify-content:center}.av-calendar__dots{display:none;margin-top:.2rem}.av-calendar__dot,.av-calendar__mini-dot{border-radius:var(--av-radius-full);flex:0 0 auto;height:.34rem;width:.34rem}.av-calendar__year{display:grid;gap:.75rem;grid-template-columns:repeat(4,minmax(0,1fr))}.av-calendar__year-month{background:var(--av-calendar-panel-bg);border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);display:grid;gap:.35rem;padding:.625rem}.av-calendar__year-month-title{align-items:center;background:transparent;border:0;border-radius:var(--av-radius-sm);color:var(--av-calendar-text);cursor:pointer;display:flex;font:inherit;font-size:.85rem;font-weight:800;justify-content:space-between;min-height:2rem;padding:.25rem .35rem;text-align:left;text-transform:capitalize}.av-calendar__year-month-count{background:var(--av-calendar-accent);border-radius:var(--av-radius-full);color:var(--av-white);font-size:.68rem;padding:.25rem .35rem}.av-calendar__mini-weekdays,.av-calendar__mini-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.av-calendar__mini-weekdays{color:var(--av-calendar-muted);font-size:.64rem;font-weight:800;text-align:center}.av-calendar__mini-day{align-items:center;aspect-ratio:1;background:transparent;border:0;border-radius:var(--av-radius-sm);color:var(--av-calendar-text);cursor:pointer;display:grid;gap:.08rem;justify-items:center;padding:.12rem}.av-calendar__mini-day:not(:disabled):hover,.av-calendar__mini-day--selected{background:var(--av-calendar-accent-soft);color:var(--av-calendar-accent-strong)}.av-calendar__mini-day-number{align-items:center;border-radius:var(--av-radius-full);display:inline-flex;font-size:.68rem;font-weight:800;height:1.25rem;justify-content:center;line-height:1;width:1.25rem}@container (max-width: 56rem){.av-calendar__year{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (max-width: 42rem){.av-calendar__year{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (max-width: 28rem){.av-calendar__year{grid-template-columns:1fr}}.av-calendar__selected{border:1px solid var(--av-calendar-border);border-radius:var(--av-radius-sm);padding:.75rem}.av-calendar__selected-header,.av-calendar__selected-event{align-items:center;display:flex;gap:.5rem;justify-content:space-between}.av-calendar__selected-date,.av-calendar__selected-event-title{font-weight:800}.av-calendar__selected-event-body{min-width:0}.av-calendar__selected-event{background:transparent;border:0;border-left:3px solid var(--av-calendar-event-color);color:var(--av-calendar-text);cursor:pointer;font:inherit;padding:.4rem;text-align:left;width:100%}.av-calendar__selected-event:hover{background:color-mix(in srgb,var(--av-calendar-event-color) 12%,transparent)}.av-calendar__selected-event-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-calendar__selected-count,.av-calendar__selected-event-time,.av-calendar__empty{color:var(--av-calendar-muted);font-size:.75rem;font-weight:700}@media(max-width:640px){.av-calendar{gap:.75rem;padding:.75rem}.av-calendar__header{align-items:stretch;display:grid}.av-calendar__nav,.av-calendar__actions{justify-content:space-between}.av-calendar__title{font-size:.98rem}.av-calendar__weekday{font-size:.68rem;padding:.2rem 0}.av-calendar__day{align-content:start;aspect-ratio:1;gap:.12rem;min-height:0;padding:.3rem .18rem}.av-calendar__day-number{font-size:.75rem;height:1.45rem;justify-self:center;width:1.45rem}.av-calendar__event-list{display:none}.av-calendar__dots{display:flex}}\n"] }]
3853
+ }], ctorParameters: () => [], propDecorators: { events: [{ type: i0.Input, args: [{ isSignal: true, alias: "events", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], maxVisibleEvents: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleEvents", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: false }] }], showAdjacentDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAdjacentDays", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], viewDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewDate", required: false }] }], weekdayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekdayFormat", required: false }] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], eventSelect: [{ type: i0.Output, args: ["eventSelect"] }], selectedDateChange: [{ type: i0.Output, args: ["selectedDateChange"] }], viewChange: [{ type: i0.Output, args: ["viewChange"] }], viewDateChange: [{ type: i0.Output, args: ["viewDateChange"] }] } });
3854
+
3855
+ class AvBadge {
3856
+ config = inject(VISUALS_CONFIG);
3857
+ variant = input(this.config.theme.defaultVariant, /* @ts-ignore */
3858
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3859
+ get lightBackground() {
3860
+ return `var(--av-${this.variant()}-500)`;
3861
+ }
3862
+ get darkBackground() {
3863
+ return `var(--av-${this.variant()}-600)`;
3864
+ }
3865
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvBadge, deps: [], target: i0.ɵɵFactoryTarget.Component });
3866
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AvBadge, isStandalone: true, selector: "span[av-badge]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--av-badge-light-bg": "this.lightBackground", "style.--av-badge-dark-bg": "this.darkBackground" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:inline-flex;width:fit-content;flex-shrink:0;align-items:center;justify-content:center;gap:5px;overflow:hidden;border-radius:9999px;min-height:1.25rem;min-width:1.25rem;padding:2px 8px;font-size:11px;font-weight:500;line-height:1.2;white-space:nowrap;background-color:var(--av-badge-light-bg);color:var(--av-white);transition:background-color .15s ease,color .15s ease}:host-context([data-av-theme=\"dark\"]){background-color:var(--av-badge-dark-bg)}\n"] });
3867
+ }
3868
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvBadge, decorators: [{
3869
+ type: Component,
3870
+ args: [{ selector: 'span[av-badge]', template: "<ng-content></ng-content>\n", styles: [":host{display:inline-flex;width:fit-content;flex-shrink:0;align-items:center;justify-content:center;gap:5px;overflow:hidden;border-radius:9999px;min-height:1.25rem;min-width:1.25rem;padding:2px 8px;font-size:11px;font-weight:500;line-height:1.2;white-space:nowrap;background-color:var(--av-badge-light-bg);color:var(--av-white);transition:background-color .15s ease,color .15s ease}:host-context([data-av-theme=\"dark\"]){background-color:var(--av-badge-dark-bg)}\n"] }]
3871
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], lightBackground: [{
3872
+ type: HostBinding,
3873
+ args: ['style.--av-badge-light-bg']
3874
+ }], darkBackground: [{
3875
+ type: HostBinding,
3876
+ args: ['style.--av-badge-dark-bg']
3877
+ }] } });
500
3878
 
501
3879
  /**
502
3880
  * Generated bundle index. Do not edit.
503
3881
  */
504
3882
 
505
- export { AvCluster, AvDivider, AvDropdown, AvInline, AvNavLink, AvSidenav, AvStack, VISUALS_CONFIG };
3883
+ export { AvBadge, AvButton, AvCalendar, AvCard, AvCarousel, AvCarouselItem, AvCheckbox, AvCluster, AvCurrencyInput, AvDateTimePicker, AvDivider, AvDropdown, AvDropdownItem, AvFileUpload, AvForm, AvGrid, AvIcon, AvIconRegistry, AvInline, AvInput, AvMultiSelect, AvNavDropdown, AvNavLink, AvPaginator, AvProgressBar, AvProgressBarCircle, AvSelect, AvSidenav, AvSlider, AvStack, AvStep, AvStepper, AvSwitch, AvTab, AvTable, AvTabs, AvText, AvTextArea, AvTooltip, ThemeService, VISUALS_CONFIG, provideAngularVisuals };
506
3884
  //# sourceMappingURL=angular-visuals.mjs.map