@ojiepermana/angular-component 22.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/README.md +82 -0
  2. package/accordion/README.md +193 -0
  3. package/alert/README.md +180 -0
  4. package/alert-dialog/README.md +239 -0
  5. package/aspect-ratio/README.md +112 -0
  6. package/avatar/README.md +176 -0
  7. package/badge/README.md +133 -0
  8. package/breadcrumb/README.md +216 -0
  9. package/button/README.md +139 -0
  10. package/button-group/README.md +208 -0
  11. package/calendar/README.md +135 -0
  12. package/card/README.md +220 -0
  13. package/carousel/README.md +276 -0
  14. package/checkbox/README.md +149 -0
  15. package/collapsible/README.md +195 -0
  16. package/combobox/README.md +198 -0
  17. package/command/README.md +275 -0
  18. package/composer/README.md +235 -0
  19. package/context-menu/README.md +267 -0
  20. package/date-picker/README.md +179 -0
  21. package/dialog/README.md +235 -0
  22. package/drawer/README.md +145 -0
  23. package/dropdown-menu/README.md +311 -0
  24. package/editor/README.md +136 -0
  25. package/empty/README.md +183 -0
  26. package/fesm2022/ojiepermana-angular-component-accordion.mjs +186 -0
  27. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -0
  28. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +276 -0
  29. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -0
  30. package/fesm2022/ojiepermana-angular-component-alert.mjs +99 -0
  31. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -0
  32. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +37 -0
  33. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -0
  34. package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -0
  35. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -0
  36. package/fesm2022/ojiepermana-angular-component-badge.mjs +50 -0
  37. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -0
  38. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +200 -0
  39. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -0
  40. package/fesm2022/ojiepermana-angular-component-button-group.mjs +103 -0
  41. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -0
  42. package/fesm2022/ojiepermana-angular-component-button.mjs +68 -0
  43. package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -0
  44. package/fesm2022/ojiepermana-angular-component-calendar.mjs +103 -0
  45. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -0
  46. package/fesm2022/ojiepermana-angular-component-card.mjs +152 -0
  47. package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -0
  48. package/fesm2022/ojiepermana-angular-component-carousel.mjs +334 -0
  49. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -0
  50. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +165 -0
  51. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -0
  52. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +121 -0
  53. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -0
  54. package/fesm2022/ojiepermana-angular-component-combobox.mjs +274 -0
  55. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -0
  56. package/fesm2022/ojiepermana-angular-component-command.mjs +297 -0
  57. package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -0
  58. package/fesm2022/ojiepermana-angular-component-composer.mjs +352 -0
  59. package/fesm2022/ojiepermana-angular-component-composer.mjs.map +1 -0
  60. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +108 -0
  61. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -0
  62. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +186 -0
  63. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -0
  64. package/fesm2022/ojiepermana-angular-component-dialog.mjs +283 -0
  65. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -0
  66. package/fesm2022/ojiepermana-angular-component-drawer.mjs +6 -0
  67. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -0
  68. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +494 -0
  69. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -0
  70. package/fesm2022/ojiepermana-angular-component-editor.mjs +680 -0
  71. package/fesm2022/ojiepermana-angular-component-editor.mjs.map +1 -0
  72. package/fesm2022/ojiepermana-angular-component-empty.mjs +145 -0
  73. package/fesm2022/ojiepermana-angular-component-empty.mjs.map +1 -0
  74. package/fesm2022/ojiepermana-angular-component-form.mjs +364 -0
  75. package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -0
  76. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +275 -0
  77. package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +1 -0
  78. package/fesm2022/ojiepermana-angular-component-icon.mjs +86 -0
  79. package/fesm2022/ojiepermana-angular-component-icon.mjs.map +1 -0
  80. package/fesm2022/ojiepermana-angular-component-input-group.mjs +179 -0
  81. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -0
  82. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +517 -0
  83. package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +1 -0
  84. package/fesm2022/ojiepermana-angular-component-input.mjs +45 -0
  85. package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -0
  86. package/fesm2022/ojiepermana-angular-component-item.mjs +264 -0
  87. package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -0
  88. package/fesm2022/ojiepermana-angular-component-kanban.mjs +314 -0
  89. package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +1 -0
  90. package/fesm2022/ojiepermana-angular-component-kbd.mjs +55 -0
  91. package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +1 -0
  92. package/fesm2022/ojiepermana-angular-component-label.mjs +33 -0
  93. package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -0
  94. package/fesm2022/ojiepermana-angular-component-menubar.mjs +311 -0
  95. package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +1 -0
  96. package/fesm2022/ojiepermana-angular-component-native-select.mjs +67 -0
  97. package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +1 -0
  98. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +408 -0
  99. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +1 -0
  100. package/fesm2022/ojiepermana-angular-component-pagination.mjs +226 -0
  101. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -0
  102. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +810 -0
  103. package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +1 -0
  104. package/fesm2022/ojiepermana-angular-component-popover.mjs +145 -0
  105. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -0
  106. package/fesm2022/ojiepermana-angular-component-progress.mjs +60 -0
  107. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -0
  108. package/fesm2022/ojiepermana-angular-component-radio.mjs +173 -0
  109. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -0
  110. package/fesm2022/ojiepermana-angular-component-resizable.mjs +478 -0
  111. package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +1 -0
  112. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +54 -0
  113. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -0
  114. package/fesm2022/ojiepermana-angular-component-select.mjs +297 -0
  115. package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -0
  116. package/fesm2022/ojiepermana-angular-component-separator.mjs +37 -0
  117. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -0
  118. package/fesm2022/ojiepermana-angular-component-sheet.mjs +297 -0
  119. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -0
  120. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +31 -0
  121. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -0
  122. package/fesm2022/ojiepermana-angular-component-slider.mjs +423 -0
  123. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -0
  124. package/fesm2022/ojiepermana-angular-component-spinner.mjs +60 -0
  125. package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +1 -0
  126. package/fesm2022/ojiepermana-angular-component-switch.mjs +140 -0
  127. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -0
  128. package/fesm2022/ojiepermana-angular-component-table.mjs +155 -0
  129. package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -0
  130. package/fesm2022/ojiepermana-angular-component-tabs.mjs +271 -0
  131. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -0
  132. package/fesm2022/ojiepermana-angular-component-textarea.mjs +39 -0
  133. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -0
  134. package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -0
  135. package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +1 -0
  136. package/fesm2022/ojiepermana-angular-component-toast.mjs +161 -0
  137. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -0
  138. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +289 -0
  139. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +1 -0
  140. package/fesm2022/ojiepermana-angular-component-toggle.mjs +82 -0
  141. package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +1 -0
  142. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +410 -0
  143. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -0
  144. package/fesm2022/ojiepermana-angular-component-utils.mjs +81 -0
  145. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -0
  146. package/fesm2022/ojiepermana-angular-component.mjs +11 -0
  147. package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
  148. package/form/README.md +210 -0
  149. package/hover-card/README.md +142 -0
  150. package/icon/README.md +25 -0
  151. package/input/README.md +159 -0
  152. package/input-group/README.md +237 -0
  153. package/input-otp/README.md +278 -0
  154. package/item/README.md +247 -0
  155. package/kanban/README.md +81 -0
  156. package/kbd/README.md +139 -0
  157. package/label/README.md +135 -0
  158. package/menubar/README.md +269 -0
  159. package/native-select/README.md +176 -0
  160. package/navigation-menu/README.md +160 -0
  161. package/package.json +291 -0
  162. package/pagination/README.md +144 -0
  163. package/pillbox/README.md +67 -0
  164. package/popover/README.md +43 -0
  165. package/progress/README.md +160 -0
  166. package/radio/README.md +209 -0
  167. package/resizable/README.md +168 -0
  168. package/scroll-area/README.md +143 -0
  169. package/select/README.md +174 -0
  170. package/separator/README.md +170 -0
  171. package/sheet/README.md +183 -0
  172. package/skeleton/README.md +158 -0
  173. package/slider/README.md +207 -0
  174. package/spinner/README.md +160 -0
  175. package/switch/README.md +166 -0
  176. package/table/README.md +291 -0
  177. package/tabs/README.md +214 -0
  178. package/textarea/README.md +153 -0
  179. package/timeline/README.md +94 -0
  180. package/toast/README.md +321 -0
  181. package/toggle/README.md +131 -0
  182. package/toggle-group/README.md +206 -0
  183. package/tooltip/README.md +207 -0
  184. package/types/ojiepermana-angular-component-accordion.d.ts +51 -0
  185. package/types/ojiepermana-angular-component-alert-dialog.d.ts +93 -0
  186. package/types/ojiepermana-angular-component-alert.d.ts +37 -0
  187. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -0
  188. package/types/ojiepermana-angular-component-avatar.d.ts +51 -0
  189. package/types/ojiepermana-angular-component-badge.d.ts +19 -0
  190. package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -0
  191. package/types/ojiepermana-angular-component-button-group.d.ts +26 -0
  192. package/types/ojiepermana-angular-component-button.d.ts +22 -0
  193. package/types/ojiepermana-angular-component-calendar.d.ts +39 -0
  194. package/types/ojiepermana-angular-component-card.d.ts +60 -0
  195. package/types/ojiepermana-angular-component-carousel.d.ts +86 -0
  196. package/types/ojiepermana-angular-component-checkbox.d.ts +42 -0
  197. package/types/ojiepermana-angular-component-collapsible.d.ts +42 -0
  198. package/types/ojiepermana-angular-component-combobox.d.ts +53 -0
  199. package/types/ojiepermana-angular-component-command.d.ts +102 -0
  200. package/types/ojiepermana-angular-component-composer.d.ts +90 -0
  201. package/types/ojiepermana-angular-component-context-menu.d.ts +36 -0
  202. package/types/ojiepermana-angular-component-date-picker.d.ts +48 -0
  203. package/types/ojiepermana-angular-component-dialog.d.ts +87 -0
  204. package/types/ojiepermana-angular-component-drawer.d.ts +1 -0
  205. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +140 -0
  206. package/types/ojiepermana-angular-component-editor.d.ts +126 -0
  207. package/types/ojiepermana-angular-component-empty.d.ts +50 -0
  208. package/types/ojiepermana-angular-component-form.d.ts +140 -0
  209. package/types/ojiepermana-angular-component-hover-card.d.ts +75 -0
  210. package/types/ojiepermana-angular-component-icon.d.ts +31 -0
  211. package/types/ojiepermana-angular-component-input-group.d.ts +51 -0
  212. package/types/ojiepermana-angular-component-input-otp.d.ts +142 -0
  213. package/types/ojiepermana-angular-component-input.d.ts +16 -0
  214. package/types/ojiepermana-angular-component-item.d.ts +88 -0
  215. package/types/ojiepermana-angular-component-kanban.d.ts +70 -0
  216. package/types/ojiepermana-angular-component-kbd.d.ts +16 -0
  217. package/types/ojiepermana-angular-component-label.d.ts +11 -0
  218. package/types/ojiepermana-angular-component-menubar.d.ts +69 -0
  219. package/types/ojiepermana-angular-component-native-select.d.ts +26 -0
  220. package/types/ojiepermana-angular-component-navigation-menu.d.ts +98 -0
  221. package/types/ojiepermana-angular-component-pagination.d.ts +33 -0
  222. package/types/ojiepermana-angular-component-pillbox.d.ts +156 -0
  223. package/types/ojiepermana-angular-component-popover.d.ts +50 -0
  224. package/types/ojiepermana-angular-component-progress.d.ts +17 -0
  225. package/types/ojiepermana-angular-component-radio.d.ts +57 -0
  226. package/types/ojiepermana-angular-component-resizable.d.ts +99 -0
  227. package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -0
  228. package/types/ojiepermana-angular-component-select.d.ts +56 -0
  229. package/types/ojiepermana-angular-component-separator.d.ts +14 -0
  230. package/types/ojiepermana-angular-component-sheet.d.ts +78 -0
  231. package/types/ojiepermana-angular-component-skeleton.d.ts +10 -0
  232. package/types/ojiepermana-angular-component-slider.d.ts +74 -0
  233. package/types/ojiepermana-angular-component-spinner.d.ts +13 -0
  234. package/types/ojiepermana-angular-component-switch.d.ts +44 -0
  235. package/types/ojiepermana-angular-component-table.d.ts +52 -0
  236. package/types/ojiepermana-angular-component-tabs.d.ts +92 -0
  237. package/types/ojiepermana-angular-component-textarea.d.ts +12 -0
  238. package/types/ojiepermana-angular-component-timeline.d.ts +63 -0
  239. package/types/ojiepermana-angular-component-toast.d.ts +51 -0
  240. package/types/ojiepermana-angular-component-toggle-group.d.ts +89 -0
  241. package/types/ojiepermana-angular-component-toggle.d.ts +25 -0
  242. package/types/ojiepermana-angular-component-tooltip.d.ts +101 -0
  243. package/types/ojiepermana-angular-component-utils.d.ts +30 -0
  244. package/types/ojiepermana-angular-component.d.ts +2 -0
