@egose/shadcn-theme-ng 0.0.28 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/README.md +130 -13
  2. package/accordion/README.md +376 -34
  3. package/accordion/fesm2022/accordion.mjs +27 -39
  4. package/alert/README.md +343 -34
  5. package/alert/fesm2022/alert.mjs +47 -47
  6. package/alert-dialog/README.md +471 -5
  7. package/alert-dialog/fesm2022/alert-dialog.mjs +47 -47
  8. package/aspect-ratio/README.md +272 -5
  9. package/aspect-ratio/fesm2022/aspect-ratio.mjs +9 -9
  10. package/autocomplete/README.md +473 -34
  11. package/autocomplete/fesm2022/autocomplete.mjs +53 -71
  12. package/avatar/README.md +357 -5
  13. package/avatar/fesm2022/avatar.mjs +32 -32
  14. package/badge/README.md +289 -34
  15. package/badge/fesm2022/badge.mjs +57 -57
  16. package/basic-alert/README.md +324 -34
  17. package/basic-alert/fesm2022/basic-alert.mjs +6 -18
  18. package/breadcrumb/README.md +406 -5
  19. package/breadcrumb/fesm2022/breadcrumb.mjs +33 -39
  20. package/button/README.md +453 -34
  21. package/button/fesm2022/button.mjs +147 -219
  22. package/button/types/button.d.ts +7 -10
  23. package/button-group/README.md +318 -5
  24. package/button-group/fesm2022/button-group.mjs +20 -20
  25. package/calendar/README.md +328 -34
  26. package/calendar/fesm2022/calendar.mjs +29 -743
  27. package/card/README.md +331 -5
  28. package/card/fesm2022/card.mjs +33 -33
  29. package/carousel/README.md +333 -5
  30. package/carousel/fesm2022/carousel.mjs +39 -78
  31. package/checkbox/README.md +291 -34
  32. package/checkbox/fesm2022/checkbox.mjs +20 -58
  33. package/checkbox/types/checkbox.d.ts +5 -4
  34. package/collapsible/README.md +332 -5
  35. package/collapsible/fesm2022/collapsible.mjs +15 -15
  36. package/combobox/README.md +507 -5
  37. package/combobox/fesm2022/combobox.mjs +91 -224
  38. package/command/README.md +435 -5
  39. package/command/fesm2022/command.mjs +49 -109
  40. package/confirmation-dialog/README.md +272 -34
  41. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +15 -40
  42. package/confirmation-dialog/types/confirmation-dialog.d.ts +8 -4
  43. package/context-menu/README.md +366 -5
  44. package/context-menu/fesm2022/context-menu.mjs +9 -9
  45. package/date-picker/README.md +436 -34
  46. package/date-picker/fesm2022/date-picker.mjs +64 -267
  47. package/date-picker/types/date-picker.d.ts +7 -3
  48. package/dialog/README.md +419 -34
  49. package/dialog/fesm2022/dialog.mjs +45 -71
  50. package/drawer/README.md +395 -5
  51. package/drawer/fesm2022/drawer.mjs +44 -54
  52. package/dropdown-menu/README.md +417 -5
  53. package/dropdown-menu/fesm2022/dropdown-menu.mjs +82 -70
  54. package/dropdown-menu/types/dropdown-menu.d.ts +4 -0
  55. package/empty/README.md +329 -5
  56. package/empty/fesm2022/empty.mjs +30 -30
  57. package/field/README.md +385 -5
  58. package/field/fesm2022/field.mjs +56 -72
  59. package/form-checkbox/README.md +283 -34
  60. package/form-checkbox/fesm2022/form-checkbox.mjs +25 -85
  61. package/form-checkbox/types/form-checkbox.d.ts +7 -1
  62. package/form-date-picker/README.md +293 -34
  63. package/form-date-picker/fesm2022/form-date-picker.mjs +31 -84
  64. package/form-date-picker/types/form-date-picker.d.ts +7 -1
  65. package/form-field/README.md +327 -34
  66. package/form-field/fesm2022/form-field.mjs +33 -19
  67. package/form-field/types/form-field.d.ts +28 -20
  68. package/form-field-simple/README.md +311 -34
  69. package/form-field-simple/fesm2022/form-field-simple.mjs +4 -4
  70. package/form-searchable-multiselect/README.md +332 -34
  71. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +31 -91
  72. package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +7 -1
  73. package/form-select/README.md +321 -34
  74. package/form-select/fesm2022/form-select.mjs +32 -149
  75. package/form-select/types/form-select.d.ts +7 -1
  76. package/form-text-input/README.md +342 -34
  77. package/form-text-input/fesm2022/form-text-input.mjs +35 -149
  78. package/form-text-input/types/form-text-input.d.ts +9 -12
  79. package/form-textarea/README.md +318 -34
  80. package/form-textarea/fesm2022/form-textarea.mjs +34 -109
  81. package/form-textarea/types/form-textarea.d.ts +8 -1
  82. package/hover-card/README.md +256 -5
  83. package/hover-card/fesm2022/hover-card.mjs +19 -19
  84. package/icon/README.md +210 -34
  85. package/icon/fesm2022/icon.mjs +8 -8
  86. package/input/README.md +240 -34
  87. package/input/fesm2022/input.mjs +17 -12
  88. package/input/types/input.d.ts +2 -1
  89. package/input-group/README.md +335 -5
  90. package/input-group/fesm2022/input-group.mjs +34 -34
  91. package/input-otp/README.md +375 -5
  92. package/input-otp/fesm2022/input-otp.mjs +26 -26
  93. package/item/README.md +385 -5
  94. package/item/fesm2022/item.mjs +53 -53
  95. package/kbd/README.md +291 -5
  96. package/kbd/fesm2022/kbd.mjs +12 -12
  97. package/label/README.md +243 -34
  98. package/label/fesm2022/label.mjs +10 -10
  99. package/label/types/label.d.ts +1 -1
  100. package/layout-simple/README.md +174 -44
  101. package/layout-simple/fesm2022/layout-simple.mjs +508 -603
  102. package/layout-simple/types/layout-simple.d.ts +179 -128
  103. package/menu/README.md +418 -0
  104. package/menu/fesm2022/menu.mjs +455 -0
  105. package/menu/package.json +24 -0
  106. package/menu/types/menu.d.ts +137 -0
  107. package/menubar/README.md +343 -5
  108. package/menubar/fesm2022/menubar.mjs +13 -13
  109. package/native-select/README.md +323 -5
  110. package/native-select/fesm2022/native-select.mjs +19 -19
  111. package/navigation-menu/README.md +369 -5
  112. package/navigation-menu/fesm2022/navigation-menu.mjs +35 -47
  113. package/package.json +183 -154
  114. package/pagination/README.md +388 -5
  115. package/pagination/fesm2022/pagination.mjs +45 -331
  116. package/popover/README.md +302 -34
  117. package/popover/fesm2022/popover.mjs +30 -30
  118. package/progress/README.md +311 -5
  119. package/progress/fesm2022/progress.mjs +13 -13
  120. package/radio-group/README.md +335 -34
  121. package/radio-group/fesm2022/radio-group.mjs +26 -19
  122. package/radio-group/types/radio-group.d.ts +1 -1
  123. package/resizable/README.md +269 -5
  124. package/resizable/fesm2022/resizable.mjs +18 -26
  125. package/scroll-area/README.md +233 -5
  126. package/scroll-area/fesm2022/scroll-area.mjs +9 -9
  127. package/searchable-multiselect/README.md +294 -34
  128. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +28 -117
  129. package/searchable-multiselect/types/searchable-multiselect.d.ts +8 -2
  130. package/select/README.md +408 -34
  131. package/select/fesm2022/select.mjs +71 -111
  132. package/select/types/select.d.ts +3 -1
  133. package/separator/README.md +193 -34
  134. package/separator/fesm2022/separator.mjs +9 -9
  135. package/separator/types/separator.d.ts +1 -1
  136. package/sheet/README.md +282 -34
  137. package/sheet/fesm2022/sheet.mjs +41 -53
  138. package/sidebar/README.md +457 -5
  139. package/sidebar/fesm2022/sidebar.mjs +125 -227
  140. package/skeleton/README.md +217 -5
  141. package/skeleton/fesm2022/skeleton.mjs +9 -9
  142. package/slider/README.md +273 -5
  143. package/slider/fesm2022/slider.mjs +10 -80
  144. package/sonner/README.md +317 -34
  145. package/sonner/fesm2022/sonner.mjs +13 -13
  146. package/spinner/README.md +255 -34
  147. package/spinner/fesm2022/spinner.mjs +11 -11
  148. package/switch/README.md +281 -34
  149. package/switch/fesm2022/switch.mjs +13 -15
  150. package/table/README.md +423 -5
  151. package/table/fesm2022/table.mjs +41 -41
  152. package/tabs/README.md +382 -34
  153. package/tabs/fesm2022/tabs.mjs +35 -111
  154. package/textarea/README.md +282 -5
  155. package/textarea/fesm2022/textarea.mjs +9 -9
  156. package/toggle/README.md +270 -5
  157. package/toggle/fesm2022/toggle.mjs +13 -13
  158. package/toggle-group/README.md +340 -5
  159. package/toggle-group/fesm2022/toggle-group.mjs +13 -13
  160. package/toggle-group/types/toggle-group.d.ts +13 -7
  161. package/tooltip/README.md +240 -34
  162. package/tooltip/fesm2022/tooltip.mjs +14 -14
  163. package/typography/README.md +271 -5
  164. package/typography/fesm2022/typography.mjs +53 -53
  165. package/typography/types/typography.d.ts +19 -19
  166. package/utils/README.md +274 -34
  167. package/utils/fesm2022/utils.mjs +68 -44
  168. package/accordion/fesm2022/accordion.mjs.map +0 -1
  169. package/alert/fesm2022/alert.mjs.map +0 -1
  170. package/alert-dialog/fesm2022/alert-dialog.mjs.map +0 -1
  171. package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +0 -1
  172. package/autocomplete/fesm2022/autocomplete.mjs.map +0 -1
  173. package/avatar/fesm2022/avatar.mjs.map +0 -1
  174. package/badge/fesm2022/badge.mjs.map +0 -1
  175. package/basic-alert/fesm2022/basic-alert.mjs.map +0 -1
  176. package/breadcrumb/fesm2022/breadcrumb.mjs.map +0 -1
  177. package/button/fesm2022/button.mjs.map +0 -1
  178. package/button-group/fesm2022/button-group.mjs.map +0 -1
  179. package/calendar/fesm2022/calendar.mjs.map +0 -1
  180. package/card/fesm2022/card.mjs.map +0 -1
  181. package/carousel/fesm2022/carousel.mjs.map +0 -1
  182. package/checkbox/fesm2022/checkbox.mjs.map +0 -1
  183. package/collapsible/fesm2022/collapsible.mjs.map +0 -1
  184. package/combobox/fesm2022/combobox.mjs.map +0 -1
  185. package/command/fesm2022/command.mjs.map +0 -1
  186. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +0 -1
  187. package/context-menu/fesm2022/context-menu.mjs.map +0 -1
  188. package/date-picker/fesm2022/date-picker.mjs.map +0 -1
  189. package/dialog/fesm2022/dialog.mjs.map +0 -1
  190. package/drawer/fesm2022/drawer.mjs.map +0 -1
  191. package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +0 -1
  192. package/empty/fesm2022/empty.mjs.map +0 -1
  193. package/field/fesm2022/field.mjs.map +0 -1
  194. package/form-checkbox/fesm2022/form-checkbox.mjs.map +0 -1
  195. package/form-date-picker/fesm2022/form-date-picker.mjs.map +0 -1
  196. package/form-field/fesm2022/form-field.mjs.map +0 -1
  197. package/form-field-simple/fesm2022/form-field-simple.mjs.map +0 -1
  198. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +0 -1
  199. package/form-select/fesm2022/form-select.mjs.map +0 -1
  200. package/form-text-input/fesm2022/form-text-input.mjs.map +0 -1
  201. package/form-textarea/fesm2022/form-textarea.mjs.map +0 -1
  202. package/hover-card/fesm2022/hover-card.mjs.map +0 -1
  203. package/icon/fesm2022/icon.mjs.map +0 -1
  204. package/input/fesm2022/input.mjs.map +0 -1
  205. package/input-group/fesm2022/input-group.mjs.map +0 -1
  206. package/input-otp/fesm2022/input-otp.mjs.map +0 -1
  207. package/item/fesm2022/item.mjs.map +0 -1
  208. package/kbd/fesm2022/kbd.mjs.map +0 -1
  209. package/label/fesm2022/label.mjs.map +0 -1
  210. package/layout-simple/fesm2022/layout-simple.mjs.map +0 -1
  211. package/menubar/fesm2022/menubar.mjs.map +0 -1
  212. package/native-select/fesm2022/native-select.mjs.map +0 -1
  213. package/navigation-menu/fesm2022/navigation-menu.mjs.map +0 -1
  214. package/pagination/fesm2022/pagination.mjs.map +0 -1
  215. package/popover/fesm2022/popover.mjs.map +0 -1
  216. package/progress/fesm2022/progress.mjs.map +0 -1
  217. package/radio-group/fesm2022/radio-group.mjs.map +0 -1
  218. package/resizable/fesm2022/resizable.mjs.map +0 -1
  219. package/scroll-area/fesm2022/scroll-area.mjs.map +0 -1
  220. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +0 -1
  221. package/select/fesm2022/select.mjs.map +0 -1
  222. package/separator/fesm2022/separator.mjs.map +0 -1
  223. package/sheet/fesm2022/sheet.mjs.map +0 -1
  224. package/sidebar/fesm2022/sidebar.mjs.map +0 -1
  225. package/skeleton/fesm2022/skeleton.mjs.map +0 -1
  226. package/slider/fesm2022/slider.mjs.map +0 -1
  227. package/sonner/fesm2022/sonner.mjs.map +0 -1
  228. package/spinner/fesm2022/spinner.mjs.map +0 -1
  229. package/switch/fesm2022/switch.mjs.map +0 -1
  230. package/table/fesm2022/table.mjs.map +0 -1
  231. package/tabs/fesm2022/tabs.mjs.map +0 -1
  232. package/textarea/fesm2022/textarea.mjs.map +0 -1
  233. package/toggle/fesm2022/toggle.mjs.map +0 -1
  234. package/toggle-group/fesm2022/toggle-group.mjs.map +0 -1
  235. package/tooltip/fesm2022/tooltip.mjs.map +0 -1
  236. package/typography/fesm2022/typography.mjs.map +0 -1
  237. package/utils/fesm2022/utils.mjs.map +0 -1
