@ng-doc/ui-kit 22.0.0-beta.1 → 22.0.0

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 (210) hide show
  1. package/README.md +20 -29
  2. package/fesm2022/ng-doc-ui-kit-cdk-combobox-host.mjs +43 -22
  3. package/fesm2022/ng-doc-ui-kit-cdk-combobox-host.mjs.map +1 -1
  4. package/fesm2022/ng-doc-ui-kit-classes-base-input.mjs +24 -13
  5. package/fesm2022/ng-doc-ui-kit-classes-base-input.mjs.map +1 -1
  6. package/fesm2022/ng-doc-ui-kit-classes-overlay-ref.mjs +62 -22
  7. package/fesm2022/ng-doc-ui-kit-classes-overlay-ref.mjs.map +1 -1
  8. package/fesm2022/ng-doc-ui-kit-components-blockquote.mjs +39 -14
  9. package/fesm2022/ng-doc-ui-kit-components-blockquote.mjs.map +1 -1
  10. package/fesm2022/ng-doc-ui-kit-components-button-icon.mjs +30 -18
  11. package/fesm2022/ng-doc-ui-kit-components-button-icon.mjs.map +1 -1
  12. package/fesm2022/ng-doc-ui-kit-components-button-toggle.mjs +12 -9
  13. package/fesm2022/ng-doc-ui-kit-components-button-toggle.mjs.map +1 -1
  14. package/fesm2022/ng-doc-ui-kit-components-button.mjs +15 -24
  15. package/fesm2022/ng-doc-ui-kit-components-button.mjs.map +1 -1
  16. package/fesm2022/ng-doc-ui-kit-components-checkbox.mjs +13 -13
  17. package/fesm2022/ng-doc-ui-kit-components-checkbox.mjs.map +1 -1
  18. package/fesm2022/ng-doc-ui-kit-components-clear-control.mjs +14 -9
  19. package/fesm2022/ng-doc-ui-kit-components-clear-control.mjs.map +1 -1
  20. package/fesm2022/ng-doc-ui-kit-components-combobox.mjs +30 -26
  21. package/fesm2022/ng-doc-ui-kit-components-combobox.mjs.map +1 -1
  22. package/fesm2022/ng-doc-ui-kit-components-data-list-group.mjs +37 -38
  23. package/fesm2022/ng-doc-ui-kit-components-data-list-group.mjs.map +1 -1
  24. package/fesm2022/ng-doc-ui-kit-components-data-list.mjs +32 -39
  25. package/fesm2022/ng-doc-ui-kit-components-data-list.mjs.map +1 -1
  26. package/fesm2022/ng-doc-ui-kit-components-dialog-outlet.mjs +23 -20
  27. package/fesm2022/ng-doc-ui-kit-components-dialog-outlet.mjs.map +1 -1
  28. package/fesm2022/ng-doc-ui-kit-components-dot.mjs +20 -16
  29. package/fesm2022/ng-doc-ui-kit-components-dot.mjs.map +1 -1
  30. package/fesm2022/ng-doc-ui-kit-components-dropdown.mjs +120 -125
  31. package/fesm2022/ng-doc-ui-kit-components-dropdown.mjs.map +1 -1
  32. package/fesm2022/ng-doc-ui-kit-components-expander.mjs +17 -17
  33. package/fesm2022/ng-doc-ui-kit-components-expander.mjs.map +1 -1
  34. package/fesm2022/ng-doc-ui-kit-components-floated-border.mjs +4 -4
  35. package/fesm2022/ng-doc-ui-kit-components-floated-border.mjs.map +1 -1
  36. package/fesm2022/ng-doc-ui-kit-components-floated-content.mjs +16 -17
  37. package/fesm2022/ng-doc-ui-kit-components-floated-content.mjs.map +1 -1
  38. package/fesm2022/ng-doc-ui-kit-components-focus-control.mjs +20 -12
  39. package/fesm2022/ng-doc-ui-kit-components-focus-control.mjs.map +1 -1
  40. package/fesm2022/ng-doc-ui-kit-components-icon.mjs +175 -54
  41. package/fesm2022/ng-doc-ui-kit-components-icon.mjs.map +1 -1
  42. package/fesm2022/ng-doc-ui-kit-components-input-wrapper.mjs +43 -46
  43. package/fesm2022/ng-doc-ui-kit-components-input-wrapper.mjs.map +1 -1
  44. package/fesm2022/ng-doc-ui-kit-components-label.mjs +14 -16
  45. package/fesm2022/ng-doc-ui-kit-components-label.mjs.map +1 -1
  46. package/fesm2022/ng-doc-ui-kit-components-line.mjs +7 -4
  47. package/fesm2022/ng-doc-ui-kit-components-line.mjs.map +1 -1
  48. package/fesm2022/ng-doc-ui-kit-components-list.mjs +24 -8
  49. package/fesm2022/ng-doc-ui-kit-components-list.mjs.map +1 -1
  50. package/fesm2022/ng-doc-ui-kit-components-magnifier-controller.mjs +9 -4
  51. package/fesm2022/ng-doc-ui-kit-components-magnifier-controller.mjs.map +1 -1
  52. package/fesm2022/ng-doc-ui-kit-components-magnifier.mjs +39 -18
  53. package/fesm2022/ng-doc-ui-kit-components-magnifier.mjs.map +1 -1
  54. package/fesm2022/ng-doc-ui-kit-components-option-group.mjs +22 -27
  55. package/fesm2022/ng-doc-ui-kit-components-option-group.mjs.map +1 -1
  56. package/fesm2022/ng-doc-ui-kit-components-option.mjs +28 -22
  57. package/fesm2022/ng-doc-ui-kit-components-option.mjs.map +1 -1
  58. package/fesm2022/ng-doc-ui-kit-components-overlay-container.mjs +56 -52
  59. package/fesm2022/ng-doc-ui-kit-components-overlay-container.mjs.map +1 -1
  60. package/fesm2022/ng-doc-ui-kit-components-overlay-pointer.mjs +19 -21
  61. package/fesm2022/ng-doc-ui-kit-components-overlay-pointer.mjs.map +1 -1
  62. package/fesm2022/ng-doc-ui-kit-components-pane.mjs +91 -69
  63. package/fesm2022/ng-doc-ui-kit-components-pane.mjs.map +1 -1
  64. package/fesm2022/ng-doc-ui-kit-components-selection.mjs +173 -76
  65. package/fesm2022/ng-doc-ui-kit-components-selection.mjs.map +1 -1
  66. package/fesm2022/ng-doc-ui-kit-components-sidenav.mjs +23 -22
  67. package/fesm2022/ng-doc-ui-kit-components-sidenav.mjs.map +1 -1
  68. package/fesm2022/ng-doc-ui-kit-components-spinner.mjs +14 -12
  69. package/fesm2022/ng-doc-ui-kit-components-spinner.mjs.map +1 -1
  70. package/fesm2022/ng-doc-ui-kit-components-tab-group.mjs +86 -61
  71. package/fesm2022/ng-doc-ui-kit-components-tab-group.mjs.map +1 -1
  72. package/fesm2022/ng-doc-ui-kit-components-tab-routes-group.mjs +16 -13
  73. package/fesm2022/ng-doc-ui-kit-components-tab-routes-group.mjs.map +1 -1
  74. package/fesm2022/ng-doc-ui-kit-components-tag.mjs +23 -24
  75. package/fesm2022/ng-doc-ui-kit-components-tag.mjs.map +1 -1
  76. package/fesm2022/ng-doc-ui-kit-components-text.mjs +37 -52
  77. package/fesm2022/ng-doc-ui-kit-components-text.mjs.map +1 -1
  78. package/fesm2022/ng-doc-ui-kit-components-toggle.mjs +82 -57
  79. package/fesm2022/ng-doc-ui-kit-components-toggle.mjs.map +1 -1
  80. package/fesm2022/ng-doc-ui-kit-components-wrapper.mjs +7 -4
  81. package/fesm2022/ng-doc-ui-kit-components-wrapper.mjs.map +1 -1
  82. package/fesm2022/ng-doc-ui-kit-directives-autofocus.mjs +13 -10
  83. package/fesm2022/ng-doc-ui-kit-directives-autofocus.mjs.map +1 -1
  84. package/fesm2022/ng-doc-ui-kit-directives-checked-change.mjs +30 -26
  85. package/fesm2022/ng-doc-ui-kit-directives-checked-change.mjs.map +1 -1
  86. package/fesm2022/ng-doc-ui-kit-directives-data.mjs +8 -5
  87. package/fesm2022/ng-doc-ui-kit-directives-data.mjs.map +1 -1
  88. package/fesm2022/ng-doc-ui-kit-directives-dropdown-handler.mjs +19 -18
  89. package/fesm2022/ng-doc-ui-kit-directives-dropdown-handler.mjs.map +1 -1
  90. package/fesm2022/ng-doc-ui-kit-directives-dropdown-origin.mjs +7 -9
  91. package/fesm2022/ng-doc-ui-kit-directives-dropdown-origin.mjs.map +1 -1
  92. package/fesm2022/ng-doc-ui-kit-directives-event-switcher.mjs +22 -19
  93. package/fesm2022/ng-doc-ui-kit-directives-event-switcher.mjs.map +1 -1
  94. package/fesm2022/ng-doc-ui-kit-directives-focus-catcher.mjs +30 -25
  95. package/fesm2022/ng-doc-ui-kit-directives-focus-catcher.mjs.map +1 -1
  96. package/fesm2022/ng-doc-ui-kit-directives-focusable.mjs +13 -16
  97. package/fesm2022/ng-doc-ui-kit-directives-focusable.mjs.map +1 -1
  98. package/fesm2022/ng-doc-ui-kit-directives-fullscreen.mjs +90 -0
  99. package/fesm2022/ng-doc-ui-kit-directives-fullscreen.mjs.map +1 -0
  100. package/fesm2022/ng-doc-ui-kit-directives-hotkey.mjs +34 -28
  101. package/fesm2022/ng-doc-ui-kit-directives-hotkey.mjs.map +1 -1
  102. package/fesm2022/ng-doc-ui-kit-directives-input-number.mjs +10 -12
  103. package/fesm2022/ng-doc-ui-kit-directives-input-number.mjs.map +1 -1
  104. package/fesm2022/ng-doc-ui-kit-directives-input-string.mjs +9 -12
  105. package/fesm2022/ng-doc-ui-kit-directives-input-string.mjs.map +1 -1
  106. package/fesm2022/ng-doc-ui-kit-directives-radio-group.mjs +7 -4
  107. package/fesm2022/ng-doc-ui-kit-directives-radio-group.mjs.map +1 -1
  108. package/fesm2022/ng-doc-ui-kit-directives-rotator.mjs +16 -22
  109. package/fesm2022/ng-doc-ui-kit-directives-rotator.mjs.map +1 -1
  110. package/fesm2022/ng-doc-ui-kit-directives-tooltip.mjs +105 -101
  111. package/fesm2022/ng-doc-ui-kit-directives-tooltip.mjs.map +1 -1
  112. package/fesm2022/ng-doc-ui-kit-directives.mjs +1 -1
  113. package/fesm2022/ng-doc-ui-kit-interceptors.mjs +24 -21
  114. package/fesm2022/ng-doc-ui-kit-interceptors.mjs.map +1 -1
  115. package/fesm2022/ng-doc-ui-kit-observables.mjs +2 -58
  116. package/fesm2022/ng-doc-ui-kit-observables.mjs.map +1 -1
  117. package/fesm2022/ng-doc-ui-kit-pipes-as-array.mjs +3 -4
  118. package/fesm2022/ng-doc-ui-kit-pipes-as-array.mjs.map +1 -1
  119. package/fesm2022/ng-doc-ui-kit-pipes-bind.mjs +3 -4
  120. package/fesm2022/ng-doc-ui-kit-pipes-bind.mjs.map +1 -1
  121. package/fesm2022/ng-doc-ui-kit-pipes-execute.mjs +3 -4
  122. package/fesm2022/ng-doc-ui-kit-pipes-execute.mjs.map +1 -1
  123. package/fesm2022/ng-doc-ui-kit-pipes-highlighter.mjs +3 -4
  124. package/fesm2022/ng-doc-ui-kit-pipes-highlighter.mjs.map +1 -1
  125. package/fesm2022/ng-doc-ui-kit-services-dialog.mjs +14 -8
  126. package/fesm2022/ng-doc-ui-kit-services-dialog.mjs.map +1 -1
  127. package/fesm2022/ng-doc-ui-kit-services-notify.mjs +13 -8
  128. package/fesm2022/ng-doc-ui-kit-services-notify.mjs.map +1 -1
  129. package/fesm2022/ng-doc-ui-kit-services-overlay-strategy.mjs +15 -11
  130. package/fesm2022/ng-doc-ui-kit-services-overlay-strategy.mjs.map +1 -1
  131. package/fesm2022/ng-doc-ui-kit-services-overlay.mjs +20 -9
  132. package/fesm2022/ng-doc-ui-kit-services-overlay.mjs.map +1 -1
  133. package/fesm2022/ng-doc-ui-kit-services-scroll.mjs +11 -13
  134. package/fesm2022/ng-doc-ui-kit-services-scroll.mjs.map +1 -1
  135. package/fesm2022/ng-doc-ui-kit-tokens.mjs +29 -3
  136. package/fesm2022/ng-doc-ui-kit-tokens.mjs.map +1 -1
  137. package/fesm2022/ng-doc-ui-kit-types.mjs +0 -1
  138. package/fesm2022/ng-doc-ui-kit-types.mjs.map +1 -1
  139. package/package.json +31 -33
  140. package/styles/main.css +275 -38
  141. package/types/ng-doc-ui-kit-cdk-combobox-host.d.ts +16 -8
  142. package/types/ng-doc-ui-kit-classes-base-input.d.ts +12 -1
  143. package/types/ng-doc-ui-kit-classes-overlay-ref.d.ts +27 -4
  144. package/types/ng-doc-ui-kit-components-blockquote.d.ts +22 -5
  145. package/types/ng-doc-ui-kit-components-button-icon.d.ts +23 -5
  146. package/types/ng-doc-ui-kit-components-button-toggle.d.ts +5 -1
  147. package/types/ng-doc-ui-kit-components-button.d.ts +6 -6
  148. package/types/ng-doc-ui-kit-components-checkbox.d.ts +5 -3
  149. package/types/ng-doc-ui-kit-components-clear-control.d.ts +7 -0
  150. package/types/ng-doc-ui-kit-components-combobox.d.ts +19 -9
  151. package/types/ng-doc-ui-kit-components-data-list-group.d.ts +16 -11
  152. package/types/ng-doc-ui-kit-components-data-list.d.ts +21 -11
  153. package/types/ng-doc-ui-kit-components-dialog-outlet.d.ts +11 -6
  154. package/types/ng-doc-ui-kit-components-dot.d.ts +10 -5
  155. package/types/ng-doc-ui-kit-components-dropdown.d.ts +39 -27
  156. package/types/ng-doc-ui-kit-components-expander.d.ts +9 -7
  157. package/types/ng-doc-ui-kit-components-floated-content.d.ts +8 -6
  158. package/types/ng-doc-ui-kit-components-focus-control.d.ts +10 -4
  159. package/types/ng-doc-ui-kit-components-icon.d.ts +49 -14
  160. package/types/ng-doc-ui-kit-components-input-wrapper.d.ts +31 -17
  161. package/types/ng-doc-ui-kit-components-label.d.ts +8 -5
  162. package/types/ng-doc-ui-kit-components-line.d.ts +3 -0
  163. package/types/ng-doc-ui-kit-components-list.d.ts +14 -3
  164. package/types/ng-doc-ui-kit-components-magnifier-controller.d.ts +5 -1
  165. package/types/ng-doc-ui-kit-components-magnifier.d.ts +19 -4
  166. package/types/ng-doc-ui-kit-components-option-group.d.ts +12 -8
  167. package/types/ng-doc-ui-kit-components-option.d.ts +9 -2
  168. package/types/ng-doc-ui-kit-components-overlay-container.d.ts +18 -15
  169. package/types/ng-doc-ui-kit-components-overlay-pointer.d.ts +10 -6
  170. package/types/ng-doc-ui-kit-components-pane.d.ts +25 -9
  171. package/types/ng-doc-ui-kit-components-selection.d.ts +59 -21
  172. package/types/ng-doc-ui-kit-components-sidenav.d.ts +17 -8
  173. package/types/ng-doc-ui-kit-components-spinner.d.ts +7 -3
  174. package/types/ng-doc-ui-kit-components-tab-group.d.ts +43 -22
  175. package/types/ng-doc-ui-kit-components-tab-routes-group.d.ts +4 -2
  176. package/types/ng-doc-ui-kit-components-tag.d.ts +13 -6
  177. package/types/ng-doc-ui-kit-components-text.d.ts +21 -19
  178. package/types/ng-doc-ui-kit-components-toggle.d.ts +13 -7
  179. package/types/ng-doc-ui-kit-components-wrapper.d.ts +3 -0
  180. package/types/ng-doc-ui-kit-directives-autofocus.d.ts +7 -5
  181. package/types/ng-doc-ui-kit-directives-checked-change.d.ts +15 -11
  182. package/types/ng-doc-ui-kit-directives-data.d.ts +6 -4
  183. package/types/ng-doc-ui-kit-directives-dropdown-handler.d.ts +5 -3
  184. package/types/ng-doc-ui-kit-directives-dropdown-origin.d.ts +0 -2
  185. package/types/ng-doc-ui-kit-directives-event-switcher.d.ts +11 -6
  186. package/types/ng-doc-ui-kit-directives-focus-catcher.d.ts +11 -8
  187. package/types/ng-doc-ui-kit-directives-focusable.d.ts +6 -3
  188. package/types/ng-doc-ui-kit-directives-fullscreen.d.ts +39 -0
  189. package/types/ng-doc-ui-kit-directives-hotkey.d.ts +14 -7
  190. package/types/ng-doc-ui-kit-directives-input-number.d.ts +3 -2
  191. package/types/ng-doc-ui-kit-directives-input-string.d.ts +2 -2
  192. package/types/ng-doc-ui-kit-directives-radio-group.d.ts +4 -0
  193. package/types/ng-doc-ui-kit-directives-rotator.d.ts +8 -8
  194. package/types/ng-doc-ui-kit-directives-tooltip.d.ts +35 -23
  195. package/types/ng-doc-ui-kit-directives.d.ts +1 -1
  196. package/types/ng-doc-ui-kit-interceptors.d.ts +18 -2
  197. package/types/ng-doc-ui-kit-interfaces.d.ts +20 -4
  198. package/types/ng-doc-ui-kit-observables.d.ts +2 -19
  199. package/types/ng-doc-ui-kit-services-dialog.d.ts +10 -1
  200. package/types/ng-doc-ui-kit-services-notify.d.ts +9 -1
  201. package/types/ng-doc-ui-kit-services-overlay-strategy.d.ts +5 -3
  202. package/types/ng-doc-ui-kit-services-overlay.d.ts +14 -3
  203. package/types/ng-doc-ui-kit-services-scroll.d.ts +4 -5
  204. package/types/ng-doc-ui-kit-types.d.ts +2 -2
  205. package/fesm2022/ng-doc-ui-kit-decorators.mjs +0 -53
  206. package/fesm2022/ng-doc-ui-kit-decorators.mjs.map +0 -1
  207. package/fesm2022/ng-doc-ui-kit-directives-let.mjs +0 -43
  208. package/fesm2022/ng-doc-ui-kit-directives-let.mjs.map +0 -1
  209. package/types/ng-doc-ui-kit-decorators.d.ts +0 -12
  210. package/types/ng-doc-ui-kit-directives-let.d.ts +0 -22
