@edsis/ui 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/README.md +40 -0
  2. package/accordion/README.md +195 -0
  3. package/alert/README.md +177 -0
  4. package/alert-dialog/README.md +239 -0
  5. package/aspect-ratio/README.md +112 -0
  6. package/avatar/README.md +176 -0
  7. package/badge/README.md +133 -0
  8. package/breadcrumb/README.md +216 -0
  9. package/button/README.md +139 -0
  10. package/button-group/README.md +204 -0
  11. package/calendar/README.md +132 -0
  12. package/card/README.md +220 -0
  13. package/carousel/README.md +276 -0
  14. package/chart/README.md +249 -0
  15. package/checkbox/README.md +149 -0
  16. package/collapsible/README.md +191 -0
  17. package/combobox/README.md +198 -0
  18. package/command/README.md +275 -0
  19. package/composer/README.md +235 -0
  20. package/context-menu/README.md +267 -0
  21. package/date-picker/README.md +177 -0
  22. package/dialog/README.md +237 -0
  23. package/drawer/README.md +145 -0
  24. package/dropdown-menu/README.md +311 -0
  25. package/editor/README.md +136 -0
  26. package/empty/README.md +183 -0
  27. package/fesm2022/edsis-ui-accordion.mjs +174 -0
  28. package/fesm2022/edsis-ui-accordion.mjs.map +1 -0
  29. package/fesm2022/edsis-ui-alert-dialog.mjs +242 -0
  30. package/fesm2022/edsis-ui-alert-dialog.mjs.map +1 -0
  31. package/fesm2022/edsis-ui-alert.mjs +90 -0
  32. package/fesm2022/edsis-ui-alert.mjs.map +1 -0
  33. package/fesm2022/edsis-ui-aspect-ratio.mjs +33 -0
  34. package/fesm2022/edsis-ui-aspect-ratio.mjs.map +1 -0
  35. package/fesm2022/edsis-ui-avatar.mjs +123 -0
  36. package/fesm2022/edsis-ui-avatar.mjs.map +1 -0
  37. package/fesm2022/edsis-ui-badge.mjs +47 -0
  38. package/fesm2022/edsis-ui-badge.mjs.map +1 -0
  39. package/fesm2022/edsis-ui-breadcrumb.mjs +186 -0
  40. package/fesm2022/edsis-ui-breadcrumb.mjs.map +1 -0
  41. package/fesm2022/edsis-ui-button-group.mjs +95 -0
  42. package/fesm2022/edsis-ui-button-group.mjs.map +1 -0
  43. package/fesm2022/edsis-ui-button.mjs +64 -0
  44. package/fesm2022/edsis-ui-button.mjs.map +1 -0
  45. package/fesm2022/edsis-ui-calendar.mjs +78 -0
  46. package/fesm2022/edsis-ui-calendar.mjs.map +1 -0
  47. package/fesm2022/edsis-ui-card.mjs +137 -0
  48. package/fesm2022/edsis-ui-card.mjs.map +1 -0
  49. package/fesm2022/edsis-ui-carousel.mjs +310 -0
  50. package/fesm2022/edsis-ui-carousel.mjs.map +1 -0
  51. package/fesm2022/edsis-ui-chart-area.mjs +6 -0
  52. package/fesm2022/edsis-ui-chart-area.mjs.map +1 -0
  53. package/fesm2022/edsis-ui-chart-bar.mjs +6 -0
  54. package/fesm2022/edsis-ui-chart-bar.mjs.map +1 -0
  55. package/fesm2022/edsis-ui-chart-line.mjs +6 -0
  56. package/fesm2022/edsis-ui-chart-line.mjs.map +1 -0
  57. package/fesm2022/edsis-ui-chart-pie.mjs +6 -0
  58. package/fesm2022/edsis-ui-chart-pie.mjs.map +1 -0
  59. package/fesm2022/edsis-ui-chart-radar.mjs +6 -0
  60. package/fesm2022/edsis-ui-chart-radar.mjs.map +1 -0
  61. package/fesm2022/edsis-ui-chart-radial.mjs +6 -0
  62. package/fesm2022/edsis-ui-chart-radial.mjs.map +1 -0
  63. package/fesm2022/edsis-ui-chart-scatter.mjs +6 -0
  64. package/fesm2022/edsis-ui-chart-scatter.mjs.map +1 -0
  65. package/fesm2022/edsis-ui-chart.mjs +3714 -0
  66. package/fesm2022/edsis-ui-chart.mjs.map +1 -0
  67. package/fesm2022/edsis-ui-checkbox.mjs +104 -0
  68. package/fesm2022/edsis-ui-checkbox.mjs.map +1 -0
  69. package/fesm2022/edsis-ui-collapsible.mjs +116 -0
  70. package/fesm2022/edsis-ui-collapsible.mjs.map +1 -0
  71. package/fesm2022/edsis-ui-combobox.mjs +263 -0
  72. package/fesm2022/edsis-ui-combobox.mjs.map +1 -0
  73. package/fesm2022/edsis-ui-command.mjs +268 -0
  74. package/fesm2022/edsis-ui-command.mjs.map +1 -0
  75. package/fesm2022/edsis-ui-composer.mjs +329 -0
  76. package/fesm2022/edsis-ui-composer.mjs.map +1 -0
  77. package/fesm2022/edsis-ui-context-menu.mjs +100 -0
  78. package/fesm2022/edsis-ui-context-menu.mjs.map +1 -0
  79. package/fesm2022/edsis-ui-date-picker.mjs +155 -0
  80. package/fesm2022/edsis-ui-date-picker.mjs.map +1 -0
  81. package/fesm2022/edsis-ui-dialog.mjs +262 -0
  82. package/fesm2022/edsis-ui-dialog.mjs.map +1 -0
  83. package/fesm2022/edsis-ui-drawer.mjs +6 -0
  84. package/fesm2022/edsis-ui-drawer.mjs.map +1 -0
  85. package/fesm2022/edsis-ui-dropdown-menu.mjs +466 -0
  86. package/fesm2022/edsis-ui-dropdown-menu.mjs.map +1 -0
  87. package/fesm2022/edsis-ui-editor.mjs +692 -0
  88. package/fesm2022/edsis-ui-editor.mjs.map +1 -0
  89. package/fesm2022/edsis-ui-empty.mjs +132 -0
  90. package/fesm2022/edsis-ui-empty.mjs.map +1 -0
  91. package/fesm2022/edsis-ui-form.mjs +334 -0
  92. package/fesm2022/edsis-ui-form.mjs.map +1 -0
  93. package/fesm2022/edsis-ui-hover-card.mjs +284 -0
  94. package/fesm2022/edsis-ui-hover-card.mjs.map +1 -0
  95. package/fesm2022/edsis-ui-input-group.mjs +164 -0
  96. package/fesm2022/edsis-ui-input-group.mjs.map +1 -0
  97. package/fesm2022/edsis-ui-input-otp.mjs +485 -0
  98. package/fesm2022/edsis-ui-input-otp.mjs.map +1 -0
  99. package/fesm2022/edsis-ui-input.mjs +43 -0
  100. package/fesm2022/edsis-ui-input.mjs.map +1 -0
  101. package/fesm2022/edsis-ui-item.mjs +241 -0
  102. package/fesm2022/edsis-ui-item.mjs.map +1 -0
  103. package/fesm2022/edsis-ui-kanban.mjs +289 -0
  104. package/fesm2022/edsis-ui-kanban.mjs.map +1 -0
  105. package/fesm2022/edsis-ui-kbd.mjs +51 -0
  106. package/fesm2022/edsis-ui-kbd.mjs.map +1 -0
  107. package/fesm2022/edsis-ui-label.mjs +30 -0
  108. package/fesm2022/edsis-ui-label.mjs.map +1 -0
  109. package/fesm2022/edsis-ui-menubar.mjs +302 -0
  110. package/fesm2022/edsis-ui-menubar.mjs.map +1 -0
  111. package/fesm2022/edsis-ui-native-select.mjs +61 -0
  112. package/fesm2022/edsis-ui-native-select.mjs.map +1 -0
  113. package/fesm2022/edsis-ui-navigation-menu.mjs +399 -0
  114. package/fesm2022/edsis-ui-navigation-menu.mjs.map +1 -0
  115. package/fesm2022/edsis-ui-pagination.mjs +216 -0
  116. package/fesm2022/edsis-ui-pagination.mjs.map +1 -0
  117. package/fesm2022/edsis-ui-pillbox.mjs +777 -0
  118. package/fesm2022/edsis-ui-pillbox.mjs.map +1 -0
  119. package/fesm2022/edsis-ui-popover.mjs +163 -0
  120. package/fesm2022/edsis-ui-popover.mjs.map +1 -0
  121. package/fesm2022/edsis-ui-progress.mjs +53 -0
  122. package/fesm2022/edsis-ui-progress.mjs.map +1 -0
  123. package/fesm2022/edsis-ui-radio.mjs +111 -0
  124. package/fesm2022/edsis-ui-radio.mjs.map +1 -0
  125. package/fesm2022/edsis-ui-resizable.mjs +454 -0
  126. package/fesm2022/edsis-ui-resizable.mjs.map +1 -0
  127. package/fesm2022/edsis-ui-scroll-area.mjs +48 -0
  128. package/fesm2022/edsis-ui-scroll-area.mjs.map +1 -0
  129. package/fesm2022/edsis-ui-select.mjs +164 -0
  130. package/fesm2022/edsis-ui-select.mjs.map +1 -0
  131. package/fesm2022/edsis-ui-separator.mjs +33 -0
  132. package/fesm2022/edsis-ui-separator.mjs.map +1 -0
  133. package/fesm2022/edsis-ui-sheet.mjs +264 -0
  134. package/fesm2022/edsis-ui-sheet.mjs.map +1 -0
  135. package/fesm2022/edsis-ui-skeleton.mjs +29 -0
  136. package/fesm2022/edsis-ui-skeleton.mjs.map +1 -0
  137. package/fesm2022/edsis-ui-slider.mjs +405 -0
  138. package/fesm2022/edsis-ui-slider.mjs.map +1 -0
  139. package/fesm2022/edsis-ui-spinner.mjs +58 -0
  140. package/fesm2022/edsis-ui-spinner.mjs.map +1 -0
  141. package/fesm2022/edsis-ui-switch.mjs +107 -0
  142. package/fesm2022/edsis-ui-switch.mjs.map +1 -0
  143. package/fesm2022/edsis-ui-table.mjs +139 -0
  144. package/fesm2022/edsis-ui-table.mjs.map +1 -0
  145. package/fesm2022/edsis-ui-tabs.mjs +252 -0
  146. package/fesm2022/edsis-ui-tabs.mjs.map +1 -0
  147. package/fesm2022/edsis-ui-textarea.mjs +37 -0
  148. package/fesm2022/edsis-ui-textarea.mjs.map +1 -0
  149. package/fesm2022/edsis-ui-timeline.mjs +213 -0
  150. package/fesm2022/edsis-ui-timeline.mjs.map +1 -0
  151. package/fesm2022/edsis-ui-toast.mjs +71 -0
  152. package/fesm2022/edsis-ui-toast.mjs.map +1 -0
  153. package/fesm2022/edsis-ui-toggle-group.mjs +269 -0
  154. package/fesm2022/edsis-ui-toggle-group.mjs.map +1 -0
  155. package/fesm2022/edsis-ui-toggle.mjs +76 -0
  156. package/fesm2022/edsis-ui-toggle.mjs.map +1 -0
  157. package/fesm2022/edsis-ui-tooltip.mjs +339 -0
  158. package/fesm2022/edsis-ui-tooltip.mjs.map +1 -0
  159. package/fesm2022/edsis-ui-utils.mjs +13 -0
  160. package/fesm2022/edsis-ui-utils.mjs.map +1 -0
  161. package/fesm2022/edsis-ui.mjs +11 -0
  162. package/fesm2022/edsis-ui.mjs.map +1 -0
  163. package/form/README.md +210 -0
  164. package/hover-card/README.md +146 -0
  165. package/input/README.md +159 -0
  166. package/input-group/README.md +234 -0
  167. package/input-otp/README.md +273 -0
  168. package/item/README.md +247 -0
  169. package/kanban/README.md +81 -0
  170. package/kbd/README.md +139 -0
  171. package/label/README.md +136 -0
  172. package/menubar/README.md +269 -0
  173. package/native-select/README.md +176 -0
  174. package/navigation-menu/README.md +160 -0
  175. package/package.json +310 -0
  176. package/pagination/README.md +144 -0
  177. package/pillbox/README.md +67 -0
  178. package/popover/README.md +43 -0
  179. package/progress/README.md +160 -0
  180. package/radio/README.md +209 -0
  181. package/resizable/README.md +164 -0
  182. package/scroll-area/README.md +143 -0
  183. package/select/README.md +174 -0
  184. package/separator/README.md +170 -0
  185. package/sheet/README.md +183 -0
  186. package/skeleton/README.md +158 -0
  187. package/slider/README.md +207 -0
  188. package/spinner/README.md +160 -0
  189. package/switch/README.md +166 -0
  190. package/table/README.md +291 -0
  191. package/tabs/README.md +214 -0
  192. package/textarea/README.md +154 -0
  193. package/timeline/README.md +94 -0
  194. package/toast/README.md +321 -0
  195. package/toggle/README.md +131 -0
  196. package/toggle-group/README.md +206 -0
  197. package/tooltip/README.md +211 -0
  198. package/types/edsis-ui-accordion.d.ts +51 -0
  199. package/types/edsis-ui-alert-dialog.d.ts +93 -0
  200. package/types/edsis-ui-alert.d.ts +37 -0
  201. package/types/edsis-ui-aspect-ratio.d.ts +12 -0
  202. package/types/edsis-ui-avatar.d.ts +51 -0
  203. package/types/edsis-ui-badge.d.ts +19 -0
  204. package/types/edsis-ui-breadcrumb.d.ts +46 -0
  205. package/types/edsis-ui-button-group.d.ts +26 -0
  206. package/types/edsis-ui-button.d.ts +22 -0
  207. package/types/edsis-ui-calendar.d.ts +33 -0
  208. package/types/edsis-ui-card.d.ts +60 -0
  209. package/types/edsis-ui-carousel.d.ts +86 -0
  210. package/types/edsis-ui-chart-area.d.ts +1 -0
  211. package/types/edsis-ui-chart-bar.d.ts +1 -0
  212. package/types/edsis-ui-chart-line.d.ts +1 -0
  213. package/types/edsis-ui-chart-pie.d.ts +1 -0
  214. package/types/edsis-ui-chart-radar.d.ts +1 -0
  215. package/types/edsis-ui-chart-radial.d.ts +1 -0
  216. package/types/edsis-ui-chart-scatter.d.ts +1 -0
  217. package/types/edsis-ui-chart.d.ts +1094 -0
  218. package/types/edsis-ui-checkbox.d.ts +35 -0
  219. package/types/edsis-ui-collapsible.d.ts +42 -0
  220. package/types/edsis-ui-combobox.d.ts +51 -0
  221. package/types/edsis-ui-command.d.ts +99 -0
  222. package/types/edsis-ui-composer.d.ts +90 -0
  223. package/types/edsis-ui-context-menu.d.ts +35 -0
  224. package/types/edsis-ui-date-picker.d.ts +41 -0
  225. package/types/edsis-ui-dialog.d.ts +87 -0
  226. package/types/edsis-ui-drawer.d.ts +1 -0
  227. package/types/edsis-ui-dropdown-menu.d.ts +136 -0
  228. package/types/edsis-ui-editor.d.ts +123 -0
  229. package/types/edsis-ui-empty.d.ts +50 -0
  230. package/types/edsis-ui-form.d.ts +141 -0
  231. package/types/edsis-ui-hover-card.d.ts +74 -0
  232. package/types/edsis-ui-input-group.d.ts +51 -0
  233. package/types/edsis-ui-input-otp.d.ts +136 -0
  234. package/types/edsis-ui-input.d.ts +16 -0
  235. package/types/edsis-ui-item.d.ts +88 -0
  236. package/types/edsis-ui-kanban.d.ts +70 -0
  237. package/types/edsis-ui-kbd.d.ts +16 -0
  238. package/types/edsis-ui-label.d.ts +11 -0
  239. package/types/edsis-ui-menubar.d.ts +67 -0
  240. package/types/edsis-ui-native-select.d.ts +26 -0
  241. package/types/edsis-ui-navigation-menu.d.ts +96 -0
  242. package/types/edsis-ui-pagination.d.ts +34 -0
  243. package/types/edsis-ui-pillbox.d.ts +157 -0
  244. package/types/edsis-ui-popover.d.ts +43 -0
  245. package/types/edsis-ui-progress.d.ts +17 -0
  246. package/types/edsis-ui-radio.d.ts +40 -0
  247. package/types/edsis-ui-resizable.d.ts +99 -0
  248. package/types/edsis-ui-scroll-area.d.ts +19 -0
  249. package/types/edsis-ui-select.d.ts +57 -0
  250. package/types/edsis-ui-separator.d.ts +14 -0
  251. package/types/edsis-ui-sheet.d.ts +76 -0
  252. package/types/edsis-ui-skeleton.d.ts +10 -0
  253. package/types/edsis-ui-slider.d.ts +74 -0
  254. package/types/edsis-ui-spinner.d.ts +13 -0
  255. package/types/edsis-ui-switch.d.ts +40 -0
  256. package/types/edsis-ui-table.d.ts +52 -0
  257. package/types/edsis-ui-tabs.d.ts +92 -0
  258. package/types/edsis-ui-textarea.d.ts +12 -0
  259. package/types/edsis-ui-timeline.d.ts +63 -0
  260. package/types/edsis-ui-toast.d.ts +38 -0
  261. package/types/edsis-ui-toggle-group.d.ts +89 -0
  262. package/types/edsis-ui-toggle.d.ts +25 -0
  263. package/types/edsis-ui-tooltip.d.ts +89 -0
  264. package/types/edsis-ui-utils.d.ts +5 -0
  265. package/types/edsis-ui.d.ts +2 -0
