@ojiepermana/angular-component 22.0.43 → 22.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/fesm2022/ojiepermana-angular-component-accordion.mjs +21 -23
  2. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +111 -50
  3. package/fesm2022/ojiepermana-angular-component-alert.mjs +13 -17
  4. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +4 -5
  5. package/fesm2022/ojiepermana-angular-component-avatar.mjs +20 -26
  6. package/fesm2022/ojiepermana-angular-component-badge.mjs +4 -5
  7. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +32 -35
  8. package/fesm2022/ojiepermana-angular-component-button-group.mjs +10 -13
  9. package/fesm2022/ojiepermana-angular-component-button.mjs +4 -5
  10. package/fesm2022/ojiepermana-angular-component-calendar.mjs +10 -8
  11. package/fesm2022/ojiepermana-angular-component-card.mjs +22 -29
  12. package/fesm2022/ojiepermana-angular-component-carousel.mjs +31 -34
  13. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +42 -13
  14. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +19 -17
  15. package/fesm2022/ojiepermana-angular-component-combobox.mjs +30 -17
  16. package/fesm2022/ojiepermana-angular-component-command.mjs +29 -37
  17. package/fesm2022/ojiepermana-angular-component-composer.mjs +31 -34
  18. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +3 -3
  19. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +39 -14
  20. package/fesm2022/ojiepermana-angular-component-dialog.mjs +100 -45
  21. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +61 -56
  22. package/fesm2022/ojiepermana-angular-component-editor.mjs +52 -43
  23. package/fesm2022/ojiepermana-angular-component-empty.mjs +19 -25
  24. package/fesm2022/ojiepermana-angular-component-form.mjs +41 -49
  25. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +10 -11
  26. package/fesm2022/ojiepermana-angular-component-icon.mjs +56 -11
  27. package/fesm2022/ojiepermana-angular-component-input-group.mjs +29 -27
  28. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +29 -28
  29. package/fesm2022/ojiepermana-angular-component-input.mjs +4 -5
  30. package/fesm2022/ojiepermana-angular-component-item.mjs +31 -41
  31. package/fesm2022/ojiepermana-angular-component-kanban.mjs +47 -46
  32. package/fesm2022/ojiepermana-angular-component-kbd.mjs +7 -9
  33. package/fesm2022/ojiepermana-angular-component-label.mjs +4 -5
  34. package/fesm2022/ojiepermana-angular-component-menubar.mjs +16 -16
  35. package/fesm2022/ojiepermana-angular-component-native-select.mjs +11 -11
  36. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +41 -28
  37. package/fesm2022/ojiepermana-angular-component-pagination.mjs +25 -16
  38. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +78 -50
  39. package/fesm2022/ojiepermana-angular-component-popover.mjs +6 -6
  40. package/fesm2022/ojiepermana-angular-component-progress.mjs +10 -8
  41. package/fesm2022/ojiepermana-angular-component-radio.mjs +17 -13
  42. package/fesm2022/ojiepermana-angular-component-resizable.mjs +32 -21
  43. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +11 -9
  44. package/fesm2022/ojiepermana-angular-component-select.mjs +35 -23
  45. package/fesm2022/ojiepermana-angular-component-separator.mjs +4 -5
  46. package/fesm2022/ojiepermana-angular-component-sheet.mjs +101 -45
  47. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +4 -5
  48. package/fesm2022/ojiepermana-angular-component-slider.mjs +30 -18
  49. package/fesm2022/ojiepermana-angular-component-spinner.mjs +9 -8
  50. package/fesm2022/ojiepermana-angular-component-switch.mjs +19 -10
  51. package/fesm2022/ojiepermana-angular-component-table.mjs +26 -34
  52. package/fesm2022/ojiepermana-angular-component-tabs.mjs +20 -24
  53. package/fesm2022/ojiepermana-angular-component-textarea.mjs +4 -5
  54. package/fesm2022/ojiepermana-angular-component-timeline.mjs +28 -28
  55. package/fesm2022/ojiepermana-angular-component-toast.mjs +3 -3
  56. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +18 -13
  57. package/fesm2022/ojiepermana-angular-component-toggle.mjs +4 -5
  58. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +20 -19
  59. package/package.json +10 -1
  60. package/types/ojiepermana-angular-component-alert-dialog.d.ts +42 -3
  61. package/types/ojiepermana-angular-component-dialog.d.ts +33 -3
  62. package/types/ojiepermana-angular-component-icon.d.ts +48 -1
  63. package/types/ojiepermana-angular-component-sheet.d.ts +33 -3
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ViewContainerRef, DestroyRef, ElementRef, model, input, output, viewChild, computed, effect, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
2
+ import { inject, ViewContainerRef, DestroyRef, ElementRef, model, input, output, signal, computed, viewChild, effect, Component, Directive } from '@angular/core';
3
3
  import { Overlay } from '@angular/cdk/overlay';