@@ -1,24 +1,28 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
 
4
+ /**
5
+ * A small coloured dot, for example to mark a state next to a label.
6
+ */
4
7
  class NgDocDotComponent {
5
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NgDocDotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: NgDocDotComponent, isStandalone: true, selector: "ng-doc-dot", inputs: { color: "color", size: "size" }, host: { properties: { "attr.data-ng-doc-color": "this.color", "attr.data-ng-doc-size": "this.size" } }, ngImport: i0, template: ``, isInline: true, styles: [":host{display:inline;width:var(--ng-doc-dot-size);height:var(--ng-doc-dot-size);border-radius:var(--ng-doc-dot-size);line-height:var(--ng-doc-line-height);background-color:var(--ng-doc-dot-background);transition:var(--ng-doc-transition)}:host[data-ng-doc-size=small]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) / 2)}:host[data-ng-doc-size=medium]{--ng-doc-dot-size: var(--ng-doc-base-gutter)}:host[data-ng-doc-size=large]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) * 2)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8
+ constructor() {
9
+ /** Colour of the dot. */
10
+ this.color = input(/* @ts-ignore */
11
+ ...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
12
+ /** Size of the dot: 4px (`small`), 8px (`medium`) or 16px (`large`). */
13
+ this.size = input(/* @ts-ignore */
14
+ ...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
15
+ }
16
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.1", type: NgDocDotComponent, isStandalone: true, selector: "ng-doc-dot", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-ng-doc-color": "color()", "attr.data-ng-doc-size": "size()" } }, ngImport: i0, template: ``, isInline: true, styles: [":host{display:inline;width:var(--ng-doc-dot-size);height:var(--ng-doc-dot-size);border-radius:var(--ng-doc-dot-size);line-height:var(--ng-doc-line-height);background-color:var(--ng-doc-dot-background);transition:var(--ng-doc-transition)}:host[data-ng-doc-size=small]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) / 2)}:host[data-ng-doc-size=medium]{--ng-doc-dot-size: var(--ng-doc-base-gutter)}:host[data-ng-doc-size=large]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) * 2)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7
18
  }
8
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NgDocDotComponent, decorators: [{
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDotComponent, decorators: [{
9
20
  type: Component,
10
- args: [{ selector: 'ng-doc-dot', template: ``, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{display:inline;width:var(--ng-doc-dot-size);height:var(--ng-doc-dot-size);border-radius:var(--ng-doc-dot-size);line-height:var(--ng-doc-line-height);background-color:var(--ng-doc-dot-background);transition:var(--ng-doc-transition)}:host[data-ng-doc-size=small]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) / 2)}:host[data-ng-doc-size=medium]{--ng-doc-dot-size: var(--ng-doc-base-gutter)}:host[data-ng-doc-size=large]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) * 2)}\n"] }]
11
- }], propDecorators: { color: [{
12
- type: Input
13
- }, {
14
- type: HostBinding,
15
- args: ['attr.data-ng-doc-color']
16
- }], size: [{
17
- type: Input
18
- }, {
19
- type: HostBinding,
20
- args: ['attr.data-ng-doc-size']
21
- }] } });
21
+ args: [{ selector: 'ng-doc-dot', template: ``, changeDetection: ChangeDetectionStrategy.OnPush, host: {
22
+ '[attr.data-ng-doc-color]': 'color()',
23
+ '[attr.data-ng-doc-size]': 'size()',
24
+ }, styles: [":host{display:inline;width:var(--ng-doc-dot-size);height:var(--ng-doc-dot-size);border-radius:var(--ng-doc-dot-size);line-height:var(--ng-doc-line-height);background-color:var(--ng-doc-dot-background);transition:var(--ng-doc-transition)}:host[data-ng-doc-size=small]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) / 2)}:host[data-ng-doc-size=medium]{--ng-doc-dot-size: var(--ng-doc-base-gutter)}:host[data-ng-doc-size=large]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) * 2)}\n"] }]
25
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
22
26
 
