@cute-widgets/base 20.0.3 → 20.0.5

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 (72) hide show
  1. package/CHANGELOG.md +31 -4
  2. package/abstract/index.d.ts +13 -4
  3. package/button/index.d.ts +47 -24
  4. package/button-toggle/index.d.ts +8 -4
  5. package/card/index.d.ts +9 -6
  6. package/collapse/index.d.ts +49 -48
  7. package/core/directives/index.d.ts +1 -31
  8. package/core/index.d.ts +41 -28
  9. package/core/interfaces/index.d.ts +1 -1
  10. package/core/layout/index.d.ts +40 -27
  11. package/core/nav/index.d.ts +1 -2
  12. package/dialog/index.d.ts +81 -57
  13. package/expansion/index.d.ts +5 -18
  14. package/fesm2022/cute-widgets-base-abstract.mjs +13 -8
  15. package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -1
  16. package/fesm2022/cute-widgets-base-button-toggle.mjs +36 -29
  17. package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -1
  18. package/fesm2022/cute-widgets-base-button.mjs +169 -104
  19. package/fesm2022/cute-widgets-base-button.mjs.map +1 -1
  20. package/fesm2022/cute-widgets-base-card.mjs +46 -29
  21. package/fesm2022/cute-widgets-base-card.mjs.map +1 -1
  22. package/fesm2022/cute-widgets-base-chips.mjs +6 -18
  23. package/fesm2022/cute-widgets-base-chips.mjs.map +1 -1
  24. package/fesm2022/cute-widgets-base-collapse.mjs +114 -126
  25. package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -1
  26. package/fesm2022/cute-widgets-base-core-directives.mjs +4 -72
  27. package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -1
  28. package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -1
  29. package/fesm2022/cute-widgets-base-core-layout.mjs +76 -40
  30. package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -1
  31. package/fesm2022/cute-widgets-base-core-nav.mjs +1 -2
  32. package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -1
  33. package/fesm2022/cute-widgets-base-core-theming.mjs +1 -1
  34. package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -1
  35. package/fesm2022/cute-widgets-base-core.mjs +77 -41
  36. package/fesm2022/cute-widgets-base-core.mjs.map +1 -1
  37. package/fesm2022/cute-widgets-base-dialog.mjs +152 -117
  38. package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -1
  39. package/fesm2022/cute-widgets-base-expansion.mjs +19 -13
  40. package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -1
  41. package/fesm2022/cute-widgets-base-list.mjs +2 -2
  42. package/fesm2022/cute-widgets-base-list.mjs.map +1 -1
  43. package/fesm2022/cute-widgets-base-menu.mjs +5 -27
  44. package/fesm2022/cute-widgets-base-menu.mjs.map +1 -1
  45. package/fesm2022/cute-widgets-base-navbar.mjs +88 -42
  46. package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -1
  47. package/fesm2022/cute-widgets-base-paginator.mjs +13 -11
  48. package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -1
  49. package/fesm2022/cute-widgets-base-radio.mjs +1 -2
  50. package/fesm2022/cute-widgets-base-radio.mjs.map +1 -1
  51. package/fesm2022/cute-widgets-base-select.mjs +2 -2
  52. package/fesm2022/cute-widgets-base-select.mjs.map +1 -1
  53. package/fesm2022/cute-widgets-base-sidenav.mjs +31 -30
  54. package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -1
  55. package/fesm2022/cute-widgets-base-snack-bar.mjs +2 -2
  56. package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -1
  57. package/fesm2022/cute-widgets-base-sort.mjs +60 -257
  58. package/fesm2022/cute-widgets-base-sort.mjs.map +1 -1
  59. package/fesm2022/cute-widgets-base-table.mjs +6 -3
  60. package/fesm2022/cute-widgets-base-table.mjs.map +1 -1
  61. package/fesm2022/cute-widgets-base-tabs.mjs +86 -61
  62. package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -1
  63. package/fesm2022/cute-widgets-base.mjs +3 -1
  64. package/fesm2022/cute-widgets-base.mjs.map +1 -1
  65. package/navbar/index.d.ts +30 -9
  66. package/package.json +6 -5
  67. package/paginator/index.d.ts +6 -17
  68. package/radio/index.d.ts +0 -1
  69. package/sidenav/index.d.ts +1 -2
  70. package/sort/index.d.ts +22 -135
  71. package/table/index.d.ts +8 -8
  72. package/tabs/index.d.ts +35 -14
