@ojiepermana/angular 22.1.14 → 22.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +1 -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-DYuysKVf.mjs +129 -0
  85. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-COiTaw34.mjs +812 -0
  86. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-COQ-60DS.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-YIz0IsIb.mjs} +392 -207
  87. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-D2vwEwBY.mjs +650 -0
  88. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-B5D7yXfb.mjs +662 -0
  89. package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs +1219 -0
  90. package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-CrK16trj.mjs +327 -0
  91. package/fesm2022/ojiepermana-angular-navigation-service.mjs +544 -724
  92. package/fesm2022/ojiepermana-angular-navigation-types.mjs +139 -56
  93. package/fesm2022/ojiepermana-angular-navigation.mjs +3256 -4
  94. package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
  95. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1125 -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 +1928 -553
  99. package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -496
  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 +69 -18
  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 +166 -125
  228. package/types/ojiepermana-angular-navigation.d.ts +708 -375
  229. package/types/ojiepermana-angular-sdk.d.ts +69 -71
  230. package/types/ojiepermana-angular-theme-component-settings.d.ts +120 -86
  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 +446 -187
  234. package/types/ojiepermana-angular-theme-layout.d.ts +201 -113
  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-Be3IqzG4.mjs +0 -91
  249. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-Bc7DWK3R.mjs +0 -522
  250. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-DA8VPEn7.mjs +0 -404
  251. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-U2TJTzlW.mjs +0 -466
  252. package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-CIUhmytH.mjs +0 -2668