23
27
  /**
24
28
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-ui-kit-components-dot.mjs","sources":["../../../../libs/ui-kit/components/dot/dot.component.ts","../../../../libs/ui-kit/components/dot/ng-doc-ui-kit-components-dot.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, Input } from '@angular/core';\nimport { NgDocColor, NgDocSize } from '@ng-doc/ui-kit/types';\n\n@Component({\n\tselector: 'ng-doc-dot',\n\ttemplate: ``,\n\tstyleUrls: ['./dot.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n})\nexport class NgDocDotComponent {\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-color')\n\tcolor?: NgDocColor;\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-size')\n\tsize?: NgDocSize;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAUa,iBAAiB,CAAA;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,wNALnB,CAAA,CAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ueAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKA,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,YACZ,CAAA,CAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,MAAA,EAAA,CAAA,ueAAA,CAAA,EAAA;;sBAGf;;sBACA,WAAW;uBAAC,wBAAwB;;sBAGpC;;sBACA,WAAW;uBAAC,uBAAuB;;;AChBrC;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-ui-kit-components-dot.mjs","sources":["../../../../libs/ui-kit/components/dot/dot.component.ts","../../../../libs/ui-kit/components/dot/ng-doc-ui-kit-components-dot.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { NgDocColor, NgDocSize } from '@ng-doc/ui-kit/types';\n\n/**\n * A small coloured dot, for example to mark a state next to a label.\n */\n@Component({\n selector: 'ng-doc-dot',\n template: ``,\n styleUrls: ['./dot.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-ng-doc-color]': 'color()',\n '[attr.data-ng-doc-size]': 'size()',\n },\n})\nexport class NgDocDotComponent {\n /** Colour of the dot. */\n readonly color = input<NgDocColor>();\n\n /** Size of the dot: 4px (`small`), 8px (`medium`) or 16px (`large`). */\n readonly size = input<NgDocSize>();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGA;;AAEG;MAWU,iBAAiB,CAAA;AAV9B,IAAA,WAAA,GAAA;;AAYW,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAc;;AAG3B,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAa;AACnC,IAAA;8GANY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,iaARlB,CAAA,CAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ueAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAQD,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAV7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,YACZ,CAAA,CAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,0BAA0B,EAAE,SAAS;AACrC,wBAAA,yBAAyB,EAAE,QAAQ;AACpC,qBAAA,EAAA,MAAA,EAAA,CAAA,ueAAA,CAAA,EAAA;;;ACdH;;AAEG;;;;"}
@@ -1,67 +1,96 @@
1
1
  import { FlexibleConnectedPositionStrategy, CdkOverlayOrigin } from '@angular/cdk/overlay';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, ChangeDetectorRef, ViewContainerRef, NgZone, EventEmitter, HostListener, HostBinding, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { inject, ChangeDetectorRef, ViewContainerRef, DestroyRef, input, output, signal, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
5
  import { asArray } from '@ng-doc/core/helpers/as-array';
5
6
  import { dropdownOpenAnimation } from '@ng-doc/ui-kit/animations';
6
7
  import { NgDocOverlayHost } from '@ng-doc/ui-kit/classes/overlay-host';
7
8
  import { NgDocOverlayContainerComponent } from '@ng-doc/ui-kit/components/overlay-container';
8
9
  import { toElement, mergeOverlayConfigs } from '@ng-doc/ui-kit/helpers';
9
- import { ngDocZoneDetach } from '@ng-doc/ui-kit/observables';
10
10
  import { NgDocOverlayService } from '@ng-doc/ui-kit/services/overlay';
11
11
  import { NgDocOverlayUtils } from '@ng-doc/ui-kit/utils';
12
12
 
13
+ /**
14
+ * Renders its content in an overlay connected to an origin: the `origin` input, or the
15
+ * surrounding `ngDocDropdownOrigin`.
16
+ */
13
17
  class NgDocDropdownComponent {
14
18
  constructor() {
15
19
  this.changeDetectorRef = inject(ChangeDetectorRef);
16
20
  this.overlayService = inject(NgDocOverlayService);
17
21
  this.viewContainerRef = inject(ViewContainerRef);
18
- this.ngZone = inject(NgZone);
19
22
  this.overlayHost = inject(NgDocOverlayHost, { optional: true });
20
- this.content = '';
21
- this.origin = null;
22
- this.closeIfOutsideClick = true;
23
- this.closeIfInnerClick = false;
24
- this.withArrow = false;
25
- this.borderOffset = -8;
26
- this.panelClass = [];
27
- this.contactBorder = true;
28
- this.hasBackdrop = false;
29
- this.positions = [
23
+ this.destroyRef = inject(DestroyRef);
24
+ /** What the dropdown renders: a string, a template or a component. */
25
+ this.content = input('', /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
27
+ /**
28
+ * The origin to connect to. When it changes to `null`, the dropdown stays connected to the
29
+ * previous origin.
30
+ */
31
+ this.origin = input(null, /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "origin" }] : /* istanbul ignore next */ []));
33
+ this.closeIfOutsideClick = input(true, /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "closeIfOutsideClick" }] : /* istanbul ignore next */ []));
35
+ this.closeIfInnerClick = input(false, /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "closeIfInnerClick" }] : /* istanbul ignore next */ []));
37
+ this.withArrow = input(false, /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "withArrow" }] : /* istanbul ignore next */ []));
39
+ this.borderOffset = input(-8, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "borderOffset" }] : /* istanbul ignore next */ []));
41
+ this.panelClass = input([], /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
43
+ this.contactBorder = input(true, /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "contactBorder" }] : /* istanbul ignore next */ []));
45
+ this.hasBackdrop = input(false, /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "hasBackdrop" }] : /* istanbul ignore next */ []));
47
+ this.positions = input([
30
48
  'bottom-center',
31
49
  'top-center',
32
50
  'right-center',
33
51
  'left-center',
34
- ];
35
- this.minHeight = '';
36
- this.maxHeight = '';
37
- this.height = '';
38
- this.minWidth = '';
39
- this.maxWidth = '';
40
- this.width = '';
41
- this.beforeOpen = new EventEmitter();
42
- this.afterOpen = new EventEmitter();
43
- this.beforeClose = new EventEmitter();
44
- this.afterClose = new EventEmitter();
52
+ ], /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "positions" }] : /* istanbul ignore next */ []));
54
+ this.minHeight = input('', /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []));
56
+ this.maxHeight = input('', /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
58
+ this.height = input('', /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
60
+ this.minWidth = input('', /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "minWidth" }] : /* istanbul ignore next */ []));
62
+ this.maxWidth = input('', /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
64
+ this.width = input('', /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
66
+ /** Emits when the dropdown starts opening. */
67
+ this.beforeOpen = output();
68
+ /** Emits when the open animation has finished. */
69
+ this.afterOpen = output();
70
+ /** Emits when the dropdown starts closing. */
71
+ this.beforeClose = output();
72
+ /** Emits when the dropdown has closed. */
73
+ this.afterClose = output();
45
74
  this.overlay = null;
75
+ // The last origin bound to the input that was not null. It is recorded in ngOnChanges, so that
76
+ // every change is seen, including changes while the dropdown is closed.
77
+ this.lastOrigin = signal(null, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "lastOrigin" }] : /* istanbul ignore next */ []));
79
+ // The defaults the other inputs are compared with; declared after `lastOrigin`, which it reads.
46
80
  this.overlayProperties = this.getOverlayProperties();