@@ -1,51 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, EventEmitter, booleanAttribute, Output, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, NgModule } from '@angular/core';
3
- import { CuteBaseControl } from '@cute-widgets/base/abstract';
4
- import { trigger, state, transition, style, animate } from '@angular/animations';
5
- import { Subject } from 'rxjs';
6
- import { distinctUntilChanged } from 'rxjs/operators';
2
+ import { inject, NgZone, EventEmitter, booleanAttribute, Output, Input, Directive, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/cdk/accordion';
4
+ import { CdkAccordionItem } from '@angular/cdk/accordion';
5
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
6
+ import { CuteLayoutControl } from '@cute-widgets/base/abstract';
7
+ import { _animationsDisabled } from '@cute-widgets/base/core';
7
8
  import { CommonModule } from '@angular/common';
8
9
 
9
- /**
10
- * @license Apache-2.0
11
- *
12
- * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
13
- *
14
- * You may not use this file except in compliance with the License
15
- * that can be found at http://www.apache.org/licenses/LICENSE-2.0
16
- */
17
- /** Time and timing curve for **collapse** animations. */
18
- const CUTE_COLLAPSE_ANIMATION_TIMING = '225ms cubic-bezier(0.4,0.0,0.2,1)';
19
- /**
20
- * Animations used by the CuteWidgets` collapse element.
21
- */
22
- const cuteCollapseAnimations = {
23
- /** Animation that rotates the indicator arrow. */
24
- /*
25
- indicatorRotate: trigger('indicatorRotate', [
26
- state('collapsed, void', style({transform: 'rotate(0deg)'})),
27
- state('expanded', style({transform: 'rotate(180deg)'})),
28
- transition(
29
- 'expanded <=> collapsed, void => collapsed',
30
- animate(EXPANSION_PANEL_ANIMATION_TIMING),
31
- ),
32
- ]),
33
- */
34
- /** Animation that expands and collapses the panel content. */
35
- bodyExpansion: trigger('bodyExpansion', [
36
- state('collapsed, void', style({ height: '0px', visibility: 'hidden' })),
37
- state('collapsed-hor, void', style({ width: '0px', visibility: 'hidden' })),
38
- // Clear the `visibility` while open, otherwise the content will be visible when placed in
39
- // a parent that's `visibility: hidden`, because `visibility` doesn't apply to descendants
40
- // that have a `visibility` of their own (see #27436).
41
- state('expanded', style({ height: '*', visibility: '' })),
42
- state('expanded-hor', style({ width: '*', visibility: '' })),
43
- transition(
44
- //'expanded <=> collapsed, expanded-hor <=> collapsed-hor, :enter',
45
- '* => *, :enter, :leave', animate(CUTE_COLLAPSE_ANIMATION_TIMING))
46
- ]),
47
- };
48
-
49
10
  /**
50
11
  * @license Apache-2.0
51
12
  *
@@ -56,33 +17,21 @@ const cuteCollapseAnimations = {
56
17
  */
57
18
  // Increasing integer for generating unique ids for checkbox components.
58
19
  let nextUniqueId = 0;
59
- /**
60
- * This collapse component is used to show and hide content.
61
- * Buttons or anchors are used as triggers that are mapped to specific elements you toggle.
62
- */
63
- class CuteCollapse extends CuteBaseControl {
64
- /** Sets the element's current state to _collapsed_ or _expanded_ value. */
65
- get collapsed() { return this._collapsed(); }
66
- set collapsed(value) {
67
- if (value !== this._collapsed()) {
68
- if (this.disableAnimation) {
69
- (value ? this.beforeCollapse : this.beforeExpand).emit();
70
- }
71
- this._collapsed.set(value);
72
- if (this.disableAnimation) {
73
- (value ? this.afterCollapse : this.afterExpand).emit();
74
- }
75
- }
76
- }
77
- /** Weather the current state is _collapsed_ or _expanded_. Part of `Expandable` interface. */
78
- get expanded() { return !this.collapsed; }
20
+ class CuteCollapseBase extends CuteLayoutControl {
21
+ /** Whether the `CuteCollapse` is expanded. */
22
+ get expanded() { return this._accordionItem.expanded; }
23
+ set expanded(value) { this._accordionItem.expanded = value; }
24
+ /** Whether the animation while collapsing/expanding should be disabled */
25
+ get disableAnimation() { return this._disableAnimation ?? this._animationsDisabled; }
26
+ set disableAnimation(value) { this._disableAnimation = value; }
79
27
  constructor() {
80
28
  super();
81
- this._collapsed = signal(true, ...(ngDevMode ? [{ debugName: "_collapsed" }] : []));
29
+ this._ngZone = inject(NgZone);
30
+ this._accordionItem = inject(CdkAccordionItem);
31
+ this._animationsDisabled = _animationsDisabled();
32
+ this._cleanupTransitionHandlers = [];
82
33
  /** Expanding/Collapsing directionality, _horizontal_ or _vertical_. Default is _vertical_. */
83
34
  this.horizontal = false;
84
- /** Whether the animation while collapsing/expanding should be disabled */
85
- this.disableAnimation = false;
86
35
  /** Event emitting before expand element */
87
36
  this.beforeExpand = new EventEmitter();
88
37
  /** Event emitting before collapse element */
@@ -91,81 +40,104 @@ class CuteCollapse extends CuteBaseControl {
91
40
  this.afterExpand = new EventEmitter();
92
41
  /** Event emitting after collapse element */
93
42
  this.afterCollapse = new EventEmitter();
94
- /** Stream of body animation events. */
95
- this._bodyAnimation$ = new Subject();
96
- // We need a Subject with distinctUntilChanged, because the `done` event
97
- // fires twice on some browsers. See https://github.com/angular/angular/issues/24084
98
- this._bodyAnimation$
99
- .pipe(distinctUntilChanged((x, y) => {
100
- return x.phaseName === y.phaseName && x.fromState === y.fromState && x.toState === y.toState;
101
- }))
102
- .subscribe((event) => {
103
- this.onAnimationEvent(event);
104
- });
105
- }
106
- onAnimationEvent(event) {
107
- if (event.fromState !== 'void') {
108
- const toState = event.toState;
109
- if (event.phaseName == "start") {
110
- if (toState.startsWith('expanded')) {
111
- this.beforeExpand.emit();
112
- }
113
- else if (toState.startsWith('collapsed')) {
114
- this.beforeCollapse.emit();
115
- }
43
+ this._transitionStartListener = (event) => {
44
+ if (event.target === this._nativeElement &&
45
+ (event.propertyName === 'grid-template-rows' || event.propertyName === 'grid-template-columns')) {
46
+ this._ngZone.run(() => {
47
+ if (this._accordionItem.expanded) {
48
+ this.beforeExpand.emit();
49
+ }
50
+ else {
51
+ this.beforeCollapse.emit();
52
+ }
53
+ });
116
54
  }
117
- else if (event.phaseName == "done") {
118
- if (toState.startsWith('expanded')) {
119
- this.afterExpand.emit();
120
- }
121
- else if (toState.startsWith('collapsed')) {
122
- this.afterCollapse.emit();
123
- }
55
+ };
56
+ this._transitionEndListener = (event) => {
57
+ if (event.target === this._nativeElement &&
58
+ (event.propertyName === 'grid-template-rows' || event.propertyName === 'grid-template-columns')) {
59
+ this._ngZone.run(() => {
60
+ if (this._accordionItem.expanded) {
61
+ this.afterExpand.emit();
62
+ }
63
+ else {
64
+ this.afterCollapse.emit();
65
+ }
66
+ });
124
67
  }
68
+ };
69
+ }
70
+ setDisabledState(newState, emitEvent) {
71
+ if (super.setDisabledState(newState, emitEvent)) {
72
+ this._accordionItem.disabled = coerceBooleanProperty(newState);
73
+ return true;
125
74
  }
75
+ return false;
126
76
  }
127
77
  generateId() {
128
78
  return `cute-collapse-${nextUniqueId++}`;
129
79
  }
130
80
  /** Gets the expanded state string. */
131
81
  getState() {
132
- return this.collapsed ? 'collapsed' : 'expanded';
82
+ return this._accordionItem.expanded ? 'expanded' : 'collapsed';
133
83
  }
134
- /** Part of `Expandable` interface */
84
+ /**
85
+ * @inheritDoc
86
+ * Part of `Expandable` interface.
87
+ */
135
88
  toggle() {
136
- this.collapsed = !this.collapsed;
89
+ this._accordionItem.toggle();
137
90
  }
138
- /** Part of `Expandable` interface */
91
+ /**
92
+ * @inheritDoc
93
+ * Part of `Expandable` interface.
94
+ */
139
95
  open() {
140
- if (this.collapsed) {
141
- this.collapsed = false;
142
- }
96
+ this._accordionItem.open();
143
97
  }
144
- /** Part of `Expandable` interface */
98
+ /**
99
+ * @inheritDoc
100
+ * Part of `Expandable` interface.
101
+ */
145
102
  close() {
146
- if (!this.collapsed) {
147
- this.collapsed = true;
148
- }
103
+ this._accordionItem.close();
104
+ }
105
+ _setupAnimationEvents() {
106
+ // This method is defined separately, because we need to
107
+ // disable this logic in some internal components.
108
+ this._ngZone.runOutsideAngular(() => {
109
+ if (this.disableAnimation) {
110
+ this._accordionItem.opened.subscribe(() => this._ngZone.run(() => this.beforeExpand.emit()));
111
+ this._accordionItem.closed.subscribe(() => this._ngZone.run(() => this.beforeCollapse.emit()));
112
+ this._accordionItem.opened.subscribe(() => this._ngZone.run(() => this.afterExpand.emit()));
113
+ this._accordionItem.closed.subscribe(() => this._ngZone.run(() => this.afterCollapse.emit()));
114
+ }
115
+ else {
116
+ setTimeout(() => {
117
+ const element = this._nativeElement;
118
+ this._cleanupTransitionHandlers.push(this._renderer.listen(element, 'transitionend', this._transitionEndListener), this._renderer.listen(element, 'transitionstart', this._transitionStartListener));
119
+ element.classList.add('cute-collapse-animations-enabled');
120
+ }, 200);
121
+ }
122
+ });
123
+ }
124
+ ngAfterContentInit() {
125
+ super.ngAfterContentInit();
126
+ this._setupAnimationEvents();
149
127
  }
150
128
  ngOnDestroy() {
151
129
  super.ngOnDestroy();
152
- this._bodyAnimation$.complete();
130
+ this._cleanupTransitionHandlers.forEach(cleanup => cleanup());
153
131
  }
154
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteCollapse, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
155
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.15", type: CuteCollapse, isStandalone: true, selector: "cute-collapse", inputs: { collapsed: ["collapsed", "collapsed", booleanAttribute], horizontal: ["horizontal", "horizontal", booleanAttribute], disableAnimation: ["disableAnimation", "disableAnimation", booleanAttribute] }, outputs: { beforeExpand: "beforeExpand", beforeCollapse: "beforeCollapse", afterExpand: "afterExpand", afterCollapse: "afterCollapse" }, host: { listeners: { "@bodyExpansion.start": "_bodyAnimation$.next($event)", "@bodyExpansion.done": "_bodyAnimation$.next($event)" }, properties: { "id": "id || null", "@bodyExpansion": "getState()+(horizontal?\"-hor\":\"\")", "@.disabled": "disableAnimation" }, classAttribute: "cute-collapse" }, exportAs: ["cuteCollapse"], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".cute-collapse{display:block}.ng-animating{overflow:hidden}\n"], animations: [cuteCollapseAnimations.bodyExpansion], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
132
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteCollapseBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
133
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.15", type: CuteCollapseBase, isStandalone: true, inputs: { expanded: ["expanded", "expanded", booleanAttribute], horizontal: ["horizontal", "horizontal", booleanAttribute], disableAnimation: ["disableAnimation", "disableAnimation", booleanAttribute] }, outputs: { beforeExpand: "beforeExpand", beforeCollapse: "beforeCollapse", afterExpand: "afterExpand", afterCollapse: "afterCollapse" }, usesInheritance: true, hostDirectives: [{ directive: i1.CdkAccordionItem, outputs: ["expandedChange", "expandedChange"] }], ngImport: i0 }); }
156
134
  }
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteCollapse, decorators: [{
158
- type: Component,
159
- args: [{ selector: 'cute-collapse', template: '<ng-content></ng-content>', exportAs: 'cuteCollapse', host: {
160
- 'class': 'cute-collapse', // collapse',
161
- //'[class.show]': '!collapsed',
162
- '[id]': 'id || null',
163
- '[@bodyExpansion]': 'getState()+(horizontal?"-hor":"")',
164
- '[@.disabled]': 'disableAnimation',
165
- '(@bodyExpansion.start)': '_bodyAnimation$.next($event)',
166
- '(@bodyExpansion.done)': '_bodyAnimation$.next($event)',
167
- }, animations: [cuteCollapseAnimations.bodyExpansion], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [".cute-collapse{display:block}.ng-animating{overflow:hidden}\n"] }]
168
- }], ctorParameters: () => [], propDecorators: { collapsed: [{
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteCollapseBase, decorators: [{
136
+ type: Directive,
137
+ args: [{
138
+ hostDirectives: [{ directive: CdkAccordionItem, outputs: ["expandedChange"] }],
139
+ }]
140
+ }], ctorParameters: () => [], propDecorators: { expanded: [{
169
141
  type: Input,
170
142
  args: [{ transform: booleanAttribute }]
171
143
  }], horizontal: [{
@@ -183,6 +155,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
183
155
  }], afterCollapse: [{
184
156
  type: Output
185
157
  }] } });
158
+ /**
159
+ * This collapse component is used to show and hide content.
160
+ * Buttons or anchors are used as triggers that are mapped to specific elements you toggle.
161
+ */
162
+ class CuteCollapse extends CuteCollapseBase {
163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteCollapse, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
164
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CuteCollapse, isStandalone: true, selector: "cute-collapse", host: { properties: { "class": "\"cute-collapse-\"+(horizontal ? \"horizontal\" : \"vertical\")+\" \"+getState()", "id": "id || null" }, classAttribute: "cute-collapse" }, exportAs: ["cuteCollapse"], usesInheritance: true, ngImport: i0, template: "<div class=\"cute-collapse-content\" #content>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".cute-collapse{display:grid;width:100%;overflow:hidden}.cute-collapse .cute-collapse-content{min-height:0;overflow:hidden;transition:display .1s;transition-timing-function:ease-in-out;transition-behavior:allow-discrete;display:none}.cute-collapse.expanded .cute-collapse-content{display:block}.cute-collapse.collapsed .cute-collapse-content{display:none}.cute-collapse.cute-collapse-vertical{grid-template-rows:0fr}.cute-collapse.cute-collapse-vertical.expanded{grid-template-rows:1fr}.cute-collapse.cute-collapse-vertical.collapsed{grid-template-rows:0fr}.cute-collapse.cute-collapse-vertical.cute-collapse-animations-enabled{transition:grid-template-rows .2s}.cute-collapse.cute-collapse-horizontal{grid-template-columns:0fr}.cute-collapse.cute-collapse-horizontal.expanded{grid-template-columns:1fr}.cute-collapse.cute-collapse-horizontal.collapsed{grid-template-columns:0fr}.cute-collapse.cute-collapse-horizontal.cute-collapse-animations-enabled{transition:grid-template-columns .2s}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
165
+ }
166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteCollapse, decorators: [{
167
+ type: Component,
168
+ args: [{ selector: 'cute-collapse', exportAs: 'cuteCollapse', host: {
169
+ 'class': 'cute-collapse',
170
+ '[class]': '"cute-collapse-"+(horizontal ? "horizontal" : "vertical")+" "+getState()',
171
+ '[id]': 'id || null',
172
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cute-collapse-content\" #content>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".cute-collapse{display:grid;width:100%;overflow:hidden}.cute-collapse .cute-collapse-content{min-height:0;overflow:hidden;transition:display .1s;transition-timing-function:ease-in-out;transition-behavior:allow-discrete;display:none}.cute-collapse.expanded .cute-collapse-content{display:block}.cute-collapse.collapsed .cute-collapse-content{display:none}.cute-collapse.cute-collapse-vertical{grid-template-rows:0fr}.cute-collapse.cute-collapse-vertical.expanded{grid-template-rows:1fr}.cute-collapse.cute-collapse-vertical.collapsed{grid-template-rows:0fr}.cute-collapse.cute-collapse-vertical.cute-collapse-animations-enabled{transition:grid-template-rows .2s}.cute-collapse.cute-collapse-horizontal{grid-template-columns:0fr}.cute-collapse.cute-collapse-horizontal.expanded{grid-template-columns:1fr}.cute-collapse.cute-collapse-horizontal.collapsed{grid-template-columns:0fr}.cute-collapse.cute-collapse-horizontal.cute-collapse-animations-enabled{transition:grid-template-columns .2s}\n"] }]
173
+ }] });
186
174
 
187
175
  /**
188
176
  * @license Apache-2.0
@@ -202,7 +190,7 @@ class CuteCollapseTrigger {
202
190
  this._collapseControl = collapse;
203
191
  }
204
192
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteCollapseTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
205
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: CuteCollapseTrigger, isStandalone: true, selector: "[cuteCollapseTriggerFor]", inputs: { collapseControl: ["cuteCollapseTriggerFor", "collapseControl"] }, host: { listeners: { "click": "collapseControl?.toggle()" }, properties: { "class.collapsed": "collapseControl?.collapsed", "attr.aria-expanded": "collapseControl ? collapseControl.expanded : null", "attr.aria-controls": "collapseControl?.id || null" }, classAttribute: "cute-collapse-trigger" }, exportAs: ["cuteCollapseTrigger"], ngImport: i0 }); }
193
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: CuteCollapseTrigger, isStandalone: true, selector: "[cuteCollapseTriggerFor]", inputs: { collapseControl: ["cuteCollapseTriggerFor", "collapseControl"] }, host: { listeners: { "click": "collapseControl?.toggle()" }, properties: { "class.collapsed": "!collapseControl?.expanded", "attr.aria-expanded": "collapseControl ? collapseControl.expanded : null", "attr.aria-controls": "collapseControl?.id || null" }, classAttribute: "cute-collapse-trigger" }, exportAs: ["cuteCollapseTrigger"], ngImport: i0 }); }
206
194
  }
207
195
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteCollapseTrigger, decorators: [{
208
196
  type: Directive,
@@ -211,7 +199,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
211
199
  exportAs: 'cuteCollapseTrigger',
212
200
  host: {
213
201
  'class': 'cute-collapse-trigger',
214
- '[class.collapsed]': 'collapseControl?.collapsed',
202
+ '[class.collapsed]': '!collapseControl?.expanded',
215
203
  '[attr.aria-expanded]': 'collapseControl ? collapseControl.expanded : null',
216
204
  '[attr.aria-controls]': 'collapseControl?.id || null',
217
205
  '(click)': 'collapseControl?.toggle()',
@@ -255,5 +243,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
255
243
  * Generated bundle index. Do not edit.
256
244
  */
257
245
 
258
- export { CUTE_COLLAPSE_ANIMATION_TIMING, CuteCollapse, CuteCollapseModule, CuteCollapseTrigger, cuteCollapseAnimations };
246
+ export { CuteCollapse, CuteCollapseBase, CuteCollapseModule, CuteCollapseTrigger };
259
247
  //# sourceMappingURL=cute-widgets-base-collapse.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cute-widgets-base-collapse.mjs","sources":["../../../../projects/cute-widgets/base/collapse/src/collapse-animations.ts","../../../../projects/cute-widgets/base/collapse/src/collapse.component.ts","../../../../projects/cute-widgets/base/collapse/src/collapse-trigger.directive.ts","../../../../projects/cute-widgets/base/collapse/src/collapse.module.ts","../../../../projects/cute-widgets/base/collapse/cute-widgets-base-collapse.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n animate,\r\n AnimationTriggerMetadata,\r\n state,\r\n style,\r\n transition,\r\n trigger,\r\n} from '@angular/animations';\r\n\r\n/** Time and timing curve for **collapse** animations. */\r\nexport const CUTE_COLLAPSE_ANIMATION_TIMING = '225ms cubic-bezier(0.4,0.0,0.2,1)';\r\n\r\n/**\r\n * Animations used by the CuteWidgets` collapse element.\r\n */\r\nexport const cuteCollapseAnimations: {\r\n //readonly indicatorRotate: AnimationTriggerMetadata;\r\n readonly bodyExpansion: AnimationTriggerMetadata;\r\n} = {\r\n /** Animation that rotates the indicator arrow. */\r\n /*\r\n indicatorRotate: trigger('indicatorRotate', [\r\n state('collapsed, void', style({transform: 'rotate(0deg)'})),\r\n state('expanded', style({transform: 'rotate(180deg)'})),\r\n transition(\r\n 'expanded <=> collapsed, void => collapsed',\r\n animate(EXPANSION_PANEL_ANIMATION_TIMING),\r\n ),\r\n ]),\r\n */\r\n /** Animation that expands and collapses the panel content. */\r\n bodyExpansion: trigger('bodyExpansion', [\r\n state('collapsed, void', style({height: '0px', visibility: 'hidden'})),\r\n state('collapsed-hor, void', style({width: '0px', visibility: 'hidden'})),\r\n // Clear the `visibility` while open, otherwise the content will be visible when placed in\r\n // a parent that's `visibility: hidden`, because `visibility` doesn't apply to descendants\r\n // that have a `visibility` of their own (see #27436).\r\n state('expanded', style({height: '*', visibility: ''})),\r\n state('expanded-hor', style({width: '*', visibility: ''})),\r\n transition(\r\n //'expanded <=> collapsed, expanded-hor <=> collapsed-hor, :enter',\r\n '* => *, :enter, :leave',\r\n animate(CUTE_COLLAPSE_ANIMATION_TIMING),\r\n )\r\n ]),\r\n};\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n EventEmitter,\r\n Input, OnDestroy,\r\n Output, signal,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport {CuteBaseControl, Expandable} from \"@cute-widgets/base/abstract\";\r\nimport {cuteCollapseAnimations} from \"./collapse-animations\";\r\nimport {Subject} from \"rxjs\";\r\nimport {distinctUntilChanged} from \"rxjs/operators\";\r\nimport {AnimationEvent} from \"@angular/animations\";\r\n\r\n// Increasing integer for generating unique ids for checkbox components.\r\nlet nextUniqueId = 0;\r\n\r\n/** Animation states */\r\nexport type CuteCollapseState = 'expanded' | 'collapsed';\r\n\r\n/**\r\n * This collapse component is used to show and hide content.\r\n * Buttons or anchors are used as triggers that are mapped to specific elements you toggle.\r\n */\r\n@Component({\r\n selector: 'cute-collapse',\r\n template: '<ng-content></ng-content>',\r\n styles: `\r\n .cute-collapse {display: block;}\r\n .ng-animating {overflow: hidden;}\r\n `,\r\n exportAs: 'cuteCollapse',\r\n host: {\r\n 'class': 'cute-collapse', // collapse',\r\n //'[class.show]': '!collapsed',\r\n '[id]': 'id || null',\r\n '[@bodyExpansion]': 'getState()+(horizontal?\"-hor\":\"\")',\r\n '[@.disabled]': 'disableAnimation',\r\n '(@bodyExpansion.start)': '_bodyAnimation$.next($event)',\r\n '(@bodyExpansion.done)': '_bodyAnimation$.next($event)',\r\n },\r\n animations: [cuteCollapseAnimations.bodyExpansion],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true\r\n})\r\nexport class CuteCollapse extends CuteBaseControl implements Expandable, OnDestroy {\r\n\r\n /** Sets the element's current state to _collapsed_ or _expanded_ value. */\r\n @Input({transform: booleanAttribute})\r\n get collapsed(): boolean { return this._collapsed(); }\r\n set collapsed(value: boolean) {\r\n if (value !== this._collapsed()) {\r\n if (this.disableAnimation) {\r\n (value ? this.beforeCollapse : this.beforeExpand).emit();\r\n }\r\n this._collapsed.set(value);\r\n if (this.disableAnimation) {\r\n (value ? this.afterCollapse : this.afterExpand).emit();\r\n }\r\n }\r\n }\r\n private _collapsed = signal<boolean>(true);\r\n\r\n /** Expanding/Collapsing directionality, _horizontal_ or _vertical_. Default is _vertical_. */\r\n @Input({transform: booleanAttribute})\r\n horizontal: boolean = false;\r\n\r\n /** Whether the animation while collapsing/expanding should be disabled */\r\n @Input({transform: booleanAttribute})\r\n disableAnimation: boolean = false;\r\n\r\n /** Event emitting before expand element */\r\n @Output() readonly beforeExpand = new EventEmitter<void>();\r\n /** Event emitting before collapse element */\r\n @Output() readonly beforeCollapse = new EventEmitter<void>();\r\n\r\n /** Event emitting after expand element */\r\n @Output() readonly afterExpand = new EventEmitter<void>();\r\n /** Event emitting after collapse element */\r\n @Output() readonly afterCollapse = new EventEmitter<void>();\r\n\r\n /** Weather the current state is _collapsed_ or _expanded_. Part of `Expandable` interface. */\r\n public get expanded(): boolean { return !this.collapsed; }\r\n\r\n /** Stream of body animation events. */\r\n protected readonly _bodyAnimation$ = new Subject<AnimationEvent>();\r\n\r\n constructor() {\r\n super();\r\n\r\n // We need a Subject with distinctUntilChanged, because the `done` event\r\n // fires twice on some browsers. See https://github.com/angular/angular/issues/24084\r\n this._bodyAnimation$\r\n .pipe(\r\n distinctUntilChanged((x, y) => {\r\n return x.phaseName === y.phaseName && x.fromState === y.fromState && x.toState === y.toState;\r\n }),\r\n )\r\n .subscribe((event: AnimationEvent) => {\r\n this.onAnimationEvent(event);\r\n });\r\n }\r\n\r\n protected onAnimationEvent(event: AnimationEvent) {\r\n if (event.fromState !== 'void') {\r\n const toState = event.toState;\r\n if (event.phaseName == \"start\") {\r\n if (toState.startsWith('expanded')) {\r\n this.beforeExpand.emit();\r\n } else if (toState.startsWith('collapsed')) {\r\n this.beforeCollapse.emit();\r\n }\r\n } else if (event.phaseName == \"done\") {\r\n if (toState.startsWith('expanded')) {\r\n this.afterExpand.emit();\r\n } else if (toState.startsWith('collapsed')) {\r\n this.afterCollapse.emit();\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected override generateId(): string {\r\n return `cute-collapse-${nextUniqueId++}`;\r\n }\r\n\r\n /** Gets the expanded state string. */\r\n getState(): CuteCollapseState {\r\n return this.collapsed ? 'collapsed' : 'expanded';\r\n }\r\n\r\n /** Part of `Expandable` interface */\r\n toggle(): void {\r\n this.collapsed = !this.collapsed;\r\n }\r\n\r\n /** Part of `Expandable` interface */\r\n open(): void {\r\n if (this.collapsed) {\r\n this.collapsed = false;\r\n }\r\n }\r\n\r\n /** Part of `Expandable` interface */\r\n close(): void {\r\n if (!this.collapsed) {\r\n this.collapsed = true;\r\n }\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n this._bodyAnimation$.complete();\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, Input} from \"@angular/core\";\r\nimport {CuteCollapse} from \"./collapse.component\";\r\n\r\n@Directive({\r\n selector: '[cuteCollapseTriggerFor]',\r\n exportAs: 'cuteCollapseTrigger',\r\n host: {\r\n 'class': 'cute-collapse-trigger',\r\n '[class.collapsed]': 'collapseControl?.collapsed',\r\n '[attr.aria-expanded]': 'collapseControl ? collapseControl.expanded : null',\r\n '[attr.aria-controls]': 'collapseControl?.id || null',\r\n '(click)': 'collapseControl?.toggle()',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteCollapseTrigger {\r\n\r\n /** Reference to the `cute-collapse` component to toggle its visibility */\r\n @Input(\"cuteCollapseTriggerFor\")\r\n get collapseControl(): CuteCollapse | null {return this._collapseControl;}\r\n set collapseControl(collapse: CuteCollapse | null) {\r\n this._collapseControl = collapse;\r\n }\r\n private _collapseControl: CuteCollapse | null = null;\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteCollapse} from \"./collapse.component\";\r\nimport {CuteCollapseTrigger} from \"./collapse-trigger.directive\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteCollapse,\r\n CuteCollapseTrigger,\r\n];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n declarations: [],\r\n})\r\nexport class CuteCollapseModule {\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EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAJnB,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAIX,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,CAAC;AACjC,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,YAAY,EAAE,EAAE;AACjB,iBAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"cute-widgets-base-collapse.mjs","sources":["../../../../projects/cute-widgets/base/collapse/src/collapse.component.ts","../../../../projects/cute-widgets/base/collapse/src/collapse.component.html","../../../../projects/cute-widgets/base/collapse/src/collapse-trigger.directive.ts","../../../../projects/cute-widgets/base/collapse/src/collapse.module.ts","../../../../projects/cute-widgets/base/collapse/cute-widgets-base-collapse.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n AfterContentInit,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component, Directive,\r\n EventEmitter, inject,\r\n Input, NgZone,\r\n Output,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport {CdkAccordionItem} from '@angular/cdk/accordion';\r\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\r\nimport {CuteLayoutControl, Expandable} from \"@cute-widgets/base/abstract\";\r\nimport {_animationsDisabled} from '@cute-widgets/base/core';\r\n\r\n// Increasing integer for generating unique ids for checkbox components.\r\nlet nextUniqueId = 0;\r\n\r\n/** Animation states */\r\nexport type CuteCollapseState = 'expanded' | 'collapsed';\r\n\r\n@Directive({\r\n hostDirectives: [{directive: CdkAccordionItem, outputs: [\"expandedChange\"]}],\r\n})\r\nexport abstract class CuteCollapseBase extends CuteLayoutControl implements Expandable, AfterContentInit {\r\n protected _ngZone = inject(NgZone);\r\n protected _accordionItem = inject(CdkAccordionItem);\r\n protected _animationsDisabled = _animationsDisabled();\r\n private _cleanupTransitionHandlers: (() => void)[] = [];\r\n\r\n /** Whether the `CuteCollapse` is expanded. */\r\n @Input({transform: booleanAttribute})\r\n get expanded(): boolean {return this._accordionItem.expanded;}\r\n set expanded(value: boolean) {this._accordionItem.expanded = value;}\r\n\r\n /** Expanding/Collapsing directionality, _horizontal_ or _vertical_. Default is _vertical_. */\r\n @Input({transform: booleanAttribute})\r\n horizontal: boolean = false;\r\n\r\n /** Whether the animation while collapsing/expanding should be disabled */\r\n @Input({transform: booleanAttribute})\r\n get disableAnimation(): boolean {return this._disableAnimation ?? this._animationsDisabled;}\r\n set disableAnimation(value: boolean) { this._disableAnimation = value; }\r\n private _disableAnimation: boolean | undefined;\r\n\r\n /** Event emitting before expand element */\r\n @Output() readonly beforeExpand = new EventEmitter<void>();\r\n /** Event emitting before collapse element */\r\n @Output() readonly beforeCollapse = new EventEmitter<void>();\r\n\r\n /** Event emitting after expand element */\r\n @Output() readonly afterExpand = new EventEmitter<void>();\r\n /** Event emitting after collapse element */\r\n @Output() readonly afterCollapse = new EventEmitter<void>();\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected override setDisabledState(newState: BooleanInput, emitEvent?: boolean): boolean {\r\n if (super.setDisabledState(newState, emitEvent)) {\r\n this._accordionItem.disabled = coerceBooleanProperty(newState);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n protected override generateId(): string {\r\n return `cute-collapse-${nextUniqueId++}`;\r\n }\r\n\r\n /** Gets the expanded state string. */\r\n getState(): CuteCollapseState {\r\n return this._accordionItem.expanded ? 'expanded' : 'collapsed';\r\n }\r\n\r\n /**\r\n * @inheritDoc\r\n * Part of `Expandable` interface.\r\n */\r\n toggle(): void {\r\n this._accordionItem.toggle();\r\n }\r\n\r\n /**\r\n * @inheritDoc\r\n * Part of `Expandable` interface.\r\n */\r\n open(): void {\r\n this._accordionItem.open();\r\n }\r\n\r\n /**\r\n * @inheritDoc\r\n * Part of `Expandable` interface.\r\n */\r\n close(): void {\r\n this._accordionItem.close();\r\n }\r\n\r\n private _transitionStartListener = (event: TransitionEvent) => {\r\n if (event.target === this._nativeElement &&\r\n (event.propertyName === 'grid-template-rows' || event.propertyName === 'grid-template-columns')\r\n ) {\r\n this._ngZone.run(() => {\r\n if (this._accordionItem.expanded) {\r\n this.beforeExpand.emit();\r\n } else {\r\n this.beforeCollapse.emit();\r\n }\r\n });\r\n }\r\n }\r\n\r\n private _transitionEndListener = (event: TransitionEvent) => {\r\n if (event.target === this._nativeElement &&\r\n (event.propertyName === 'grid-template-rows' || event.propertyName === 'grid-template-columns')\r\n ) {\r\n this._ngZone.run(() => {\r\n if (this._accordionItem.expanded) {\r\n this.afterExpand.emit();\r\n } else {\r\n this.afterCollapse.emit();\r\n }\r\n });\r\n }\r\n }\r\n\r\n protected _setupAnimationEvents() {\r\n // This method is defined separately, because we need to\r\n // disable this logic in some internal components.\r\n this._ngZone.runOutsideAngular(() => {\r\n if (this.disableAnimation) {\r\n this._accordionItem.opened.subscribe(() => this._ngZone.run(() => this.beforeExpand.emit()));\r\n this._accordionItem.closed.subscribe(() => this._ngZone.run(() => this.beforeCollapse.emit()));\r\n this._accordionItem.opened.subscribe(() => this._ngZone.run(() => this.afterExpand.emit()));\r\n this._accordionItem.closed.subscribe(() => this._ngZone.run(() => this.afterCollapse.emit()));\r\n } else {\r\n setTimeout(() => {\r\n const element = this._nativeElement;\r\n this._cleanupTransitionHandlers.push(\r\n this._renderer.listen(element, 'transitionend', this._transitionEndListener),\r\n this._renderer.listen(element, 'transitionstart', this._transitionStartListener),\r\n );\r\n element.classList.add('cute-collapse-animations-enabled');\r\n }, 200);\r\n }\r\n });\r\n }\r\n\r\n override ngAfterContentInit() {\r\n super.ngAfterContentInit();\r\n this._setupAnimationEvents();\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n this._cleanupTransitionHandlers.forEach(cleanup => cleanup());\r\n }\r\n\r\n}\r\n\r\n/**\r\n * This collapse component is used to show and hide content.\r\n * Buttons or anchors are used as triggers that are mapped to specific elements you toggle.\r\n */\r\n@Component({\r\n selector: 'cute-collapse',\r\n templateUrl: './collapse.component.html',\r\n styleUrl: './collapse.component.scss',\r\n exportAs: 'cuteCollapse',\r\n host: {\r\n 'class': 'cute-collapse',\r\n '[class]': '\"cute-collapse-\"+(horizontal ? \"horizontal\" : \"vertical\")+\" \"+getState()',\r\n '[id]': 'id || null',\r\n },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CuteCollapse extends CuteCollapseBase {}\r\n","<div class=\"cute-collapse-content\" #content>\r\n <ng-content></ng-content>\r\n</div>\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, Input} from \"@angular/core\";\r\nimport {CuteCollapse} from \"./collapse.component\";\r\nimport {Expandable} from '@cute-widgets/base/abstract';\r\n\r\n@Directive({\r\n selector: '[cuteCollapseTriggerFor]',\r\n exportAs: 'cuteCollapseTrigger',\r\n host: {\r\n 'class': 'cute-collapse-trigger',\r\n '[class.collapsed]': '!collapseControl?.expanded',\r\n '[attr.aria-expanded]': 'collapseControl ? collapseControl.expanded : null',\r\n '[attr.aria-controls]': 'collapseControl?.id || null',\r\n '(click)': 'collapseControl?.toggle()',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteCollapseTrigger {\r\n\r\n /** Reference to the `cute-collapse` component to toggle its visibility */\r\n @Input(\"cuteCollapseTriggerFor\")\r\n get collapseControl(): Expandable | null {return this._collapseControl;}\r\n set collapseControl(collapse: Expandable | null) {\r\n this._collapseControl = collapse;\r\n }\r\n private _collapseControl: Expandable | null = null;\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteCollapse} from \"./collapse.component\";\r\nimport {CuteCollapseTrigger} from \"./collapse-trigger.directive\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteCollapse,\r\n CuteCollapseTrigger,\r\n];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n declarations: [],\r\n})\r\nexport class CuteCollapseModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AAgBH;AACA,IAAI,YAAY,GAAG,CAAC;AAQd,MAAgB,gBAAiB,SAAQ,iBAAiB,CAAA;;IAO9D,IACI,QAAQ,GAAA,EAAa,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;AAC7D,IAAA,IAAI,QAAQ,CAAC,KAAc,EAAA,EAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAA;;AAOnE,IAAA,IACI,gBAAgB,GAAA,EAAa,OAAO,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAA;IAC3F,IAAI,gBAAgB,CAAC,KAAc,EAAA,EAAI,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;AAavE,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AA/BC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACxB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACzC,IAAA,CAAA,mBAAmB,GAAG,mBA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AAE,KAAK;AACd,oBAAA,YAAY,EAAE,EAAE;AACjB,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -1,6 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { HostListener, Directive, inject, ElementRef, EventEmitter, Output, Input, Renderer2, TemplateRef, ViewContainerRef, SecurityContext, HostAttributeToken, booleanAttribute } from '@angular/core';
3
- import { bsBreakpoints } from '@cute-widgets/base/core/layout';
2
+ import { HostListener, Directive, inject, ElementRef, EventEmitter, Output, Input, Renderer2, SecurityContext, HostAttributeToken, booleanAttribute } from '@angular/core';
4
3
  import { DomSanitizer } from '@angular/platform-browser';
5
4
 
6
5
  /**
@@ -62,7 +61,7 @@ class CuteClickOutside {
62
61
  }
63
62
  }
64
63
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteClickOutside, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
65
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: CuteClickOutside, isStandalone: true, selector: "[cuteClickOutside]", outputs: { cuteClickOutside: "cuteClickOutside" }, host: { listeners: { "document:click": "onClick($event)" } }, ngImport: i0 }); }
64
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: CuteClickOutside, isStandalone: true, selector: "[cuteClickOutside]", outputs: { cuteClickOutside: "cuteClickOutside" }, host: { listeners: { "window:click": "onClick($event)" } }, ngImport: i0 }); }
66
65
  }
67
66
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteClickOutside, decorators: [{
68
67
  type: Directive,
@@ -73,7 +72,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
73
72
  type: Output
74
73
  }], onClick: [{
75
74
  type: HostListener,
76
- args: ['document:click', ['$event']]
75
+ args: ['window:click', ['$event']]
77
76
  }] } });
78
77
 
79
78
  /**
@@ -220,73 +219,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
220
219
  type: Input
221
220
  }] } });
222
221
 
223
- /**
224
- * @license Apache-2.0
225
- *
226
- * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
227
- *
228
- * You may not use this file except in compliance with the License
229
- * that can be found at http://www.apache.org/licenses/LICENSE-2.0
230
- */
231
- /**
232
- * ```HTML
233
- * <div cuteResponsive="md, lg">
234
- * This content is visible on medium and large screens.
235
- * </div>
236
- * ```
237
- */
238
- class CuteResponsive {
239
- constructor() {
240
- this.templateRef = inject(TemplateRef);
241
- this.viewContainer = inject(ViewContainerRef);
242
- }
243
- ngOnInit() {
244
- this.detectScreenSize();
245
- }
246
- detectScreenSize() {
247
- const screenWidth = this.getScreenWidth();
248
- if (this.breakPoints?.includes(screenWidth)) {
249
- this.viewContainer.createEmbeddedView(this.templateRef);
250
- }
251
- else {
252
- this.viewContainer.clear();
253
- }
254
- }
255
- getScreenWidth() {
256
- const width = window.innerWidth;
257
- if (width >= bsBreakpoints.grid.xxl) {
258
- return 'xxl';
259
- }
260
- else if (width >= bsBreakpoints.grid.xl) {
261
- return 'xl';
262
- }
263
- else if (width >= bsBreakpoints.grid.lg) {
264
- return 'lg';
265
- }
266
- else if (width >= bsBreakpoints.grid.md) {
267
- return 'md';
268
- }
269
- else if (width >= bsBreakpoints.grid.sm) {
270
- return 'sm';
271
- }
272
- else {
273
- return 'xs';
274
- }
275
- }
276
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteResponsive, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
277
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: CuteResponsive, isStandalone: true, selector: "[cuteResponsive]", inputs: { breakPoints: ["cuteResponsive", "breakPoints"] }, ngImport: i0 }); }
278
- }
279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteResponsive, decorators: [{
280
- type: Directive,
281
- args: [{
282
- selector: '[cuteResponsive]',
283
- standalone: true,
284
- }]
285
- }], ctorParameters: () => [], propDecorators: { breakPoints: [{
286
- type: Input,
287
- args: ["cuteResponsive"]
288
- }] } });
289
-
290
222
  /**
291
223
  * @license Apache-2.0
292
224
  *
@@ -400,5 +332,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
400
332
  * Generated bundle index. Do not edit.
401
333
  */
402
334
 
403
- export { CuteClickOutside, CuteCopyToClipboard, CuteDisableContextMenu, CuteFocusInitial, CuteIconLink, CuteResponsive, CuteSvgSymbol, CuteTimeAgo };
335
+ export { CuteClickOutside, CuteCopyToClipboard, CuteDisableContextMenu, CuteFocusInitial, CuteIconLink, CuteSvgSymbol, CuteTimeAgo };
404
336
  //# sourceMappingURL=cute-widgets-base-core-directives.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cute-widgets-base-core-directives.mjs","sources":["../../../../projects/cute-widgets/base/core/directives/src/disable-context-menu.ts","../../../../projects/cute-widgets/base/core/directives/src/click-outside.ts","../../../../projects/cute-widgets/base/core/directives/src/copy-to-clipboard.ts","../../../../projects/cute-widgets/base/core/directives/src/time-ago.ts","../../../../projects/cute-widgets/base/core/directives/src/responsive.ts","../../../../projects/cute-widgets/base/core/directives/src/svg-symbol.ts","../../../../projects/cute-widgets/base/core/directives/src/icon-link.ts","../../../../projects/cute-widgets/base/core/directives/src/focus-initial.ts","../../../../projects/cute-widgets/base/core/directives/cute-widgets-base-core-directives.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport { Directive, HostListener } from '@angular/core';\r\n\r\n/**\r\n * Allows users to disable the context menu that appears when they right-click\r\n */\r\n@Directive({\r\n selector: '[cuteDisableContextMenu]',\r\n standalone: true,\r\n})\r\nexport class CuteDisableContextMenu {\r\n @HostListener('contextmenu', ['$event'])\r\n onContextMenu(event: Event): void {\r\n event.preventDefault();\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, ElementRef, Output, EventEmitter, HostListener, inject} from '@angular/core';\r\n\r\n/**\r\n * Tracks a click outside the target element.\r\n * @example\r\n * <div (cuteClickOutside)=\"closeDropdown()\">\r\n * <button (click)=\"toggleDropdown()\">Toggle Dropdown</button>\r\n * <div *ngIf=\"dropdownOpen\" class=\"dropdown\">\r\n * Dropdown content\r\n * </div>\r\n * </div>\r\n */\r\n@Directive({\r\n selector: '[cuteClickOutside]'\r\n})\r\nexport class CuteClickOutside {\r\n private _elementRef = inject(ElementRef);\r\n\r\n /** Emitted when the user clicks on a document outside the parent element. */\r\n @Output() cuteClickOutside = new EventEmitter<MouseEvent>();\r\n\r\n constructor() {}\r\n\r\n @HostListener('document:click', ['$event'])\r\n onClick(event: MouseEvent): void {\r\n if (!this._elementRef.nativeElement.contains(event.target)) {\r\n this.cuteClickOutside.emit(event);\r\n }\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, Input, ElementRef, HostListener, inject, Output, EventEmitter} from '@angular/core';\r\n\r\n/**\r\n * Allows users to copy a text to _system_ clipboard using the `Clipboard API`. The Clipboard API allows users to\r\n * programmatically read and write text and other kinds of data to and from the system clipboard in _secure contexts_.\r\n *\r\n * @example\r\n * ```HTML\r\n * <button [cuteCopyToClipboard]=\"'Text to copy'\"> Copy to Clipboard </button>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[cuteCopyToClipboard]',\r\n standalone: true,\r\n})\r\nexport class CuteCopyToClipboard {\r\n private el = inject(ElementRef);\r\n\r\n /** Text to copy to clipboard when the user clicks on the element that directive belongs to */\r\n @Input(\"cuteCopyToClipboard\") data?: string | ClipboardItem | ClipboardItems | (() => string|ClipboardItem|ClipboardItems);\r\n\r\n /** Emits when some text is copied to the clipboard. The emitted value indicates whether copying was successful. */\r\n @Output() cuteCopyToClipboardCopied = new EventEmitter<boolean>();\r\n\r\n constructor() {}\r\n\r\n @HostListener('click')\r\n onClick() {\r\n if (this.data) {\r\n if (window.isSecureContext) {\r\n try {\r\n let dataToWrite;\r\n if (this.data instanceof Function) {\r\n dataToWrite = this.data()\r\n } else {\r\n dataToWrite = this.data;\r\n }\r\n if (typeof dataToWrite === \"string\") {\r\n navigator.clipboard\r\n .writeText(dataToWrite)\r\n .then(() => this.cuteCopyToClipboardCopied.next(true))\r\n .catch(() => {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n });\r\n } else {\r\n let items: ClipboardItems;\r\n if (dataToWrite instanceof ClipboardItem) {\r\n items = [dataToWrite];\r\n } else {\r\n items = dataToWrite;\r\n }\r\n navigator.clipboard\r\n .write(items)\r\n .then(() => this.cuteCopyToClipboardCopied.next(true))\r\n .catch(() => {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n });\r\n }\r\n } catch (err: any) {\r\n console.error(err.message);\r\n }\r\n } else {\r\n console.error(\"The Clipboard API is available only in secure contexts (HTTPS)\");\r\n this.cuteCopyToClipboardCopied.next(false);\r\n }\r\n } else {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n }\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {Directive, Input, ElementRef, Renderer2, OnChanges, SimpleChanges, inject} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cuteTimeAgo]',\r\n standalone: true,\r\n})\r\nexport class CuteTimeAgo implements OnChanges {\r\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private renderer = inject(Renderer2);\r\n\r\n @Input() cuteTimeAgo?: Date;\r\n\r\n constructor() {}\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes[\"cuteTimeAgo\"]) {\r\n this.updateTimeAgo();\r\n }\r\n }\r\n\r\n private updateTimeAgo(): void {\r\n if (this.cuteTimeAgo instanceof Date) {\r\n const timeDifference = Date.now() - this.cuteTimeAgo.getTime();\r\n const secondsAgo = Math.floor(timeDifference / 1000);\r\n\r\n let text: string;\r\n\r\n if (secondsAgo < 60) {\r\n text = 'just now';\r\n } else if (secondsAgo < 3600) {\r\n const minutes = Math.floor(secondsAgo / 60);\r\n text = `${minutes} minute${minutes > 1 ? 's' : ''} ago`;\r\n } else if (secondsAgo < 86400) {\r\n const hours = Math.floor(secondsAgo / 3600);\r\n text = `${hours} hour${hours > 1 ? 's' : ''} ago`;\r\n } else {\r\n const days = Math.floor(secondsAgo / 86400);\r\n text = `${days} day${days > 1 ? 's' : ''} ago`;\r\n }\r\n\r\n this.renderer.setProperty(this.el.nativeElement, 'textContent', text);\r\n }\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {Directive, inject, Input, OnInit, TemplateRef, ViewContainerRef} from '@angular/core';\r\nimport {LayoutBreakpoint} from \"@cute-widgets/base/core/types\";\r\nimport {bsBreakpoints} from \"@cute-widgets/base/core/layout\";\r\n\r\n/**\r\n * ```HTML\r\n * <div cuteResponsive=\"md, lg\">\r\n * This content is visible on medium and large screens.\r\n * </div>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[cuteResponsive]',\r\n standalone: true,\r\n})\r\nexport class CuteResponsive implements OnInit {\r\n private templateRef = inject(TemplateRef);\r\n private viewContainer = inject(ViewContainerRef);\r\n\r\n /** Comma-separated screen size breakpoints (e.g., 'md, lg') or an array of it. */\r\n @Input(\"cuteResponsive\") breakPoints?: string | LayoutBreakpoint[];\r\n\r\n constructor() {}\r\n\r\n ngOnInit() {\r\n this.detectScreenSize();\r\n }\r\n\r\n private detectScreenSize() {\r\n const screenWidth = this.getScreenWidth();\r\n if (this.breakPoints?.includes(screenWidth)) {\r\n this.viewContainer.createEmbeddedView(this.templateRef);\r\n } else {\r\n this.viewContainer.clear();\r\n }\r\n }\r\n\r\n private getScreenWidth(): LayoutBreakpoint {\r\n const width = window.innerWidth;\r\n if (width >= bsBreakpoints.grid.xxl) { return 'xxl'; } else\r\n if (width >= bsBreakpoints.grid.xl) { return 'xl'; } else\r\n if (width >= bsBreakpoints.grid.lg) { return 'lg'; } else\r\n if (width >= bsBreakpoints.grid.md) { return 'md'; } else\r\n if (width >= bsBreakpoints.grid.sm) { return 'sm'; } else\r\n { return 'xs'; }\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, ElementRef, inject, Input, OnInit, SecurityContext} from \"@angular/core\";\r\nimport {DomSanitizer} from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Appends `<use href=[symbolPath]>` as a child element of the SVG.\r\n * @example\r\n * ```html\r\n * <svg width=\"1em\" height=\"1em\" [cuteSvgSymbol]=\"BOOTSTRAP_ICONS+'#collection'\"></svg>\r\n * ```\r\n */\r\n@Directive({\r\n selector: 'svg[cuteSvgSymbol]',\r\n host: {\r\n '[attr.cuteSvgSymbol]': 'null',\r\n 'ngSkipHydration': 'true',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteSvgSymbol implements OnInit {\r\n private _elementRef = inject<ElementRef<SVGElement>>(ElementRef);\r\n private _sanitizer = inject(DomSanitizer);\r\n\r\n /** Path to SVG **symbol** element including its `id` prefixed with **#**. */\r\n @Input({alias: \"cuteSvgSymbol\", required: true}) svgSymbol: string|null = null ;\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit() {\r\n const url = this._sanitizer.sanitize(SecurityContext.URL, this.svgSymbol);\r\n if (url) {\r\n this._elementRef.nativeElement.innerHTML = `<use href=\"${url}\"></use>`;\r\n }\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {booleanAttribute, Directive, HostAttributeToken, inject, Input} from \"@angular/core\";\r\n\r\n/**\r\n * The icon link helper directive modifies the default link styles to enhance their appearance and\r\n * quickly align any pairing of icon and text.\r\n */\r\n@Directive({\r\n selector: 'a[cuteIconLink]',\r\n exportAs: 'cuteIconLink',\r\n host: {\r\n 'class': 'icon-link',\r\n '[class.icon-link-hover]': 'hovered',\r\n //'[style.cursor]': 'noHRef ? \"pointer\" : undefined',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteIconLink /* extends ... */ {\r\n\r\n protected noHRef: boolean = false;\r\n\r\n /** Whether to move the icon to the right on hover. */\r\n @Input({transform: booleanAttribute})\r\n hovered: boolean = false;\r\n\r\n constructor() {\r\n const href = inject(new HostAttributeToken(\"href\"), {optional: true});\r\n this.noHRef = !href;\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cuteFocusInitial]',\r\n standalone: true,\r\n host: {\r\n '[attr.cdkFocusInitial]': 'true',\r\n }\r\n})\r\nexport class CuteFocusInitial {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;AAOG;AAGH;;AAEG;MAKU,sBAAsB,CAAA;AAEjC,IAAA,aAAa,CAAC,KAAY,EAAA;QACxB,KAAK,CAAC,cAAc,EAAE;IACxB;+GAJW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,aAAA,EAAA,uBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBAEE,YAAY;uBAAC,aAAa,EAAE,CAAC,QAAQ,CAAC;;;AClBzC;;;;;;;AAOG;AAGH;;;;;;;;;AASG;MAIU,gBAAgB,CAAA;AAM3B,IAAA,WAAA,GAAA;AALQ,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;;AAG9B,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,YAAY,EAAc;IAE5C;AAGf,IAAA,OAAO,CAAC,KAAiB,EAAA;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;AAC1D,YAAA,IAAI,CAAC,gBAAgB,CA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,CAAA;kBAV1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACJ,wBAAA,OAAO,EAAE,WAAW;AACpB,wBAAA,yBAAyB,EAAE,SAAS;;AAErC,qBAAA;AACD,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBAME,KAAK;uBAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC;;;AC9BtC;;;;;;;AAOG;MAUU,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,wBAAwB,EAAE,MAAM;AACjC;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"cute-widgets-base-core-directives.mjs","sources":["../../../../projects/cute-widgets/base/core/directives/src/disable-context-menu.ts","../../../../projects/cute-widgets/base/core/directives/src/click-outside.ts","../../../../projects/cute-widgets/base/core/directives/src/copy-to-clipboard.ts","../../../../projects/cute-widgets/base/core/directives/src/time-ago.ts","../../../../projects/cute-widgets/base/core/directives/src/svg-symbol.ts","../../../../projects/cute-widgets/base/core/directives/src/icon-link.ts","../../../../projects/cute-widgets/base/core/directives/src/focus-initial.ts","../../../../projects/cute-widgets/base/core/directives/cute-widgets-base-core-directives.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport { Directive, HostListener } from '@angular/core';\r\n\r\n/**\r\n * Allows users to disable the context menu that appears when they right-click\r\n */\r\n@Directive({\r\n selector: '[cuteDisableContextMenu]',\r\n standalone: true,\r\n})\r\nexport class CuteDisableContextMenu {\r\n @HostListener('contextmenu', ['$event'])\r\n onContextMenu(event: Event): void {\r\n event.preventDefault();\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, ElementRef, Output, EventEmitter, HostListener, inject} from '@angular/core';\r\n\r\n/**\r\n * Tracks a click outside the target element.\r\n * @example\r\n * <div (cuteClickOutside)=\"closeDropdown()\">\r\n * <button (click)=\"toggleDropdown()\">Toggle Dropdown</button>\r\n * <div *ngIf=\"dropdownOpen\" class=\"dropdown\">\r\n * Dropdown content\r\n * </div>\r\n * </div>\r\n */\r\n@Directive({\r\n selector: '[cuteClickOutside]'\r\n})\r\nexport class CuteClickOutside {\r\n private _elementRef = inject(ElementRef);\r\n\r\n /** Emitted when the user clicks on a document outside the parent element. */\r\n @Output() cuteClickOutside = new EventEmitter<MouseEvent>();\r\n\r\n constructor() {}\r\n\r\n @HostListener('window:click', ['$event'])\r\n onClick(event: MouseEvent): void {\r\n if (!this._elementRef.nativeElement.contains(event.target)) {\r\n this.cuteClickOutside.emit(event);\r\n }\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, Input, ElementRef, HostListener, inject, Output, EventEmitter} from '@angular/core';\r\n\r\n/**\r\n * Allows users to copy a text to _system_ clipboard using the `Clipboard API`. The Clipboard API allows users to\r\n * programmatically read and write text and other kinds of data to and from the system clipboard in _secure contexts_.\r\n *\r\n * @example\r\n * ```HTML\r\n * <button [cuteCopyToClipboard]=\"'Text to copy'\"> Copy to Clipboard </button>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[cuteCopyToClipboard]',\r\n standalone: true,\r\n})\r\nexport class CuteCopyToClipboard {\r\n private el = inject(ElementRef);\r\n\r\n /** Text to copy to clipboard when the user clicks on the element that directive belongs to */\r\n @Input(\"cuteCopyToClipboard\") data?: string | ClipboardItem | ClipboardItems | (() => string|ClipboardItem|ClipboardItems);\r\n\r\n /** Emits when some text is copied to the clipboard. The emitted value indicates whether copying was successful. */\r\n @Output() cuteCopyToClipboardCopied = new EventEmitter<boolean>();\r\n\r\n constructor() {}\r\n\r\n @HostListener('click')\r\n onClick() {\r\n if (this.data) {\r\n if (window.isSecureContext) {\r\n try {\r\n let dataToWrite;\r\n if (this.data instanceof Function) {\r\n dataToWrite = this.data()\r\n } else {\r\n dataToWrite = this.data;\r\n }\r\n if (typeof dataToWrite === \"string\") {\r\n navigator.clipboard\r\n .writeText(dataToWrite)\r\n .then(() => this.cuteCopyToClipboardCopied.next(true))\r\n .catch(() => {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n });\r\n } else {\r\n let items: ClipboardItems;\r\n if (dataToWrite instanceof ClipboardItem) {\r\n items = [dataToWrite];\r\n } else {\r\n items = dataToWrite;\r\n }\r\n navigator.clipboard\r\n .write(items)\r\n .then(() => this.cuteCopyToClipboardCopied.next(true))\r\n .catch(() => {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n });\r\n }\r\n } catch (err: any) {\r\n console.error(err.message);\r\n }\r\n } else {\r\n console.error(\"The Clipboard API is available only in secure contexts (HTTPS)\");\r\n this.cuteCopyToClipboardCopied.next(false);\r\n }\r\n } else {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n }\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {Directive, Input, ElementRef, Renderer2, OnChanges, SimpleChanges, inject} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cuteTimeAgo]',\r\n standalone: true,\r\n})\r\nexport class CuteTimeAgo implements OnChanges {\r\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private renderer = inject(Renderer2);\r\n\r\n @Input() cuteTimeAgo?: Date;\r\n\r\n constructor() {}\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes[\"cuteTimeAgo\"]) {\r\n this.updateTimeAgo();\r\n }\r\n }\r\n\r\n private updateTimeAgo(): void {\r\n if (this.cuteTimeAgo instanceof Date) {\r\n const timeDifference = Date.now() - this.cuteTimeAgo.getTime();\r\n const secondsAgo = Math.floor(timeDifference / 1000);\r\n\r\n let text: string;\r\n\r\n if (secondsAgo < 60) {\r\n text = 'just now';\r\n } else if (secondsAgo < 3600) {\r\n const minutes = Math.floor(secondsAgo / 60);\r\n text = `${minutes} minute${minutes > 1 ? 's' : ''} ago`;\r\n } else if (secondsAgo < 86400) {\r\n const hours = Math.floor(secondsAgo / 3600);\r\n text = `${hours} hour${hours > 1 ? 's' : ''} ago`;\r\n } else {\r\n const days = Math.floor(secondsAgo / 86400);\r\n text = `${days} day${days > 1 ? 's' : ''} ago`;\r\n }\r\n\r\n this.renderer.setProperty(this.el.nativeElement, 'textContent', text);\r\n }\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, ElementRef, inject, Input, OnInit, SecurityContext} from \"@angular/core\";\r\nimport {DomSanitizer} from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Appends `<use href=[symbolPath]>` as a child element of the SVG.\r\n * @example\r\n * ```html\r\n * <svg width=\"1em\" height=\"1em\" [cuteSvgSymbol]=\"BOOTSTRAP_ICONS+'#collection'\"></svg>\r\n * ```\r\n */\r\n@Directive({\r\n selector: 'svg[cuteSvgSymbol]',\r\n host: {\r\n '[attr.cuteSvgSymbol]': 'null',\r\n 'ngSkipHydration': 'true',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteSvgSymbol implements OnInit {\r\n private _elementRef = inject<ElementRef<SVGElement>>(ElementRef);\r\n private _sanitizer = inject(DomSanitizer);\r\n\r\n /** Path to SVG **symbol** element including its `id` prefixed with **#**. */\r\n @Input({alias: \"cuteSvgSymbol\", required: true}) svgSymbol: string|null = null ;\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit() {\r\n const url = this._sanitizer.sanitize(SecurityContext.URL, this.svgSymbol);\r\n if (url) {\r\n this._elementRef.nativeElement.innerHTML = `<use href=\"${url}\"></use>`;\r\n }\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {booleanAttribute, Directive, HostAttributeToken, inject, Input} from \"@angular/core\";\r\n\r\n/**\r\n * The icon link helper directive modifies the default link styles to enhance their appearance and\r\n * quickly align any pairing of icon and text.\r\n */\r\n@Directive({\r\n selector: 'a[cuteIconLink]',\r\n exportAs: 'cuteIconLink',\r\n host: {\r\n 'class': 'icon-link',\r\n '[class.icon-link-hover]': 'hovered',\r\n //'[style.cursor]': 'noHRef ? \"pointer\" : undefined',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteIconLink /* extends ... */ {\r\n\r\n protected noHRef: boolean = false;\r\n\r\n /** Whether to move the icon to the right on hover. */\r\n @Input({transform: booleanAttribute})\r\n hovered: boolean = false;\r\n\r\n constructor() {\r\n const href = inject(new HostAttributeToken(\"href\"), {optional: true});\r\n this.noHRef = !href;\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cuteFocusInitial]',\r\n standalone: true,\r\n host: {\r\n '[attr.cdkFocusInitial]': 'true',\r\n }\r\n})\r\nexport class CuteFocusInitial {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAOG;AAGH;;AAEG;MAKU,sBAAsB,CAAA;AAEjC,IAAA,aAAa,CAAC,KAAY,EAAA;QACxB,KAAK,CAAC,cAAc,EAAE;IACxB;+GAJW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,aAAA,EAAA,uBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBAEE,YAAY;uBAAC,aAAa,EAAE,CAAC,QAAQ,CAAC;;;AClBzC;;;;;;;AAOG;AAGH;;;;;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