@sonny-ui/core 0.1.0-alpha.17 → 0.1.0-alpha.18

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 (65) hide show
  1. package/fesm2022/sonny-ui-core.mjs +31 -188
  2. package/fesm2022/sonny-ui-core.mjs.map +1 -1
  3. package/package.json +1 -1
  4. package/src/lib/accordion/accordion.directives.ts +0 -4
  5. package/src/lib/alert/alert.directives.ts +0 -3
  6. package/src/lib/avatar/avatar.component.ts +0 -1
  7. package/src/lib/avatar-group/avatar-group.component.ts +0 -1
  8. package/src/lib/badge/badge.directive.ts +0 -1
  9. package/src/lib/breadcrumb/breadcrumb.directives.ts +0 -6
  10. package/src/lib/button/button.directive.ts +0 -1
  11. package/src/lib/button-group/button-group.directive.ts +0 -1
  12. package/src/lib/calendar/calendar.component.ts +0 -1
  13. package/src/lib/card/card.directives.ts +0 -6
  14. package/src/lib/carousel/carousel.directives.ts +0 -5
  15. package/src/lib/chat-bubble/chat-bubble.directives.ts +0 -6
  16. package/src/lib/checkbox/checkbox.directive.ts +0 -1
  17. package/src/lib/color-picker/color-picker.component.ts +5 -5
  18. package/src/lib/combobox/combobox.component.ts +1 -3
  19. package/src/lib/command-palette/command-palette.component.ts +0 -1
  20. package/src/lib/data-table/data-table.component.ts +0 -1
  21. package/src/lib/data-table/data-table.directives.ts +0 -4
  22. package/src/lib/date-picker/date-picker.component.ts +5 -5
  23. package/src/lib/date-range-picker/date-range-picker.component.ts +5 -5
  24. package/src/lib/diff/diff.component.ts +0 -1
  25. package/src/lib/divider/divider.component.ts +0 -1
  26. package/src/lib/dock/dock.directives.ts +0 -2
  27. package/src/lib/drawer/drawer.directives.ts +0 -3
  28. package/src/lib/dropdown/dropdown.directives.ts +3 -10
  29. package/src/lib/fab/fab.directives.ts +0 -3
  30. package/src/lib/fieldset/fieldset.directives.ts +0 -3
  31. package/src/lib/file-input/file-input.component.ts +0 -1
  32. package/src/lib/indicator/indicator.directives.ts +0 -2
  33. package/src/lib/input/input.directive.ts +0 -1
  34. package/src/lib/input/label.directive.ts +0 -1
  35. package/src/lib/kbd/kbd.directive.ts +0 -1
  36. package/src/lib/link/link.directive.ts +0 -1
  37. package/src/lib/list/list.directives.ts +0 -5
  38. package/src/lib/loader/loader.component.ts +0 -1
  39. package/src/lib/modal/dialog.directives.ts +0 -6
  40. package/src/lib/navbar/navbar.directives.ts +0 -4
  41. package/src/lib/number-input/number-input.component.ts +0 -1
  42. package/src/lib/otp-input/otp-input.component.ts +0 -1
  43. package/src/lib/pagination/pagination.component.ts +0 -1
  44. package/src/lib/popover/popover.directives.ts +2 -6
  45. package/src/lib/progress/progress.component.ts +0 -1
  46. package/src/lib/radial-progress/radial-progress.component.ts +0 -1
  47. package/src/lib/radio/radio.directive.ts +0 -1
  48. package/src/lib/rating/rating.component.ts +0 -1
  49. package/src/lib/select/select.component.ts +1 -3
  50. package/src/lib/sheet/sheet.directives.ts +0 -5
  51. package/src/lib/skeleton/skeleton.directive.ts +0 -1
  52. package/src/lib/slider/slider.component.ts +0 -1
  53. package/src/lib/stat/stat.directives.ts +0 -5
  54. package/src/lib/status/status.directive.ts +0 -1
  55. package/src/lib/steps/steps.directives.ts +0 -2
  56. package/src/lib/switch/switch.component.ts +0 -1
  57. package/src/lib/table/table.directives.ts +0 -8
  58. package/src/lib/tabs/tabs.directives.ts +0 -4
  59. package/src/lib/tag-input/tag-input.component.ts +0 -1
  60. package/src/lib/textarea/textarea.directive.ts +0 -1
  61. package/src/lib/timeline/timeline.directives.ts +0 -5
  62. package/src/lib/toast/toaster.component.ts +0 -1
  63. package/src/lib/toggle/toggle.directive.ts +0 -1
  64. package/src/lib/tooltip/tooltip.directive.ts +0 -1
  65. package/src/lib/validator/validator.directives.ts +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonny-ui/core",
