@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,715 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, ElementRef, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, ContentChildren, Directive, isDevMode, NgModule } from '@angular/core';
3
+ import { setLines, CuteLine, CuteLineModule } from '@cute-widgets/base/core';
4
+ import { coerceNumberProperty } from '@angular/cdk/coercion';
5
+ import { Directionality } from '@angular/cdk/bidi';
6
+ import { CommonModule } 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
+ * This code is a modification of the `@angular/material` original
17
+ * code licensed under MIT-style License (https://angular.dev/license).
18
+ */
19
+ /**
20
+ * Injection token used to provide a grid list to a tile and to avoid circular imports.
21
+ */
22
+ const CUTE_GRID_LIST = new InjectionToken('CUTE_GRID_LIST');
23
+
24
+ /**
25
+ * @license Apache-2.0
26
+ *
27
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
28
+ *
29
+ * You may not use this file except in compliance with the License
30
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
31
+ *
32
+ * This code is a modification of the `@angular/material` original
33
+ * code licensed under MIT-style License (https://angular.dev/license).
34
+ */
35
+ class CuteGridTile {
36
+ constructor() {
37
+ this._element = inject(ElementRef);
38
+ this._gridList = inject(CUTE_GRID_LIST, { optional: true });
39
+ this._rowspan = 1;
40
+ this._colspan = 1;
41
+ }
42
+ /** Number of rows that the grid tile takes up. */
43
+ get rowspan() { return this._rowspan; }
44
+ set rowspan(value) {
45
+ this._rowspan = Math.round(coerceNumberProperty(value));
46
+ }
47
+ /** Number of columns that the grid tile takes up. */
48
+ get colspan() { return this._colspan; }
49
+ set colspan(value) {
50
+ this._colspan = Math.round(coerceNumberProperty(value));
51
+ }
52
+ /**
53
+ * Sets the style of the grid-tile element. Needs to be set manually to avoid
54
+ * "Changed after checked" errors that would occur with HostBinding.
55
+ */
56
+ _setStyle(property, value) {
57
+ this._element.nativeElement.style[property] = value;
58
+ }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridTile, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
60
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CuteGridTile, isStandalone: true, selector: "cute-grid-tile", inputs: { rowspan: "rowspan", colspan: "colspan" }, host: { properties: { "attr.rowspan": "rowspan", "attr.colspan": "colspan" }, classAttribute: "cute-grid-tile" }, exportAs: ["cuteGridTile"], ngImport: i0, template: "<div class=\"cute-grid-tile-content\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".cute-grid-list{display:block;position:relative}.cute-grid-tile{display:block;position:absolute;overflow:hidden}.cute-grid-tile .cute-grid-tile-header,.cute-grid-tile .cute-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:#00000061;overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.cute-grid-tile .cute-grid-tile-header>*,.cute-grid-tile .cute-grid-tile-footer>*{margin:0;padding:0;font-weight:400;font-size:inherit}.cute-grid-tile .cute-grid-tile-header.cute-2-line,.cute-grid-tile .cute-grid-tile-footer.cute-2-line{height:68px}.cute-grid-tile .cute-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.cute-grid-tile .cute-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.cute-grid-tile .cute-grid-list-text:empty{display:none}.cute-grid-tile .cute-grid-tile-header{top:0}.cute-grid-tile .cute-grid-tile-footer{bottom:0}.cute-grid-tile .cute-grid-avatar{padding-right:16px}[dir=rtl] .cute-grid-tile .cute-grid-avatar{padding-right:0;padding-left:16px}.cute-grid-tile .cute-grid-avatar:empty{display:none}.cute-grid-tile-content{inset:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
61
+ }
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridTile, decorators: [{
63
+ type: Component,
64
+ args: [{ selector: 'cute-grid-tile', exportAs: 'cuteGridTile', host: {
65
+ 'class': 'cute-grid-tile',
66
+ // Ensures that the "rowspan" and "colspan" input value is reflected in
67
+ // the DOM. This is needed for the grid-tile harness.
68
+ '[attr.rowspan]': 'rowspan',
69
+ '[attr.colspan]': 'colspan',
70
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class=\"cute-grid-tile-content\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".cute-grid-list{display:block;position:relative}.cute-grid-tile{display:block;position:absolute;overflow:hidden}.cute-grid-tile .cute-grid-tile-header,.cute-grid-tile .cute-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:#00000061;overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.cute-grid-tile .cute-grid-tile-header>*,.cute-grid-tile .cute-grid-tile-footer>*{margin:0;padding:0;font-weight:400;font-size:inherit}.cute-grid-tile .cute-grid-tile-header.cute-2-line,.cute-grid-tile .cute-grid-tile-footer.cute-2-line{height:68px}.cute-grid-tile .cute-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.cute-grid-tile .cute-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.cute-grid-tile .cute-grid-list-text:empty{display:none}.cute-grid-tile .cute-grid-tile-header{top:0}.cute-grid-tile .cute-grid-tile-footer{bottom:0}.cute-grid-tile .cute-grid-avatar{padding-right:16px}[dir=rtl] .cute-grid-tile .cute-grid-avatar{padding-right:0;padding-left:16px}.cute-grid-tile .cute-grid-avatar:empty{display:none}.cute-grid-tile-content{inset:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"] }]
71
+ }], ctorParameters: () => [], propDecorators: { rowspan: [{
72
+ type: Input
73
+ }], colspan: [{
74
+ type: Input
75
+ }] } });
76
+ class CuteGridTileText {
77
+ constructor() {
78
+ this._element = inject(ElementRef);
79
+ }
80
+ ngAfterContentInit() {
81
+ if (this._lines) {
82
+ setLines(this._lines, this._element);
83
+ }
84
+ }
85
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridTileText, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
86
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CuteGridTileText, isStandalone: true, selector: "cute-grid-tile-header, cute-grid-tile-footer", queries: [{ propertyName: "_lines", predicate: CuteLine, descendants: true }], ngImport: i0, template: "<ng-content select=\"[cute-grid-avatar], [cuteGridAvatar]\"></ng-content>\r\n<div class=\"cute-grid-list-text\"><ng-content select=\"[cute-line], [cuteLine]\"></ng-content></div>\r\n<ng-content></ng-content>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
87
+ }
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridTileText, decorators: [{
89
+ type: Component,
90
+ args: [{ selector: 'cute-grid-tile-header, cute-grid-tile-footer', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, template: "<ng-content select=\"[cute-grid-avatar], [cuteGridAvatar]\"></ng-content>\r\n<div class=\"cute-grid-list-text\"><ng-content select=\"[cute-line], [cuteLine]\"></ng-content></div>\r\n<ng-content></ng-content>\r\n" }]
91
+ }], ctorParameters: () => [], propDecorators: { _lines: [{
92
+ type: ContentChildren,
93
+ args: [CuteLine, { descendants: true }]
94
+ }] } });
95
+ /**
96
+ * Directive whose purpose is to add the `cute-` CSS styling to this selector.
97
+ */
98
+ class CuteGridAvatarCssCuteStyler {
99
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridAvatarCssCuteStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
100
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: CuteGridAvatarCssCuteStyler, isStandalone: true, selector: "[cute-grid-avatar], [cuteGridAvatar]", host: { classAttribute: "cute-grid-avatar" }, ngImport: i0 }); }
101
+ }
102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridAvatarCssCuteStyler, decorators: [{
103
+ type: Directive,
104
+ args: [{
105
+ selector: '[cute-grid-avatar], [cuteGridAvatar]',
106
+ host: { 'class': 'cute-grid-avatar' },
107
+ standalone: true,
108
+ }]
109
+ }] });
110
+ /**
111
+ * Directive whose purpose is to add the `cute-` CSS styling to this selector.
112
+ */
113
+ class CuteGridTileHeaderCssCuteStyler {
114
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridTileHeaderCssCuteStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
115
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: CuteGridTileHeaderCssCuteStyler, isStandalone: true, selector: "cute-grid-tile-header", host: { classAttribute: "cute-grid-tile-header" }, ngImport: i0 }); }
116
+ }
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridTileHeaderCssCuteStyler, decorators: [{
118
+ type: Directive,
119
+ args: [{
120
+ selector: 'cute-grid-tile-header',
121
+ host: { 'class': 'cute-grid-tile-header' },
122
+ standalone: true,
123
+ }]
124
+ }] });
125
+ /**
126
+ * Directive whose purpose is to add the `cute-` CSS styling to this selector.
127
+ */
128
+ class CuteGridTileFooterCssCuteStyler {
129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridTileFooterCssCuteStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
130
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: CuteGridTileFooterCssCuteStyler, isStandalone: true, selector: "cute-grid-tile-footer", host: { classAttribute: "cute-grid-tile-footer" }, ngImport: i0 }); }
131
+ }
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridTileFooterCssCuteStyler, decorators: [{
133
+ type: Directive,
134
+ args: [{
135
+ selector: 'cute-grid-tile-footer',
136
+ host: { 'class': 'cute-grid-tile-footer' },
137
+ standalone: true,
138
+ }]
139
+ }] });
140
+
141
+ /**
142
+ * @license Apache-2.0
143
+ *
144
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
145
+ *
146
+ * You may not use this file except in compliance with the License
147
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
148
+ *
149
+ * This code is a modification of the `@angular/material` original
150
+ * code licensed under MIT-style License (https://angular.dev/license).
151
+ */
152
+ /**
153
+ * Class for determining, from a list of tiles, the (row, col) position of each of those tiles
154
+ * in the grid. This is necessary (rather than just rendering the tiles in normal document flow)
155
+ * because the tiles can have a rowspan.
156
+ *
157
+ * The positioning algorithm greedily places each tile as soon as it encounters a gap in the grid
158
+ * large enough to accommodate it so that the tiles still render in the same order in which they
159
+ * are given.
160
+ *
161
+ * The basis of the algorithm is the use of an array to track the already placed tiles. Each
162
+ * element of the array corresponds to a column, and the value indicates how many cells in that
163
+ * column are already occupied; zero indicates an empty cell. Moving "down" to the next row
164
+ * decrements each value in the tracking array (indicating that the column is one cell closer to
165
+ * being free).
166
+ */
167
+ class TileCoordinator {
168
+ constructor() {
169
+ /** Tracking array (see class description). */
170
+ this.tracker = [];
171
+ /** Index at which the search for the next gap will start. */
172
+ this.columnIndex = 0;
173
+ /** The current row index. */
174
+ this.rowIndex = 0;
175
+ /** The computed (row, col) position of each tile (the output). */
176
+ this.positions = [];
177
+ }
178
+ /** Gets the total number of rows occupied by tiles */
179
+ get rowCount() {
180
+ return this.rowIndex + 1;
181
+ }
182
+ /**
183
+ * Gets the total span of rows occupied by tiles.
184
+ * Ex: A list with 1 row that contains a tile with rowspan 2 will have a total rowspan of 2.
185
+ */
186
+ get rowspan() {
187
+ const lastRowMax = Math.max(...this.tracker);
188
+ // if any of the tiles has a rowspan that pushes it beyond the total row count,
189
+ // add the difference to the rowcount
190
+ return lastRowMax > 1 ? this.rowCount + lastRowMax - 1 : this.rowCount;
191
+ }
192
+ /**
193
+ * Updates the tile positions.
194
+ * @param numColumns Amount of columns in the grid.
195
+ * @param tiles Tiles to be positioned.
196
+ */
197
+ update(numColumns, tiles) {
198
+ this.columnIndex = 0;
199
+ this.rowIndex = 0;
200
+ this.tracker = new Array(numColumns);
201
+ this.tracker.fill(0, 0, this.tracker.length);
202
+ this.positions = tiles.map(tile => this._trackTile(tile));
203
+ }
204
+ /** Calculates the row and col position of a tile. */
205
+ _trackTile(tile) {
206
+ // Find a gap large enough for this tile.
207
+ const gapStartIndex = this._findMatchingGap(tile.colspan);
208
+ // Place tile in the resulting gap.
209
+ this._markTilePosition(gapStartIndex, tile);
210
+ // The next time we look for a gap, the search will start at columnIndex, which should be
211
+ // immediately after the tile that has just been placed.
212
+ this.columnIndex = gapStartIndex + tile.colspan;
213
+ return new TilePosition(this.rowIndex, gapStartIndex);
214
+ }
215
+ /** Finds the next available space large enough to fit the tile. */
216
+ _findMatchingGap(tileCols) {
217
+ if (tileCols > this.tracker.length && (isDevMode())) {
218
+ throw Error(`cute-grid-list: tile with colspan ${tileCols} is wider than ` +
219
+ `grid with cols="${this.tracker.length}".`);
220
+ }
221
+ // Start index is inclusive, end index is exclusive.
222
+ let gapStartIndex = -1;
223
+ let gapEndIndex = -1;
224
+ // Look for a gap large enough to fit the given tile. Empty spaces are marked with a zero.
225
+ do {
226
+ // If we've reached the end of the row, go to the next row.
227
+ if (this.columnIndex + tileCols > this.tracker.length) {
228
+ this._nextRow();
229
+ gapStartIndex = this.tracker.indexOf(0, this.columnIndex);
230
+ gapEndIndex = this._findGapEndIndex(gapStartIndex);
231
+ continue;
232
+ }
233
+ gapStartIndex = this.tracker.indexOf(0, this.columnIndex);
234
+ // If there are no more empty spaces in this row at all, move on to the next row.
235
+ if (gapStartIndex == -1) {
236
+ this._nextRow();
237
+ gapStartIndex = this.tracker.indexOf(0, this.columnIndex);
238
+ gapEndIndex = this._findGapEndIndex(gapStartIndex);
239
+ continue;
240
+ }
241
+ gapEndIndex = this._findGapEndIndex(gapStartIndex);
242
+ // If a gap large enough isn't found, we want to start looking immediately after the current
243
+ // gap on the next iteration.
244
+ this.columnIndex = gapStartIndex + 1;
245
+ // Continue iterating until we find a gap wide enough for this tile. Since gapEndIndex is
246
+ // exclusive, gapEndIndex is 0 means we didn't find a gap and should continue.
247
+ } while (gapEndIndex - gapStartIndex < tileCols || gapEndIndex == 0);
248
+ // If we still didn't manage to find a gap, ensure that the index is
249
+ // at least zero so the tile doesn't get pulled out of the grid.
250
+ return Math.max(gapStartIndex, 0);
251
+ }
252
+ /** Move "down" to the next row. */
253
+ _nextRow() {
254
+ this.columnIndex = 0;
255
+ this.rowIndex++;
256
+ // Decrement all spaces by one to reflect moving down one row.
257
+ for (let i = 0; i < this.tracker.length; i++) {
258
+ this.tracker[i] = Math.max(0, this.tracker[i] - 1);
259
+ }
260
+ }
261
+ /**
262
+ * Finds the end index (exclusive) of a gap given the index from which to start looking.
263
+ * The gap ends when a non-zero value is found.
264
+ */
265
+ _findGapEndIndex(gapStartIndex) {
266
+ for (let i = gapStartIndex + 1; i < this.tracker.length; i++) {
267
+ if (this.tracker[i] != 0) {
268
+ return i;
269
+ }
270
+ }
271
+ // The gap ends with the end of the row.
272
+ return this.tracker.length;
273
+ }
274
+ /** Update the tile tracker to account for the given tile in the given space. */
275
+ _markTilePosition(start, tile) {
276
+ for (let i = 0; i < tile.colspan; i++) {
277
+ this.tracker[start + i] = tile.rowspan;
278
+ }
279
+ }
280
+ }
281
+ /**
282
+ * Simple data structure for tile position (row, col).
283
+ */
284
+ class TilePosition {
285
+ constructor(row, col) {
286
+ this.row = row;
287
+ this.col = col;
288
+ }
289
+ }
290
+
291
+ /**
292
+ * @license Apache-2.0
293
+ *
294
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
295
+ *
296
+ * You may not use this file except in compliance with the License
297
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
298
+ *
299
+ * This code is a modification of the `@angular/material` original
300
+ * code licensed under MIT-style License (https://angular.dev/license).
301
+ */
302
+ /**
303
+ * RegExp that can be used to check whether a value will
304
+ * be allowed inside a CSS `calc()` expression.
305
+ */
306
+ const cssCalcAllowedValue = /^-?\d+((\.\d+)?[A-Za-z%$]?)+$/;
307
+ /**
308
+ * Sets the style properties for an individual tile, given the position calculated by the
309
+ * Tile Coordinator.
310
+ */
311
+ class TileStyler {
312
+ constructor() {
313
+ this._rows = 0;
314
+ this._rowspan = 0;
315
+ this._cols = 1;
316
+ }
317
+ /**
318
+ * Adds grid-list layout info once it is available. Cannot be processed in the constructor
319
+ * because these properties haven't been calculated by that point.
320
+ *
321
+ * @param gutterSize Size of the grid's gutter.
322
+ * @param tracker Instance of the TileCoordinator.
323
+ * @param cols Amount of columns in the grid.
324
+ * @param direction Layout direction of the grid.
325
+ */
326
+ init(gutterSize, tracker, cols, direction) {
327
+ this._gutterSize = normalizeUnits(gutterSize);
328
+ this._rows = tracker.rowCount;
329
+ this._rowspan = tracker.rowspan;
330
+ this._cols = cols;
331
+ this._direction = direction;
332
+ }
333
+ /**
334
+ * Computes the amount of space a single 1x1 tile would take up (width or height).
335
+ * Used as a basis for other calculations.
336
+ * @param sizePercent Percent of the total grid-list space that one 1x1 tile would take up.
337
+ * @param gutterFraction Fraction of the gutter size taken up by one 1x1 tile.
338
+ * @return The size of a 1x1 tile as an expression that can be evaluated via CSS calc().
339
+ */
340
+ getBaseTileSize(sizePercent, gutterFraction) {
341
+ // Take the base size percent (as would be if evenly dividing the size between cells),
342
+ // and then subtracting the size of one gutter. However, since there are no gutters on the
343
+ // edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter
344
+ // size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the
345
+ // edge evenly among the cells).
346
+ return `(${sizePercent}% - (${this._gutterSize} * ${gutterFraction}))`;
347
+ }
348
+ /**
349
+ * Gets the horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.
350
+ * @param offset Number of tiles that have already been rendered in the row/column.
351
+ * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
352
+ * @return Position of the tile as a CSS calc() expression.
353
+ */
354
+ getTilePosition(baseSize, offset) {
355
+ // The position comes the size of a 1x1 tile plus gutter for each previous tile in the
356
+ // row/column (offset).
357
+ return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`);
358
+ }
359
+ /**
360
+ * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.
361
+ * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
362
+ * @param span The tile's rowspan or colspan.
363
+ * @return Size of the tile as a CSS calc() expression.
364
+ */
365
+ getTileSize(baseSize, span) {
366
+ return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;
367
+ }
368
+ /**
369
+ * Sets the style properties to be applied to a tile for the given row and column index.
370
+ * @param tile Tile to which to apply the styling.
371
+ * @param rowIndex Index of the tile's row.
372
+ * @param colIndex Index of the tile's column.
373
+ */
374
+ setStyle(tile, rowIndex, colIndex) {
375
+ // Percentage of the available horizontal space that one column takes up.
376
+ let percentWidthPerTile = 100 / this._cols;
377
+ // Fraction of the vertical gutter size that each column takes up.
378
+ // For example, if there are 5 columns, each column uses 4/5 = 0.8 times the gutter width.
379
+ let gutterWidthFractionPerTile = (this._cols - 1) / this._cols;
380
+ this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);
381
+ this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);
382
+ }
383
+ /** Sets the horizontal placement of the tile in the list. */
384
+ setColStyles(tile, colIndex, percentWidth, gutterWidth) {
385
+ // Base horizontal size of a column.
386
+ let baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);
387
+ // The width and horizontal position of each tile is always calculated the same way, but the
388
+ // height and vertical position depend on the rowMode.
389
+ let side = this._direction === 'rtl' ? 'right' : 'left';
390
+ tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));
391
+ tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));
392
+ }
393
+ /**
394
+ * Calculates the total size taken up by gutters across one axis of a list.
395
+ */
396
+ getGutterSpan() {
397
+ return `${this._gutterSize} * (${this._rowspan} - 1)`;
398
+ }
399
+ /**
400
+ * Calculates the total size taken up by tiles across one axis of a list.
401
+ * @param tileHeight Height of the tile.
402
+ */
403
+ getTileSpan(tileHeight) {
404
+ return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;
405
+ }
406
+ /**
407
+ * Calculates the computed height and returns the correct style property to set.
408
+ * This method can be implemented by each type of TileStyler.
409
+ * @docs-private
410
+ */
411
+ getComputedHeight() {
412
+ return null;
413
+ }
414
+ }
415
+ /**
416
+ * This type of styler is instantiated when the user passes in a fixed row height.
417
+ * Example `<cute-grid-list cols="3" rowHeight="100px">`
418
+ */
419
+ class FixedTileStyler extends TileStyler {
420
+ constructor(fixedRowHeight) {
421
+ super();
422
+ this.fixedRowHeight = fixedRowHeight;
423
+ }
424
+ init(gutterSize, tracker, cols, direction) {
425
+ super.init(gutterSize, tracker, cols, direction);
426
+ this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);
427
+ if (!cssCalcAllowedValue.test(this.fixedRowHeight) &&
428
+ (isDevMode())) {
429
+ throw Error(`Invalid value "${this.fixedRowHeight}" set as rowHeight.`);
430
+ }
431
+ }
432
+ setRowStyles(tile, rowIndex) {
433
+ tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));
434
+ tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));
435
+ }
436
+ getComputedHeight() {
437
+ return ['height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)];
438
+ }
439
+ reset(list) {
440
+ list._setListStyle(['height', null]);
441
+ if (list._tiles) {
442
+ list._tiles.forEach(tile => {
443
+ tile._setStyle('top', null);
444
+ tile._setStyle('height', null);
445
+ });
446
+ }
447
+ }
448
+ }
449
+ /**
450
+ * This type of styler is instantiated when the user passes in a width:height ratio
451
+ * for the row height. Example `<cute-grid-list cols="3" rowHeight="3:1">`
452
+ */
453
+ class RatioTileStyler extends TileStyler {
454
+ constructor(value) {
455
+ super();
456
+ /** Ratio width:height given by user to determine row height. */
457
+ this.rowHeightRatio = 1;
458
+ this.baseTileHeight = "";
459
+ this._parseRatio(value);
460
+ }
461
+ setRowStyles(tile, rowIndex, percentWidth, gutterWidth) {
462
+ let percentHeightPerTile = percentWidth / this.rowHeightRatio;
463
+ this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);
464
+ // Use padding-top and margin-top to maintain the given aspect ratio, as
465
+ // a percentage-based value for these properties is applied versus the *width* of the
466
+ // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties
467
+ tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));
468
+ tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));
469
+ }
470
+ getComputedHeight() {
471
+ return [
472
+ 'paddingBottom',
473
+ calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`),
474
+ ];
475
+ }
476
+ reset(list) {
477
+ list._setListStyle(['paddingBottom', null]);
478
+ list._tiles.forEach(tile => {
479
+ tile._setStyle('marginTop', null);
480
+ tile._setStyle('paddingTop', null);
481
+ });
482
+ }
483
+ _parseRatio(value) {
484
+ const ratioParts = value.split(':');
485
+ if (ratioParts.length !== 2 && isDevMode()) {
486
+ throw Error(`mat-grid-list: invalid ratio given for row-height: "${value}"`);
487
+ }
488
+ this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);
489
+ }
490
+ }
491
+ /**
492
+ * This type of styler is instantiated when the user selects a "fit" row height mode.
493
+ * In other words, the row height will reflect the total height of the container divided
494
+ * by the number of rows. Example `<cute-grid-list cols="3" rowHeight="fit">`
495
+ */
496
+ class FitTileStyler extends TileStyler {
497
+ setRowStyles(tile, rowIndex) {
498
+ // Percentage of the available vertical space that one row takes up.
499
+ let percentHeightPerTile = 100 / this._rowspan;
500
+ // Fraction of the horizontal gutter size that each column takes up.
501
+ let gutterHeightPerTile = (this._rows - 1) / this._rows;
502
+ // Base vertical size of a column.
503
+ let baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);
504
+ tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));
505
+ tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));
506
+ }
507
+ reset(list) {
508
+ if (list._tiles) {
509
+ list._tiles.forEach(tile => {
510
+ tile._setStyle('top', null);
511
+ tile._setStyle('height', null);
512
+ });
513
+ }
514
+ }
515
+ }
516
+ /** Wraps a CSS string in a calc function */
517
+ function calc(exp) {
518
+ return `calc(${exp})`;
519
+ }
520
+ /** Appends pixels to a CSS string if no units are given. */
521
+ function normalizeUnits(value) {
522
+ return value.match(/([A-Za-z%]+)$/) ? value : `${value}px`;
523
+ }
524
+
525
+ /**
526
+ * @license Apache-2.0
527
+ *
528
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
529
+ *
530
+ * You may not use this file except in compliance with the License
531
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
532
+ *
533
+ * This code is a modification of the `@angular/material` original
534
+ * code licensed under MIT-style License (https://angular.dev/license).
535
+ */
536
+ // TODO(kara): Conditional (responsive) column count / row size.
537
+ // TODO(kara): Re-layout on window resize / media change (debounced).
538
+ // TODO(kara): gridTileHeader and gridTileFooter.
539
+ const CUTE_FIT_MODE = 'fit';
540
+ class CuteGridList {
541
+ constructor() {
542
+ this._element = inject(ElementRef);
543
+ this._dir = inject(Directionality, { optional: true });
544
+ /** Number of columns being rendered. */
545
+ this._cols = 1;
546
+ /**
547
+ * Row height value passed in by user. This can be one of three types:
548
+ * - Number value (ex: "100px"): sets a fixed row height to that value
549
+ * - Ratio value (ex: "4:3"): sets the row height based on width:height ratio
550
+ * - "Fit" mode (ex: "fit"): sets the row height to total height divided by number of rows
551
+ */
552
+ this._rowHeight = "1:1";
553
+ /** The amount of space between tiles. This will be something like '5px' or '2em'. */
554
+ this._gutter = '1px';
555
+ }
556
+ /** Amount of columns in the grid list. */
557
+ get cols() { return this._cols; }
558
+ set cols(value) {
559
+ this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));
560
+ }
561
+ /** Size of the grid list's gutter in pixels. */
562
+ get gutterSize() { return this._gutter; }
563
+ set gutterSize(value) {
564
+ this._gutter = `${value == null ? '' : value}`;
565
+ }
566
+ /** Set an internal representation of row height from the user-provided value. */
567
+ get rowHeight() { return this._rowHeight; }
568
+ set rowHeight(value) {
569
+ const newValue = `${value == null ? '' : value}`;
570
+ if (newValue !== this._rowHeight) {
571
+ this._rowHeight = newValue;
572
+ this._setTileStyler(this._rowHeight);
573
+ }
574
+ }
575
+ ngOnInit() {
576
+ this._checkCols();
577
+ this._checkRowHeight();
578
+ }
579
+ /**
580
+ * The layout calculation is fairly cheap if nothing changes, so there's little cost
581
+ * to run it frequently.
582
+ */
583
+ ngAfterContentChecked() {
584
+ this._layoutTiles();
585
+ }
586
+ /** Throw a friendly error if cols property is missing */
587
+ _checkCols() {
588
+ if (!this.cols && isDevMode()) {
589
+ throw Error(`cute-grid-list: must pass in number of columns. ` + `Example: <cute-grid-list cols="3">`);
590
+ }
591
+ }
592
+ /** Default to equal width:height if rowHeight property is missing */
593
+ _checkRowHeight() {
594
+ if (!this._rowHeight) {
595
+ this._setTileStyler('1:1');
596
+ }
597
+ }
598
+ /** Creates correct Tile Styler subtype based on rowHeight passed in by user */
599
+ _setTileStyler(rowHeight) {
600
+ if (this._tileStyler) {
601
+ this._tileStyler.reset(this);
602
+ }
603
+ if (rowHeight === CUTE_FIT_MODE) {
604
+ this._tileStyler = new FitTileStyler();
605
+ }
606
+ else if (rowHeight && rowHeight.indexOf(':') > -1) {
607
+ this._tileStyler = new RatioTileStyler(rowHeight);
608
+ }
609
+ else {
610
+ this._tileStyler = new FixedTileStyler(rowHeight);
611
+ }
612
+ }
613
+ /** Computes and applies the size and position for all children grid tiles. */
614
+ _layoutTiles() {
615
+ if (!this._tileCoordinator) {
616
+ this._tileCoordinator = new TileCoordinator();
617
+ }
618
+ const tracker = this._tileCoordinator;
619
+ const tiles = this._tiles?.filter(tile => !tile._gridList || tile._gridList === this) || [];
620
+ const direction = this._dir ? this._dir.value : 'ltr';
621
+ this._tileCoordinator.update(this.cols, tiles);
622
+ this._tileStyler?.init(this.gutterSize, tracker, this.cols, direction);
623
+ tiles.forEach((tile, index) => {
624
+ const pos = tracker.positions[index];
625
+ this._tileStyler?.setStyle(tile, pos.row, pos.col);
626
+ });
627
+ this._setListStyle(this._tileStyler?.getComputedHeight() || null);
628
+ }
629
+ /** Sets style on the main grid-list element, given the style name and value. */
630
+ _setListStyle(style) {
631
+ if (style) {
632
+ this._element.nativeElement.style[style[0]] = style[1];
633
+ }
634
+ }
635
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
636
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CuteGridList, isStandalone: true, selector: "cute-grid-list", inputs: { cols: "cols", gutterSize: "gutterSize", rowHeight: "rowHeight" }, host: { properties: { "attr.cols": "cols" }, classAttribute: "cute-grid-list" }, providers: [
637
+ {
638
+ provide: CUTE_GRID_LIST,
639
+ useExisting: CuteGridList,
640
+ },
641
+ ], queries: [{ propertyName: "_tiles", predicate: CuteGridTile, descendants: true }], exportAs: ["cuteGridList"], ngImport: i0, template: "<div>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".cute-grid-list{display:block;position:relative}.cute-grid-tile{display:block;position:absolute;overflow:hidden}.cute-grid-tile .cute-grid-tile-header,.cute-grid-tile .cute-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:#00000061;overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.cute-grid-tile .cute-grid-tile-header>*,.cute-grid-tile .cute-grid-tile-footer>*{margin:0;padding:0;font-weight:400;font-size:inherit}.cute-grid-tile .cute-grid-tile-header.cute-2-line,.cute-grid-tile .cute-grid-tile-footer.cute-2-line{height:68px}.cute-grid-tile .cute-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.cute-grid-tile .cute-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.cute-grid-tile .cute-grid-list-text:empty{display:none}.cute-grid-tile .cute-grid-tile-header{top:0}.cute-grid-tile .cute-grid-tile-footer{bottom:0}.cute-grid-tile .cute-grid-avatar{padding-right:16px}[dir=rtl] .cute-grid-tile .cute-grid-avatar{padding-right:0;padding-left:16px}.cute-grid-tile .cute-grid-avatar:empty{display:none}.cute-grid-tile-content{inset:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
642
+ }
643
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridList, decorators: [{
644
+ type: Component,
645
+ args: [{ selector: 'cute-grid-list', exportAs: 'cuteGridList', host: {
646
+ 'class': 'cute-grid-list',
647
+ // Ensures that the "cols" input value is reflected in the DOM. This is
648
+ // needed for the grid-list harness.
649
+ '[attr.cols]': 'cols',
650
+ }, providers: [
651
+ {
652
+ provide: CUTE_GRID_LIST,
653
+ useExisting: CuteGridList,
654
+ },
655
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, template: "<div>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".cute-grid-list{display:block;position:relative}.cute-grid-tile{display:block;position:absolute;overflow:hidden}.cute-grid-tile .cute-grid-tile-header,.cute-grid-tile .cute-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:#00000061;overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.cute-grid-tile .cute-grid-tile-header>*,.cute-grid-tile .cute-grid-tile-footer>*{margin:0;padding:0;font-weight:400;font-size:inherit}.cute-grid-tile .cute-grid-tile-header.cute-2-line,.cute-grid-tile .cute-grid-tile-footer.cute-2-line{height:68px}.cute-grid-tile .cute-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.cute-grid-tile .cute-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.cute-grid-tile .cute-grid-list-text:empty{display:none}.cute-grid-tile .cute-grid-tile-header{top:0}.cute-grid-tile .cute-grid-tile-footer{bottom:0}.cute-grid-tile .cute-grid-avatar{padding-right:16px}[dir=rtl] .cute-grid-tile .cute-grid-avatar{padding-right:0;padding-left:16px}.cute-grid-tile .cute-grid-avatar:empty{display:none}.cute-grid-tile-content{inset:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"] }]
656
+ }], ctorParameters: () => [], propDecorators: { _tiles: [{
657
+ type: ContentChildren,
658
+ args: [CuteGridTile, { descendants: true }]
659
+ }], cols: [{
660
+ type: Input
661
+ }], gutterSize: [{
662
+ type: Input
663
+ }], rowHeight: [{
664
+ type: Input
665
+ }] } });
666
+
667
+ /**
668
+ * @license Apache-2.0
669
+ *
670
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
671
+ *
672
+ * You may not use this file except in compliance with the License
673
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
674
+ */
675
+ const TYPES = [
676
+ CuteLineModule,
677
+ CuteGridList,
678
+ CuteGridTile,
679
+ CuteGridTileText,
680
+ CuteGridTileHeaderCssCuteStyler,
681
+ CuteGridTileFooterCssCuteStyler,
682
+ CuteGridAvatarCssCuteStyler,
683
+ ];
684
+ class CuteGridListModule {
685
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
686
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: CuteGridListModule, imports: [CommonModule, CuteLineModule,
687
+ CuteGridList,
688
+ CuteGridTile,
689
+ CuteGridTileText,
690
+ CuteGridTileHeaderCssCuteStyler,
691
+ CuteGridTileFooterCssCuteStyler,
692
+ CuteGridAvatarCssCuteStyler], exports: [CuteLineModule,
693
+ CuteGridList,
694
+ CuteGridTile,
695
+ CuteGridTileText,
696
+ CuteGridTileHeaderCssCuteStyler,
697
+ CuteGridTileFooterCssCuteStyler,
698
+ CuteGridAvatarCssCuteStyler] }); }
699
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridListModule, imports: [CommonModule, CuteLineModule, CuteLineModule] }); }
700
+ }
701
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteGridListModule, decorators: [{
702
+ type: NgModule,
703
+ args: [{
704
+ imports: [CommonModule, ...TYPES],
705
+ exports: TYPES,
706
+ declarations: [],
707
+ }]
708
+ }] });
709
+
710
+ /**
711
+ * Generated bundle index. Do not edit.
712
+ */
713
+
714
+ export { CuteGridAvatarCssCuteStyler, CuteGridList, CuteGridListModule, CuteGridTile, CuteGridTileFooterCssCuteStyler, CuteGridTileHeaderCssCuteStyler, CuteGridTileText, FitTileStyler, FixedTileStyler, RatioTileStyler, TileStyler };
715
+ //# sourceMappingURL=cute-widgets-base-grid-list.mjs.map