package/card/README.md ADDED
@@ -0,0 +1,220 @@
1
+ # Card
2
+
3
+ Displays a card with header, content, footer, an optional header action, and a compact size variant.
4
+
5
+ Use Card for login panels, billing summaries, media/event highlights, and other grouped surfaces that need a clear title plus supporting actions.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import {
11
+ CardActionComponent,
12
+ CardComponent,
13
+ CardContentComponent,
14
+ CardDescriptionComponent,
15
+ CardFooterComponent,
16
+ CardHeaderComponent,
17
+ CardTitleComponent,
18
+ } from '@edsis/ui/card';
19
+ ```
20
+
21
+ ## Composition
22
+
23
+ The Angular structure matches the current shadcn card hierarchy while using Angular selectors.
24
+
25
+ ```text
26
+ ui-card
27
+ ├── ui-card-header
28
+ │ ├── ui-card-title
29
+ │ ├── ui-card-description
30
+ │ └── ui-card-action
31
+ ├── ui-card-content
32
+ └── ui-card-footer
33
+ ```
34
+
35
+ ## Basic usage
36
+
37
+ ```html
38
+ <ui-card class="w-full max-w-sm">
39
+ <ui-card-header>
40
+ <ui-card-title>Card Title</ui-card-title>
41
+ <ui-card-description>Card Description</ui-card-description>
42
+ <ui-card-action>
43
+ <button ui-button variant="link" size="sm">Action</button>
44
+ </ui-card-action>
45
+ </ui-card-header>
46
+
47
+ <ui-card-content>
48
+ <p>Card Content</p>
49
+ </ui-card-content>
50
+
51
+ <ui-card-footer>
52
+ <p>Card Footer</p>
53
+ </ui-card-footer>
54
+ </ui-card>
55
+ ```
56
+
57
+ ## Common patterns
58
+
59
+ ### Login card
60
+
61
+ The current shadcn preview uses the card as a login surface. In Angular, compose the card with button, input, and label primitives directly.
62
+
63
+ ```html
64
+ <ui-card class="w-full max-w-sm">
65
+ <ui-card-header>
66
+ <ui-card-title>Login to your account</ui-card-title>
67
+ <ui-card-description>Enter your email below to login to your account</ui-card-description>
68
+ <ui-card-action>
69
+ <button ui-button variant="link" size="sm">Sign Up</button>
70
+ </ui-card-action>
71
+ </ui-card-header>
72
+
73
+ <ui-card-content>
74
+ <form class="grid gap-6">
75
+ <div class="grid gap-2">
76
+ <label ui-label for="email">Email</label>
77
+ <input ui-input id="email" type="email" placeholder="m@example.com" required />
78
+ </div>
79
+
80
+ <div class="grid gap-2">
81
+ <div class="flex items-center">
82
+ <label ui-label for="password">Password</label>
83
+ <a href="#forgot-password" class="ms-auto inline-block text-sm underline-offset-4 hover:underline">
84
+ Forgot your password?
85
+ </a>
86
+ </div>
87
+ <input ui-input id="password" type="password" required />
88
+ </div>
89
+ </form>
90
+ </ui-card-content>
91
+
92
+ <ui-card-footer class="flex-col gap-2">
93
+ <button ui-button class="w-full">Login</button>
94
+ <button ui-button variant="outline" class="w-full">Login with Google</button>
95
+ </ui-card-footer>
96
+ </ui-card>
97
+ ```
98
+
99
+ ### Small size
100
+
101
+ Use `size="sm"` on the root card when the surface should feel denser. The compact size cascades to header spacing, content padding, footer padding, and heading/body typography.
102
+
103
+ ```html
104
+ <ui-card size="sm" class="w-full max-w-sm">
105
+ <ui-card-header>
106
+ <ui-card-title>Small Card</ui-card-title>
107
+ <ui-card-description>This card uses the small size variant.</ui-card-description>
108
+ </ui-card-header>
109
+ <ui-card-content>
110
+ <p class="text-sm text-muted-foreground">Compact spacing for dense dashboards or inset panels.</p>
111
+ </ui-card-content>
112
+ <ui-card-footer>
113
+ <button ui-button variant="outline" size="sm" class="w-full">Action</button>
114
+ </ui-card-footer>
115
+ </ui-card>
116
+ ```
117
+
118
+ ### Image card
119
+
120
+ Add media before the header when the card introduces an event, article, or campaign. `ui-card-action` still sits in the top-right of the header and can host a badge or button.
121
+
122
+ ```html
123
+ <ui-card class="relative w-full max-w-sm overflow-hidden">
124
+ <div aria-hidden="true" class="pointer-events-none absolute inset-x-0 top-0 z-30 aspect-video bg-black/35"></div>
125
+ <img
126
+ src="https://avatar.vercel.sh/shadcn1"
127
+ alt="Event cover"
128
+ class="relative z-20 aspect-video w-full object-cover brightness-75 grayscale" />
129
+
130
+ <ui-card-header>
131
+ <ui-card-action>
132
+ <ui-badge variant="secondary">Featured</ui-badge>
133
+ </ui-card-action>
134
+ <ui-card-title>Design systems meetup</ui-card-title>
135
+ <ui-card-description> A practical talk on component APIs, accessibility, and shipping faster. </ui-card-description>
136
+ </ui-card-header>
137
+
138
+ <ui-card-footer>
139
+ <button ui-button class="w-full">View event</button>
140
+ </ui-card-footer>
141
+ </ui-card>
142
+ ```
143
+
144
+ ### RTL
145
+
146
+ Set `dir="rtl"` on the card host or a wrapper when the surrounding interface runs right to left. The composition stays the same.
147
+
148
+ ```html
149
+ <ui-card dir="rtl" lang="ar" class="w-full max-w-sm text-right">
150
+ <ui-card-header>
151
+ <ui-card-title>تسجيل الدخول إلى حسابك</ui-card-title>
152
+ <ui-card-description>أدخل بريدك الإلكتروني أدناه لتسجيل الدخول إلى حسابك</ui-card-description>
153
+ <ui-card-action>
154
+ <button ui-button variant="link" size="sm">إنشاء حساب</button>
155
+ </ui-card-action>
156
+ </ui-card-header>
157
+ <ui-card-content>
158
+ <!-- same form fields as the login example -->
159
+ </ui-card-content>
160
+ <ui-card-footer class="flex-col gap-2">
161
+ <button ui-button class="w-full">تسجيل الدخول</button>
162
+ <button ui-button variant="outline" class="w-full">تسجيل الدخول باستخدام Google</button>
163
+ </ui-card-footer>
164
+ </ui-card>
165
+ ```
166
+
167
+ ## API reference
168
+
169
+ ### `CardComponent`
170
+
171
+ | Input | Type | Default |
172
+ | ------- | ------------------- | ----------- |
173
+ | `size` | `"default" \| "sm"` | `'default'` |
174
+ | `class` | `string` | `''` |
175
+
176
+ The selected size is also exposed on the host as `data-size`, which can be used for styling overrides.
177
+
178
+ ### Parts
179
+
180
+ | Part | Selector | Notes |
181
+ | -------------------------- | --------------------- | ----------------------------------------------------------------- |
182
+ | `CardHeaderComponent` | `ui-card-header` | Header grid that places `ui-card-action` in the top-right corner. |
183
+ | `CardTitleComponent` | `ui-card-title` | Primary heading for the card. |
184
+ | `CardDescriptionComponent` | `ui-card-description` | Supporting text under the title. |
185
+ | `CardActionComponent` | `ui-card-action` | Optional slot for badges, links, or buttons in the header. |
186
+ | `CardContentComponent` | `ui-card-content` | Main body area. |
187
+ | `CardFooterComponent` | `ui-card-footer` | Bottom action row or secondary metadata. |
188
+
189
+ All card parts also accept a `class` input.
190
+
191
+ ## Styling and theming
192
+
193
+ The root card uses the shared theme tokens `border-border`, `bg-card`, and `text-card-foreground` plus `shadow-sm`.
194
+
195
+ Pass `class` to the root or any part to layer width, layout, spacing, media overflow, or custom action alignment without changing the primitive structure.
196
+
197
+ The `size` input is the primary spacing control. Switching to `sm` reduces header spacing, content/footer padding, and title/description typography together.
198
+
199
+ ## Accessibility
200
+
201
+ - Keep the card root non-interactive. Put clicks on native buttons or anchors inside the card.
202
+ - Label every form field inside `ui-card-content`.
203
+ - Provide meaningful alt text for media cards unless the image is purely decorative.
204
+ - Do not rely on the card border or shadow alone to communicate state.
205
+
206
+ ## Keyboard interactions
207
+
208
+ - The card primitives themselves are passive layout containers and do not enter the tab order.
209
+ - Buttons, anchors, and inputs projected into the card keep their native Tab, Enter, and Space behavior.
210
+ - `ui-card-action` does not alter focus order; it only positions header content visually.
211
+
212
+ ## Angular notes
213
+
214
+ - `size` is declared only on `ui-card` and cascades to descendant part spacing and typography.
215
+ - `ui-card-action` is the Angular equivalent of the current shadcn `CardAction` slot.
216
+ - The login and RTL examples compose `ButtonComponent`, `InputComponent`, and `LabelComponent` directly with the card primitives.
217
+
218
+ ## Source parity
219
+
220
+ This Angular implementation follows the current shadcn card docs, including `CardAction`, `size="sm"`, media cards, and the RTL login example, while translating the structure to Angular selectors and native controls.
@@ -0,0 +1,276 @@
1
+ # Carousel
2
+
3
+ A carousel with motion, drag gestures, keyboard navigation, and Embla-powered slide state.
4
+
5
+ Use Carousel for image galleries, card reels, onboarding panels, and compact item pickers where adjacent content should be discoverable without leaving the current view.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import {
11
+ CarouselComponent,
12
+ CarouselContentComponent,
13
+ CarouselItemComponent,
14
+ CarouselNextComponent,
15
+ CarouselPreviousComponent,
16
+ type CarouselApi,
17
+ type CarouselOptions,
18
+ } from '@edsis/ui/carousel';
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ Compose the carousel from a root, content track, items, and optional previous/next buttons.
24
+
25
+ ```html
26
+ <ui-carousel class="w-full max-w-xs">
27
+ <ui-carousel-content>
28
+ <ui-carousel-item>...</ui-carousel-item>
29
+ <ui-carousel-item>...</ui-carousel-item>
30
+ <ui-carousel-item>...</ui-carousel-item>
31
+ </ui-carousel-content>
32
+ <button ui-carousel-previous></button>
33
+ <button ui-carousel-next></button>
34
+ </ui-carousel>
35
+ ```
36
+
37
+ ## Composition
38
+
39
+ ```text
40
+ ui-carousel
41
+ ├── ui-carousel-content
42
+ │ ├── ui-carousel-item
43
+ │ └── ui-carousel-item
44
+ ├── button[ui-carousel-previous]
45
+ └── button[ui-carousel-next]
46
+ ```
47
+
48
+ ## Common patterns
49
+
50
+ ### Card slides
51
+
52
+ ```html
53
+ <ui-carousel class="mx-auto w-full max-w-xs">
54
+ <ui-carousel-content>
55
+ @for (slide of slides; track slide.id) {
56
+ <ui-carousel-item [ariaLabel]="slide.label">
57
+ <div class="p-1">
58
+ <ui-card>
59
+ <ui-card-content class="flex aspect-square items-center justify-center p-6">
60
+ <span class="text-4xl font-semibold">{{ slide.value }}</span>
61
+ </ui-card-content>
62
+ </ui-card>
63
+ </div>
64
+ </ui-carousel-item>
65
+ }
66
+ </ui-carousel-content>
67
+ <button ui-carousel-previous></button>
68
+ <button ui-carousel-next></button>
69
+ </ui-carousel>
70
+ ```
71
+
72
+ ### Sizes
73
+
74
+ Use basis utilities on each `ui-carousel-item` when multiple slides should be partially visible.
75
+
76
+ ```ts
77
+ readonly startOptions: CarouselOptions = { align: 'start' };
78
+ ```
79
+
80
+ ```html
81
+ <ui-carousel [opts]="startOptions" class="w-full max-w-sm">
82
+ <ui-carousel-content>
83
+ <ui-carousel-item class="basis-1/2 lg:basis-1/3">...</ui-carousel-item>
84
+ <ui-carousel-item class="basis-1/2 lg:basis-1/3">...</ui-carousel-item>
85
+ <ui-carousel-item class="basis-1/2 lg:basis-1/3">...</ui-carousel-item>
86
+ </ui-carousel-content>
87
+ </ui-carousel>
88
+ ```
89
+
90
+ ### Spacing
91
+
92
+ Match shadcn spacing by pairing a negative margin on `ui-carousel-content` with padding on `ui-carousel-item`.
93
+
94
+ ```html
95
+ <ui-carousel class="w-full max-w-sm">
96
+ <ui-carousel-content class="-ml-2 md:-ml-4">
97
+ <ui-carousel-item class="basis-1/2 pl-2 md:pl-4 lg:basis-1/3">...</ui-carousel-item>
98
+ <ui-carousel-item class="basis-1/2 pl-2 md:pl-4 lg:basis-1/3">...</ui-carousel-item>
99
+ <ui-carousel-item class="basis-1/2 pl-2 md:pl-4 lg:basis-1/3">...</ui-carousel-item>
100
+ </ui-carousel-content>
101
+ </ui-carousel>
102
+ ```
103
+
104
+ ### Vertical orientation
105
+
106
+ Set `orientation="vertical"` and give the content viewport a height so Embla can measure the track.
107
+
108
+ ```ts
109
+ readonly verticalOptions: CarouselOptions = { align: 'start' };
110
+ ```
111
+
112
+ ```html
113
+ <ui-carousel orientation="vertical" [opts]="verticalOptions" class="w-full max-w-xs">
114
+ <ui-carousel-content class="-mt-1 h-67.5">
115
+ <ui-carousel-item class="basis-1/2 pt-1">...</ui-carousel-item>
116
+ <ui-carousel-item class="basis-1/2 pt-1">...</ui-carousel-item>
117
+ <ui-carousel-item class="basis-1/2 pt-1">...</ui-carousel-item>
118
+ </ui-carousel-content>
119
+ </ui-carousel>
120
+ ```
121
+
122
+ ### Options
123
+
124
+ Pass Embla options through `[opts]`. Keep the object as a class property so Angular does not create a new object every change detection pass.
125
+
126
+ ```ts
127
+ readonly loopOptions: CarouselOptions = {
128
+ align: 'start',
129
+ loop: true,
130
+ };
131
+ ```
132
+
133
+ ```html
134
+ <ui-carousel [opts]="loopOptions">
135
+ <ui-carousel-content>
136
+ <ui-carousel-item>...</ui-carousel-item>
137
+ <ui-carousel-item>...</ui-carousel-item>
138
+ <ui-carousel-item>...</ui-carousel-item>
139
+ </ui-carousel-content>
140
+ </ui-carousel>
141
+ ```
142
+
143
+ ### API and events
144
+
145
+ The root component exposes `selectedIndex`, `slideCount`, `canScrollPrev`, and `canScrollNext` as signals. Use a template reference for simple status UI.
146
+
147
+ ```html
148
+ <ui-carousel #carouselRef class="w-full max-w-xs">
149
+ <ui-carousel-content>
150
+ <ui-carousel-item>...</ui-carousel-item>
151
+ <ui-carousel-item>...</ui-carousel-item>
152
+ <ui-carousel-item>...</ui-carousel-item>
153
+ </ui-carousel-content>
154
+ </ui-carousel>
155
+
156
+ <p>Slide {{ carouselRef.selectedIndex() + 1 }} of {{ carouselRef.slideCount() }}</p>
157
+ ```
158
+
159
+ Use `(apiReady)` when you need the lower-level Embla API.
160
+
161
+ ```ts
162
+ connectCarousel(api: CarouselApi): void {
163
+ api.on('select', () => {
164
+ this.currentSlide.set(api.selectedScrollSnap() + 1);
165
+ });
166
+ }
167
+ ```
168
+
169
+ ```html
170
+ <ui-carousel (apiReady)="connectCarousel($event)"> ... </ui-carousel>
171
+ ```
172
+
173
+ ### Plugins
174
+
175
+ Optional Embla plugins are passed through `[plugins]`. Install plugin packages separately.
176
+
177
+ ```ts
178
+ import Autoplay from 'embla-carousel-autoplay';
179
+
180
+ readonly plugins = [Autoplay({ delay: 2000 })];
181
+ ```
182
+
183
+ ```html
184
+ <ui-carousel [plugins]="plugins">
185
+ <ui-carousel-content>
186
+ <ui-carousel-item>...</ui-carousel-item>
187
+ </ui-carousel-content>
188
+ </ui-carousel>
189
+ ```
190
+
191
+ ### RTL
192
+
193
+ Set both `dir="rtl"` and `opts.direction` so layout direction and Embla motion agree.
194
+
195
+ ```ts
196
+ readonly rtlOptions: CarouselOptions = { direction: 'rtl' };
197
+ ```
198
+
199
+ ```html
200
+ <section dir="rtl">
201
+ <ui-carousel dir="rtl" [opts]="rtlOptions" class="w-full max-w-xs">
202
+ <ui-carousel-content>
203
+ <ui-carousel-item>...</ui-carousel-item>
204
+ <ui-carousel-item>...</ui-carousel-item>
205
+ <ui-carousel-item>...</ui-carousel-item>
206
+ </ui-carousel-content>
207
+ <button ui-carousel-previous class="rtl:rotate-180"></button>
208
+ <button ui-carousel-next class="rtl:rotate-180"></button>
209
+ </ui-carousel>
210
+ </section>
211
+ ```
212
+
213
+ ## API reference
214
+
215
+ ### `CarouselComponent`
216
+
217
+ | Input or output | Type | Default |
218
+ | --------------- | ---------------------------- | ---------------------------------------------- |
219
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` |
220
+ | `opts` | `CarouselOptions` | `{}` |
221
+ | `plugins` | `readonly CarouselPlugin[]` | `[]` |
222
+ | `keyboard` | `boolean` | `true` |
223
+ | `label` | `string` | `'Carousel'` |
224
+ | `class` | `string` | `''` |
225
+ | `apiReady` | `CarouselApi` output | emitted after Embla initializes |
226
+ | `apiChange` | `CarouselApi \| null` output | emitted when Embla initializes or is destroyed |
227
+
228
+ ### Root signals
229
+
230
+ | Signal | Type |
231
+ | --------------- | ----------------- |
232
+ | `selectedIndex` | `Signal<number>` |
233
+ | `slideCount` | `Signal<number>` |
234
+ | `canScrollPrev` | `Signal<boolean>` |
235
+ | `canScrollNext` | `Signal<boolean>` |
236
+
237
+ ### Parts
238
+
239
+ | Part | Inputs |
240
+ | ------------------------------ | -------------------- |
241
+ | `ui-carousel-content` | `class` |
242
+ | `ui-carousel-item` | `ariaLabel`, `class` |
243
+ | `button[ui-carousel-previous]` | `label`, `class` |
244
+ | `button[ui-carousel-next]` | `label`, `class` |
245
+
246
+ ## Styling and theming
247
+
248
+ The primitive follows the shadcn layout recipe: root is `relative`, content owns the overflow-hidden viewport, and items are `basis-full` by default. Pass `class` to tune width, item basis, spacing, and control placement.
249
+
250
+ Use theme-aware classes such as `border-border`, `bg-card`, `text-foreground`, `bg-background`, `hover:bg-accent`, and `focus-visible:ring-ring` for custom slide and control styling.
251
+
252
+ ## Accessibility
253
+
254
+ - The root renders as a labelled `region` with `aria-roledescription="carousel"`.
255
+ - Previous and next controls are native buttons with descriptive labels and disabled states.
256
+ - Each item renders as a `group` with `aria-roledescription="slide"`; pass `ariaLabel` when the slide needs an explicit spoken label.
257
+ - Keep interactive controls inside slides reachable by normal tab order and avoid hiding focus outlines.
258
+
259
+ ## Keyboard interactions
260
+
261
+ - The root is focusable when `keyboard` is `true`.
262
+ - Horizontal carousels use ArrowLeft and ArrowRight to move between slides.
263
+ - Vertical carousels use ArrowUp and ArrowDown to move between slides.
264
+ - Home moves to the first slide and End moves to the last slide.
265
+ - Previous and next buttons also support native Enter and Space activation.
266
+
267
+ ## Angular notes
268
+
269
+ - This implementation uses vanilla Embla Carousel rather than `embla-carousel-react`.
270
+ - Embla initializes only in the browser, so server rendering can produce the static slide markup without touching the DOM API.
271
+ - `orientation` controls Embla axis; if `opts.axis` is provided, the Angular `orientation` input wins.
272
+ - Define `opts` and `plugins` as class properties to avoid unnecessary Embla reinitialization.
273
+
274
+ ## Source parity
275
+
276
+ This Angular implementation follows the shadcn Carousel anatomy, options, API, events, plugins, and RTL guidance while translating React props into Angular inputs, outputs, signals, and standalone component imports.