@cute-widgets/base 20.0.1

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 (183) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE.md +191 -0
  3. package/README.md +190 -0
  4. package/abstract/index.d.ts +327 -0
  5. package/alert/index.d.ts +68 -0
  6. package/autocomplete/index.d.ts +442 -0
  7. package/badge/index.d.ts +26 -0
  8. package/bottom-sheet/index.d.ts +231 -0
  9. package/button/index.d.ts +182 -0
  10. package/button-toggle/index.d.ts +225 -0
  11. package/card/index.d.ts +163 -0
  12. package/checkbox/index.d.ts +174 -0
  13. package/chips/index.d.ts +963 -0
  14. package/collapse/index.d.ts +97 -0
  15. package/core/animation/index.d.ts +43 -0
  16. package/core/datetime/index.d.ts +404 -0
  17. package/core/directives/index.d.ts +168 -0
  18. package/core/error/index.d.ts +74 -0
  19. package/core/index.d.ts +1039 -0
  20. package/core/interfaces/index.d.ts +114 -0
  21. package/core/layout/index.d.ts +53 -0
  22. package/core/line/index.d.ts +37 -0
  23. package/core/nav/index.d.ts +321 -0
  24. package/core/observers/index.d.ts +124 -0
  25. package/core/option/index.d.ts +185 -0
  26. package/core/pipes/index.d.ts +53 -0
  27. package/core/ripple/index.d.ts +66 -0
  28. package/core/testing/index.d.ts +154 -0
  29. package/core/theming/index.d.ts +118 -0
  30. package/core/types/index.d.ts +53 -0
  31. package/core/utils/index.d.ts +129 -0
  32. package/cute-widgets-base-20.0.1.tgz +0 -0
  33. package/datepicker/index.d.ts +1817 -0
  34. package/dialog/index.d.ts +484 -0
  35. package/divider/index.d.ts +24 -0
  36. package/expansion/README.md +8 -0
  37. package/expansion/index.d.ts +308 -0
  38. package/fesm2022/cute-widgets-base-abstract.mjs +547 -0
  39. package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -0
  40. package/fesm2022/cute-widgets-base-alert.mjs +198 -0
  41. package/fesm2022/cute-widgets-base-alert.mjs.map +1 -0
  42. package/fesm2022/cute-widgets-base-autocomplete.mjs +1217 -0
  43. package/fesm2022/cute-widgets-base-autocomplete.mjs.map +1 -0
  44. package/fesm2022/cute-widgets-base-badge.mjs +75 -0
  45. package/fesm2022/cute-widgets-base-badge.mjs.map +1 -0
  46. package/fesm2022/cute-widgets-base-bottom-sheet.mjs +416 -0
  47. package/fesm2022/cute-widgets-base-bottom-sheet.mjs.map +1 -0
  48. package/fesm2022/cute-widgets-base-button-toggle.mjs +640 -0
  49. package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -0
  50. package/fesm2022/cute-widgets-base-button.mjs +546 -0
  51. package/fesm2022/cute-widgets-base-button.mjs.map +1 -0
  52. package/fesm2022/cute-widgets-base-card.mjs +471 -0
  53. package/fesm2022/cute-widgets-base-card.mjs.map +1 -0
  54. package/fesm2022/cute-widgets-base-checkbox.mjs +390 -0
  55. package/fesm2022/cute-widgets-base-checkbox.mjs.map +1 -0
  56. package/fesm2022/cute-widgets-base-chips.mjs +2360 -0
  57. package/fesm2022/cute-widgets-base-chips.mjs.map +1 -0
  58. package/fesm2022/cute-widgets-base-collapse.mjs +259 -0
  59. package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -0
  60. package/fesm2022/cute-widgets-base-core-animation.mjs +53 -0
  61. package/fesm2022/cute-widgets-base-core-animation.mjs.map +1 -0
  62. package/fesm2022/cute-widgets-base-core-datetime.mjs +568 -0
  63. package/fesm2022/cute-widgets-base-core-datetime.mjs.map +1 -0
  64. package/fesm2022/cute-widgets-base-core-directives.mjs +404 -0
  65. package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -0
  66. package/fesm2022/cute-widgets-base-core-error.mjs +105 -0
  67. package/fesm2022/cute-widgets-base-core-error.mjs.map +1 -0
  68. package/fesm2022/cute-widgets-base-core-interfaces.mjs +22 -0
  69. package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -0
  70. package/fesm2022/cute-widgets-base-core-layout.mjs +74 -0
  71. package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -0
  72. package/fesm2022/cute-widgets-base-core-line.mjs +87 -0
  73. package/fesm2022/cute-widgets-base-core-line.mjs.map +1 -0
  74. package/fesm2022/cute-widgets-base-core-nav.mjs +863 -0
  75. package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -0
  76. package/fesm2022/cute-widgets-base-core-observers.mjs +304 -0
  77. package/fesm2022/cute-widgets-base-core-observers.mjs.map +1 -0
  78. package/fesm2022/cute-widgets-base-core-option.mjs +373 -0
  79. package/fesm2022/cute-widgets-base-core-option.mjs.map +1 -0
  80. package/fesm2022/cute-widgets-base-core-pipes.mjs +97 -0
  81. package/fesm2022/cute-widgets-base-core-pipes.mjs.map +1 -0
  82. package/fesm2022/cute-widgets-base-core-ripple.mjs +172 -0
  83. package/fesm2022/cute-widgets-base-core-ripple.mjs.map +1 -0
  84. package/fesm2022/cute-widgets-base-core-testing.mjs +210 -0
  85. package/fesm2022/cute-widgets-base-core-testing.mjs.map +1 -0
  86. package/fesm2022/cute-widgets-base-core-theming.mjs +314 -0
  87. package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -0
  88. package/fesm2022/cute-widgets-base-core-types.mjs +22 -0
  89. package/fesm2022/cute-widgets-base-core-types.mjs.map +1 -0
  90. package/fesm2022/cute-widgets-base-core-utils.mjs +257 -0
  91. package/fesm2022/cute-widgets-base-core-utils.mjs.map +1 -0
  92. package/fesm2022/cute-widgets-base-core.mjs +1600 -0
  93. package/fesm2022/cute-widgets-base-core.mjs.map +1 -0
  94. package/fesm2022/cute-widgets-base-datepicker.mjs +4827 -0
  95. package/fesm2022/cute-widgets-base-datepicker.mjs.map +1 -0
  96. package/fesm2022/cute-widgets-base-dialog.mjs +1046 -0
  97. package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -0
  98. package/fesm2022/cute-widgets-base-divider.mjs +86 -0
  99. package/fesm2022/cute-widgets-base-divider.mjs.map +1 -0
  100. package/fesm2022/cute-widgets-base-expansion.mjs +623 -0
  101. package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -0
  102. package/fesm2022/cute-widgets-base-form-field.mjs +969 -0
  103. package/fesm2022/cute-widgets-base-form-field.mjs.map +1 -0
  104. package/fesm2022/cute-widgets-base-grid-list.mjs +715 -0
  105. package/fesm2022/cute-widgets-base-grid-list.mjs.map +1 -0
  106. package/fesm2022/cute-widgets-base-icon.mjs +1105 -0
  107. package/fesm2022/cute-widgets-base-icon.mjs.map +1 -0
  108. package/fesm2022/cute-widgets-base-input.mjs +726 -0
  109. package/fesm2022/cute-widgets-base-input.mjs.map +1 -0
  110. package/fesm2022/cute-widgets-base-layout-container.mjs +95 -0
  111. package/fesm2022/cute-widgets-base-layout-container.mjs.map +1 -0
  112. package/fesm2022/cute-widgets-base-layout-stack.mjs +166 -0
  113. package/fesm2022/cute-widgets-base-layout-stack.mjs.map +1 -0
  114. package/fesm2022/cute-widgets-base-layout.mjs +250 -0
  115. package/fesm2022/cute-widgets-base-layout.mjs.map +1 -0
  116. package/fesm2022/cute-widgets-base-list.mjs +1557 -0
  117. package/fesm2022/cute-widgets-base-list.mjs.map +1 -0
  118. package/fesm2022/cute-widgets-base-menu.mjs +1283 -0
  119. package/fesm2022/cute-widgets-base-menu.mjs.map +1 -0
  120. package/fesm2022/cute-widgets-base-navbar.mjs +359 -0
  121. package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -0
  122. package/fesm2022/cute-widgets-base-paginator.mjs +485 -0
  123. package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -0
  124. package/fesm2022/cute-widgets-base-progress.mjs +321 -0
  125. package/fesm2022/cute-widgets-base-progress.mjs.map +1 -0
  126. package/fesm2022/cute-widgets-base-radio.mjs +637 -0
  127. package/fesm2022/cute-widgets-base-radio.mjs.map +1 -0
  128. package/fesm2022/cute-widgets-base-select.mjs +1208 -0
  129. package/fesm2022/cute-widgets-base-select.mjs.map +1 -0
  130. package/fesm2022/cute-widgets-base-sidenav.mjs +1095 -0
  131. package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -0
  132. package/fesm2022/cute-widgets-base-slider.mjs +99 -0
  133. package/fesm2022/cute-widgets-base-slider.mjs.map +1 -0
  134. package/fesm2022/cute-widgets-base-snack-bar.mjs +897 -0
  135. package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -0
  136. package/fesm2022/cute-widgets-base-sort.mjs +639 -0
  137. package/fesm2022/cute-widgets-base-sort.mjs.map +1 -0
  138. package/fesm2022/cute-widgets-base-spinner.mjs +154 -0
  139. package/fesm2022/cute-widgets-base-spinner.mjs.map +1 -0
  140. package/fesm2022/cute-widgets-base-stepper.mjs +673 -0
  141. package/fesm2022/cute-widgets-base-stepper.mjs.map +1 -0
  142. package/fesm2022/cute-widgets-base-table.mjs +1023 -0
  143. package/fesm2022/cute-widgets-base-table.mjs.map +1 -0
  144. package/fesm2022/cute-widgets-base-tabs.mjs +729 -0
  145. package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -0
  146. package/fesm2022/cute-widgets-base-timepicker.mjs +965 -0
  147. package/fesm2022/cute-widgets-base-timepicker.mjs.map +1 -0
  148. package/fesm2022/cute-widgets-base-toolbar.mjs +120 -0
  149. package/fesm2022/cute-widgets-base-toolbar.mjs.map +1 -0
  150. package/fesm2022/cute-widgets-base-tooltip.mjs +947 -0
  151. package/fesm2022/cute-widgets-base-tooltip.mjs.map +1 -0
  152. package/fesm2022/cute-widgets-base-tree.mjs +598 -0
  153. package/fesm2022/cute-widgets-base-tree.mjs.map +1 -0
  154. package/fesm2022/cute-widgets-base.mjs +68 -0
  155. package/fesm2022/cute-widgets-base.mjs.map +1 -0
  156. package/form-field/index.d.ts +401 -0
  157. package/grid-list/index.d.ts +361 -0
  158. package/icon/index.d.ts +477 -0
  159. package/index.d.ts +3 -0
  160. package/input/index.d.ts +256 -0
  161. package/layout/container/index.d.ts +31 -0
  162. package/layout/index.d.ts +78 -0
  163. package/layout/stack/index.d.ts +52 -0
  164. package/list/index.d.ts +659 -0
  165. package/menu/index.d.ts +497 -0
  166. package/navbar/index.d.ts +91 -0
  167. package/package.json +279 -0
  168. package/paginator/index.d.ts +216 -0
  169. package/progress/index.d.ts +130 -0
  170. package/radio/index.d.ts +259 -0
  171. package/select/index.d.ts +426 -0
  172. package/sidenav/index.d.ts +369 -0
  173. package/slider/index.d.ts +48 -0
  174. package/snack-bar/index.d.ts +374 -0
  175. package/sort/index.d.ts +334 -0
  176. package/spinner/index.d.ts +70 -0
  177. package/stepper/index.d.ts +295 -0
  178. package/table/index.d.ts +395 -0
  179. package/tabs/index.d.ts +307 -0
  180. package/timepicker/index.d.ts +350 -0
  181. package/toolbar/index.d.ts +36 -0
  182. package/tooltip/index.d.ts +299 -0
  183. package/tree/index.d.ts +314 -0