47
81
  }
48
82
  ngOnChanges({ origin }) {
49
- if (origin && origin.currentValue !== origin.previousValue) {
50
- if (!origin.currentValue) {
51
- this.origin = origin.previousValue;
52
- }
53
- if (this.overlay) {
54
- const positionStrategy = this.overlay.overlayRef.getConfig().positionStrategy;
55
- if (positionStrategy instanceof FlexibleConnectedPositionStrategy && this.currentOrigin) {
56
- this.overlay.overlayRef.updatePositionStrategy(positionStrategy.setOrigin(this.currentOrigin));
57
- }
83
+ if (origin?.currentValue) {
84
+ this.lastOrigin.set(origin.currentValue);
85
+ }
86
+ if (origin && origin.currentValue !== origin.previousValue && this.overlay) {
87
+ const positionStrategy = this.overlay.overlayRef.getConfig().positionStrategy;
88
+ if (positionStrategy instanceof FlexibleConnectedPositionStrategy && this.currentOrigin) {
89
+ this.overlay.overlayRef.updatePositionStrategy(positionStrategy.setOrigin(this.currentOrigin));
58
90
  }
59
91
  }
60
92
  this.updateOverlayPosition();
61
93
  }
62
- get tabIndex() {
63
- return this.isOpened ? 0 : -1;
64
- }
65
94
  focus() {
66
95
  this.overlay?.focus();
67
96
  }
@@ -69,25 +98,33 @@ class NgDocDropdownComponent {
69
98
  return !!this.overlay?.isFocused;
70
99
  }
71
100
  open() {
72
- if (!this.overlay?.hasAttached) {
73
- const config = this.getConfig();
74
- this.overlay = this.overlayService.open(this.content, config);
75
- this.beforeOpen.emit();
76
- this.overlay
77
- ?.afterOpen()
78
- .pipe(ngDocZoneDetach(this.ngZone))
79
- .subscribe(() => this.afterOpen.emit());
80
- this.overlay
81
- ?.beforeClose()
82
- .pipe(ngDocZoneDetach(this.ngZone))
83
- .subscribe(() => this.beforeClose.emit());
84
- this.overlay
85
- ?.afterClose()
86
- .pipe(ngDocZoneDetach(this.ngZone))
87
- .subscribe(() => this.afterClose.emit());
88
- this.overlay.beforeClose().subscribe(() => this.close());
89
- this.changeDetectorRef.markForCheck();
90
- }
101
+ // Opening reads the inputs; `untracked` keeps an effect that calls open() from depending on
102
+ // them.
103
+ untracked(() => {
104
+ if (!this.overlay?.hasAttached) {
105
+ const config = this.getConfig();
106
+ const overlay = this.overlayService.open(this.content(), config);
107
+ this.overlay = overlay;
108
+ this.beforeOpen.emit();
109
+ // The animations can finish after the dropdown is destroyed; its outputs must not emit then.
110
+ overlay
111
+ .afterOpen()
112
+ .pipe(takeUntilDestroyed(this.destroyRef))
113
+ .subscribe(() => this.afterOpen.emit());
114
+ overlay
115
+ .beforeClose()
116
+ .pipe(takeUntilDestroyed(this.destroyRef))
117
+ .subscribe(() => {
118
+ this.beforeClose.emit();
119
+ this.close();
120
+ });
121
+ overlay
122
+ .afterClose()
123
+ .pipe(takeUntilDestroyed(this.destroyRef))
124
+ .subscribe(() => this.afterClose.emit());
125
+ this.changeDetectorRef.markForCheck();
126
+ }
127
+ });
91
128
  }
92
129
  close() {
93
130
  if (this.isOpened) {
@@ -108,16 +145,17 @@ class NgDocDropdownComponent {
108
145
  }
109
146
  }
110
147
  get currentOrigin() {
111
- return this.origin instanceof CdkOverlayOrigin
112
- ? this.origin.elementRef.nativeElement
113
- : this.origin || this.overlayHost?.origin || null;
148
+ const origin = this.lastOrigin();
149
+ return origin instanceof CdkOverlayOrigin
150
+ ? origin.elementRef.nativeElement
151
+ : origin || this.overlayHost?.origin || null;
114
152
  }
115
153
  getPositions(positions, border) {
116
154
  const origin = toElement(this.currentOrigin);
117
155
  if (origin instanceof HTMLElement) {
118
156
  return NgDocOverlayUtils.getConnectedPosition(!!positions && asArray(positions).length
119
157
  ? positions
120
- : ['bottom-center', 'top-center', 'right-center', 'left-center'], origin, border * -1, this.withArrow);
158
+ : ['bottom-center', 'top-center', 'right-center', 'left-center'], origin, border * -1, this.withArrow());
121
159
  }
122
160
  else {
123
161
  return !!positions && asArray(positions).length
@@ -136,11 +174,11 @@ class NgDocDropdownComponent {
136
174
  scrollStrategy: this.overlayService.scrollStrategy().reposition(),
137
175
  viewContainerRef: this.viewContainerRef,
138
176
  openAnimation: dropdownOpenAnimation,
139
- hasBackdrop: this.hasBackdrop,
177
+ hasBackdrop: this.hasBackdrop(),
140
178
  ...overlayProperties,
141
179
  panelClass: [
142
180
  'ng-doc-dropdown',
143
- ...asArray(this.panelClass),
181
+ ...asArray(this.panelClass()),
144
182
  ...asArray(this.overlayHost?.panelClass),
145
183
  ],
146
184
  };
@@ -148,19 +186,19 @@ class NgDocDropdownComponent {
148
186
  getOverlayProperties() {
149
187
  return {
150
188
  origin: this.currentOrigin || undefined,
151
- positions: this.positions,
152
- closeIfOutsideClick: this.closeIfOutsideClick,
153
- closeIfInnerClick: this.closeIfInnerClick,
154
- withPointer: this.withArrow,
155
- contactBorder: this.contactBorder,
156
- borderOffset: this.borderOffset,
157
- panelClass: this.panelClass,
158
- width: this.width,
159
- height: this.height,
160
- minWidth: this.minWidth,
161
- minHeight: this.minHeight,
162
- maxWidth: this.maxWidth,
163
- maxHeight: this.maxHeight,
189
+ positions: this.positions(),
190
+ closeIfOutsideClick: this.closeIfOutsideClick(),
191
+ closeIfInnerClick: this.closeIfInnerClick(),
192
+ withPointer: this.withArrow(),
193
+ contactBorder: this.contactBorder(),
194
+ borderOffset: this.borderOffset(),
195
+ panelClass: this.panelClass(),
196
+ width: this.width(),
197
+ height: this.height(),
198
+ minWidth: this.minWidth(),
199
+ minHeight: this.minHeight(),
200
+ maxWidth: this.maxWidth(),
201
+ maxHeight: this.maxHeight(),
164
202
  disposeOnNavigation: true,
165
203
  disposeOnRouteNavigation: true,
166
204
  };
@@ -170,59 +208,16 @@ class NgDocDropdownComponent {
170
208
  this.overlay.overlayRef.dispose();
171
209
  }
172
210
  }
173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NgDocDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
174
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: NgDocDropdownComponent, isStandalone: true, selector: "ng-doc-dropdown", inputs: { content: "content", origin: "origin", closeIfOutsideClick: "closeIfOutsideClick", closeIfInnerClick: "closeIfInnerClick", withArrow: "withArrow", borderOffset: "borderOffset", panelClass: "panelClass", contactBorder: "contactBorder", hasBackdrop: "hasBackdrop", positions: "positions", minHeight: "minHeight", maxHeight: "maxHeight", height: "height", minWidth: "minWidth", maxWidth: "maxWidth", width: "width" }, outputs: { beforeOpen: "beforeOpen", afterOpen: "afterOpen", beforeClose: "beforeClose", afterClose: "afterClose" }, host: { listeners: { "focus": "focus()" }, properties: { "attr.tabIndex": "this.tabIndex" } }, providers: [NgDocOverlayService], usesOnChanges: true, ngImport: i0, template: ``, isInline: true, styles: ["::ng-deep .ng-doc-dropdown{--ng-doc-overlay-background: var(--ng-doc-background);--ng-doc-overlay-border: var(--ng-doc-base-2);--ng-doc-overlay-border-radius: var(--ng-doc-base-gutter);--ng-doc-overlay-shadow: 0px 12px 16px -4px rgba(16, 24, 40, .08), 0px 4px 6px -2px rgba(16, 24, 40, .03)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
211
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
212
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.1", type: NgDocDropdownComponent, isStandalone: true, selector: "ng-doc-dropdown", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, origin: { classPropertyName: "origin", publicName: "origin", isSignal: true, isRequired: false, transformFunction: null }, closeIfOutsideClick: { classPropertyName: "closeIfOutsideClick", publicName: "closeIfOutsideClick", isSignal: true, isRequired: false, transformFunction: null }, closeIfInnerClick: { classPropertyName: "closeIfInnerClick", publicName: "closeIfInnerClick", isSignal: true, isRequired: false, transformFunction: null }, withArrow: { classPropertyName: "withArrow", publicName: "withArrow", isSignal: true, isRequired: false, transformFunction: null }, borderOffset: { classPropertyName: "borderOffset", publicName: "borderOffset", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, contactBorder: { classPropertyName: "contactBorder", publicName: "contactBorder", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { beforeOpen: "beforeOpen", afterOpen: "afterOpen", beforeClose: "beforeClose", afterClose: "afterClose" }, host: { listeners: { "focus": "focus()" }, properties: { "attr.tabIndex": "isOpened ? 0 : -1" } }, providers: [NgDocOverlayService], usesOnChanges: true, ngImport: i0, template: ``, isInline: true, styles: ["::ng-deep .ng-doc-dropdown{--ng-doc-overlay-background: var(--ng-doc-background);--ng-doc-overlay-border: var(--ng-doc-base-2);--ng-doc-overlay-border-radius: var(--ng-doc-base-gutter);--ng-doc-overlay-shadow: 0px 12px 16px -4px rgba(16, 24, 40, .08), 0px 4px 6px -2px rgba(16, 24, 40, .03)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
175
213
  }
176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NgDocDropdownComponent, decorators: [{
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDropdownComponent, decorators: [{
177
215
  type: Component,
178
- args: [{ selector: 'ng-doc-dropdown', template: ``, changeDetection: ChangeDetectionStrategy.OnPush, providers: [NgDocOverlayService], standalone: true, styles: ["::ng-deep .ng-doc-dropdown{--ng-doc-overlay-background: var(--ng-doc-background);--ng-doc-overlay-border: var(--ng-doc-base-2);--ng-doc-overlay-border-radius: var(--ng-doc-base-gutter);--ng-doc-overlay-shadow: 0px 12px 16px -4px rgba(16, 24, 40, .08), 0px 4px 6px -2px rgba(16, 24, 40, .03)}\n"] }]
179
- }], ctorParameters: () => [], propDecorators: { content: [{
180
- type: Input
181
- }], origin: [{
182
- type: Input
183
- }], closeIfOutsideClick: [{
184
- type: Input
185
- }], closeIfInnerClick: [{
186
- type: Input
187
- }], withArrow: [{
188
- type: Input
189
- }], borderOffset: [{
190
- type: Input
191
- }], panelClass: [{
192
- type: Input
193
- }], contactBorder: [{
194
- type: Input
195
- }], hasBackdrop: [{
196
- type: Input
197
- }], positions: [{
198
- type: Input
199
- }], minHeight: [{
200
- type: Input
201
- }], maxHeight: [{
202
- type: Input
203
- }], height: [{
204
- type: Input
205
- }], minWidth: [{
206
- type: Input
207
- }], maxWidth: [{
208
- type: Input
209
- }], width: [{
210
- type: Input
211
- }], beforeOpen: [{
212
- type: Output
213
- }], afterOpen: [{
214
- type: Output
215
- }], beforeClose: [{
216
- type: Output
217
- }], afterClose: [{
218
- type: Output
219
- }], tabIndex: [{
220
- type: HostBinding,
221
- args: ['attr.tabIndex']
222
- }], focus: [{
223
- type: HostListener,
224
- args: ['focus']
225
- }] } });
216
+ args: [{ selector: 'ng-doc-dropdown', template: ``, changeDetection: ChangeDetectionStrategy.OnPush, providers: [NgDocOverlayService], host: {
217
+ '[attr.tabIndex]': 'isOpened ? 0 : -1',
218
+ '(focus)': 'focus()',
219
+ }, styles: ["::ng-deep .ng-doc-dropdown{--ng-doc-overlay-background: var(--ng-doc-background);--ng-doc-overlay-border: var(--ng-doc-base-2);--ng-doc-overlay-border-radius: var(--ng-doc-base-gutter);--ng-doc-overlay-shadow: 0px 12px 16px -4px rgba(16, 24, 40, .08), 0px 4px 6px -2px rgba(16, 24, 40, .03)}\n"] }]
220
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], origin: [{ type: i0.Input, args: [{ isSignal: true, alias: "origin", required: false }] }], closeIfOutsideClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIfOutsideClick", required: false }] }], closeIfInnerClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIfInnerClick", required: false }] }], withArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "withArrow", required: false }] }], borderOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderOffset", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], contactBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "contactBorder", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], positions: [{ type: i0.Input, args: [{ isSignal: true, alias: "positions", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], beforeOpen: [{ type: i0.Output, args: ["beforeOpen"] }], afterOpen: [{ type: i0.Output, args: ["afterOpen"] }], beforeClose: [{ type: i0.Output, args: ["beforeClose"] }], afterClose: [{ type: i0.Output, args: ["afterClose"] }] } });
226
221
 
227
222
  /**
228
223
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-ui-kit-components-dropdown.mjs","sources":["../../../../libs/ui-kit/components/dropdown/dropdown.component.ts","../../../../libs/ui-kit/components/dropdown/ng-doc-ui-kit-components-dropdown.ts"],"sourcesContent":["import { Point } from '@angular/cdk/drag-drop';\nimport {\n CdkOverlayOrigin,\n FlexibleConnectedPositionStrategy,\n PositionStrategy,\n} from '@angular/cdk/overlay';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { dropdownOpenAnimation } from '@ng-doc/ui-kit/animations';\nimport { NgDocOverlayHost } from '@ng-doc/ui-kit/classes/overlay-host';\nimport { NgDocOverlayRef } from '@ng-doc/ui-kit/classes/overlay-ref';\nimport { NgDocOverlayContainerComponent } from '@ng-doc/ui-kit/components/overlay-container';\nimport { mergeOverlayConfigs, toElement } from '@ng-doc/ui-kit/helpers';\nimport { NgDocOverlayConfig, NgDocOverlayProperties } from '@ng-doc/ui-kit/interfaces';\nimport { ngDocZoneDetach } from '@ng-doc/ui-kit/observables';\nimport { NgDocOverlayService } from '@ng-doc/ui-kit/services/overlay';\nimport { NgDocContent, NgDocOverlayOrigin, NgDocOverlayPosition } from '@ng-doc/ui-kit/types';\nimport { NgDocOverlayUtils } from '@ng-doc/ui-kit/utils';\n\n@Component({\n selector: 'ng-doc-dropdown',\n template: ``,\n styleUrls: ['./dropdown.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [NgDocOverlayService],\n standalone: true,\n})\nexport class NgDocDropdownComponent implements OnChanges, OnDestroy {\n protected changeDetectorRef = inject(ChangeDetectorRef);\n protected overlayService = inject(NgDocOverlayService);\n protected viewContainerRef = inject(ViewContainerRef);\n protected ngZone = inject(NgZone);\n protected overlayHost = inject<NgDocOverlayHost>(NgDocOverlayHost, { optional: true });\n\n @Input()\n content: NgDocContent = '';\n\n @Input()\n origin: CdkOverlayOrigin | Point | null = null;\n\n @Input()\n closeIfOutsideClick: boolean = true;\n\n @Input()\n closeIfInnerClick: boolean = false;\n\n @Input()\n withArrow: boolean = false;\n\n @Input()\n borderOffset: number = -8;\n\n @Input()\n panelClass: string | string[] = [];\n\n @Input()\n contactBorder: boolean = true;\n\n @Input()\n hasBackdrop: boolean = false;\n\n @Input()\n positions: NgDocOverlayPosition | NgDocOverlayPosition[] = [\n 'bottom-center',\n 'top-center',\n 'right-center',\n 'left-center',\n ];\n\n @Input()\n minHeight: number | string = '';\n\n @Input()\n maxHeight: number | string = '';\n\n @Input()\n height: number | string = '';\n\n @Input()\n minWidth: number | string = '';\n\n @Input()\n maxWidth: number | string = '';\n\n @Input()\n width: number | string = '';\n\n @Output()\n beforeOpen: EventEmitter<void> = new EventEmitter<void>();\n\n @Output()\n afterOpen: EventEmitter<void> = new EventEmitter<void>();\n\n @Output()\n beforeClose: EventEmitter<void> = new EventEmitter<void>();\n\n @Output()\n afterClose: EventEmitter<void> = new EventEmitter<void>();\n\n overlay: NgDocOverlayRef | null = null;\n overlayProperties: NgDocOverlayProperties = this.getOverlayProperties();\n\n constructor() {}\n\n ngOnChanges({ origin }: SimpleChanges): void {\n if (origin && origin.currentValue !== origin.previousValue) {\n if (!origin.currentValue) {\n this.origin = origin.previousValue as CdkOverlayOrigin | Point | null;\n }\n\n if (this.overlay) {\n const positionStrategy: PositionStrategy | undefined =\n this.overlay.overlayRef.getConfig().positionStrategy;\n if (positionStrategy instanceof FlexibleConnectedPositionStrategy && this.currentOrigin) {\n this.overlay.overlayRef.updatePositionStrategy(\n positionStrategy.setOrigin(this.currentOrigin),\n );\n }\n }\n }\n this.updateOverlayPosition();\n }\n\n @HostBinding('attr.tabIndex')\n get tabIndex(): number {\n return this.isOpened ? 0 : -1;\n }\n\n @HostListener('focus')\n focus(): void {\n this.overlay?.focus();\n }\n\n get isFocused(): boolean {\n return !!this.overlay?.isFocused;\n }\n\n open(): void {\n if (!this.overlay?.hasAttached) {\n const config: NgDocOverlayConfig = this.getConfig();\n this.overlay = this.overlayService.open(this.content, config);\n this.beforeOpen.emit();\n this.overlay\n ?.afterOpen()\n .pipe(ngDocZoneDetach(this.ngZone))\n .subscribe(() => this.afterOpen.emit());\n\n this.overlay\n ?.beforeClose()\n .pipe(ngDocZoneDetach(this.ngZone))\n .subscribe(() => this.beforeClose.emit());\n\n this.overlay\n ?.afterClose()\n .pipe(ngDocZoneDetach(this.ngZone))\n .subscribe(() => this.afterClose.emit());\n\n this.overlay.beforeClose().subscribe(() => this.close());\n\n this.changeDetectorRef.markForCheck();\n }\n }\n\n close(): void {\n if (this.isOpened) {\n this.overlay?.close();\n this.changeDetectorRef.markForCheck();\n }\n }\n\n toggle(): void {\n this.isOpened ? this.close() : this.open();\n }\n\n get isOpened(): boolean {\n return this.overlay?.isOpened === true;\n }\n\n updateOverlayPosition(): void {\n if (this.overlay && this.overlay.hasAttached) {\n this.overlay.overlayRef.updateSize(this.getConfig());\n this.overlay.overlayRef.updatePosition();\n }\n }\n\n private get currentOrigin(): NgDocOverlayOrigin | null {\n return this.origin instanceof CdkOverlayOrigin\n ? (this.origin.elementRef.nativeElement as HTMLElement)\n : this.origin || this.overlayHost?.origin || null;\n }\n\n private getPositions(\n positions: NgDocOverlayPosition | NgDocOverlayPosition[],\n border: number,\n ): NgDocOverlayPosition[] {\n const origin: NgDocOverlayOrigin = toElement(this.currentOrigin) as HTMLElement;\n if (origin instanceof HTMLElement) {\n return NgDocOverlayUtils.getConnectedPosition(\n !!positions && asArray(positions).length\n ? positions\n : ['bottom-center', 'top-center', 'right-center', 'left-center'],\n origin,\n border * -1,\n this.withArrow,\n );\n } else {\n return !!positions && asArray(positions).length\n ? asArray(positions)\n : ['bottom-center', 'top-center', 'right-center', 'left-center'];\n }\n }\n\n private getConfig(): NgDocOverlayConfig {\n const overlayProperties: NgDocOverlayProperties = mergeOverlayConfigs(\n this.overlayProperties,\n this.getOverlayProperties(),\n this.overlayHost ?? undefined,\n );\n if (!this.currentOrigin) {\n throw new Error('Origin for the dropdown was not provided.');\n }\n return {\n overlayContainer: NgDocOverlayContainerComponent,\n positionStrategy: this.overlayService.connectedPositionStrategy(\n this.currentOrigin,\n this.getPositions(overlayProperties.positions || [], overlayProperties.borderOffset || 0),\n ),\n scrollStrategy: this.overlayService.scrollStrategy().reposition(),\n viewContainerRef: this.viewContainerRef,\n openAnimation: dropdownOpenAnimation,\n hasBackdrop: this.hasBackdrop,\n ...overlayProperties,\n panelClass: [\n 'ng-doc-dropdown',\n ...asArray(this.panelClass),\n ...asArray(this.overlayHost?.panelClass),\n ],\n };\n }\n\n private getOverlayProperties(): NgDocOverlayProperties {\n return {\n origin: this.currentOrigin || undefined,\n positions: this.positions,\n closeIfOutsideClick: this.closeIfOutsideClick,\n closeIfInnerClick: this.closeIfInnerClick,\n withPointer: this.withArrow,\n contactBorder: this.contactBorder,\n borderOffset: this.borderOffset,\n panelClass: this.panelClass,\n width: this.width,\n height: this.height,\n minWidth: this.minWidth,\n minHeight: this.minHeight,\n maxWidth: this.maxWidth,\n maxHeight: this.maxHeight,\n disposeOnNavigation: true,\n disposeOnRouteNavigation: true,\n };\n }\n\n ngOnDestroy(): void {\n if (this.overlay) {\n this.overlay.overlayRef.dispose();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MA0Ca,sBAAsB,CAAA;AA2EjC,IAAA,WAAA,GAAA;AA1EU,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC7C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAC5C,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC3C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QACvB,IAAA,CAAA,WAAW,GAAG,MAAM,CAAmB,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAGtF,IAAA,CAAA,OAAO,GAAiB,EAAE;QAG1B,IAAA,CAAA,MAAM,GAAoC,IAAI;QAG9C,IAAA,CAAA,mBAAmB,GAAY,IAAI;QAGnC,IAAA,CAAA,iBAAiB,GAAY,KAAK;QAGlC,IAAA,CAAA,SAAS,GAAY,KAAK;QAG1B,IAAA,CAAA,YAAY,GAAW,CAAC,CAAC;QAGzB,IAAA,CAAA,UAAU,GAAsB,EAAE;QAGlC,IAAA,CAAA,aAAa,GAAY,IAAI;QAG7B,IAAA,CAAA,WAAW,GAAY,KAAK;AAG5B,QAAA,IAAA,CAAA,SAAS,GAAkD;YACzD,eAAe;YACf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A,WAAA,EAAA,MAAA,EAAA,QAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,UAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,eAAA,EAAA,EAAA,EAAA,SAAA,EAHtB,CAAC,mBAAmB,CAAC,+CAHtB,CAAA,CAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,uSAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAMD,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBARlC,SAAS;+BACE,iBAAiB,EAAA,QAAA,EACjB,CAAA,CAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,mBAAmB,CAAC,EAAA,UAAA,EACpB,IAAI,EAAA,MAAA,EAAA,CAAA,uSAAA,CAAA,EAAA;;sBASf;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAQA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBA2BA,WAAW;uBAAC,eAAe;;sBAK3B,YAAY;uBAAC,OAAO;;;AC/IvB;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-ui-kit-components-dropdown.mjs","sources":["../../../../libs/ui-kit/components/dropdown/dropdown.component.ts","../../../../libs/ui-kit/components/dropdown/ng-doc-ui-kit-components-dropdown.ts"],"sourcesContent":["import { Point } from '@angular/cdk/drag-drop';\nimport {\n CdkOverlayOrigin,\n FlexibleConnectedPositionStrategy,\n PositionStrategy,\n} from '@angular/cdk/overlay';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n inject,\n input,\n OnChanges,\n OnDestroy,\n output,\n signal,\n SimpleChanges,\n untracked,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { dropdownOpenAnimation } from '@ng-doc/ui-kit/animations';\nimport { NgDocOverlayHost } from '@ng-doc/ui-kit/classes/overlay-host';\nimport { NgDocOverlayRef } from '@ng-doc/ui-kit/classes/overlay-ref';\nimport { NgDocOverlayContainerComponent } from '@ng-doc/ui-kit/components/overlay-container';\nimport { mergeOverlayConfigs, toElement } from '@ng-doc/ui-kit/helpers';\nimport { NgDocOverlayConfig, NgDocOverlayProperties } from '@ng-doc/ui-kit/interfaces';\nimport { NgDocOverlayService } from '@ng-doc/ui-kit/services/overlay';\nimport { NgDocContent, NgDocOverlayOrigin, NgDocOverlayPosition } from '@ng-doc/ui-kit/types';\nimport { NgDocOverlayUtils } from '@ng-doc/ui-kit/utils';\n\n/**\n * Renders its content in an overlay connected to an origin: the `origin` input, or the\n * surrounding `ngDocDropdownOrigin`.\n */\n@Component({\n selector: 'ng-doc-dropdown',\n template: ``,\n styleUrls: ['./dropdown.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [NgDocOverlayService],\n host: {\n '[attr.tabIndex]': 'isOpened ? 0 : -1',\n '(focus)': 'focus()',\n },\n})\nexport class NgDocDropdownComponent implements OnChanges, OnDestroy {\n protected changeDetectorRef = inject(ChangeDetectorRef);\n protected overlayService = inject(NgDocOverlayService);\n protected viewContainerRef = inject(ViewContainerRef);\n protected overlayHost = inject<NgDocOverlayHost>(NgDocOverlayHost, { optional: true });\n private readonly destroyRef = inject(DestroyRef);\n\n /** What the dropdown renders: a string, a template or a component. */\n readonly content = input<NgDocContent>('');\n\n /**\n * The origin to connect to. When it changes to `null`, the dropdown stays connected to the\n * previous origin.\n */\n readonly origin = input<CdkOverlayOrigin | Point | null>(null);\n\n readonly closeIfOutsideClick = input<boolean>(true);\n\n readonly closeIfInnerClick = input<boolean>(false);\n\n readonly withArrow = input<boolean>(false);\n\n readonly borderOffset = input<number>(-8);\n\n readonly panelClass = input<string | string[]>([]);\n\n readonly contactBorder = input<boolean>(true);\n\n readonly hasBackdrop = input<boolean>(false);\n\n readonly positions = input<NgDocOverlayPosition | NgDocOverlayPosition[]>([\n 'bottom-center',\n 'top-center',\n 'right-center',\n 'left-center',\n ]);\n\n readonly minHeight = input<number | string>('');\n\n readonly maxHeight = input<number | string>('');\n\n readonly height = input<number | string>('');\n\n readonly minWidth = input<number | string>('');\n\n readonly maxWidth = input<number | string>('');\n\n readonly width = input<number | string>('');\n\n /** Emits when the dropdown starts opening. */\n readonly beforeOpen = output<void>();\n\n /** Emits when the open animation has finished. */\n readonly afterOpen = output<void>();\n\n /** Emits when the dropdown starts closing. */\n readonly beforeClose = output<void>();\n\n /** Emits when the dropdown has closed. */\n readonly afterClose = output<void>();\n\n overlay: NgDocOverlayRef | null = null;\n\n // The last origin bound to the input that was not null. It is recorded in ngOnChanges, so that\n // every change is seen, including changes while the dropdown is closed.\n private readonly lastOrigin = signal<CdkOverlayOrigin | Point | null>(null);\n\n // The defaults the other inputs are compared with; declared after `lastOrigin`, which it reads.\n overlayProperties: NgDocOverlayProperties = this.getOverlayProperties();\n\n ngOnChanges({ origin }: SimpleChanges): void {\n if (origin?.currentValue) {\n this.lastOrigin.set(origin.currentValue);\n }\n\n if (origin && origin.currentValue !== origin.previousValue && this.overlay) {\n const positionStrategy: PositionStrategy | undefined =\n this.overlay.overlayRef.getConfig().positionStrategy;\n if (positionStrategy instanceof FlexibleConnectedPositionStrategy && this.currentOrigin) {\n this.overlay.overlayRef.updatePositionStrategy(\n positionStrategy.setOrigin(this.currentOrigin),\n );\n }\n }\n this.updateOverlayPosition();\n }\n\n focus(): void {\n this.overlay?.focus();\n }\n\n get isFocused(): boolean {\n return !!this.overlay?.isFocused;\n }\n\n open(): void {\n // Opening reads the inputs; `untracked` keeps an effect that calls open() from depending on\n // them.\n untracked(() => {\n if (!this.overlay?.hasAttached) {\n const config: NgDocOverlayConfig = this.getConfig();\n const overlay: NgDocOverlayRef = this.overlayService.open(this.content(), config);\n\n this.overlay = overlay;\n this.beforeOpen.emit();\n // The animations can finish after the dropdown is destroyed; its outputs must not emit then.\n overlay\n .afterOpen()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.afterOpen.emit());\n overlay\n .beforeClose()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.beforeClose.emit();\n this.close();\n });\n overlay\n .afterClose()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.afterClose.emit());\n\n this.changeDetectorRef.markForCheck();\n }\n });\n }\n\n close(): void {\n if (this.isOpened) {\n this.overlay?.close();\n this.changeDetectorRef.markForCheck();\n }\n }\n\n toggle(): void {\n this.isOpened ? this.close() : this.open();\n }\n\n get isOpened(): boolean {\n return this.overlay?.isOpened === true;\n }\n\n updateOverlayPosition(): void {\n if (this.overlay && this.overlay.hasAttached) {\n this.overlay.overlayRef.updateSize(this.getConfig());\n this.overlay.overlayRef.updatePosition();\n }\n }\n\n private get currentOrigin(): NgDocOverlayOrigin | null {\n const origin: CdkOverlayOrigin | Point | null = this.lastOrigin();\n\n return origin instanceof CdkOverlayOrigin\n ? (origin.elementRef.nativeElement as HTMLElement)\n : origin || this.overlayHost?.origin || null;\n }\n\n private getPositions(\n positions: NgDocOverlayPosition | NgDocOverlayPosition[],\n border: number,\n ): NgDocOverlayPosition[] {\n const origin: NgDocOverlayOrigin = toElement(this.currentOrigin) as HTMLElement;\n if (origin instanceof HTMLElement) {\n return NgDocOverlayUtils.getConnectedPosition(\n !!positions && asArray(positions).length\n ? positions\n : ['bottom-center', 'top-center', 'right-center', 'left-center'],\n origin,\n border * -1,\n this.withArrow(),\n );\n } else {\n return !!positions && asArray(positions).length\n ? asArray(positions)\n : ['bottom-center', 'top-center', 'right-center', 'left-center'];\n }\n }\n\n private getConfig(): NgDocOverlayConfig {\n const overlayProperties: NgDocOverlayProperties = mergeOverlayConfigs(\n this.overlayProperties,\n this.getOverlayProperties(),\n this.overlayHost ?? undefined,\n );\n if (!this.currentOrigin) {\n throw new Error('Origin for the dropdown was not provided.');\n }\n return {\n overlayContainer: NgDocOverlayContainerComponent,\n positionStrategy: this.overlayService.connectedPositionStrategy(\n this.currentOrigin,\n this.getPositions(overlayProperties.positions || [], overlayProperties.borderOffset || 0),\n ),\n scrollStrategy: this.overlayService.scrollStrategy().reposition(),\n viewContainerRef: this.viewContainerRef,\n openAnimation: dropdownOpenAnimation,\n hasBackdrop: this.hasBackdrop(),\n ...overlayProperties,\n panelClass: [\n 'ng-doc-dropdown',\n ...asArray(this.panelClass()),\n ...asArray(this.overlayHost?.panelClass),\n ],\n };\n }\n\n private getOverlayProperties(): NgDocOverlayProperties {\n return {\n origin: this.currentOrigin || undefined,\n positions: this.positions(),\n closeIfOutsideClick: this.closeIfOutsideClick(),\n closeIfInnerClick: this.closeIfInnerClick(),\n withPointer: this.withArrow(),\n contactBorder: this.contactBorder(),\n borderOffset: this.borderOffset(),\n panelClass: this.panelClass(),\n width: this.width(),\n height: this.height(),\n minWidth: this.minWidth(),\n minHeight: this.minHeight(),\n maxWidth: this.maxWidth(),\n maxHeight: this.maxHeight(),\n disposeOnNavigation: true,\n disposeOnRouteNavigation: true,\n };\n }\n\n ngOnDestroy(): void {\n if (this.overlay) {\n this.overlay.overlayRef.dispose();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAiCA;;;AAGG;MAYU,sBAAsB,CAAA;AAXnC,IAAA,WAAA,GAAA;AAYY,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;A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B,EAAA,QAAA,EACjB,CAAA,CAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,mBAAmB,CAAC,EAAA,IAAA,EAC1B;AACJ,wBAAA,iBAAiB,EAAE,mBAAmB;AACtC,wBAAA,SAAS,EAAE,SAAS;AACrB,qBAAA,EAAA,MAAA,EAAA,CAAA,uSAAA,CAAA,EAAA;;;AC9CH;;AAEG;;;;"}
@@ -1,16 +1,23 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { model, input, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
4
4
 
5
5
  /** Component helps to expand or collapse content */
6
6
  class NgDocExpanderComponent {
7
7
  constructor() {
8
- /** Change expand state */
9
- this.expanded = false;
10
- this.collapseMod = 'remove';
8
+ /** Whether the content is shown. */
9
+ this.expanded = model(false, /* @ts-ignore */
10
+ ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
11
+ /** Expander content */
12
+ this.content = input.required(/* @ts-ignore */
13
+ ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
14
+ /** `remove` removes the collapsed content from the DOM; `hide` keeps it, inert and hidden. */
15
+ this.collapseMod = input('remove', /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "collapseMod" }] : /* istanbul ignore next */ []));
11
17
  }
18
+ /** Shows or hides the content. */
12
19
  toggle() {
13
- this.expanded = !this.expanded;
20
+ untracked(() => this.expanded.update((expanded) => !expanded));
14
21
  }
15
22
  enter(container, event) {
16
23
  container
@@ -34,20 +41,13 @@ class NgDocExpanderComponent {
34
41
  })
35
42
  .finished.then(() => event.animationComplete());
36
43
  }
37
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NgDocExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
38
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: NgDocExpanderComponent, isStandalone: true, selector: "ng-doc-expander", inputs: { expanded: "expanded", content: "content", collapseMod: "collapseMod" }, ngImport: i0, template: "@if (collapseMod === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded ? null : ''\"\n [class.expanded]=\"expanded\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded) {\n <div\n [attr.inert]=\"expanded ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n", styles: [":host{display:block}:host>div{overflow:hidden}:host .ng-doc-expander-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--ng-doc-transition)}:host .ng-doc-expander-container.expanded{grid-template-rows:1fr}:host .ng-doc-expander-container.expanded .ng-doc-expander-content{visibility:visible}:host .ng-doc-expander-container .ng-doc-expander-content{min-height:0;transition:visibility var(--ng-doc-transition);visibility:hidden;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
45
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocExpanderComponent, isStandalone: true, selector: "ng-doc-expander", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, collapseMod: { classPropertyName: "collapseMod", publicName: "collapseMod", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "@if (collapseMod() === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded() ? null : ''\"\n [class.expanded]=\"expanded()\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded()) {\n <div\n [attr.inert]=\"expanded() ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n", styles: [":host{display:block}:host>div{overflow:hidden}:host .ng-doc-expander-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--ng-doc-transition)}:host .ng-doc-expander-container.expanded{grid-template-rows:1fr}:host .ng-doc-expander-container.expanded .ng-doc-expander-content{visibility:visible}:host .ng-doc-expander-container .ng-doc-expander-content{min-height:0;transition:visibility var(--ng-doc-transition);visibility:hidden;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
39
46
  }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NgDocExpanderComponent, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocExpanderComponent, decorators: [{
41
48
  type: Component,
42
- args: [{ selector: 'ng-doc-expander', changeDetection: ChangeDetectionStrategy.OnPush, imports: [PolymorpheusOutlet], template: "@if (collapseMod === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded ? null : ''\"\n [class.expanded]=\"expanded\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded) {\n <div\n [attr.inert]=\"expanded ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n", styles: [":host{display:block}:host>div{overflow:hidden}:host .ng-doc-expander-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--ng-doc-transition)}:host .ng-doc-expander-container.expanded{grid-template-rows:1fr}:host .ng-doc-expander-container.expanded .ng-doc-expander-content{visibility:visible}:host .ng-doc-expander-container .ng-doc-expander-content{min-height:0;transition:visibility var(--ng-doc-transition);visibility:hidden;overflow:hidden}\n"] }]
43
- }], propDecorators: { expanded: [{
44
- type: Input
45
- }], content: [{
46
- type: Input,
47
- args: [{ required: true }]
48
- }], collapseMod: [{
49
- type: Input
50
- }] } });
49
+ args: [{ selector: 'ng-doc-expander', changeDetection: ChangeDetectionStrategy.OnPush, imports: [PolymorpheusOutlet], template: "@if (collapseMod() === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded() ? null : ''\"\n [class.expanded]=\"expanded()\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded()) {\n <div\n [attr.inert]=\"expanded() ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n", styles: [":host{display:block}:host>div{overflow:hidden}:host .ng-doc-expander-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--ng-doc-transition)}:host .ng-doc-expander-container.expanded{grid-template-rows:1fr}:host .ng-doc-expander-container.expanded .ng-doc-expander-content{visibility:visible}:host .ng-doc-expander-container .ng-doc-expander-content{min-height:0;transition:visibility var(--ng-doc-transition);visibility:hidden;overflow:hidden}\n"] }]
50
+ }], propDecorators: { expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }], collapseMod: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseMod", required: false }] }] } });
51
51
 
