@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,97 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy, EventEmitter } from '@angular/core';
3
+ import { CuteBaseControl, Expandable } from '@cute-widgets/base/abstract';
4
+ import { Subject } from 'rxjs';
5
+ import { AnimationEvent, AnimationTriggerMetadata } from '@angular/animations';
6
+ import * as i1 from '@angular/common';
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
+
17
+ /** Animation states */
18
+ type CuteCollapseState = 'expanded' | 'collapsed';
19
+ /**
20
+ * This collapse component is used to show and hide content.
21
+ * Buttons or anchors are used as triggers that are mapped to specific elements you toggle.
22
+ */
23
+ declare class CuteCollapse extends CuteBaseControl implements Expandable, OnDestroy {
24
+ /** Sets the element's current state to _collapsed_ or _expanded_ value. */
25
+ get collapsed(): boolean;
26
+ set collapsed(value: boolean);
27
+ private _collapsed;
28
+ /** Expanding/Collapsing directionality, _horizontal_ or _vertical_. Default is _vertical_. */
29
+ horizontal: boolean;
30
+ /** Whether the animation while collapsing/expanding should be disabled */
31
+ disableAnimation: boolean;
32
+ /** Event emitting before expand element */
33
+ readonly beforeExpand: EventEmitter<void>;
34
+ /** Event emitting before collapse element */
35
+ readonly beforeCollapse: EventEmitter<void>;
36
+ /** Event emitting after expand element */
37
+ readonly afterExpand: EventEmitter<void>;
38
+ /** Event emitting after collapse element */
39
+ readonly afterCollapse: EventEmitter<void>;
40
+ /** Weather the current state is _collapsed_ or _expanded_. Part of `Expandable` interface. */
41
+ get expanded(): boolean;
42
+ /** Stream of body animation events. */
43
+ protected readonly _bodyAnimation$: Subject<AnimationEvent>;
44
+ constructor();
45
+ protected onAnimationEvent(event: AnimationEvent): void;
46
+ protected generateId(): string;
47
+ /** Gets the expanded state string. */
48
+ getState(): CuteCollapseState;
49
+ /** Part of `Expandable` interface */
50
+ toggle(): void;
51
+ /** Part of `Expandable` interface */
52
+ open(): void;
53
+ /** Part of `Expandable` interface */
54
+ close(): void;
55
+ ngOnDestroy(): void;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteCollapse, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteCollapse, "cute-collapse", ["cuteCollapse"], { "collapsed": { "alias": "collapsed"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; "disableAnimation": { "alias": "disableAnimation"; "required": false; }; }, { "beforeExpand": "beforeExpand"; "beforeCollapse": "beforeCollapse"; "afterExpand": "afterExpand"; "afterCollapse": "afterCollapse"; }, never, ["*"], true, never>;
58
+ static ngAcceptInputType_collapsed: unknown;
59
+ static ngAcceptInputType_horizontal: unknown;
60
+ static ngAcceptInputType_disableAnimation: unknown;
61
+ }
62
+
63
+ declare class CuteCollapseTrigger {
64
+ /** Reference to the `cute-collapse` component to toggle its visibility */
65
+ get collapseControl(): CuteCollapse | null;
66
+ set collapseControl(collapse: CuteCollapse | null);
67
+ private _collapseControl;
68
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteCollapseTrigger, never>;
69
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteCollapseTrigger, "[cuteCollapseTriggerFor]", ["cuteCollapseTrigger"], { "collapseControl": { "alias": "cuteCollapseTriggerFor"; "required": false; }; }, {}, never, never, true, never>;
70
+ }
71
+
72
+ /**
73
+ * @license Apache-2.0
74
+ *
75
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
76
+ *
77
+ * You may not use this file except in compliance with the License
78
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
79
+ */
80
+
81
+ /** Time and timing curve for **collapse** animations. */
82
+ declare const CUTE_COLLAPSE_ANIMATION_TIMING = "225ms cubic-bezier(0.4,0.0,0.2,1)";
83
+ /**
84
+ * Animations used by the CuteWidgets` collapse element.
85
+ */
86
+ declare const cuteCollapseAnimations: {
87
+ readonly bodyExpansion: AnimationTriggerMetadata;
88
+ };
89
+
90
+ declare class CuteCollapseModule {
91
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteCollapseModule, never>;
92
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CuteCollapseModule, never, [typeof i1.CommonModule, typeof CuteCollapse, typeof CuteCollapseTrigger], [typeof CuteCollapse, typeof CuteCollapseTrigger]>;
93
+ static ɵinj: i0.ɵɵInjectorDeclaration<CuteCollapseModule>;
94
+ }
95
+
96
+ export { CUTE_COLLAPSE_ANIMATION_TIMING, CuteCollapse, CuteCollapseModule, CuteCollapseTrigger, cuteCollapseAnimations };
97
+ export type { CuteCollapseState };
@@ -0,0 +1,43 @@
1
+ import { InjectionToken } from '@angular/core';
2
+
3
+ /** Object used to configure the animation in Angular Material. */
4
+ interface AnimationsConfig {
5
+ /** Whether all animations should be disabled. */
6
+ animationsDisabled?: boolean;
7
+ }
8
+ /** Injection token used to configure the animations in CuteWidgets. */
9
+ declare const CUTE_WIDGETS_ANIMATIONS: InjectionToken<AnimationsConfig>;
10
+ /**
11
+ * @deprecated No longer used, will be removed.
12
+ * @breaking-change 21.0.0
13
+ * @docs-private
14
+ */
15
+ declare class AnimationCurves {
16
+ static STANDARD_CURVE: string;
17
+ static DECELERATION_CURVE: string;
18
+ static ACCELERATION_CURVE: string;
19
+ static SHARP_CURVE: string;
20
+ }
21
+ /**
22
+ * @deprecated No longer used, will be removed.
23
+ * @breaking-change 21.0.0
24
+ * @docs-private
25
+ */
26
+ declare class AnimationDurations {
27
+ static COMPLEX: string;
28
+ static ENTERING: string;
29
+ static EXITING: string;
30
+ }
31
+ /**
32
+ * Gets the configured animations state.
33
+ * @docs-private
34
+ */
35
+ declare function _getAnimationsState(): 'enabled' | 'di-disabled' | 'reduced-motion';
36
+ /**
37
+ * Returns whether animations have been disabled by DI. Must be called in a DI context.
38
+ * @docs-private
39
+ */
40
+ declare function _animationsDisabled(): boolean;
41
+
42
+ export { AnimationCurves, AnimationDurations, CUTE_WIDGETS_ANIMATIONS, _animationsDisabled, _getAnimationsState };
43
+ export type { AnimationsConfig };
@@ -0,0 +1,404 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Provider } from '@angular/core';
3
+ import { Subject, Observable } from 'rxjs';
4
+
5
+ /**
6
+ * @license Apache-2.0
7
+ *
8
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
9
+ *
10
+ * You may not use this file except in compliance with the License
11
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * This code is a modification of the `@angular/material` original
14
+ * code licensed under MIT-style License (https://angular.dev/license).
15
+ */
16
+
17
+ /** InjectionToken for datepicker that can be used to override default locale code. */
18
+ declare const CUTE_DATE_LOCALE: InjectionToken<{}>;
19
+ /**
20
+ * @docs-private
21
+ * @deprecated No longer used, will be removed.
22
+ * @breaking-change 21.0.0
23
+ */
24
+ declare function CUTE_DATE_LOCALE_FACTORY(): {};
25
+ /** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */
26
+ declare abstract class DateAdapter<D, L = any> {
27
+ /** The locale to use for all dates. */
28
+ protected locale: L | undefined;
29
+ protected readonly _localeChanges: Subject<void>;
30
+ /** A stream that emits when the locale changes. */
31
+ readonly localeChanges: Observable<void>;
32
+ /**
33
+ * Gets the year component of the given date.
34
+ * @param date The date to extract the year from.
35
+ * @returns The year component.
36
+ */
37
+ abstract getYear(date: D): number;
38
+ /**
39
+ * Gets the month component of the given date.
40
+ * @param date The date to extract the month from.
41
+ * @returns The month component (0-indexed, 0 = January).
42
+ */
43
+ abstract getMonth(date: D): number;
44
+ /**
45
+ * Gets the date of the month component of the given date.
46
+ * @param date The date to extract the date of the month from.
47
+ * @returns The month component (1-indexed, 1 = first of month).
48
+ */
49
+ abstract getDate(date: D): number;
50
+ /**
51
+ * Gets the day of the week component of the given date.
52
+ * @param date The date to extract the day of the week from.
53
+ * @returns The month component (0-indexed, 0 = Sunday).
54
+ */
55
+ abstract getDayOfWeek(date: D): number;
56
+ /**
57
+ * Gets a list of names for the months.
58
+ * @param style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J').
59
+ * @returns An ordered list of all month names, starting with January.
60
+ */
61
+ abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
62
+ /**
63
+ * Gets a list of names for the dates of the month.
64
+ * @returns An ordered list of all date of the month names, starting with '1'.
65
+ */
66
+ abstract getDateNames(): string[];
67
+ /**
68
+ * Gets a list of names for the days of the week.
69
+ * @param style The naming style (e.g., long = 'Sunday', short = 'Sun', narrow = 'S').
70
+ * @returns An ordered list of all weekday names, starting with Sunday.
71
+ */
72
+ abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
73
+ /**
74
+ * Gets the name for the year of the given date.
75
+ * @param date The date to get the year name for.
76
+ * @returns The name of the given year (e.g. '2017').
77
+ */
78
+ abstract getYearName(date: D): string;
79
+ /**
80
+ * Gets the first day of the week.
81
+ * @returns The first day of the week (0-indexed, 0 = Sunday).
82
+ */
83
+ abstract getFirstDayOfWeek(): number;
84
+ /**
85
+ * Gets the number of days in the month of the given date.
86
+ * @param date The date whose month should be checked.
87
+ * @returns The number of days in the month of the given date.
88
+ */
89
+ abstract getNumDaysInMonth(date: D): number;
90
+ /**
91
+ * Clones the given date.
92
+ * @param date The date to clone
93
+ * @returns A new date equal to the given date.
94
+ */
95
+ abstract clone(date: D): D;
96
+ /**
97
+ * Creates a date with the given year, month, and date. Does not allow over/under-flow of the
98
+ * month and date.
99
+ * @param year The full year of the date. (e.g. 89 means the year 89, not the year 1989).
100
+ * @param month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11.
101
+ * @param date The date of month of the date. Must be an integer 1 - length of the given month.
102
+ * @returns The new date, or null if invalid.
103
+ */
104
+ abstract createDate(year: number, month: number, date: number): D;
105
+ /**
106
+ * Gets today's date.
107
+ * @returns Today's date.
108
+ */
109
+ abstract today(): D;
110
+ /**
111
+ * Parses a date from a user-provided value.
112
+ * @param value The value to parse.
113
+ * @param parseFormat The expected format of the value being parsed
114
+ * (type is implementation-dependent).
115
+ * @returns The parsed date.
116
+ */
117
+ abstract parse(value: any, parseFormat: any): D | null;
118
+ /**
119
+ * Formats a date as a string according to the given format.
120
+ * @param date The value to format.
121
+ * @param displayFormat The format to use to display the date as a string.
122
+ * @returns The formatted date string.
123
+ */
124
+ abstract format(date: D, displayFormat: any): string;
125
+ /**
126
+ * Adds the given number of years to the date. Years are counted as if flipping 12 pages on the
127
+ * calendar for each year and then finding the closest date in the new month. For example when
128
+ * adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017.
129
+ * @param date The date to add years to.
130
+ * @param years The number of years to add (maybe negative).
131
+ * @returns A new date equal to the given one with the specified number of years added.
132
+ */
133
+ abstract addCalendarYears(date: D, years: number): D;
134
+ /**
135
+ * Adds the given number of months to the date. Months are counted as if flipping a page on the
136
+ * calendar for each month and then finding the closest date in the new month. For example when
137
+ * adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017.
138
+ * @param date The date to add months to.
139
+ * @param months The number of months to add (maybe negative).
140
+ * @returns A new date equal to the given one with the specified number of months added.
141
+ */
142
+ abstract addCalendarMonths(date: D, months: number): D;
143
+ /**
144
+ * Adds the given number of days to the date. Days are counted as if moving one cell on the
145
+ * calendar for each day.
146
+ * @param date The date to add days to.
147
+ * @param days The number of days to add (maybe negative).
148
+ * @returns A new date equal to the given one with the specified number of days added.
149
+ */
150
+ abstract addCalendarDays(date: D, days: number): D;
151
+ /**
152
+ * Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date.
153
+ * This method is used to generate date strings that are compatible with native HTML attributes
154
+ * such as the `min` or `max` attribute of an `<input>`.
155
+ * @param date The date to get the ISO date string for.
156
+ * @returns The ISO date string date string.
157
+ */
158
+ abstract toIso8601(date: D): string;
159
+ /**
160
+ * Checks whether the given object is considered a date instance by this DateAdapter.
161
+ * @param obj The object to check
162
+ * @returns Whether the object is a date instance.
163
+ */
164
+ abstract isDateInstance(obj: any): boolean;
165
+ /**
166
+ * Checks whether the given date is valid.
167
+ * @param date The date to check.
168
+ * @returns Whether the date is valid.
169
+ */
170
+ abstract isValid(date: D): boolean;
171
+ /**
172
+ * Gets date instance that is not valid.
173
+ * @returns An invalid date.
174
+ */
175
+ abstract invalid(): D;
176
+ /**
177
+ * Sets the time of one date to the time of another.
178
+ * @param target Date whose time will be set.
179
+ * @param hours New hours to set on the date object.
180
+ * @param minutes New minutes to set on the date object.
181
+ * @param seconds New seconds to set on the date object.
182
+ */
183
+ setTime(target: D, hours: number, minutes: number, seconds: number): D;
184
+ /**
185
+ * Gets the hours component of the given date.
186
+ * @param date The date to extract the hours from.
187
+ */
188
+ getHours(date: D): number;
189
+ /**
190
+ * Gets the minutes component of the given date.
191
+ * @param date The date to extract the minutes from.
192
+ */
193
+ getMinutes(date: D): number;
194
+ /**
195
+ * Gets the seconds component of the given date.
196
+ * @param date The date to extract the seconds from.
197
+ */
198
+ getSeconds(date: D): number;
199
+ /**
200
+ * Parses a date with a specific time from a user-provided value.
201
+ * @param value The value to parse.
202
+ * @param parseFormat The expected format of the value being parsed
203
+ * (type is implementation-dependent).
204
+ */
205
+ parseTime(value: any, parseFormat: any): D | null;
206
+ /**
207
+ * Adds an amount of seconds to the specified date.
208
+ * @param date Date to which to add the seconds.
209
+ * @param amount Amount of seconds to add to the date.
210
+ */
211
+ addSeconds(date: D, amount: number): D;
212
+ /**
213
+ * Given a potential date object, returns that same date object if it is
214
+ * a valid date, or `null` if it's not a valid date.
215
+ * @param obj The object to check.
216
+ * @returns A date or `null`.
217
+ */
218
+ getValidDateOrNull(obj: unknown): D | null;
219
+ /**
220
+ * Attempts to deserialize a value to a valid date object. This is different from parsing in that
221
+ * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
222
+ * string). The default implementation does not allow any deserialization, it simply checks that
223
+ * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
224
+ * method on all of its `@Input()` properties that accept dates. It is therefore possible to
225
+ * support passing values from your backend directly to these properties by overriding this method
226
+ * to also deserialize the format used by your backend.
227
+ * @param value The value to be deserialized into a date object.
228
+ * @returns The deserialized date object, either a valid date, null if the value can be
229
+ * deserialized into a null date (e.g. the empty string), or an invalid date.
230
+ */
231
+ deserialize(value: any): D | null;
232
+ /**
233
+ * Sets the locale used for all dates.
234
+ * @param locale The new locale.
235
+ */
236
+ setLocale(locale: L): void;
237
+ /**
238
+ * Compares two dates.
239
+ * @param first The first date to compare.
240
+ * @param second The second date to compare.
241
+ * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,
242
+ * a number greater than 0 if the first date is later.
243
+ */
244
+ compareDate(first: D, second: D): number;
245
+ /**
246
+ * Compares the time values of two dates.
247
+ * @param first First date to compare.
248
+ * @param second Second date to compare.
249
+ * @returns 0 if the times are equal, a number less than 0 if the first time is earlier,
250
+ * a number greater than 0 if the first time is later.
251
+ */
252
+ compareTime(first: D, second: D): number;
253
+ /**
254
+ * Checks if two dates are equal.
255
+ * @param first The first date to check.
256
+ * @param second The second date to check.
257
+ * @returns Whether the two dates are equal.
258
+ * Null dates are considered equal to other null dates.
259
+ */
260
+ sameDate(first: D | null, second: D | null): boolean;
261
+ /**
262
+ * Checks if the times of two dates are equal.
263
+ * @param first The first date to check.
264
+ * @param second The second date to check.
265
+ * @returns Whether the times of the two dates are equal.
266
+ * Null dates are considered equal to other null dates.
267
+ */
268
+ sameTime(first: D | null, second: D | null): boolean;
269
+ /**
270
+ * Clamp the given date between min and max dates.
271
+ * @param date The date to clamp.
272
+ * @param min The minimum value to allow. If null or omitted, no min is enforced.
273
+ * @param max The maximum value to allow. If null or omitted, no max is enforced.
274
+ * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,
275
+ * otherwise `date`.
276
+ */
277
+ clampDate(date: D, min?: D | null, max?: D | null): D;
278
+ }
279
+
280
+ /**
281
+ * @license Apache-2.0
282
+ *
283
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
284
+ *
285
+ * You may not use this file except in compliance with the License
286
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
287
+ *
288
+ * This code is a modification of the `@angular/material` original
289
+ * code licensed under MIT-style License (https://angular.dev/license).
290
+ */
291
+
292
+ type CuteDateFormats = {
293
+ parse: {
294
+ dateInput: any;
295
+ timeInput?: any;
296
+ };
297
+ display: {
298
+ dateInput: any;
299
+ monthLabel?: any;
300
+ monthYearLabel: any;
301
+ dateA11yLabel: any;
302
+ monthYearA11yLabel: any;
303
+ timeInput?: any;
304
+ timeOptionLabel?: any;
305
+ };
306
+ };
307
+ declare const CUTE_DATE_FORMATS: InjectionToken<CuteDateFormats>;
308
+
309
+ /** Adapts the native JS Date for use with cdk-based components that work with dates. */
310
+ declare class NativeDateAdapter extends DateAdapter<Date> {
311
+ /** The injected locale. */
312
+ private readonly _cuteDateLocale;
313
+ constructor(...args: unknown[]);
314
+ getYear(date: Date): number;
315
+ getMonth(date: Date): number;
316
+ getDate(date: Date): number;
317
+ getDayOfWeek(date: Date): number;
318
+ getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
319
+ getDateNames(): string[];
320
+ getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
321
+ getYearName(date: Date): string;
322
+ getFirstDayOfWeek(): number;
323
+ getNumDaysInMonth(date: Date): number;
324
+ clone(date: Date): Date;
325
+ createDate(year: number, month: number, date: number): Date;
326
+ today(): Date;
327
+ parse(value: any, parseFormat?: any): Date | null;
328
+ format(date: Date, displayFormat: Object): string;
329
+ addCalendarYears(date: Date, years: number): Date;
330
+ addCalendarMonths(date: Date, months: number): Date;
331
+ addCalendarDays(date: Date, days: number): Date;
332
+ toIso8601(date: Date): string;
333
+ /**
334
+ * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
335
+ * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
336
+ * invalid date for all other values.
337
+ */
338
+ deserialize(value: any): Date | null;
339
+ isDateInstance(obj: any): obj is Date;
340
+ isValid(date: Date): boolean;
341
+ invalid(): Date;
342
+ setTime(target: Date, hours: number, minutes: number, seconds: number): Date;
343
+ getHours(date: Date): number;
344
+ getMinutes(date: Date): number;
345
+ getSeconds(date: Date): number;
346
+ parseTime(userValue: any, parseFormat?: any): Date | null;
347
+ addSeconds(date: Date, amount: number): Date;
348
+ /** Creates a date but allows the month and date to overflow. */
349
+ private _createDateWithOverflow;
350
+ /**
351
+ * Pads a number to make it two digits.
352
+ * @param n The number to pad.
353
+ * @returns The padded number.
354
+ */
355
+ private _2digit;
356
+ /**
357
+ * When converting a Date object to string, javascript built-in functions may return wrong
358
+ * results because it applies its internal DST rules. The DST rules around the world change
359
+ * very frequently, and the current valid rule is not always valid in previous years though.
360
+ * We work around this problem building a new Date object which has its internal UTC
361
+ * representation with the local date and time.
362
+ * @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have
363
+ * timeZone set to 'utc' to work fine.
364
+ * @param date Date from which we want to get the string representation according to dtf
365
+ * @returns A Date object with its UTC representation based on the passed in date info
366
+ */
367
+ private _format;
368
+ /**
369
+ * Attempts to parse a time string into a date object. Returns null if it cannot be parsed.
370
+ * @param value Time string to parse.
371
+ */
372
+ private _parseTimeString;
373
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateAdapter, never>;
374
+ static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateAdapter>;
375
+ }
376
+
377
+ /**
378
+ * @license Apache-2.0
379
+ *
380
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
381
+ *
382
+ * You may not use this file except in compliance with the License
383
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
384
+ *
385
+ * This code is a modification of the `@angular/material` original
386
+ * code licensed under MIT-style License (https://angular.dev/license).
387
+ */
388
+
389
+ declare const CUTE_NATIVE_DATE_FORMATS: CuteDateFormats;
390
+
391
+ declare class NativeDateModule {
392
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateModule, never>;
393
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NativeDateModule, never, never, never>;
394
+ static ɵinj: i0.ɵɵInjectorDeclaration<NativeDateModule>;
395
+ }
396
+ declare class CuteNativeDateModule {
397
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteNativeDateModule, never>;
398
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CuteNativeDateModule, never, never, never>;
399
+ static ɵinj: i0.ɵɵInjectorDeclaration<CuteNativeDateModule>;
400
+ }
401
+ declare function provideNativeDateAdapter(formats?: CuteDateFormats): Provider[];
402
+
403
+ export { CUTE_DATE_FORMATS, CUTE_DATE_LOCALE, CUTE_DATE_LOCALE_FACTORY, CUTE_NATIVE_DATE_FORMATS, CuteNativeDateModule, DateAdapter, NativeDateAdapter, NativeDateModule, provideNativeDateAdapter };
404
+ export type { CuteDateFormats };