@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 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-timeline.mjs","sources":["../../../library/component/timeline/timeline.component.ts","../../../library/component/timeline/ojiepermana-angular-component-timeline.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular-component/utils';\n\nexport type TimelineAlign = 'start' | 'baseline' | 'center' | 'end';\nexport type TimelineSize = 'default' | 'lg';\nexport type TimelineStatus = 'complete' | 'current' | 'incomplete';\nexport type TimelineIndicatorVariant = 'default' | 'bare';\nexport type TimelineIndicatorColor =\n | 'red'\n | 'orange'\n | 'amber'\n | 'yellow'\n | 'lime'\n | 'green'\n | 'emerald'\n | 'teal'\n | 'cyan'\n | 'sky'\n | 'blue'\n | 'indigo'\n | 'violet'\n | 'purple'\n | 'fuchsia'\n | 'pink'\n | 'rose';\n\nconst TIMELINE_BASE = [\n 'w-full min-w-0 text-sm text-foreground',\n '[--timeline-content-gap:0.75rem] [--timeline-indicator-size:1.5rem] [--timeline-item-gap:1.5rem]',\n].join(' ');\n\nconst timelineSizeClasses: Record<TimelineSize, string> = {\n default: '[--timeline-indicator-size:1.5rem]',\n lg: '[--timeline-indicator-size:2.5rem] [--timeline-content-gap:1rem]',\n};\n\nconst timelineAlignClasses: Record<TimelineAlign, string> = {\n start: 'items-start',\n baseline: 'items-baseline',\n center: 'items-center',\n end: 'items-end',\n};\n\nconst timelineItemStatusClasses: Record<TimelineStatus, string> = {\n complete: 'before:bg-primary after:bg-primary',\n current: 'before:bg-border after:bg-border',\n incomplete: 'before:bg-border/70 after:bg-border/70',\n};\n\nconst timelineIndicatorStatusClasses: Record<TimelineStatus, string> = {\n complete: 'border-primary bg-primary text-primary-foreground',\n current: 'border-ring bg-background text-foreground ring-2 ring-ring ring-offset-2 ring-offset-background',\n incomplete: 'border-border bg-background text-muted-foreground',\n};\n\nconst timelineIndicatorColorClasses: Record<TimelineIndicatorColor, string> = {\n red: 'border-[hsl(var(--timeline-indicator-red))] bg-[hsl(var(--timeline-indicator-red))] text-[hsl(var(--timeline-indicator-red-foreground))]',\n orange:\n 'border-[hsl(var(--timeline-indicator-orange))] bg-[hsl(var(--timeline-indicator-orange))] text-[hsl(var(--timeline-indicator-orange-foreground))]',\n amber:\n 'border-[hsl(var(--timeline-indicator-amber))] bg-[hsl(var(--timeline-indicator-amber))] text-[hsl(var(--timeline-indicator-amber-foreground))]',\n yellow:\n 'border-[hsl(var(--timeline-indicator-yellow))] bg-[hsl(var(--timeline-indicator-yellow))] text-[hsl(var(--timeline-indicator-yellow-foreground))]',\n lime: 'border-[hsl(var(--timeline-indicator-lime))] bg-[hsl(var(--timeline-indicator-lime))] text-[hsl(var(--timeline-indicator-lime-foreground))]',\n green:\n 'border-[hsl(var(--timeline-indicator-green))] bg-[hsl(var(--timeline-indicator-green))] text-[hsl(var(--timeline-indicator-green-foreground))]',\n emerald:\n 'border-[hsl(var(--timeline-indicator-emerald))] bg-[hsl(var(--timeline-indicator-emerald))] text-[hsl(var(--timeline-indicator-emerald-foreground))]',\n teal: 'border-[hsl(var(--timeline-indicator-teal))] bg-[hsl(var(--timeline-indicator-teal))] text-[hsl(var(--timeline-indicator-teal-foreground))]',\n cyan: 'border-[hsl(var(--timeline-indicator-cyan))] bg-[hsl(var(--timeline-indicator-cyan))] text-[hsl(var(--timeline-indicator-cyan-foreground))]',\n sky: 'border-[hsl(var(--timeline-indicator-sky))] bg-[hsl(var(--timeline-indicator-sky))] text-[hsl(var(--timeline-indicator-sky-foreground))]',\n blue: 'border-[hsl(var(--timeline-indicator-blue))] bg-[hsl(var(--timeline-indicator-blue))] text-[hsl(var(--timeline-indicator-blue-foreground))]',\n indigo:\n 'border-[hsl(var(--timeline-indicator-indigo))] bg-[hsl(var(--timeline-indicator-indigo))] text-[hsl(var(--timeline-indicator-indigo-foreground))]',\n violet:\n 'border-[hsl(var(--timeline-indicator-violet))] bg-[hsl(var(--timeline-indicator-violet))] text-[hsl(var(--timeline-indicator-violet-foreground))]',\n purple:\n 'border-[hsl(var(--timeline-indicator-purple))] bg-[hsl(var(--timeline-indicator-purple))] text-[hsl(var(--timeline-indicator-purple-foreground))]',\n fuchsia:\n 'border-[hsl(var(--timeline-indicator-fuchsia))] bg-[hsl(var(--timeline-indicator-fuchsia))] text-[hsl(var(--timeline-indicator-fuchsia-foreground))]',\n pink: 'border-[hsl(var(--timeline-indicator-pink))] bg-[hsl(var(--timeline-indicator-pink))] text-[hsl(var(--timeline-indicator-pink-foreground))]',\n rose: 'border-[hsl(var(--timeline-indicator-rose))] bg-[hsl(var(--timeline-indicator-rose))] text-[hsl(var(--timeline-indicator-rose-foreground))]',\n};\n\n@Component({\n selector: 'Timeline',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"timeline\"',\n '[attr.data-orientation]': 'horizontal() ? \"horizontal\" : \"vertical\"',\n '[attr.data-align]': 'align()',\n '[attr.data-size]': 'size()',\n },\n template: `<ng-content />`,\n})\nexport class TimelineComponent {\n readonly horizontal = input(false, { transform: booleanAttribute });\n readonly align = input<TimelineAlign>('center');\n readonly size = input<TimelineSize>('default');\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n TIMELINE_BASE,\n timelineSizeClasses[this.size()],\n this.horizontal() ? 'flex min-w-0 items-start gap-[var(--timeline-item-gap)] overflow-x-auto pb-1' : 'grid',\n this.class(),\n ),\n );\n}\n\n@Component({\n selector: 'TimelineItem',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"timeline-item\"',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-align]': 'resolvedAlign()',\n '[attr.data-size]': 'resolvedSize()',\n '[attr.data-status]': 'status() ?? null',\n },\n template: `<ng-content />`,\n})\nexport class TimelineItemComponent {\n private readonly timeline = inject(TimelineComponent, { optional: true });\n\n readonly status = input<TimelineStatus | null>(null);\n readonly align = input<TimelineAlign | null>(null);\n readonly size = input<TimelineSize | null>(null);\n readonly class = input<string>('');\n\n readonly orientation = computed(() => (this.timeline?.horizontal() ? 'horizontal' : 'vertical'));\n readonly resolvedAlign = computed(() => this.align() ?? this.timeline?.align() ?? 'center');\n readonly resolvedSize = computed(() => this.size() ?? this.timeline?.size() ?? 'default');\n\n protected readonly classes = computed(() => {\n const status = this.status();\n const orientation = this.orientation();\n\n return cn(\n 'relative min-w-0',\n timelineSizeClasses[this.resolvedSize()],\n orientation === 'horizontal'\n ? [\n \"before:content-['']\",\n 'grid min-w-32 flex-1 justify-items-center gap-y-2 text-center',\n 'before:absolute before:left-0 before:right-0 before:top-[calc(var(--timeline-indicator-size)/2)] before:h-px before:bg-border',\n 'first:before:left-1/2 last:before:right-1/2',\n ].join(' ')\n : [\n \"after:content-['']\",\n 'grid grid-cols-[var(--timeline-indicator-size)_minmax(0,1fr)] gap-x-[var(--timeline-content-gap)] pb-[var(--timeline-item-gap)] last:pb-0',\n 'after:absolute after:bottom-0 after:left-[calc(var(--timeline-indicator-size)/2)] after:top-[calc(var(--timeline-indicator-size)+0.25rem)] after:w-px after:-translate-x-1/2 after:bg-border last:after:hidden',\n timelineAlignClasses[this.resolvedAlign()],\n ].join(' '),\n status ? timelineItemStatusClasses[status] : 'before:bg-border after:bg-border',\n this.class(),\n );\n });\n}\n\n@Component({\n selector: 'TimelineIndicator',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"timeline-indicator\"',\n '[attr.data-variant]': 'variant()',\n '[attr.data-status]': 'resolvedStatus()',\n '[attr.data-color]': 'color() ?? null',\n },\n template: `<ng-content />`,\n})\nexport class TimelineIndicatorComponent {\n private readonly item = inject(TimelineItemComponent, { optional: true });\n\n readonly variant = input<TimelineIndicatorVariant>('default');\n readonly status = input<TimelineStatus | null>(null);\n readonly color = input<TimelineIndicatorColor | null>(null);\n readonly class = input<string>('');\n\n protected readonly resolvedStatus = computed(() => this.status() ?? this.item?.status() ?? 'incomplete');\n protected readonly classes = computed(() => {\n const color = this.color();\n\n return cn(\n 'relative z-10 col-start-1 row-start-1 inline-flex shrink-0 items-center justify-center justify-self-center',\n this.item?.orientation() === 'horizontal' ? 'row-start-1' : '',\n this.variant() === 'bare'\n ? 'bg-background text-muted-foreground'\n : [\n 'size-[var(--timeline-indicator-size)] rounded-full border text-xs font-medium shadow-sm',\n color ? timelineIndicatorColorClasses[color] : timelineIndicatorStatusClasses[this.resolvedStatus()],\n ].join(' '),\n this.class(),\n );\n });\n}\n\n@Component({\n selector: 'TimelineContent',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"timeline-content\"',\n },\n template: `<ng-content />`,\n})\nexport class TimelineContentComponent {\n private readonly item = inject(TimelineItemComponent, { optional: true });\n\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n 'min-w-0 text-sm leading-6 text-foreground',\n this.item?.orientation() === 'horizontal' ? 'row-start-2 max-w-40 text-center' : 'col-start-2 row-start-1',\n this.class(),\n ),\n );\n}\n\n@Component({\n selector: 'TimelineBlock',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"timeline-block\"',\n },\n template: `<ng-content />`,\n})\nexport class TimelineBlockComponent {\n private readonly item = inject(TimelineItemComponent, { optional: true });\n\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('min-w-0', this.item?.orientation() === 'horizontal' ? 'row-start-2 w-full' : 'col-span-full', this.class()),\n );\n}\n\n@Component({\n selector: 'TimelineSubgrid',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"timeline-subgrid\"',\n },\n template: `<ng-content />`,\n})\nexport class TimelineSubgridComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n 'grid min-w-0 grid-cols-[var(--timeline-indicator-size)_minmax(0,1fr)] gap-x-[var(--timeline-content-gap)]',\n this.class(),\n ),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AA0BA,MAAM,aAAa,GAAG;IACpB,wCAAwC;IACxC,kGAAkG;AACnG,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,MAAM,mBAAmB,GAAiC;AACxD,IAAA,OAAO,EAAE,oCAAoC;AAC7C,IAAA,EAAE,EAAE,kEAAkE;CACvE;AAED,MAAM,oBAAoB,GAAkC;AAC1D,IAAA,KAAK,EAAE,aAAa;AACpB,IAAA,QAAQ,EAAE,gBAAgB;AAC1B,IAAA,MAAM,EAAE,cAAc;AACtB,IAAA,GAAG,EAAE,WAAW;CACjB;AAED,MAAM,yBAAyB,GAAmC;AAChE,IAAA,QAAQ,EAAE,oCAAoC;AAC9C,IAAA,OAAO,EAAE,kCAAkC;AAC3C,IAAA,UAAU,EAAE,wCAAwC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
+ import { DOCUMENT } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, Service } from '@angular/core';
4
+
5
+ const DEFAULT_TOAST_DURATION_MS = 5000;
6
+ const VARIANT_CLASSES = {
7
+ default: 'border-border bg-background text-foreground',
8
+ destructive: 'border-destructive/50 bg-destructive text-destructive-foreground',
9
+ success: 'border-emerald-500/40 bg-emerald-600 text-white',
10
+ info: 'border-sky-500/40 bg-sky-600 text-white',
11
+ warning: 'border-amber-500/40 bg-amber-500 text-black',
12
+ };
13
+ const resolveToastMessage = (message, value) => typeof message === 'function' ? message(value) : message;
14
+ /**
15
+ * Signal-era toast tanpa dependensi Material: stack dirender ke sebuah live
16
+ * region (`role="status"`, `aria-live="polite"`) sehingga screen reader
17
+ * mengumumkan setiap toast.
18
+ */
19
+ class ToastService {
20
+ documentRef = inject(DOCUMENT, { optional: true });
21
+ container = null;
22
+ active = new Set();
23
+ show(options) {
24
+ const doc = this.documentRef;
25
+ if (!doc) {
26
+ return { dismiss: () => { }, afterDismissed: Promise.resolve({ dismissedByAction: false }) };
27
+ }
28
+ const variant = options.variant ?? 'default';
29
+ const container = this.ensureContainer(doc, options);
30
+ const toast = doc.createElement('div');
31
+ toast.className = [
32
+ 'toast-panel pointer-events-auto flex w-80 items-start gap-3 rounded-md border p-4 shadow-lg',
33
+ `toast-${variant}`,
34
+ VARIANT_CLASSES[variant],
35
+ ].join(' ');
36
+ toast.setAttribute('data-variant', variant);
37
+ const body = doc.createElement('div');
38
+ body.className = 'flex min-w-0 flex-1 flex-col gap-1';
39
+ if (options.title) {
40
+ const title = doc.createElement('p');
41
+ title.className = 'text-sm font-semibold leading-tight';
42
+ title.textContent = options.title;
43
+ body.appendChild(title);
44
+ }
45
+ if (options.description) {
46
+ const description = doc.createElement('p');
47
+ description.className = 'text-sm leading-snug opacity-90';
48
+ description.textContent = options.description;
49
+ body.appendChild(description);
50
+ }
51
+ toast.appendChild(body);
52
+ let resolveDismiss = () => { };
53
+ const afterDismissed = new Promise((resolve) => {
54
+ resolveDismiss = resolve;
55
+ });
56
+ let timeoutId = null;
57
+ const dismiss = (dismissedByAction = false) => {
58
+ if (timeoutId !== null) {
59
+ clearTimeout(timeoutId);
60
+ timeoutId = null;
61
+ }
62
+ if (!this.active.delete(toast)) {
63
+ return;
64
+ }
65
+ toast.remove();
66
+ if (this.active.size === 0) {
67
+ this.container?.remove();
68
+ this.container = null;
69
+ }
70
+ resolveDismiss({ dismissedByAction });
71
+ };
72
+ if (options.action) {
73
+ const action = doc.createElement('button');
74
+ action.type = 'button';
75
+ action.className =
76
+ 'shrink-0 rounded-md border border-current/30 px-2 py-1 text-xs font-medium transition-opacity hover:opacity-80';
77
+ action.textContent = options.action;
78
+ action.addEventListener('click', () => dismiss(true), { once: true });
79
+ toast.appendChild(action);
80
+ }
81
+ container.appendChild(toast);
82
+ this.active.add(toast);
83
+ const duration = options.durationMs === null ? null : (options.durationMs ?? DEFAULT_TOAST_DURATION_MS);
84
+ if (duration !== null) {
85
+ timeoutId = (doc.defaultView ?? globalThis).setTimeout(() => dismiss(false), duration);
86
+ }
87
+ return { dismiss: () => dismiss(false), afterDismissed };
88
+ }
89
+ success(opts) {
90
+ return this.show({ ...opts, variant: 'success' });
91
+ }
92
+ info(opts) {
93
+ return this.show({ ...opts, variant: 'info' });
94
+ }
95
+ warning(opts) {
96
+ return this.show({ ...opts, variant: 'warning' });
97
+ }
98
+ error(opts) {
99
+ return this.show({ ...opts, variant: 'destructive' });
100
+ }
101
+ async promise(taskOrFactory, messages) {
102
+ const loading = this.show({ title: messages.loading, durationMs: null });
103
+ try {
104
+ const task = typeof taskOrFactory === 'function' ? taskOrFactory() : taskOrFactory;
105
+ const value = await task;
106
+ loading.dismiss();
107
+ this.success({ title: resolveToastMessage(messages.success, value) });
108
+ return value;
109
+ }
110
+ catch (error) {
111
+ loading.dismiss();
112
+ this.error({ title: resolveToastMessage(messages.error, error) });
113
+ throw error;
114
+ }
115
+ }
116
+ dismiss() {
117
+ for (const toast of [...this.active]) {
118
+ this.active.delete(toast);
119
+ toast.remove();
120
+ }
121
+ this.container?.remove();
122
+ this.container = null;
123
+ }
124
+ ensureContainer(doc, options) {
125
+ if (this.container?.isConnected) {
126
+ return this.container;
127
+ }
128
+ const container = doc.createElement('div');
129
+ container.className = 'toast-container pointer-events-none fixed z-50 flex flex-col gap-2 p-4';
130
+ container.setAttribute('role', 'status');
131
+ container.setAttribute('aria-live', 'polite');
132
+ const vertical = options.verticalPosition ?? 'bottom';
133
+ const horizontal = options.horizontalPosition ?? 'end';
134
+ container.style.setProperty(vertical === 'top' ? 'top' : 'bottom', '0');
135
+ if (horizontal === 'center') {
136
+ container.style.setProperty('left', '50%');
137
+ container.style.setProperty('transform', 'translateX(-50%)');
138
+ }
139
+ else if (horizontal === 'start' || horizontal === 'left') {
140
+ container.style.setProperty('left', '0');
141
+ }
142
+ else {
143
+ container.style.setProperty('right', '0');
144
+ }
145
+ doc.body.appendChild(container);
146
+ this.container = container;
147
+ return container;
148
+ }
149
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToastService, deps: [], target: i0.ɵɵFactoryTarget.Service });
150
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.2", ngImport: i0, type: ToastService });
151
+ }
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToastService, decorators: [{
153
+ type: Service
154
+ }] });
155
+
156
+ /**
157
+ * Generated bundle index. Do not edit.
158
+ */
159
+
160
+ export { ToastService };
161
+ //# sourceMappingURL=ojiepermana-angular-component-toast.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-toast.mjs","sources":["../../../library/component/toast/toast.service.ts","../../../library/component/toast/ojiepermana-angular-component-toast.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { Service, inject } from '@angular/core';\n\nexport type ToastVariant = 'default' | 'destructive' | 'success' | 'info' | 'warning';\n\nexport type ToastMessage<T> = string | ((value: T) => string);\n\nexport interface ToastPromiseMessages<T> {\n readonly loading: string;\n readonly success: ToastMessage<T>;\n readonly error: ToastMessage<unknown>;\n}\n\nexport type ToastHorizontalPosition = 'start' | 'center' | 'end' | 'left' | 'right';\nexport type ToastVerticalPosition = 'top' | 'bottom';\n\nexport interface ToastOptions {\n readonly title?: string;\n readonly description?: string;\n readonly action?: string;\n readonly variant?: ToastVariant;\n readonly durationMs?: number | null;\n readonly horizontalPosition?: ToastHorizontalPosition;\n readonly verticalPosition?: ToastVerticalPosition;\n}\n\n/** Handle for a shown toast. */\nexport interface ToastRef {\n dismiss(): void;\n /** Resolves with `true` when the action button dismissed the toast. */\n readonly afterDismissed: Promise<{ dismissedByAction: boolean }>;\n}\n\nconst DEFAULT_TOAST_DURATION_MS = 5000;\n\nconst VARIANT_CLASSES: Record<ToastVariant, string> = {\n default: 'border-border bg-background text-foreground',\n destructive: 'border-destructive/50 bg-destructive text-destructive-foreground',\n success: 'border-emerald-500/40 bg-emerald-600 text-white',\n info: 'border-sky-500/40 bg-sky-600 text-white',\n warning: 'border-amber-500/40 bg-amber-500 text-black',\n};\n\nconst resolveToastMessage = <T>(message: ToastMessage<T>, value: T): string =>\n typeof message === 'function' ? message(value) : message;\n\n/**\n * Signal-era toast tanpa dependensi Material: stack dirender ke sebuah live\n * region (`role=\"status\"`, `aria-live=\"polite\"`) sehingga screen reader\n * mengumumkan setiap toast.\n */\n@Service()\nexport class ToastService {\n private readonly documentRef = inject(DOCUMENT, { optional: true });\n private container: HTMLElement | null = null;\n private readonly active = new Set<HTMLElement>();\n\n show(options: ToastOptions): ToastRef {\n const doc = this.documentRef;\n\n if (!doc) {\n return { dismiss: () => {}, afterDismissed: Promise.resolve({ dismissedByAction: false }) };\n }\n\n const variant = options.variant ?? 'default';\n const container = this.ensureContainer(doc, options);\n\n const toast = doc.createElement('div');\n toast.className = [\n 'toast-panel pointer-events-auto flex w-80 items-start gap-3 rounded-md border p-4 shadow-lg',\n `toast-${variant}`,\n VARIANT_CLASSES[variant],\n ].join(' ');\n toast.setAttribute('data-variant', variant);\n\n const body = doc.createElement('div');\n body.className = 'flex min-w-0 flex-1 flex-col gap-1';\n\n if (options.title) {\n const title = doc.createElement('p');\n title.className = 'text-sm font-semibold leading-tight';\n title.textContent = options.title;\n body.appendChild(title);\n }\n\n if (options.description) {\n const description = doc.createElement('p');\n description.className = 'text-sm leading-snug opacity-90';\n description.textContent = options.description;\n body.appendChild(description);\n }\n\n toast.appendChild(body);\n\n let resolveDismiss: (result: { dismissedByAction: boolean }) => void = () => {};\n const afterDismissed = new Promise<{ dismissedByAction: boolean }>((resolve) => {\n resolveDismiss = resolve;\n });\n\n let timeoutId: number | null = null;\n\n const dismiss = (dismissedByAction = false): void => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n if (!this.active.delete(toast)) {\n return;\n }\n toast.remove();\n if (this.active.size === 0) {\n this.container?.remove();\n this.container = null;\n }\n resolveDismiss({ dismissedByAction });\n };\n\n if (options.action) {\n const action = doc.createElement('button');\n action.type = 'button';\n action.className =\n 'shrink-0 rounded-md border border-current/30 px-2 py-1 text-xs font-medium transition-opacity hover:opacity-80';\n action.textContent = options.action;\n action.addEventListener('click', () => dismiss(true), { once: true });\n toast.appendChild(action);\n }\n\n container.appendChild(toast);\n this.active.add(toast);\n\n const duration = options.durationMs === null ? null : (options.durationMs ?? DEFAULT_TOAST_DURATION_MS);\n if (duration !== null) {\n timeoutId = (doc.defaultView ?? globalThis).setTimeout(() => dismiss(false), duration) as unknown as number;\n }\n\n return { dismiss: () => dismiss(false), afterDismissed };\n }\n\n success(opts: Omit<ToastOptions, 'variant'>): ToastRef {\n return this.show({ ...opts, variant: 'success' });\n }\n\n info(opts: Omit<ToastOptions, 'variant'>): ToastRef {\n return this.show({ ...opts, variant: 'info' });\n }\n\n warning(opts: Omit<ToastOptions, 'variant'>): ToastRef {\n return this.show({ ...opts, variant: 'warning' });\n }\n\n error(opts: Omit<ToastOptions, 'variant'>): ToastRef {\n return this.show({ ...opts, variant: 'destructive' });\n }\n\n async promise<T>(taskOrFactory: Promise<T> | (() => Promise<T>), messages: ToastPromiseMessages<T>): Promise<T> {\n const loading = this.show({ title: messages.loading, durationMs: null });\n\n try {\n const task = typeof taskOrFactory === 'function' ? taskOrFactory() : taskOrFactory;\n const value = await task;\n loading.dismiss();\n this.success({ title: resolveToastMessage(messages.success, value) });\n return value;\n } catch (error: unknown) {\n loading.dismiss();\n this.error({ title: resolveToastMessage(messages.error, error) });\n throw error;\n }\n }\n\n dismiss(): void {\n for (const toast of [...this.active]) {\n this.active.delete(toast);\n toast.remove();\n }\n this.container?.remove();\n this.container = null;\n }\n\n private ensureContainer(doc: Document, options: ToastOptions): HTMLElement {\n if (this.container?.isConnected) {\n return this.container;\n }\n\n const container = doc.createElement('div');\n container.className = 'toast-container pointer-events-none fixed z-50 flex flex-col gap-2 p-4';\n container.setAttribute('role', 'status');\n container.setAttribute('aria-live', 'polite');\n\n const vertical = options.verticalPosition ?? 'bottom';\n const horizontal = options.horizontalPosition ?? 'end';\n\n container.style.setProperty(vertical === 'top' ? 'top' : 'bottom', '0');\n if (horizontal === 'center') {\n container.style.setProperty('left', '50%');\n container.style.setProperty('transform', 'translateX(-50%)');\n } else if (horizontal === 'start' || horizontal === 'left') {\n container.style.setProperty('left', '0');\n } else {\n container.style.setProperty('right', '0');\n }\n\n doc.body.appendChild(container);\n this.container = container;\n return container;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAiCA,MAAM,yBAAyB,GAAG,IAAI;AAEtC,MAAM,eAAe,GAAiC;AACpD,IAAA,OAAO,EAAE,6CAA6C;AACtD,IAAA,WAAW,EAAE,kEAAkE;AAC/E,IAAA,OAAO,EAAE,iDAAiD;AAC1D,IAAA,IAAI,EAAE,yCAAyC;AAC/C,IAAA,OAAO,EAAE,6CAA6C;C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;;"}
@@ -0,0 +1,289 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, input, model, numberAttribute, inject, ElementRef, signal, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { toggleVariants } from '@ojiepermana/angular-component/toggle';
4
+ import { cn } from '@ojiepermana/angular-component/utils';
5
+
6
+ const spacingClasses = {
7
+ 0: '',
8
+ 1: 'gap-1',
9
+ 2: 'gap-2',
10
+ 3: 'gap-3',
11
+ 4: 'gap-4',
12
+ };
13
+ const connectedItemClasses = {
14
+ horizontal: [
15
+ '[&>[data-slot=toggle-group-item]:not(:first-child)]:rounded-s-none',
16
+ '[&>[data-slot=toggle-group-item]:not(:first-child)]:[border-inline-start-width:0]',
17
+ '[&>[data-slot=toggle-group-item]:not(:last-child)]:rounded-e-none',
18
+ ].join(' '),
19
+ vertical: [
20
+ '[&>[data-slot=toggle-group-item]:not(:first-child)]:rounded-t-none',
21
+ '[&>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0',
22
+ '[&>[data-slot=toggle-group-item]:not(:last-child)]:rounded-b-none',
23
+ ].join(' '),
24
+ };
25
+ class ToggleGroupContextBase {
26
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToggleGroupContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: ToggleGroupContextBase, isStandalone: true, ngImport: i0 });
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToggleGroupContextBase, decorators: [{
30
+ type: Directive
31
+ }] });
32
+ class ToggleGroupComponent extends ToggleGroupContextBase {
33
+ type = input.required(/* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
35
+ value = model(null, /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
37
+ values = model([], /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
39
+ orientation = input('horizontal', /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
41
+ variant = input('default', /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
43
+ size = input('default', /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
45
+ spacing = input(2, { ...(ngDevMode ? { debugName: "spacing" } : /* istanbul ignore next */ {}), transform: numberAttribute });
46
+ loop = input(true, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "loop" }] : /* istanbul ignore next */ []));
48
+ disabled = input(false, /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
50
+ dir = input(null, /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "dir" }] : /* istanbul ignore next */ []));
52
+ class = input('', /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
54
+ host = inject(ElementRef);
55
+ focusedValue = signal(null, /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
57
+ registrationVersion = signal(0, /* @ts-ignore */
58
+ ...(ngDevMode ? [{ debugName: "registrationVersion" }] : /* istanbul ignore next */ []));
59
+ items = new Map();
60
+ resolvedSpacing = computed(() => normalizeSpacing(this.spacing()), /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "resolvedSpacing" }] : /* istanbul ignore next */ []));
62
+ tabStopValue = computed(() => {
63
+ this.registrationVersion();
64
+ const enabledItems = this.enabledItems();
65
+ if (enabledItems.length === 0)
66
+ return null;
67
+ const current = this.focusedValue();
68
+ if (current && enabledItems.some((item) => item.value() === current)) {
69
+ return current;
70
+ }
71
+ const selected = enabledItems.find((item) => this.isSelected(item.value()));
72
+ return selected?.value() ?? enabledItems[0].value();
73
+ }, /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "tabStopValue" }] : /* istanbul ignore next */ []));
75
+ classes = computed(() => cn('inline-flex w-fit', this.orientation() === 'vertical' ? 'flex-col items-stretch' : 'items-center', spacingClasses[this.resolvedSpacing()], this.resolvedSpacing() === 0 && connectedItemClasses[this.orientation()], this.class()), /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
77
+ groupType() {
78
+ return this.type();
79
+ }
80
+ groupOrientation() {
81
+ return this.orientation();
82
+ }
83
+ groupVariant() {
84
+ return this.variant();
85
+ }
86
+ groupSize() {
87
+ return this.size();
88
+ }
89
+ groupDisabled() {
90
+ return this.disabled();
91
+ }
92
+ isRtl() {
93
+ const explicitDir = this.dir();
94
+ if (explicitDir)
95
+ return explicitDir === 'rtl';
96
+ const host = this.host.nativeElement;
97
+ const nearestDir = host.closest('[dir]')?.getAttribute('dir');
98
+ if (nearestDir === 'rtl' || nearestDir === 'ltr') {
99
+ return nearestDir === 'rtl';
100
+ }
101
+ return getComputedStyle(host).direction === 'rtl';
102
+ }
103
+ register(element, value, disabled) {
104
+ this.items.set(element, { element, value, disabled });
105
+ this.bumpRegistrationVersion();
106
+ }
107
+ unregister(element) {
108
+ this.items.delete(element);
109
+ this.bumpRegistrationVersion();
110
+ }
111
+ isSelected(value) {
112
+ return this.type() === 'multiple' ? this.values().includes(value) : this.value() === value;
113
+ }
114
+ toggle(value) {
115
+ const item = this.itemForValue(value);
116
+ if (!item || this.disabled() || item.disabled())
117
+ return;
118
+ this.focusedValue.set(value);
119
+ if (this.type() === 'multiple') {
120
+ this.values.update((current) => current.includes(value) ? current.filter((itemValue) => itemValue !== value) : [...current, value]);
121
+ return;
122
+ }
123
+ this.value.set(this.value() === value ? null : value);
124
+ }
125
+ tabindexFor(value, disabled) {
126
+ if (this.disabled() || disabled)
127
+ return -1;
128
+ return this.tabStopValue() === value ? 0 : -1;
129
+ }
130
+ markFocused(value) {
131
+ const item = this.itemForValue(value);
132
+ if (!item || this.disabled() || item.disabled())
133
+ return;
134
+ this.focusedValue.set(value);
135
+ }
136
+ focusNext(from, offset) {
137
+ const enabledItems = this.enabledItems();
138
+ const currentIndex = enabledItems.findIndex((item) => item.element === from);
139
+ if (currentIndex < 0 || enabledItems.length === 0)
140
+ return;
141
+ let nextIndex = currentIndex + offset;
142
+ if (this.loop()) {
143
+ nextIndex = (nextIndex + enabledItems.length) % enabledItems.length;
144
+ }
145
+ else if (nextIndex < 0 || nextIndex >= enabledItems.length) {
146
+ return;
147
+ }
148
+ const next = enabledItems[nextIndex];
149
+ this.focusedValue.set(next.value());
150
+ next.element.focus();
151
+ }
152
+ focusFirst() {
153
+ const first = this.enabledItems()[0];
154
+ if (!first)
155
+ return;
156
+ this.focusedValue.set(first.value());
157
+ first.element.focus();
158
+ }
159
+ focusLast() {
160
+ const enabledItems = this.enabledItems();
161
+ const last = enabledItems[enabledItems.length - 1];
162
+ if (!last)
163
+ return;
164
+ this.focusedValue.set(last.value());
165
+ last.element.focus();
166
+ }
167
+ enabledItems() {
168
+ return [...this.items.values()].filter((item) => !item.disabled());
169
+ }
170
+ itemForValue(value) {
171
+ return [...this.items.values()].find((item) => item.value() === value);
172
+ }
173
+ bumpRegistrationVersion() {
174
+ this.registrationVersion.update((version) => version + 1);
175
+ }
176
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToggleGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
177
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: ToggleGroupComponent, isStandalone: true, selector: "ToggleGroup", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", values: "valuesChange" }, host: { properties: { "class": "classes()", "attr.role": "\"group\"", "attr.dir": "dir() ?? null", "attr.aria-orientation": "orientation()", "attr.data-disabled": "disabled() ? \"\" : null", "attr.data-orientation": "orientation()", "attr.data-slot": "\"toggle-group\"", "attr.data-type": "type()" } }, providers: [{ provide: ToggleGroupContextBase, useExisting: forwardRef(() => ToggleGroupComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
178
+ }
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToggleGroupComponent, decorators: [{
180
+ type: Component,
181
+ args: [{
182
+ selector: 'ToggleGroup',
183
+ changeDetection: ChangeDetectionStrategy.OnPush,
184
+ providers: [{ provide: ToggleGroupContextBase, useExisting: forwardRef(() => ToggleGroupComponent) }],
185
+ host: {
186
+ '[class]': 'classes()',
187
+ '[attr.role]': '"group"',
188
+ '[attr.dir]': 'dir() ?? null',
189
+ '[attr.aria-orientation]': 'orientation()',
190
+ '[attr.data-disabled]': 'disabled() ? "" : null',
191
+ '[attr.data-orientation]': 'orientation()',
192
+ '[attr.data-slot]': '"toggle-group"',
193
+ '[attr.data-type]': 'type()',
194
+ },
195
+ template: `<ng-content />`,
196
+ }]
197
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: false }] }, { type: i0.Output, args: ["valuesChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
198
+ class ToggleGroupItemDirective {
199
+ ctx = inject(ToggleGroupContextBase);
200
+ element = inject(ElementRef);
201
+ value = input.required(/* @ts-ignore */
202
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
203
+ disabled = input(false, /* @ts-ignore */
204
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
205
+ class = input('', /* @ts-ignore */
206
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
207
+ selected = computed(() => this.ctx.isSelected(this.value()), /* @ts-ignore */
208
+ ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
209
+ classes = computed(() => cn(toggleVariants({ variant: this.ctx.groupVariant(), size: this.ctx.groupSize() }), this.class()), /* @ts-ignore */
210
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
211
+ ngOnInit() {
212
+ this.ctx.register(this.element.nativeElement, this.value, this.disabled);
213
+ }
214
+ ngOnDestroy() {
215
+ this.ctx.unregister(this.element.nativeElement);
216
+ }
217
+ isDisabled() {
218
+ return this.ctx.groupDisabled() || this.disabled();
219
+ }
220
+ onClick() {
221
+ if (this.isDisabled())
222
+ return;
223
+ this.ctx.toggle(this.value());
224
+ }
225
+ onFocus() {
226
+ if (this.isDisabled())
227
+ return;
228
+ this.ctx.markFocused(this.value());
229
+ }
230
+ onArrow(event, offset) {
231
+ event.preventDefault();
232
+ this.ctx.focusNext(this.element.nativeElement, offset);
233
+ }
234
+ onHorizontalArrow(event, offset) {
235
+ event.preventDefault();
236
+ this.ctx.focusNext(this.element.nativeElement, this.ctx.isRtl() ? offset * -1 : offset);
237
+ }
238
+ onHome(event) {
239
+ event.preventDefault();
240
+ this.ctx.focusFirst();
241
+ }
242
+ onEnd(event) {
243
+ event.preventDefault();
244
+ this.ctx.focusLast();
245
+ }
246
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToggleGroupItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
247
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ToggleGroupItemDirective, isStandalone: true, selector: "button[ToggleGroupItem]", 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: { attributes: { "type": "button" }, listeners: { "click": "onClick()", "focus": "onFocus()", "keydown.arrowDown": "onArrow($any($event), 1)", "keydown.arrowLeft": "onHorizontalArrow($any($event), -1)", "keydown.arrowRight": "onHorizontalArrow($any($event), 1)", "keydown.arrowUp": "onArrow($any($event), -1)", "keydown.end": "onEnd($any($event))", "keydown.home": "onHome($any($event))" }, properties: { "class": "classes()", "attr.aria-disabled": "isDisabled() ? \"true\" : null", "attr.aria-pressed": "selected()", "attr.data-disabled": "isDisabled() ? \"\" : null", "attr.data-orientation": "ctx.groupOrientation()", "attr.data-size": "ctx.groupSize()", "attr.data-slot": "\"toggle-group-item\"", "attr.data-state": "selected() ? \"on\" : \"off\"", "attr.data-variant": "ctx.groupVariant()", "attr.tabindex": "ctx.tabindexFor(value(), isDisabled())", "disabled": "isDisabled() || null" } }, ngImport: i0 });
248
+ }
249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ToggleGroupItemDirective, decorators: [{
250
+ type: Directive,
251
+ args: [{
252
+ selector: 'button[ToggleGroupItem]',
253
+ host: {
254
+ '[class]': 'classes()',
255
+ type: 'button',
256
+ '[attr.aria-disabled]': 'isDisabled() ? "true" : null',
257
+ '[attr.aria-pressed]': 'selected()',
258
+ '[attr.data-disabled]': 'isDisabled() ? "" : null',
259
+ '[attr.data-orientation]': 'ctx.groupOrientation()',
260
+ '[attr.data-size]': 'ctx.groupSize()',
261
+ '[attr.data-slot]': '"toggle-group-item"',
262
+ '[attr.data-state]': 'selected() ? "on" : "off"',
263
+ '[attr.data-variant]': 'ctx.groupVariant()',
264
+ '[attr.tabindex]': 'ctx.tabindexFor(value(), isDisabled())',
265
+ '[disabled]': 'isDisabled() || null',
266
+ '(click)': 'onClick()',
267
+ '(focus)': 'onFocus()',
268
+ '(keydown.arrowDown)': 'onArrow($any($event), 1)',
269
+ '(keydown.arrowLeft)': 'onHorizontalArrow($any($event), -1)',
270
+ '(keydown.arrowRight)': 'onHorizontalArrow($any($event), 1)',
271
+ '(keydown.arrowUp)': 'onArrow($any($event), -1)',
272
+ '(keydown.end)': 'onEnd($any($event))',
273
+ '(keydown.home)': 'onHome($any($event))',
274
+ },
275
+ }]
276
+ }], 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 }] }] } });
277
+ function normalizeSpacing(value) {
278
+ if (value in spacingClasses) {
279
+ return value;
280
+ }
281
+ return 2;
282
+ }
283
+
284
+ /**
285
+ * Generated bundle index. Do not edit.
286
+ */
287
+
288
+ export { ToggleGroupComponent, ToggleGroupContextBase, ToggleGroupItemDirective };
289
+ //# sourceMappingURL=ojiepermana-angular-component-toggle-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-toggle-group.mjs","sources":["../../../library/component/toggle-group/toggle-group.component.ts","../../../library/component/toggle-group/ojiepermana-angular-component-toggle-group.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n computed,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n signal,\n} from '@angular/core';\nimport { type ToggleSize, toggleVariants, type ToggleVariant } from '@ojiepermana/angular-component/toggle';\nimport { cn } from '@ojiepermana/angular-component/utils';\n\nexport type ToggleGroupType = 'single' | 'multiple';\nexport type ToggleGroupOrientation = 'horizontal' | 'vertical';\nexport type ToggleGroupVariant = ToggleVariant;\nexport type ToggleGroupSize = ToggleSize;\n\ninterface ToggleGroupItemRegistration {\n readonly element: HTMLElement;\n readonly value: () => string;\n readonly disabled: () => boolean;\n}\n\nconst spacingClasses = {\n 0: '',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3',\n 4: 'gap-4',\n} as const;\n\nconst connectedItemClasses: Record<ToggleGroupOrientation, string> = {\n horizontal: [\n '[&>[data-slot=toggle-group-item]:not(:first-child)]:rounded-s-none',\n '[&>[data-slot=toggle-group-item]:not(:first-child)]:[border-inline-start-width:0]',\n '[&>[data-slot=toggle-group-item]:not(:last-child)]:rounded-e-none',\n ].join(' '),\n vertical: [\n '[&>[data-slot=toggle-group-item]:not(:first-child)]:rounded-t-none',\n '[&>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0',\n '[&>[data-slot=toggle-group-item]:not(:last-child)]:rounded-b-none',\n ].join(' '),\n};\n\n@Directive()\nexport abstract class ToggleGroupContextBase {\n abstract groupType(): ToggleGroupType;\n abstract groupOrientation(): ToggleGroupOrientation;\n abstract groupVariant(): ToggleGroupVariant;\n abstract groupSize(): ToggleGroupSize;\n abstract groupDisabled(): boolean;\n abstract isRtl(): boolean;\n\n abstract register(element: HTMLElement, value: () => string, disabled: () => boolean): void;\n abstract unregister(element: HTMLElement): void;\n abstract isSelected(value: string): boolean;\n abstract toggle(value: string): void;\n abstract tabindexFor(value: string, disabled: boolean): number;\n abstract markFocused(value: string): void;\n abstract focusNext(from: HTMLElement, offset: number): void;\n abstract focusFirst(): void;\n abstract focusLast(): void;\n}\n\n@Component({\n selector: 'ToggleGroup',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: ToggleGroupContextBase, useExisting: forwardRef(() => ToggleGroupComponent) }],\n host: {\n '[class]': 'classes()',\n '[attr.role]': '\"group\"',\n '[attr.dir]': 'dir() ?? null',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-slot]': '\"toggle-group\"',\n '[attr.data-type]': 'type()',\n },\n template: `<ng-content />`,\n})\nexport class ToggleGroupComponent extends ToggleGroupContextBase {\n readonly type = input.required<ToggleGroupType>();\n readonly value = model<string | null>(null);\n readonly values = model<string[]>([]);\n readonly orientation = input<ToggleGroupOrientation>('horizontal');\n readonly variant = input<ToggleGroupVariant>('default');\n readonly size = input<ToggleGroupSize>('default');\n readonly spacing = input(2, { transform: numberAttribute });\n readonly loop = input<boolean>(true);\n readonly disabled = input<boolean>(false);\n readonly dir = input<'ltr' | 'rtl' | null>(null);\n readonly class = input<string>('');\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusedValue = signal<string | null>(null);\n private readonly registrationVersion = signal(0);\n private readonly items = new Map<HTMLElement, ToggleGroupItemRegistration>();\n\n private readonly resolvedSpacing = computed(() => normalizeSpacing(this.spacing()));\n private readonly tabStopValue = computed(() => {\n this.registrationVersion();\n\n const enabledItems = this.enabledItems();\n if (enabledItems.length === 0) return null;\n\n const current = this.focusedValue();\n if (current && enabledItems.some((item) => item.value() === current)) {\n return current;\n }\n\n const selected = enabledItems.find((item) => this.isSelected(item.value()));\n return selected?.value() ?? enabledItems[0].value();\n });\n\n protected readonly classes = computed(() =>\n cn(\n 'inline-flex w-fit',\n this.orientation() === 'vertical' ? 'flex-col items-stretch' : 'items-center',\n spacingClasses[this.resolvedSpacing()],\n this.resolvedSpacing() === 0 && connectedItemClasses[this.orientation()],\n this.class(),\n ),\n );\n\n override groupType(): ToggleGroupType {\n return this.type();\n }\n\n override groupOrientation(): ToggleGroupOrientation {\n return this.orientation();\n }\n\n override groupVariant(): ToggleGroupVariant {\n return this.variant();\n }\n\n override groupSize(): ToggleGroupSize {\n return this.size();\n }\n\n override groupDisabled(): boolean {\n return this.disabled();\n }\n\n override isRtl(): boolean {\n const explicitDir = this.dir();\n if (explicitDir) return explicitDir === 'rtl';\n\n const host = this.host.nativeElement;\n const nearestDir = host.closest('[dir]')?.getAttribute('dir');\n if (nearestDir === 'rtl' || nearestDir === 'ltr') {\n return nearestDir === 'rtl';\n }\n\n return getComputedStyle(host).direction === 'rtl';\n }\n\n override register(element: HTMLElement, value: () => string, disabled: () => boolean): void {\n this.items.set(element, { element, value, disabled });\n this.bumpRegistrationVersion();\n }\n\n override unregister(element: HTMLElement): void {\n this.items.delete(element);\n this.bumpRegistrationVersion();\n }\n\n override isSelected(value: string): boolean {\n return this.type() === 'multiple' ? this.values().includes(value) : this.value() === value;\n }\n\n override toggle(value: string): void {\n const item = this.itemForValue(value);\n if (!item || this.disabled() || item.disabled()) return;\n\n this.focusedValue.set(value);\n\n if (this.type() === 'multiple') {\n this.values.update((current) =>\n current.includes(value) ? current.filter((itemValue) => itemValue !== value) : [...current, value],\n );\n return;\n }\n\n this.value.set(this.value() === value ? null : value);\n }\n\n override tabindexFor(value: string, disabled: boolean): number {\n if (this.disabled() || disabled) return -1;\n return this.tabStopValue() === value ? 0 : -1;\n }\n\n override markFocused(value: string): void {\n const item = this.itemForValue(value);\n if (!item || this.disabled() || item.disabled()) return;\n this.focusedValue.set(value);\n }\n\n override focusNext(from: HTMLElement, offset: number): void {\n const enabledItems = this.enabledItems();\n const currentIndex = enabledItems.findIndex((item) => item.element === from);\n if (currentIndex < 0 || enabledItems.length === 0) return;\n\n let nextIndex = currentIndex + offset;\n\n if (this.loop()) {\n nextIndex = (nextIndex + enabledItems.length) % enabledItems.length;\n } else if (nextIndex < 0 || nextIndex >= enabledItems.length) {\n return;\n }\n\n const next = enabledItems[nextIndex];\n this.focusedValue.set(next.value());\n next.element.focus();\n }\n\n override focusFirst(): void {\n const first = this.enabledItems()[0];\n if (!first) return;\n this.focusedValue.set(first.value());\n first.element.focus();\n }\n\n override focusLast(): void {\n const enabledItems = this.enabledItems();\n const last = enabledItems[enabledItems.length - 1];\n if (!last) return;\n this.focusedValue.set(last.value());\n last.element.focus();\n }\n\n private enabledItems(): ToggleGroupItemRegistration[] {\n return [...this.items.values()].filter((item) => !item.disabled());\n }\n\n private itemForValue(value: string): ToggleGroupItemRegistration | undefined {\n return [...this.items.values()].find((item) => item.value() === value);\n }\n\n private bumpRegistrationVersion(): void {\n this.registrationVersion.update((version) => version + 1);\n }\n}\n\n@Directive({\n selector: 'button[ToggleGroupItem]',\n host: {\n '[class]': 'classes()',\n type: 'button',\n '[attr.aria-disabled]': 'isDisabled() ? \"true\" : null',\n '[attr.aria-pressed]': 'selected()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : null',\n '[attr.data-orientation]': 'ctx.groupOrientation()',\n '[attr.data-size]': 'ctx.groupSize()',\n '[attr.data-slot]': '\"toggle-group-item\"',\n '[attr.data-state]': 'selected() ? \"on\" : \"off\"',\n '[attr.data-variant]': 'ctx.groupVariant()',\n '[attr.tabindex]': 'ctx.tabindexFor(value(), isDisabled())',\n '[disabled]': 'isDisabled() || null',\n '(click)': 'onClick()',\n '(focus)': 'onFocus()',\n '(keydown.arrowDown)': 'onArrow($any($event), 1)',\n '(keydown.arrowLeft)': 'onHorizontalArrow($any($event), -1)',\n '(keydown.arrowRight)': 'onHorizontalArrow($any($event), 1)',\n '(keydown.arrowUp)': 'onArrow($any($event), -1)',\n '(keydown.end)': 'onEnd($any($event))',\n '(keydown.home)': 'onHome($any($event))',\n },\n})\nexport class ToggleGroupItemDirective {\n protected readonly ctx = inject(ToggleGroupContextBase);\n private readonly element = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n readonly value = input.required<string>();\n readonly disabled = input<boolean>(false);\n readonly class = input<string>('');\n\n protected readonly selected = computed(() => this.ctx.isSelected(this.value()));\n protected readonly classes = computed(() =>\n cn(toggleVariants({ variant: this.ctx.groupVariant(), size: this.ctx.groupSize() }), this.class()),\n );\n\n ngOnInit(): void {\n this.ctx.register(this.element.nativeElement, this.value, this.disabled);\n }\n\n ngOnDestroy(): void {\n this.ctx.unregister(this.element.nativeElement);\n }\n\n protected isDisabled(): boolean {\n return this.ctx.groupDisabled() || this.disabled();\n }\n\n protected onClick(): void {\n if (this.isDisabled()) return;\n this.ctx.toggle(this.value());\n }\n\n protected onFocus(): void {\n if (this.isDisabled()) return;\n this.ctx.markFocused(this.value());\n }\n\n protected onArrow(event: KeyboardEvent, offset: number): void {\n event.preventDefault();\n this.ctx.focusNext(this.element.nativeElement, offset);\n }\n\n protected onHorizontalArrow(event: KeyboardEvent, offset: number): void {\n event.preventDefault();\n this.ctx.focusNext(this.element.nativeElement, this.ctx.isRtl() ? offset * -1 : offset);\n }\n\n protected onHome(event: KeyboardEvent): void {\n event.preventDefault();\n this.ctx.focusFirst();\n }\n\n protected onEnd(event: KeyboardEvent): void {\n event.preventDefault();\n this.ctx.focusLast();\n }\n}\n\nfunction normalizeSpacing(value: number): keyof typeof spacingClasses {\n if (value in spacingClasses) {\n return value as keyof typeof spacingClasses;\n }\n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