@ojiepermana/angular 22.1.13 → 22.2.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 (252) hide show
  1. package/README.md +8 -6
  2. package/SUPPORT.md +3 -3
  3. package/chart/README.md +1 -1
  4. package/component/README.md +2 -2
  5. package/component/calendar/README.md +3 -15
  6. package/component/drawer/README.md +1 -2
  7. package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
  8. package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
  9. package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
  10. package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
  11. package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
  12. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
  13. package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
  14. package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
  15. package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
  16. package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
  17. package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
  18. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
  19. package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
  20. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
  21. package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
  22. package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
  23. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
  24. package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
  25. package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
  26. package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
  27. package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
  28. package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
  29. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
  30. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
  31. package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
  32. package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
  33. package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
  34. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
  35. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
  36. package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
  37. package/fesm2022/ojiepermana-angular-component-drawer.mjs +2 -5
  38. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
  39. package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
  40. package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
  41. package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
  42. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
  43. package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
  44. package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
  45. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
  46. package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
  47. package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
  48. package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
  49. package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
  50. package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
  51. package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
  52. package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
  53. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
  54. package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
  55. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
  56. package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
  57. package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
  58. package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
  59. package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
  60. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
  61. package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
  62. package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
  63. package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
  64. package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
  65. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
  66. package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
  67. package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
  68. package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
  69. package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
  70. package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
  71. package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
  72. package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
  73. package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
  74. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
  75. package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
  76. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
  77. package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
  78. package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
  79. package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
  80. package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
  81. package/fesm2022/ojiepermana-angular-component.mjs +0 -10
  82. package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
  83. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
  84. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-BKCeWzml.mjs +129 -0
  85. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs +811 -0
  86. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-mpK9Ar08.mjs} +387 -183
  87. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BPgH7FJk.mjs +650 -0
  88. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-DMpYcD9t.mjs +662 -0
  89. package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs +1228 -0
  90. package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs +311 -0
  91. package/fesm2022/ojiepermana-angular-navigation-service.mjs +542 -724
  92. package/fesm2022/ojiepermana-angular-navigation-types.mjs +27 -56
  93. package/fesm2022/ojiepermana-angular-navigation.mjs +3052 -4
  94. package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
  95. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1115 -737
  96. package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
  97. package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
  98. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1719 -552
  99. package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -491
  100. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
  101. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
  102. package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
  103. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
  104. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
  105. package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
  106. package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
  107. package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
  108. package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
  109. package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
  110. package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
  111. package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
  112. package/fesm2022/ojiepermana-angular.mjs +5 -24
  113. package/navigation/README.md +1 -1
  114. package/package.json +16 -12
  115. package/sdk/README.md +1 -1
  116. package/sdk/src/writer/index.js +2 -2
  117. package/theme/README.md +1 -1
  118. package/theme/layout/README.md +2 -4
  119. package/theme/page/README.md +50 -0
  120. package/theme/styles/README.md +10 -10
  121. package/theme/styles/css/base/prefers-dark.css +1 -1
  122. package/theme/styles/css/base/status.css +1 -1
  123. package/theme/styles/css/color/amber.css +1 -1
  124. package/theme/styles/css/color/blue.css +1 -1
  125. package/theme/styles/css/color/cyan.css +1 -1
  126. package/theme/styles/css/color/emerald.css +1 -1
  127. package/theme/styles/css/color/fuchsia.css +1 -1
  128. package/theme/styles/css/color/green.css +1 -1
  129. package/theme/styles/css/color/indigo.css +1 -1
  130. package/theme/styles/css/color/lime.css +1 -1
  131. package/theme/styles/css/color/orange.css +1 -1
  132. package/theme/styles/css/color/pink.css +1 -1
  133. package/theme/styles/css/color/purple.css +1 -1
  134. package/theme/styles/css/color/red.css +1 -1
  135. package/theme/styles/css/color/rose.css +1 -1
  136. package/theme/styles/css/color/sky.css +1 -1
  137. package/theme/styles/css/color/teal.css +1 -1
  138. package/theme/styles/css/color/violet.css +1 -1
  139. package/theme/styles/css/color/yellow.css +1 -1
  140. package/theme/styles/css/neutral/gray.css +1 -1
  141. package/theme/styles/css/neutral/mauve.css +1 -1
  142. package/theme/styles/css/neutral/mist.css +1 -1
  143. package/theme/styles/css/neutral/neutral.css +1 -1
  144. package/theme/styles/css/neutral/olive.css +1 -1
  145. package/theme/styles/css/neutral/slate.css +1 -1
  146. package/theme/styles/css/neutral/stone.css +1 -1
  147. package/theme/styles/css/neutral/taupe.css +1 -1
  148. package/theme/styles/css/neutral/zinc.css +1 -1
  149. package/types/ojiepermana-angular-chart-area.d.ts +126 -63
  150. package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
  151. package/types/ojiepermana-angular-chart-core.d.ts +409 -398
  152. package/types/ojiepermana-angular-chart-line.d.ts +141 -68
  153. package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
  154. package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
  155. package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
  156. package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
  157. package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
  158. package/types/ojiepermana-angular-chart.d.ts +3 -2
  159. package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
  160. package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
  161. package/types/ojiepermana-angular-component-alert.d.ts +69 -39
  162. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
  163. package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
  164. package/types/ojiepermana-angular-component-badge.d.ts +36 -24
  165. package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
  166. package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
  167. package/types/ojiepermana-angular-component-button.d.ts +44 -27
  168. package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
  169. package/types/ojiepermana-angular-component-card.d.ts +112 -63
  170. package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
  171. package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
  172. package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
  173. package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
  174. package/types/ojiepermana-angular-component-command.d.ts +206 -121
  175. package/types/ojiepermana-angular-component-composer.d.ts +184 -84
  176. package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
  177. package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
  178. package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
  179. package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
  180. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
  181. package/types/ojiepermana-angular-component-editor.d.ts +215 -117
  182. package/types/ojiepermana-angular-component-empty.d.ts +80 -45
  183. package/types/ojiepermana-angular-component-form.d.ts +185 -121
  184. package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
  185. package/types/ojiepermana-angular-component-icon.d.ts +87 -57
  186. package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
  187. package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
  188. package/types/ojiepermana-angular-component-input.d.ts +27 -17
  189. package/types/ojiepermana-angular-component-item.d.ts +160 -84
  190. package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
  191. package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
  192. package/types/ojiepermana-angular-component-label.d.ts +19 -11
  193. package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
  194. package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
  195. package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
  196. package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
  197. package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
  198. package/types/ojiepermana-angular-component-popover.d.ts +94 -64
  199. package/types/ojiepermana-angular-component-progress.d.ts +45 -17
  200. package/types/ojiepermana-angular-component-radio.d.ts +129 -53
  201. package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
  202. package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
  203. package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
  204. package/types/ojiepermana-angular-component-select.d.ts +94 -77
  205. package/types/ojiepermana-angular-component-separator.d.ts +26 -14
  206. package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
  207. package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
  208. package/types/ojiepermana-angular-component-slider.d.ts +140 -75
  209. package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
  210. package/types/ojiepermana-angular-component-switch.d.ts +97 -40
  211. package/types/ojiepermana-angular-component-table.d.ts +102 -50
  212. package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
  213. package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
  214. package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
  215. package/types/ojiepermana-angular-component-toast.d.ts +51 -55
  216. package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
  217. package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
  218. package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
  219. package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
  220. package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
  221. package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
  222. package/types/ojiepermana-angular-component-utils.d.ts +2 -2
  223. package/types/ojiepermana-angular-component.d.ts +1 -2
  224. package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
  225. package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
  226. package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
  227. package/types/ojiepermana-angular-navigation-types.d.ts +121 -125
  228. package/types/ojiepermana-angular-navigation.d.ts +663 -374
  229. package/types/ojiepermana-angular-sdk.d.ts +69 -71
  230. package/types/ojiepermana-angular-theme-component-settings.d.ts +115 -83
  231. package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
  232. package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
  233. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +399 -187
  234. package/types/ojiepermana-angular-theme-layout.d.ts +201 -112
  235. package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
  236. package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
  237. package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
  238. package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
  239. package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
  240. package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
  241. package/types/ojiepermana-angular-theme-page.d.ts +7 -5
  242. package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
  243. package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
  244. package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
  245. package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
  246. package/types/ojiepermana-angular-theme.d.ts +1 -2
  247. package/types/ojiepermana-angular.d.ts +5 -5
  248. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +0 -91
  249. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +0 -512
  250. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +0 -404
  251. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +0 -466
  252. package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +0 -2642
@@ -1,173 +1,221 @@
1
- import { Overlay } from '@angular/cdk/overlay';
2
- import { TemplatePortal } from '@angular/cdk/portal';
3
- import { FocusTrapFactory } from '@angular/cdk/a11y';
4
- import * as i0 from '@angular/core';
5
- import { inject, ViewContainerRef, DestroyRef, model, input, output, signal, computed, viewChild, effect, Component, Directive } from '@angular/core';
6
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
- import { DOCUMENT } from '@angular/common';
8
- import { filter } from 'rxjs/operators';
9
- import { ButtonComponent } from '@ojiepermana/angular/component/button';
10
- import { cn, injectUniqueId } from '@ojiepermana/angular/component/utils/core';
11
- import * as i1 from '@ojiepermana/angular/component/utils/scale';
12
- import { ComponentScaleDirective } from '@ojiepermana/angular/component/utils/scale';
13
-
14
- /**
15
- * Declarative modal dialog. Renders into the body via CDK overlay when
16
- * `open` becomes `true`. Focus is trapped inside; restored to trigger on close.
17
- *
18
- * @example
19
- * <button Button (click)="open.set(true)">Open</button>
20
- * <Dialog [(open)]="open">
21
- * <DialogHeader>
22
- * <DialogTitle>Are you sure?</DialogTitle>
23
- * <DialogDescription>This action cannot be undone.</DialogDescription>
24
- * </DialogHeader>
25
- * <DialogFooter>
26
- * <button Button variant="outline" (click)="open.set(false)">Cancel</button>
27
- * <button Button variant="destructive" (click)="confirm()">Delete</button>
28
- * </DialogFooter>
29
- * </Dialog>
30
- */
31
- class DialogComponent {
32
- componentScale = inject(ComponentScaleDirective);
33
- radius = this.componentScale.radius;
34
- density = this.componentScale.density;
35
- overlay = inject(Overlay);
36
- vcr = inject(ViewContainerRef);
37
- trapFactory = inject(FocusTrapFactory);
38
- doc = inject(DOCUMENT);
39
- destroyRef = inject(DestroyRef);
40
- open = model(false, /* @ts-ignore */
41
- ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
42
- closeOnEscape = input(true, /* @ts-ignore */
43
- ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
44
- closeOnBackdropClick = input(true, /* @ts-ignore */
45
- ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : /* istanbul ignore next */ []));
46
- /** Appearance of the area outside the surface. Defaults to a dimmed overlay. */
47
- backdrop = input('dim', /* @ts-ignore */
48
- ...(ngDevMode ? [{ debugName: "backdrop" }] : /* istanbul ignore next */ []));
49
- showCloseButton = input(true, /* @ts-ignore */
50
- ...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
51
- closeButtonLabel = input('Close', /* @ts-ignore */
52
- ...(ngDevMode ? [{ debugName: "closeButtonLabel" }] : /* istanbul ignore next */ []));
53
- labelledBy = input(null, { ...(ngDevMode ? { debugName: "labelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
54
- describedBy = input(null, { ...(ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
55
- /** ARIA role for the surface. `'dialog'` by default; `AlertDialog` sets `'alertdialog'`. */
56
- role = input('dialog', /* @ts-ignore */
57
- ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
58
- class = input('', /* @ts-ignore */
59
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
60
- openedChange = output();
61
- registeredTitleId = signal(null, /* @ts-ignore */
62
- ...(ngDevMode ? [{ debugName: "registeredTitleId" }] : /* istanbul ignore next */ []));
63
- registeredDescriptionId = signal(null, /* @ts-ignore */
64
- ...(ngDevMode ? [{ debugName: "registeredDescriptionId" }] : /* istanbul ignore next */ []));
65
- /** Explicit `aria-labelledby` wins; otherwise a projected `DialogTitle` supplies the id. */
66
- resolvedLabelledBy = computed(() => this.labelledBy() ?? this.registeredTitleId(), /* @ts-ignore */
67
- ...(ngDevMode ? [{ debugName: "resolvedLabelledBy" }] : /* istanbul ignore next */ []));
68
- /** Explicit `aria-describedby` wins; otherwise a projected `DialogDescription` supplies the id. */
69
- resolvedDescribedBy = computed(() => this.describedBy() ?? this.registeredDescriptionId(), /* @ts-ignore */
70
- ...(ngDevMode ? [{ debugName: "resolvedDescribedBy" }] : /* istanbul ignore next */ []));
71
- /** Called by a projected `DialogTitle` so default usage has an accessible name (AXE-safe). */
72
- registerTitleId(id) {
73
- this.registeredTitleId.set(id);
74
- }
75
- /** Cleared by a `DialogTitle` on destroy so a closed/reopened dialog never points at a stale id. */
76
- unregisterTitleId(id) {
77
- if (this.registeredTitleId() === id) {
78
- this.registeredTitleId.set(null);
79
- }
80
- }
81
- /** Called by a projected `DialogDescription`. */
82
- registerDescriptionId(id) {
83
- this.registeredDescriptionId.set(id);
84
- }
85
- /** Cleared by a `DialogDescription` on destroy. */
86
- unregisterDescriptionId(id) {
87
- if (this.registeredDescriptionId() === id) {
88
- this.registeredDescriptionId.set(null);
89
- }
90
- }
91
- tpl = viewChild.required('tpl', /* @ts-ignore */
92
- ...(ngDevMode ? [{ debugName: "tpl" }] : /* istanbul ignore next */ []));
93
- overlayRef = null;
94
- focusTrap = null;
95
- previousFocus = null;
96
- surfaceClasses = computed(() => cn('relative grid w-full max-w-lg gap-4 rounded-[var(--radius-base)] border border-border bg-background p-6 shadow-lg duration-200', this.class()), /* @ts-ignore */
97
- ...(ngDevMode ? [{ debugName: "surfaceClasses" }] : /* istanbul ignore next */ []));
98
- /** CDK `backdropClass` list: shared marker plus the selected appearance modifier. */
99
- backdropClass = computed(() => {
100
- const classes = ['dialog-backdrop'];
101
- const kind = this.backdrop();
102
- if (kind === 'blur')
103
- classes.push('dialog-backdrop-blur');
104
- else if (kind === 'transparent')
105
- classes.push('dialog-backdrop-transparent');
106
- return classes;
107
- }, /* @ts-ignore */
108
- ...(ngDevMode ? [{ debugName: "backdropClass" }] : /* istanbul ignore next */ []));
109
- constructor() {
110
- this.destroyRef.onDestroy(() => this.detach(false));
111
- effect(() => {
112
- if (this.open()) {
113
- this.attach();
114
- }
115
- else {
116
- this.detach();
117
- }
118
- });
119
- }
120
- attach() {
121
- if (this.overlayRef)
122
- return;
123
- this.previousFocus = this.doc.activeElement;
124
- this.overlayRef = this.overlay.create({
125
- hasBackdrop: true,
126
- backdropClass: this.backdropClass(),
127
- panelClass: 'dialog-panel',
128
- scrollStrategy: this.overlay.scrollStrategies.block(),
129
- positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),
130
- });
131
- const portal = new TemplatePortal(this.tpl(), this.vcr);
132
- this.overlayRef.attach(portal);
133
- this.focusTrap = this.trapFactory.create(this.overlayRef.hostElement);
134
- this.focusTrap.focusInitialElementWhenReady();
135
- if (this.closeOnBackdropClick()) {
136
- this.overlayRef
137
- .backdropClick()
138
- .pipe(takeUntilDestroyed(this.destroyRef))
139
- .subscribe(() => this.requestClose());
140
- }
141
- this.overlayRef
142
- .keydownEvents()
143
- .pipe(takeUntilDestroyed(this.destroyRef), filter((e) => e.key === 'Escape' && this.closeOnEscape()))
144
- .subscribe((e) => {
145
- e.preventDefault();
146
- this.requestClose();
147
- });
148
- this.openedChange.emit(true);
149
- }
150
- detach(emitOpenedChange = true) {
151
- if (!this.overlayRef)
152
- return;
153
- this.focusTrap?.destroy();
154
- this.focusTrap = null;
155
- this.overlayRef.dispose();
156
- this.overlayRef = null;
157
- this.previousFocus?.focus?.();
158
- this.previousFocus = null;
159
- if (emitOpenedChange) {
160
- this.openedChange.emit(false);
161
- }
162
- }
163
- requestClose() {
164
- this.open.set(false);
165
- }
166
- close() {
167
- this.requestClose();
168
- }
169
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
170
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: DialogComponent, isStandalone: true, selector: "Dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, backdrop: { classPropertyName: "backdrop", publicName: "backdrop", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, describedBy: { classPropertyName: "describedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", openedChange: "openedChange" }, viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.ComponentScaleDirective, inputs: ["radius", "radius", "density", "density"] }], ngImport: i0, template: `
1
+ import { Overlay } from "@angular/cdk/overlay";
2
+ import { TemplatePortal } from "@angular/cdk/portal";
3
+ import { FocusTrapFactory } from "@angular/cdk/a11y";
4
+ import * as i0 from "@angular/core";
5
+ import { Component, DestroyRef, Directive, ViewContainerRef, computed, effect, inject, input, model, output, signal, viewChild } from "@angular/core";
6
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
7
+ import { DOCUMENT } from "@angular/common";
8
+ import { filter } from "rxjs/operators";
9
+ import { ButtonComponent } from "@ojiepermana/angular/component/button";
10
+ import { cn, injectUniqueId } from "@ojiepermana/angular/component/utils/core";
11
+ import * as i1 from "@ojiepermana/angular/component/utils/scale";
12
+ import { ComponentScaleDirective } from "@ojiepermana/angular/component/utils/scale";
13
+ var DialogComponent = class DialogComponent {
14
+ componentScale = inject(ComponentScaleDirective);
15
+ radius = this.componentScale.radius;
16
+ density = this.componentScale.density;
17
+ overlay = inject(Overlay);
18
+ vcr = inject(ViewContainerRef);
19
+ trapFactory = inject(FocusTrapFactory);
20
+ doc = inject(DOCUMENT);
21
+ destroyRef = inject(DestroyRef);
22
+ open = model(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
23
+ closeOnEscape = input(true, ...ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []);
24
+ closeOnBackdropClick = input(true, ...ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : /* istanbul ignore next */ []);
25
+ backdrop = input("dim", ...ngDevMode ? [{ debugName: "backdrop" }] : /* istanbul ignore next */ []);
26
+ showCloseButton = input(true, ...ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []);
27
+ closeButtonLabel = input("Close", ...ngDevMode ? [{ debugName: "closeButtonLabel" }] : /* istanbul ignore next */ []);
28
+ labelledBy = input(null, {
29
+ ...ngDevMode ? { debugName: "labelledBy" } : /* istanbul ignore next */ {},
30
+ alias: "aria-labelledby"
31
+ });
32
+ describedBy = input(null, {
33
+ ...ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {},
34
+ alias: "aria-describedby"
35
+ });
36
+ role = input("dialog", ...ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []);
37
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
38
+ openedChange = output();
39
+ registeredTitleId = signal(null, ...ngDevMode ? [{ debugName: "registeredTitleId" }] : /* istanbul ignore next */ []);
40
+ registeredDescriptionId = signal(null, ...ngDevMode ? [{ debugName: "registeredDescriptionId" }] : /* istanbul ignore next */ []);
41
+ resolvedLabelledBy = computed(() => this.labelledBy() ?? this.registeredTitleId(), ...ngDevMode ? [{ debugName: "resolvedLabelledBy" }] : /* istanbul ignore next */ []);
42
+ resolvedDescribedBy = computed(() => this.describedBy() ?? this.registeredDescriptionId(), ...ngDevMode ? [{ debugName: "resolvedDescribedBy" }] : /* istanbul ignore next */ []);
43
+ registerTitleId(id) {
44
+ this.registeredTitleId.set(id);
45
+ }
46
+ unregisterTitleId(id) {
47
+ if (this.registeredTitleId() === id) this.registeredTitleId.set(null);
48
+ }
49
+ registerDescriptionId(id) {
50
+ this.registeredDescriptionId.set(id);
51
+ }
52
+ unregisterDescriptionId(id) {
53
+ if (this.registeredDescriptionId() === id) this.registeredDescriptionId.set(null);
54
+ }
55
+ tpl = viewChild.required("tpl", ...ngDevMode ? [{ debugName: "tpl" }] : /* istanbul ignore next */ []);
56
+ overlayRef = null;
57
+ focusTrap = null;
58
+ previousFocus = null;
59
+ surfaceClasses = computed(() => cn("relative grid w-full max-w-lg gap-4 rounded-[var(--radius-base)] border border-border bg-background p-6 shadow-lg duration-200", this.class()), ...ngDevMode ? [{ debugName: "surfaceClasses" }] : /* istanbul ignore next */ []);
60
+ backdropClass = computed(() => {
61
+ const classes = ["dialog-backdrop"];
62
+ const kind = this.backdrop();
63
+ if (kind === "blur") classes.push("dialog-backdrop-blur");
64
+ else if (kind === "transparent") classes.push("dialog-backdrop-transparent");
65
+ return classes;
66
+ }, ...ngDevMode ? [{ debugName: "backdropClass" }] : /* istanbul ignore next */ []);
67
+ constructor() {
68
+ this.destroyRef.onDestroy(() => this.detach(false));
69
+ effect(() => {
70
+ if (this.open()) this.attach();
71
+ else this.detach();
72
+ });
73
+ }
74
+ attach() {
75
+ if (this.overlayRef) return;
76
+ this.previousFocus = this.doc.activeElement;
77
+ this.overlayRef = this.overlay.create({
78
+ hasBackdrop: true,
79
+ backdropClass: this.backdropClass(),
80
+ panelClass: "dialog-panel",
81
+ scrollStrategy: this.overlay.scrollStrategies.block(),
82
+ positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically()
83
+ });
84
+ const portal = new TemplatePortal(this.tpl(), this.vcr);
85
+ this.overlayRef.attach(portal);
86
+ this.focusTrap = this.trapFactory.create(this.overlayRef.hostElement);
87
+ this.focusTrap.focusInitialElementWhenReady();
88
+ if (this.closeOnBackdropClick()) this.overlayRef.backdropClick().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.requestClose());
89
+ this.overlayRef.keydownEvents().pipe(takeUntilDestroyed(this.destroyRef), filter((e) => e.key === "Escape" && this.closeOnEscape())).subscribe((e) => {
90
+ e.preventDefault();
91
+ this.requestClose();
92
+ });
93
+ this.openedChange.emit(true);
94
+ }
95
+ detach(emitOpenedChange = true) {
96
+ if (!this.overlayRef) return;
97
+ this.focusTrap?.destroy();
98
+ this.focusTrap = null;
99
+ this.overlayRef.dispose();
100
+ this.overlayRef = null;
101
+ this.previousFocus?.focus?.();
102
+ this.previousFocus = null;
103
+ if (emitOpenedChange) this.openedChange.emit(false);
104
+ }
105
+ requestClose() {
106
+ this.open.set(false);
107
+ }
108
+ close() {
109
+ this.requestClose();
110
+ }
111
+ static ɵfac = i0.ɵɵngDeclareFactory({
112
+ minVersion: "12.0.0",
113
+ version: "22.2.0",
114
+ ngImport: i0,
115
+ type: DialogComponent,
116
+ deps: [],
117
+ target: i0.ɵɵFactoryTarget.Component
118
+ });
119
+ static ɵcmp = i0.ɵɵngDeclareComponent({
120
+ minVersion: "17.0.0",
121
+ version: "22.2.0",
122
+ type: DialogComponent,
123
+ isStandalone: true,
124
+ selector: "Dialog",
125
+ inputs: {
126
+ open: {
127
+ classPropertyName: "open",
128
+ publicName: "open",
129
+ isSignal: true,
130
+ isRequired: false,
131
+ transformFunction: null
132
+ },
133
+ closeOnEscape: {
134
+ classPropertyName: "closeOnEscape",
135
+ publicName: "closeOnEscape",
136
+ isSignal: true,
137
+ isRequired: false,
138
+ transformFunction: null
139
+ },
140
+ closeOnBackdropClick: {
141
+ classPropertyName: "closeOnBackdropClick",
142
+ publicName: "closeOnBackdropClick",
143
+ isSignal: true,
144
+ isRequired: false,
145
+ transformFunction: null
146
+ },
147
+ backdrop: {
148
+ classPropertyName: "backdrop",
149
+ publicName: "backdrop",
150
+ isSignal: true,
151
+ isRequired: false,
152
+ transformFunction: null
153
+ },
154
+ showCloseButton: {
155
+ classPropertyName: "showCloseButton",
156
+ publicName: "showCloseButton",
157
+ isSignal: true,
158
+ isRequired: false,
159
+ transformFunction: null
160
+ },
161
+ closeButtonLabel: {
162
+ classPropertyName: "closeButtonLabel",
163
+ publicName: "closeButtonLabel",
164
+ isSignal: true,
165
+ isRequired: false,
166
+ transformFunction: null
167
+ },
168
+ labelledBy: {
169
+ classPropertyName: "labelledBy",
170
+ publicName: "aria-labelledby",
171
+ isSignal: true,
172
+ isRequired: false,
173
+ transformFunction: null
174
+ },
175
+ describedBy: {
176
+ classPropertyName: "describedBy",
177
+ publicName: "aria-describedby",
178
+ isSignal: true,
179
+ isRequired: false,
180
+ transformFunction: null
181
+ },
182
+ role: {
183
+ classPropertyName: "role",
184
+ publicName: "role",
185
+ isSignal: true,
186
+ isRequired: false,
187
+ transformFunction: null
188
+ },
189
+ class: {
190
+ classPropertyName: "class",
191
+ publicName: "class",
192
+ isSignal: true,
193
+ isRequired: false,
194
+ transformFunction: null
195
+ }
196
+ },
197
+ outputs: {
198
+ open: "openChange",
199
+ openedChange: "openedChange"
200
+ },
201
+ viewQueries: [{
202
+ propertyName: "tpl",
203
+ first: true,
204
+ predicate: ["tpl"],
205
+ descendants: true,
206
+ isSignal: true
207
+ }],
208
+ hostDirectives: [{
209
+ directive: i1.ComponentScaleDirective,
210
+ inputs: [
211
+ "radius",
212
+ "radius",
213
+ "density",
214
+ "density"
215
+ ]
216
+ }],
217
+ ngImport: i0,
218
+ template: `
171
219
  <ng-template #tpl>
172
220
  <div
173
221
  class="dialog-surface"
@@ -212,20 +260,35 @@ class DialogComponent {
212
260
  <ng-content />
213
261
  </div>
214
262
  </ng-template>
215
- `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class"] }] });
216
- }
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogComponent, decorators: [{
218
- type: Component,
219
- args: [{
220
- selector: 'Dialog',
221
- hostDirectives: [
222
- {
223
- directive: ComponentScaleDirective,
224
- inputs: ['radius', 'density'],
225
- },
226
- ],
227
- imports: [ButtonComponent],
228
- template: `
263
+ `,
264
+ isInline: true,
265
+ dependencies: [{
266
+ kind: "component",
267
+ type: ButtonComponent,
268
+ selector: "button[Button], a[Button]",
269
+ inputs: [
270
+ "variant",
271
+ "size",
272
+ "class"
273
+ ]
274
+ }]
275
+ });
276
+ };
277
+ i0.ɵɵngDeclareClassMetadata({
278
+ minVersion: "12.0.0",
279
+ version: "22.2.0",
280
+ ngImport: i0,
281
+ type: DialogComponent,
282
+ decorators: [{
283
+ type: Component,
284
+ args: [{
285
+ selector: "Dialog",
286
+ hostDirectives: [{
287
+ directive: ComponentScaleDirective,
288
+ inputs: ["radius", "density"]
289
+ }],
290
+ imports: [ButtonComponent],
291
+ template: `
229
292
  <ng-template #tpl>
230
293
  <div
231
294
  class="dialog-surface"
@@ -270,135 +333,466 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
270
333
  <ng-content />
271
334
  </div>
272
335
  </ng-template>
273
- `,
274
- }]
275
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], backdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdrop", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], describedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
276
-
277
- class DialogCloseDirective {
278
- dialog = inject(DialogComponent);
279
- closeDialog() {
280
- this.dialog.close();
281
- }
282
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
283
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: DialogCloseDirective, isStandalone: true, selector: "button[DialogClose], a[DialogClose]", host: { listeners: { "click": "closeDialog()" } }, ngImport: i0 });
284
- }
285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogCloseDirective, decorators: [{
286
- type: Directive,
287
- args: [{
288
- selector: 'button[DialogClose], a[DialogClose]',
289
- host: {
290
- '(click)': 'closeDialog()',
291
- },
292
- }]
293
- }] });
294
-
295
- class DialogHeaderComponent {
296
- class = input('', /* @ts-ignore */
297
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
298
- classes = computed(() => cn('flex flex-col gap-1.5 text-center sm:text-left', this.class()), /* @ts-ignore */
299
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
300
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
301
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: DialogHeaderComponent, isStandalone: true, selector: "DialogHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
302
- }
303
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogHeaderComponent, decorators: [{
304
- type: Component,
305
- args: [{
306
- selector: 'DialogHeader',
307
- host: { '[class]': 'classes()' },
308
- template: `<ng-content />`,
309
- }]
310
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
311
- class DialogTitleComponent {
312
- /** Explicit id override; when omitted a document-unique id is generated. */
313
- id = input(null, /* @ts-ignore */
314
- ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
315
- class = input('', /* @ts-ignore */
316
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
317
- autoId = injectUniqueId('dialog-title');
318
- dialog = inject(DialogComponent, { optional: true });
319
- /** The id rendered on the element, used by the parent dialog for aria-labelledby. */
320
- resolvedId = computed(() => this.id() ?? this.autoId, /* @ts-ignore */
321
- ...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
322
- classes = computed(() => cn('text-lg font-semibold leading-none tracking-tight', this.class()), /* @ts-ignore */
323
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
324
- constructor() {
325
- effect(() => this.dialog?.registerTitleId(this.resolvedId()));
326
- inject(DestroyRef).onDestroy(() => this.dialog?.unregisterTitleId(this.resolvedId()));
327
- }
328
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
329
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: DialogTitleComponent, isStandalone: true, selector: "DialogTitle, h2[DialogTitle]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "resolvedId()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
330
- }
331
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogTitleComponent, decorators: [{
332
- type: Component,
333
- args: [{
334
- selector: 'DialogTitle, h2[DialogTitle]',
335
- host: { '[class]': 'classes()', '[attr.id]': 'resolvedId()' },
336
- template: `<ng-content />`,
337
- }]
338
- }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
339
- class DialogDescriptionComponent {
340
- /** Explicit id override; when omitted a document-unique id is generated. */
341
- id = input(null, /* @ts-ignore */
342
- ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
343
- class = input('', /* @ts-ignore */
344
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
345
- autoId = injectUniqueId('dialog-description');
346
- dialog = inject(DialogComponent, { optional: true });
347
- /** The id rendered on the element, used by the parent dialog for aria-describedby. */
348
- resolvedId = computed(() => this.id() ?? this.autoId, /* @ts-ignore */
349
- ...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
350
- classes = computed(() => cn('text-sm text-muted-foreground', this.class()), /* @ts-ignore */
351
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
352
- constructor() {
353
- effect(() => this.dialog?.registerDescriptionId(this.resolvedId()));
354
- inject(DestroyRef).onDestroy(() => this.dialog?.unregisterDescriptionId(this.resolvedId()));
355
- }
356
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
357
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: DialogDescriptionComponent, isStandalone: true, selector: "DialogDescription, p[DialogDescription]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "resolvedId()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
358
- }
359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogDescriptionComponent, decorators: [{
360
- type: Component,
361
- args: [{
362
- selector: 'DialogDescription, p[DialogDescription]',
363
- host: { '[class]': 'classes()', '[attr.id]': 'resolvedId()' },
364
- template: `<ng-content />`,
365
- }]
366
- }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
367
- class DialogContentComponent {
368
- class = input('', /* @ts-ignore */
369
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
370
- classes = computed(() => cn('grid gap-4', this.class()), /* @ts-ignore */
371
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
372
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
373
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: DialogContentComponent, isStandalone: true, selector: "DialogContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
374
- }
375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogContentComponent, decorators: [{
376
- type: Component,
377
- args: [{
378
- selector: 'DialogContent',
379
- host: { '[class]': 'classes()' },
380
- template: `<ng-content />`,
381
- }]
382
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
383
- class DialogFooterComponent {
384
- class = input('', /* @ts-ignore */
385
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
386
- classes = computed(() => cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-2', this.class()), /* @ts-ignore */
387
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
388
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
389
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: DialogFooterComponent, isStandalone: true, selector: "DialogFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
390
- }
391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DialogFooterComponent, decorators: [{
392
- type: Component,
393
- args: [{
394
- selector: 'DialogFooter',
395
- host: { '[class]': 'classes()' },
396
- template: `<ng-content />`,
397
- }]
398
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
399
-
400
- /**
401
- * Generated bundle index. Do not edit.
402
- */
403
-
404
- export { DialogCloseDirective, DialogComponent, DialogContentComponent, DialogDescriptionComponent, DialogFooterComponent, DialogHeaderComponent, DialogTitleComponent };
336
+ `
337
+ }]
338
+ }],
339
+ ctorParameters: () => [],
340
+ propDecorators: {
341
+ open: [{
342
+ type: i0.Input,
343
+ args: [{
344
+ isSignal: true,
345
+ alias: "open",
346
+ required: false
347
+ }]
348
+ }, {
349
+ type: i0.Output,
350
+ args: ["openChange"]
351
+ }],
352
+ closeOnEscape: [{
353
+ type: i0.Input,
354
+ args: [{
355
+ isSignal: true,
356
+ alias: "closeOnEscape",
357
+ required: false
358
+ }]
359
+ }],
360
+ closeOnBackdropClick: [{
361
+ type: i0.Input,
362
+ args: [{
363
+ isSignal: true,
364
+ alias: "closeOnBackdropClick",
365
+ required: false
366
+ }]
367
+ }],
368
+ backdrop: [{
369
+ type: i0.Input,
370
+ args: [{
371
+ isSignal: true,
372
+ alias: "backdrop",
373
+ required: false
374
+ }]
375
+ }],
376
+ showCloseButton: [{
377
+ type: i0.Input,
378
+ args: [{
379
+ isSignal: true,
380
+ alias: "showCloseButton",
381
+ required: false
382
+ }]
383
+ }],
384
+ closeButtonLabel: [{
385
+ type: i0.Input,
386
+ args: [{
387
+ isSignal: true,
388
+ alias: "closeButtonLabel",
389
+ required: false
390
+ }]
391
+ }],
392
+ labelledBy: [{
393
+ type: i0.Input,
394
+ args: [{
395
+ isSignal: true,
396
+ alias: "aria-labelledby",
397
+ required: false
398
+ }]
399
+ }],
400
+ describedBy: [{
401
+ type: i0.Input,
402
+ args: [{
403
+ isSignal: true,
404
+ alias: "aria-describedby",
405
+ required: false
406
+ }]
407
+ }],
408
+ role: [{
409
+ type: i0.Input,
410
+ args: [{
411
+ isSignal: true,
412
+ alias: "role",
413
+ required: false
414
+ }]
415
+ }],
416
+ class: [{
417
+ type: i0.Input,
418
+ args: [{
419
+ isSignal: true,
420
+ alias: "class",
421
+ required: false
422
+ }]
423
+ }],
424
+ openedChange: [{
425
+ type: i0.Output,
426
+ args: ["openedChange"]
427
+ }],
428
+ tpl: [{
429
+ type: i0.ViewChild,
430
+ args: ["tpl", { isSignal: true }]
431
+ }]
432
+ }
433
+ });
434
+ var DialogCloseDirective = class DialogCloseDirective {
435
+ dialog = inject(DialogComponent);
436
+ closeDialog() {
437
+ this.dialog.close();
438
+ }
439
+ static ɵfac = i0.ɵɵngDeclareFactory({
440
+ minVersion: "12.0.0",
441
+ version: "22.2.0",
442
+ ngImport: i0,
443
+ type: DialogCloseDirective,
444
+ deps: [],
445
+ target: i0.ɵɵFactoryTarget.Directive
446
+ });
447
+ static ɵdir = i0.ɵɵngDeclareDirective({
448
+ minVersion: "14.0.0",
449
+ version: "22.2.0",
450
+ type: DialogCloseDirective,
451
+ isStandalone: true,
452
+ selector: "button[DialogClose], a[DialogClose]",
453
+ host: { listeners: { "click": "closeDialog()" } },
454
+ ngImport: i0
455
+ });
456
+ };
457
+ i0.ɵɵngDeclareClassMetadata({
458
+ minVersion: "12.0.0",
459
+ version: "22.2.0",
460
+ ngImport: i0,
461
+ type: DialogCloseDirective,
462
+ decorators: [{
463
+ type: Directive,
464
+ args: [{
465
+ selector: "button[DialogClose], a[DialogClose]",
466
+ host: { "(click)": "closeDialog()" }
467
+ }]
468
+ }]
469
+ });
470
+ var DialogHeaderComponent = class DialogHeaderComponent {
471
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
472
+ classes = computed(() => cn("flex flex-col gap-1.5 text-center sm:text-left", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
473
+ static ɵfac = i0.ɵɵngDeclareFactory({
474
+ minVersion: "12.0.0",
475
+ version: "22.2.0",
476
+ ngImport: i0,
477
+ type: DialogHeaderComponent,
478
+ deps: [],
479
+ target: i0.ɵɵFactoryTarget.Component
480
+ });
481
+ static ɵcmp = i0.ɵɵngDeclareComponent({
482
+ minVersion: "17.1.0",
483
+ version: "22.2.0",
484
+ type: DialogHeaderComponent,
485
+ isStandalone: true,
486
+ selector: "DialogHeader",
487
+ inputs: { class: {
488
+ classPropertyName: "class",
489
+ publicName: "class",
490
+ isSignal: true,
491
+ isRequired: false,
492
+ transformFunction: null
493
+ } },
494
+ host: { properties: { "class": "classes()" } },
495
+ ngImport: i0,
496
+ template: `<ng-content />`,
497
+ isInline: true
498
+ });
499
+ };
500
+ i0.ɵɵngDeclareClassMetadata({
501
+ minVersion: "12.0.0",
502
+ version: "22.2.0",
503
+ ngImport: i0,
504
+ type: DialogHeaderComponent,
505
+ decorators: [{
506
+ type: Component,
507
+ args: [{
508
+ selector: "DialogHeader",
509
+ host: { "[class]": "classes()" },
510
+ template: `<ng-content />`
511
+ }]
512
+ }],
513
+ propDecorators: { class: [{
514
+ type: i0.Input,
515
+ args: [{
516
+ isSignal: true,
517
+ alias: "class",
518
+ required: false
519
+ }]
520
+ }] }
521
+ });
522
+ var DialogTitleComponent = class DialogTitleComponent {
523
+ id = input(null, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
524
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
525
+ autoId = injectUniqueId("dialog-title");
526
+ dialog = inject(DialogComponent, { optional: true });
527
+ resolvedId = computed(() => this.id() ?? this.autoId, ...ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []);
528
+ classes = computed(() => cn("text-lg font-semibold leading-none tracking-tight", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
529
+ constructor() {
530
+ effect(() => this.dialog?.registerTitleId(this.resolvedId()));
531
+ inject(DestroyRef).onDestroy(() => this.dialog?.unregisterTitleId(this.resolvedId()));
532
+ }
533
+ static ɵfac = i0.ɵɵngDeclareFactory({
534
+ minVersion: "12.0.0",
535
+ version: "22.2.0",
536
+ ngImport: i0,
537
+ type: DialogTitleComponent,
538
+ deps: [],
539
+ target: i0.ɵɵFactoryTarget.Component
540
+ });
541
+ static ɵcmp = i0.ɵɵngDeclareComponent({
542
+ minVersion: "17.1.0",
543
+ version: "22.2.0",
544
+ type: DialogTitleComponent,
545
+ isStandalone: true,
546
+ selector: "DialogTitle, h2[DialogTitle]",
547
+ inputs: {
548
+ id: {
549
+ classPropertyName: "id",
550
+ publicName: "id",
551
+ isSignal: true,
552
+ isRequired: false,
553
+ transformFunction: null
554
+ },
555
+ class: {
556
+ classPropertyName: "class",
557
+ publicName: "class",
558
+ isSignal: true,
559
+ isRequired: false,
560
+ transformFunction: null
561
+ }
562
+ },
563
+ host: { properties: {
564
+ "class": "classes()",
565
+ "attr.id": "resolvedId()"
566
+ } },
567
+ ngImport: i0,
568
+ template: `<ng-content />`,
569
+ isInline: true
570
+ });
571
+ };
572
+ i0.ɵɵngDeclareClassMetadata({
573
+ minVersion: "12.0.0",
574
+ version: "22.2.0",
575
+ ngImport: i0,
576
+ type: DialogTitleComponent,
577
+ decorators: [{
578
+ type: Component,
579
+ args: [{
580
+ selector: "DialogTitle, h2[DialogTitle]",
581
+ host: {
582
+ "[class]": "classes()",
583
+ "[attr.id]": "resolvedId()"
584
+ },
585
+ template: `<ng-content />`
586
+ }]
587
+ }],
588
+ ctorParameters: () => [],
589
+ propDecorators: {
590
+ id: [{
591
+ type: i0.Input,
592
+ args: [{
593
+ isSignal: true,
594
+ alias: "id",
595
+ required: false
596
+ }]
597
+ }],
598
+ class: [{
599
+ type: i0.Input,
600
+ args: [{
601
+ isSignal: true,
602
+ alias: "class",
603
+ required: false
604
+ }]
605
+ }]
606
+ }
607
+ });
608
+ var DialogDescriptionComponent = class DialogDescriptionComponent {
609
+ id = input(null, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
610
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
611
+ autoId = injectUniqueId("dialog-description");
612
+ dialog = inject(DialogComponent, { optional: true });
613
+ resolvedId = computed(() => this.id() ?? this.autoId, ...ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []);
614
+ classes = computed(() => cn("text-sm text-muted-foreground", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
615
+ constructor() {
616
+ effect(() => this.dialog?.registerDescriptionId(this.resolvedId()));
617
+ inject(DestroyRef).onDestroy(() => this.dialog?.unregisterDescriptionId(this.resolvedId()));
618
+ }
619
+ static ɵfac = i0.ɵɵngDeclareFactory({
620
+ minVersion: "12.0.0",
621
+ version: "22.2.0",
622
+ ngImport: i0,
623
+ type: DialogDescriptionComponent,
624
+ deps: [],
625
+ target: i0.ɵɵFactoryTarget.Component
626
+ });
627
+ static ɵcmp = i0.ɵɵngDeclareComponent({
628
+ minVersion: "17.1.0",
629
+ version: "22.2.0",
630
+ type: DialogDescriptionComponent,
631
+ isStandalone: true,
632
+ selector: "DialogDescription, p[DialogDescription]",
633
+ inputs: {
634
+ id: {
635
+ classPropertyName: "id",
636
+ publicName: "id",
637
+ isSignal: true,
638
+ isRequired: false,
639
+ transformFunction: null
640
+ },
641
+ class: {
642
+ classPropertyName: "class",
643
+ publicName: "class",
644
+ isSignal: true,
645
+ isRequired: false,
646
+ transformFunction: null
647
+ }
648
+ },
649
+ host: { properties: {
650
+ "class": "classes()",
651
+ "attr.id": "resolvedId()"
652
+ } },
653
+ ngImport: i0,
654
+ template: `<ng-content />`,
655
+ isInline: true
656
+ });
657
+ };
658
+ i0.ɵɵngDeclareClassMetadata({
659
+ minVersion: "12.0.0",
660
+ version: "22.2.0",
661
+ ngImport: i0,
662
+ type: DialogDescriptionComponent,
663
+ decorators: [{
664
+ type: Component,
665
+ args: [{
666
+ selector: "DialogDescription, p[DialogDescription]",
667
+ host: {
668
+ "[class]": "classes()",
669
+ "[attr.id]": "resolvedId()"
670
+ },
671
+ template: `<ng-content />`
672
+ }]
673
+ }],
674
+ ctorParameters: () => [],
675
+ propDecorators: {
676
+ id: [{
677
+ type: i0.Input,
678
+ args: [{
679
+ isSignal: true,
680
+ alias: "id",
681
+ required: false
682
+ }]
683
+ }],
684
+ class: [{
685
+ type: i0.Input,
686
+ args: [{
687
+ isSignal: true,
688
+ alias: "class",
689
+ required: false
690
+ }]
691
+ }]
692
+ }
693
+ });
694
+ var DialogContentComponent = class DialogContentComponent {
695
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
696
+ classes = computed(() => cn("grid gap-4", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
697
+ static ɵfac = i0.ɵɵngDeclareFactory({
698
+ minVersion: "12.0.0",
699
+ version: "22.2.0",
700
+ ngImport: i0,
701
+ type: DialogContentComponent,
702
+ deps: [],
703
+ target: i0.ɵɵFactoryTarget.Component
704
+ });
705
+ static ɵcmp = i0.ɵɵngDeclareComponent({
706
+ minVersion: "17.1.0",
707
+ version: "22.2.0",
708
+ type: DialogContentComponent,
709
+ isStandalone: true,
710
+ selector: "DialogContent",
711
+ inputs: { class: {
712
+ classPropertyName: "class",
713
+ publicName: "class",
714
+ isSignal: true,
715
+ isRequired: false,
716
+ transformFunction: null
717
+ } },
718
+ host: { properties: { "class": "classes()" } },
719
+ ngImport: i0,
720
+ template: `<ng-content />`,
721
+ isInline: true
722
+ });
723
+ };
724
+ i0.ɵɵngDeclareClassMetadata({
725
+ minVersion: "12.0.0",
726
+ version: "22.2.0",
727
+ ngImport: i0,
728
+ type: DialogContentComponent,
729
+ decorators: [{
730
+ type: Component,
731
+ args: [{
732
+ selector: "DialogContent",
733
+ host: { "[class]": "classes()" },
734
+ template: `<ng-content />`
735
+ }]
736
+ }],
737
+ propDecorators: { class: [{
738
+ type: i0.Input,
739
+ args: [{
740
+ isSignal: true,
741
+ alias: "class",
742
+ required: false
743
+ }]
744
+ }] }
745
+ });
746
+ var DialogFooterComponent = class DialogFooterComponent {
747
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
748
+ classes = computed(() => cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-2", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
749
+ static ɵfac = i0.ɵɵngDeclareFactory({
750
+ minVersion: "12.0.0",
751
+ version: "22.2.0",
752
+ ngImport: i0,
753
+ type: DialogFooterComponent,
754
+ deps: [],
755
+ target: i0.ɵɵFactoryTarget.Component
756
+ });
757
+ static ɵcmp = i0.ɵɵngDeclareComponent({
758
+ minVersion: "17.1.0",
759
+ version: "22.2.0",
760
+ type: DialogFooterComponent,
761
+ isStandalone: true,
762
+ selector: "DialogFooter",
763
+ inputs: { class: {
764
+ classPropertyName: "class",
765
+ publicName: "class",
766
+ isSignal: true,
767
+ isRequired: false,
768
+ transformFunction: null
769
+ } },
770
+ host: { properties: { "class": "classes()" } },
771
+ ngImport: i0,
772
+ template: `<ng-content />`,
773
+ isInline: true
774
+ });
775
+ };
776
+ i0.ɵɵngDeclareClassMetadata({
777
+ minVersion: "12.0.0",
778
+ version: "22.2.0",
779
+ ngImport: i0,
780
+ type: DialogFooterComponent,
781
+ decorators: [{
782
+ type: Component,
783
+ args: [{
784
+ selector: "DialogFooter",
785
+ host: { "[class]": "classes()" },
786
+ template: `<ng-content />`
787
+ }]
788
+ }],
789
+ propDecorators: { class: [{
790
+ type: i0.Input,
791
+ args: [{
792
+ isSignal: true,
793
+ alias: "class",
794
+ required: false
795
+ }]
796
+ }] }
797
+ });
798
+ export { DialogCloseDirective, DialogComponent, DialogContentComponent, DialogDescriptionComponent, DialogFooterComponent, DialogHeaderComponent, DialogTitleComponent };