@@ -0,0 +1,136 @@
1
+ # Editor
2
+
3
+ Rich text editor shell with an accessible toolbar, configurable toolbar items, contenteditable form control support, and shadcn-style tokens.
4
+
5
+ This component is conceptually inspired by Flux Editor. It does not bundle Tiptap or Flux JavaScript; instead, it provides a lightweight Angular primitive that applications can compose, bind, and extend.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import { FormsModule } from '@angular/forms';
11
+ import {
12
+ EditorButtonComponent,
13
+ EditorComponent,
14
+ EditorContentComponent,
15
+ EditorSeparatorComponent,
16
+ EditorSpacerComponent,
17
+ EditorToolbarComponent,
18
+ } from '@ojiepermana/angular-component/editor';
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```html
24
+ <Editor>
25
+ <EditorToolbar items="heading | bold italic underline | align ~ undo redo" />
26
+ <EditorContent placeholder="Write something..." aria-label="Article body">
27
+ <h3>What's changed</h3>
28
+ <p>Draft release notes, article copy, or support responses here.</p>
29
+ </EditorContent>
30
+ </Editor>
31
+ ```
32
+
33
+ ## Forms
34
+
35
+ `EditorContent` implements `ControlValueAccessor`, so it can bind to Angular forms as an HTML string.
36
+
37
+ ```html
38
+ <Editor>
39
+ <EditorToolbar />
40
+ <EditorContent [(ngModel)]="content" name="content" aria-label="Article body" />
41
+ </Editor>
42
+ ```
43
+
44
+ Sanitize persisted HTML at the application boundary before rendering it elsewhere.
45
+
46
+ ## Toolbar Items
47
+
48
+ The toolbar accepts a space-separated `items` string. Use `|` for a separator and `~` for a spacer.
49
+
50
+ ```html
51
+ <EditorToolbar items="heading | bold italic strike underline | bullet ordered blockquote link align ~ undo redo" />
52
+ ```
53
+
54
+ Supported item names:
55
+
56
+ | Item | Behavior |
57
+ | ------------- | ---------------------------------------------------- |
58
+ | `heading` | Text, heading 1, heading 2, and heading 3 selector. |
59
+ | `bold` | Bold formatting. |
60
+ | `italic` | Italic formatting. |
61
+ | `strike` | Strikethrough formatting. |
62
+ | `underline` | Underline formatting. |
63
+ | `bullet` | Bulleted list. |
64
+ | `ordered` | Numbered list. |
65
+ | `blockquote` | Block quote block. |
66
+ | `subscript` | Subscript formatting. |
67
+ | `superscript` | Superscript formatting. |
68
+ | `highlight` | Highlight selected text. |
69
+ | `link` | Create a placeholder link for the current selection. |
70
+ | `code` | Code block. |
71
+ | `align` | Left, center, and right alignment selector. |
72
+ | `undo` | Undo last edit. |
73
+ | `redo` | Redo last edit. |
74
+
75
+ ## Custom Toolbar
76
+
77
+ Pass `items=""` and project custom toolbar controls.
78
+
79
+ ```html
80
+ <Editor>
81
+ <EditorToolbar items="">
82
+ <button EditorButton command="bold" aria-label="Bold">B</button>
83
+ <button EditorButton command="italic" aria-label="Italic">I</button>
84
+ <EditorSeparator />
85
+ <button EditorButton command="highlight" aria-label="Highlight">H</button>
86
+ <EditorSpacer />
87
+ <button EditorButton command="undo" aria-label="Undo">
88
+ <svg
89
+ aria-hidden="true"
90
+ class="size-4"
91
+ viewBox="0 0 24 24"
92
+ fill="none"
93
+ stroke="currentColor"
94
+ stroke-width="1.75"
95
+ stroke-linecap="round"
96
+ stroke-linejoin="round">
97
+ <path d="M9 14 4 9l5-5" />
98
+ <path d="M4 9h10a6 6 0 0 1 0 12h-2" />
99
+ </svg>
100
+ </button>
101
+ </EditorToolbar>
102
+ <EditorContent aria-label="Custom editor" />
103
+ </Editor>
104
+ ```
105
+
106
+ ## Keyboard Shortcuts
107
+
108
+ | Action | Shortcut |
109
+ | ------------- | ----------------- |
110
+ | Bold | Cmd/Ctrl+B |
111
+ | Italic | Cmd/Ctrl+I |
112
+ | Underline | Cmd/Ctrl+U |
113
+ | Strikethrough | Cmd/Ctrl+Shift+X |
114
+ | Ordered list | Cmd/Ctrl+Shift+7 |
115
+ | Bulleted list | Cmd/Ctrl+Shift+8 |
116
+ | Heading 1-3 | Cmd/Ctrl+Alt+1..3 |
117
+ | Undo | Cmd/Ctrl+Z |
118
+ | Redo | Cmd/Ctrl+Shift+Z |
119
+
120
+ ## Styling
121
+
122
+ The editor uses `border-input`, `bg-background`, `ring-ring`, `text-foreground`, `text-muted-foreground`, and `bg-muted` tokens. Pass sizing classes directly to the content slot when adjusting height.
123
+
124
+ ```html
125
+ <Editor>
126
+ <EditorToolbar />
127
+ <EditorContent class="min-h-30 max-h-60" aria-label="Compact editor" />
128
+ </Editor>
129
+ ```
130
+
131
+ ## Accessibility
132
+
133
+ - `EditorToolbar` renders `role="toolbar"`.
134
+ - `EditorContent` renders `role="textbox"` and `aria-multiline="true"`.
135
+ - Provide a clear `aria-label` for each editor content surface.
136
+ - Give terse or icon-only custom toolbar buttons an explicit `aria-label`.
@@ -0,0 +1,183 @@
1
+ # Empty
2
+
3
+ Displays a reusable empty state with header, media, title, description, and content slots.
4
+
5
+ Use Empty for onboarding gaps, no-results screens, no-notification panels, and 404-like recovery surfaces that need a clear next action.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import {
11
+ EmptyComponent,
12
+ EmptyContentComponent,
13
+ EmptyDescriptionComponent,
14
+ EmptyHeaderComponent,
15
+ EmptyMediaComponent,
16
+ EmptyTitleComponent,
17
+ } from '@ojiepermana/angular-component/empty';
18
+ import { ButtonComponent } from '@ojiepermana/angular-component/button';
19
+ ```
20
+
21
+ ## Composition
22
+
23
+ The Angular structure follows the shadcn Empty information architecture while keeping actions on native buttons and anchors.
24
+
25
+ ```text
26
+ Empty
27
+ ├── EmptyHeader
28
+ │ ├── EmptyMedia
29
+ │ ├── EmptyTitle
30
+ │ └── EmptyDescription
31
+ └── EmptyContent
32
+ ```
33
+
34
+ ## Basic usage
35
+
36
+ ```html
37
+ <Empty class="max-w-xl rounded-2xl border border-border bg-card/40">
38
+ <EmptyHeader>
39
+ <EmptyMedia variant="icon">
40
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
41
+ <path d="M12 6v12" />
42
+ <path d="M6 12h12" />
43
+ </svg>
44
+ </EmptyMedia>
45
+ <EmptyTitle>No projects yet</EmptyTitle>
46
+ <EmptyDescription>
47
+ You have not created any projects yet. Start by creating a new project or importing an existing one.
48
+ </EmptyDescription>
49
+ </EmptyHeader>
50
+
51
+ <EmptyContent class="sm:flex-row">
52
+ <button Button type="button">Create project</button>
53
+ <button Button type="button" variant="outline">Import project</button>
54
+ </EmptyContent>
55
+
56
+ <a Button href="/docs/getting-started" variant="link" class="text-muted-foreground">Learn more</a>
57
+ </Empty>
58
+ ```
59
+
60
+ ## Common patterns
61
+
62
+ ### Outline shell
63
+
64
+ Use border utilities on the root when the empty state should read like an inset card or dashboard panel.
65
+
66
+ ```html
67
+ <Empty class="rounded-2xl border border-dashed border-border">
68
+ <EmptyHeader>
69
+ <EmptyMedia variant="icon">...</EmptyMedia>
70
+ <EmptyTitle>Cloud storage empty</EmptyTitle>
71
+ <EmptyDescription>Upload files to your cloud storage to access them anywhere.</EmptyDescription>
72
+ </EmptyHeader>
73
+ <EmptyContent>
74
+ <button Button type="button" variant="outline" size="sm">Upload files</button>
75
+ </EmptyContent>
76
+ </Empty>
77
+ ```
78
+
79
+ ### Avatar media
80
+
81
+ Leave `EmptyMedia` on the default variant when projecting an avatar, avatar group, or any other custom artwork.
82
+
83
+ ```html
84
+ <Empty>
85
+ <EmptyHeader>
86
+ <EmptyMedia>
87
+ <Avatar class="size-12">
88
+ <AvatarImage src="https://github.com/shadcn.png" alt="shadcn" />
89
+ <AvatarFallback>CN</AvatarFallback>
90
+ </Avatar>
91
+ </EmptyMedia>
92
+ <EmptyTitle>User offline</EmptyTitle>
93
+ <EmptyDescription>Leave a message and they will be notified when they come back online.</EmptyDescription>
94
+ </EmptyHeader>
95
+ <EmptyContent>
96
+ <button Button type="button" size="sm">Leave message</button>
97
+ </EmptyContent>
98
+ </Empty>
99
+ ```
100
+
101
+ ### Input group recovery
102
+
103
+ Compose `EmptyContent` with the existing input-group primitives when the empty state should immediately guide recovery or search.
104
+
105
+ ```html
106
+ <Empty class="max-w-xl rounded-2xl border border-border">
107
+ <EmptyHeader>
108
+ <EmptyTitle>404 - Not found</EmptyTitle>
109
+ <EmptyDescription>
110
+ The page you are looking for does not exist. Try searching for what you need below.
111
+ </EmptyDescription>
112
+ </EmptyHeader>
113
+ <EmptyContent class="max-w-md">
114
+ <InputGroup class="w-full">
115
+ <input InputGroupInput aria-label="Search pages" placeholder="Try searching for pages..." />
116
+ <InputGroupAddon>
117
+ <span aria-hidden="true">⌕</span>
118
+ </InputGroupAddon>
119
+ <InputGroupAddon align="inline-end">
120
+ <span
121
+ aria-hidden="true"
122
+ class="inline-flex h-6 items-center rounded-md border border-border bg-background px-2 font-mono text-[11px] font-medium text-foreground shadow-sm">
123
+ /
124
+ </span>
125
+ </InputGroupAddon>
126
+ </InputGroup>
127
+ </EmptyContent>
128
+ </Empty>
129
+ ```
130
+
131
+ ## API reference
132
+
133
+ ### `EmptyComponent`
134
+
135
+ | Input | Type | Default |
136
+ | ------- | -------- | ------- |
137
+ | `class` | `string` | `''` |
138
+
139
+ ### `EmptyMediaComponent`
140
+
141
+ | Input | Type | Default |
142
+ | --------- | --------------------- | ----------- |
143
+ | `variant` | `'default' \| 'icon'` | `'default'` |
144
+ | `class` | `string` | `''` |
145
+
146
+ ### Parts
147
+
148
+ - `EmptyHeader` centers the media, title, and description stack.
149
+ - `EmptyTitle` provides the primary heading.
150
+ - `EmptyDescription` renders supporting copy with muted foreground color.
151
+ - `EmptyContent` groups actions, inputs, or recovery affordances under the header.
152
+
153
+ All Empty parts also accept a `class` input.
154
+
155
+ ## Styling and theming
156
+
157
+ The primitive keeps styling neutral by default: the root controls spacing and alignment, while visual shells such as borders, gradients, and muted backgrounds are layered through `class`.
158
+
159
+ `EmptyMedia` uses `border-border` and `bg-muted/40` for the icon variant so the icon chip matches the rest of the theme without inheriting text color for borders.
160
+
161
+ Use `class` on the root or parts to add panel borders, gradient backgrounds, tighter widths, or horizontal action layouts.
162
+
163
+ ## Accessibility
164
+
165
+ - Keep the title and description visible so the empty state communicates both the missing content and the next step.
166
+ - Put actions on native `<button>` or `<a Button>` hosts instead of faking interactivity with generic elements.
167
+ - Mark decorative icons inside `EmptyMedia` as `aria-hidden="true"` unless the icon itself provides unique meaning.
168
+
169
+ ## Keyboard interactions
170
+
171
+ - The Empty primitives themselves are passive layout containers and do not enter the tab order.
172
+ - Projected buttons, anchors, and inputs keep their native Tab, Enter, and Space behavior.
173
+ - When `EmptyContent` contains an input group, the control remains first in the DOM so tab order stays predictable.
174
+
175
+ ## Angular notes
176
+
177
+ - `Empty` is a reusable content primitive, separate from application route-shell layout concerns.
178
+ - The link action from the upstream shadcn preview maps cleanly to `<a Button variant="link">` in Angular.
179
+ - Project any custom artwork into `EmptyMedia`; only the `icon` variant applies a circular icon shell.
180
+
181
+ ## Source parity
182
+
183
+ This Angular implementation follows the shadcn Empty page structure, examples, and API reference while translating React composition to Angular selectors and keeping page-shell layout concerns separate from the reusable empty-state primitive.
@@ -0,0 +1,186 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, input, model, computed, forwardRef, ChangeDetectionStrategy, Component, inject } from '@angular/core';
3
+ import { cn, uniqueId } from '@ojiepermana/angular-component/utils';
4
+
5
+ class AccordionContextBase {
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
7
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: AccordionContextBase, isStandalone: true, ngImport: i0 });
8
+ }
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionContextBase, decorators: [{
10
+ type: Directive
11
+ }] });
12
+ class AccordionComponent extends AccordionContextBase {
13
+ type = input('single', /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
15
+ collapsible = input(true, /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "collapsible" }] : /* istanbul ignore next */ []));
17
+ value = model(null, /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
19
+ class = input('', /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
21
+ classes = computed(() => cn('block', this.class()), /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
23
+ openSet = computed(() => {
24
+ const v = this.value();
25
+ if (v == null)
26
+ return new Set();
27
+ return new Set(Array.isArray(v) ? v : [v]);
28
+ }, /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "openSet" }] : /* istanbul ignore next */ []));
30
+ isOpen(value) {
31
+ return this.openSet().has(value);
32
+ }
33
+ toggle(value) {
34
+ const isMulti = this.type() === 'multiple';
35
+ const current = this.openSet();
36
+ const open = current.has(value);
37
+ if (isMulti) {
38
+ const next = new Set(current);
39
+ open ? next.delete(value) : next.add(value);
40
+ this.value.set([...next]);
41
+ }
42
+ else {
43
+ if (open) {
44
+ if (this.collapsible())
45
+ this.value.set(null);
46
+ }
47
+ else {
48
+ this.value.set(value);
49
+ }
50
+ }
51
+ }
52
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
53
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: AccordionComponent, isStandalone: true, selector: "Accordion", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: AccordionContextBase, useExisting: forwardRef(() => AccordionComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
54
+ }
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionComponent, decorators: [{
56
+ type: Component,
57
+ args: [{
58
+ selector: 'Accordion',
59
+ changeDetection: ChangeDetectionStrategy.OnPush,
60
+ providers: [{ provide: AccordionContextBase, useExisting: forwardRef(() => AccordionComponent) }],
61
+ host: { '[class]': 'classes()' },
62
+ template: `<ng-content />`,
63
+ }]
64
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
65
+ class AccordionItemComponent {
66
+ ctx = inject(AccordionContextBase);
67
+ value = input.required(/* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
69
+ disabled = input(false, /* @ts-ignore */
70
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
71
+ class = input('', /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
73
+ triggerId = uniqueId('AccordionTrigger');
74
+ contentId = uniqueId('AccordionContent');
75
+ classes = computed(() => cn('block border-b border-border', this.class()), /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
77
+ open = computed(() => this.ctx.isOpen(this.value()), /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
79
+ toggle() {
80
+ if (!this.disabled())
81
+ this.ctx.toggle(this.value());
82
+ }
83
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
84
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: AccordionItemComponent, isStandalone: true, selector: "AccordionItem", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-state": "open() ? \"open\" : \"closed\"", "attr.data-disabled": "disabled() ? \"\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
85
+ }
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionItemComponent, decorators: [{
87
+ type: Component,
88
+ args: [{
89
+ selector: 'AccordionItem',
90
+ changeDetection: ChangeDetectionStrategy.OnPush,
91
+ host: {
92
+ '[class]': 'classes()',
93
+ '[attr.data-state]': 'open() ? "open" : "closed"',
94
+ '[attr.data-disabled]': 'disabled() ? "" : null',
95
+ },
96
+ template: `<ng-content />`,
97
+ }]
98
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
99
+ class AccordionTriggerComponent {
100
+ item = inject(AccordionItemComponent);
101
+ class = input('', /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
103
+ classes = computed(() => cn('flex flex-1 w-full items-center justify-between py-4 text-sm font-medium', 'transition-all hover:underline', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50', this.class()), /* @ts-ignore */
104
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
105
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
106
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: AccordionTriggerComponent, isStandalone: true, selector: "button[AccordionTrigger]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "item.toggle()" }, properties: { "class": "classes()", "attr.id": "item.triggerId", "attr.aria-controls": "item.contentId", "attr.aria-expanded": "item.open()", "attr.data-state": "item.open() ? \"open\" : \"closed\"", "disabled": "item.disabled() || null" } }, ngImport: i0, template: `
107
+ <ng-content />
108
+ <svg
109
+ aria-hidden="true"
110
+ class="h-4 w-4 shrink-0 transition-transform duration-200"
111
+ [class.rotate-180]="item.open()"
112
+ viewBox="0 0 24 24"
113
+ fill="none"
114
+ stroke="currentColor"
115
+ stroke-width="2"
116
+ stroke-linecap="round"
117
+ stroke-linejoin="round">
118
+ <polyline points="6 9 12 15 18 9" />
119
+ </svg>
120
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
+ }
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionTriggerComponent, decorators: [{
123
+ type: Component,
124
+ args: [{
125
+ selector: 'button[AccordionTrigger]',
126
+ changeDetection: ChangeDetectionStrategy.OnPush,
127
+ host: {
128
+ '[class]': 'classes()',
129
+ type: 'button',
130
+ '[attr.id]': 'item.triggerId',
131
+ '[attr.aria-controls]': 'item.contentId',
132
+ '[attr.aria-expanded]': 'item.open()',
133
+ '[attr.data-state]': 'item.open() ? "open" : "closed"',
134
+ '[disabled]': 'item.disabled() || null',
135
+ '(click)': 'item.toggle()',
136
+ },
137
+ template: `
138
+ <ng-content />
139
+ <svg
140
+ aria-hidden="true"
141
+ class="h-4 w-4 shrink-0 transition-transform duration-200"
142
+ [class.rotate-180]="item.open()"
143
+ viewBox="0 0 24 24"
144
+ fill="none"
145
+ stroke="currentColor"
146
+ stroke-width="2"
147
+ stroke-linecap="round"
148
+ stroke-linejoin="round">
149
+ <polyline points="6 9 12 15 18 9" />
150
+ </svg>
151
+ `,
152
+ }]
153
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
154
+ class AccordionContentComponent {
155
+ item = inject(AccordionItemComponent);
156
+ class = input('', /* @ts-ignore */
157
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
158
+ classes = computed(() => cn('block overflow-hidden text-sm', this.class()), /* @ts-ignore */
159
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
160
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
161
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: AccordionContentComponent, isStandalone: true, selector: "AccordionContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "item.contentId", "attr.role": "\"region\"", "attr.aria-labelledby": "item.triggerId", "attr.data-state": "item.open() ? \"open\" : \"closed\"", "hidden": "!item.open()" } }, ngImport: i0, template: `<div class="pb-4 pt-0 text-sm"><ng-content /></div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
162
+ }
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AccordionContentComponent, decorators: [{
164
+ type: Component,
165
+ args: [{
166
+ selector: 'AccordionContent',
167
+ changeDetection: ChangeDetectionStrategy.OnPush,
168
+ host: {
169
+ '[class]': 'classes()',
170
+ '[attr.id]': 'item.contentId',
171
+ '[attr.role]': '"region"',
172
+ '[attr.aria-labelledby]': 'item.triggerId',
173
+ '[attr.data-state]': 'item.open() ? "open" : "closed"',
174
+ '[hidden]': '!item.open()',
175
+ },
176
+ template: `<div class="pb-4 pt-0 text-sm"><ng-content /></div>`,
177
+ }]
178
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
179
+ let _id = 0;
180
+
181
+ /**
182
+ * Generated bundle index. Do not edit.
183
+ */
184
+
185
+ export { AccordionComponent, AccordionContentComponent, AccordionContextBase, AccordionItemComponent, AccordionTriggerComponent };
186
+ //# sourceMappingURL=ojiepermana-angular-component-accordion.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-accordion.mjs","sources":["../../../library/component/accordion/accordion.component.ts","../../../library/component/accordion/ojiepermana-angular-component-accordion.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n computed,\n forwardRef,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\nimport { cn, uniqueId } from '@ojiepermana/angular-component/utils';\n\nexport type AccordionType = 'single' | 'multiple';\n\n@Directive()\nexport abstract class AccordionContextBase {\n abstract isOpen(value: string): boolean;\n abstract toggle(value: string): void;\n}\n\n@Component({\n selector: 'Accordion',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AccordionContextBase, useExisting: forwardRef(() => AccordionComponent) }],\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class AccordionComponent extends AccordionContextBase {\n readonly type = input<AccordionType>('single');\n readonly collapsible = input<boolean>(true);\n readonly value = model<string | string[] | null>(null);\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('block', this.class()));\n\n private readonly openSet = computed<Set<string>>(() => {\n const v = this.value();\n if (v == null) return new Set();\n return new Set(Array.isArray(v) ? v : [v]);\n });\n\n override isOpen(value: string): boolean {\n return this.openSet().has(value);\n }\n\n override toggle(value: string): void {\n const isMulti = this.type() === 'multiple';\n const current = this.openSet();\n const open = current.has(value);\n if (isMulti) {\n const next = new Set(current);\n open ? next.delete(value) : next.add(value);\n this.value.set([...next]);\n } else {\n if (open) {\n if (this.collapsible()) this.value.set(null);\n } else {\n this.value.set(value);\n }\n }\n }\n}\n\n@Component({\n selector: 'AccordionItem',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-state]': 'open() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n },\n template: `<ng-content />`,\n})\nexport class AccordionItemComponent {\n protected readonly ctx = inject(AccordionContextBase);\n readonly value = input.required<string>();\n readonly disabled = input<boolean>(false);\n readonly class = input<string>('');\n\n readonly triggerId = uniqueId('AccordionTrigger');\n readonly contentId = uniqueId('AccordionContent');\n\n protected readonly classes = computed(() => cn('block border-b border-border', this.class()));\n\n readonly open = computed(() => this.ctx.isOpen(this.value()));\n\n toggle(): void {\n if (!this.disabled()) this.ctx.toggle(this.value());\n }\n}\n\n@Component({\n selector: 'button[AccordionTrigger]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n type: 'button',\n '[attr.id]': 'item.triggerId',\n '[attr.aria-controls]': 'item.contentId',\n '[attr.aria-expanded]': 'item.open()',\n '[attr.data-state]': 'item.open() ? \"open\" : \"closed\"',\n '[disabled]': 'item.disabled() || null',\n '(click)': 'item.toggle()',\n },\n template: `\n <ng-content />\n <svg\n aria-hidden=\"true\"\n class=\"h-4 w-4 shrink-0 transition-transform duration-200\"\n [class.rotate-180]=\"item.open()\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n `,\n})\nexport class AccordionTriggerComponent {\n protected readonly item = inject(AccordionItemComponent);\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn(\n 'flex flex-1 w-full items-center justify-between py-4 text-sm font-medium',\n 'transition-all hover:underline',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50',\n this.class(),\n ),\n );\n}\n\n@Component({\n selector: 'AccordionContent',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.id]': 'item.contentId',\n '[attr.role]': '\"region\"',\n '[attr.aria-labelledby]': 'item.triggerId',\n '[attr.data-state]': 'item.open() ? \"open\" : \"closed\"',\n '[hidden]': '!item.open()',\n },\n template: `<div class=\"pb-4 pt-0 text-sm\"><ng-content /></div>`,\n})\nexport class AccordionContentComponent {\n protected readonly item = inject(AccordionItemComponent);\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('block overflow-hidden text-sm', this.class()));\n}\n\nlet _id = 0;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAgBsB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