52
52
  /**
53
53
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-ui-kit-components-expander.mjs","sources":["../../../../libs/ui-kit/components/expander/expander.component.ts","../../../../libs/ui-kit/components/expander/expander.component.html","../../../../libs/ui-kit/components/expander/ng-doc-ui-kit-components-expander.ts"],"sourcesContent":["import { AnimationCallbackEvent, ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { NgDocContent } from '@ng-doc/ui-kit/types';\nimport { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';\n\n/** Component helps to expand or collapse content */\n@Component({\n selector: 'ng-doc-expander',\n templateUrl: './expander.component.html',\n styleUrls: ['./expander.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [PolymorpheusOutlet],\n})\nexport class NgDocExpanderComponent {\n /** Change expand state */\n @Input()\n expanded: boolean = false;\n\n /** Expander content */\n @Input({ required: true })\n content!: NgDocContent;\n\n @Input()\n collapseMod: 'remove' | 'hide' = 'remove';\n\n toggle(): void {\n this.expanded = !this.expanded;\n }\n\n protected enter(container: HTMLElement, event: AnimationCallbackEvent): void {\n container\n .animate(\n [\n { opacity: '0', height: '0px' },\n { opacity: '1', height: container.scrollHeight + 'px' },\n ],\n {\n duration: 225,\n easing: 'cubic-bezier(0.4,0.0,0.2,1)',\n },\n )\n .finished.then(() => event.animationComplete());\n }\n\n protected leave(container: HTMLElement, event: AnimationCallbackEvent): void {\n container\n .animate(\n [\n { opacity: '1', height: container.scrollHeight + 'px' },\n { opacity: '0', height: '0px' },\n ],\n {\n duration: 225,\n easing: 'cubic-bezier(0.4,0.0,0.2,1)',\n },\n )\n .finished.then(() => event.animationComplete());\n }\n}\n","@if (collapseMod === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded ? null : ''\"\n [class.expanded]=\"expanded\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded) {\n <div\n [attr.inert]=\"expanded ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA;MAQa,sBAAsB,CAAA;AAPnC,IAAA,WAAA,GAAA;;QAUE,IAAA,CAAA,QAAQ,GAAY,KAAK;QAOzB,IAAA,CAAA,WAAW,GAAsB,QAAQ;AAmC1C,IAAA;IAjCC,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ;IAChC;IAEU,KAAK,CAAC,SAAsB,EAAE,KAA6B,EAAA;QACnE;AACG,aAAA,OAAO,CACN;AACE,YAAA,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE;YAC/B,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,YAAY,GAAG,IAAI,EAAE;SACxD,EACD;AACE,YAAA,QAAQ,EAAE,GAAG;AACb,YAAA,MAAM,EAAE,6BAA6B;SACtC;aAEF,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,iBAAiB,EAAE,CAAC;I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IA,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBAGxB;;;AErBH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-ui-kit-components-expander.mjs","sources":["../../../../libs/ui-kit/components/expander/expander.component.ts","../../../../libs/ui-kit/components/expander/expander.component.html","../../../../libs/ui-kit/components/expander/ng-doc-ui-kit-components-expander.ts"],"sourcesContent":["import {\n AnimationCallbackEvent,\n ChangeDetectionStrategy,\n Component,\n input,\n model,\n untracked,\n} from '@angular/core';\nimport { NgDocContent } from '@ng-doc/ui-kit/types';\nimport { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';\n\n/** Component helps to expand or collapse content */\n@Component({\n selector: 'ng-doc-expander',\n templateUrl: './expander.component.html',\n styleUrls: ['./expander.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [PolymorpheusOutlet],\n})\nexport class NgDocExpanderComponent {\n /** Whether the content is shown. */\n readonly expanded = model<boolean>(false);\n\n /** Expander content */\n readonly content = input.required<NgDocContent>();\n\n /** `remove` removes the collapsed content from the DOM; `hide` keeps it, inert and hidden. */\n readonly collapseMod = input<'remove' | 'hide'>('remove');\n\n /** Shows or hides the content. */\n toggle(): void {\n untracked(() => this.expanded.update((expanded: boolean) => !expanded));\n }\n\n protected enter(container: HTMLElement, event: AnimationCallbackEvent): void {\n container\n .animate(\n [\n { opacity: '0', height: '0px' },\n { opacity: '1', height: container.scrollHeight + 'px' },\n ],\n {\n duration: 225,\n easing: 'cubic-bezier(0.4,0.0,0.2,1)',\n },\n )\n .finished.then(() => event.animationComplete());\n }\n\n protected leave(container: HTMLElement, event: AnimationCallbackEvent): void {\n container\n .animate(\n [\n { opacity: '1', height: container.scrollHeight + 'px' },\n { opacity: '0', height: '0px' },\n ],\n {\n duration: 225,\n easing: 'cubic-bezier(0.4,0.0,0.2,1)',\n },\n )\n .finished.then(() => event.animationComplete());\n }\n}\n","@if (collapseMod() === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded() ? null : ''\"\n [class.expanded]=\"expanded()\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded()) {\n <div\n [attr.inert]=\"expanded() ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAWA;MAQa,sBAAsB,CAAA;AAPnC,IAAA,WAAA,GAAA;;QASW,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK;qFAAC;;QAGhC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ;oFAAgB;;QAGxC,IAAA,CAAA,WAAW,GAAG,KAAK,CAAoB,QAAQ;wFAAC;AAoC1D,IAAA;;IAjCC,MAAM,GAAA;AACJ,QAAA,SAAS,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAiB,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzE;IAEU,KAAK,CAAC,SAAsB,EAAE,KAA6B,EAAA;QACnE;AACG,aAAA,OAAO,CACN;AACE,YAAA,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE;YAC/B,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,YAAY,GAAG,IAAI,EAAE;SACxD,EACD;AACE,YAAA,QAAQ,EAAE,GAAG;AACb,YAAA,MAAM,EAAE,6BAA6B;SACtC;aAEF,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,iBAAiB,EAAE,CAAC;IACnD;IAEU,KAAK,CAAC,SAAsB,EAAE,KAA6B,EAAA;QACnE;AACG,aAAA,OAAO,CACN;YACE,EAAE,OAAO,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,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEjB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAPlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,mBAGV,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,kBAAkB,CAAC,EAAA,QAAA,EAAA,mqBAAA,EAAA,MAAA,EAAA,CAAA,6eAAA,CAAA,EAAA;;;AEjB/B;;AAEG;;;;"}
@@ -2,12 +2,12 @@ import * as i0 from '@angular/core';
2
2
  import { ChangeDetectionStrategy, Component } from '@angular/core';
3
3
 
4
4
  class NgDocFloatedBorderComponent {
5
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NgDocFloatedBorderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: NgDocFloatedBorderComponent, isStandalone: true, selector: "ng-doc-floated-border", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, styles: [":host{position:relative;display:block}:host:after{position:absolute;content:\"\";top:0;left:0;z-index:3;width:100%;height:100%;pointer-events:none;border:var(--ng-doc-floated-border);border-color:var(--ng-doc-floated-border-color);border-radius:var(--ng-doc-floated-border-radius);box-shadow:0 1px 2px #1018280d,0 0 0 4px var(--ng-doc-floated-border-shadow-color);transition:var(--ng-doc-transition)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFloatedBorderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.2.1", type: NgDocFloatedBorderComponent, isStandalone: true, selector: "ng-doc-floated-border", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, styles: [":host{position:relative;display:block}:host:after{position:absolute;content:\"\";top:0;left:0;z-index:3;width:100%;height:100%;pointer-events:none;border:var(--ng-doc-floated-border);border-color:var(--ng-doc-floated-border-color);border-radius:var(--ng-doc-floated-border-radius);box-shadow:0 1px 2px #1018280d,0 0 0 4px var(--ng-doc-floated-border-shadow-color);transition:var(--ng-doc-transition)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7
7
  }
8
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NgDocFloatedBorderComponent, decorators: [{
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFloatedBorderComponent, decorators: [{
9
9
  type: Component,
10
- args: [{ selector: 'ng-doc-floated-border', template: ` <ng-content></ng-content> `, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{position:relative;display:block}:host:after{position:absolute;content:\"\";top:0;left:0;z-index:3;width:100%;height:100%;pointer-events:none;border:var(--ng-doc-floated-border);border-color:var(--ng-doc-floated-border-color);border-radius:var(--ng-doc-floated-border-radius);box-shadow:0 1px 2px #1018280d,0 0 0 4px var(--ng-doc-floated-border-shadow-color);transition:var(--ng-doc-transition)}\n"] }]
10
+ args: [{ selector: 'ng-doc-floated-border', template: ` <ng-content></ng-content> `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{position:relative;display:block}:host:after{position:absolute;content:\"\";top:0;left:0;z-index:3;width:100%;height:100%;pointer-events:none;border:var(--ng-doc-floated-border);border-color:var(--ng-doc-floated-border-color);border-radius:var(--ng-doc-floated-border-radius);box-shadow:0 1px 2px #1018280d,0 0 0 4px var(--ng-doc-floated-border-shadow-color);transition:var(--ng-doc-transition)}\n"] }]
11
11
  }] });
12
12
 
13
13
  /**