@@ -0,0 +1,307 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, TemplateRef, SimpleChanges, ComponentRef, DestroyRef, QueryList, ViewContainerRef, ElementRef, EventEmitter } from '@angular/core';
3
+ import * as _cute_widgets_base_tabs from '@cute-widgets/base/tabs';
4
+ import { CuteFocusableControl, CuteLayoutControl } from '@cute-widgets/base/abstract';
5
+ import { Subject } from 'rxjs';
6
+ import { CuteNavLink, CuteNavStretch, CuteNavChangeEvent, CuteNavChangingEvent } from '@cute-widgets/base/core/nav';
7
+ import * as _angular_animations from '@angular/animations';
8
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
9
+ import { FocusOrigin } from '@angular/cdk/a11y';
10
+ import { ContentAlignment, ViewportEdge } from '@cute-widgets/base/core';
11
+ import * as i1 from '@angular/common';
12
+
13
+ /**
14
+ * Used to provide a tab label to a tab without causing a circular dependency.
15
+ * @docs-private
16
+ */
17
+ declare const CUTE_TAB: InjectionToken<CuteTab>;
18
+ declare class CuteTab extends CuteFocusableControl {
19
+ protected _tabGroup: _cute_widgets_base_tabs.CuteTabGroup | null;
20
+ private _intersectionRatio;
21
+ /** Plain text label for the tab, used when there is no template label. */
22
+ textLabel: string;
23
+ /** Explicit reference to the external content template. */
24
+ contentTemplate: TemplateRef<any> | undefined;
25
+ /** Lazy loading label's outlet context */
26
+ labelContext: any;
27
+ /** Lazy loading content's outlet context */
28
+ contentContext: any;
29
+ /** Whether the tab is closable. */
30
+ closable: boolean;
31
+ /** Whether the tab preserves lazing content */
32
+ preserveContent: boolean | undefined;
33
+ /** Content for the tab label given by `<ng-template cute-tab-label>`. */
34
+ readonly _templateLabel: TemplateRef<any> | undefined;
35
+ /**
36
+ * Template provided in the tab content by <ng-template cute-tab-content>, used to enable lazy-loading
37
+ */
38
+ private _explicitContent;
39
+ /** Reference to `<cute-nav-link>` element. */
40
+ readonly link: CuteNavLink | undefined;
41
+ /** Whether the tab is currently active. */
42
+ get active(): boolean;
43
+ set active(value: boolean);
44
+ private _active;
45
+ /** Whether the tab is intersected the containing box and needs to scroll to display its full size */
46
+ get scrollNeeded(): boolean;
47
+ /** Whether the tab was added dynamically */
48
+ isDynamic: boolean;
49
+ protected isPreserveContent(): boolean;
50
+ /** Tab content defined by <ng-template cute-tab-content> or directly referenced where the latter has more priority. */
51
+ protected get explicitContent(): TemplateRef<any> | undefined;
52
+ /** Emits whenever the internal state of the tab changes. */
53
+ readonly _stateChanges: Subject<void>;
54
+ /** Whether the tab content was loaded */
55
+ loaded: i0.WritableSignal<boolean>;
56
+ /** Template inside the CuteTab view that contains an `<ng-content>`. */
57
+ constructor();
58
+ protected generateId(): string;
59
+ /** Gets the content template's context object */
60
+ getContentContext(): any;
61
+ /**
62
+ * Removes this tab from the tab group.
63
+ */
64
+ remove(): Promise<void>;
65
+ _visibilityChanged(entries: IntersectionObserverEntry[]): void;
66
+ ngOnInit(): void;
67
+ ngOnChanges(changes: SimpleChanges): void;
68
+ ngOnDestroy(): void;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteTab, never>;
70
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteTab, "cute-tab", never, { "textLabel": { "alias": "label"; "required": false; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; }; "labelContext": { "alias": "labelContext"; "required": false; }; "contentContext": { "alias": "contentContext"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "preserveContent": { "alias": "preserveContent"; "required": false; }; }, {}, ["_templateLabel", "_explicitContent", "link"], ["*"], true, never>;
71
+ static ngAcceptInputType_closable: unknown;
72
+ static ngAcceptInputType_preserveContent: unknown;
73
+ }
74
+
75
+ declare const transitionAnimation: _angular_animations.AnimationReferenceMetadata;
76
+ /**
77
+ * Used to provide a tab group to a tab without causing a circular dependency.
78
+ */
79
+ declare const CUTE_TAB_GROUP: InjectionToken<CuteTabGroup>;
80
+ /** Cancelable event emitted when the `cute-tab` selection is about to change. */
81
+ declare class CuteTabChangingEvent extends Event {
82
+ /** Index of the currently-selected tab. */
83
+ readonly index: number;
84
+ /** Reference to the currently-selected tab. */
85
+ readonly tab: CuteTab;
86
+ /** Index of the previously-selected tab. */
87
+ readonly fromIndex: number | null;
88
+ /** Reference to the previously-selected tab. */
89
+ readonly fromTab: CuteTab | null;
90
+ /** How the tab was focused. */
91
+ readonly origin: FocusOrigin;
92
+ constructor(
93
+ /** Index of the currently-selected tab. */
94
+ index: number,
95
+ /** Reference to the currently-selected tab. */
96
+ tab: CuteTab,
97
+ /** Index of the previously-selected tab. */
98
+ fromIndex: number | null,
99
+ /** Reference to the previously-selected tab. */
100
+ fromTab: CuteTab | null,
101
+ /** How the tab was focused. */
102
+ origin: FocusOrigin);
103
+ }
104
+ /** A simple change event emitted on focus or selection changes. */
105
+ declare class CuteTabChangeEvent extends Event {
106
+ /** Index of the currently-selected tab. */
107
+ readonly index: number;
108
+ /** Reference to the currently-selected tab. */
109
+ readonly tab: CuteTab;
110
+ /** Index of the previously-selected tab. */
111
+ readonly fromIndex: number | null;
112
+ /** Reference to the previously-selected tab. */
113
+ readonly fromTab: CuteTab | null;
114
+ /** How the tab was focused. */
115
+ readonly origin: FocusOrigin;
116
+ constructor(
117
+ /** Index of the currently-selected tab. */
118
+ index: number,
119
+ /** Reference to the currently-selected tab. */
120
+ tab: CuteTab,
121
+ /** Index of the previously-selected tab. */
122
+ fromIndex: number | null,
123
+ /** Reference to the previously-selected tab. */
124
+ fromTab: CuteTab | null,
125
+ /** How the tab was focused. */
126
+ origin: FocusOrigin);
127
+ }
128
+ /**
129
+ * A flexible, feature-rich tab component for Angular applications with Bootstrap integration.
130
+ */
131
+ declare class CuteTabGroup extends CuteLayoutControl {
132
+ private _indexToChange;
133
+ private _scrollDebounce;
134
+ private _resizeObserver;
135
+ protected showScrollButtons: boolean;
136
+ protected canScrollLeft: boolean;
137
+ protected canScrollRight: boolean;
138
+ /** Number of pixels to scroll left or right */
139
+ protected scrollAmount: number;
140
+ protected dynamicTabs: ComponentRef<CuteTab>[];
141
+ protected destroyRef: DestroyRef;
142
+ protected tabs: QueryList<CuteTab> | undefined;
143
+ protected tabLinks: QueryList<CuteNavLink> | undefined;
144
+ protected dynamicTabsContainer: ViewContainerRef | undefined;
145
+ headerContainer: ElementRef<HTMLElement>;
146
+ headerScroll: ElementRef<HTMLElement>;
147
+ /** The index of the active tab. */
148
+ get selectedIndex(): number | undefined;
149
+ set selectedIndex(value: number);
150
+ private _selectedIndex;
151
+ /**
152
+ * Alignment for tabs.
153
+ * @default start
154
+ */
155
+ alignTabs: ContentAlignment;
156
+ /**
157
+ * The style a `cute-tab`’s content extends the full available width, proportionately (**fill**) or equal-width (**justified**).
158
+ * The width is determined by the longest `cute-tab-label`'s content. By default, stretching of items is not used (**none**).
159
+ */
160
+ get stretchTabs(): CuteNavStretch;
161
+ set stretchTabs(value: CuteNavStretch | boolean | "false" | "true" | undefined);
162
+ private _stretchTabs;
163
+ /**
164
+ * By default, tabs remove their lazy content from the DOM while it's off-screen. Setting this to _true_ will keep it in the DOM,
165
+ * which will prevent elements like `iframe` and `video` from reloading next time it comes back into the view.
166
+ */
167
+ preserveContent: boolean | undefined;
168
+ /** Whether the tab group will change its height to the height of the currently active tab. */
169
+ dynamicHeight: boolean;
170
+ /**
171
+ * Possible positions for the tab header.
172
+ * @default top
173
+ */
174
+ headerPosition: ViewportEdge;
175
+ /** Use `underline` style for horizontal tabs. */
176
+ underlineTabs: boolean;
177
+ /**
178
+ * Whether tabs can be draggable.
179
+ * @default false
180
+ */
181
+ dragEnabled: boolean;
182
+ /**
183
+ * Defines the horizontal alignment when scrolling the tabs.
184
+ * @default center
185
+ */
186
+ tabScrollingAlignment: ScrollLogicalPosition;
187
+ /** Output to enable support for two-way binding on `[(selectedIndex)]` */
188
+ selectedIndexChange: EventEmitter<number>;
189
+ /** Event emitted when the active tab selection is about to change. */
190
+ selectedTabChanging: EventEmitter<CuteTabChangingEvent>;
191
+ /** Event emitted when the tab selection has changed. */
192
+ selectedTabChange: EventEmitter<CuteTabChangeEvent>;
193
+ /** Event emitted when focus has changed within a tab group. */
194
+ focusChange: EventEmitter<CuteTabChangeEvent>;
195
+ /** Event emitted after the new tab was added. */
196
+ tabAdded: EventEmitter<void>;
197
+ /** Event emitted after the closable tab was removed. */
198
+ tabRemoved: EventEmitter<number>;
199
+ constructor();
200
+ /** Whether the tab group currently has a horizontal layout */
201
+ get isHorizontal(): boolean;
202
+ /** The active tab. */
203
+ get selectedTab(): CuteTab | undefined;
204
+ /** The number of tabs in the tab group. */
205
+ get tabCount(): number;
206
+ /**
207
+ * Returns the first element in the array of tabs that satisfies the provided testing function.
208
+ * Otherwise, _undefined_ is returned.
209
+ * @param predicate Testing function
210
+ * @returns `CuteTab` object or _undefined_ if there are no tabs with the specified condition.
211
+ */
212
+ findTab(predicate: (tab: CuteTab, index: number) => boolean): CuteTab | undefined;
213
+ protected generateId(): string;
214
+ private checkScrollButtons;
215
+ private setupScrollListener;
216
+ protected scrollHeader(direction: number): void;
217
+ /**
218
+ * Activates tab with specified index.
219
+ * @param index Tab index
220
+ * @param origin (optional) Focus origin
221
+ */
222
+ selectTab(index: number, origin?: FocusOrigin): void;
223
+ private _createChangeEvent;
224
+ private _createChangingEvent;
225
+ protected onNavFocusChange(event: CuteNavChangeEvent): void;
226
+ protected onNavLinkChange(event: CuteNavChangeEvent): void;
227
+ protected onNavLinkChanging(event: CuteNavChangingEvent): void;
228
+ protected getLabelContext(tab: CuteTab, index: number): any;
229
+ /** Gets the current index of the specified tab object. */
230
+ getTabIndex(tab: CuteTab): number | undefined;
231
+ private scrollToTab;
232
+ /** Drop event */
233
+ protected onDrop(event: CdkDragDrop<CuteTab[]>): void;
234
+ /** Sets a new active index after the dragging tabs */
235
+ private _adjustActiveIndex;
236
+ /**
237
+ * Adds a new tab to the end of `tab-group` dynamically.
238
+ *
239
+ * @param label Tab label
240
+ * @param content Tab template reference
241
+ * @param context (optional) Template context object
242
+ * @param closable (optional) Whether the tab is closable. Default is _true_.
243
+ * @returns `ComponentRef` object of the new Tab.
244
+ */
245
+ addTab(label: string, content: TemplateRef<any>, context?: any, closable?: boolean): Promise<ComponentRef<CuteTab>>;
246
+ /**
247
+ * Removes the tab with specified index.
248
+ * @param index Tab index
249
+ */
250
+ removeTab(index: number): Promise<void>;
251
+ ngAfterViewInit(): void;
252
+ ngAfterContentInit(): void;
253
+ ngOnDestroy(): void;
254
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteTabGroup, never>;
255
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteTabGroup, "cute-tab-group", ["cuteTabGroup"], { "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "alignTabs": { "alias": "cute-align-tabs"; "required": false; }; "stretchTabs": { "alias": "cute-stretch-tabs"; "required": false; }; "preserveContent": { "alias": "preserveContent"; "required": false; }; "dynamicHeight": { "alias": "dynamicHeight"; "required": false; }; "headerPosition": { "alias": "headerPosition"; "required": false; }; "underlineTabs": { "alias": "underlineTabs"; "required": false; }; "dragEnabled": { "alias": "dragEnabled"; "required": false; }; "tabScrollingAlignment": { "alias": "tabScrollingAlignment"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; "selectedTabChanging": "selectedTabChanging"; "selectedTabChange": "selectedTabChange"; "focusChange": "focusChange"; "tabAdded": "tabAdded"; "tabRemoved": "tabRemoved"; }, ["tabs"], ["*"], true, never>;
256
+ static ngAcceptInputType_selectedIndex: unknown;
257
+ static ngAcceptInputType_preserveContent: unknown;
258
+ static ngAcceptInputType_dynamicHeight: unknown;
259
+ static ngAcceptInputType_underlineTabs: unknown;
260
+ static ngAcceptInputType_dragEnabled: unknown;
261
+ }
262
+
263
+ /**
264
+ * @license Apache-2.0
265
+ *
266
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
267
+ *
268
+ * You may not use this file except in compliance with the License
269
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
270
+ *
271
+ * This code is a modification of the `@angular/material` original
272
+ * code licensed under MIT-style License (https://angular.dev/license).
273
+ */
274
+
275
+ /**
276
+ * Injection token that can be used to reference instances of `CuteTabContent`. It serves as
277
+ * alternative token to the actual `CuteTabContent` class which could cause unnecessary
278
+ * retention of the class and its directive metadata.
279
+ */
280
+ declare const CUTE_TAB_CONTENT: InjectionToken<CuteTabContent>;
281
+ /** Decorates the `ng-template` tags and reads out the template from it. */
282
+ declare class CuteTabContent {
283
+ template: TemplateRef<any>;
284
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteTabContent, never>;
285
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteTabContent, "ng-template[cute-tab-content], ng-template[cuteTabContent]", never, {}, {}, never, never, true, never>;
286
+ }
287
+
288
+ /**
289
+ * Injection token that can be used to reference instances of `CuteTabLabel`. It serves as
290
+ * alternative token to the actual `CuteTabLabel` class which could cause unnecessary
291
+ * retention of the class and its directive metadata.
292
+ */
293
+ declare const CUTE_TAB_LABEL: InjectionToken<CuteTabLabel>;
294
+ /** Used to flag tab labels for use with the portal directive */
295
+ declare class CuteTabLabel {
296
+ _closestTab: _cute_widgets_base_tabs.CuteTab | null;
297
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteTabLabel, never>;
298
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteTabLabel, "ng-template[cute-tab-label], ng-template[cuteTabLabel]", ["cuteTabLabel"], {}, {}, never, never, true, never>;
299
+ }
300
+
301
+ declare class CuteTabsModule {
302
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteTabsModule, never>;
303
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CuteTabsModule, never, [typeof i1.CommonModule, typeof CuteTab, typeof CuteTabGroup, typeof CuteTabLabel, typeof CuteTabContent], [typeof CuteTab, typeof CuteTabGroup, typeof CuteTabLabel, typeof CuteTabContent]>;
304
+ static ɵinj: i0.ɵɵInjectorDeclaration<CuteTabsModule>;
305
+ }
306
+
307
+ export { CUTE_TAB, CUTE_TAB_CONTENT, CUTE_TAB_GROUP, CUTE_TAB_LABEL, CuteTab, CuteTabChangeEvent, CuteTabChangingEvent, CuteTabContent, CuteTabGroup, CuteTabLabel, CuteTabsModule, transitionAnimation };
@@ -0,0 +1,350 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, OnDestroy, Signal, TemplateRef, InputSignalWithTransform, InputSignal, OutputEmitterRef, ElementRef, ModelSignal } from '@angular/core';
3
+ import { CuteOptionParentComponent, CuteOption } from '@cute-widgets/base/core/option';
4
+ import { ScrollStrategy } from '@angular/cdk/overlay';
5
+ import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
6
+ import * as i4 from '@angular/cdk/scrolling';
7
+
8
+ /**
9
+ * @license Apache-2.0
10
+ *
11
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
12
+ *
13
+ * You may not use this file except in compliance with the License
14
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * This code is a modification of the `@angular/material` original
17
+ * code licensed under MIT-style License (https://angular.dev/license).
18
+ */
19
+
20
+ /**
21
+ * Object that can be used to configure the default options for the timepicker component.
22
+ */
23
+ interface CuteTimepickerConfig {
24
+ /** Default interval for all time pickers. */
25
+ interval?: string | number;
26
+ /** Whether ripples inside the timepicker should be disabled by default. */
27
+ disableRipple?: boolean;
28
+ }
29
+ /**
30
+ * Injection token that can be used to configure the default options for the timepicker component.
31
+ */
32
+ declare const CUTE_TIMEPICKER_CONFIG: InjectionToken<CuteTimepickerConfig>;
33
+ /**
34
+ * Time selection option that can be displayed within a `cute-timepicker`.
35
+ */
36
+ interface CuteTimepickerOption<D = unknown> {
37
+ /** Date value of the option. */
38
+ value: D;
39
+ /** Label to show to the user. */
40
+ label: string;
41
+ }
42
+
43
+ /**
44
+ * @license Apache-2.0
45
+ *
46
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
47
+ *
48
+ * You may not use this file except in compliance with the License
49
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
50
+ *
51
+ * This code is a modification of the `@angular/material` original
52
+ * code licensed under MIT-style License (https://angular.dev/license).
53
+ */
54
+
55
+ /** Event emitted when a value is selected in the timepicker. */
56
+ interface CuteTimepickerSelected<D> {
57
+ value: D;
58
+ source: CuteTimepicker<D>;
59
+ }
60
+ /** Injection token used to configure the behavior of the timepicker dropdown while scrolling. */
61
+ declare const CUTE_TIMEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
62
+ /** Represents an input that is connected to a `cute-timepicker`. */
63
+ interface CuteTimepickerConnectedInput<D> {
64
+ /** Current value of the input. */
65
+ value: Signal<D | null>;
66
+ /** Minimum allowed time. */
67
+ min: Signal<D | null>;
68
+ /** Maximum allowed time. */
69
+ max: Signal<D | null>;
70
+ /** Whether the input is disabled. */
71
+ disabled: Signal<boolean>;
72
+ /** Focuses the input. */
73
+ focus(): void;
74
+ /** Gets the element to which to connect the timepicker overlay. */
75
+ getOverlayOrigin(): ElementRef<HTMLElement>;
76
+ /** Gets the ID of the input's label. */
77
+ getLabelId(): string | null;
78
+ /** Callback invoked when the timepicker assigns a value. */
79
+ timepickerValueAssigned(value: D | null): void;
80
+ }
81
+ /**
82
+ * Renders out a listbox that can be used to select a time of day.
83
+ * Intended to be used together with `CuteTimepickerInput`.
84
+ */
85
+ declare class CuteTimepicker<D> implements OnDestroy, CuteOptionParentComponent {
86
+ private _overlay;
87
+ private _dir;
88
+ private _viewContainerRef;
89
+ private _injector;
90
+ private _defaultConfig;
91
+ private _dateAdapter;
92
+ private _dateFormats;
93
+ private _scrollStrategyFactory;
94
+ protected _animationsDisabled: boolean;
95
+ private _isOpen;
96
+ private _activeDescendant;
97
+ private _input;
98
+ private _overlayRef;
99
+ private _portal;
100
+ private _optionsCacheKey;
101
+ private _localeChanges;
102
+ private _onOpenRender;
103
+ protected _panelTemplate: Signal<TemplateRef<unknown>>;
104
+ protected _timeOptions: readonly CuteTimepickerOption<D>[];
105
+ protected _options: Signal<readonly CuteOption<any>[]>;
106
+ private _keyManager;
107
+ /**
108
+ * Interval between each option in the timepicker. The value can either be an amount of
109
+ * seconds (e.g. 90) or a number with a unit (e.g. 45m). Supported units are `s` for seconds,
110
+ * `m` for minutes or `h` for hours.
111
+ */
112
+ readonly interval: InputSignalWithTransform<number | null, number | string | null>;
113
+ /**
114
+ * Array of pre-defined options that the user can select from, as an alternative to using the
115
+ * `interval` input. An error will be thrown if both `options` and `interval` are specified.
116
+ */
117
+ readonly options: InputSignal<readonly CuteTimepickerOption<D>[] | null>;
118
+ /** Whether the timepicker is open. */
119
+ readonly isOpen: Signal<boolean>;
120
+ /** Emits when the user selects a time. */
121
+ readonly selected: OutputEmitterRef<CuteTimepickerSelected<D>>;
122
+ /** Emits when the timepicker is opened. */
123
+ readonly opened: OutputEmitterRef<void>;
124
+ /** Emits when the timepicker is closed. */
125
+ readonly closed: OutputEmitterRef<void>;
126
+ /** ID of the active descendant option. */
127
+ readonly activeDescendant: Signal<string | null>;
128
+ /** Unique ID of the timepicker's panel */
129
+ readonly panelId: string;
130
+ /** Whether ripples within the timepicker should be disabled. */
131
+ readonly disableRipple: InputSignalWithTransform<boolean, unknown>;
132
+ /** ARIA label for the timepicker panel. */
133
+ readonly ariaLabel: InputSignal<string | null>;
134
+ /** ID of the label element for the timepicker panel. */
135
+ readonly ariaLabelledby: InputSignal<string | null>;
136
+ /** Whether the timepicker is currently disabled. */
137
+ readonly disabled: Signal<boolean>;
138
+ constructor();
139
+ /** Opens the timepicker. */
140
+ open(): void;
141
+ /** Closes the timepicker. */
142
+ close(): void;
143
+ /** Registers an input with the timepicker. */
144
+ registerInput(input: CuteTimepickerConnectedInput<D>): void;
145
+ ngOnDestroy(): void;
146
+ _getOverlayHost(): HTMLElement | undefined;
147
+ /** Selects a specific time value. */
148
+ protected _selectValue(option: CuteOption<D>): void;
149
+ /** Gets the value of the `aria-labelledby` attribute. */
150
+ protected _getAriaLabelledby(): string | null;
151
+ /** Handles animation events coming from the panel. */
152
+ protected _handleAnimationEnd(event: AnimationEvent): void;
153
+ /** Creates an overlay reference for the timepicker panel. */
154
+ private _getOverlayRef;
155
+ /** Generates the list of options from which the user can select. */
156
+ private _generateOptions;
157
+ /**
158
+ * Synchronizes the internal state of the component based on a specific selected date.
159
+ * @param value Currently selected date.
160
+ * @param options Options rendered out in the timepicker.
161
+ * @param fallback Option to set as active if no option is selected.
162
+ */
163
+ private _syncSelectedState;
164
+ /** Handles keyboard events while the overlay is open. */
165
+ private _handleKeydown;
166
+ /** Sets up the logic that updates the timepicker when the locale changes. */
167
+ private _handleLocaleChanges;
168
+ /**
169
+ * Sets up the logic that updates the timepicker when the state of the connected input changes.
170
+ */
171
+ private _handleInputStateChanges;
172
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteTimepicker<any>, never>;
173
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteTimepicker<any>, "cute-timepicker", ["cuteTimepicker"], { "interval": { "alias": "interval"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "disableRipple": { "alias": "disableRipple"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
174
+ }
175
+
176
+ /**
177
+ * @license Apache-2.0
178
+ *
179
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
180
+ *
181
+ * You may not use this file except in compliance with the License
182
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
183
+ *
184
+ * This code is a modification of the `@angular/material` original
185
+ * code licensed under MIT-style License (https://angular.dev/license).
186
+ */
187
+
188
+ /**
189
+ * Input that can be used to enter time and connect to a `cute-timepicker`.
190
+ */
191
+ declare class CuteTimepickerInput<D> implements CuteTimepickerConnectedInput<D>, ControlValueAccessor, Validator, OnDestroy {
192
+ private _elementRef;
193
+ private _dateAdapter;
194
+ private _dateFormats;
195
+ private _formField;
196
+ private _onChange;
197
+ private _onTouched;
198
+ private _validatorOnChange;
199
+ private _cleanupClick;
200
+ private _accessorDisabled;
201
+ private _localeSubscription;
202
+ private _timepickerSubscription;
203
+ private _validator;
204
+ private _lastValueValid;
205
+ private _minValid;
206
+ private _maxValid;
207
+ private _lastValidDate;
208
+ /** Value of the `aria-activedescendant` attribute. */
209
+ protected readonly _ariaActiveDescendant: Signal<string | null>;
210
+ /** Value of the `aria-expanded` attribute. */
211
+ protected readonly _ariaExpanded: Signal<string>;
212
+ /** Value of the `aria-controls` attribute. */
213
+ protected readonly _ariaControls: Signal<string | null>;
214
+ /** Current value of the input. */
215
+ readonly value: ModelSignal<D | null>;
216
+ /** Timepicker that the input is associated with. */
217
+ readonly timepicker: InputSignal<CuteTimepicker<D>>;
218
+ /**
219
+ * Minimum time that can be selected or typed in. Can be either
220
+ * a date object (only time will be used) or a valid time string.
221
+ */
222
+ readonly min: InputSignalWithTransform<D | null, unknown>;
223
+ /**
224
+ * Maximum time that can be selected or typed in. Can be either
225
+ * a date object (only time will be used) or a valid time string.
226
+ */
227
+ readonly max: InputSignalWithTransform<D | null, unknown>;
228
+ /**
229
+ * Whether to open the timepicker overlay when clicking on the input. Enabled by default.
230
+ * Note that when disabling this option, you'll have to provide your own logic for opening
231
+ * the overlay.
232
+ */
233
+ readonly openOnClick: InputSignalWithTransform<boolean, unknown>;
234
+ /** Whether the input is disabled. */
235
+ readonly disabled: Signal<boolean>;
236
+ /**
237
+ * Whether the input should be disabled through the template.
238
+ * @docs-private
239
+ */
240
+ readonly disabledInput: InputSignalWithTransform<boolean, unknown>;
241
+ constructor();
242
+ /**
243
+ * Implemented as a part of `ControlValueAccessor`.
244
+ * @docs-private
245
+ */
246
+ writeValue(value: any): void;
247
+ /**
248
+ * Implemented as a part of `ControlValueAccessor`.
249
+ * @docs-private
250
+ */
251
+ registerOnChange(fn: (value: any) => void): void;
252
+ /**
253
+ * Implemented as a part of `ControlValueAccessor`.
254
+ * @docs-private
255
+ */
256
+ registerOnTouched(fn: () => void): void;
257
+ /**
258
+ * Implemented as a part of `ControlValueAccessor`.
259
+ * @docs-private
260
+ */
261
+ setDisabledState(isDisabled: boolean): void;
262
+ /**
263
+ * Implemented as a part of `Validator`.
264
+ * @docs-private
265
+ */
266
+ validate(control: AbstractControl): ValidationErrors | null;
267
+ /**
268
+ * Implemented as a part of `Validator`.
269
+ * @docs-private
270
+ */
271
+ registerOnValidatorChange(fn: () => void): void;
272
+ /** Gets the element to which the timepicker popup should be attached. */
273
+ getOverlayOrigin(): ElementRef<HTMLElement>;
274
+ /** Focuses the input. */
275
+ focus(): void;
276
+ ngOnDestroy(): void;
277
+ /** Gets the ID of the input's label. */
278
+ getLabelId(): string | null;
279
+ /** Handles clicks on the input or the containing form field. */
280
+ private _handleClick;
281
+ /** Handles the `input` event. */
282
+ protected _handleInput(event: Event): void;
283
+ /** Handles the `blur` event. */
284
+ protected _handleBlur(): void;
285
+ /** Handles the `keydown` event. */
286
+ protected _handleKeydown(event: KeyboardEvent): void;
287
+ /** Called by the timepicker to sync up the user-selected value. */
288
+ timepickerValueAssigned(value: D | null): void;
289
+ /** Sets up the code that keeps the input state in sync with the forms module. */
290
+ private _updateFormsState;
291
+ /** Sets up the logic that registers the input with the timepicker. */
292
+ private _registerTimepicker;
293
+ /**
294
+ * Assigns a value set by the user to the input's model.
295
+ * @param selection Time selected by the user that should be assigned.
296
+ * @param propagateToAccessor Whether the value should be propagated to the ControlValueAccessor.
297
+ */
298
+ private _assignUserSelection;
299
+ /** Formats the current value and assigns it to the input. */
300
+ private _formatValue;
301
+ /** Checks whether a value is valid. */
302
+ private _isValid;
303
+ /** Transforms an arbitrary value into a value that can be assigned to a date-based input. */
304
+ private _transformDateInput;
305
+ /** Whether the input is currently focused. */
306
+ private _hasFocus;
307
+ /** Gets a function that can be used to validate the input. */
308
+ private _getValidator;
309
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteTimepickerInput<any>, never>;
310
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteTimepickerInput<any>, "input[cuteTimepicker]", ["cuteTimepickerInput"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "timepicker": { "alias": "cuteTimepicker"; "required": true; "isSignal": true; }; "min": { "alias": "cuteTimepickerMin"; "required": false; "isSignal": true; }; "max": { "alias": "cuteTimepickerMax"; "required": false; "isSignal": true; }; "openOnClick": { "alias": "cuteTimepickerOpenOnClick"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
311
+ }
312
+
313
+ /** Button that can be used to open a `cute-timepicker`. */
314
+ declare class CuteTimepickerToggle<D> {
315
+ private _defaultConfig;
316
+ private _defaultTabIndex;
317
+ protected _isDisabled: i0.Signal<boolean>;
318
+ /** Timepicker instance that the button will toggle. */
319
+ readonly timepicker: InputSignal<CuteTimepicker<D>>;
320
+ /** Screen-reader label for the button. */
321
+ readonly ariaLabel: InputSignal<string | undefined>;
322
+ /** Screen-reader labelled by id for the button. */
323
+ readonly ariaLabelledby: InputSignal<string | undefined>;
324
+ /** Default aria-label for the toggle if none is provided. */
325
+ private readonly _defaultAriaLabel;
326
+ /** Whether the toggle button is disabled. */
327
+ readonly disabled: InputSignalWithTransform<boolean, unknown>;
328
+ /** Tabindex for the toggle. */
329
+ readonly tabIndex: InputSignal<number | null>;
330
+ /** Whether ripples on the toggle should be disabled. */
331
+ readonly disableRipple: InputSignalWithTransform<boolean, unknown>;
332
+ /** Opens the connected timepicker. */
333
+ protected _open(event: Event): void;
334
+ /**
335
+ * Checks for ariaLabelledby and if empty uses custom
336
+ * aria-label or defaultAriaLabel if neither is provided.
337
+ */
338
+ getAriaLabel(): string | null;
339
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteTimepickerToggle<any>, never>;
340
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteTimepickerToggle<any>, "cute-timepicker-toggle", ["cuteTimepickerToggle"], { "timepicker": { "alias": "for"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "disableRipple": { "alias": "disableRipple"; "required": false; "isSignal": true; }; }, {}, never, ["[cuteTimepickerToggleIcon]"], true, never>;
341
+ }
342
+
343
+ declare class CuteTimepickerModule {
344
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteTimepickerModule, never>;
345
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CuteTimepickerModule, never, [typeof CuteTimepicker, typeof CuteTimepickerInput, typeof CuteTimepickerToggle], [typeof i4.CdkScrollableModule, typeof CuteTimepicker, typeof CuteTimepickerInput, typeof CuteTimepickerToggle]>;
346
+ static ɵinj: i0.ɵɵInjectorDeclaration<CuteTimepickerModule>;
347
+ }
348
+
349
+ export { CUTE_TIMEPICKER_CONFIG, CUTE_TIMEPICKER_SCROLL_STRATEGY, CuteTimepicker, CuteTimepickerInput, CuteTimepickerModule, CuteTimepickerToggle };
350
+ export type { CuteTimepickerConfig, CuteTimepickerConnectedInput, CuteTimepickerOption, CuteTimepickerSelected };