3
- "version": "0.1.0-alpha.17",
3
+ "version": "0.1.0-alpha.18",
4
4
  "description": "Angular UI component library inspired by shadcn/ui — signals, zoneless, Tailwind CSS v4",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
@@ -6,7 +6,6 @@ export const SNY_ACCORDION_ITEM = new InjectionToken<SnyAccordionItemDirective>(
6
6
 
7
7
  @Directive({
8
8
  selector: '[snyAccordion]',
9
- standalone: true,
10
9
  exportAs: 'snyAccordion',
11
10
  providers: [{ provide: SNY_ACCORDION, useExisting: SnyAccordionDirective }],
12
11
  host: {
@@ -81,7 +80,6 @@ export class SnyAccordionDirective {
81
80
 
82
81
  @Directive({
83
82
  selector: '[snyAccordionItem]',
84
- standalone: true,
85
83
  exportAs: 'snyAccordionItem',
86
84
  providers: [{ provide: SNY_ACCORDION_ITEM, useExisting: SnyAccordionItemDirective }],
87
85
  host: { '[class]': 'computedClass()' },
@@ -104,7 +102,6 @@ export class SnyAccordionItemDirective {
104
102
 
105
103
  @Directive({
106
104
  selector: '[snyAccordionTrigger]',
107
- standalone: true,
108
105
  host: {
109
106
  '[class]': 'computedClass()',
110
107
  '[attr.aria-expanded]': 'item.isOpen()',
@@ -127,7 +124,6 @@ export class SnyAccordionTriggerDirective {
127
124
 
128
125
  @Directive({
129
126
  selector: '[snyAccordionContent]',
130
- standalone: true,
131
127
  host: {
132
128
  '[class]': 'computedClass()',
133
129
  role: 'region',
@@ -5,7 +5,6 @@ import { alertVariants, type AlertVariant } from './alert.variants';
5
5
  @Directive({
6
6
  selector: '[snyAlert]',
7
7
  exportAs: 'snyAlert',
8
- standalone: true,
9
8
  host: {
10
9
  '[class]': 'computedClass()',
11
10
  '[attr.role]': 'role()',
@@ -41,7 +40,6 @@ export class SnyAlertDirective {
41
40
 
42
41
  @Directive({
43
42
  selector: '[snyAlertTitle]',
44
- standalone: true,
45
43
  host: {
46
44
  '[class]': 'computedClass()',
47
45
  },
@@ -56,7 +54,6 @@ export class SnyAlertTitleDirective {
56
54
 
57
55
  @Directive({
58
56
  selector: '[snyAlertDescription]',
59
- standalone: true,
60
57
  host: {
61
58
  '[class]': 'computedClass()',
62
59
  },
@@ -4,7 +4,6 @@ import { avatarVariants, type AvatarSize, type AvatarVariant } from './avatar.va
4
4
 
5
5
  @Component({
6
6
  selector: 'sny-avatar',
7
- standalone: true,
8
7
  changeDetection: ChangeDetectionStrategy.OnPush,
9
8
  host: { '[class]': 'computedClass()' },
10
9
  template: `
@@ -28,7 +28,6 @@ export type AvatarGroupSpacing = 'tight' | 'normal';
28
28
 
29
29
  @Component({
30
30
  selector: 'sny-avatar-group',
31
- standalone: true,
32
31
  changeDetection: ChangeDetectionStrategy.OnPush,
33
32
  template: `
34
33
  <div [class]="containerClass()" role="group" [attr.aria-label]="'Group of ' + items().length + ' users'">
@@ -4,7 +4,6 @@ import { badgeVariants, type BadgeVariant, type BadgeSize } from './badge.varian
4
4
 
5
5
  @Directive({
6
6
  selector: '[snyBadge]',
7
- standalone: true,
8
7
  host: { '[class]': 'computedClass()' },
9
8
  })
10
9
  export class SnyBadgeDirective {
@@ -3,7 +3,6 @@ import { cn } from '../core/utils/cn';
3
3
 
4
4
  @Directive({
5
5
  selector: 'nav[snyBreadcrumb]',
6
- standalone: true,
7
6
  host: {
8
7
  '[class]': 'computedClass()',
9
8
  'aria-label': 'Breadcrumb',
@@ -16,7 +15,6 @@ export class SnyBreadcrumbDirective {
16
15
 
17
16
  @Directive({
18
17
  selector: 'ol[snyBreadcrumbList]',
19
- standalone: true,
20
18
  host: { '[class]': 'computedClass()' },
21
19
  })
22
20
  export class SnyBreadcrumbListDirective {
@@ -28,7 +26,6 @@ export class SnyBreadcrumbListDirective {
28
26
 
29
27
  @Directive({
30
28
  selector: 'li[snyBreadcrumbItem]',
31
- standalone: true,
32
29
  host: { '[class]': 'computedClass()' },
33
30
  })
34
31
  export class SnyBreadcrumbItemDirective {
@@ -40,7 +37,6 @@ export class SnyBreadcrumbItemDirective {
40
37
 
41
38
  @Directive({
42
39
  selector: '[snyBreadcrumbLink]',
43
- standalone: true,
44
40
  host: { '[class]': 'computedClass()' },
45
41
  })
46
42
  export class SnyBreadcrumbLinkDirective {
@@ -52,7 +48,6 @@ export class SnyBreadcrumbLinkDirective {
52
48
 
53
49
  @Directive({
54
50
  selector: '[snyBreadcrumbSeparator]',
55
- standalone: true,
56
51
  host: {
57
52
  role: 'presentation',
58
53
  '[aria-hidden]': 'true',
@@ -68,7 +63,6 @@ export class SnyBreadcrumbSeparatorDirective {
68
63
 
69
64
  @Directive({
70
65
  selector: '[snyBreadcrumbPage]',
71
- standalone: true,
72
66
  host: {
73
67
  role: 'link',
74
68
  'aria-disabled': 'true',
@@ -4,7 +4,6 @@ import { buttonVariants, type ButtonVariant, type ButtonSize } from './button.va
4
4
 
5
5
  @Directive({
6
6
  selector: 'button[snyBtn], a[snyBtn]',
7
- standalone: true,
8
7
  host: {
9
8
  '[class]': 'computedClass()',
10
9
  '[attr.aria-disabled]': 'disabled() || loading() || null',
@@ -4,7 +4,6 @@ import { buttonGroupVariants, type ButtonGroupOrientation } from './button-group
4
4
 
5
5
  @Directive({
6
6
  selector: '[snyButtonGroup]',
7
- standalone: true,
8
7
  host: {
9
8
  role: 'group',
10
9
  '[class]': 'computedClass()',
@@ -14,7 +14,6 @@ import type { CalendarDay, CalendarMode, DateRange } from './calendar.types';
14
14
 
15
15
  @Component({
16
16
  selector: 'sny-calendar',
17
- standalone: true,
18
17
  changeDetection: ChangeDetectionStrategy.OnPush,
19
18
  host: {
20
19
  '[class]': 'hostClass()',
@@ -4,7 +4,6 @@ import { cardVariants, type CardVariant, type CardPadding } from './card.variant
4
4
 
5
5
  @Directive({
6
6
  selector: '[snyCard]',
7
- standalone: true,
8
7
  host: { '[class]': 'computedClass()' },
9
8
  })
10
9
  export class SnyCardDirective {
@@ -19,7 +18,6 @@ export class SnyCardDirective {
19
18
 
20
19
  @Directive({
21
20
  selector: '[snyCardHeader]',
22
- standalone: true,
23
21
  host: { '[class]': 'computedClass()' },
24
22
  })
25
23
  export class SnyCardHeaderDirective {
@@ -31,7 +29,6 @@ export class SnyCardHeaderDirective {
31
29
 
32
30
  @Directive({
33
31
  selector: '[snyCardTitle]',
34
- standalone: true,
35
32
  host: { '[class]': 'computedClass()' },
36
33
  })
37
34
  export class SnyCardTitleDirective {
@@ -43,7 +40,6 @@ export class SnyCardTitleDirective {
43
40
 
44
41
  @Directive({
45
42
  selector: '[snyCardDescription]',
46
- standalone: true,
47
43
  host: { '[class]': 'computedClass()' },
48
44
  })
49
45
  export class SnyCardDescriptionDirective {
@@ -55,7 +51,6 @@ export class SnyCardDescriptionDirective {
55
51
 
56
52
  @Directive({
57
53
  selector: '[snyCardContent]',
58
- standalone: true,
59
54
  host: { '[class]': 'computedClass()' },
60
55
  })
61
56
  export class SnyCardContentDirective {
@@ -67,7 +62,6 @@ export class SnyCardContentDirective {
67
62
 
68
63
  @Directive({
69
64
  selector: '[snyCardFooter]',
70
- standalone: true,
71
65
  host: { '[class]': 'computedClass()' },
72
66
  })
73
67
  export class SnyCardFooterDirective {
@@ -7,7 +7,6 @@ export const SNY_CAROUSEL = new InjectionToken<SnyCarouselDirective>('SnyCarouse
7
7
 
8
8
  @Directive({
9
9
  selector: '[snyCarouselItem]',
10
- standalone: true,
11
10
  host: {
12
11
  'role': 'group',
13
12
  '[attr.aria-roledescription]': '"slide"',
@@ -23,7 +22,6 @@ export class SnyCarouselItemDirective {
23
22
 
24
23
  @Directive({
25
24
  selector: '[snyCarouselContent]',
26
- standalone: true,
27
25
  host: {
28
26
  '[class]': 'computedClass()',
29
27
  '[style.transform]': 'transformStyle()',
@@ -44,7 +42,6 @@ export class SnyCarouselContentDirective {
44
42
 
45
43
  @Directive({
46
44
  selector: '[snyCarousel]',
47
- standalone: true,
48
45
  exportAs: 'snyCarousel',
49
46
  providers: [{ provide: SNY_CAROUSEL, useExisting: SnyCarouselDirective }],
50
47
  host: {
@@ -131,7 +128,6 @@ export class SnyCarouselDirective implements OnDestroy {
131
128
 
132
129
  @Directive({
133
130
  selector: '[snyCarouselPrev]',
134
- standalone: true,
135
131
  host: {
136
132
  '(click)': 'carousel.prev()',
137
133
  '[attr.aria-label]': '"Previous slide"',
@@ -148,7 +144,6 @@ export class SnyCarouselPrevDirective {
148
144
 
149
145
  @Directive({
150
146
  selector: '[snyCarouselNext]',
151
- standalone: true,
152
147
  host: {
153
148
  '(click)': 'carousel.next()',
154
149
  '[attr.aria-label]': '"Next slide"',
@@ -8,7 +8,6 @@ export const SNY_CHAT_BUBBLE = new InjectionToken<SnyChatBubbleDirective>('SnyCh
8
8
 
9
9
  @Directive({
10
10
  selector: '[snyChatBubble]',
11
- standalone: true,
12
11
  providers: [{ provide: SNY_CHAT_BUBBLE, useExisting: SnyChatBubbleDirective }],
13
12
  host: {
14
13
  'role': 'article',
@@ -30,7 +29,6 @@ export class SnyChatBubbleDirective {
30
29
 
31
30
  @Directive({
32
31
  selector: '[snyChatBubbleAvatar]',
33
- standalone: true,
34
32
  host: { '[class]': 'computedClass()' },
35
33
  })
36
34
  export class SnyChatBubbleAvatarDirective {
@@ -42,7 +40,6 @@ export class SnyChatBubbleAvatarDirective {
42
40
 
43
41
  @Directive({
44
42
  selector: '[snyChatBubbleHeader]',
45
- standalone: true,
46
43
  host: { '[class]': 'computedClass()' },
47
44
  })
48
45
  export class SnyChatBubbleHeaderDirective {
@@ -54,7 +51,6 @@ export class SnyChatBubbleHeaderDirective {
54
51
 
55
52
  @Directive({
56
53
  selector: '[snyChatBubbleContent]',
57
- standalone: true,
58
54
  host: { '[class]': 'computedClass()' },
59
55
  })
60
56
  export class SnyChatBubbleContentDirective {
@@ -74,7 +70,6 @@ export class SnyChatBubbleContentDirective {
74
70
 
75
71
  @Directive({
76
72
  selector: '[snyChatBubbleFooter]',
77
- standalone: true,
78
73
  host: { '[class]': 'computedClass()' },
79
74
  })
80
75
  export class SnyChatBubbleFooterDirective {
@@ -86,7 +81,6 @@ export class SnyChatBubbleFooterDirective {
86
81
 
87
82
  @Directive({
88
83
  selector: '[snyChatBubbleBody]',
89
- standalone: true,
90
84
  host: { '[class]': 'computedClass()' },
91
85
  })
92
86
  export class SnyChatBubbleBodyDirective {
@@ -4,7 +4,6 @@ import { checkboxVariants, type CheckboxSize } from './checkbox.variants';
4
4
 
5
5
  @Directive({
6
6
  selector: 'input[type="checkbox"][snyCheckbox]',
7
- standalone: true,
8
7
  host: { '[class]': 'computedClass()' },
9
8
  })
10
9
  export class SnyCheckboxDirective {
@@ -5,7 +5,6 @@ import {
5
5
  effect,
6
6
  ElementRef,
7
7
  forwardRef,
8
- HostListener,
9
8
  inject,
10
9
  input,
11
10
  model,
@@ -30,9 +29,12 @@ import { colorPickerTriggerVariants, type ColorPickerSize } from './color-picker
30
29
 
31
30
  @Component({
32
31
  selector: 'sny-color-picker',
33
- standalone: true,
34
32
  changeDetection: ChangeDetectionStrategy.OnPush,
35
- host: { class: 'relative inline-block' },
33
+ host: {
34
+ class: 'relative inline-block',
35
+ '(document:click)': 'onDocumentClick($event)',
36
+ '(keydown.escape)': 'onEscape()',
37
+ },
36
38
  providers: [
37
39
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SnyColorPickerComponent), multi: true },
38
40
  ],
@@ -518,14 +520,12 @@ export class SnyColorPickerComponent implements ControlValueAccessor, OnDestroy
518
520
  }
519
521
  }
520
522
 
521
- @HostListener('document:click', ['$event'])
522
523
  onDocumentClick(event: MouseEvent): void {
523
524
  if (!this.elRef.nativeElement.contains(event.target)) {
524
525
  this.close();
525
526
  }
526
527
  }
527
528
 
528
- @HostListener('keydown.escape')
529
529
  onEscape(): void {
530
530
  this.close();
531
531
  }
@@ -4,7 +4,6 @@ import {
4
4
  computed,
5
5
  ElementRef,
6
6
  forwardRef,
7
- HostListener,
8
7
  inject,
9
8
  input,
10
9
  model,
@@ -23,10 +22,10 @@ export interface ComboboxOption {
23
22
 
24
23
  @Component({
25
24
  selector: 'sny-combobox',
26
- standalone: true,
27
25
  changeDetection: ChangeDetectionStrategy.OnPush,
28
26
  host: {
29
27
  class: 'relative inline-block w-full',
28
+ '(document:click)': 'onDocumentClick($event)',
30
29
  },
31
30
  providers: [
32
31
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SnyComboboxComponent), multi: true },
@@ -257,7 +256,6 @@ export class SnyComboboxComponent implements ControlValueAccessor, OnDestroy {
257
256
  }
258
257
  }
259
258
 
260
- @HostListener('document:click', ['$event'])
261
259
  onDocumentClick(event: MouseEvent): void {
262
260
  if (!this.elRef.nativeElement.contains(event.target)) {
263
261
  this.close();
@@ -15,7 +15,6 @@ import type { Command, CommandGroup, CommandPaletteConfig } from './command-pale
15
15
 
16
16
  @Component({
17
17
  selector: 'sny-command-palette',
18
- standalone: true,
19
18
  changeDetection: ChangeDetectionStrategy.OnPush,
20
19
  imports: [SnyInputDirective],
21
20
  host: {
@@ -54,7 +54,6 @@ const DEFAULT_PAGINATION: DataTablePaginationConfig = {
54
54
 
55
55
  @Component({
56
56
  selector: 'sny-data-table',
57
- standalone: true,
58
57
  changeDetection: ChangeDetectionStrategy.OnPush,
59
58
  imports: [
60
59
  NgTemplateOutlet,
@@ -2,7 +2,6 @@ import { Directive, TemplateRef, inject, input } from '@angular/core';
2
2
 
3
3
  @Directive({
4
4
  selector: '[snyCell]',
5
- standalone: true,
6
5
  })
7
6
  export class SnyCellDefDirective {
8
7
  readonly snyCell = input.required<string>();
@@ -11,7 +10,6 @@ export class SnyCellDefDirective {
11
10
 
12
11
  @Directive({
13
12
  selector: '[snyHeaderCell]',
14
- standalone: true,
15
13
  })
16
14
  export class SnyHeaderCellDefDirective {
17
15
  readonly snyHeaderCell = input.required<string>();
@@ -20,7 +18,6 @@ export class SnyHeaderCellDefDirective {
20
18
 
21
19
  @Directive({
22
20
  selector: '[snyBulkActions]',
23
- standalone: true,
24
21
  })
25
22
  export class SnyBulkActionsDefDirective {
26
23
  readonly template = inject(TemplateRef);
@@ -28,7 +25,6 @@ export class SnyBulkActionsDefDirective {
28
25
 
29
26
  @Directive({
30
27
  selector: '[snyRowExpand]',
31
- standalone: true,
32
28
  })
33
29
  export class SnyRowExpandDefDirective {
34
30
  readonly template = inject(TemplateRef);
@@ -4,7 +4,6 @@ import {
4
4
  computed,
5
5
  ElementRef,
6
6
  forwardRef,
7
- HostListener,
8
7
  inject,
9
8
  input,
10
9
  model,
@@ -19,10 +18,13 @@ import { datePickerTriggerVariants, type DatePickerSize } from './date-picker.va
19
18
 
20
19
  @Component({
21
20
  selector: 'sny-date-picker',
22
- standalone: true,
23
21
  changeDetection: ChangeDetectionStrategy.OnPush,
24
22
  imports: [SnyCalendarComponent],
25
- host: { class: 'relative inline-block w-full' },
23
+ host: {
24
+ class: 'relative inline-block w-full',
25
+ '(document:click)': 'onDocumentClick($event)',
26
+ '(keydown.escape)': 'onEscape()',
27
+ },
26
28
  providers: [
27
29
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SnyDatePickerComponent), multi: true },
28
30
  ],
@@ -206,14 +208,12 @@ export class SnyDatePickerComponent implements ControlValueAccessor, OnDestroy {
206
208
  this.removeGlobalListeners();
207
209
  }
208
210
 
209
- @HostListener('document:click', ['$event'])
210
211
  onDocumentClick(event: MouseEvent): void {
211
212
  if (!this.elRef.nativeElement.contains(event.target)) {
212
213
  this.close();
213
214
  }
214
215
  }
215
216
 
216
- @HostListener('keydown.escape')
217
217
  onEscape(): void {
218
218
  this.close();
219
219
  }
@@ -4,7 +4,6 @@ import {
4
4
  computed,
5
5
  ElementRef,
6
6
  forwardRef,
7
- HostListener,
8
7
  inject,
9
8
  input,
10
9
  model,
@@ -20,10 +19,13 @@ import { datePickerTriggerVariants, type DatePickerSize } from '../date-picker/d
20
19
 
21
20
  @Component({
22
21
  selector: 'sny-date-range-picker',
23
- standalone: true,
24
22
  changeDetection: ChangeDetectionStrategy.OnPush,
25
23
  imports: [SnyCalendarComponent],
26
- host: { class: 'relative inline-block w-full' },
24
+ host: {
25
+ class: 'relative inline-block w-full',
26
+ '(document:click)': 'onDocumentClick($event)',
27
+ '(keydown.escape)': 'onEscape()',
28
+ },
27
29
  providers: [
28
30
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SnyDateRangePickerComponent), multi: true },
29
31
  ],
@@ -326,14 +328,12 @@ export class SnyDateRangePickerComponent implements ControlValueAccessor, OnDest
326
328
  this.removeGlobalListeners();
327
329
  }
328
330
 
329
- @HostListener('document:click', ['$event'])
330
331
  onDocumentClick(event: MouseEvent): void {
331
332
  if (!this.elRef.nativeElement.contains(event.target)) {
332
333
  this.close();
333
334
  }
334
335
  }
335
336
 
336
- @HostListener('keydown.escape')
337
337
  onEscape(): void {
338
338
  this.close();
339
339
  }
@@ -3,7 +3,6 @@ import { cn } from '../core/utils/cn';
3
3
 
4
4
  @Component({
5
5
  selector: 'sny-diff',
6
- standalone: true,
7
6
  changeDetection: ChangeDetectionStrategy.OnPush,
8
7
  host: {
9
8
  '[class]': '"relative overflow-hidden select-none w-full"',
@@ -8,7 +8,6 @@ import {
8
8
 
9
9
  @Component({
10
10
  selector: 'sny-divider',
11
- standalone: true,
12
11
  changeDetection: ChangeDetectionStrategy.OnPush,
13
12
  host: {
14
13
  'role': 'separator',
@@ -5,7 +5,6 @@ export type DockPosition = 'bottom' | 'top';
5
5
 
6
6
  @Directive({
7
7
  selector: '[snyDock]',
8
- standalone: true,
9
8
  host: {
10
9
  'role': 'toolbar',
11
10
  'aria-label': 'Dock',
@@ -63,7 +62,6 @@ export class SnyDockDirective {
63
62
 
64
63
  @Directive({
65
64
  selector: '[snyDockItem]',
66
- standalone: true,
67
65
  host: {
68
66
  '[class]': 'computedClass()',
69
67
  '[attr.tabindex]': 'active() ? 0 : -1',
@@ -5,7 +5,6 @@ export const SNY_DRAWER = new InjectionToken<SnyDrawerLayoutComponent>('SnyDrawe
5
5
 
6
6
  @Component({
7
7
  selector: '[snyDrawerLayout]',
8
- standalone: true,
9
8
  changeDetection: ChangeDetectionStrategy.OnPush,
10
9
  exportAs: 'snyDrawerLayout',
11
10
  providers: [{ provide: SNY_DRAWER, useExisting: SnyDrawerLayoutComponent }],
@@ -41,7 +40,6 @@ export const SnyDrawerLayoutDirective = SnyDrawerLayoutComponent;
41
40
 
42
41
  @Directive({
43
42
  selector: '[snyDrawerContent]',
44
- standalone: true,
45
43
  host: {
46
44
  '[class]': 'computedClass()',
47
45
  },
@@ -57,7 +55,6 @@ export type DrawerSide = 'left' | 'right';
57
55
 
58
56
  @Directive({
59
57
  selector: '[snyDrawerSide]',
60
- standalone: true,
61
58
  host: {
62
59
  'role': 'navigation',
63
60
  'aria-label': 'Sidebar navigation',
@@ -1,4 +1,4 @@
1
- import { Directive, ElementRef, HostListener, InjectionToken, computed, inject, input, signal } from '@angular/core';
1
+ import { Directive, ElementRef, InjectionToken, computed, inject, input, signal } from '@angular/core';
2
2
  import { cn } from '../core/utils/cn';
3
3
  import {
4
4
  dropdownContentVariants,
@@ -10,11 +10,12 @@ export const SNY_DROPDOWN = new InjectionToken<SnyDropdownDirective>('SnyDropdow
10
10
 
11
11
  @Directive({
12
12
  selector: '[snyDropdown]',
13
- standalone: true,
14
13
  exportAs: 'snyDropdown',
15
14
  providers: [{ provide: SNY_DROPDOWN, useExisting: SnyDropdownDirective }],
16
15
  host: {
17
16
  '[class]': '"relative inline-block"',
17
+ '(document:click)': 'onDocumentClick($event)',
18
+ '(keydown.escape)': 'onEscape()',
18
19
  },
19
20
  })
20
21
  export class SnyDropdownDirective {
@@ -25,14 +26,12 @@ export class SnyDropdownDirective {
25
26
  open(): void { this.isOpen.set(true); }
26
27
  close(): void { this.isOpen.set(false); }
27
28
 
28
- @HostListener('document:click', ['$event'])
29
29
  onDocumentClick(event: MouseEvent): void {
30
30
  if (!this.elementRef.nativeElement.contains(event.target)) {
31
31
  this.close();
32
32
  }
33
33
  }
34
34
 
35
- @HostListener('keydown.escape')
36
35
  onEscape(): void {
37
36
  this.close();
38
37
  }
@@ -40,7 +39,6 @@ export class SnyDropdownDirective {
40
39
 
41
40
  @Directive({
42
41
  selector: '[snyDropdownTrigger]',
43
- standalone: true,
44
42
  host: {
45
43
  '(click)': 'dropdown.toggle()',
46
44
  '[attr.aria-expanded]': 'dropdown.isOpen()',
@@ -53,7 +51,6 @@ export class SnyDropdownTriggerDirective {
53
51
 
54
52
  @Directive({
55
53
  selector: '[snyDropdownContent]',
56
- standalone: true,
57
54
  host: {
58
55
  'role': 'menu',
59
56
  '[class]': 'computedClass()',
@@ -75,7 +72,6 @@ export class SnyDropdownContentDirective {
75
72
 
76
73
  @Directive({
77
74
  selector: '[snyMenuContent]',
78
- standalone: true,
79
75
  host: {
80
76
  '[class]': 'computedClass()',
81
77
  },
@@ -90,7 +86,6 @@ export class SnyMenuContentDirective {
90
86
 
91
87
  @Directive({
92
88
  selector: '[snyMenuItem]',
93
- standalone: true,
94
89
  host: {
95
90
  'role': 'menuitem',
96
91
  '[class]': 'computedClass()',
@@ -113,7 +108,6 @@ export class SnyMenuItemDirective {
113
108
 
114
109
  @Directive({
115
110
  selector: '[snyMenuSeparator]',
116
- standalone: true,
117
111
  host: {
118
112
  'role': 'separator',
119
113
  '[class]': 'computedClass()',
@@ -129,7 +123,6 @@ export class SnyMenuSeparatorDirective {
129
123
 
130
124
  @Directive({
131
125
  selector: '[snyMenuLabel]',
132
- standalone: true,
133
126
  host: {
134
127
  '[class]': 'computedClass()',
135
128
  },
@@ -14,7 +14,6 @@ const positionMap: Record<FabPosition, string> = {
14
14
 
15
15
  @Directive({
16
16
  selector: '[snyFab]',
17
- standalone: true,
18
17
  exportAs: 'snyFab',
19
18
  providers: [{ provide: SNY_FAB, useExisting: SnyFabDirective }],
20
19
  host: { '[class]': 'computedClass()' },
@@ -36,7 +35,6 @@ export class SnyFabDirective {
36
35
 
37
36
  @Directive({
38
37
  selector: '[snyFabTrigger]',
39
- standalone: true,
40
38
  host: {
41
39
  '(click)': 'fab.toggle()',
42
40
  '[attr.aria-expanded]': 'fab.isOpen()',
@@ -59,7 +57,6 @@ export class SnyFabTriggerDirective {
59
57
 
60
58
  @Directive({
61
59
  selector: '[snyFabAction]',
62
- standalone: true,
63
60
  host: {
64
61
  'role': 'menuitem',
65
62
  '[attr.aria-label]': 'ariaLabel() || null',