@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 @@
1
+ {"version":3,"file":"cute-widgets-base-form-field.mjs","sources":["../../../../projects/cute-widgets/base/form-field/src/form-field-control.ts","../../../../projects/cute-widgets/base/form-field/src/directives/prefix.directive.ts","../../../../projects/cute-widgets/base/form-field/src/directives/suffix.directive.ts","../../../../projects/cute-widgets/base/form-field/src/directives/error.directive.ts","../../../../projects/cute-widgets/base/form-field/src/directives/hint.directive.ts","../../../../projects/cute-widgets/base/form-field/src/form-field-errors.ts","../../../../projects/cute-widgets/base/form-field/src/directives/label.directive.ts","../../../../projects/cute-widgets/base/form-field/src/form-field.component.ts","../../../../projects/cute-widgets/base/form-field/src/form-field.component.html","../../../../projects/cute-widgets/base/form-field/src/directives/intro.directive.ts","../../../../projects/cute-widgets/base/form-field/src/form-field.module.ts","../../../../projects/cute-widgets/base/form-field/cute-widgets-base-form-field.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {Observable} from 'rxjs';\r\nimport {AbstractControlDirective, NgControl} from '@angular/forms';\r\nimport {Directive, ElementRef} from '@angular/core';\r\n\r\n/** An interface which allows a control to work inside a `CuteFormField`. */\r\n@Directive()\r\nexport abstract class CuteFormFieldControl<T> {\r\n /** The value of the control. */\r\n value: T | null = null;\r\n\r\n /**\r\n * Stream that emits whenever the state of the control changes such that the parent `CuteFormField`\r\n * needs to run change detection.\r\n */\r\n readonly stateChanges: Observable<void> | undefined;\r\n\r\n /** The element ID for this control. */\r\n readonly id: string | undefined;\r\n\r\n /** The placeholder for this control. */\r\n readonly placeholder: string | undefined;\r\n\r\n /** Gets the `AbstractControlDirective` for this control. */\r\n readonly ngControl: NgControl | AbstractControlDirective | null = null;\r\n\r\n /** Whether the control is focused. */\r\n readonly focused: boolean = false;\r\n\r\n /** Whether the control is empty. */\r\n readonly empty: boolean = false;\r\n\r\n /** Whether the `CuteFormField` label should try to float. */\r\n readonly shouldLabelFloat: boolean= false;\r\n\r\n /** Whether the control is required. */\r\n readonly required: boolean = false;\r\n\r\n /** Whether the control is disabled. */\r\n readonly disabled: boolean = false;\r\n\r\n /** Whether the control is in an error state. */\r\n readonly errorState: boolean = false;\r\n\r\n /**\r\n * An optional name for the control type that can be used to distinguish `cute-form-field` elements\r\n * based on their control type. The form field will add a class,\r\n * `cute-form-field-type-{{controlType}}` to its root element.\r\n */\r\n readonly controlType?: string;\r\n\r\n /**\r\n * Whether the input is currently in an autofilled state. If property is not present on the\r\n * control, it is assumed to be false.\r\n */\r\n readonly autofilled?: boolean;\r\n\r\n /**\r\n * Value of `aria-describedby` that should be merged with the described-by ids,\r\n * which are set by the form-field.\r\n */\r\n readonly userAriaDescribedBy?: string;\r\n\r\n /**\r\n * Whether to automatically assign the ID of the form field as the `for` attribute\r\n * on the `<label>` inside the form field. Set this to true to prevent the form\r\n * field from associating the label with non-native elements.\r\n */\r\n readonly disableAutomaticLabeling?: boolean;\r\n\r\n /** Gets the list of element IDs that currently describe this control. */\r\n readonly describedByIds?: string[];\r\n\r\n /** Sets the list of element IDs that currently describe this control. */\r\n abstract setDescribedByIds(ids: string[]): void;\r\n\r\n /** Handles a click on the control's container. */\r\n abstract onContainerClick(event: MouseEvent): void;\r\n\r\n //++ CWT\r\n /** Gets the `ElementRef` for this control. */\r\n readonly controlElementRef: ElementRef | undefined;\r\n\r\n //++ CWT\r\n /** Changes the disabled state of this control. */\r\n abstract setDisabledState(value: boolean): void\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, InjectionToken, Input} from '@angular/core';\r\n\r\n/**\r\n * Injection token that can be used to reference instances of `CutePrefix`. It serves as\r\n * an alternative token to the actual `CutePrefix` class, which could cause unnecessary\r\n * retention of the class and its directive metadata.\r\n */\r\nexport const CUTE_PREFIX = new InjectionToken<CutePrefix>('CutePrefix');\r\n\r\n/** Prefix to be placed in front of the form field. */\r\n@Directive({\r\n selector: '[cutePrefix], [cuteIconPrefix], [cuteTextPrefix]',\r\n providers: [{provide: CUTE_PREFIX, useExisting: CutePrefix}],\r\n host: {\r\n 'class': 'input-group-text'\r\n },\r\n})\r\nexport class CutePrefix {\r\n @Input('cuteTextPrefix')\r\n set _isTextSelector(value: '') {\r\n this._isText = true;\r\n }\r\n _isText: boolean = false;\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, InjectionToken, Input} from '@angular/core';\r\n\r\n/**\r\n * Injection token that can be used to reference instances of `CuteSuffix`. It serves as\r\n * an alternative token to the actual `CuteSuffix` class which could cause unnecessary\r\n * retention of the class and its directive metadata.\r\n */\r\nexport const CUTE_SUFFIX = new InjectionToken<CuteSuffix>('CuteSuffix');\r\n\r\n/** Suffix to be placed at the end of the form field. */\r\n@Directive({\r\n selector: '[cuteSuffix], [cuteIconSuffix], [cuteTextSuffix]',\r\n providers: [{provide: CUTE_SUFFIX, useExisting: CuteSuffix}],\r\n host: {\r\n 'class': 'input-group-text'\r\n },\r\n})\r\nexport class CuteSuffix {\r\n @Input('cuteTextSuffix')\r\n set _isTextSelector(value: '') {\r\n this._isText = true;\r\n }\r\n _isText: boolean = false;\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {Attribute, Directive, ElementRef, inject, InjectionToken, Input, OnDestroy, OnInit} from '@angular/core';\r\nimport {_IdGenerator} from '@angular/cdk/a11y';\r\n\r\n/**\r\n * Injection token that can be used to reference instances of `CuteError`. It serves as\r\n * an alternative token to the actual `CuteError` class, which could cause unnecessary\r\n * retention of the class and its directive metadata.\r\n */\r\nexport const CUTE_ERROR = new InjectionToken<CuteError>('CuteError');\r\n\r\n/** Single error message to be shown underneath the form-field. */\r\n@Directive({\r\n selector: 'cute-error, [cuteError]',\r\n host: {\r\n 'class': 'cute-form-field-error cute-form-field-bottom-align invalid-feedback',\r\n 'aria-atomic': 'true',\r\n '[id]': 'id',\r\n '[attr.cuteErrorAttr]': 'true',\r\n },\r\n providers: [{provide: CUTE_ERROR, useExisting: CuteError}],\r\n})\r\nexport class CuteError implements OnInit, OnDestroy {\r\n @Input() id: string = inject(_IdGenerator).getId('cute-error-');\r\n\r\n constructor(...args: unknown[]);\r\n constructor(@Attribute('aria-live') ariaLive: string, elementRef: ElementRef) {\r\n // If no aria-live value is set, add 'polite' as a default. This is preferred over setting\r\n // role='alert' so that screen readers do not interrupt the current task to read this aloud.\r\n if (!ariaLive) {\r\n elementRef.nativeElement.setAttribute('aria-live', 'polite');\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n console.log(\"cute-error init.\");\r\n }\r\n\r\n ngOnDestroy() {\r\n console.log(\"cute-error destroy.\");\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {Directive, inject, Input} from '@angular/core';\r\nimport {_IdGenerator} from '@angular/cdk/a11y';\r\n\r\n/** Hint text to be shown underneath the form field control. */\r\n@Directive({\r\n selector: 'cute-hint',\r\n exportAs: 'cuteHint',\r\n host: {\r\n 'class': 'form-text cute-form-field-hint cute-form-field-bottom-align',\r\n '[class.cute-form-field-hint-end]': 'align === \"end\"',\r\n '[id]': 'id',\r\n // Remove align attribute to prevent it from interfering with layout.\r\n '[attr.align]': 'null',\r\n },\r\n})\r\nexport class CuteHint {\r\n /** Whether to align the hint label at the start or end of the line. */\r\n @Input() align: 'start' | 'end' = 'start';\r\n\r\n /** Unique ID for the hint. Used for the `aria-describedby` on the form field control. */\r\n @Input() id: string = inject(_IdGenerator).getId('cute-hint-');\r\n}\r\n","\r\n/** @docs-private */\r\nexport function getCuteFormFieldPlaceholderConflictError(): Error {\r\n return Error('Placeholder attribute and child element were both specified.');\r\n}\r\n\r\n/** @docs-private */\r\nexport function getCuteFormFieldDuplicatedHintError(align: string): Error {\r\n return Error(`A hint was already declared for 'align=\"${align}\"'.`);\r\n}\r\n\r\n/** @docs-private */\r\nexport function getCuteFormFieldMissingControlError(): Error {\r\n return Error('cute-form-field must contain a CuteFormFieldControl.');\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, ElementRef, inject, Input} from \"@angular/core\";\r\nimport {RelativeSize} from \"@cute-widgets/base/core/types\";\r\n\r\n/** The floating label for a `cute-form-field`. */\r\n@Directive({\r\n selector: 'cute-label',\r\n host: {\r\n '[style.font-size]': 'magnitude==\"small\" ? \"0.875rem\" : (magnitude==\"large\"? \"1.25rem\" : \"\")'\r\n }\r\n})\r\nexport class CuteLabel /* extends ... */ {\r\n\r\n private _elementRef = inject(ElementRef);\r\n\r\n /** Relative size (scale) of the label text. */\r\n @Input() magnitude: RelativeSize | undefined;\r\n\r\n /** Returns the label's current text. */\r\n getText(): string {\r\n return (this._elementRef.nativeElement as HTMLElement).innerText;\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {\r\n AfterContentChecked, afterEveryRender,\r\n ChangeDetectionStrategy,\r\n Component, computed, contentChild, ContentChild, ContentChildren, ElementRef, inject,\r\n InjectionToken, Injector, Input, isDevMode, NgZone, QueryList, ViewChild,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport {NgTemplateOutlet} from \"@angular/common\";\r\nimport {Direction, Directionality} from \"@angular/cdk/bidi\";\r\nimport {Platform} from \"@angular/cdk/platform\";\r\nimport {AbstractControlDirective, ValidatorFn} from \"@angular/forms\";\r\nimport {RelativeSize3, ThemeColor} from \"@cute-widgets/base/core\";\r\nimport {EMPTY, merge, pairwise, Subject, Subscription} from \"rxjs\";\r\nimport {filter, map, startWith, takeUntil} from \"rxjs/operators\";\r\nimport {CuteFormFieldControl as _CuteFormFieldControl} from \"./form-field-control\";\r\nimport {CUTE_PREFIX, CutePrefix} from \"./directives/prefix.directive\";\r\nimport {CUTE_SUFFIX, CuteSuffix} from \"./directives/suffix.directive\";\r\nimport {CUTE_ERROR, CuteError} from \"./directives/error.directive\";\r\nimport {CuteHint} from \"./directives/hint.directive\";\r\nimport {getCuteFormFieldDuplicatedHintError, getCuteFormFieldMissingControlError} from \"./form-field-errors\";\r\nimport {CuteLabel} from \"./directives/label.directive\";\r\nimport {CuteBaseControl} from \"@cute-widgets/base/abstract\";\r\nimport {BooleanInput, coerceBooleanProperty} from \"@angular/cdk/coercion\";\r\nimport {_animationsDisabled} from '@cute-widgets/base/core/animation';\r\n\r\n/** Type for the available floatLabel values. */\r\nexport type FloatLabelType = 'never' | 'always' | 'auto';\r\n\r\n/** Behaviors for how the subscript height is set. */\r\nexport type SubscriptSizing = 'fixed' | 'dynamic';\r\n\r\n/**\r\n * Represents the default options for the form field that can be configured\r\n * using the `CUTE_FORM_FIELD_DEFAULT_OPTIONS` injection token.\r\n */\r\nexport interface CuteFormFieldDefaultOptions {\r\n /** Default form field appearance style. */\r\n //appearance?: CuteFormFieldAppearance;\r\n /** Default color of the form field. */\r\n color?: ThemeColor;\r\n /** Whether the required marker should be hidden by default. */\r\n hideRequiredMarker?: boolean;\r\n /** Whether the label for form fields should by default float */\r\n floatLabel?: FloatLabelType;\r\n /** Whether the form field should reserve space for one line by default. */\r\n subscriptSizing?: SubscriptSizing;\r\n}\r\n\r\n/**\r\n * Injection token that can be used to inject an instances of `CuteFormField`. It serves\r\n * as an alternative token to the actual `CuteFormField` class which would cause unnecessary\r\n * retention of the `CuteFormField` class and its component metadata.\r\n */\r\nexport const CUTE_FORM_FIELD = new InjectionToken<CuteFormField>('CuteFormField');\r\n\r\n/**\r\n * Injection token that can be used to configure the\r\n * default options for all form fields within an app.\r\n */\r\nexport const CUTE_FORM_FIELD_DEFAULT_OPTIONS = new InjectionToken<CuteFormFieldDefaultOptions>(\r\n 'CUTE_FORM_FIELD_DEFAULT_OPTIONS',\r\n);\r\n\r\n/** Styles that are to be applied to the label elements in the outlined appearance. */\r\ntype OutlinedLabelStyles =\r\n | [floatingLabelTransform: string, notchedOutlineWidth: number | null]\r\n | null;\r\n\r\n/**\r\n * Whether the label for form fields should by default float `always`,\r\n * `never`, or `auto`.\r\n */\r\nconst DEFAULT_FLOAT_LABEL: FloatLabelType = 'never';\r\n\r\n/** Default way that the subscript element height is set. */\r\nconst DEFAULT_SUBSCRIPT_SIZING: SubscriptSizing = 'fixed';\r\n\r\n/**\r\n * Despite `CuteFormFieldControl` being an abstract class, most of our usages enforce its shape\r\n * using `implements` instead of `extends`. This appears to be problematic when Closure compiler\r\n * is configured to use type information to rename properties, because it can't figure out which\r\n * class properties are coming from. This interface seems to work around the issue while preserving\r\n * our type safety (instead being using `any` everywhere).\r\n * @docs-private\r\n */\r\ninterface CuteFormFieldControl<T> extends _CuteFormFieldControl<T> {}\r\n\r\nlet nextUniqueId = 0;\r\n\r\n@Component({\r\n selector: 'cute-form-field',\r\n templateUrl: './form-field.component.html',\r\n styleUrls: ['./form-field.component.scss'],\r\n exportAs: 'cuteFormField',\r\n host: {\r\n 'class': 'cute-form-field',\r\n '[class.cute-form-field-label-always-float]': '_shouldAlwaysFloat()',\r\n '[class.cute-form-field-invalid]': '_control?.errorState',\r\n '[class.cute-form-field-disabled]': '_control?.disabled',\r\n '[class.cute-form-field-autofilled]': '_control?.autofilled',\r\n '[class.ng-untouched]': '_shouldForward(\"untouched\")',\r\n '[class.ng-touched]': '_shouldForward(\"touched\")',\r\n '[class.ng-pristine]': '_shouldForward(\"pristine\")',\r\n '[class.ng-dirty]': '_shouldForward(\"dirty\")',\r\n '[class.ng-valid]': '_shouldForward(\"valid\")',\r\n '[class.ng-invalid]': '_shouldForward(\"invalid\")',\r\n '[class.ng-pending]': '_shouldForward(\"pending\")',\r\n },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n { provide: CUTE_FORM_FIELD, useExisting: CuteFormField },\r\n ],\r\n imports: [\r\n NgTemplateOutlet,\r\n CuteHint\r\n ]\r\n})\r\nexport class CuteFormField extends CuteBaseControl implements AfterContentChecked {\r\n override _elementRef = inject(ElementRef);\r\n private _dir = inject(Directionality);\r\n private _platform = inject(Platform);\r\n private _ngZone = inject(NgZone);\r\n private _defaults = inject<CuteFormFieldDefaultOptions>(CUTE_FORM_FIELD_DEFAULT_OPTIONS, {\r\n optional: true,\r\n });\r\n private _currentDirection: Direction | undefined;\r\n\r\n @ViewChild('textField') _textField: ElementRef<HTMLElement> | undefined;\r\n //@ViewChild('iconPrefixContainer') _iconPrefixContainer: ElementRef<HTMLElement> | undefined;\r\n //@ViewChild('textPrefixContainer') _textPrefixContainer: ElementRef<HTMLElement> | undefined;\r\n //@ViewChild('iconSuffixContainer') _iconSuffixContainer: ElementRef<HTMLElement> | undefined;\r\n //@ViewChild('textSuffixContainer') _textSuffixContainer: ElementRef<HTMLElement> | undefined;\r\n\r\n @ContentChild(CuteLabel) _labelChildNonStatic: CuteLabel | undefined;\r\n @ContentChild(CuteLabel, {static: true}) _labelChildStatic: CuteLabel | undefined;\r\n @ContentChild(_CuteFormFieldControl) _formFieldControl: CuteFormFieldControl<any> | undefined;\r\n @ContentChildren(CUTE_PREFIX, {descendants: true}) _prefixChildren: QueryList<CutePrefix> | undefined;\r\n @ContentChildren(CUTE_SUFFIX, {descendants: true}) _suffixChildren: QueryList<CuteSuffix> | undefined;\r\n @ContentChildren(CUTE_ERROR, {descendants: true}) _errorChildren: QueryList<CuteError> | undefined;\r\n @ContentChildren(CuteHint, {descendants: true}) _hintChildren: QueryList<CuteHint> | undefined;\r\n\r\n private readonly _labelChild = contentChild(CuteLabel);\r\n\r\n /** Whether to display the CSS styles for a _valid_ control status after it has been checked. */\r\n @Input()\r\n get hideValidStyle():boolean { return this._hideValidStyle; }\r\n set hideValidStyle(hideValid: BooleanInput) {\r\n this._hideValidStyle = coerceBooleanProperty(hideValid);\r\n this.displayValidity(!this._hideValidStyle);\r\n }\r\n private _hideValidStyle: boolean = false;\r\n\r\n /** Whether the required marker should be hidden. */\r\n @Input()\r\n get hideRequiredMarker(): boolean { return this._hideRequiredMarker; }\r\n set hideRequiredMarker(value: BooleanInput) {\r\n this._hideRequiredMarker = coerceBooleanProperty(value);\r\n }\r\n private _hideRequiredMarker = false;\r\n\r\n /** The relative size of the form field */\r\n @Input()\r\n magnitude: RelativeSize3 | undefined;\r\n\r\n /** Whether the label should always float or float as the user types. */\r\n @Input()\r\n get floatLabel(): FloatLabelType {\r\n return this._floatLabel || this._defaults?.floatLabel || DEFAULT_FLOAT_LABEL;\r\n }\r\n set floatLabel(value: FloatLabelType) {\r\n if (value !== this._floatLabel) {\r\n this._floatLabel = value;\r\n // For backwards compatibility. Custom form field controls or directives might set\r\n // the \"floatLabel\" input and expect the form field view to be updated automatically.\r\n // e.g. autocomplete trigger. Ideally we'd get rid of this and the consumers would just\r\n // emit the \"stateChanges\" observable. TODO(devversion): consider removing.\r\n this.markForCheck();\r\n }\r\n }\r\n private _floatLabel: FloatLabelType = \"never\";\r\n\r\n /**\r\n * Whether the form field should reserve space for one line of hint/error text (default)\r\n * or to have the spacing grow from 0px as needed based on the size of the hint/error content.\r\n * Note that when using dynamic sizing, layout shifts will occur when hint/error text changes.\r\n */\r\n @Input()\r\n get subscriptSizing(): SubscriptSizing {\r\n return this._subscriptSizing || this._defaults?.subscriptSizing || DEFAULT_SUBSCRIPT_SIZING;\r\n }\r\n set subscriptSizing(value: SubscriptSizing) {\r\n this._subscriptSizing = value || this._defaults?.subscriptSizing || DEFAULT_SUBSCRIPT_SIZING;\r\n }\r\n private _subscriptSizing: SubscriptSizing | null = null;\r\n\r\n /** Text for the form field hint. */\r\n @Input()\r\n get hintLabel(): string { return this._hintLabel; }\r\n set hintLabel(value: string) {\r\n this._hintLabel = value;\r\n this._processHints();\r\n }\r\n private _hintLabel = '';\r\n\r\n protected _hasIconPrefix = false;\r\n protected _hasTextPrefix = false;\r\n protected _hasIconSuffix = false;\r\n protected _hasTextSuffix = false;\r\n\r\n // Unique id for the internal form field label.\r\n readonly _labelId = `cute-form-field-label-${nextUniqueId++}`;\r\n\r\n // Unique id for the hint label.\r\n readonly _hintLabelId = `cute-hint-${nextUniqueId++}`;\r\n\r\n// Ids obtained from the error and hint fields\r\n private _describedByIds: string[] | undefined;\r\n\r\n /** Gets the current form field control */\r\n get _control(): CuteFormFieldControl<any> | undefined {\r\n return this._explicitFormFieldControl || this._formFieldControl;\r\n }\r\n set _control(value) {\r\n this._explicitFormFieldControl = value;\r\n }\r\n private _explicitFormFieldControl: CuteFormFieldControl<any> | undefined;\r\n\r\n /** Subject that emits when the component has been destroyed. */\r\n private _destroyed = new Subject<void>();\r\n private _isFocused: boolean | null = null;\r\n private _needsOutlineLabelOffsetUpdate = false;\r\n private _previousControl: CuteFormFieldControl<any> | undefined = undefined;\r\n private _previousControlValidatorFn: ValidatorFn | null = null;\r\n private _stateChanges: Subscription | undefined;\r\n private _valueChanges: Subscription | undefined;\r\n private _describedByChanges: Subscription | undefined;\r\n protected readonly _animationsDisabled = _animationsDisabled();\r\n\r\n private _injector = inject(Injector);\r\n\r\n /** Returns bootstrap's size suffix for CSS classes */\r\n protected get magnitudeSuffix(): string {\r\n if (this.magnitude == \"small\") {\r\n return \"-sm\";\r\n } else if (this.magnitude == \"large\") {\r\n return \"-lg\";\r\n }\r\n return \"\";\r\n }\r\n\r\n public get _isFloatLabel(): boolean {\r\n return this.floatLabel == \"auto\" || this.floatLabel == \"always\";\r\n }\r\n\r\n protected override generateId(): string {\r\n return \"\";\r\n }\r\n\r\n constructor(...args: unknown[]);\r\n constructor() {\r\n super();\r\n const defaults = this._defaults;\r\n if (defaults) {\r\n //if (_defaults.appearance) {\r\n // this.appearance = _defaults.appearance;\r\n //}\r\n this.hideRequiredMarker = Boolean(defaults?.hideRequiredMarker);\r\n if (defaults.color) {\r\n this.color = defaults.color;\r\n }\r\n }\r\n }\r\n\r\n protected override setDisabledState(newState: BooleanInput, emitEvent?: boolean): boolean {\r\n this._control?.setDisabledState( coerceBooleanProperty(newState) );\r\n return super.setDisabledState(newState, emitEvent);\r\n }\r\n\r\n override ngAfterViewInit() {\r\n super.ngAfterViewInit();\r\n // Initial focus state sync. This happens rarely, but we want to account for\r\n // it in case the form field control has \"focused\" set to true on init.\r\n this._updateFocusState();\r\n\r\n if (!this._animationsDisabled) {\r\n this._ngZone.runOutsideAngular(() => {\r\n // Enable animations after a certain amount of time so that they don't run on init.\r\n setTimeout(() => {\r\n this._elementRef.nativeElement.classList.add('cute-form-field-animations-enabled');\r\n }, 300);\r\n });\r\n }\r\n // Because the above changes a value used in the template after it was checked, we need\r\n // to trigger CD or the change might not be reflected if there is no other CD scheduled.\r\n this._changeDetectorRef.detectChanges();\r\n }\r\n\r\n override ngAfterContentInit() {\r\n super.ngAfterContentInit();\r\n\r\n this._assertFormFieldControl();\r\n this._initializeSubscript();\r\n this._initializePrefixAndSuffix();\r\n this._initializeOutlineLabelOffsetSubscriptions();\r\n\r\n // CWT: Set `magnitude` value of the component to the child's `label` control as a default value\r\n const childLabel = this._labelChildNonStatic || this._labelChildStatic;\r\n if (childLabel && !childLabel.magnitude) {\r\n childLabel.magnitude = this.magnitude;\r\n }\r\n }\r\n\r\n ngAfterContentChecked() {\r\n this._assertFormFieldControl();\r\n\r\n if (this._control !== this._previousControl) {\r\n this._initializeControl(this._previousControl);\r\n\r\n // keep a reference for last validator we had.\r\n if (this._control?.ngControl && this._control.ngControl.control) {\r\n this._previousControlValidatorFn = this._control.ngControl.control.validator;\r\n }\r\n\r\n this._previousControl = this._control;\r\n }\r\n\r\n // make sure the control has been initialized.\r\n if (this._control?.ngControl && this._control.ngControl.control) {\r\n // get the validators for current control.\r\n const validatorFn = this._control.ngControl.control.validator;\r\n\r\n // if our current validatorFn isn't equal to it might be we are CD behind, marking the\r\n // component will allow us to catch up.\r\n if (validatorFn !== this._previousControlValidatorFn) {\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n this._stateChanges?.unsubscribe();\r\n this._valueChanges?.unsubscribe();\r\n this._destroyed.next();\r\n this._destroyed.complete();\r\n }\r\n\r\n /**\r\n * Gets the id of the label element. If no label is present, returns `null`.\r\n */\r\n getLabelId = computed(() => (this._hasFloatingLabel() ? this._labelId : null));\r\n\r\n /**\r\n * Gets an ElementRef for the element that an overlay attached to the form field\r\n * should be positioned relative to.\r\n */\r\n getConnectedOverlayOrigin(): ElementRef {\r\n //return this._control?.controlElementRef || this._textField || this._elementRef;\r\n return this._textField || this._elementRef;\r\n }\r\n\r\n /** Animates the placeholder up and locks it in position. */\r\n _animateAndLockLabel(): void {\r\n // This is for backwards compatibility only. Consumers of the form field might use\r\n // this method. e.g. the autocomplete trigger. This method has been added to the non-MDC\r\n // form field because setting \"floatLabel\" to \"always\" caused the label to float without\r\n // animation. This is different in MDC where the label always animates, so this method\r\n // is no longer necessary. There doesn't seem any benefit in adding logic to allow changing\r\n // the floating label state without animations. The non-MDC implementation was inconsistent\r\n // because it always animates if \"floatLabel\" is set away from \"always\".\r\n // TODO(devversion): consider removing this method when releasing the MDC form field.\r\n if (this._hasFloatingLabel()) {\r\n this.floatLabel = 'always';\r\n }\r\n }\r\n\r\n /**\r\n * Toggles Bootstrap's validation classes `is-valid` & `is-invalid`.\r\n * @param hideValid Whether to remove Bootstrap's `is-valid` class.\r\n */\r\n protected displayValidity(hideValid?: boolean): void {\r\n const elem: HTMLElement|undefined = this._control?.controlElementRef?.nativeElement as HTMLElement;\r\n const classList = elem?.classList;\r\n if (classList) {\r\n const touched = classList.contains(\"ng-touched\");\r\n const dirty = classList.contains(\"ng-dirty\");\r\n if (hideValid) {\r\n classList.toggle(\"is-valid\", false);\r\n } else {\r\n classList.toggle(\"is-valid\", classList.contains(\"ng-valid\") && (touched));\r\n }\r\n if (this._control?.errorState) {\r\n classList.toggle(\"is-invalid\", classList.contains(\"ng-invalid\") && (touched || dirty));\r\n } else {\r\n classList.toggle(\"is-invalid\", false);\r\n }\r\n this.markForCheck();\r\n }\r\n }\r\n\r\n /** Initializes the registered form field control. */\r\n private _initializeControl(previousControl: CuteFormFieldControl<any> | undefined) {\r\n const control = this._control;\r\n const classPrefix = 'cute-form-field-type-';\r\n\r\n if (previousControl) {\r\n this._elementRef.nativeElement.classList.remove(classPrefix + previousControl.controlType);\r\n }\r\n\r\n this._stateChanges?.unsubscribe();\r\n this._valueChanges?.unsubscribe();\r\n this._describedByChanges?.unsubscribe();\r\n\r\n if (control) {\r\n if (control.controlType) {\r\n this._elementRef.nativeElement.classList.add(classPrefix + control.controlType);\r\n }\r\n\r\n // Subscribe to changes in the child control state to update the form field UI.\r\n this._stateChanges = control.stateChanges?.subscribe(() => {\r\n this._updateFocusState();\r\n this.markForCheck();\r\n\r\n // CWT: Run CSS-classes validity after the change detection\r\n setTimeout(() => {\r\n this.displayValidity(this.hideValidStyle);\r\n });\r\n });\r\n\r\n // Updating the `aria-describedby` touches the DOM. Only do it if it actually needs to change.\r\n this._describedByChanges = control.stateChanges?.pipe(\r\n startWith([undefined, undefined] as const),\r\n map(() => [control.errorState, control.userAriaDescribedBy] as const),\r\n pairwise(),\r\n filter(([[prevErrorState, prevDescribedBy], [currentErrorState, currentDescribedBy]]) => {\r\n return prevErrorState !== currentErrorState || prevDescribedBy !== currentDescribedBy;\r\n }),\r\n )\r\n .subscribe(() => this._syncDescribedByIds());\r\n\r\n // Run change detection if the value changes.\r\n if (control.ngControl && control.ngControl.valueChanges) {\r\n this._valueChanges = control.ngControl.valueChanges\r\n .pipe(takeUntil(this._destroyed))\r\n .subscribe(() => this.markForCheck());\r\n }\r\n }\r\n }\r\n\r\n private _checkPrefixAndSuffixTypes() {\r\n this._hasIconPrefix = !!this._prefixChildren?.find(p => !p._isText);\r\n this._hasTextPrefix = !!this._prefixChildren?.find(p => p._isText);\r\n this._hasIconSuffix = !!this._suffixChildren?.find(s => !s._isText);\r\n this._hasTextSuffix = !!this._suffixChildren?.find(s => s._isText);\r\n }\r\n\r\n /** Initializes the prefix and suffix containers. */\r\n private _initializePrefixAndSuffix() {\r\n this._checkPrefixAndSuffixTypes();\r\n // Mark the form field as dirty whenever the prefix or suffix children change. This\r\n // is necessary because we conditionally display the prefix/suffix containers based\r\n // on whether there is projected content.\r\n merge(this._prefixChildren?.changes||EMPTY, this._suffixChildren?.changes||EMPTY).subscribe(() => {\r\n this._checkPrefixAndSuffixTypes();\r\n this.markForCheck();\r\n });\r\n }\r\n\r\n /**\r\n * Initializes the subscript by validating hints and synchronizing \"aria-describedby\" ids\r\n * with the custom form field control. Also subscribe to hint and error changes\r\n * to be able to validate and synchronize ids on change.\r\n */\r\n private _initializeSubscript() {\r\n // Re-validate when the number of hints changes.\r\n this._hintChildren?.changes.subscribe(() => {\r\n this._processHints();\r\n this.markForCheck();\r\n });\r\n\r\n // Update the aria-described by when the number of errors changes.\r\n this._errorChildren?.changes.subscribe(() => {\r\n this._syncDescribedByIds();\r\n this.markForCheck();\r\n });\r\n\r\n // Initial mat-hint validation and subscript describedByIds sync.\r\n this._validateHints();\r\n this._syncDescribedByIds();\r\n }\r\n\r\n /** Throws an error if the form field's control is missing. */\r\n private _assertFormFieldControl() {\r\n if (!this._control && isDevMode()) {\r\n throw getCuteFormFieldMissingControlError();\r\n }\r\n }\r\n\r\n private _updateFocusState() {\r\n const controlFocused = this._control?.focused;\r\n\r\n // Usually, the MDC foundation would call \"activateFocus\" and \"deactivateFocus\" whenever\r\n // certain DOM events are emitted. This is not possible in our implementation of the\r\n // form field because we support abstract form field controls which are not necessarily\r\n // of type input, nor do we have a reference to a native form field control element. Instead,\r\n // we handle the focus by checking if the abstract form field control focused state changes.\r\n if (controlFocused && !this._isFocused) {\r\n this._isFocused = true;\r\n //this._lineRipple?.activate();\r\n } else if (!controlFocused && (this._isFocused || this._isFocused === null)) {\r\n this._isFocused = false;\r\n //this._lineRipple?.deactivate();\r\n }\r\n\r\n this._elementRef.nativeElement.classList.toggle('cute-focused', controlFocused);\r\n this._textField?.nativeElement.classList.toggle('cute-text-field--focused', controlFocused);\r\n }\r\n\r\n /**\r\n * The floating label in the docked state needs to account for prefixes. The horizontal offset\r\n * is calculated whenever the appearance changes to `outline`, the prefixes change, or when the\r\n * form field is added to the DOM. This method sets up all subscriptions that are needed to\r\n * trigger the label offset update. In general, we want to avoid performing measurements often,\r\n * so we rely on the `NgZone` as indicator when the offset should be recalculated, instead of\r\n * checking every change detection cycle.\r\n * @deprecated\r\n */\r\n private _initializeOutlineLabelOffsetSubscriptions() {\r\n // Whenever the prefix changes, schedule an update of the label offset.\r\n this._prefixChildren?.changes.subscribe(\r\n () => (this._needsOutlineLabelOffsetUpdate = true),\r\n );\r\n\r\n // TODO(mmalerba): Split this into separate `afterEveryRender` calls using the `EarlyRead` and\r\n // `Write` phases.\r\n afterEveryRender(\r\n () => {\r\n if (this._needsOutlineLabelOffsetUpdate) {\r\n this._needsOutlineLabelOffsetUpdate = false;\r\n this._getOutlinedLabelOffset();\r\n }\r\n },\r\n {\r\n injector: this._injector,\r\n },\r\n );\r\n\r\n this._dir.change\r\n .pipe(takeUntil(this._destroyed))\r\n .subscribe(() => (this._needsOutlineLabelOffsetUpdate = true));\r\n }\r\n\r\n /** Is there any `<cute-label>` in the form field? */\r\n protected _hasFloatingLabel = computed(() => !!this._labelChild());\r\n\r\n /** Whether the floating label should always float or not. */\r\n protected _shouldAlwaysFloat() {\r\n return this.floatLabel === 'always';\r\n }\r\n\r\n /** <cute-datepicker> uses this method */\r\n _shouldLabelFloat(): boolean {\r\n //return false;\r\n if (!this._hasFloatingLabel()) {\r\n return false;\r\n }\r\n return this._control?.shouldLabelFloat || this._shouldAlwaysFloat();\r\n }\r\n\r\n /**\r\n * Determines whether a class from the AbstractControlDirective\r\n * should be forwarded to the host element.\r\n */\r\n protected _shouldForward(prop: keyof AbstractControlDirective): boolean {\r\n const control = this._control ? this._control.ngControl : null;\r\n return control && control[prop];\r\n }\r\n\r\n /**\r\n * Determines whether to display hints or errors.\r\n * @author A.Strelkov:\r\n * + Add _undefined_ to return value when no hints and errors exist.\r\n * + Change to `protected`.\r\n */\r\n protected _getSubscriptMessageType(): 'error' | 'hint' | undefined {\r\n return this._errorChildren && this._errorChildren.length > 0 && this._control?.errorState\r\n ? 'error'\r\n : this._hintChildren && this._hintChildren.length > 0\r\n ? 'hint'\r\n : undefined;\r\n }\r\n\r\n /** Does any extra processing required when handling the hints. */\r\n private _processHints() {\r\n this._validateHints();\r\n this._syncDescribedByIds();\r\n }\r\n\r\n /**\r\n * Ensure that there is a maximum of one of each \"cute-hint\" alignment specified. The hint\r\n * label specified set through the input is being considered as \"start\" aligned.\r\n *\r\n * This method is a noop if Angular runs in production mode.\r\n */\r\n private _validateHints() {\r\n if (this._hintChildren && isDevMode()) {\r\n let startHint: CuteHint;\r\n let endHint: CuteHint;\r\n this._hintChildren.forEach((hint: CuteHint) => {\r\n if (hint.align === 'start') {\r\n if (startHint || this.hintLabel) {\r\n throw getCuteFormFieldDuplicatedHintError('start');\r\n }\r\n startHint = hint;\r\n } else if (hint.align === 'end') {\r\n if (endHint) {\r\n throw getCuteFormFieldDuplicatedHintError('end');\r\n }\r\n endHint = hint;\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Sets the list of element IDs that describe the child control. This allows the control to update\r\n * its `aria-describedby` attribute accordingly.\r\n */\r\n private _syncDescribedByIds() {\r\n if (this._control) {\r\n let ids: string[] = [];\r\n\r\n // TODO(wagnermaciel): Remove the type check when we find the root cause of this bug.\r\n if (\r\n this._control.userAriaDescribedBy &&\r\n typeof this._control.userAriaDescribedBy === 'string'\r\n ) {\r\n ids.push(...this._control.userAriaDescribedBy.split(' '));\r\n }\r\n\r\n if (this._getSubscriptMessageType() === 'hint') {\r\n const startHint = this._hintChildren\r\n ? this._hintChildren.find(hint => hint.align === 'start')\r\n : null;\r\n const endHint = this._hintChildren\r\n ? this._hintChildren.find(hint => hint.align === 'end')\r\n : null;\r\n\r\n if (startHint) {\r\n ids.push(startHint.id);\r\n } else if (this._hintLabel) {\r\n ids.push(this._hintLabelId);\r\n }\r\n\r\n if (endHint) {\r\n ids.push(endHint.id);\r\n }\r\n } else if (this._errorChildren) {\r\n ids.push(...this._errorChildren.map(error => error.id));\r\n }\r\n\r\n const existingDescribedBy = this._control.describedByIds;\r\n let toAssign: string[];\r\n\r\n // In some cases there might be some `aria-describedby` IDs that were assigned directly,\r\n // like by the `AriaDescriber` (see #30011). Attempt to preserve them by taking the previous\r\n // attribute value and filtering out the IDs that came from the previous `setDescribedByIds`\r\n // call. Note the `|| ids` here allows us to avoid duplicating IDs on the first render.\r\n if (existingDescribedBy) {\r\n const exclude = this._describedByIds || ids;\r\n toAssign = ids.concat(existingDescribedBy.filter(id => id && !exclude.includes(id)));\r\n } else {\r\n toAssign = ids;\r\n }\r\n\r\n this._control.setDescribedByIds(toAssign);\r\n this._describedByIds = ids;\r\n }\r\n }\r\n\r\n /**\r\n * Calculates the horizontal offset of the label in the outline appearance. In the outline\r\n * appearance, the notched-outline and label are not relative to the infix container because\r\n * the outline intends to surround prefixes, suffixes and the infix. This means that the\r\n * floating label by default overlaps prefixes in the docked state. To avoid this, we need to\r\n * horizontally offset the label by the width of the prefix container. The MDC text-field does\r\n * not need to do this because they use a fixed width for prefixes. Hence, they can simply\r\n * incorporate the horizontal offset into their default text-field styles.\r\n */\r\n private _getOutlinedLabelOffset(): OutlinedLabelStyles {\r\n return null;\r\n\r\n /*\r\n if (!this._hasOutline() || !this._floatingLabel) {\r\n return;\r\n }\r\n const floatingLabel = this._floatingLabel.element;\r\n // If no prefix is displayed, reset the outline label offset from potential\r\n // previous label offset updates.\r\n if (!(this._iconPrefixContainer || this._textPrefixContainer)) {\r\n floatingLabel.style.transform = '';\r\n return;\r\n }\r\n // If the form field is not attached to the DOM yet (e.g. in a tab), we defer\r\n // the label offset update until the zone stabilizes.\r\n if (!this._isAttachedToDom()) {\r\n this._needsOutlineLabelOffsetUpdate = true;\r\n return;\r\n }\r\n const iconPrefixContainer = this._iconPrefixContainer?.nativeElement;\r\n const textPrefixContainer = this._textPrefixContainer?.nativeElement;\r\n const iconSuffixContainer = this._iconSuffixContainer?.nativeElement;\r\n const textSuffixContainer = this._textSuffixContainer?.nativeElement;\r\n const iconPrefixContainerWidth = iconPrefixContainer?.getBoundingClientRect().width ?? 0;\r\n const textPrefixContainerWidth = textPrefixContainer?.getBoundingClientRect().width ?? 0;\r\n const iconSuffixContainerWidth = iconSuffixContainer?.getBoundingClientRect().width ?? 0;\r\n const textSuffixContainerWidth = textSuffixContainer?.getBoundingClientRect().width ?? 0;\r\n // If the directionality is RTL, the x-axis transform needs to be inverted. This\r\n // is because `transformX` does not change based on the page directionality.\r\n const negate = this._dir.value === 'rtl' ? '-1' : '1';\r\n const prefixWidth = `${iconPrefixContainerWidth + textPrefixContainerWidth}px`;\r\n const labelOffset = `var(--mat-mdc-form-field-label-offset-x, 0px)`;\r\n const labelHorizontalOffset = `calc(${negate} * (${prefixWidth} + ${labelOffset}))`;\r\n\r\n // Update the translateX of the floating label to account for the prefix container,\r\n // but allow the CSS to override this setting via a CSS variable when the label is\r\n // floating.\r\n floatingLabel.style.transform = `var(\r\n --mat-mdc-form-field-label-transform,\r\n ${FLOATING_LABEL_DEFAULT_DOCKED_TRANSFORM} translateX(${labelHorizontalOffset})\r\n )`;\r\n\r\n // Prevent the label from overlapping the suffix when in resting position.\r\n const prefixAndSuffixWidth =\r\n iconPrefixContainerWidth +\r\n textPrefixContainerWidth +\r\n iconSuffixContainerWidth +\r\n textSuffixContainerWidth;\r\n this._elementRef.nativeElement.style.setProperty(\r\n '--mat-form-field-notch-max-width',\r\n `calc(100% - ${prefixAndSuffixWidth}px)`,\r\n );\r\n */\r\n }\r\n\r\n /** Checks whether the form field is attached to the DOM. */\r\n private _isAttachedToDom(): boolean {\r\n const element: HTMLElement = this._elementRef.nativeElement;\r\n if (element.getRootNode) {\r\n const rootNode = element.getRootNode();\r\n // If the element is inside the DOM, the root node will be either the document\r\n // or the closest shadow root, otherwise it'll be the element itself.\r\n return rootNode && rootNode !== element;\r\n }\r\n // Otherwise, fall back to checking if it's in the document. This doesn't account for\r\n // shadow DOM, however, browser that supports shadow DOM should support `getRootNode` as well.\r\n return document.documentElement!.contains(element);\r\n }\r\n\r\n}\r\n","<ng-template #labelTemplate>\r\n @if (_hasFloatingLabel()) {\r\n <label class=\"form-label cute-form-control-placeholder\"\r\n [id]=\"_labelId\"\r\n [attr.for]=\"(_control && !_control.disableAutomaticLabeling) ? _control.id : null\"\r\n tabindex=\"-1\">\r\n <ng-content select=\"cute-label\"></ng-content>\r\n <!--\r\n We set the required marker as a separate element, in order to make it easier to target if\r\n apps want to override it and to be able to set `aria-hidden` so that screen readers don't\r\n pick it up.\r\n -->\r\n @if (!hideRequiredMarker && _control?.required) {\r\n <span aria-hidden=\"true\"\r\n class=\"cute-form-field-required-marker cute-floating-label--required\">\r\n </span>\r\n }\r\n </label>\r\n }\r\n</ng-template>\r\n\r\n<div class=\"cute-text-field\" #textField (click)=\"_control?.onContainerClick($event)\">\r\n\r\n <!-- label -->\r\n @if (!_isFloatLabel) {\r\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\r\n }\r\n\r\n <!-- brief instruction -->\r\n <!-- <ng-content select=\"cute-intro\"></ng-content>-->\r\n\r\n <!-- input -->\r\n <div class=\"flex-nowrap cute-text-field__input\"\r\n [class]=\"!_isFloatLabel?'input-group '+(magnitudeSuffix?' input-group'+magnitudeSuffix :''):''\"\r\n [class.form-floating]=\"_isFloatLabel\">\r\n\r\n @if (_hasIconPrefix) {\r\n <ng-content select=\"[cutePrefix], [cuteIconPrefix]\"></ng-content>\r\n }\r\n @if (_hasTextPrefix) {\r\n <ng-content select=\"[cuteTextPrefix]\"></ng-content>\r\n }\r\n\r\n<!-- <div #infixField class=\"cute-form-field-control input-group-text\">-->\r\n <ng-content></ng-content>\r\n @if (_isFloatLabel) {\r\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\r\n }\r\n<!-- </div>-->\r\n\r\n @if (_hasTextSuffix) {\r\n <ng-content select=\"[cuteTextSuffix]\"></ng-content>\r\n }\r\n @if (_hasIconSuffix) {\r\n <ng-content select=\"[cuteSuffix], [cuteIconSuffix]\"></ng-content>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<!--<ng-content select=\"cute-error, [cuteError]\"></ng-content>-->\r\n\r\n<!-- messages -->\r\n\r\n<div [class.cute-form-field-bottom-align]=\"subscriptSizing=='fixed'\">\r\n\r\n @let subscriptMessageType = _getSubscriptMessageType();\r\n\r\n @switch (subscriptMessageType) {\r\n @case ('error') {\r\n <div class=\"cute-form-field-error-wrapper\">\r\n <ng-content select=\"cute-error, [cuteError]\"></ng-content>\r\n </div>\r\n }\r\n\r\n @case ('hint') {\r\n <div class=\"cute-form-field-hint-wrapper\">\r\n @if (hintLabel) {\r\n <cute-hint [id]=\"_hintLabelId\">{{hintLabel}}</cute-hint>\r\n }\r\n <ng-content select=\"cute-hint:not([align='end'])\"></ng-content>\r\n <div class=\"cute-form-field-hint-spacer\"></div>\r\n <ng-content select=\"cute-hint[align='end']\"></ng-content>\r\n </div>\r\n }\r\n }\r\n</div>\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, ElementRef, inject, Input} from \"@angular/core\";\r\nimport {RelativeSize} from \"@cute-widgets/base/core/types\";\r\n\r\n/** Intro text to be shown underneath the label of the form field control. */\r\n@Directive({\r\n selector: 'cute-intro',\r\n exportAs: 'cuteIntro',\r\n host: {\r\n '[style.font-size]': 'magnitude==\"small\" ? \"0.875rem\" : (magnitude==\"large\"? \"1.25rem\" : \"\")'\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteIntro /* extends ... */ {\r\n private _elementRef = inject(ElementRef);\r\n\r\n /** Relative size (scale) of the intro text */\r\n @Input()\r\n magnitude: RelativeSize | undefined;\r\n\r\n /** Returns the intro's current text. */\r\n getText(): string {\r\n return (this._elementRef.nativeElement as HTMLElement).innerText;\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteFormField} from \"./form-field.component\";\r\nimport {CuteLabel} from \"./directives/label.directive\";\r\nimport {CuteIntro} from \"./directives/intro.directive\";\r\nimport {CuteHint} from \"./directives/hint.directive\";\r\nimport {CutePrefix} from \"./directives/prefix.directive\";\r\nimport {CuteSuffix} from \"./directives/suffix.directive\";\r\nimport {CuteError} from \"./directives/error.directive\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteFormField,\r\n CuteLabel,\r\n CuteIntro,\r\n CuteHint,\r\n CutePrefix,\r\n CuteSuffix,\r\n CuteError,\r\n];\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n})\r\nexport class CuteFormFieldModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["_CuteFormFieldControl"],"mappings":";;;;;;;;;;;;AAeA;MAEsB,oBAAoB,CAAA;AAD1C,IAAA,WAAA,GAAA;;QAGE,IAAA,CAAA,KAAK,GAAa,IAAI;;QAeb,IAAA,CAAA,SAAS,GAAgD,IAAI;;QAG7D,IAAA,CAAA,OAAO,GAAY,KAAK;;QAGxB,IAAA,CAAA,KAAK,GAAY,KAAK;;QAGtB,IAAA,CAAA,gBAAgB,GAAW,KAAK;;QAGhC,IAAA,CAAA,QAAQ,GAAY,KAAK;;QAGzB,IAAA,CAAA,QAAQ,GAAY,KAAK;;QAGzB,IAAA,CAAA,UAAU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