@@ -1,11 +1,339 @@
1
- # Carousel
1
+ # Carousel (`@egose/shadcn-theme-ng/carousel`)
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli).
3
+ An Embla-powered content carousel — the Angular port of shadcn/ui `Carousel`. `hlm-carousel` wraps `embla-carousel-angular` (`EmblaCarouselDirective`) with an `orientation`-aware shell (`horizontal | vertical`, RTL-aware via CDK `Directionality`), exposes Embla state as read-only signals (`canScrollPrev/Next`, `currentSlide`, `slideCount`), and ships `hlm-carousel-content` / `hlm-carousel-item` layout directives, `button[hlm-carousel-previous]` / `button[hlm-carousel-next]` controls, and an `hlm-carousel-slide-display` counter. No spartan-ng brain primitive is used; scrolling, snapping, and plugins are pure Embla.
4
4
 
5
- ## Building
5
+ Ships as `@egose/shadcn-theme-ng/carousel` and `@egose/shadcn-theme-ng-tw/carousel` (the `tw:`-prefixed variant). See the [package README](../../README.md) for install, peer dependencies, and Tailwind setup. Do not publish this project directory independently — it is consumed via the published subpath only.
6
6
 
7
- To build the library, run:
7
+ ## Installation
8
8
 
9
9
  ```bash
10
- ng build carousel
10
+ # Plain Tailwind (no prefix):
11
+ npm install @egose/shadcn-theme-ng
12
+
13
+ # Or the tw:-prefixed variant:
14
+ npm install @egose/shadcn-theme-ng-tw
15
+ ```
16
+
17
+ Peers are listed in the [package README](../../README.md). This subpath declares `@angular/common`, `@angular/core`, and `@spartan-ng/brain` as peers (see `projects/carousel/package.json`); at runtime it also needs `embla-carousel`, `embla-carousel-angular` (transitive implementation deps — do not install directly unless you import them), plus `@egose/shadcn-theme-ng/button` styles for the nav buttons.
18
+
19
+ ## Imports
20
+
21
+ ```ts
22
+ import {
23
+ HlmCarousel,
24
+ HlmCarouselContent,
25
+ HlmCarouselItem,
26
+ HlmCarouselPrevious,
27
+ HlmCarouselNext,
28
+ HlmCarouselSlideDisplay,
29
+ HlmCarouselImports,
30
+ HlmCarouselModule,
31
+ } from '@egose/shadcn-theme-ng/carousel';
32
+ // tw variant:
33
+ // import { ... } from '@egose/shadcn-theme-ng-tw/carousel';
34
+ ```
35
+
36
+ Standalone:
37
+
38
+ ```ts
39
+ import { Component } from '@angular/core';
40
+ import { HlmCarouselImports } from '@egose/shadcn-theme-ng/carousel';
41
+
42
+ @Component({
43
+ selector: 'app-demo',
44
+ standalone: true,
45
+ imports: [...HlmCarouselImports],
46
+ template: `...`,
47
+ })
48
+ export class DemoComponent {}
49
+ ```
50
+
51
+ NgModule:
52
+
53
+ ```ts
54
+ import { NgModule } from '@angular/core';
55
+ import { HlmCarouselModule } from '@egose/shadcn-theme-ng/carousel';
56
+
57
+ @NgModule({ imports: [HlmCarouselModule] })
58
+ export class DemoModule {}
59
+ ```
60
+
61
+ ## Anatomy / Structure
62
+
63
+ ```html
64
+ <hlm-carousel orientation="horizontal" [options]="{ loop: true }" [plugins]="plugins">
65
+ <hlm-carousel-content>
66
+ <hlm-carousel-item>Slide 1</hlm-carousel-item>
67
+ <hlm-carousel-item>Slide 2</hlm-carousel-item>
68
+ <hlm-carousel-item>Slide 3</hlm-carousel-item>
69
+ </hlm-carousel-content>
70
+
71
+ <button hlm-carousel-previous></button>
72
+ <button hlm-carousel-next></button>
73
+ <hlm-carousel-slide-display />
74
+ </hlm-carousel>
11
75
  ```
76
+
77
+ Real selectors:
78
+
79
+ | Class | Selector | Notes |
80
+ | ------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
81
+ | `HlmCarousel` | `hlm-carousel` | `role="region"`, `aria-roledescription="carousel"`. Projects `[hlmCarouselContent]` into the Embla viewport; everything else into the outer shell (position nav buttons here). |
82
+ | `HlmCarouselContent` | `[hlmCarouselContent]`, `hlm-carousel-content` | Flex track (`-ml-4` / `-mt-4 flex-col` by orientation). Must be inside `hlm-carousel` (injects it). |
83
+ | `HlmCarouselItem` | `[hlmCarouselItem]`, `hlm-carousel-item` | `basis-full`, `role="group"`, `aria-roledescription="slide"`. |
84
+ | `HlmCarouselPrevious` | `button[hlm-carousel-previous]`, `button[hlmCarouselPrevious]` | Outline icon-sm button; auto-disabled at start; `(click)` → `scrollPrev()`. |
85
+ | `HlmCarouselNext` | `button[hlm-carousel-next]`, `button[hlmCarouselNext]` | Same, wired to `scrollNext()`. |
86
+ | `HlmCarouselSlideDisplay` | `hlm-carousel-slide-display` | `N / total` counter + sr-only label. |
87
+
88
+ ## API reference
89
+
90
+ ### `HlmCarousel` (`hlm-carousel`)
91
+
92
+ | Input | Type | Default | Description |
93
+ | ------------- | --------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
94
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Embla `axis` (`x`/`y`), track layout, and nav-button placement. |
95
+ | `options` | `Omit<EmblaOptionsType, 'axis'> \| undefined` | `undefined` | Raw Embla options (`loop`, `align`, `slidesToScroll`, `direction`, …). `direction` defaults to the ambient CDK `Directionality`; explicit `direction` wins. |
96
+ | `plugins` | `EmblaPluginType[]` | `[]` | Embla plugins (e.g. Autoplay). Passed straight to the directive. |
97
+
98
+ | Signal (read-only) | Type | Description |
99
+ | ------------------ | ----------------- | ----------------------------------------------------------------------------------- |
100
+ | `canScrollPrev` | `Signal<boolean>` | Updated on Embla `init`/`select`/`reInit`. Drives the previous button's `disabled`. |
101
+ | `canScrollNext` | `Signal<boolean>` | Same for next. |
102
+ | `currentSlide` | `Signal<number>` | Zero-based `selectedScrollSnap()`. |
103
+ | `slideCount` | `Signal<number>` | `scrollSnapList().length`. |
104
+
105
+ | Method | Description |
106
+ | -------------- | --------------------------------------------------- |
107
+ | `scrollPrev()` | Delegates to `EmblaCarouselDirective.scrollPrev()`. |
108
+ | `scrollNext()` | Delegates to `EmblaCarouselDirective.scrollNext()`. |
109
+
110
+ Host `(keydown)`: `ArrowLeft` → `scrollPrev()`, `ArrowRight` → `scrollNext()` (with `preventDefault`).
111
+
112
+ ### Nav buttons
113
+
114
+ Both are `HlmBtn` host-directive components (`inputs: ['variant', 'size']`, defaulted via `provideBrnButtonConfig({ variant: 'outline', size: 'icon-sm' })`). Position classes are computed from the parent orientation (absolute `-start-12`/`-end-12` horizontal, `-top-12`/`-bottom-12` rotated vertical). Overriding `variant`/`size` is supported but replaces the outline icon look.
115
+
116
+ ### `HlmCarouselSlideDisplay` (`hlm-carousel-slide-display`)
117
+
118
+ | Input | Type | Default | Description |
119
+ | ------------ | ------------ | --------------------------------- | ------------------------------------------------------------------ |
120
+ | `slideClass` | `ClassValue` | `'text-muted-foreground text-sm'` | Class for the visible `N / total` div (`aria-hidden`). |
121
+ | `label` | `string` | `'Slide'` | Prefix for the sr-only `"{{label}} N of total is displayed"` text. |
122
+
123
+ ## Examples
124
+
125
+ ### 1. Basic horizontal carousel
126
+
127
+ ```ts
128
+ import { Component } from '@angular/core';
129
+ import { HlmCarouselImports } from '@egose/shadcn-theme-ng/carousel';
130
+ import { HlmCardImports } from '@egose/shadcn-theme-ng/card';
131
+
132
+ @Component({
133
+ selector: 'app-basic-carousel',
134
+ standalone: true,
135
+ imports: [...HlmCarouselImports, ...HlmCardImports],
136
+ template: `
137
+ <hlm-carousel class="mx-12 max-w-xl">
138
+ <hlm-carousel-content>
139
+ @for (n of [1, 2, 3, 4]; track n) {
140
+ <hlm-carousel-item>
141
+ <div hlmCard class="m-1">
142
+ <div hlmCardContent class="flex aspect-video items-center justify-center text-3xl font-semibold">
143
+ {{ n }}
144
+ </div>
145
+ </div>
146
+ </hlm-carousel-item>
147
+ }
148
+ </hlm-carousel-content>
149
+ <button hlm-carousel-previous></button>
150
+ <button hlm-carousel-next></button>
151
+ </hlm-carousel>
152
+ `,
153
+ })
154
+ export class BasicCarouselComponent {}
155
+ ```
156
+
157
+ > Nav buttons are absolutely positioned outside the viewport (`-start-12`/`-end-12`) — leave horizontal margin on the carousel or wrap it in padded layout.
158
+
159
+ ### 2. Vertical carousel
160
+
161
+ ```ts
162
+ import { Component } from '@angular/core';
163
+ import { HlmCarouselImports } from '@egose/shadcn-theme-ng/carousel';
164
+
165
+ @Component({
166
+ selector: 'app-vertical-carousel',
167
+ standalone: true,
168
+ imports: [...HlmCarouselImports],
169
+ template: `
170
+ <hlm-carousel orientation="vertical" class="my-12 h-96 w-64">
171
+ <hlm-carousel-content class="h-96">
172
+ @for (n of [1, 2, 3]; track n) {
173
+ <hlm-carousel-item>
174
+ <div class="bg-muted flex h-full items-center justify-center rounded-lg text-2xl">
175
+ {{ n }}
176
+ </div>
177
+ </hlm-carousel-item>
178
+ }
179
+ </hlm-carousel-content>
180
+ <button hlm-carousel-previous></button>
181
+ <button hlm-carousel-next></button>
182
+ </hlm-carousel>
183
+ `,
184
+ })
185
+ export class VerticalCarouselComponent {}
186
+ ```
187
+
188
+ ### 3. Looping + aligned + multi-slide options
189
+
190
+ Any Embla option except `axis` (owned by `orientation`) passes through.
191
+
192
+ ```ts
193
+ import { Component } from '@angular/core';
194
+ import { HlmCarouselImports } from '@egose/shadcn-theme-ng/carousel';
195
+
196
+ @Component({
197
+ selector: 'app-loop-carousel',
198
+ standalone: true,
199
+ imports: [...HlmCarouselImports],
200
+ template: `
201
+ <hlm-carousel [options]="{ loop: true, align: 'start', slidesToScroll: 1 }" class="mx-12 max-w-2xl">
202
+ <hlm-carousel-content>
203
+ @for (n of [1, 2, 3, 4, 5, 6]; track n) {
204
+ <hlm-carousel-item class="md:basis-1/2 lg:basis-1/3">
205
+ <div class="bg-card m-1 rounded-lg p-6 text-center ring-1">Card {{ n }}</div>
206
+ </hlm-carousel-item>
207
+ }
208
+ </hlm-carousel-content>
209
+ <button hlm-carousel-previous></button>
210
+ <button hlm-carousel-next></button>
211
+ </hlm-carousel>
212
+ `,
213
+ })
214
+ export class LoopCarouselComponent {}
215
+ ```
216
+
217
+ > Override item basis per breakpoint with your own `class` — the directive merges it with `min-w-0 shrink-0 grow-0 basis-full`.
218
+
219
+ ### 4. Slide counter display
220
+
221
+ ```ts
222
+ import { Component } from '@angular/core';
223
+ import { HlmCarouselImports } from '@egose/shadcn-theme-ng/carousel';
224
+
225
+ @Component({
226
+ selector: 'app-counter-carousel',
227
+ standalone: true,
228
+ imports: [...HlmCarouselImports],
229
+ template: `
230
+ <hlm-carousel class="mx-12 max-w-xl">
231
+ <hlm-carousel-content>
232
+ @for (src of images; track src) {
233
+ <hlm-carousel-item>
234
+ <img [src]="src" alt="Carousel image" class="aspect-video w-full rounded-lg object-cover" />
235
+ </hlm-carousel-item>
236
+ }
237
+ </hlm-carousel-content>
238
+ <div class="mt-2 flex items-center justify-between">
239
+ <div class="flex gap-2">
240
+ <button hlm-carousel-previous class="static! translate-none! rotate-0!"></button>
241
+ <button hlm-carousel-next class="static! translate-none! rotate-0!"></button>
242
+ </div>
243
+ <hlm-carousel-slide-display label="Photo" slideClass="text-sm font-medium" />
244
+ </div>
245
+ </hlm-carousel>
246
+ `,
247
+ })
248
+ export class CounterCarouselComponent {
249
+ readonly images = [
250
+ 'https://picsum.photos/800/450?1',
251
+ 'https://picsum.photos/800/450?2',
252
+ 'https://picsum.photos/800/450?3',
253
+ ];
254
+ }
255
+ ```
256
+
257
+ ### 5. Programmatic control via template ref
258
+
259
+ `scrollPrev/scrollNext` plus the state signals are public — wire custom dots or external buttons.
260
+
261
+ ```ts
262
+ import { Component } from '@angular/core';
263
+ import { HlmCarouselImports, HlmCarousel } from '@egose/shadcn-theme-ng/carousel';
264
+ import { HlmButtonImports } from '@egose/shadcn-theme-ng/button';
265
+
266
+ @Component({
267
+ selector: 'app-controlled-carousel',
268
+ standalone: true,
269
+ imports: [...HlmCarouselImports, ...HlmButtonImports],
270
+ template: `
271
+ <hlm-carousel #car class="mx-12 max-w-xl">
272
+ <hlm-carousel-content>
273
+ @for (n of [1, 2, 3, 4]; track n) {
274
+ <hlm-carousel-item>
275
+ <div class="bg-muted m-1 flex aspect-video items-center justify-center rounded-lg">Slide {{ n }}</div>
276
+ </hlm-carousel-item>
277
+ }
278
+ </hlm-carousel-content>
279
+ </hlm-carousel>
280
+
281
+ <div class="mt-3 flex items-center gap-2">
282
+ <button hlmBtn variant="outline" (click)="car.scrollPrev()" [disabled]="!car.canScrollPrev()">Prev</button>
283
+ <button hlmBtn variant="outline" (click)="car.scrollNext()" [disabled]="!car.canScrollNext()">Next</button>
284
+ <span class="text-sm">Slide {{ car.currentSlide() + 1 }} / {{ car.slideCount() }}</span>
285
+ </div>
286
+ `,
287
+ })
288
+ export class ControlledCarouselComponent {}
289
+ ```
290
+
291
+ ### 6. Autoplay plugin (advanced)
292
+
293
+ ```ts
294
+ import { Component } from '@angular/core';
295
+ import Autoplay from 'embla-carousel-autoplay';
296
+ import { HlmCarouselImports } from '@egose/shadcn-theme-ng/carousel';
297
+
298
+ @Component({
299
+ selector: 'app-autoplay-carousel',
300
+ standalone: true,
301
+ imports: [...HlmCarouselImports],
302
+ template: `
303
+ <hlm-carousel [plugins]="plugins" [options]="{ loop: true }" class="mx-12 max-w-xl">
304
+ <hlm-carousel-content>
305
+ @for (n of [1, 2, 3]; track n) {
306
+ <hlm-carousel-item>
307
+ <div class="bg-muted m-1 flex aspect-video items-center justify-center rounded-lg text-2xl">
308
+ {{ n }}
309
+ </div>
310
+ </hlm-carousel-item>
311
+ }
312
+ </hlm-carousel-content>
313
+ <button hlm-carousel-previous></button>
314
+ <button hlm-carousel-next></button>
315
+ </hlm-carousel>
316
+ `,
317
+ })
318
+ export class AutoplayCarouselComponent {
319
+ readonly plugins = [Autoplay({ delay: 3000, stopOnInteraction: true })];
320
+ }
321
+ ```
322
+
323
+ ## Accessibility notes
324
+
325
+ - The shell is `role="region"` / `aria-roledescription="carousel"` and each item is `role="group"` / `aria-roledescription="slide"` — give the carousel an `aria-label` (e.g. `aria-label="Product photos"`) so regions are distinguishable.
326
+ - Nav buttons include sr-only `"Previous slide"` / `"Next slide"` text and auto-disable at the ends; keep the `disabled` binding intact.
327
+ - `hlm-carousel-slide-display` renders both a visible `aria-hidden` counter and an sr-only `"Slide N of T is displayed"` live-region-friendly label.
328
+ - Arrow-key handling is on the host (`ArrowLeft/Right` → prev/next). For vertical carousels, consider adding your own Up/Down handling — the built-in handler only maps Left/Right.
329
+
330
+ ## Theming / CSS variables
331
+
332
+ No component-specific CSS variables. Track/item geometry comes from Tailwind (`basis-full`, `-ml-4`/`pl-4` gutters, `rounded-full` nav buttons). RTL flips automatically via CDK `Directionality` (chevron icons use `rtl:rotate-180`).
333
+
334
+ ## Related subpaths
335
+
336
+ - `@egose/shadcn-theme-ng/button` — `HlmBtn` powers the prev/next buttons (`variant`/`size` host inputs).
337
+ - `@egose/shadcn-theme-ng/card` — typical slide content wrapper.
338
+ - `@egose/shadcn-theme-ng/icon` — `ng-icon` chevrons inside nav buttons (provide your own icons for custom controls).
339
+ - `@egose/shadcn-theme-ng/utils` — `hlm` class merging used by the nav-button positioning.
@@ -39,7 +39,7 @@ class HlmCarousel {
39
39
  ...(ngDevMode ? [{ debugName: "_slideCount" }] : /* istanbul ignore next */ []));
40
40
  slideCount = this._slideCount.asReadonly();
41
41
  constructor() {
42
- classes(() => 'relative');
42
+ classes(() => "relative");
43
43
  }
44
44
  onEmblaEvent(event) {
45
45
  const emblaApi = this._emblaCarousel().emblaApi;
@@ -69,22 +69,10 @@ class HlmCarousel {
69
69
  scrollNext() {
70
70
  this._emblaCarousel().scrollNext();
71
71
  }
72
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarousel, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.7", type: HlmCarousel, isStandalone: true, selector: "hlm-carousel", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, plugins: { classPropertyName: "plugins", publicName: "plugins", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "carousel", "role": "region", "aria-roledescription": "carousel" }, listeners: { "keydown": "onKeydown($event)" } }, viewQueries: [{ propertyName: "_emblaCarousel", first: true, predicate: EmblaCarouselDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
74
- <div
75
- emblaCarousel
76
- class="overflow-hidden"
77
- [plugins]="plugins()"
78
- [options]="_emblaOptions()"
79
- [subscribeToEvents]="['init', 'select', 'reInit']"
80
- (emblaChange)="onEmblaEvent($event)"
81
- >
82
- <ng-content select="[hlmCarouselContent],hlm-carousel-content" />
83
- </div>
84
- <ng-content />
85
- `, isInline: true, dependencies: [{ kind: "directive", type: EmblaCarouselDirective, selector: "[emblaCarousel]", inputs: ["options", "plugins", "subscribeToEvents", "eventsThrottleTime"], outputs: ["emblaChange"], exportAs: ["emblaCarousel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
72
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarousel, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.3", type: HlmCarousel, isStandalone: true, selector: "hlm-carousel", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, plugins: { classPropertyName: "plugins", publicName: "plugins", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "carousel", "role": "region", "aria-roledescription": "carousel" }, listeners: { "keydown": "onKeydown($event)" } }, viewQueries: [{ propertyName: "_emblaCarousel", first: true, predicate: EmblaCarouselDirective, descendants: true, isSignal: true }], ngImport: i0, template: "\n <div\n emblaCarousel\n class=\"overflow-hidden\"\n [plugins]=\"plugins()\"\n [options]=\"_emblaOptions()\"\n [subscribeToEvents]=\"['init', 'select', 'reInit']\"\n (emblaChange)=\"onEmblaEvent($event)\"\n >\n <ng-content select=\"[hlmCarouselContent],hlm-carousel-content\" />\n </div>\n <ng-content />\n ", isInline: true, dependencies: [{ kind: "directive", type: EmblaCarouselDirective, selector: "[emblaCarousel]", inputs: ["options", "plugins", "subscribeToEvents", "eventsThrottleTime"], outputs: ["emblaChange"], exportAs: ["emblaCarousel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
86
74
  }
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarousel, decorators: [{
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarousel, decorators: [{
88
76
  type: Component,
89
77
  args: [{
90
78
  selector: 'hlm-carousel',
@@ -96,31 +84,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
96
84
  'aria-roledescription': 'carousel',
97
85
  '(keydown)': 'onKeydown($event)',
98
86
  },
99
- template: `
100
- <div
101
- emblaCarousel
102
- class="overflow-hidden"
103
- [plugins]="plugins()"
104
- [options]="_emblaOptions()"
105
- [subscribeToEvents]="['init', 'select', 'reInit']"
106
- (emblaChange)="onEmblaEvent($event)"
107
- >
108
- <ng-content select="[hlmCarouselContent],hlm-carousel-content" />
109
- </div>
110
- <ng-content />
111
- `,
87
+ template: "\n <div\n emblaCarousel\n class=\"overflow-hidden\"\n [plugins]=\"plugins()\"\n [options]=\"_emblaOptions()\"\n [subscribeToEvents]=\"['init', 'select', 'reInit']\"\n (emblaChange)=\"onEmblaEvent($event)\"\n >\n <ng-content select=\"[hlmCarouselContent],hlm-carousel-content\" />\n </div>\n <ng-content />\n ",
112
88
  }]
113
89
  }], ctorParameters: () => [], propDecorators: { _emblaCarousel: [{ type: i0.ViewChild, args: [i0.forwardRef(() => EmblaCarouselDirective), { isSignal: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], plugins: [{ type: i0.Input, args: [{ isSignal: true, alias: "plugins", required: false }] }] } });
114
90
 
115
91
  class HlmCarouselContent {
116
92
  _orientation = inject(HlmCarousel).orientation;
117
93
  constructor() {
118
- classes(() => ['flex', this._orientation() === 'horizontal' ? '-ml-4' : '-mt-4 flex-col']);
94
+ classes(() => ["flex", this._orientation() === 'horizontal' ? "-ml-4" : "-mt-4 flex-col"]);
119
95
  }
120
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
121
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmCarouselContent, isStandalone: true, selector: "[hlmCarouselContent],hlm-carousel-content", host: { attributes: { "data-slot": "carousel-content" } }, ngImport: i0 });
96
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
97
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmCarouselContent, isStandalone: true, selector: "[hlmCarouselContent],hlm-carousel-content", host: { attributes: { "data-slot": "carousel-content" } }, ngImport: i0 });
122
98
  }
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselContent, decorators: [{
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselContent, decorators: [{
124
100
  type: Directive,
125
101
  args: [{
126
102
  selector: '[hlmCarouselContent],hlm-carousel-content',
@@ -133,12 +109,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
133
109
  class HlmCarouselItem {
134
110
  _orientation = inject(HlmCarousel).orientation;
135
111
  constructor() {
136
- classes(() => ['min-w-0 shrink-0 grow-0 basis-full', this._orientation() === 'horizontal' ? 'pl-4' : 'pt-4']);
112
+ classes(() => [
113
+ "min-w-0 shrink-0 grow-0 basis-full",
114
+ this._orientation() === 'horizontal' ? "pl-4" : "pt-4",
115
+ ]);
137
116
  }
138
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
139
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmCarouselItem, isStandalone: true, selector: "[hlmCarouselItem],hlm-carousel-item", host: { attributes: { "data-slot": "carousel-item", "role": "group", "aria-roledescription": "slide" } }, ngImport: i0 });
117
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
118
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmCarouselItem, isStandalone: true, selector: "[hlmCarouselItem],hlm-carousel-item", host: { attributes: { "data-slot": "carousel-item", "role": "group", "aria-roledescription": "slide" } }, ngImport: i0 });
140
119
  }
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselItem, decorators: [{
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselItem, decorators: [{
142
121
  type: Directive,
143
122
  args: [{
144
123
  selector: '[hlmCarouselItem],hlm-carousel-item',
@@ -153,9 +132,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
153
132
  class HlmCarouselNext {
154
133
  _button = inject(HlmBtn);
155
134
  _carousel = inject(HlmCarousel);
156
- _computedClass = computed(() => hlm('rounded-full absolute h-8 w-8', this._carousel.orientation() === 'horizontal'
157
- ? '-end-12 top-1/2 -translate-y-1/2'
158
- : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90'), /* @ts-ignore */
135
+ _computedClass = computed(() => hlm("rounded-full absolute h-8 w-8", this._carousel.orientation() === 'horizontal'
136
+ ? "-end-12 top-1/2 -translate-y-1/2"
137
+ : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90"), /* @ts-ignore */
159
138
  ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
160
139
  isDisabled = () => !this._carousel.canScrollNext();
161
140
  constructor() {
@@ -164,13 +143,10 @@ class HlmCarouselNext {
164
143
  untracked(() => this._button.setClass(computedClass));
165
144
  });
166
145
  }
167
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselNext, deps: [], target: i0.ɵɵFactoryTarget.Component });
168
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: HlmCarouselNext, isStandalone: true, selector: "button[hlm-carousel-next], button[hlmCarouselNext]", host: { attributes: { "data-slot": "carousel-next" }, listeners: { "click": "_carousel.scrollNext()" }, properties: { "disabled": "isDisabled()" } }, providers: [provideIcons({ lucideArrowRight }), provideBrnButtonConfig({ variant: 'outline', size: 'icon-sm' })], hostDirectives: [{ directive: i1.HlmBtn, inputs: ["variant", "variant", "size", "size"] }], ngImport: i0, template: `
169
- <ng-icon name="lucideArrowRight" class="rtl:rotate-180" />
170
- <span class="sr-only">Next slide</span>
171
- `, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
146
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselNext, deps: [], target: i0.ɵɵFactoryTarget.Component });
147
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: HlmCarouselNext, isStandalone: true, selector: "button[hlm-carousel-next], button[hlmCarouselNext]", host: { attributes: { "data-slot": "carousel-next" }, listeners: { "click": "_carousel.scrollNext()" }, properties: { "disabled": "isDisabled()" } }, providers: [provideIcons({ lucideArrowRight }), provideBrnButtonConfig({ variant: 'outline', size: 'icon-sm' })], hostDirectives: [{ directive: i1.HlmBtn, inputs: ["variant", "variant", "size", "size"] }], ngImport: i0, template: "\n <ng-icon name=\"lucideArrowRight\" class=\"rtl:rotate-180\" />\n <span class=\"sr-only\">Next slide</span>\n ", isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
172
148
  }
173
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselNext, decorators: [{
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselNext, decorators: [{
174
150
  type: Component,
175
151
  args: [{
176
152
  selector: 'button[hlm-carousel-next], button[hlmCarouselNext]',
@@ -183,19 +159,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
183
159
  '[disabled]': 'isDisabled()',
184
160
  '(click)': '_carousel.scrollNext()',
185
161
  },
186
- template: `
187
- <ng-icon name="lucideArrowRight" class="rtl:rotate-180" />
188
- <span class="sr-only">Next slide</span>
189
- `,
162
+ template: "\n <ng-icon name=\"lucideArrowRight\" class=\"rtl:rotate-180\" />\n <span class=\"sr-only\">Next slide</span>\n ",
190
163
  }]
191
164
  }], ctorParameters: () => [] });
192
165
 
193
166
  class HlmCarouselPrevious {
194
167
  _button = inject(HlmBtn);
195
168
  _carousel = inject(HlmCarousel);
196
- _computedClass = computed(() => hlm('rounded-full absolute h-8 w-8', this._carousel.orientation() === 'horizontal'
197
- ? '-start-12 top-1/2 -translate-y-1/2'
198
- : '-top-12 left-1/2 -translate-x-1/2 rotate-90'), /* @ts-ignore */
169
+ _computedClass = computed(() => hlm("rounded-full absolute h-8 w-8", this._carousel.orientation() === 'horizontal'
170
+ ? "-start-12 top-1/2 -translate-y-1/2"
171
+ : "-top-12 left-1/2 -translate-x-1/2 rotate-90"), /* @ts-ignore */
199
172
  ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
200
173
  isDisabled = () => !this._carousel.canScrollPrev();
201
174
  constructor() {
@@ -204,13 +177,10 @@ class HlmCarouselPrevious {
204
177
  untracked(() => this._button.setClass(computedClass));
205
178
  });
206
179
  }
207
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselPrevious, deps: [], target: i0.ɵɵFactoryTarget.Component });
208
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: HlmCarouselPrevious, isStandalone: true, selector: "button[hlm-carousel-previous], button[hlmCarouselPrevious]", host: { attributes: { "data-slot": "carousel-previous" }, listeners: { "click": "_carousel.scrollPrev()" }, properties: { "disabled": "isDisabled()" } }, providers: [provideIcons({ lucideArrowLeft }), provideBrnButtonConfig({ variant: 'outline', size: 'icon-sm' })], hostDirectives: [{ directive: i1.HlmBtn, inputs: ["variant", "variant", "size", "size"] }], ngImport: i0, template: `
209
- <ng-icon name="lucideArrowLeft" class="rtl:rotate-180" />
210
- <span class="sr-only">Previous slide</span>
211
- `, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
180
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselPrevious, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: HlmCarouselPrevious, isStandalone: true, selector: "button[hlm-carousel-previous], button[hlmCarouselPrevious]", host: { attributes: { "data-slot": "carousel-previous" }, listeners: { "click": "_carousel.scrollPrev()" }, properties: { "disabled": "isDisabled()" } }, providers: [provideIcons({ lucideArrowLeft }), provideBrnButtonConfig({ variant: 'outline', size: 'icon-sm' })], hostDirectives: [{ directive: i1.HlmBtn, inputs: ["variant", "variant", "size", "size"] }], ngImport: i0, template: "\n <ng-icon name=\"lucideArrowLeft\" class=\"rtl:rotate-180\" />\n <span class=\"sr-only\">Previous slide</span>\n ", isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
212
182
  }
213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselPrevious, decorators: [{
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselPrevious, decorators: [{
214
184
  type: Component,
215
185
  args: [{
216
186
  selector: 'button[hlm-carousel-previous], button[hlmCarouselPrevious]',
@@ -223,10 +193,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
223
193
  '[disabled]': 'isDisabled()',
224
194
  '(click)': '_carousel.scrollPrev()',
225
195
  },
226
- template: `
227
- <ng-icon name="lucideArrowLeft" class="rtl:rotate-180" />
228
- <span class="sr-only">Previous slide</span>
229
- `,
196
+ template: "\n <ng-icon name=\"lucideArrowLeft\" class=\"rtl:rotate-180\" />\n <span class=\"sr-only\">Previous slide</span>\n ",
230
197
  }]
231
198
  }], ctorParameters: () => [] });
232
199
 
@@ -245,13 +212,10 @@ class HlmCarouselSlideDisplay {
245
212
  return `${this.label()} ${currentSlide} of ${slideCount} is displayed`;
246
213
  }, /* @ts-ignore */
247
214
  ...(ngDevMode ? [{ debugName: "_labelContent" }] : /* istanbul ignore next */ []));
248
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselSlideDisplay, deps: [], target: i0.ɵɵFactoryTarget.Component });
249
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: HlmCarouselSlideDisplay, isStandalone: true, selector: "hlm-carousel-slide-display", inputs: { slideClass: { classPropertyName: "slideClass", publicName: "slideClass", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "carousel-slide-display" } }, ngImport: i0, template: `
250
- <span class="sr-only">{{ _labelContent() }}</span>
251
- <div aria-hidden="true" [class]="slideClass()">{{ _currentSlide() }} / {{ _carousel.slideCount() }}</div>
252
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselSlideDisplay, deps: [], target: i0.ɵɵFactoryTarget.Component });
216
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: HlmCarouselSlideDisplay, isStandalone: true, selector: "hlm-carousel-slide-display", inputs: { slideClass: { classPropertyName: "slideClass", publicName: "slideClass", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "carousel-slide-display" } }, ngImport: i0, template: "\n <span class=\"sr-only\">{{ _labelContent() }}</span>\n <div aria-hidden=\"true\" [class]=\"slideClass()\">{{ _currentSlide() }} / {{ _carousel.slideCount() }}</div>\n ", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
253
217
  }
