@acorex/components 21.0.1-next.0 → 21.0.1-next.2

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 (230) hide show
  1. package/accordion/index.d.ts +1 -0
  2. package/action-sheet/index.d.ts +41 -19
  3. package/button-group/index.d.ts +4 -6
  4. package/chips/index.d.ts +8 -3
  5. package/collapse/index.d.ts +6 -4
  6. package/data-table/index.d.ts +253 -4
  7. package/dialog/index.d.ts +19 -15
  8. package/dropdown/index.d.ts +3 -4
  9. package/fesm2022/acorex-components-accordion.mjs +13 -8
  10. package/fesm2022/acorex-components-accordion.mjs.map +1 -1
  11. package/fesm2022/acorex-components-action-sheet.mjs +141 -93
  12. package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
  13. package/fesm2022/acorex-components-alert.mjs +6 -6
  14. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  15. package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
  16. package/fesm2022/acorex-components-audio-wave.mjs +4 -5
  17. package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
  18. package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
  19. package/fesm2022/acorex-components-avatar.mjs +3 -3
  20. package/fesm2022/acorex-components-avatar.mjs.map +1 -1
  21. package/fesm2022/acorex-components-badge.mjs +3 -3
  22. package/fesm2022/acorex-components-badge.mjs.map +1 -1
  23. package/fesm2022/acorex-components-bottom-navigation.mjs +2 -2
  24. package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
  25. package/fesm2022/acorex-components-breadcrumbs.mjs +2 -2
  26. package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
  27. package/fesm2022/acorex-components-button-group.mjs +11 -15
  28. package/fesm2022/acorex-components-button-group.mjs.map +1 -1
  29. package/fesm2022/acorex-components-button.mjs +5 -5
  30. package/fesm2022/acorex-components-button.mjs.map +1 -1
  31. package/fesm2022/acorex-components-calendar.mjs +4 -4
  32. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  33. package/fesm2022/acorex-components-check-box.mjs +3 -3
  34. package/fesm2022/acorex-components-check-box.mjs.map +1 -1
  35. package/fesm2022/acorex-components-chips.mjs +8 -6
  36. package/fesm2022/acorex-components-chips.mjs.map +1 -1
  37. package/fesm2022/acorex-components-circular-progress.mjs +4 -6
  38. package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
  39. package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
  40. package/fesm2022/acorex-components-collapse.mjs +10 -13
  41. package/fesm2022/acorex-components-collapse.mjs.map +1 -1
  42. package/fesm2022/acorex-components-color-box.mjs +2 -2
  43. package/fesm2022/acorex-components-color-box.mjs.map +1 -1
  44. package/fesm2022/acorex-components-color-palette.mjs +2 -2
  45. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  46. package/fesm2022/acorex-components-command.mjs +2 -2
  47. package/fesm2022/acorex-components-command.mjs.map +1 -1
  48. package/fesm2022/acorex-components-comment.mjs +8 -8
  49. package/fesm2022/acorex-components-comment.mjs.map +1 -1
  50. package/fesm2022/acorex-components-conversation.mjs +2 -2
  51. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  52. package/fesm2022/acorex-components-conversation2.mjs +2 -2
  53. package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
  54. package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
  55. package/fesm2022/acorex-components-data-list.mjs.map +1 -1
  56. package/fesm2022/acorex-components-data-pager.mjs +2 -2
  57. package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
  58. package/fesm2022/acorex-components-data-table.mjs +452 -16
  59. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  60. package/fesm2022/acorex-components-datetime-box.mjs +2 -2
  61. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  62. package/fesm2022/acorex-components-datetime-input.mjs +2 -2
  63. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  64. package/fesm2022/acorex-components-datetime-picker.mjs +8 -2
  65. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  66. package/fesm2022/acorex-components-decorators.mjs +13 -20
  67. package/fesm2022/acorex-components-decorators.mjs.map +1 -1
  68. package/fesm2022/acorex-components-dialog.mjs +67 -47
  69. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  70. package/fesm2022/acorex-components-drawer-legacy.mjs.map +1 -1
  71. package/fesm2022/acorex-components-drawer.mjs +7 -6
  72. package/fesm2022/acorex-components-drawer.mjs.map +1 -1
  73. package/fesm2022/acorex-components-dropdown-button.mjs +2 -2
  74. package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
  75. package/fesm2022/acorex-components-dropdown.mjs +3 -9
  76. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  77. package/fesm2022/acorex-components-editor.mjs +4 -4
  78. package/fesm2022/acorex-components-editor.mjs.map +1 -1
  79. package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
  80. package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
  81. package/fesm2022/acorex-components-form.mjs +9 -17
  82. package/fesm2022/acorex-components-form.mjs.map +1 -1
  83. package/fesm2022/acorex-components-grid-layout-builder.mjs +5 -4
  84. package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
  85. package/fesm2022/acorex-components-image-editor.mjs +18 -18
  86. package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
  87. package/fesm2022/acorex-components-image.mjs +2 -2
  88. package/fesm2022/acorex-components-image.mjs.map +1 -1
  89. package/fesm2022/acorex-components-json-viewer.mjs +2 -2
  90. package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
  91. package/fesm2022/acorex-components-kanban.mjs +4 -6
  92. package/fesm2022/acorex-components-kanban.mjs.map +1 -1
  93. package/fesm2022/acorex-components-kbd.mjs +7 -25
  94. package/fesm2022/acorex-components-kbd.mjs.map +1 -1
  95. package/fesm2022/acorex-components-label.mjs +2 -2
  96. package/fesm2022/acorex-components-label.mjs.map +1 -1
  97. package/fesm2022/acorex-components-list.mjs +2 -2
  98. package/fesm2022/acorex-components-list.mjs.map +1 -1
  99. package/fesm2022/acorex-components-loading-dialog.mjs +73 -36
  100. package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
  101. package/fesm2022/acorex-components-loading.mjs +8 -8
  102. package/fesm2022/acorex-components-loading.mjs.map +1 -1
  103. package/fesm2022/acorex-components-map.mjs +2 -2
  104. package/fesm2022/acorex-components-map.mjs.map +1 -1
  105. package/fesm2022/acorex-components-media-viewer.mjs +10 -10
  106. package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
  107. package/fesm2022/acorex-components-menu.mjs +27 -6
  108. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  109. package/fesm2022/{acorex-components-modal-acorex-components-modal-BnUdtPke.mjs → acorex-components-modal-acorex-components-modal-Bmoz9DL5.mjs} +29 -5
  110. package/fesm2022/acorex-components-modal-acorex-components-modal-Bmoz9DL5.mjs.map +1 -0
  111. package/fesm2022/{acorex-components-modal-modal-content.component-Cgq-wx_m.mjs → acorex-components-modal-modal-content.component-CSJU1vRi.mjs} +5 -7
  112. package/fesm2022/acorex-components-modal-modal-content.component-CSJU1vRi.mjs.map +1 -0
  113. package/fesm2022/acorex-components-modal.mjs +1 -1
  114. package/fesm2022/acorex-components-navbar.mjs +3 -3
  115. package/fesm2022/acorex-components-navbar.mjs.map +1 -1
  116. package/fesm2022/acorex-components-notification.mjs +374 -246
  117. package/fesm2022/acorex-components-notification.mjs.map +1 -1
  118. package/fesm2022/acorex-components-number-box-legacy.mjs +2 -2
  119. package/fesm2022/acorex-components-number-box-legacy.mjs.map +1 -1
  120. package/fesm2022/acorex-components-number-box.mjs +6 -7
  121. package/fesm2022/acorex-components-number-box.mjs.map +1 -1
  122. package/fesm2022/acorex-components-otp.mjs +2 -2
  123. package/fesm2022/acorex-components-otp.mjs.map +1 -1
  124. package/fesm2022/acorex-components-page.mjs.map +1 -1
  125. package/fesm2022/acorex-components-paint.mjs +19 -14
  126. package/fesm2022/acorex-components-paint.mjs.map +1 -1
  127. package/fesm2022/acorex-components-password-box.mjs +4 -4
  128. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  129. package/fesm2022/acorex-components-pdf-reader.mjs +2 -2
  130. package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
  131. package/fesm2022/acorex-components-phone-box.mjs +2 -2
  132. package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
  133. package/fesm2022/acorex-components-picker.mjs +6 -6
  134. package/fesm2022/acorex-components-picker.mjs.map +1 -1
  135. package/fesm2022/acorex-components-popover.mjs +136 -175
  136. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  137. package/fesm2022/acorex-components-popup.mjs +308 -105
  138. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  139. package/fesm2022/acorex-components-progress-bar.mjs +3 -5
  140. package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
  141. package/fesm2022/acorex-components-qrcode.mjs +2 -2
  142. package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
  143. package/fesm2022/acorex-components-query-builder.mjs +2 -2
  144. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  145. package/fesm2022/acorex-components-radio.mjs +2 -2
  146. package/fesm2022/acorex-components-radio.mjs.map +1 -1
  147. package/fesm2022/acorex-components-rail-navigation.mjs +25 -27
  148. package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
  149. package/fesm2022/acorex-components-range-slider.mjs +3 -3
  150. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  151. package/fesm2022/acorex-components-rate-picker.mjs +29 -14
  152. package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
  153. package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
  154. package/fesm2022/acorex-components-result.mjs +2 -2
  155. package/fesm2022/acorex-components-result.mjs.map +1 -1
  156. package/fesm2022/acorex-components-routing-progress.mjs +2 -2
  157. package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
  158. package/fesm2022/acorex-components-rrule.mjs.map +1 -1
  159. package/fesm2022/acorex-components-scheduler-picker.mjs +2 -2
  160. package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
  161. package/fesm2022/acorex-components-scheduler.mjs +18 -18
  162. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  163. package/fesm2022/acorex-components-scss.mjs.map +1 -1
  164. package/fesm2022/acorex-components-search-box.mjs +3 -9
  165. package/fesm2022/acorex-components-search-box.mjs.map +1 -1
  166. package/fesm2022/acorex-components-select-box.mjs +2 -4
  167. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  168. package/fesm2022/acorex-components-selection-list-2.mjs +4 -4
  169. package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
  170. package/fesm2022/acorex-components-selection-list.mjs +2 -2
  171. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  172. package/fesm2022/acorex-components-side-menu.mjs +14 -63
  173. package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
  174. package/fesm2022/acorex-components-skeleton.mjs +2 -2
  175. package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
  176. package/fesm2022/acorex-components-slider.mjs +5 -5
  177. package/fesm2022/acorex-components-slider.mjs.map +1 -1
  178. package/fesm2022/acorex-components-sliding-item.mjs +2 -2
  179. package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
  180. package/fesm2022/acorex-components-step-wizard.mjs +2 -2
  181. package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
  182. package/fesm2022/acorex-components-switch.mjs +4 -4
  183. package/fesm2022/acorex-components-switch.mjs.map +1 -1
  184. package/fesm2022/acorex-components-tabs.mjs +2 -2
  185. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  186. package/fesm2022/acorex-components-tag-box.mjs +2 -2
  187. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  188. package/fesm2022/acorex-components-tag.mjs +3 -3
  189. package/fesm2022/acorex-components-tag.mjs.map +1 -1
  190. package/fesm2022/acorex-components-text-area.mjs +2 -2
  191. package/fesm2022/acorex-components-text-area.mjs.map +1 -1
  192. package/fesm2022/acorex-components-text-box.mjs +2 -2
  193. package/fesm2022/acorex-components-text-box.mjs.map +1 -1
  194. package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
  195. package/fesm2022/acorex-components-time-line.mjs +4 -4
  196. package/fesm2022/acorex-components-time-line.mjs.map +1 -1
  197. package/fesm2022/acorex-components-toast.mjs +233 -125
  198. package/fesm2022/acorex-components-toast.mjs.map +1 -1
  199. package/fesm2022/acorex-components-toolbar.mjs +2 -2
  200. package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
  201. package/fesm2022/acorex-components-tooltip.mjs +12 -12
  202. package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
  203. package/fesm2022/acorex-components-tree-view-legacy.mjs.map +1 -1
  204. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  205. package/fesm2022/acorex-components-uploader.mjs +6 -6
  206. package/fesm2022/acorex-components-uploader.mjs.map +1 -1
  207. package/fesm2022/acorex-components-video-player.mjs +2 -2
  208. package/fesm2022/acorex-components-video-player.mjs.map +1 -1
  209. package/fesm2022/acorex-components-wysiwyg.mjs +12 -12
  210. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  211. package/fesm2022/acorex-components.mjs.map +1 -1
  212. package/grid-layout-builder/index.d.ts +2 -1
  213. package/kbd/index.d.ts +7 -13
  214. package/loading/index.d.ts +1 -1
  215. package/loading-dialog/index.d.ts +31 -15
  216. package/menu/index.d.ts +4 -0
  217. package/modal/index.d.ts +7 -0
  218. package/notification/index.d.ts +47 -28
  219. package/number-box/index.d.ts +1 -1
  220. package/package.json +7 -7
  221. package/paint/index.d.ts +6 -1
  222. package/popover/index.d.ts +20 -27
  223. package/popup/index.d.ts +103 -27
  224. package/rate-picker/index.d.ts +15 -5
  225. package/side-menu/index.d.ts +2 -9
  226. package/slider/index.d.ts +2 -2
  227. package/toast/index.d.ts +24 -18
  228. package/tooltip/index.d.ts +2 -2
  229. package/fesm2022/acorex-components-modal-acorex-components-modal-BnUdtPke.mjs.map +0 -1
  230. package/fesm2022/acorex-components-modal-modal-content.component-Cgq-wx_m.mjs.map +0 -1