4
4
  import { TemplatePortal } from '@angular/cdk/portal';
5
5
  import { FocusTrapFactory } from '@angular/cdk/a11y';
@@ -7,7 +7,7 @@ import { DOCUMENT } from '@angular/common';
7
7
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
8
8
  import { filter } from 'rxjs/operators';
9
9
  import { ButtonComponent } from '@ojiepermana/angular-component/button';
10
- import { cn, radiusBaseValue, densityBaseValue } from '@ojiepermana/angular-component/utils';
10
+ import { cn, radiusBaseValue, densityBaseValue, uniqueId } from '@ojiepermana/angular-component/utils';
11
11
 
12
12
  const SIDE_BASE = {
13
13
  top: 'inset-x-0 top-0 border-b border-border',
@@ -51,6 +51,9 @@ class SheetComponent {
51
51
  ...(ngDevMode ? [{ debugName: "closeButtonLabel" }] : /* istanbul ignore next */ []));
52
52
  labelledBy = input(null, { ...(ngDevMode ? { debugName: "labelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
53
53
  describedBy = input(null, { ...(ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
54
+ /** ARIA role for the surface. Defaults to `'dialog'`. */
55
+ role = input('dialog', /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
54
57
  class = input('', /* @ts-ignore */
55
58
  ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
56
59
  radius = input('inherit', /* @ts-ignore */
@@ -58,6 +61,16 @@ class SheetComponent {
58
61
  density = input('inherit', /* @ts-ignore */
59
62
  ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
60
63
  openedChange = output();
64
+ registeredTitleId = signal(null, /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "registeredTitleId" }] : /* istanbul ignore next */ []));
66
+ registeredDescriptionId = signal(null, /* @ts-ignore */
67
+ ...(ngDevMode ? [{ debugName: "registeredDescriptionId" }] : /* istanbul ignore next */ []));
68
+ /** Explicit `aria-labelledby` wins; otherwise a projected `SheetTitle` supplies the id. */
69
+ resolvedLabelledBy = computed(() => this.labelledBy() ?? this.registeredTitleId(), /* @ts-ignore */
70
+ ...(ngDevMode ? [{ debugName: "resolvedLabelledBy" }] : /* istanbul ignore next */ []));
71
+ /** Explicit `aria-describedby` wins; otherwise a projected `SheetDescription` supplies the id. */
72
+ resolvedDescribedBy = computed(() => this.describedBy() ?? this.registeredDescriptionId(), /* @ts-ignore */
73
+ ...(ngDevMode ? [{ debugName: "resolvedDescribedBy" }] : /* istanbul ignore next */ []));
61
74
  tpl = viewChild.required('tpl');
62
75
  overlayRef = null;
63
76
  focusTrap = null;
@@ -124,6 +137,26 @@ class SheetComponent {
124
137
  close() {
125
138
  this.open.set(false);
126
139
  }
140
+ /** Called by a projected `SheetTitle` so default usage has an accessible name (AXE-safe). */
141
+ registerTitleId(id) {
142
+ this.registeredTitleId.set(id);
143
+ }
144
+ /** Cleared by a `SheetTitle` on destroy so a closed/reopened sheet never points at a stale id. */
145
+ unregisterTitleId(id) {
146
+ if (this.registeredTitleId() === id) {
147
+ this.registeredTitleId.set(null);
148
+ }
149
+ }
150
+ /** Called by a projected `SheetDescription`. */
151
+ registerDescriptionId(id) {
152
+ this.registeredDescriptionId.set(id);
153
+ }
154
+ /** Cleared by a `SheetDescription` on destroy. */
155
+ unregisterDescriptionId(id) {
156
+ if (this.registeredDescriptionId() === id) {
157
+ this.registeredDescriptionId.set(null);
158
+ }
159
+ }
127
160
  isDrawerHost() {
128
161
  const variant = this.variant();
129
162
  if (variant) {
@@ -133,19 +166,20 @@ class SheetComponent {
133
166
  // localName DOM selalu lowercase, meski tag template ditulis '<Drawer>'.
134
167
  return this.host.nativeElement.localName === 'drawer';
135
168
  }
136
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
137
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: SheetComponent, isStandalone: true, selector: "Sheet, Drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, describedBy: { classPropertyName: "describedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", openedChange: "openedChange" }, viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
169
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
170
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: SheetComponent, isStandalone: true, selector: "Sheet, Drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, describedBy: { classPropertyName: "describedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", openedChange: "openedChange" }, viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
138
171
  <ng-template #tpl>
139
172
  <div
140
173
  class="sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
141
- role="dialog"
174
+ [attr.role]="role()"
142
175
  aria-modal="true"
143
- [attr.aria-labelledby]="labelledBy()"
144
- [attr.aria-describedby]="describedBy()"
176
+ [attr.aria-labelledby]="resolvedLabelledBy()"
177
+ [attr.aria-describedby]="resolvedDescribedBy()"
145
178
  [class]="surfaceClasses()"
146
179
  [style.--sheet-from]="enterFrom()"
147
180
  [style.--radius-base]="radiusBase()"
148
- [style.--spacing-base]="densityBase()">
181
+ [style.--spacing-base]="densityBase()"
182
+ >
149
183
  @if (showCloseButton()) {
150
184
  <button
151
185
  type="button"
@@ -154,7 +188,8 @@ class SheetComponent {
154
188
  size="icon-sm"
155
189
  class="sheet-close-button absolute right-4 top-4 h-8 w-8 rounded-md p-0 text-muted-foreground opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring"
156
190
  [attr.aria-label]="closeButtonLabel()"
157
- (click)="close()">
191
+ (click)="close()"
192
+ >
158
193
  <span aria-hidden="true">X</span>
159
194
  <span class="sr-only">{{ closeButtonLabel() }}</span>
160
195
  </button>
@@ -162,22 +197,23 @@ class SheetComponent {
162
197
  <ng-content />
163
198
  </div>
164
199
  </ng-template>
165
- `, isInline: true, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class", "radius", "density"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
200
+ `, isInline: true, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class", "radius", "density"] }] });
166
201
  }
167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetComponent, decorators: [{
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetComponent, decorators: [{
168
203
  type: Component,
169
- args: [{ selector: 'Sheet, Drawer', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent], template: `
204
+ args: [{ selector: 'Sheet, Drawer', imports: [ButtonComponent], template: `
170
205
  <ng-template #tpl>
171
206
  <div
172
207
  class="sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
173
- role="dialog"
208
+ [attr.role]="role()"
174
209
  aria-modal="true"
175
- [attr.aria-labelledby]="labelledBy()"
176
- [attr.aria-describedby]="describedBy()"
210
+ [attr.aria-labelledby]="resolvedLabelledBy()"
211
+ [attr.aria-describedby]="resolvedDescribedBy()"
177
212
  [class]="surfaceClasses()"
178
213
  [style.--sheet-from]="enterFrom()"
179
214
  [style.--radius-base]="radiusBase()"
180
- [style.--spacing-base]="densityBase()">
215
+ [style.--spacing-base]="densityBase()"
216
+ >
181
217
  @if (showCloseButton()) {
182
218
  <button
183
219
  type="button"
@@ -186,7 +222,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
186
222
  size="icon-sm"
187
223
  class="sheet-close-button absolute right-4 top-4 h-8 w-8 rounded-md p-0 text-muted-foreground opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring"
188
224
  [attr.aria-label]="closeButtonLabel()"
189
- (click)="close()">
225
+ (click)="close()"
226
+ >
190
227
  <span aria-hidden="true">X</span>
191
228
  <span class="sr-only">{{ closeButtonLabel() }}</span>
192
229
  </button>
@@ -195,17 +232,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
195
232
  </div>
196
233
  </ng-template>
197
234
  `, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"] }]
198
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], describedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
235
+ }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], describedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
199
236
 
200
237
  class SheetCloseDirective {
201
238
  sheet = inject(SheetComponent);
202
239
  closeSheet() {
203
240
  this.sheet.close();
204
241
  }
205
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
206
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.3", type: SheetCloseDirective, isStandalone: true, selector: "button[SheetClose], a[SheetClose], button[DrawerClose], a[DrawerClose]", host: { listeners: { "click": "closeSheet()" } }, ngImport: i0 });
242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
243
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.4", type: SheetCloseDirective, isStandalone: true, selector: "button[SheetClose], a[SheetClose], button[DrawerClose], a[DrawerClose]", host: { listeners: { "click": "closeSheet()" } }, ngImport: i0 });
207
244
  }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetCloseDirective, decorators: [{
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetCloseDirective, decorators: [{
209
246
  type: Directive,
210
247
  args: [{
211
248
  selector: 'button[SheetClose], a[SheetClose], button[DrawerClose], a[DrawerClose]',
@@ -220,65 +257,85 @@ class SheetHeaderComponent {
220
257
  ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
221
258
  classes = computed(() => cn('flex flex-col gap-2 text-center sm:text-left', this.class()), /* @ts-ignore */
222
259
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
223
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
224
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: SheetHeaderComponent, isStandalone: true, selector: "SheetHeader, DrawerHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
260
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
261
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetHeaderComponent, isStandalone: true, selector: "SheetHeader, DrawerHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
225
262
  }
226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetHeaderComponent, decorators: [{
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetHeaderComponent, decorators: [{
227
264
  type: Component,
228
265
  args: [{
229
266
  selector: 'SheetHeader, DrawerHeader',
230
- changeDetection: ChangeDetectionStrategy.OnPush,
231
267
  host: { '[class]': 'classes()' },
232
268
  template: `<ng-content />`,
233
269
  }]
234
270
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
235
271
  class SheetTitleComponent {
272
+ /** Explicit id override; when omitted a document-unique id is generated. */
273
+ id = input(null, /* @ts-ignore */
274
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
236
275
  class = input('', /* @ts-ignore */
237
276
  ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
277
+ autoId = uniqueId('sheet-title');
278
+ sheet = inject(SheetComponent, { optional: true });
279
+ /** The id rendered on the element, used by the parent sheet for aria-labelledby. */
280
+ resolvedId = computed(() => this.id() ?? this.autoId, /* @ts-ignore */
281
+ ...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
238
282
  classes = computed(() => cn('text-lg font-semibold text-foreground', this.class()), /* @ts-ignore */
239
283
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
240
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
241
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: SheetTitleComponent, isStandalone: true, selector: "SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
284
+ constructor() {
285
+ effect(() => this.sheet?.registerTitleId(this.resolvedId()));
286
+ inject(DestroyRef).onDestroy(() => this.sheet?.unregisterTitleId(this.resolvedId()));
287
+ }
288
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
289
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetTitleComponent, isStandalone: true, selector: "SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "resolvedId()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
242
290
  }
243
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetTitleComponent, decorators: [{
291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetTitleComponent, decorators: [{
244
292
  type: Component,
245
293
  args: [{
246
294
  selector: 'SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]',
247
- changeDetection: ChangeDetectionStrategy.OnPush,
248
- host: { '[class]': 'classes()' },
295
+ host: { '[class]': 'classes()', '[attr.id]': 'resolvedId()' },
249
296
  template: `<ng-content />`,
250
297
  }]
251
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
298
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
252
299
  class SheetDescriptionComponent {
300
+ /** Explicit id override; when omitted a document-unique id is generated. */
301
+ id = input(null, /* @ts-ignore */
302
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
253
303
  class = input('', /* @ts-ignore */
254
304
  ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
305
+ autoId = uniqueId('sheet-description');
306
+ sheet = inject(SheetComponent, { optional: true });
307
+ /** The id rendered on the element, used by the parent sheet for aria-describedby. */
308
+ resolvedId = computed(() => this.id() ?? this.autoId, /* @ts-ignore */
309
+ ...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
255
310
  classes = computed(() => cn('text-sm text-muted-foreground', this.class()), /* @ts-ignore */
256
311
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
257
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
258
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: SheetDescriptionComponent, isStandalone: true, selector: "SheetDescription, DrawerDescription, p[SheetDescription], p[DrawerDescription]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
312
+ constructor() {
313
+ effect(() => this.sheet?.registerDescriptionId(this.resolvedId()));
314
+ inject(DestroyRef).onDestroy(() => this.sheet?.unregisterDescriptionId(this.resolvedId()));
315
+ }
316
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
317
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetDescriptionComponent, isStandalone: true, selector: "SheetDescription, DrawerDescription, p[SheetDescription], p[DrawerDescription]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "resolvedId()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
259
318
  }
260
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetDescriptionComponent, decorators: [{
319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetDescriptionComponent, decorators: [{
261
320
  type: Component,
262
321
  args: [{
263
322
  selector: 'SheetDescription, DrawerDescription, p[SheetDescription], p[DrawerDescription]',
264
- changeDetection: ChangeDetectionStrategy.OnPush,
265
- host: { '[class]': 'classes()' },
323
+ host: { '[class]': 'classes()', '[attr.id]': 'resolvedId()' },
266
324
  template: `<ng-content />`,
267
325
  }]
268
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
326
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
269
327
  class SheetContentComponent {
270
328
  class = input('', /* @ts-ignore */
271
329
  ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
272
330
  classes = computed(() => cn('flex-1 overflow-auto', this.class()), /* @ts-ignore */
273
331
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
274
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
275
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: SheetContentComponent, isStandalone: true, selector: "SheetContent, DrawerContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
332
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
333
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetContentComponent, isStandalone: true, selector: "SheetContent, DrawerContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
276
334
  }
277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetContentComponent, decorators: [{
335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetContentComponent, decorators: [{
278
336
  type: Component,
279
337
  args: [{
280
338
  selector: 'SheetContent, DrawerContent',
281
- changeDetection: ChangeDetectionStrategy.OnPush,
282
339
  host: { '[class]': 'classes()' },
283
340
  template: `<ng-content />`,
284
341
  }]
@@ -288,14 +345,13 @@ class SheetFooterComponent {
288
345
  ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
289
346
  classes = computed(() => cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', this.class()), /* @ts-ignore */
290
347
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
291
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
292
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: SheetFooterComponent, isStandalone: true, selector: "SheetFooter, DrawerFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
348
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
349
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SheetFooterComponent, isStandalone: true, selector: "SheetFooter, DrawerFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
293
350
  }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetFooterComponent, decorators: [{
351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SheetFooterComponent, decorators: [{
295
352
  type: Component,
296
353
  args: [{
297
354
  selector: 'SheetFooter, DrawerFooter',
298
- changeDetection: ChangeDetectionStrategy.OnPush,
299
355
  host: { '[class]': 'classes()' },
300
356
  template: `<ng-content />`,
301
357
  }]
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, computed, Component } from '@angular/core';
3
3
  import { cn } from '@ojiepermana/angular-component/utils';
4
4
 
5
5
  class SkeletonComponent {
@@ -7,14 +7,13 @@ class SkeletonComponent {
7
7
  ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
8
8
  classes = computed(() => cn('block animate-pulse rounded-md bg-muted', this.class()), /* @ts-ignore */
9
9
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
10
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: SkeletonComponent, isStandalone: true, selector: "Skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-hidden": "\"true\"" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SkeletonComponent, isStandalone: true, selector: "Skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-hidden": "\"true\"" } }, ngImport: i0, template: '', isInline: true });
12
12
  }
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SkeletonComponent, decorators: [{
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SkeletonComponent, decorators: [{
14
14
  type: Component,
15
15
  args: [{
16
16
  selector: 'Skeleton',
17
- changeDetection: ChangeDetectionStrategy.OnPush,
18
17
  host: {
19
18
  '[class]': 'classes()',
20
19
  '[attr.aria-hidden]': '"true"',
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, computed, ChangeDetectionStrategy, Component, viewChild, numberAttribute, booleanAttribute, output, signal, effect, untracked } from '@angular/core';
2
+ import { inject, ElementRef, input, computed, Component, viewChild, numberAttribute, booleanAttribute, output, signal, effect, untracked } from '@angular/core';
3
3
  import { cn } from '@ojiepermana/angular-component/utils';
4
4
  import { DOCUMENT } from '@angular/common';
5
5
 
@@ -16,12 +16,12 @@ class SliderComponent {
16
16
  focus() {
17
17
  this.el.nativeElement.focus();
18
18
  }
19
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: SliderComponent, isStandalone: true, selector: "input[type=range][Slider]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true, styles: [":host.Slider{height:1.25rem;cursor:pointer}:host.Slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.Slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.Slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.Slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.Slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.Slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.Slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.Slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SliderComponent, isStandalone: true, selector: "input[type=range][Slider]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true, styles: [":host.Slider{height:1.25rem;cursor:pointer}:host.Slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.Slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.Slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.Slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.Slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.Slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.Slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.Slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"] });
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SliderComponent, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SliderComponent, decorators: [{
23
23
  type: Component,
24
- args: [{ selector: 'input[type=range][Slider]', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'classes()' }, template: '', styles: [":host.Slider{height:1.25rem;cursor:pointer}:host.Slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.Slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.Slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.Slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.Slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.Slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.Slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.Slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"] }]
24
+ args: [{ selector: 'input[type=range][Slider]', host: { '[class]': 'classes()' }, template: '', styles: [":host.Slider{height:1.25rem;cursor:pointer}:host.Slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.Slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.Slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.Slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.Slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.Slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.Slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.Slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"] }]
25
25
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
26
26
 
27
27
  class SliderRootComponent {
@@ -161,10 +161,14 @@ class SliderRootComponent {
161
161
  let nextValue = null;
162
162
  switch (event.key) {
163
163
  case 'ArrowRight':
164
- nextValue = current + (direction === 'rtl' && this.orientation() === 'horizontal' ? -config.step : config.step);
164
+ nextValue =
165
+ current +
166
+ (direction === 'rtl' && this.orientation() === 'horizontal' ? -config.step : config.step);
165
167
  break;
166
168
  case 'ArrowLeft':
167
- nextValue = current + (direction === 'rtl' && this.orientation() === 'horizontal' ? config.step : -config.step);
169
+ nextValue =
170
+ current +
171
+ (direction === 'rtl' && this.orientation() === 'horizontal' ? config.step : -config.step);
168
172
  break;
169
173
  case 'ArrowUp':
170
174
  nextValue = current + config.step;
@@ -261,7 +265,9 @@ class SliderRootComponent {
261
265
  return this.orientation() === 'horizontal' && this.resolvedDirection() === 'rtl' ? 100 : 0;
262
266
  }
263
267
  const logicalRatio = (value - config.min) / range;
264
- const physicalRatio = this.orientation() === 'horizontal' && this.resolvedDirection() === 'rtl' ? 1 - logicalRatio : logicalRatio;
268
+ const physicalRatio = this.orientation() === 'horizontal' && this.resolvedDirection() === 'rtl'
269
+ ? 1 - logicalRatio
270
+ : logicalRatio;
265
271
  return clamp(physicalRatio * 100, 0, 100);
266
272
  }
267
273
  thumbLabel(index, count) {
@@ -289,15 +295,16 @@ class SliderRootComponent {
289
295
  }
290
296
  return view.getComputedStyle(host).direction === 'rtl' ? 'rtl' : 'ltr';
291
297
  }
292
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SliderRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
293
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: SliderRootComponent, isStandalone: true, selector: "Slider", inputs: { 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 }, minStepsBetweenThumbs: { classPropertyName: "minStepsBetweenThumbs", publicName: "minStepsBetweenThumbs", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, thumbLabels: { classPropertyName: "thumbLabels", publicName: "thumbLabels", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { listeners: { "window:pointermove": "onWindowPointerMove($event)", "window:pointerup": "onWindowPointerUp($event)", "window:pointercancel": "onWindowPointerUp($event)" }, properties: { "class": "hostClasses()", "attr.data-disabled": "isDisabled() ? \"\" : null", "attr.data-orientation": "orientation()" } }, viewQueries: [{ propertyName: "track", first: true, predicate: ["track"], descendants: true, isSignal: true }], ngImport: i0, template: `
298
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SliderRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
299
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: SliderRootComponent, isStandalone: true, selector: "Slider", inputs: { 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 }, minStepsBetweenThumbs: { classPropertyName: "minStepsBetweenThumbs", publicName: "minStepsBetweenThumbs", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, thumbLabels: { classPropertyName: "thumbLabels", publicName: "thumbLabels", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { listeners: { "window:pointermove": "onWindowPointerMove($event)", "window:pointerup": "onWindowPointerUp($event)", "window:pointercancel": "onWindowPointerUp($event)" }, properties: { "class": "hostClasses()", "attr.data-disabled": "isDisabled() ? \"\" : null", "attr.data-orientation": "orientation()" } }, viewQueries: [{ propertyName: "track", first: true, predicate: ["track"], descendants: true, isSignal: true }], ngImport: i0, template: `
294
300
  <div #track class="slider__track" (pointerdown)="onTrackPointerDown($event)">
295
301
  <div
296
302
  class="slider__range"
297
303
  [style.left.%]="orientation() === 'horizontal' ? rangeOffset() : null"
298
304
  [style.width.%]="orientation() === 'horizontal' ? rangeSize() : null"
299
305
  [style.bottom.%]="orientation() === 'vertical' ? rangeOffset() : null"
300
- [style.height.%]="orientation() === 'vertical' ? rangeSize() : null"></div>
306
+ [style.height.%]="orientation() === 'vertical' ? rangeSize() : null"
307
+ ></div>
301
308
 
302
309
  @for (thumb of thumbs(); track thumb.index) {
303
310
  <button
@@ -320,14 +327,15 @@ class SliderRootComponent {
320
327
  role="slider"
321
328
  (focus)="onThumbFocus(thumb.index)"
322
329
  (keydown)="onThumbKeydown($event, thumb.index)"
323
- (pointerdown)="onThumbPointerDown($event, thumb.index)"></button>
330
+ (pointerdown)="onThumbPointerDown($event, thumb.index)"
331
+ ></button>
324
332
  }
325
333
  </div>
326
- `, isInline: true, styles: [":host.slider-root{--slider-thumb-size: 1rem;--slider-track-size: .5rem;display:block}.slider__track{position:relative;flex:1 1 auto;border-radius:9999px;background:hsl(var(--secondary))}:host[data-orientation=horizontal] .slider__track{height:var(--slider-track-size);width:100%}:host[data-orientation=vertical] .slider__track{height:100%;width:var(--slider-track-size)}.slider__range{position:absolute;border-radius:inherit;background:hsl(var(--primary))}:host[data-orientation=horizontal] .slider__range{top:0;height:100%}:host[data-orientation=vertical] .slider__range{left:0;width:100%}.slider__thumb{position:absolute;height:var(--slider-thumb-size);width:var(--slider-thumb-size);border:var(--border-width) solid hsl(var(--primary));border-radius:9999px;background:hsl(var(--background));box-shadow:0 1px 2px hsl(var(--foreground) / .14);transition:box-shadow .15s cubic-bezier(.4,0,.2,1),border-color .15s cubic-bezier(.4,0,.2,1),background-color .15s cubic-bezier(.4,0,.2,1)}:host[data-orientation=horizontal] .slider__thumb{transform:translate(-50%,-50%)}:host[data-orientation=vertical] .slider__thumb{transform:translate(-50%,50%)}.slider__thumb:focus-visible{outline:none;box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host[data-disabled] .slider__track,:host[data-disabled] .slider__thumb{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
334
+ `, isInline: true, styles: [":host.slider-root{--slider-thumb-size: 1rem;--slider-track-size: .5rem;display:block}.slider__track{position:relative;flex:1 1 auto;border-radius:9999px;background:hsl(var(--secondary))}:host[data-orientation=horizontal] .slider__track{height:var(--slider-track-size);width:100%}:host[data-orientation=vertical] .slider__track{height:100%;width:var(--slider-track-size)}.slider__range{position:absolute;border-radius:inherit;background:hsl(var(--primary))}:host[data-orientation=horizontal] .slider__range{top:0;height:100%}:host[data-orientation=vertical] .slider__range{left:0;width:100%}.slider__thumb{position:absolute;height:var(--slider-thumb-size);width:var(--slider-thumb-size);border:var(--border-width) solid hsl(var(--primary));border-radius:9999px;background:hsl(var(--background));box-shadow:0 1px 2px hsl(var(--foreground) / .14);transition:box-shadow .15s cubic-bezier(.4,0,.2,1),border-color .15s cubic-bezier(.4,0,.2,1),background-color .15s cubic-bezier(.4,0,.2,1)}:host[data-orientation=horizontal] .slider__thumb{transform:translate(-50%,-50%)}:host[data-orientation=vertical] .slider__thumb{transform:translate(-50%,50%)}.slider__thumb:focus-visible{outline:none;box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host[data-disabled] .slider__track,:host[data-disabled] .slider__thumb{cursor:not-allowed}\n"] });
327
335
  }
328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SliderRootComponent, decorators: [{
336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SliderRootComponent, decorators: [{
329
337
  type: Component,
330
- args: [{ selector: 'Slider', changeDetection: ChangeDetectionStrategy.OnPush, host: {
338
+ args: [{ selector: 'Slider', host: {
331
339
  '[class]': 'hostClasses()',
332
340
  '[attr.data-disabled]': 'isDisabled() ? "" : null',
333
341
  '[attr.data-orientation]': 'orientation()',
@@ -341,7 +349,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
341
349
  [style.left.%]="orientation() === 'horizontal' ? rangeOffset() : null"
342
350
  [style.width.%]="orientation() === 'horizontal' ? rangeSize() : null"
343
351
  [style.bottom.%]="orientation() === 'vertical' ? rangeOffset() : null"
344
- [style.height.%]="orientation() === 'vertical' ? rangeSize() : null"></div>
352
+ [style.height.%]="orientation() === 'vertical' ? rangeSize() : null"
353
+ ></div>
345
354
 
346
355
  @for (thumb of thumbs(); track thumb.index) {
347
356
  <button
@@ -364,7 +373,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
364
373
  role="slider"
365
374
  (focus)="onThumbFocus(thumb.index)"
366
375
  (keydown)="onThumbKeydown($event, thumb.index)"
367
- (pointerdown)="onThumbPointerDown($event, thumb.index)"></button>
376
+ (pointerdown)="onThumbPointerDown($event, thumb.index)"
377
+ ></button>
368
378
  }
369
379
  </div>
370
380
  `, styles: [":host.slider-root{--slider-thumb-size: 1rem;--slider-track-size: .5rem;display:block}.slider__track{position:relative;flex:1 1 auto;border-radius:9999px;background:hsl(var(--secondary))}:host[data-orientation=horizontal] .slider__track{height:var(--slider-track-size);width:100%}:host[data-orientation=vertical] .slider__track{height:100%;width:var(--slider-track-size)}.slider__range{position:absolute;border-radius:inherit;background:hsl(var(--primary))}:host[data-orientation=horizontal] .slider__range{top:0;height:100%}:host[data-orientation=vertical] .slider__range{left:0;width:100%}.slider__thumb{position:absolute;height:var(--slider-thumb-size);width:var(--slider-thumb-size);border:var(--border-width) solid hsl(var(--primary));border-radius:9999px;background:hsl(var(--background));box-shadow:0 1px 2px hsl(var(--foreground) / .14);transition:box-shadow .15s cubic-bezier(.4,0,.2,1),border-color .15s cubic-bezier(.4,0,.2,1),background-color .15s cubic-bezier(.4,0,.2,1)}:host[data-orientation=horizontal] .slider__thumb{transform:translate(-50%,-50%)}:host[data-orientation=vertical] .slider__thumb{transform:translate(-50%,50%)}.slider__thumb:focus-visible{outline:none;box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host[data-disabled] .slider__track,:host[data-disabled] .slider__thumb{cursor:not-allowed}\n"] }]
@@ -382,7 +392,9 @@ function decimalPlaces(value) {
382
392
  }
383
393
  function normalizeSliderValues(values, config) {
384
394
  const incoming = values.length ? [...values] : [config.min];
385
- const sorted = incoming.map((value) => snapToStep(value, config)).sort((left, right) => left - right);
395
+ const sorted = incoming
396
+ .map((value) => snapToStep(value, config))
397
+ .sort((left, right) => left - right);
386
398
  const gap = config.step * config.minStepsBetweenThumbs;
387
399
  const normalized = [];
388
400
  sorted.forEach((value, index) => {
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, computed, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, booleanAttribute, computed, Component } from '@angular/core';
3
3
  import { cn } from '@ojiepermana/angular-component/utils';
4
4
 
5
5
  class SpinnerComponent {
@@ -10,25 +10,25 @@ class SpinnerComponent {
10
10
  ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
11
11
  classes = computed(() => cn('inline-flex size-4 shrink-0 items-center justify-center align-middle text-current', this.class()), /* @ts-ignore */
12
12
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
13
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: SpinnerComponent, isStandalone: true, selector: "Spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "spinner" }, properties: { "class": "classes()", "attr.role": "decorative() ? null : \"status\"", "attr.aria-hidden": "decorative() ? \"true\" : null", "attr.aria-label": "decorative() || ariaLabelledby() ? null : ariaLabel()", "attr.aria-labelledby": "decorative() ? null : ariaLabelledby()" } }, ngImport: i0, template: `
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: SpinnerComponent, isStandalone: true, selector: "Spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "spinner" }, properties: { "class": "classes()", "attr.role": "decorative() ? null : \"status\"", "attr.aria-hidden": "decorative() ? \"true\" : null", "attr.aria-label": "decorative() || ariaLabelledby() ? null : ariaLabel()", "attr.aria-labelledby": "decorative() ? null : ariaLabelledby()" } }, ngImport: i0, template: `
15
15
  <svg
16
16
  aria-hidden="true"
17
17
  class="size-full animate-spin motion-reduce:animate-none"
18
18
  viewBox="0 0 24 24"
19
19
  fill="none"
20
20
  stroke="currentColor"
21
- stroke-width="2">
21
+ stroke-width="2"
22
+ >
22
23
  <circle cx="12" cy="12" r="9" class="opacity-20" />
23
24
  <path d="M21 12a9 9 0 0 0-9-9" stroke-linecap="round" />
24
25
  </svg>
25
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
26
+ `, isInline: true });
26
27
  }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SpinnerComponent, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: SpinnerComponent, decorators: [{
28
29
  type: Component,
29
30
  args: [{
30
31
  selector: 'Spinner',
31
- changeDetection: ChangeDetectionStrategy.OnPush,
32
32
  host: {
33
33
  '[class]': 'classes()',
34
34
  '[attr.role]': 'decorative() ? null : "status"',
@@ -44,7 +44,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
44
44
  viewBox="0 0 24 24"
45
45
  fill="none"
46
46
  stroke="currentColor"
47
- stroke-width="2">
47
+ stroke-width="2"
48
+ >
48
49
  <circle cx="12" cy="12" r="9" class="opacity-20" />
49
50
  <path d="M21 12a9 9 0 0 0-9-9" stroke-linecap="round" />
50
51
  </svg>