254
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselSlideDisplay, decorators: [{
218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselSlideDisplay, decorators: [{
255
219
  type: Component,
256
220
  args: [{
257
221
  selector: 'hlm-carousel-slide-display',
@@ -259,10 +223,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
259
223
  host: {
260
224
  'data-slot': 'carousel-slide-display',
261
225
  },
262
- template: `
263
- <span class="sr-only">{{ _labelContent() }}</span>
264
- <div aria-hidden="true" [class]="slideClass()">{{ _currentSlide() }} / {{ _carousel.slideCount() }}</div>
265
- `,
226
+ template: "\n <span class=\"sr-only\">{{ _labelContent() }}</span>\n <div aria-hidden=\"true\" [class]=\"slideClass()\">{{ _currentSlide() }} / {{ _carousel.slideCount() }}</div>\n ",
266
227
  }]
267
228
  }], propDecorators: { slideClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "slideClass", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
268
229
 
@@ -278,8 +239,8 @@ const HlmCarouselImports = [
278
239
  HlmCarouselSlideDisplay,
279
240
  ];
280
241
  class HlmCarouselModule {
281
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
282
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselModule, imports: [HlmCarousel,
242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
243
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselModule, imports: [HlmCarousel,
283
244
  HlmCarouselContent,
284
245
  HlmCarouselItem,
285
246
  HlmCarouselPrevious,
@@ -290,10 +251,10 @@ class HlmCarouselModule {
290
251
  HlmCarouselPrevious,
291
252
  HlmCarouselNext,
292
253
  HlmCarouselSlideDisplay] });
293
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselModule, imports: [HlmCarouselPrevious,
254
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselModule, imports: [HlmCarouselPrevious,
294
255
  HlmCarouselNext] });
295
256
  }
296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCarouselModule, decorators: [{
257
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCarouselModule, decorators: [{
297
258
  type: NgModule,
298
259
  args: [{
299
260
  imports: [...HlmCarouselImports],
@@ -306,4 +267,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
306
267
  */
307
268
 
308
269
  export { HlmCarousel, HlmCarouselContent, HlmCarouselImports, HlmCarouselItem, HlmCarouselModule, HlmCarouselNext, HlmCarouselPrevious, HlmCarouselSlideDisplay };
309
- //# sourceMappingURL=carousel.mjs.map
270
+