@@ -1,224 +1,515 @@
1
- import { isPlatformBrowser } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { Directive, input, output, signal, inject, PLATFORM_ID, computed, effect, forwardRef, Component, viewChild } from '@angular/core';
4
- import EmblaCarousel from 'embla-carousel';
5
- import { cn } from '@ojiepermana/angular/component/utils/core';
6
-
7
- class CarouselContextBase {
8
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
9
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: CarouselContextBase, isStandalone: true, ngImport: i0 });
10
- }
11
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselContextBase, decorators: [{
12
- type: Directive
13
- }] });
14
- class CarouselComponent extends CarouselContextBase {
15
- orientation = input('horizontal', /* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
17
- opts = input({}, /* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "opts" }] : /* istanbul ignore next */ []));
19
- plugins = input([], /* @ts-ignore */
20
- ...(ngDevMode ? [{ debugName: "plugins" }] : /* istanbul ignore next */ []));
21
- keyboard = input(true, /* @ts-ignore */
22
- ...(ngDevMode ? [{ debugName: "keyboard" }] : /* istanbul ignore next */ []));
23
- label = input('Carousel', /* @ts-ignore */
24
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
25
- class = input('', /* @ts-ignore */
26
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
27
- apiReady = output();
28
- apiChange = output();
29
- selectedIndex = signal(0, /* @ts-ignore */
30
- ...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
31
- slideCount = signal(0, /* @ts-ignore */
32
- ...(ngDevMode ? [{ debugName: "slideCount" }] : /* istanbul ignore next */ []));
33
- canScrollPrev = signal(false, /* @ts-ignore */
34
- ...(ngDevMode ? [{ debugName: "canScrollPrev" }] : /* istanbul ignore next */ []));
35
- canScrollNext = signal(false, /* @ts-ignore */
36
- ...(ngDevMode ? [{ debugName: "canScrollNext" }] : /* istanbul ignore next */ []));
37
- isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
38
- viewport = signal(null, /* @ts-ignore */
39
- ...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
40
- api = null;
41
- classes = computed(() => cn('relative block', this.class()), /* @ts-ignore */
42
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
43
- constructor() {
44
- super();
45
- effect((onCleanup) => {
46
- const viewport = this.viewport();
47
- const orientation = this.orientation();
48
- const opts = this.opts();
49
- const plugins = this.plugins();
50
- if (!this.isBrowser || !viewport) {
51
- this.api = null;
52
- this.resetState();
53
- return;
54
- }
55
- const carousel = EmblaCarousel(viewport, { ...opts, axis: orientation === 'horizontal' ? 'x' : 'y' }, [...plugins]);
56
- const updateState = () => this.updateState(carousel);
57
- this.api = carousel;
58
- this.apiChange.emit(carousel);
59
- this.apiReady.emit(carousel);
60
- updateState();
61
- carousel.on('select', updateState);
62
- carousel.on('reInit', updateState);
63
- carousel.on('resize', updateState);
64
- onCleanup(() => {
65
- carousel.destroy();
66
- if (this.api === carousel) {
67
- this.api = null;
68
- this.apiChange.emit(null);
69
- this.resetState();
70
- }
71
- });
72
- });
73
- }
74
- registerViewport(viewport) {
75
- this.viewport.set(viewport);
76
- }
77
- unregisterViewport(viewport) {
78
- if (this.viewport() === viewport) {
79
- this.viewport.set(null);
80
- }
81
- }
82
- scrollPrev() {
83
- this.api?.scrollPrev();
84
- }
85
- scrollNext() {
86
- this.api?.scrollNext();
87
- }
88
- scrollTo(index) {
89
- this.api?.scrollTo(index);
90
- }
91
- onKeydown(event) {
92
- if (!this.keyboard())
93
- return;
94
- const horizontal = this.orientation() === 'horizontal';
95
- const previousKey = horizontal ? 'ArrowLeft' : 'ArrowUp';
96
- const nextKey = horizontal ? 'ArrowRight' : 'ArrowDown';
97
- if (event.key === previousKey) {
98
- event.preventDefault();
99
- this.scrollPrev();
100
- return;
101
- }
102
- if (event.key === nextKey) {
103
- event.preventDefault();
104
- this.scrollNext();
105
- return;
106
- }
107
- if (event.key === 'Home') {
108
- event.preventDefault();
109
- this.scrollTo(0);
110
- return;
111
- }
112
- if (event.key === 'End') {
113
- event.preventDefault();
114
- this.scrollTo(Math.max(0, this.slideCount() - 1));
115
- }
116
- }
117
- updateState(carousel) {
118
- this.slideCount.set(carousel.scrollSnapList().length);
119
- this.selectedIndex.set(carousel.selectedScrollSnap());
120
- this.canScrollPrev.set(carousel.canScrollPrev());
121
- this.canScrollNext.set(carousel.canScrollNext());
122
- }
123
- resetState() {
124
- this.selectedIndex.set(0);
125
- this.slideCount.set(0);
126
- this.canScrollPrev.set(false);
127
- this.canScrollNext.set(false);
128
- }
129
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
130
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: CarouselComponent, isStandalone: true, selector: "Carousel", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, opts: { classPropertyName: "opts", publicName: "opts", isSignal: true, isRequired: false, transformFunction: null }, plugins: { classPropertyName: "plugins", publicName: "plugins", isSignal: true, isRequired: false, transformFunction: null }, keyboard: { classPropertyName: "keyboard", publicName: "keyboard", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { apiReady: "apiReady", apiChange: "apiChange" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class": "classes()", "attr.role": "\"region\"", "attr.aria-roledescription": "\"carousel\"", "attr.aria-label": "label()", "attr.data-orientation": "orientation()", "attr.tabindex": "keyboard() ? 0 : null" } }, providers: [{ provide: CarouselContextBase, useExisting: forwardRef(() => CarouselComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true });
131
- }
132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselComponent, decorators: [{
133
- type: Component,
134
- args: [{
135
- selector: 'Carousel',
136
- providers: [{ provide: CarouselContextBase, useExisting: forwardRef(() => CarouselComponent) }],
137
- host: {
138
- '[class]': 'classes()',
139
- '[attr.role]': '"region"',
140
- '[attr.aria-roledescription]': '"carousel"',
141
- '[attr.aria-label]': 'label()',
142
- '[attr.data-orientation]': 'orientation()',
143
- '[attr.tabindex]': 'keyboard() ? 0 : null',
144
- '(keydown)': 'onKeydown($event)',
145
- },
146
- template: `<ng-content />`,
147
- }]
148
- }], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], opts: [{ type: i0.Input, args: [{ isSignal: true, alias: "opts", required: false }] }], plugins: [{ type: i0.Input, args: [{ isSignal: true, alias: "plugins", required: false }] }], keyboard: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboard", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], apiReady: [{ type: i0.Output, args: ["apiReady"] }], apiChange: [{ type: i0.Output, args: ["apiChange"] }] } });
149
- class CarouselContentComponent {
150
- ctx = inject(CarouselContextBase);
151
- viewport = viewChild('viewport', /* @ts-ignore */
152
- ...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
153
- class = input('', /* @ts-ignore */
154
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
155
- contentClasses = computed(() => cn('flex', this.ctx.orientation() === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', this.class()), /* @ts-ignore */
156
- ...(ngDevMode ? [{ debugName: "contentClasses" }] : /* istanbul ignore next */ []));
157
- ngAfterViewInit() {
158
- const viewport = this.viewport()?.nativeElement;
159
- if (viewport)
160
- this.ctx.registerViewport(viewport);
161
- }
162
- ngOnDestroy() {
163
- const viewport = this.viewport()?.nativeElement;
164
- if (viewport)
165
- this.ctx.unregisterViewport(viewport);
166
- }
167
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
168
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: CarouselContentComponent, isStandalone: true, selector: "CarouselContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "\"block\"" } }, viewQueries: [{ propertyName: "viewport", first: true, predicate: ["viewport"], descendants: true, isSignal: true }], ngImport: i0, template: `
1
+ import { isPlatformBrowser } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, Directive, PLATFORM_ID, computed, effect, forwardRef, inject, input, output, signal, viewChild } from "@angular/core";
4
+ import EmblaCarousel from "embla-carousel";
5
+ import { cn } from "@ojiepermana/angular/component/utils/core";
6
+ var CarouselContextBase = class CarouselContextBase {
7
+ static ɵfac = i0.ɵɵngDeclareFactory({
8
+ minVersion: "12.0.0",
9
+ version: "22.2.2",
10
+ ngImport: i0,
11
+ type: CarouselContextBase,
12
+ deps: [],
13
+ target: i0.ɵɵFactoryTarget.Directive
14
+ });
15
+ static ɵdir = i0.ɵɵngDeclareDirective({
16
+ minVersion: "14.0.0",
17
+ version: "22.2.2",
18
+ type: CarouselContextBase,
19
+ isStandalone: true,
20
+ ngImport: i0
21
+ });
22
+ };
23
+ i0.ɵɵngDeclareClassMetadata({
24
+ minVersion: "12.0.0",
25
+ version: "22.2.2",
26
+ ngImport: i0,
27
+ type: CarouselContextBase,
28
+ decorators: [{ type: Directive }]
29
+ });
30
+ var CarouselComponent = class CarouselComponent extends CarouselContextBase {
31
+ orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
32
+ opts = input({}, ...ngDevMode ? [{ debugName: "opts" }] : /* istanbul ignore next */ []);
33
+ plugins = input([], ...ngDevMode ? [{ debugName: "plugins" }] : /* istanbul ignore next */ []);
34
+ keyboard = input(true, ...ngDevMode ? [{ debugName: "keyboard" }] : /* istanbul ignore next */ []);
35
+ label = input("Carousel", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
36
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
37
+ apiReady = output();
38
+ apiChange = output();
39
+ selectedIndex = signal(0, ...ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []);
40
+ slideCount = signal(0, ...ngDevMode ? [{ debugName: "slideCount" }] : /* istanbul ignore next */ []);
41
+ canScrollPrev = signal(false, ...ngDevMode ? [{ debugName: "canScrollPrev" }] : /* istanbul ignore next */ []);
42
+ canScrollNext = signal(false, ...ngDevMode ? [{ debugName: "canScrollNext" }] : /* istanbul ignore next */ []);
43
+ isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
44
+ viewport = signal(null, ...ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []);
45
+ api = null;
46
+ classes = computed(() => cn("relative block", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
47
+ constructor() {
48
+ super();
49
+ effect((onCleanup) => {
50
+ const viewport = this.viewport();
51
+ const orientation = this.orientation();
52
+ const opts = this.opts();
53
+ const plugins = this.plugins();
54
+ if (!this.isBrowser || !viewport) {
55
+ this.api = null;
56
+ this.resetState();
57
+ return;
58
+ }
59
+ const carousel = EmblaCarousel(viewport, {
60
+ ...opts,
61
+ axis: orientation === "horizontal" ? "x" : "y"
62
+ }, [...plugins]);
63
+ const updateState = () => this.updateState(carousel);
64
+ this.api = carousel;
65
+ this.apiChange.emit(carousel);
66
+ this.apiReady.emit(carousel);
67
+ updateState();
68
+ carousel.on("select", updateState);
69
+ carousel.on("reInit", updateState);
70
+ carousel.on("resize", updateState);
71
+ onCleanup(() => {
72
+ carousel.destroy();
73
+ if (this.api === carousel) {
74
+ this.api = null;
75
+ this.apiChange.emit(null);
76
+ this.resetState();
77
+ }
78
+ });
79
+ });
80
+ }
81
+ registerViewport(viewport) {
82
+ this.viewport.set(viewport);
83
+ }
84
+ unregisterViewport(viewport) {
85
+ if (this.viewport() === viewport) this.viewport.set(null);
86
+ }
87
+ scrollPrev() {
88
+ this.api?.scrollPrev();
89
+ }
90
+ scrollNext() {
91
+ this.api?.scrollNext();
92
+ }
93
+ scrollTo(index) {
94
+ this.api?.scrollTo(index);
95
+ }
96
+ onKeydown(event) {
97
+ if (!this.keyboard()) return;
98
+ const horizontal = this.orientation() === "horizontal";
99
+ const previousKey = horizontal ? "ArrowLeft" : "ArrowUp";
100
+ const nextKey = horizontal ? "ArrowRight" : "ArrowDown";
101
+ if (event.key === previousKey) {
102
+ event.preventDefault();
103
+ this.scrollPrev();
104
+ return;
105
+ }
106
+ if (event.key === nextKey) {
107
+ event.preventDefault();
108
+ this.scrollNext();
109
+ return;
110
+ }
111
+ if (event.key === "Home") {
112
+ event.preventDefault();
113
+ this.scrollTo(0);
114
+ return;
115
+ }
116
+ if (event.key === "End") {
117
+ event.preventDefault();
118
+ this.scrollTo(Math.max(0, this.slideCount() - 1));
119
+ }
120
+ }
121
+ updateState(carousel) {
122
+ this.slideCount.set(carousel.scrollSnapList().length);
123
+ this.selectedIndex.set(carousel.selectedScrollSnap());
124
+ this.canScrollPrev.set(carousel.canScrollPrev());
125
+ this.canScrollNext.set(carousel.canScrollNext());
126
+ }
127
+ resetState() {
128
+ this.selectedIndex.set(0);
129
+ this.slideCount.set(0);
130
+ this.canScrollPrev.set(false);
131
+ this.canScrollNext.set(false);
132
+ }
133
+ static ɵfac = i0.ɵɵngDeclareFactory({
134
+ minVersion: "12.0.0",
135
+ version: "22.2.2",
136
+ ngImport: i0,
137
+ type: CarouselComponent,
138
+ deps: [],
139
+ target: i0.ɵɵFactoryTarget.Component
140
+ });
141
+ static ɵcmp = i0.ɵɵngDeclareComponent({
142
+ minVersion: "17.1.0",
143
+ version: "22.2.2",
144
+ type: CarouselComponent,
145
+ isStandalone: true,
146
+ selector: "Carousel",
147
+ inputs: {
148
+ orientation: {
149
+ classPropertyName: "orientation",
150
+ publicName: "orientation",
151
+ isSignal: true,
152
+ isRequired: false,
153
+ transformFunction: null
154
+ },
155
+ opts: {
156
+ classPropertyName: "opts",
157
+ publicName: "opts",
158
+ isSignal: true,
159
+ isRequired: false,
160
+ transformFunction: null
161
+ },
162
+ plugins: {
163
+ classPropertyName: "plugins",
164
+ publicName: "plugins",
165
+ isSignal: true,
166
+ isRequired: false,
167
+ transformFunction: null
168
+ },
169
+ keyboard: {
170
+ classPropertyName: "keyboard",
171
+ publicName: "keyboard",
172
+ isSignal: true,
173
+ isRequired: false,
174
+ transformFunction: null
175
+ },
176
+ label: {
177
+ classPropertyName: "label",
178
+ publicName: "label",
179
+ isSignal: true,
180
+ isRequired: false,
181
+ transformFunction: null
182
+ },
183
+ class: {
184
+ classPropertyName: "class",
185
+ publicName: "class",
186
+ isSignal: true,
187
+ isRequired: false,
188
+ transformFunction: null
189
+ }
190
+ },
191
+ outputs: {
192
+ apiReady: "apiReady",
193
+ apiChange: "apiChange"
194
+ },
195
+ host: {
196
+ listeners: { "keydown": "onKeydown($event)" },
197
+ properties: {
198
+ "class": "classes()",
199
+ "attr.role": "\"region\"",
200
+ "attr.aria-roledescription": "\"carousel\"",
201
+ "attr.aria-label": "label()",
202
+ "attr.data-orientation": "orientation()",
203
+ "attr.tabindex": "keyboard() ? 0 : null"
204
+ }
205
+ },
206
+ providers: [{
207
+ provide: CarouselContextBase,
208
+ useExisting: forwardRef(() => CarouselComponent)
209
+ }],
210
+ usesInheritance: true,
211
+ ngImport: i0,
212
+ template: `<ng-content />`,
213
+ isInline: true
214
+ });
215
+ };
216
+ i0.ɵɵngDeclareClassMetadata({
217
+ minVersion: "12.0.0",
218
+ version: "22.2.2",
219
+ ngImport: i0,
220
+ type: CarouselComponent,
221
+ decorators: [{
222
+ type: Component,
223
+ args: [{
224
+ selector: "Carousel",
225
+ providers: [{
226
+ provide: CarouselContextBase,
227
+ useExisting: forwardRef(() => CarouselComponent)
228
+ }],
229
+ host: {
230
+ "[class]": "classes()",
231
+ "[attr.role]": "\"region\"",
232
+ "[attr.aria-roledescription]": "\"carousel\"",
233
+ "[attr.aria-label]": "label()",
234
+ "[attr.data-orientation]": "orientation()",
235
+ "[attr.tabindex]": "keyboard() ? 0 : null",
236
+ "(keydown)": "onKeydown($event)"
237
+ },
238
+ template: `<ng-content />`
239
+ }]
240
+ }],
241
+ ctorParameters: () => [],
242
+ propDecorators: {
243
+ orientation: [{
244
+ type: i0.Input,
245
+ args: [{
246
+ isSignal: true,
247
+ alias: "orientation",
248
+ required: false
249
+ }]
250
+ }],
251
+ opts: [{
252
+ type: i0.Input,
253
+ args: [{
254
+ isSignal: true,
255
+ alias: "opts",
256
+ required: false
257
+ }]
258
+ }],
259
+ plugins: [{
260
+ type: i0.Input,
261
+ args: [{
262
+ isSignal: true,
263
+ alias: "plugins",
264
+ required: false
265
+ }]
266
+ }],
267
+ keyboard: [{
268
+ type: i0.Input,
269
+ args: [{
270
+ isSignal: true,
271
+ alias: "keyboard",
272
+ required: false
273
+ }]
274
+ }],
275
+ label: [{
276
+ type: i0.Input,
277
+ args: [{
278
+ isSignal: true,
279
+ alias: "label",
280
+ required: false
281
+ }]
282
+ }],
283
+ class: [{
284
+ type: i0.Input,
285
+ args: [{
286
+ isSignal: true,
287
+ alias: "class",
288
+ required: false
289
+ }]
290
+ }],
291
+ apiReady: [{
292
+ type: i0.Output,
293
+ args: ["apiReady"]
294
+ }],
295
+ apiChange: [{
296
+ type: i0.Output,
297
+ args: ["apiChange"]
298
+ }]
299
+ }
300
+ });
301
+ var CarouselContentComponent = class CarouselContentComponent {
302
+ ctx = inject(CarouselContextBase);
303
+ viewport = viewChild("viewport", ...ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []);
304
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
305
+ contentClasses = computed(() => cn("flex", this.ctx.orientation() === "horizontal" ? "-ml-4" : "-mt-4 flex-col", this.class()), ...ngDevMode ? [{ debugName: "contentClasses" }] : /* istanbul ignore next */ []);
306
+ ngAfterViewInit() {
307
+ const viewport = this.viewport()?.nativeElement;
308
+ if (viewport) this.ctx.registerViewport(viewport);
309
+ }
310
+ ngOnDestroy() {
311
+ const viewport = this.viewport()?.nativeElement;
312
+ if (viewport) this.ctx.unregisterViewport(viewport);
313
+ }
314
+ static ɵfac = i0.ɵɵngDeclareFactory({
315
+ minVersion: "12.0.0",
316
+ version: "22.2.2",
317
+ ngImport: i0,
318
+ type: CarouselContentComponent,
319
+ deps: [],
320
+ target: i0.ɵɵFactoryTarget.Component
321
+ });
322
+ static ɵcmp = i0.ɵɵngDeclareComponent({
323
+ minVersion: "17.2.0",
324
+ version: "22.2.2",
325
+ type: CarouselContentComponent,
326
+ isStandalone: true,
327
+ selector: "CarouselContent",
328
+ inputs: { class: {
329
+ classPropertyName: "class",
330
+ publicName: "class",
331
+ isSignal: true,
332
+ isRequired: false,
333
+ transformFunction: null
334
+ } },
335
+ host: { properties: { "class": "\"block\"" } },
336
+ viewQueries: [{
337
+ propertyName: "viewport",
338
+ first: true,
339
+ predicate: ["viewport"],
340
+ descendants: true,
341
+ isSignal: true
342
+ }],
343
+ ngImport: i0,
344
+ template: `
169
345
  <div #viewport class="overflow-hidden">
170
346
  <div [class]="contentClasses()"><ng-content /></div>
171
347
  </div>
172
- `, isInline: true });
173
- }
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselContentComponent, decorators: [{
175
- type: Component,
176
- args: [{
177
- selector: 'CarouselContent',
178
- host: {
179
- '[class]': '"block"',
180
- },
181
- template: `
348
+ `,
349
+ isInline: true
350
+ });
351
+ };
352
+ i0.ɵɵngDeclareClassMetadata({
353
+ minVersion: "12.0.0",
354
+ version: "22.2.2",
355
+ ngImport: i0,
356
+ type: CarouselContentComponent,
357
+ decorators: [{
358
+ type: Component,
359
+ args: [{
360
+ selector: "CarouselContent",
361
+ host: { "[class]": "\"block\"" },
362
+ template: `
182
363
  <div #viewport class="overflow-hidden">
183
364
  <div [class]="contentClasses()"><ng-content /></div>
184
365
  </div>
185
- `,
186
- }]
187
- }], propDecorators: { viewport: [{ type: i0.ViewChild, args: ['viewport', { isSignal: true }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
188
- class CarouselItemComponent {
189
- ctx = inject(CarouselContextBase);
190
- ariaLabel = input(null, /* @ts-ignore */
191
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
192
- class = input('', /* @ts-ignore */
193
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
194
- classes = computed(() => cn('min-w-0 shrink-0 grow-0 basis-full', this.ctx.orientation() === 'horizontal' ? 'pl-4' : 'pt-4', this.class()), /* @ts-ignore */
195
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
196
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
197
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: CarouselItemComponent, isStandalone: true, selector: "CarouselItem", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "\"group\"", "attr.aria-roledescription": "\"slide\"", "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
198
- }
199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselItemComponent, decorators: [{
200
- type: Component,
201
- args: [{
202
- selector: 'CarouselItem',
203
- host: {
204
- '[class]': 'classes()',
205
- '[attr.role]': '"group"',
206
- '[attr.aria-roledescription]': '"slide"',
207
- '[attr.aria-label]': 'ariaLabel()',
208
- },
209
- template: `<ng-content />`,
210
- }]
211
- }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
212
- class CarouselPreviousComponent {
213
- ctx = inject(CarouselContextBase);
214
- label = input('Previous slide', /* @ts-ignore */
215
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
216
- class = input('', /* @ts-ignore */
217
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
218
- classes = computed(() => cn(carouselButtonClasses, carouselPreviousPlacement(this.ctx.orientation()), this.class()), /* @ts-ignore */
219
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
220
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselPreviousComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
221
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: CarouselPreviousComponent, isStandalone: true, selector: "button[CarouselPrevious]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "ctx.scrollPrev()" }, properties: { "class": "classes()", "attr.aria-label": "label()", "disabled": "!ctx.canScrollPrev() || null" } }, ngImport: i0, template: `
366
+ `
367
+ }]
368
+ }],
369
+ propDecorators: {
370
+ viewport: [{
371
+ type: i0.ViewChild,
372
+ args: ["viewport", { isSignal: true }]
373
+ }],
374
+ class: [{
375
+ type: i0.Input,
376
+ args: [{
377
+ isSignal: true,
378
+ alias: "class",
379
+ required: false
380
+ }]
381
+ }]
382
+ }
383
+ });
384
+ var CarouselItemComponent = class CarouselItemComponent {
385
+ ctx = inject(CarouselContextBase);
386
+ ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
387
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
388
+ classes = computed(() => cn("min-w-0 shrink-0 grow-0 basis-full", this.ctx.orientation() === "horizontal" ? "pl-4" : "pt-4", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
389
+ static ɵfac = i0.ɵɵngDeclareFactory({
390
+ minVersion: "12.0.0",
391
+ version: "22.2.2",
392
+ ngImport: i0,
393
+ type: CarouselItemComponent,
394
+ deps: [],
395
+ target: i0.ɵɵFactoryTarget.Component
396
+ });
397
+ static ɵcmp = i0.ɵɵngDeclareComponent({
398
+ minVersion: "17.1.0",
399
+ version: "22.2.2",
400
+ type: CarouselItemComponent,
401
+ isStandalone: true,
402
+ selector: "CarouselItem",
403
+ inputs: {
404
+ ariaLabel: {
405
+ classPropertyName: "ariaLabel",
406
+ publicName: "ariaLabel",
407
+ isSignal: true,
408
+ isRequired: false,
409
+ transformFunction: null
410
+ },
411
+ class: {
412
+ classPropertyName: "class",
413
+ publicName: "class",
414
+ isSignal: true,
415
+ isRequired: false,
416
+ transformFunction: null
417
+ }
418
+ },
419
+ host: { properties: {
420
+ "class": "classes()",
421
+ "attr.role": "\"group\"",
422
+ "attr.aria-roledescription": "\"slide\"",
423
+ "attr.aria-label": "ariaLabel()"
424
+ } },
425
+ ngImport: i0,
426
+ template: `<ng-content />`,
427
+ isInline: true
428
+ });
429
+ };
430
+ i0.ɵɵngDeclareClassMetadata({
431
+ minVersion: "12.0.0",
432
+ version: "22.2.2",
433
+ ngImport: i0,
434
+ type: CarouselItemComponent,
435
+ decorators: [{
436
+ type: Component,
437
+ args: [{
438
+ selector: "CarouselItem",
439
+ host: {
440
+ "[class]": "classes()",
441
+ "[attr.role]": "\"group\"",
442
+ "[attr.aria-roledescription]": "\"slide\"",
443
+ "[attr.aria-label]": "ariaLabel()"
444
+ },
445
+ template: `<ng-content />`
446
+ }]
447
+ }],
448
+ propDecorators: {
449
+ ariaLabel: [{
450
+ type: i0.Input,
451
+ args: [{
452
+ isSignal: true,
453
+ alias: "ariaLabel",
454
+ required: false
455
+ }]
456
+ }],
457
+ class: [{
458
+ type: i0.Input,
459
+ args: [{
460
+ isSignal: true,
461
+ alias: "class",
462
+ required: false
463
+ }]
464
+ }]
465
+ }
466
+ });
467
+ var CarouselPreviousComponent = class CarouselPreviousComponent {
468
+ ctx = inject(CarouselContextBase);
469
+ label = input("Previous slide", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
470
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
471
+ classes = computed(() => cn(carouselButtonClasses, carouselPreviousPlacement(this.ctx.orientation()), this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
472
+ static ɵfac = i0.ɵɵngDeclareFactory({
473
+ minVersion: "12.0.0",
474
+ version: "22.2.2",
475
+ ngImport: i0,
476
+ type: CarouselPreviousComponent,
477
+ deps: [],
478
+ target: i0.ɵɵFactoryTarget.Component
479
+ });
480
+ static ɵcmp = i0.ɵɵngDeclareComponent({
481
+ minVersion: "17.1.0",
482
+ version: "22.2.2",
483
+ type: CarouselPreviousComponent,
484
+ isStandalone: true,
485
+ selector: "button[CarouselPrevious]",
486
+ inputs: {
487
+ label: {
488
+ classPropertyName: "label",
489
+ publicName: "label",
490
+ isSignal: true,
491
+ isRequired: false,
492
+ transformFunction: null
493
+ },
494
+ class: {
495
+ classPropertyName: "class",
496
+ publicName: "class",
497
+ isSignal: true,
498
+ isRequired: false,
499
+ transformFunction: null
500
+ }
501
+ },
502
+ host: {
503
+ attributes: { "type": "button" },
504
+ listeners: { "click": "ctx.scrollPrev()" },
505
+ properties: {
506
+ "class": "classes()",
507
+ "attr.aria-label": "label()",
508
+ "disabled": "!ctx.canScrollPrev() || null"
509
+ }
510
+ },
511
+ ngImport: i0,
512
+ template: `
222
513
  <svg
223
514
  aria-hidden="true"
224
515
  class="h-4 w-4"
@@ -231,20 +522,27 @@ class CarouselPreviousComponent {
231
522
  >
232
523
  <path d="m15 18-6-6 6-6" />
233
524
  </svg>
234
- `, isInline: true });
235
- }
236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselPreviousComponent, decorators: [{
237
- type: Component,
238
- args: [{
239
- selector: 'button[CarouselPrevious]',
240
- host: {
241
- '[class]': 'classes()',
242
- type: 'button',
243
- '[attr.aria-label]': 'label()',
244
- '[disabled]': '!ctx.canScrollPrev() || null',
245
- '(click)': 'ctx.scrollPrev()',
246
- },
247
- template: `
525
+ `,
526
+ isInline: true
527
+ });
528
+ };
529
+ i0.ɵɵngDeclareClassMetadata({
530
+ minVersion: "12.0.0",
531
+ version: "22.2.2",
532
+ ngImport: i0,
533
+ type: CarouselPreviousComponent,
534
+ decorators: [{
535
+ type: Component,
536
+ args: [{
537
+ selector: "button[CarouselPrevious]",
538
+ host: {
539
+ "[class]": "classes()",
540
+ type: "button",
541
+ "[attr.aria-label]": "label()",
542
+ "[disabled]": "!ctx.canScrollPrev() || null",
543
+ "(click)": "ctx.scrollPrev()"
544
+ },
545
+ template: `
248
546
  <svg
249
547
  aria-hidden="true"
250
548
  class="h-4 w-4"
@@ -257,19 +555,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
257
555
  >
258
556
  <path d="m15 18-6-6 6-6" />
259
557
  </svg>
260
- `,
261
- }]
262
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
263
- class CarouselNextComponent {
264
- ctx = inject(CarouselContextBase);
265
- label = input('Next slide', /* @ts-ignore */
266
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
267
- class = input('', /* @ts-ignore */
268
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
269
- classes = computed(() => cn(carouselButtonClasses, carouselNextPlacement(this.ctx.orientation()), this.class()), /* @ts-ignore */
270
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
271
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselNextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
272
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: CarouselNextComponent, isStandalone: true, selector: "button[CarouselNext]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "ctx.scrollNext()" }, properties: { "class": "classes()", "attr.aria-label": "label()", "disabled": "!ctx.canScrollNext() || null" } }, ngImport: i0, template: `
558
+ `
559
+ }]
560
+ }],
561
+ propDecorators: {
562
+ label: [{
563
+ type: i0.Input,
564
+ args: [{
565
+ isSignal: true,
566
+ alias: "label",
567
+ required: false
568
+ }]
569
+ }],
570
+ class: [{
571
+ type: i0.Input,
572
+ args: [{
573
+ isSignal: true,
574
+ alias: "class",
575
+ required: false
576
+ }]
577
+ }]
578
+ }
579
+ });
580
+ var CarouselNextComponent = class CarouselNextComponent {
581
+ ctx = inject(CarouselContextBase);
582
+ label = input("Next slide", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
583
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
584
+ classes = computed(() => cn(carouselButtonClasses, carouselNextPlacement(this.ctx.orientation()), this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
585
+ static ɵfac = i0.ɵɵngDeclareFactory({
586
+ minVersion: "12.0.0",
587
+ version: "22.2.2",
588
+ ngImport: i0,
589
+ type: CarouselNextComponent,
590
+ deps: [],
591
+ target: i0.ɵɵFactoryTarget.Component
592
+ });
593
+ static ɵcmp = i0.ɵɵngDeclareComponent({
594
+ minVersion: "17.1.0",
595
+ version: "22.2.2",
596
+ type: CarouselNextComponent,
597
+ isStandalone: true,
598
+ selector: "button[CarouselNext]",
599
+ inputs: {
600
+ label: {
601
+ classPropertyName: "label",
602
+ publicName: "label",
603
+ isSignal: true,
604
+ isRequired: false,
605
+ transformFunction: null
606
+ },
607
+ class: {
608
+ classPropertyName: "class",
609
+ publicName: "class",
610
+ isSignal: true,
611
+ isRequired: false,
612
+ transformFunction: null
613
+ }
614
+ },
615
+ host: {
616
+ attributes: { "type": "button" },
617
+ listeners: { "click": "ctx.scrollNext()" },
618
+ properties: {
619
+ "class": "classes()",
620
+ "attr.aria-label": "label()",
621
+ "disabled": "!ctx.canScrollNext() || null"
622
+ }
623
+ },
624
+ ngImport: i0,
625
+ template: `
273
626
  <svg
274
627
  aria-hidden="true"
275
628
  class="h-4 w-4"
@@ -282,20 +635,27 @@ class CarouselNextComponent {
282
635
  >
283
636
  <path d="m9 18 6-6-6-6" />
284
637
  </svg>
285
- `, isInline: true });
286
- }
287
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselNextComponent, decorators: [{
288
- type: Component,
289
- args: [{
290
- selector: 'button[CarouselNext]',
291
- host: {
292
- '[class]': 'classes()',
293
- type: 'button',
294
- '[attr.aria-label]': 'label()',
295
- '[disabled]': '!ctx.canScrollNext() || null',
296
- '(click)': 'ctx.scrollNext()',
297
- },
298
- template: `
638
+ `,
639
+ isInline: true
640
+ });
641
+ };
642
+ i0.ɵɵngDeclareClassMetadata({
643
+ minVersion: "12.0.0",
644
+ version: "22.2.2",
645
+ ngImport: i0,
646
+ type: CarouselNextComponent,
647
+ decorators: [{
648
+ type: Component,
649
+ args: [{
650
+ selector: "button[CarouselNext]",
651
+ host: {
652
+ "[class]": "classes()",
653
+ type: "button",
654
+ "[attr.aria-label]": "label()",
655
+ "[disabled]": "!ctx.canScrollNext() || null",
656
+ "(click)": "ctx.scrollNext()"
657
+ },
658
+ template: `
299
659
  <svg
300
660
  aria-hidden="true"
301
661
  class="h-4 w-4"
@@ -308,23 +668,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
308
668
  >
309
669
  <path d="m9 18 6-6-6-6" />
310
670
  </svg>
311
- `,
312
- }]
313
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
314
- const carouselButtonClasses = 'absolute inline-flex h-8 w-8 items-center justify-center rounded-full border border-border bg-background p-0 text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50';
671
+ `
672
+ }]
673
+ }],
674
+ propDecorators: {
675
+ label: [{
676
+ type: i0.Input,
677
+ args: [{
678
+ isSignal: true,
679
+ alias: "label",
680
+ required: false
681
+ }]
682
+ }],
683
+ class: [{
684
+ type: i0.Input,
685
+ args: [{
686
+ isSignal: true,
687
+ alias: "class",
688
+ required: false
689
+ }]
690
+ }]
691
+ }
692
+ });
693
+ const carouselButtonClasses = "absolute inline-flex h-8 w-8 items-center justify-center rounded-full border border-border bg-background p-0 text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
315
694
  function carouselPreviousPlacement(orientation) {
316
- return orientation === 'horizontal'
317
- ? '-left-12 top-1/2 -translate-y-1/2'
318
- : '-top-12 left-1/2 -translate-x-1/2 rotate-90';
695
+ return orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90";
319
696
  }
320
697
  function carouselNextPlacement(orientation) {
321
- return orientation === 'horizontal'
322
- ? '-right-12 top-1/2 -translate-y-1/2'
323
- : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90';
698
+ return orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90";
324
699
  }
325
-
326
- /**
327
- * Generated bundle index. Do not edit.
328
- */
329
-
330
- export { CarouselComponent, CarouselContentComponent, CarouselContextBase, CarouselItemComponent, CarouselNextComponent, CarouselPreviousComponent };
700
+ export { CarouselComponent, CarouselContentComponent, CarouselContextBase, CarouselItemComponent, CarouselNextComponent, CarouselPreviousComponent };