@ojiepermana/angular-component 22.0.27

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 (244) hide show
  1. package/README.md +82 -0
  2. package/accordion/README.md +193 -0
  3. package/alert/README.md +180 -0
  4. package/alert-dialog/README.md +239 -0
  5. package/aspect-ratio/README.md +112 -0
  6. package/avatar/README.md +176 -0
  7. package/badge/README.md +133 -0
  8. package/breadcrumb/README.md +216 -0
  9. package/button/README.md +139 -0
  10. package/button-group/README.md +208 -0
  11. package/calendar/README.md +135 -0
  12. package/card/README.md +220 -0
  13. package/carousel/README.md +276 -0
  14. package/checkbox/README.md +149 -0
  15. package/collapsible/README.md +195 -0
  16. package/combobox/README.md +198 -0
  17. package/command/README.md +275 -0
  18. package/composer/README.md +235 -0
  19. package/context-menu/README.md +267 -0
  20. package/date-picker/README.md +179 -0
  21. package/dialog/README.md +235 -0
  22. package/drawer/README.md +145 -0
  23. package/dropdown-menu/README.md +311 -0
  24. package/editor/README.md +136 -0
  25. package/empty/README.md +183 -0
  26. package/fesm2022/ojiepermana-angular-component-accordion.mjs +186 -0
  27. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -0
  28. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +276 -0
  29. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -0
  30. package/fesm2022/ojiepermana-angular-component-alert.mjs +99 -0
  31. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -0
  32. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +37 -0
  33. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -0
  34. package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -0
  35. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -0
  36. package/fesm2022/ojiepermana-angular-component-badge.mjs +50 -0
  37. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -0
  38. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +200 -0
  39. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -0
  40. package/fesm2022/ojiepermana-angular-component-button-group.mjs +103 -0
  41. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -0
  42. package/fesm2022/ojiepermana-angular-component-button.mjs +68 -0
  43. package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -0
  44. package/fesm2022/ojiepermana-angular-component-calendar.mjs +103 -0
  45. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -0
  46. package/fesm2022/ojiepermana-angular-component-card.mjs +152 -0
  47. package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -0
  48. package/fesm2022/ojiepermana-angular-component-carousel.mjs +334 -0
  49. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -0
  50. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +165 -0
  51. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -0
  52. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +121 -0
  53. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -0
  54. package/fesm2022/ojiepermana-angular-component-combobox.mjs +274 -0
  55. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -0
  56. package/fesm2022/ojiepermana-angular-component-command.mjs +297 -0
  57. package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -0
  58. package/fesm2022/ojiepermana-angular-component-composer.mjs +352 -0
  59. package/fesm2022/ojiepermana-angular-component-composer.mjs.map +1 -0
  60. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +108 -0
  61. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -0
  62. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +186 -0
  63. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -0
  64. package/fesm2022/ojiepermana-angular-component-dialog.mjs +283 -0
  65. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -0
  66. package/fesm2022/ojiepermana-angular-component-drawer.mjs +6 -0
  67. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -0
  68. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +494 -0
  69. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -0
  70. package/fesm2022/ojiepermana-angular-component-editor.mjs +680 -0
  71. package/fesm2022/ojiepermana-angular-component-editor.mjs.map +1 -0
  72. package/fesm2022/ojiepermana-angular-component-empty.mjs +145 -0
  73. package/fesm2022/ojiepermana-angular-component-empty.mjs.map +1 -0
  74. package/fesm2022/ojiepermana-angular-component-form.mjs +364 -0
  75. package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -0
  76. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +275 -0
  77. package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +1 -0
  78. package/fesm2022/ojiepermana-angular-component-icon.mjs +86 -0
  79. package/fesm2022/ojiepermana-angular-component-icon.mjs.map +1 -0
  80. package/fesm2022/ojiepermana-angular-component-input-group.mjs +179 -0
  81. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -0
  82. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +517 -0
  83. package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +1 -0
  84. package/fesm2022/ojiepermana-angular-component-input.mjs +45 -0
  85. package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -0
  86. package/fesm2022/ojiepermana-angular-component-item.mjs +264 -0
  87. package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -0
  88. package/fesm2022/ojiepermana-angular-component-kanban.mjs +314 -0
  89. package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +1 -0
  90. package/fesm2022/ojiepermana-angular-component-kbd.mjs +55 -0
  91. package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +1 -0
  92. package/fesm2022/ojiepermana-angular-component-label.mjs +33 -0
  93. package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -0
  94. package/fesm2022/ojiepermana-angular-component-menubar.mjs +311 -0
  95. package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +1 -0
  96. package/fesm2022/ojiepermana-angular-component-native-select.mjs +67 -0
  97. package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +1 -0
  98. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +408 -0
  99. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +1 -0
  100. package/fesm2022/ojiepermana-angular-component-pagination.mjs +226 -0
  101. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -0
  102. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +810 -0
  103. package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +1 -0
  104. package/fesm2022/ojiepermana-angular-component-popover.mjs +145 -0
  105. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -0
  106. package/fesm2022/ojiepermana-angular-component-progress.mjs +60 -0
  107. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -0
  108. package/fesm2022/ojiepermana-angular-component-radio.mjs +173 -0
  109. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -0
  110. package/fesm2022/ojiepermana-angular-component-resizable.mjs +478 -0
  111. package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +1 -0
  112. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +54 -0
  113. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -0
  114. package/fesm2022/ojiepermana-angular-component-select.mjs +297 -0
  115. package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -0
  116. package/fesm2022/ojiepermana-angular-component-separator.mjs +37 -0
  117. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -0
  118. package/fesm2022/ojiepermana-angular-component-sheet.mjs +297 -0
  119. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -0
  120. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +31 -0
  121. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -0
  122. package/fesm2022/ojiepermana-angular-component-slider.mjs +423 -0
  123. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -0
  124. package/fesm2022/ojiepermana-angular-component-spinner.mjs +60 -0
  125. package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +1 -0
  126. package/fesm2022/ojiepermana-angular-component-switch.mjs +140 -0
  127. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -0
  128. package/fesm2022/ojiepermana-angular-component-table.mjs +155 -0
  129. package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -0
  130. package/fesm2022/ojiepermana-angular-component-tabs.mjs +271 -0
  131. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -0
  132. package/fesm2022/ojiepermana-angular-component-textarea.mjs +39 -0
  133. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -0
  134. package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -0
  135. package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +1 -0
  136. package/fesm2022/ojiepermana-angular-component-toast.mjs +161 -0
  137. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -0
  138. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +289 -0
  139. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +1 -0
  140. package/fesm2022/ojiepermana-angular-component-toggle.mjs +82 -0
  141. package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +1 -0
  142. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +410 -0
  143. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -0
  144. package/fesm2022/ojiepermana-angular-component-utils.mjs +81 -0
  145. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -0
  146. package/fesm2022/ojiepermana-angular-component.mjs +11 -0
  147. package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
  148. package/form/README.md +210 -0
  149. package/hover-card/README.md +142 -0
  150. package/icon/README.md +25 -0
  151. package/input/README.md +159 -0
  152. package/input-group/README.md +237 -0
  153. package/input-otp/README.md +278 -0
  154. package/item/README.md +247 -0
  155. package/kanban/README.md +81 -0
  156. package/kbd/README.md +139 -0
  157. package/label/README.md +135 -0
  158. package/menubar/README.md +269 -0
  159. package/native-select/README.md +176 -0
  160. package/navigation-menu/README.md +160 -0
  161. package/package.json +291 -0
  162. package/pagination/README.md +144 -0
  163. package/pillbox/README.md +67 -0
  164. package/popover/README.md +43 -0
  165. package/progress/README.md +160 -0
  166. package/radio/README.md +209 -0
  167. package/resizable/README.md +168 -0
  168. package/scroll-area/README.md +143 -0
  169. package/select/README.md +174 -0
  170. package/separator/README.md +170 -0
  171. package/sheet/README.md +183 -0
  172. package/skeleton/README.md +158 -0
  173. package/slider/README.md +207 -0
  174. package/spinner/README.md +160 -0
  175. package/switch/README.md +166 -0
  176. package/table/README.md +291 -0
  177. package/tabs/README.md +214 -0
  178. package/textarea/README.md +153 -0
  179. package/timeline/README.md +94 -0
  180. package/toast/README.md +321 -0
  181. package/toggle/README.md +131 -0
  182. package/toggle-group/README.md +206 -0
  183. package/tooltip/README.md +207 -0
  184. package/types/ojiepermana-angular-component-accordion.d.ts +51 -0
  185. package/types/ojiepermana-angular-component-alert-dialog.d.ts +93 -0
  186. package/types/ojiepermana-angular-component-alert.d.ts +37 -0
  187. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -0
  188. package/types/ojiepermana-angular-component-avatar.d.ts +51 -0
  189. package/types/ojiepermana-angular-component-badge.d.ts +19 -0
  190. package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -0
  191. package/types/ojiepermana-angular-component-button-group.d.ts +26 -0
  192. package/types/ojiepermana-angular-component-button.d.ts +22 -0
  193. package/types/ojiepermana-angular-component-calendar.d.ts +39 -0
  194. package/types/ojiepermana-angular-component-card.d.ts +60 -0
  195. package/types/ojiepermana-angular-component-carousel.d.ts +86 -0
  196. package/types/ojiepermana-angular-component-checkbox.d.ts +42 -0
  197. package/types/ojiepermana-angular-component-collapsible.d.ts +42 -0
  198. package/types/ojiepermana-angular-component-combobox.d.ts +53 -0
  199. package/types/ojiepermana-angular-component-command.d.ts +102 -0
  200. package/types/ojiepermana-angular-component-composer.d.ts +90 -0
  201. package/types/ojiepermana-angular-component-context-menu.d.ts +36 -0
  202. package/types/ojiepermana-angular-component-date-picker.d.ts +48 -0
  203. package/types/ojiepermana-angular-component-dialog.d.ts +87 -0
  204. package/types/ojiepermana-angular-component-drawer.d.ts +1 -0
  205. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +140 -0
  206. package/types/ojiepermana-angular-component-editor.d.ts +126 -0
  207. package/types/ojiepermana-angular-component-empty.d.ts +50 -0
  208. package/types/ojiepermana-angular-component-form.d.ts +140 -0
  209. package/types/ojiepermana-angular-component-hover-card.d.ts +75 -0
  210. package/types/ojiepermana-angular-component-icon.d.ts +31 -0
  211. package/types/ojiepermana-angular-component-input-group.d.ts +51 -0
  212. package/types/ojiepermana-angular-component-input-otp.d.ts +142 -0
  213. package/types/ojiepermana-angular-component-input.d.ts +16 -0
  214. package/types/ojiepermana-angular-component-item.d.ts +88 -0
  215. package/types/ojiepermana-angular-component-kanban.d.ts +70 -0
  216. package/types/ojiepermana-angular-component-kbd.d.ts +16 -0
  217. package/types/ojiepermana-angular-component-label.d.ts +11 -0
  218. package/types/ojiepermana-angular-component-menubar.d.ts +69 -0
  219. package/types/ojiepermana-angular-component-native-select.d.ts +26 -0
  220. package/types/ojiepermana-angular-component-navigation-menu.d.ts +98 -0
  221. package/types/ojiepermana-angular-component-pagination.d.ts +33 -0
  222. package/types/ojiepermana-angular-component-pillbox.d.ts +156 -0
  223. package/types/ojiepermana-angular-component-popover.d.ts +50 -0
  224. package/types/ojiepermana-angular-component-progress.d.ts +17 -0
  225. package/types/ojiepermana-angular-component-radio.d.ts +57 -0
  226. package/types/ojiepermana-angular-component-resizable.d.ts +99 -0
  227. package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -0
  228. package/types/ojiepermana-angular-component-select.d.ts +56 -0
  229. package/types/ojiepermana-angular-component-separator.d.ts +14 -0
  230. package/types/ojiepermana-angular-component-sheet.d.ts +78 -0
  231. package/types/ojiepermana-angular-component-skeleton.d.ts +10 -0
  232. package/types/ojiepermana-angular-component-slider.d.ts +74 -0
  233. package/types/ojiepermana-angular-component-spinner.d.ts +13 -0
  234. package/types/ojiepermana-angular-component-switch.d.ts +44 -0
  235. package/types/ojiepermana-angular-component-table.d.ts +52 -0
  236. package/types/ojiepermana-angular-component-tabs.d.ts +92 -0
  237. package/types/ojiepermana-angular-component-textarea.d.ts +12 -0
  238. package/types/ojiepermana-angular-component-timeline.d.ts +63 -0
  239. package/types/ojiepermana-angular-component-toast.d.ts +51 -0
  240. package/types/ojiepermana-angular-component-toggle-group.d.ts +89 -0
  241. package/types/ojiepermana-angular-component-toggle.d.ts +25 -0
  242. package/types/ojiepermana-angular-component-tooltip.d.ts +101 -0
  243. package/types/ojiepermana-angular-component-utils.d.ts +30 -0
  244. package/types/ojiepermana-angular-component.d.ts +2 -0
@@ -0,0 +1,297 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ViewContainerRef, DestroyRef, ElementRef, model, input, output, viewChild, computed, effect, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
3
+ import { Overlay } from '@angular/cdk/overlay';
4
+ import { TemplatePortal } from '@angular/cdk/portal';
5
+ import { FocusTrapFactory } from '@angular/cdk/a11y';
6
+ import { DOCUMENT } from '@angular/common';
7
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
8
+ import { filter } from 'rxjs/operators';
9
+ import { ButtonComponent } from '@ojiepermana/angular-component/button';
10
+ import { cn } from '@ojiepermana/angular-component/utils';
11
+
12
+ const SIDE_BASE = {
13
+ top: 'inset-x-0 top-0 border-b border-border',
14
+ bottom: 'inset-x-0 bottom-0 border-t border-border',
15
+ left: 'inset-y-0 left-0 h-full w-3/4 border-r border-border sm:max-w-sm',
16
+ right: 'inset-y-0 right-0 h-full w-3/4 border-l border-border sm:max-w-sm',
17
+ };
18
+ const DRAWER_SIDE_CLASSES = {
19
+ top: 'max-h-[85vh] rounded-b-lg',
20
+ bottom: 'max-h-[85vh] rounded-t-lg',
21
+ left: 'rounded-r-lg',
22
+ right: 'rounded-l-lg',
23
+ };
24
+ const SIDE_ENTER_FROM = {
25
+ top: 'translateY(-100%)',
26
+ bottom: 'translateY(100%)',
27
+ left: 'translateX(-100%)',
28
+ right: 'translateX(100%)',
29
+ };
30
+ class SheetComponent {
31
+ overlay = inject(Overlay);
32
+ vcr = inject(ViewContainerRef);
33
+ trapFactory = inject(FocusTrapFactory);
34
+ doc = inject(DOCUMENT);
35
+ destroyRef = inject(DestroyRef);
36
+ host = inject((ElementRef));
37
+ open = model(false, /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
39
+ side = input(undefined, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
41
+ /** Paksa perilaku 'sheet' atau 'drawer' tanpa bergantung pada nama tag host. */
42
+ variant = input(null, /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
44
+ closeOnEscape = input(true, /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
46
+ closeOnBackdropClick = input(true, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : /* istanbul ignore next */ []));
48
+ showCloseButton = input(true, /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
50
+ closeButtonLabel = input('Close', /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "closeButtonLabel" }] : /* istanbul ignore next */ []));
52
+ labelledBy = input(null, { ...(ngDevMode ? { debugName: "labelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
53
+ describedBy = input(null, { ...(ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
54
+ class = input('', /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
56
+ openedChange = output();
57
+ tpl = viewChild.required('tpl');
58
+ overlayRef = null;
59
+ focusTrap = null;
60
+ previousFocus = null;
61
+ resolvedSide = computed(() => this.side() ?? (this.isDrawerHost() ? 'bottom' : 'right'), /* @ts-ignore */
62
+ ...(ngDevMode ? [{ debugName: "resolvedSide" }] : /* istanbul ignore next */ []));
63
+ surfaceClasses = computed(() => cn('gap-4 p-6 flex flex-col', SIDE_BASE[this.resolvedSide()], this.isDrawerHost() ? DRAWER_SIDE_CLASSES[this.resolvedSide()] : '', this.class()), /* @ts-ignore */
64
+ ...(ngDevMode ? [{ debugName: "surfaceClasses" }] : /* istanbul ignore next */ []));
65
+ enterFrom = computed(() => SIDE_ENTER_FROM[this.resolvedSide()], /* @ts-ignore */
66
+ ...(ngDevMode ? [{ debugName: "enterFrom" }] : /* istanbul ignore next */ []));
67
+ constructor() {
68
+ this.destroyRef.onDestroy(() => this.detach(false));
69
+ effect(() => {
70
+ this.open() ? this.attach() : this.detach();
71
+ });
72
+ }
73
+ attach() {
74
+ if (this.overlayRef)
75
+ return;
76
+ this.previousFocus = this.doc.activeElement;
77
+ this.overlayRef = this.overlay.create({
78
+ hasBackdrop: true,
79
+ backdropClass: 'dialog-backdrop',
80
+ panelClass: 'sheet-panel',
81
+ scrollStrategy: this.overlay.scrollStrategies.block(),
82
+ positionStrategy: this.overlay.position().global(),
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()) {
89
+ this.overlayRef
90
+ .backdropClick()
91
+ .pipe(takeUntilDestroyed(this.destroyRef))
92
+ .subscribe(() => this.open.set(false));
93
+ }
94
+ this.overlayRef
95
+ .keydownEvents()
96
+ .pipe(takeUntilDestroyed(this.destroyRef), filter((e) => e.key === 'Escape' && this.closeOnEscape()))
97
+ .subscribe((e) => {
98
+ e.preventDefault();
99
+ this.open.set(false);
100
+ });
101
+ this.openedChange.emit(true);
102
+ }
103
+ detach(emitOpenedChange = true) {
104
+ if (!this.overlayRef)
105
+ return;
106
+ this.focusTrap?.destroy();
107
+ this.focusTrap = null;
108
+ this.overlayRef.dispose();
109
+ this.overlayRef = null;
110
+ this.previousFocus?.focus?.();
111
+ this.previousFocus = null;
112
+ if (emitOpenedChange) {
113
+ this.openedChange.emit(false);
114
+ }
115
+ }
116
+ close() {
117
+ this.open.set(false);
118
+ }
119
+ isDrawerHost() {
120
+ const variant = this.variant();
121
+ if (variant) {
122
+ return variant === 'drawer';
123
+ }
124
+ // Fallback: infer dari tag host (selector komponen ini: 'Sheet, Drawer').
125
+ // localName DOM selalu lowercase, meski tag template ditulis '<Drawer>'.
126
+ return this.host.nativeElement.localName === 'drawer';
127
+ }
128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
129
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: SheetComponent, isStandalone: true, selector: "Sheet, Drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", 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 }, 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 }, 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 }], ngImport: i0, template: `
130
+ <ng-template #tpl>
131
+ <div
132
+ class="sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
133
+ role="dialog"
134
+ aria-modal="true"
135
+ [attr.aria-labelledby]="labelledBy()"
136
+ [attr.aria-describedby]="describedBy()"
137
+ [class]="surfaceClasses()"
138
+ [style.--sheet-from]="enterFrom()">
139
+ @if (showCloseButton()) {
140
+ <button
141
+ type="button"
142
+ Button
143
+ variant="ghost"
144
+ size="icon-sm"
145
+ class="sheet-close-button absolute right-4 top-4 h-8 w-8 rounded-md p-0 text-muted-foreground opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring"
146
+ [attr.aria-label]="closeButtonLabel()"
147
+ (click)="close()">
148
+ <span aria-hidden="true">X</span>
149
+ <span class="sr-only">{{ closeButtonLabel() }}</span>
150
+ </button>
151
+ }
152
+ <ng-content />
153
+ </div>
154
+ </ng-template>
155
+ `, isInline: true, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
156
+ }
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetComponent, decorators: [{
158
+ type: Component,
159
+ args: [{ selector: 'Sheet, Drawer', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent], template: `
160
+ <ng-template #tpl>
161
+ <div
162
+ class="sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
163
+ role="dialog"
164
+ aria-modal="true"
165
+ [attr.aria-labelledby]="labelledBy()"
166
+ [attr.aria-describedby]="describedBy()"
167
+ [class]="surfaceClasses()"
168
+ [style.--sheet-from]="enterFrom()">
169
+ @if (showCloseButton()) {
170
+ <button
171
+ type="button"
172
+ Button
173
+ variant="ghost"
174
+ size="icon-sm"
175
+ class="sheet-close-button absolute right-4 top-4 h-8 w-8 rounded-md p-0 text-muted-foreground opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring"
176
+ [attr.aria-label]="closeButtonLabel()"
177
+ (click)="close()">
178
+ <span aria-hidden="true">X</span>
179
+ <span class="sr-only">{{ closeButtonLabel() }}</span>
180
+ </button>
181
+ }
182
+ <ng-content />
183
+ </div>
184
+ </ng-template>
185
+ `, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"] }]
186
+ }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", 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 }] }], 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 }] }] } });
187
+
188
+ class SheetCloseDirective {
189
+ sheet = inject(SheetComponent);
190
+ closeSheet() {
191
+ this.sheet.close();
192
+ }
193
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
194
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: SheetCloseDirective, isStandalone: true, selector: "button[SheetClose], a[SheetClose], button[DrawerClose], a[DrawerClose]", host: { listeners: { "click": "closeSheet()" } }, ngImport: i0 });
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetCloseDirective, decorators: [{
197
+ type: Directive,
198
+ args: [{
199
+ selector: 'button[SheetClose], a[SheetClose], button[DrawerClose], a[DrawerClose]',
200
+ host: {
201
+ '(click)': 'closeSheet()',
202
+ },
203
+ }]
204
+ }] });
205
+
206
+ class SheetHeaderComponent {
207
+ class = input('', /* @ts-ignore */
208
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
209
+ classes = computed(() => cn('flex flex-col gap-2 text-center sm:text-left', this.class()), /* @ts-ignore */
210
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
211
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
212
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: SheetHeaderComponent, isStandalone: true, selector: "SheetHeader, DrawerHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
213
+ }
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetHeaderComponent, decorators: [{
215
+ type: Component,
216
+ args: [{
217
+ selector: 'SheetHeader, DrawerHeader',
218
+ changeDetection: ChangeDetectionStrategy.OnPush,
219
+ host: { '[class]': 'classes()' },
220
+ template: `<ng-content />`,
221
+ }]
222
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
223
+ class SheetTitleComponent {
224
+ class = input('', /* @ts-ignore */
225
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
226
+ classes = computed(() => cn('text-lg font-semibold text-foreground', this.class()), /* @ts-ignore */
227
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
228
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
229
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: SheetTitleComponent, isStandalone: true, selector: "SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
230
+ }
231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetTitleComponent, decorators: [{
232
+ type: Component,
233
+ args: [{
234
+ selector: 'SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]',
235
+ changeDetection: ChangeDetectionStrategy.OnPush,
236
+ host: { '[class]': 'classes()' },
237
+ template: `<ng-content />`,
238
+ }]
239
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
240
+ class SheetDescriptionComponent {
241
+ class = input('', /* @ts-ignore */
242
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
243
+ classes = computed(() => cn('text-sm text-muted-foreground', this.class()), /* @ts-ignore */
244
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
245
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
246
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: SheetDescriptionComponent, isStandalone: true, selector: "SheetDescription, DrawerDescription, p[SheetDescription], p[DrawerDescription]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
247
+ }
248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetDescriptionComponent, decorators: [{
249
+ type: Component,
250
+ args: [{
251
+ selector: 'SheetDescription, DrawerDescription, p[SheetDescription], p[DrawerDescription]',
252
+ changeDetection: ChangeDetectionStrategy.OnPush,
253
+ host: { '[class]': 'classes()' },
254
+ template: `<ng-content />`,
255
+ }]
256
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
257
+ class SheetContentComponent {
258
+ class = input('', /* @ts-ignore */
259
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
260
+ classes = computed(() => cn('flex-1 overflow-auto', this.class()), /* @ts-ignore */
261
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
262
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
263
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: SheetContentComponent, isStandalone: true, selector: "SheetContent, DrawerContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
264
+ }
265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetContentComponent, decorators: [{
266
+ type: Component,
267
+ args: [{
268
+ selector: 'SheetContent, DrawerContent',
269
+ changeDetection: ChangeDetectionStrategy.OnPush,
270
+ host: { '[class]': 'classes()' },
271
+ template: `<ng-content />`,
272
+ }]
273
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
274
+ class SheetFooterComponent {
275
+ class = input('', /* @ts-ignore */
276
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
277
+ classes = computed(() => cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', this.class()), /* @ts-ignore */
278
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
279
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
280
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: SheetFooterComponent, isStandalone: true, selector: "SheetFooter, DrawerFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
281
+ }
282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SheetFooterComponent, decorators: [{
283
+ type: Component,
284
+ args: [{
285
+ selector: 'SheetFooter, DrawerFooter',
286
+ changeDetection: ChangeDetectionStrategy.OnPush,
287
+ host: { '[class]': 'classes()' },
288
+ template: `<ng-content />`,
289
+ }]
290
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
291
+
292
+ /**
293
+ * Generated bundle index. Do not edit.
294
+ */
295
+
296
+ export { SheetCloseDirective, SheetComponent, SheetContentComponent, SheetDescriptionComponent, SheetFooterComponent, SheetHeaderComponent, SheetTitleComponent };
297
+ //# sourceMappingURL=ojiepermana-angular-component-sheet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-sheet.mjs","sources":["../../../library/component/sheet/sheet.component.ts","../../../library/component/sheet/sheet-close.directive.ts","../../../library/component/sheet/sheet-parts.component.ts","../../../library/component/sheet/ojiepermana-angular-component-sheet.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { filter } from 'rxjs/operators';\nimport { ButtonComponent } from '@ojiepermana/angular-component/button';\nimport { cn } from '@ojiepermana/angular-component/utils';\n\nexport type SheetSide = 'top' | 'right' | 'bottom' | 'left';\n\nconst SIDE_BASE: Record<SheetSide, string> = {\n top: 'inset-x-0 top-0 border-b border-border',\n bottom: 'inset-x-0 bottom-0 border-t border-border',\n left: 'inset-y-0 left-0 h-full w-3/4 border-r border-border sm:max-w-sm',\n right: 'inset-y-0 right-0 h-full w-3/4 border-l border-border sm:max-w-sm',\n};\n\nconst DRAWER_SIDE_CLASSES: Record<SheetSide, string> = {\n top: 'max-h-[85vh] rounded-b-lg',\n bottom: 'max-h-[85vh] rounded-t-lg',\n left: 'rounded-r-lg',\n right: 'rounded-l-lg',\n};\n\nconst SIDE_ENTER_FROM: Record<SheetSide, string> = {\n top: 'translateY(-100%)',\n bottom: 'translateY(100%)',\n left: 'translateX(-100%)',\n right: 'translateX(100%)',\n};\n\n@Component({\n selector: 'Sheet, Drawer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ButtonComponent],\n template: `\n <ng-template #tpl>\n <div\n class=\"sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [class]=\"surfaceClasses()\"\n [style.--sheet-from]=\"enterFrom()\">\n @if (showCloseButton()) {\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n size=\"icon-sm\"\n class=\"sheet-close-button absolute right-4 top-4 h-8 w-8 rounded-md p-0 text-muted-foreground opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring\"\n [attr.aria-label]=\"closeButtonLabel()\"\n (click)=\"close()\">\n <span aria-hidden=\"true\">X</span>\n <span class=\"sr-only\">{{ closeButtonLabel() }}</span>\n </button>\n }\n <ng-content />\n </div>\n </ng-template>\n `,\n styles: [\n `\n .sheet-surface {\n animation: sheet-in 300ms cubic-bezier(0.2, 0, 0, 1);\n }\n @keyframes sheet-in {\n from {\n transform: var(--sheet-from);\n }\n to {\n transform: translate(0, 0);\n }\n }\n @media (prefers-reduced-motion: reduce) {\n .sheet-surface {\n animation-duration: 0ms;\n }\n }\n `,\n ],\n})\nexport class SheetComponent {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly trapFactory = inject(FocusTrapFactory);\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n readonly open = model<boolean>(false);\n readonly side = input<SheetSide | undefined>(undefined);\n /** Paksa perilaku 'sheet' atau 'drawer' tanpa bergantung pada nama tag host. */\n readonly variant = input<'sheet' | 'drawer' | null>(null);\n readonly closeOnEscape = input<boolean>(true);\n readonly closeOnBackdropClick = input<boolean>(true);\n readonly showCloseButton = input<boolean>(true);\n readonly closeButtonLabel = input<string>('Close');\n readonly labelledBy = input<string | null>(null, { alias: 'aria-labelledby' });\n readonly describedBy = input<string | null>(null, { alias: 'aria-describedby' });\n readonly class = input<string>('');\n\n readonly openedChange = output<boolean>();\n\n private readonly tpl = viewChild.required<TemplateRef<unknown>>('tpl');\n private overlayRef: OverlayRef | null = null;\n private focusTrap: FocusTrap | null = null;\n private previousFocus: HTMLElement | null = null;\n\n private readonly resolvedSide = computed<SheetSide>(() => this.side() ?? (this.isDrawerHost() ? 'bottom' : 'right'));\n\n protected readonly surfaceClasses = computed(() =>\n cn(\n 'gap-4 p-6 flex flex-col',\n SIDE_BASE[this.resolvedSide()],\n this.isDrawerHost() ? DRAWER_SIDE_CLASSES[this.resolvedSide()] : '',\n this.class(),\n ),\n );\n\n protected readonly enterFrom = computed(() => SIDE_ENTER_FROM[this.resolvedSide()]);\n\n constructor() {\n this.destroyRef.onDestroy(() => this.detach(false));\n\n effect(() => {\n this.open() ? this.attach() : this.detach();\n });\n }\n\n private attach(): void {\n if (this.overlayRef) return;\n this.previousFocus = this.doc.activeElement as HTMLElement | null;\n\n this.overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'dialog-backdrop',\n panelClass: 'sheet-panel',\n scrollStrategy: this.overlay.scrollStrategies.block(),\n positionStrategy: this.overlay.position().global(),\n });\n\n const portal = new TemplatePortal(this.tpl(), this.vcr);\n this.overlayRef.attach(portal);\n\n this.focusTrap = this.trapFactory.create(this.overlayRef.hostElement);\n this.focusTrap.focusInitialElementWhenReady();\n\n if (this.closeOnBackdropClick()) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.open.set(false));\n }\n\n this.overlayRef\n .keydownEvents()\n .pipe(\n takeUntilDestroyed(this.destroyRef),\n filter((e) => e.key === 'Escape' && this.closeOnEscape()),\n )\n .subscribe((e) => {\n e.preventDefault();\n this.open.set(false);\n });\n\n this.openedChange.emit(true);\n }\n\n private detach(emitOpenedChange = true): void {\n if (!this.overlayRef) return;\n this.focusTrap?.destroy();\n this.focusTrap = null;\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.previousFocus?.focus?.();\n this.previousFocus = null;\n if (emitOpenedChange) {\n this.openedChange.emit(false);\n }\n }\n\n close(): void {\n this.open.set(false);\n }\n\n private isDrawerHost(): boolean {\n const variant = this.variant();\n\n if (variant) {\n return variant === 'drawer';\n }\n\n // Fallback: infer dari tag host (selector komponen ini: 'Sheet, Drawer').\n // localName DOM selalu lowercase, meski tag template ditulis '<Drawer>'.\n return this.host.nativeElement.localName === 'drawer';\n }\n}\n","import { Directive, inject } from '@angular/core';\n\nimport { SheetComponent } from './sheet.component';\n\n@Directive({\n selector: 'button[SheetClose], a[SheetClose], button[DrawerClose], a[DrawerClose]',\n host: {\n '(click)': 'closeSheet()',\n },\n})\nexport class SheetCloseDirective {\n private readonly sheet = inject(SheetComponent);\n\n closeSheet(): void {\n this.sheet.close();\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular-component/utils';\n\n@Component({\n selector: 'SheetHeader, DrawerHeader',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetHeaderComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('flex flex-col gap-2 text-center sm:text-left', this.class()));\n}\n\n@Component({\n selector: 'SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetTitleComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('text-lg font-semibold text-foreground', this.class()));\n}\n\n@Component({\n selector: 'SheetDescription, DrawerDescription, p[SheetDescription], p[DrawerDescription]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetDescriptionComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('text-sm text-muted-foreground', this.class()));\n}\n\n@Component({\n selector: 'SheetContent, DrawerContent',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetContentComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('flex-1 overflow-auto', this.class()));\n}\n\n@Component({\n selector: 'SheetFooter, DrawerFooter',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetFooterComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', this.class()),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AA0BA,MAAM,SAAS,GAA8B;AAC3C,IAAA,GAAG,EAAE,wCAAwC;AAC7C,IAAA,MAAM,EAAE,2CAA2C;AACnD,IAAA,IAAI,EAAE,kEAAkE;AACxE,IAAA,KAAK,EAAE,mEAAmE;CAC3E;AAED,MAAM,mBAAmB,GAA8B;AAC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AAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,yQAFrB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEf,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;AAChC,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACpDD;;AAEG;;;;"}
@@ -0,0 +1,31 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { cn } from '@ojiepermana/angular-component/utils';
4
+
5
+ class SkeletonComponent {
6
+ class = input('', /* @ts-ignore */
7
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
8
+ classes = computed(() => cn('block animate-pulse rounded-md bg-muted', this.class()), /* @ts-ignore */
9
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: SkeletonComponent, isStandalone: true, selector: "Skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-hidden": "\"true\"" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SkeletonComponent, decorators: [{
14
+ type: Component,
15
+ args: [{
16
+ selector: 'Skeleton',
17
+ changeDetection: ChangeDetectionStrategy.OnPush,
18
+ host: {
19
+ '[class]': 'classes()',
20
+ '[attr.aria-hidden]': '"true"',
21
+ },
22
+ template: '',
23
+ }]
24
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
25
+
26
+ /**
27
+ * Generated bundle index. Do not edit.
28
+ */
29
+
30
+ export { SkeletonComponent };
31
+ //# sourceMappingURL=ojiepermana-angular-component-skeleton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-skeleton.mjs","sources":["../../../library/component/skeleton/skeleton.component.ts","../../../library/component/skeleton/ojiepermana-angular-component-skeleton.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular-component/utils';\n\n@Component({\n selector: 'Skeleton',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.aria-hidden]': '\"true\"',\n },\n template: '',\n})\nexport class SkeletonComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('block animate-pulse rounded-md bg-muted', this.class()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAYa,iBAAiB,CAAA;IACnB,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;AAEf,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,yCAAyC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;gFAAC;uGAH7F,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,wRAFlB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAED,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,UAAU;oBACpB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,oBAAoB,EAAE,QAAQ;AAC/B,qBAAA;AACD,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACXD;;AAEG;;;;"}