@@ -1,17 +1,15 @@
1
1
  import { MXBaseComponent, AXComponent, AXClosableComponent, AXFocusableComponent } from '@acorex/cdk/common';
2
2
  import { AXDecoratorGenericComponent, AXDecoratorCloseButtonComponent } from '@acorex/components/decorators';
3
3
  import { AXTranslatorPipe } from '@acorex/core/translation';
4
- import { Dialog, DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';
5
- import { TemplatePortal, ComponentPortal, CdkPortalOutlet } from '@angular/cdk/portal';
6
- import { isPlatformBrowser, AsyncPipe } from '@angular/common';
4
+ import { isPlatformBrowser, NgTemplateOutlet, NgComponentOutlet, AsyncPipe } from '@angular/common';
7
5
  import * as i0 from '@angular/core';
8
- import { inject, Injectable, DOCUMENT, PLATFORM_ID, Renderer2, signal, TemplateRef, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
9
- import { GlobalPositionStrategy } from '@angular/cdk/overlay';
6
+ import { inject, Injectable, input, DOCUMENT, PLATFORM_ID, Renderer2, signal, computed, TemplateRef, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
7
+ import { AXOverlayService } from '@acorex/cdk/overlay';
10
8
  import { Subject, BehaviorSubject } from 'rxjs';
11
9
 
12
10
  class AXActionSheetService {
13
11
  constructor() {
14
- this.dialog = inject(Dialog);
12
+ this.overlayService = inject(AXOverlayService);
15
13
  this.actionSheetEvent = new Subject();
16
14
  this.actionSheetEvent$ = this.actionSheetEvent.asObservable();
17
15
  }
@@ -42,7 +40,7 @@ class AXActionSheetService {
42
40
  * });
43
41
  * ```
44
42
  */
45
- open(config, isUserInteraction = true) {
43
+ async open(config, isUserInteraction = true) {
46
44
  const defaultConfig = {
47
45
  title: 'action-sheet.title',
48
46
  closeButton: true,
@@ -50,53 +48,63 @@ class AXActionSheetService {
50
48
  header: true,
51
49
  };
52
50
  config = Object.assign(defaultConfig, config);
53
- const dialogRef = this.dialog.open(AXActionSheetComponent, {
54
- data: config,
55
- autoFocus: 'first-tabbable',
56
- restoreFocus: true,
57
- role: 'dialog',
58
- ariaModal: true,
59
- closeOnNavigation: true,
60
- closeOnDestroy: true,
61
- hasBackdrop: true,
51
+ const closed = new BehaviorSubject(null);
52
+ let internalRef;
53
+ const closeActionSheet = (result) => {
54
+ if (internalRef) {
55
+ internalRef.overlayRef.dispose();
56
+ if (result?.data) {
57
+ closed.next({ data: result.data });
58
+ }
59
+ else {
60
+ closed.next({});
61
+ }
62
+ }
63
+ };
64
+ const overlayRef = await this.overlayService.create(AXActionSheetComponent, {
65
+ inputs: {
66
+ data: config,
67
+ onClose: closeActionSheet,
68
+ },
69
+ centered: false,
62
70
  panelClass: ['ax-action-sheet-panel'],
63
- disableClose: true,
64
- positionStrategy: new GlobalPositionStrategy().centerHorizontally().bottom(),
71
+ backdrop: {
72
+ enabled: true,
73
+ background: true,
74
+ closeOnClick: config.closeOnBackdropClick,
75
+ },
76
+ onDispose: () => {
77
+ // Clean up when disposed externally (e.g., backdrop click)
78
+ closed.next({});
79
+ },
65
80
  });
81
+ internalRef = {
82
+ overlayRef,
83
+ close: closeActionSheet,
84
+ };
85
+ // Set the overlayRef input after creation
86
+ if (overlayRef.instance && 'setInput' in overlayRef.instance) {
87
+ overlayRef.instance.setInput('overlayRef', overlayRef);
88
+ }
89
+ // Positioning is handled by CSS via .ax-action-sheet-panel class
66
90
  this.actionSheetEvent.next({
67
- dialogRef,
91
+ overlayRef,
68
92
  data: { state: 'open' },
69
93
  isUserInteraction,
70
94
  });
71
- if (config.closeOnBackdropClick) {
72
- dialogRef.backdropClick.subscribe(() => {
73
- const componentInstance = dialogRef.componentInstance;
74
- if (componentInstance) {
75
- componentInstance.close();
76
- }
77
- });
78
- }
79
- const promise = new Promise((resolve) => {
80
- const closed = new BehaviorSubject(null);
81
- const axDialogRef = {
82
- close: (e) => {
83
- dialogRef.close(e);
84
- },
85
- closed,
86
- };
87
- dialogRef.closed.subscribe((c) => {
88
- if (c?.data) {
89
- closed.next({ data: c.data });
95
+ const axDialogRef = {
96
+ close: (e) => {
97
+ const component = overlayRef.instance;
98
+ if (component?.close) {
99
+ component.close(e);
90
100
  }
91
101
  else {
92
- closed.next({});
102
+ closeActionSheet({ data: e });
93
103
  }
94
- });
95
- if (resolve) {
96
- resolve(axDialogRef);
97
- }
98
- });
99
- return promise;
104
+ },
105
+ closed,
106
+ };
107
+ return axDialogRef;
100
108
  }
101
109
  /**
102
110
  * Sets the current state of action sheet events.
@@ -105,7 +113,7 @@ class AXActionSheetService {
105
113
  * observable for external subscribers to monitor action sheet state changes.
106
114
  *
107
115
  * @param event - The action sheet event to emit. Contains information about the event type,
108
- * associated data, user interaction status, and dialog reference.
116
+ * associated data, user interaction status, and overlay reference.
109
117
  * @returns void
110
118
  */
111
119
  setActionSheetEventState(event) {
@@ -129,8 +137,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
129
137
  class AXActionSheetComponent extends MXBaseComponent {
130
138
  constructor() {
131
139
  super(...arguments);
132
- this.data = inject(DIALOG_DATA);
133
- this.dialogRef = inject(DialogRef);
140
+ /** Action sheet configuration data */
141
+ this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
142
+ /** @internal Callback function to close the action sheet */
143
+ this.onClose = input(...(ngDevMode ? [undefined, { debugName: "onClose" }] : []));
144
+ /** @internal Overlay reference for event tracking */
145
+ this.overlayRef = input(...(ngDevMode ? [undefined, { debugName: "overlayRef" }] : []));
134
146
  this.document = inject(DOCUMENT);
135
147
  this.platformID = inject(PLATFORM_ID);
136
148
  this.renderer = inject(Renderer2);
@@ -145,26 +157,50 @@ class AXActionSheetComponent extends MXBaseComponent {
145
157
  this.actionSheetHeight = signal(0, ...(ngDevMode ? [{ debugName: "actionSheetHeight" }] : []));
146
158
  this.isActionSheetHeightSet = signal(false, ...(ngDevMode ? [{ debugName: "isActionSheetHeightSet" }] : []));
147
159
  this.transitionDuration = signal(300, ...(ngDevMode ? [{ debugName: "transitionDuration" }] : []));
160
+ /** Template content if data.content is a TemplateRef */
161
+ this.templateContent = computed(() => {
162
+ const content = this.data().content;
163
+ return content instanceof TemplateRef ? content : null;
164
+ }, ...(ngDevMode ? [{ debugName: "templateContent" }] : []));
165
+ /** Component content if data.content is a component Type */
166
+ this.componentContent = computed(() => {
167
+ const content = this.data().content;
168
+ return typeof content === 'function' ? content : null;
169
+ }, ...(ngDevMode ? [{ debugName: "componentContent" }] : []));
170
+ /** Template context for ngTemplateOutlet */
171
+ this.templateContext = computed(() => ({
172
+ $implicit: this.data(),
173
+ ref: this,
174
+ }), ...(ngDevMode ? [{ debugName: "templateContext" }] : []));
148
175
  }
149
176
  /**
150
177
  * @ignore
151
178
  */
152
179
  ngOnInit() {
153
180
  super.ngOnInit();
154
- if (this.data.content) {
155
- if (this.data.content instanceof TemplateRef) {
156
- this._selectedPortal = new TemplatePortal(this.data.content, this.getViewContainer(), {
157
- $implicit: this.data,
158
- ref: this,
181
+ // Enter animation: start with height 0 and animate to natural height
182
+ if (isPlatformBrowser(this.platformID)) {
183
+ const hostElement = this.getHostElement();
184
+ hostElement.style.height = '0';
185
+ hostElement.style.overflow = 'hidden';
186
+ // Use requestAnimationFrame to ensure the initial height is applied before animating
187
+ requestAnimationFrame(() => {
188
+ hostElement.style.transitionDuration = `${this.transitionDuration()}ms`;
189
+ hostElement.style.height = 'auto';
190
+ // Get the natural height
191
+ const naturalHeight = hostElement.scrollHeight;
192
+ hostElement.style.height = '0';
193
+ requestAnimationFrame(() => {
194
+ hostElement.style.height = `${naturalHeight}px`;
195
+ // After animation completes, set height to auto for flexibility
196
+ setTimeout(() => {
197
+ hostElement.style.height = 'auto';
198
+ hostElement.style.overflow = '';
199
+ }, this.transitionDuration());
159
200
  });
160
- this.cdr.markForCheck();
161
- }
162
- else if (typeof this.data.content === 'function') {
163
- this._selectedPortal = new ComponentPortal(this.data.content);
164
- this.cdr.markForCheck();
165
- }
201
+ });
166
202
  }
167
- if (isPlatformBrowser(this.platformID) && this.data.draggable) {
203
+ if (isPlatformBrowser(this.platformID) && this.data().draggable) {
168
204
  this.onMouseMoveListenerFn = this.renderer.listen(this.document, 'mousemove', (e) => {
169
205
  if (this.isDragging()) {
170
206
  e.preventDefault();
@@ -184,7 +220,7 @@ class AXActionSheetComponent extends MXBaseComponent {
184
220
  nativeEvent: e,
185
221
  data: { state: 'dragEnd' },
186
222
  isUserInteraction: true,
187
- dialogRef: this.dialogRef,
223
+ overlayRef: this.overlayRef(),
188
224
  });
189
225
  this.snapToFinalPosition();
190
226
  }
@@ -196,7 +232,7 @@ class AXActionSheetComponent extends MXBaseComponent {
196
232
  nativeEvent: e,
197
233
  data: { state: 'dragEnd' },
198
234
  isUserInteraction: true,
199
- dialogRef: this.dialogRef,
235
+ overlayRef: this.overlayRef(),
200
236
  });
201
237
  this.snapToFinalPosition();
202
238
  }
@@ -210,26 +246,26 @@ class AXActionSheetComponent extends MXBaseComponent {
210
246
  this.onTouchUpListenerFn();
211
247
  }
212
248
  handleMouseDown(e) {
213
- if (!this.data.draggable || e.button !== 0)
249
+ if (!this.data().draggable || e.button !== 0)
214
250
  return;
215
251
  e.preventDefault();
216
252
  this.actionSheetService.setActionSheetEventState({
217
253
  nativeEvent: e,
218
254
  data: { state: 'dragStart' },
219
255
  isUserInteraction: true,
220
- dialogRef: this.dialogRef,
256
+ overlayRef: this.overlayRef(),
221
257
  });
222
258
  this.handleDown(e.clientY);
223
259
  }
224
260
  handleTouchDown(e) {
225
- if (!this.data.draggable || e.target.className.includes('close'))
261
+ if (!this.data().draggable || e.target.className.includes('close'))
226
262
  return;
227
263
  e.preventDefault();
228
264
  this.actionSheetService.setActionSheetEventState({
229
265
  nativeEvent: e,
230
266
  data: { state: 'dragStart' },
231
267
  isUserInteraction: true,
232
- dialogRef: this.dialogRef,
268
+ overlayRef: this.overlayRef(),
233
269
  });
234
270
  this.handleDown(e.touches[0].clientY);
235
271
  }
@@ -259,18 +295,18 @@ class AXActionSheetComponent extends MXBaseComponent {
259
295
  this.actionSheetService.setActionSheetEventState({
260
296
  data: { state: 'normalSize' },
261
297
  isUserInteraction: true,
262
- dialogRef: this.dialogRef,
298
+ overlayRef: this.overlayRef(),
263
299
  });
264
300
  return;
265
301
  }
266
- if (this.data.dragUp && currentHeight > (windowHeight + initialHeight) / 3) {
302
+ if (this.data().dragUp && currentHeight > (windowHeight + initialHeight) / 3) {
267
303
  this.getHostElement().style.height = '100vh';
268
304
  this.isFullScreen.set(true);
269
305
  this.document.body.parentElement.style.overscrollBehaviorY = 'contain';
270
306
  this.actionSheetService.setActionSheetEventState({
271
307
  data: { state: 'fullScreen' },
272
308
  isUserInteraction: true,
273
- dialogRef: this.dialogRef,
309
+ overlayRef: this.overlayRef(),
274
310
  });
275
311
  return;
276
312
  }
@@ -278,11 +314,11 @@ class AXActionSheetComponent extends MXBaseComponent {
278
314
  this.actionSheetService.setActionSheetEventState({
279
315
  data: { state: 'normalSize' },
280
316
  isUserInteraction: true,
281
- dialogRef: this.dialogRef,
317
+ overlayRef: this.overlayRef(),
282
318
  });
283
319
  }
284
320
  heightCalculator(clientY) {
285
- if (this.data.dragUp) {
321
+ if (this.data().dragUp) {
286
322
  return this.document.documentElement.clientHeight - clientY;
287
323
  }
288
324
  if (clientY >= this.document.documentElement.clientHeight - this.actionSheetHeight()) {
@@ -290,14 +326,17 @@ class AXActionSheetComponent extends MXBaseComponent {
290
326
  }
291
327
  return (this.actionSheetHeight() + (this.document.documentElement.clientHeight - clientY - this.actionSheetHeight()) / 10);
292
328
  }
293
- handleAttched(ref) {
294
- ref = ref;
295
- if (ref.instance) {
296
- this._componentRef = ref.instance;
297
- Object.assign(this._componentRef, this.data);
329
+ /**
330
+ * Handles component attachment from ngComponentOutlet
331
+ */
332
+ handleComponentCreated(componentRef) {
333
+ if (componentRef?.instance) {
334
+ this._componentRef = componentRef.instance;
335
+ Object.assign(this._componentRef, this.data());
298
336
  Object.assign(this._componentRef, { _isPopup: true });
299
- if (ref.instance.onClosed) {
300
- ref.instance.onClosed.subscribe((e) => {
337
+ if (componentRef.instance
338
+ .onClosed) {
339
+ componentRef.instance.onClosed.subscribe((e) => {
301
340
  this.close(e);
302
341
  });
303
342
  }
@@ -336,13 +375,16 @@ class AXActionSheetComponent extends MXBaseComponent {
336
375
  this.actionSheetService.setActionSheetEventState({
337
376
  data: { state: 'close' },
338
377
  isUserInteraction,
339
- dialogRef: this.dialogRef,
340
- });
341
- this.dialogRef.close({
342
- component: this._componentRef,
343
- htmlElement: this.getHostElement(),
344
- data: e,
378
+ overlayRef: this.overlayRef(),
345
379
  });
380
+ const closeCallback = this.onClose();
381
+ if (closeCallback) {
382
+ closeCallback({
383
+ component: this._componentRef,
384
+ htmlElement: this.getHostElement(),
385
+ data: e,
386
+ });
387
+ }
346
388
  }, this.transitionDuration());
347
389
  }
348
390
  /**
@@ -350,12 +392,12 @@ class AXActionSheetComponent extends MXBaseComponent {
350
392
  */
351
393
  onKeydownHandler() {
352
394
  const focusedOrHasFocused = this.getHostElement().matches(':focus-within');
353
- if (this.data.closeButton && focusedOrHasFocused) {
395
+ if (this.data().closeButton && focusedOrHasFocused) {
354
396
  this.close(null);
355
397
  }
356
398
  }
357
399
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXActionSheetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
358
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AXActionSheetComponent, isStandalone: true, selector: "ax-action-sheet", host: { listeners: { "keydown.escape": "onKeydownHandler()" } }, providers: [
400
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AXActionSheetComponent, isStandalone: true, selector: "ax-action-sheet", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, onClose: { classPropertyName: "onClose", publicName: "onClose", isSignal: true, isRequired: false, transformFunction: null }, overlayRef: { classPropertyName: "overlayRef", publicName: "overlayRef", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.escape": "onKeydownHandler()" } }, providers: [
359
401
  { provide: AXComponent, useExisting: AXActionSheetComponent },
360
402
  {
361
403
  provide: AXClosableComponent,
@@ -365,11 +407,13 @@ class AXActionSheetComponent extends MXBaseComponent {
365
407
  provide: AXFocusableComponent,
366
408
  useExisting: AXActionSheetComponent,
367
409
  },
368
- ], usesInheritance: true, ngImport: i0, template: "@if (data.draggable) {\n <div (mousedown)=\"handleMouseDown($event)\" (touchstart)=\"handleTouchDown($event)\" class=\"ax-drag-handle-container\">\n <div class=\"ax-drag-handle\"></div>\n </div>\n}\n@if (data.header) {\n <ax-header\n [class.draggable-header]=\"data.draggable\"\n (mousedown)=\"data.draggable ? handleMouseDown($event) : null\"\n (touchstart)=\"data.draggable ? handleTouchDown($event) : null\"\n >\n <ax-prefix>\n <ax-title>{{ data.title | translate | async }}</ax-title>\n\n @if (data.subTitle) {\n <ax-subtitle>\n {{ data.subTitle }}\n </ax-subtitle>\n }\n </ax-prefix>\n @if (data.closeButton) {\n <ax-suffix>\n <ax-close-button></ax-close-button>\n </ax-suffix>\n }\n </ax-header>\n}\n@if (this.data.content) {\n <div class=\"ax-custom-template-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"handleAttched($event)\"></ng-template>\n </div>\n}\n\n<div class=\"ax-action-list ax-action-list-vertical\">\n @for (item of data.items; let i = $index; track i) {\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <div\n class=\"ax-action-item ax-{{ item.color || 'default' }}\"\n [class.ax-state-disabled]=\"item.disabled\"\n [tabindex]=\"i\"\n (click)=\"onItemClick(item)\"\n >\n <div class=\"ax-action-item-prefix\">\n @if (item.icon) {\n <span class=\"ax-item-icon\" [class]=\"item.icon\"></span>\n }\n <ax-text>{{ item.text | translate | async }}</ax-text>\n </div>\n <div class=\"ax-action-item-suffix\"></div>\n </div>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial}}}@layer components{ax-action-sheet{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));width:100vw;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));display:block;position:relative}@media (min-width:48rem){ax-action-sheet{width:70vw}}@media (min-width:64rem){ax-action-sheet{width:50vw}}ax-action-sheet:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-action-sheet .ax-custom-template-container{max-height:100vh;overflow-y:auto}ax-action-sheet .ax-drag-handle-container{padding-top:calc(var(--spacing,.25rem)*2)}ax-action-sheet .ax-drag-handle-container .ax-drag-handle{height:calc(var(--spacing,.25rem)*1);width:calc(var(--spacing,.25rem)*12);border-radius:var(--radius-lg,.5rem);background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)));margin:auto}ax-action-sheet ax-header{border-bottom-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem)*4);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);border-bottom-width:1px}@media (min-width:48rem){ax-action-sheet ax-header{font-size:var(--text-lg,1.125rem);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75/1.125)))}}ax-action-sheet ax-header.draggable-header{padding-top:calc(var(--spacing,.25rem)*0);-webkit-user-select:none;user-select:none}ax-action-sheet ax-header ax-prefix,ax-action-sheet ax-header ax-suffix{flex-direction:column;justify-content:flex-start;display:flex}ax-action-sheet ax-header ax-prefix{align-items:flex-start}ax-action-sheet ax-header ax-prefix ax-title{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}ax-action-sheet ax-header ax-suffix{align-items:flex-end;max-width:fit-content}ax-action-sheet .ax-action-list{max-height:100vh;overflow-y:auto}ax-action-sheet .ax-action-list ax-title{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)))}ax-action-sheet .ax-action-list .ax-action-item{color:var(--ax-comp-bg);min-height:calc(var(--spacing,.25rem)*14)!important;font-size:var(--text-base,1rem)!important;line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ))!important}ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:var(--ax-comp-bg)!important}@supports (color:color-mix(in lab,red,red)){ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:color-mix(in oklab,var(--ax-comp-bg)10%,transparent)!important}}ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover:not(ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover.ax-state-selected){background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)))!important}ax-action-sheet .ax-action-list .ax-action-item .ax-item-icon{font-size:var(--text-2xl,1.5rem)!important;line-height:var(--tw-leading,var(--text-2xl--line-height,calc(2/1.5)))!important;margin-inline-end:calc(var(--spacing,.25rem)*3)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
410
+ ], usesInheritance: true, ngImport: i0, template: "@if (data().draggable) {\n <div (mousedown)=\"handleMouseDown($event)\" (touchstart)=\"handleTouchDown($event)\" class=\"ax-drag-handle-container\">\n <div class=\"ax-drag-handle\"></div>\n </div>\n}\n@if (data().header) {\n <ax-header\n [class.draggable-header]=\"data().draggable\"\n (mousedown)=\"data().draggable ? handleMouseDown($event) : null\"\n (touchstart)=\"data().draggable ? handleTouchDown($event) : null\"\n >\n <ax-prefix>\n <ax-title>{{ data().title | translate | async }}</ax-title>\n\n @if (data().subTitle) {\n <ax-subtitle>\n {{ data().subTitle }}\n </ax-subtitle>\n }\n </ax-prefix>\n @if (data().closeButton) {\n <ax-suffix>\n <ax-close-button></ax-close-button>\n </ax-suffix>\n }\n </ax-header>\n}\n@if (data().content) {\n <div class=\"ax-custom-template-container\">\n @if (templateContent()) {\n <ng-container *ngTemplateOutlet=\"templateContent(); context: templateContext()\"></ng-container>\n } @else if (componentContent()) {\n <ng-container *ngComponentOutlet=\"componentContent()\"></ng-container>\n }\n </div>\n}\n\n<div class=\"ax-action-list ax-action-list-vertical\">\n @for (item of data().items; let i = $index; track i) {\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <div\n class=\"ax-action-item ax-{{ item.color || 'default' }}\"\n [class.ax-state-disabled]=\"item.disabled\"\n [tabindex]=\"i\"\n (click)=\"onItemClick(item)\"\n >\n <div class=\"ax-action-item-prefix\">\n @if (item.icon) {\n <span class=\"ax-item-icon\" [class]=\"item.icon\"></span>\n }\n <ax-text>{{ item.text | translate | async }}</ax-text>\n </div>\n <div class=\"ax-action-item-suffix\"></div>\n </div>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n</div>\n", styles: ["ax-action-sheet{--ax-comp-action-sheet-bg-color: var(--ax-sys-color-lightest-surface)}ax-action-sheet .ax-action-item.ax-primary{--ax-comp-action-sheet-text-color: var(--ax-sys-color-primary-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-primary-surface), .1}ax-action-sheet .ax-action-item.ax-secondary{--ax-comp-action-sheet-text-color: var(--ax-sys-color-secondary-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-secondary-surface), .1}ax-action-sheet .ax-action-item.ax-success{--ax-comp-action-sheet-text-color: var(--ax-sys-color-success-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-success-surface), .1}ax-action-sheet .ax-action-item.ax-warning{--ax-comp-action-sheet-text-color: var(--ax-sys-color-warning-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-warning-surface), .1}ax-action-sheet .ax-action-item.ax-danger{--ax-comp-action-sheet-text-color: var(--ax-sys-color-danger-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-danger-surface), .1}ax-action-sheet .ax-action-item.ax-accent1{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent1-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent1-surface), .1}ax-action-sheet .ax-action-item.ax-accent2{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent2-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent2-surface), .1}ax-action-sheet .ax-action-item.ax-accent3{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent3-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent3-surface), .1}ax-action-sheet .ax-action-item.ax-accent4{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent4-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent4-surface), .1}ax-action-sheet .ax-action-item.ax-accent5{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent5-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent5-surface), .1}ax-action-sheet .ax-action-item.ax-accent6{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent6-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent6-surface), .1}ax-action-sheet .ax-action-item.ax-accent7{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent7-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent7-surface), .1}.ax-action-sheet-panel{position:fixed!important;bottom:0!important;left:50%!important;transform:translate(-50%)!important;top:auto!important;right:auto!important;width:auto!important;height:auto!important;display:block!important;align-items:unset!important;justify-content:unset!important;max-width:none!important}ax-action-sheet{display:block;width:var(--ax-comp-action-sheet-width-sm, 100vw);position:relative;transition-property:height;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function);background-color:rgba(var(--ax-comp-action-sheet-bg-color))}@media (min-width: 768px){ax-action-sheet{width:var(--ax-comp-action-sheet-width-md, 70vw)}}@media (min-width: 1024px){ax-action-sheet{width:var(--ax-comp-action-sheet-width-lg, 50vw)}}ax-action-sheet .ax-custom-template-container{overflow-y:auto;max-height:100vh}ax-action-sheet .ax-drag-handle-container{padding-top:.5rem}ax-action-sheet .ax-drag-handle-container .ax-drag-handle{height:.375rem;width:3rem;margin:auto;border-radius:.5rem;background-color:rgba(var(--ax-sys-color-surface))}ax-action-sheet ax-header{padding:1rem;border-bottom-width:1px;font-size:1rem;line-height:1.5rem;font-weight:500}@media (min-width: 768px){ax-action-sheet ax-header{font-size:1.125rem;line-height:1.75rem}}ax-action-sheet ax-header.draggable-header{padding-top:0;-webkit-user-select:none;user-select:none}ax-action-sheet ax-header ax-prefix,ax-action-sheet ax-header ax-suffix{display:flex;flex-direction:column;justify-content:flex-start}ax-action-sheet ax-header ax-prefix{align-items:flex-start}ax-action-sheet ax-header ax-prefix ax-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;line-clamp:1;-webkit-line-clamp:1}ax-action-sheet ax-header ax-suffix{align-items:flex-end;max-width:fit-content}ax-action-sheet .ax-action-list{overflow-y:auto;max-height:100vh}ax-action-sheet .ax-action-list ax-title{font-size:.875rem}ax-action-sheet .ax-action-list .ax-action-item{min-height:3.5rem!important;font-size:1rem!important;color:rgba(var(--ax-comp-action-sheet-text-color))}ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:rgba(var(--ax-comp-action-sheet-hover-bg-color, var(--ax-sys-color-surface)))!important}ax-action-sheet .ax-action-list .ax-action-item .ax-item-icon{margin-inline-end:.75rem!important;font-size:1.5rem!important;line-height:2rem!important}.ax-dark ax-action-sheet{--ax-comp-action-sheet-bg-color: var(--ax-sys-color-darker-surface)}\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
369
411
  }
370
412
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXActionSheetComponent, decorators: [{
371
413
  type: Component,
372
- args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
414
+ args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
415
+ '(keydown.escape)': 'onKeydownHandler()',
416
+ }, providers: [
373
417
  { provide: AXComponent, useExisting: AXActionSheetComponent },
374
418
  {
375
419
  provide: AXClosableComponent,
@@ -379,11 +423,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
379
423
  provide: AXFocusableComponent,
380
424
  useExisting: AXActionSheetComponent,
381
425
  },
382
- ], imports: [AXDecoratorGenericComponent, AXDecoratorCloseButtonComponent, CdkPortalOutlet, AXTranslatorPipe, AsyncPipe], template: "@if (data.draggable) {\n <div (mousedown)=\"handleMouseDown($event)\" (touchstart)=\"handleTouchDown($event)\" class=\"ax-drag-handle-container\">\n <div class=\"ax-drag-handle\"></div>\n </div>\n}\n@if (data.header) {\n <ax-header\n [class.draggable-header]=\"data.draggable\"\n (mousedown)=\"data.draggable ? handleMouseDown($event) : null\"\n (touchstart)=\"data.draggable ? handleTouchDown($event) : null\"\n >\n <ax-prefix>\n <ax-title>{{ data.title | translate | async }}</ax-title>\n\n @if (data.subTitle) {\n <ax-subtitle>\n {{ data.subTitle }}\n </ax-subtitle>\n }\n </ax-prefix>\n @if (data.closeButton) {\n <ax-suffix>\n <ax-close-button></ax-close-button>\n </ax-suffix>\n }\n </ax-header>\n}\n@if (this.data.content) {\n <div class=\"ax-custom-template-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"handleAttched($event)\"></ng-template>\n </div>\n}\n\n<div class=\"ax-action-list ax-action-list-vertical\">\n @for (item of data.items; let i = $index; track i) {\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <div\n class=\"ax-action-item ax-{{ item.color || 'default' }}\"\n [class.ax-state-disabled]=\"item.disabled\"\n [tabindex]=\"i\"\n (click)=\"onItemClick(item)\"\n >\n <div class=\"ax-action-item-prefix\">\n @if (item.icon) {\n <span class=\"ax-item-icon\" [class]=\"item.icon\"></span>\n }\n <ax-text>{{ item.text | translate | async }}</ax-text>\n </div>\n <div class=\"ax-action-item-suffix\"></div>\n </div>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial}}}@layer components{ax-action-sheet{background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));width:100vw;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));display:block;position:relative}@media (min-width:48rem){ax-action-sheet{width:70vw}}@media (min-width:64rem){ax-action-sheet{width:50vw}}ax-action-sheet:where(.dark,.dark *){background-color:var(--color-darker,rgba(var(--ax-sys-color-darker-surface)))}ax-action-sheet .ax-custom-template-container{max-height:100vh;overflow-y:auto}ax-action-sheet .ax-drag-handle-container{padding-top:calc(var(--spacing,.25rem)*2)}ax-action-sheet .ax-drag-handle-container .ax-drag-handle{height:calc(var(--spacing,.25rem)*1);width:calc(var(--spacing,.25rem)*12);border-radius:var(--radius-lg,.5rem);background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)));margin:auto}ax-action-sheet ax-header{border-bottom-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem)*4);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);border-bottom-width:1px}@media (min-width:48rem){ax-action-sheet ax-header{font-size:var(--text-lg,1.125rem);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75/1.125)))}}ax-action-sheet ax-header.draggable-header{padding-top:calc(var(--spacing,.25rem)*0);-webkit-user-select:none;user-select:none}ax-action-sheet ax-header ax-prefix,ax-action-sheet ax-header ax-suffix{flex-direction:column;justify-content:flex-start;display:flex}ax-action-sheet ax-header ax-prefix{align-items:flex-start}ax-action-sheet ax-header ax-prefix ax-title{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}ax-action-sheet ax-header ax-suffix{align-items:flex-end;max-width:fit-content}ax-action-sheet .ax-action-list{max-height:100vh;overflow-y:auto}ax-action-sheet .ax-action-list ax-title{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)))}ax-action-sheet .ax-action-list .ax-action-item{color:var(--ax-comp-bg);min-height:calc(var(--spacing,.25rem)*14)!important;font-size:var(--text-base,1rem)!important;line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ))!important}ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:var(--ax-comp-bg)!important}@supports (color:color-mix(in lab,red,red)){ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:color-mix(in oklab,var(--ax-comp-bg)10%,transparent)!important}}ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover:not(ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item.ax-default:hover.ax-state-selected){background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)))!important}ax-action-sheet .ax-action-list .ax-action-item .ax-item-icon{font-size:var(--text-2xl,1.5rem)!important;line-height:var(--tw-leading,var(--text-2xl--line-height,calc(2/1.5)))!important;margin-inline-end:calc(var(--spacing,.25rem)*3)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n"] }]
383
- }], propDecorators: { onKeydownHandler: [{
384
- type: HostListener,
385
- args: ['keydown.escape']
386
- }] } });
426
+ ], imports: [
427
+ AXDecoratorGenericComponent,
428
+ AXDecoratorCloseButtonComponent,
429
+ NgTemplateOutlet,
430
+ NgComponentOutlet,
431
+ AXTranslatorPipe,
432
+ AsyncPipe,
433
+ ], template: "@if (data().draggable) {\n <div (mousedown)=\"handleMouseDown($event)\" (touchstart)=\"handleTouchDown($event)\" class=\"ax-drag-handle-container\">\n <div class=\"ax-drag-handle\"></div>\n </div>\n}\n@if (data().header) {\n <ax-header\n [class.draggable-header]=\"data().draggable\"\n (mousedown)=\"data().draggable ? handleMouseDown($event) : null\"\n (touchstart)=\"data().draggable ? handleTouchDown($event) : null\"\n >\n <ax-prefix>\n <ax-title>{{ data().title | translate | async }}</ax-title>\n\n @if (data().subTitle) {\n <ax-subtitle>\n {{ data().subTitle }}\n </ax-subtitle>\n }\n </ax-prefix>\n @if (data().closeButton) {\n <ax-suffix>\n <ax-close-button></ax-close-button>\n </ax-suffix>\n }\n </ax-header>\n}\n@if (data().content) {\n <div class=\"ax-custom-template-container\">\n @if (templateContent()) {\n <ng-container *ngTemplateOutlet=\"templateContent(); context: templateContext()\"></ng-container>\n } @else if (componentContent()) {\n <ng-container *ngComponentOutlet=\"componentContent()\"></ng-container>\n }\n </div>\n}\n\n<div class=\"ax-action-list ax-action-list-vertical\">\n @for (item of data().items; let i = $index; track i) {\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <div\n class=\"ax-action-item ax-{{ item.color || 'default' }}\"\n [class.ax-state-disabled]=\"item.disabled\"\n [tabindex]=\"i\"\n (click)=\"onItemClick(item)\"\n >\n <div class=\"ax-action-item-prefix\">\n @if (item.icon) {\n <span class=\"ax-item-icon\" [class]=\"item.icon\"></span>\n }\n <ax-text>{{ item.text | translate | async }}</ax-text>\n </div>\n <div class=\"ax-action-item-suffix\"></div>\n </div>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n</div>\n", styles: ["ax-action-sheet{--ax-comp-action-sheet-bg-color: var(--ax-sys-color-lightest-surface)}ax-action-sheet .ax-action-item.ax-primary{--ax-comp-action-sheet-text-color: var(--ax-sys-color-primary-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-primary-surface), .1}ax-action-sheet .ax-action-item.ax-secondary{--ax-comp-action-sheet-text-color: var(--ax-sys-color-secondary-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-secondary-surface), .1}ax-action-sheet .ax-action-item.ax-success{--ax-comp-action-sheet-text-color: var(--ax-sys-color-success-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-success-surface), .1}ax-action-sheet .ax-action-item.ax-warning{--ax-comp-action-sheet-text-color: var(--ax-sys-color-warning-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-warning-surface), .1}ax-action-sheet .ax-action-item.ax-danger{--ax-comp-action-sheet-text-color: var(--ax-sys-color-danger-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-danger-surface), .1}ax-action-sheet .ax-action-item.ax-accent1{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent1-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent1-surface), .1}ax-action-sheet .ax-action-item.ax-accent2{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent2-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent2-surface), .1}ax-action-sheet .ax-action-item.ax-accent3{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent3-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent3-surface), .1}ax-action-sheet .ax-action-item.ax-accent4{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent4-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent4-surface), .1}ax-action-sheet .ax-action-item.ax-accent5{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent5-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent5-surface), .1}ax-action-sheet .ax-action-item.ax-accent6{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent6-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent6-surface), .1}ax-action-sheet .ax-action-item.ax-accent7{--ax-comp-action-sheet-text-color: var(--ax-sys-color-accent7-surface);--ax-comp-action-sheet-hover-bg-color: var(--ax-sys-color-accent7-surface), .1}.ax-action-sheet-panel{position:fixed!important;bottom:0!important;left:50%!important;transform:translate(-50%)!important;top:auto!important;right:auto!important;width:auto!important;height:auto!important;display:block!important;align-items:unset!important;justify-content:unset!important;max-width:none!important}ax-action-sheet{display:block;width:var(--ax-comp-action-sheet-width-sm, 100vw);position:relative;transition-property:height;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function);background-color:rgba(var(--ax-comp-action-sheet-bg-color))}@media (min-width: 768px){ax-action-sheet{width:var(--ax-comp-action-sheet-width-md, 70vw)}}@media (min-width: 1024px){ax-action-sheet{width:var(--ax-comp-action-sheet-width-lg, 50vw)}}ax-action-sheet .ax-custom-template-container{overflow-y:auto;max-height:100vh}ax-action-sheet .ax-drag-handle-container{padding-top:.5rem}ax-action-sheet .ax-drag-handle-container .ax-drag-handle{height:.375rem;width:3rem;margin:auto;border-radius:.5rem;background-color:rgba(var(--ax-sys-color-surface))}ax-action-sheet ax-header{padding:1rem;border-bottom-width:1px;font-size:1rem;line-height:1.5rem;font-weight:500}@media (min-width: 768px){ax-action-sheet ax-header{font-size:1.125rem;line-height:1.75rem}}ax-action-sheet ax-header.draggable-header{padding-top:0;-webkit-user-select:none;user-select:none}ax-action-sheet ax-header ax-prefix,ax-action-sheet ax-header ax-suffix{display:flex;flex-direction:column;justify-content:flex-start}ax-action-sheet ax-header ax-prefix{align-items:flex-start}ax-action-sheet ax-header ax-prefix ax-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;line-clamp:1;-webkit-line-clamp:1}ax-action-sheet ax-header ax-suffix{align-items:flex-end;max-width:fit-content}ax-action-sheet .ax-action-list{overflow-y:auto;max-height:100vh}ax-action-sheet .ax-action-list ax-title{font-size:.875rem}ax-action-sheet .ax-action-list .ax-action-item{min-height:3.5rem!important;font-size:1rem!important;color:rgba(var(--ax-comp-action-sheet-text-color))}ax-action-sheet .ax-action-list .ax-action-item:hover:not(ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-disabled,ax-action-sheet .ax-action-list .ax-action-item:hover.ax-state-selected){background-color:rgba(var(--ax-comp-action-sheet-hover-bg-color, var(--ax-sys-color-surface)))!important}ax-action-sheet .ax-action-list .ax-action-item .ax-item-icon{margin-inline-end:.75rem!important;font-size:1.5rem!important;line-height:2rem!important}.ax-dark ax-action-sheet{--ax-comp-action-sheet-bg-color: var(--ax-sys-color-darker-surface)}\n"] }]
434
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], onClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "onClose", required: false }] }], overlayRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayRef", required: false }] }] } });
387
435
 
388
436
  class AXActionSheetModule {
389
437
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXActionSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }