@ng-cn/core 1.0.16 → 1.0.18

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 (262) hide show
  1. package/package.json +6 -5
  2. package/src/app/lib/components/ui/accordion/accordion-content.component.ts +11 -14
  3. package/src/app/lib/components/ui/accordion/accordion-context.ts +1 -0
  4. package/src/app/lib/components/ui/accordion/accordion-item.component.ts +8 -0
  5. package/src/app/lib/components/ui/accordion/accordion-trigger.component.ts +5 -1
  6. package/src/app/lib/components/ui/accordion/accordion.component.ts +24 -6
  7. package/src/app/lib/components/ui/alert/alert-variants.ts +18 -4
  8. package/src/app/lib/components/ui/alert-dialog/alert-dialog-action.component.ts +1 -0
  9. package/src/app/lib/components/ui/alert-dialog/alert-dialog-cancel.component.ts +1 -1
  10. package/src/app/lib/components/ui/alert-dialog/alert-dialog-content.component.ts +34 -17
  11. package/src/app/lib/components/ui/alert-dialog/alert-dialog-description.component.ts +1 -0
  12. package/src/app/lib/components/ui/alert-dialog/alert-dialog-footer.component.ts +1 -0
  13. package/src/app/lib/components/ui/alert-dialog/alert-dialog-header.component.ts +1 -0
  14. package/src/app/lib/components/ui/alert-dialog/alert-dialog-title.component.ts +1 -0
  15. package/src/app/lib/components/ui/alert-dialog/alert-dialog-trigger.component.ts +1 -0
  16. package/src/app/lib/components/ui/alert-dialog/alert-dialog.component.ts +4 -0
  17. package/src/app/lib/components/ui/aspect-ratio/aspect-ratio.component.ts +1 -0
  18. package/src/app/lib/components/ui/avatar/avatar-context.ts +9 -0
  19. package/src/app/lib/components/ui/avatar/avatar-fallback.component.ts +6 -9
  20. package/src/app/lib/components/ui/avatar/avatar-image.component.ts +40 -11
  21. package/src/app/lib/components/ui/avatar/avatar.component.ts +18 -13
  22. package/src/app/lib/components/ui/avatar/index.ts +1 -0
  23. package/src/app/lib/components/ui/avatar/ui-avatar.component.ts +13 -20
  24. package/src/app/lib/components/ui/badge/badge-variants.ts +1 -1
  25. package/src/app/lib/components/ui/badge/badge.component.ts +1 -0
  26. package/src/app/lib/components/ui/breadcrumb/breadcrumb-ellipsis.component.ts +1 -0
  27. package/src/app/lib/components/ui/breadcrumb/breadcrumb-item.component.ts +3 -7
  28. package/src/app/lib/components/ui/breadcrumb/breadcrumb-link.component.ts +4 -11
  29. package/src/app/lib/components/ui/breadcrumb/breadcrumb-list.component.ts +3 -7
  30. package/src/app/lib/components/ui/breadcrumb/breadcrumb-page.component.ts +1 -0
  31. package/src/app/lib/components/ui/breadcrumb/breadcrumb-separator.component.ts +20 -24
  32. package/src/app/lib/components/ui/breadcrumb/breadcrumb.component.ts +1 -0
  33. package/src/app/lib/components/ui/button/button-variants.ts +3 -3
  34. package/src/app/lib/components/ui/button/button.component.ts +1 -0
  35. package/src/app/lib/components/ui/button-group/button-group.component.ts +1 -0
  36. package/src/app/lib/components/ui/calendar/calendar.component.ts +5 -1
  37. package/src/app/lib/components/ui/carousel/carousel-content.component.ts +1 -0
  38. package/src/app/lib/components/ui/carousel/carousel-item.component.ts +1 -0
  39. package/src/app/lib/components/ui/carousel/carousel-next.component.ts +1 -0
  40. package/src/app/lib/components/ui/carousel/carousel-previous.component.ts +1 -0
  41. package/src/app/lib/components/ui/carousel/carousel.component.ts +1 -0
  42. package/src/app/lib/components/ui/chart/chart-container.component.ts +1 -0
  43. package/src/app/lib/components/ui/chart/chart-legend-content.component.ts +1 -0
  44. package/src/app/lib/components/ui/chart/chart-legend.component.ts +5 -5
  45. package/src/app/lib/components/ui/chart/chart-tooltip-content.component.ts +5 -5
  46. package/src/app/lib/components/ui/chart/chart-tooltip.component.ts +5 -5
  47. package/src/app/lib/components/ui/chart/chart.component.ts +1 -0
  48. package/src/app/lib/components/ui/checkbox/checkbox.component.ts +1 -1
  49. package/src/app/lib/components/ui/collapsible/collapsible-content.component.ts +3 -1
  50. package/src/app/lib/components/ui/collapsible/collapsible-context.ts +1 -0
  51. package/src/app/lib/components/ui/collapsible/collapsible-trigger.component.ts +2 -0
  52. package/src/app/lib/components/ui/collapsible/collapsible.component.ts +4 -0
  53. package/src/app/lib/components/ui/combobox/combobox-content.component.ts +1 -0
  54. package/src/app/lib/components/ui/combobox/combobox-empty.component.ts +1 -0
  55. package/src/app/lib/components/ui/combobox/combobox-group.component.ts +1 -0
  56. package/src/app/lib/components/ui/combobox/combobox-input.component.ts +1 -0
  57. package/src/app/lib/components/ui/combobox/combobox-item.component.ts +1 -4
  58. package/src/app/lib/components/ui/combobox/combobox-list.component.ts +1 -1
  59. package/src/app/lib/components/ui/combobox/combobox-trigger.component.ts +1 -0
  60. package/src/app/lib/components/ui/combobox/combobox-value.component.ts +1 -0
  61. package/src/app/lib/components/ui/combobox/combobox.component.ts +1 -1
  62. package/src/app/lib/components/ui/command/command-dialog.component.ts +1 -0
  63. package/src/app/lib/components/ui/command/command-empty.component.ts +1 -0
  64. package/src/app/lib/components/ui/command/command-group.component.ts +1 -0
  65. package/src/app/lib/components/ui/command/command-input.component.ts +1 -0
  66. package/src/app/lib/components/ui/command/command-item.component.ts +2 -1
  67. package/src/app/lib/components/ui/command/command-list.component.ts +1 -0
  68. package/src/app/lib/components/ui/command/command-separator.component.ts +1 -0
  69. package/src/app/lib/components/ui/command/command-shortcut.component.ts +1 -0
  70. package/src/app/lib/components/ui/command/command.component.ts +1 -0
  71. package/src/app/lib/components/ui/context-menu/context-menu-checkbox-item.component.ts +1 -0
  72. package/src/app/lib/components/ui/context-menu/context-menu-content.component.ts +49 -17
  73. package/src/app/lib/components/ui/context-menu/context-menu-item.component.ts +2 -1
  74. package/src/app/lib/components/ui/context-menu/context-menu-label.component.ts +1 -0
  75. package/src/app/lib/components/ui/context-menu/context-menu-radio-group.component.ts +1 -0
  76. package/src/app/lib/components/ui/context-menu/context-menu-radio-item.component.ts +1 -0
  77. package/src/app/lib/components/ui/context-menu/context-menu-separator.component.ts +1 -0
  78. package/src/app/lib/components/ui/context-menu/context-menu-shortcut.component.ts +1 -0
  79. package/src/app/lib/components/ui/context-menu/context-menu-sub-content.component.ts +3 -0
  80. package/src/app/lib/components/ui/context-menu/context-menu-sub-trigger.component.ts +32 -2
  81. package/src/app/lib/components/ui/context-menu/context-menu-sub.component.ts +4 -0
  82. package/src/app/lib/components/ui/context-menu/context-menu-trigger.component.ts +1 -0
  83. package/src/app/lib/components/ui/context-menu/context-menu.component.ts +1 -0
  84. package/src/app/lib/components/ui/data-table/data-table-content.component.ts +1 -0
  85. package/src/app/lib/components/ui/data-table/data-table-pagination.component.ts +1 -0
  86. package/src/app/lib/components/ui/data-table/data-table-search.component.ts +1 -0
  87. package/src/app/lib/components/ui/data-table/data-table-toolbar.component.ts +1 -0
  88. package/src/app/lib/components/ui/data-table/data-table-view-options.component.ts +1 -0
  89. package/src/app/lib/components/ui/data-table/data-table.component.ts +1 -1
  90. package/src/app/lib/components/ui/date-picker/date-picker.component.ts +1 -0
  91. package/src/app/lib/components/ui/dialog/dialog-close.component.ts +1 -0
  92. package/src/app/lib/components/ui/dialog/dialog-content.component.ts +32 -21
  93. package/src/app/lib/components/ui/dialog/dialog-description.component.ts +1 -0
  94. package/src/app/lib/components/ui/dialog/dialog-footer.component.ts +1 -0
  95. package/src/app/lib/components/ui/dialog/dialog-header.component.ts +1 -0
  96. package/src/app/lib/components/ui/dialog/dialog-title.component.ts +1 -0
  97. package/src/app/lib/components/ui/dialog/dialog-trigger.component.ts +1 -0
  98. package/src/app/lib/components/ui/dialog/dialog.component.ts +1 -0
  99. package/src/app/lib/components/ui/direction/direction-context.ts +9 -0
  100. package/src/app/lib/components/ui/direction/direction.component.ts +48 -0
  101. package/src/app/lib/components/ui/direction/index.ts +2 -0
  102. package/src/app/lib/components/ui/drawer/drawer-close.component.ts +1 -0
  103. package/src/app/lib/components/ui/drawer/drawer-content.component.ts +45 -0
  104. package/src/app/lib/components/ui/drawer/drawer-description.component.ts +1 -0
  105. package/src/app/lib/components/ui/drawer/drawer-footer.component.ts +1 -0
  106. package/src/app/lib/components/ui/drawer/drawer-header.component.ts +1 -0
  107. package/src/app/lib/components/ui/drawer/drawer-title.component.ts +1 -0
  108. package/src/app/lib/components/ui/drawer/drawer-trigger.component.ts +1 -0
  109. package/src/app/lib/components/ui/drawer/drawer.component.ts +4 -0
  110. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.component.ts +1 -0
  111. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-content.component.ts +3 -2
  112. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-group.component.ts +1 -0
  113. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-item.component.ts +1 -0
  114. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-label.component.ts +1 -0
  115. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.component.ts +1 -0
  116. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.component.ts +2 -0
  117. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-separator.component.ts +1 -0
  118. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.component.ts +1 -0
  119. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.component.ts +3 -0
  120. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.component.ts +30 -3
  121. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub.component.ts +4 -0
  122. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-trigger.component.ts +26 -0
  123. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu.component.ts +1 -0
  124. package/src/app/lib/components/ui/empty/empty-action.component.ts +1 -0
  125. package/src/app/lib/components/ui/empty/empty-description.component.ts +1 -0
  126. package/src/app/lib/components/ui/empty/empty-icon.component.ts +2 -1
  127. package/src/app/lib/components/ui/empty/empty-title.component.ts +1 -0
  128. package/src/app/lib/components/ui/empty/empty.component.ts +1 -0
  129. package/src/app/lib/components/ui/form/form-description.component.ts +2 -2
  130. package/src/app/lib/components/ui/hover-card/hover-card-content.component.ts +109 -60
  131. package/src/app/lib/components/ui/hover-card/hover-card-context.ts +4 -2
  132. package/src/app/lib/components/ui/hover-card/hover-card-trigger.component.ts +6 -3
  133. package/src/app/lib/components/ui/hover-card/hover-card.component.ts +9 -3
  134. package/src/app/lib/components/ui/input-group/input-group-addon.component.ts +1 -0
  135. package/src/app/lib/components/ui/input-group/input-group-input.component.ts +1 -0
  136. package/src/app/lib/components/ui/input-group/input-group.component.ts +1 -0
  137. package/src/app/lib/components/ui/input-otp/input-otp-group.component.ts +1 -0
  138. package/src/app/lib/components/ui/input-otp/input-otp-separator.component.ts +1 -0
  139. package/src/app/lib/components/ui/input-otp/input-otp-slot.component.ts +1 -0
  140. package/src/app/lib/components/ui/input-otp/input-otp.component.ts +1 -0
  141. package/src/app/lib/components/ui/kbd/kbd.component.ts +1 -0
  142. package/src/app/lib/components/ui/menubar/menubar-checkbox-item.component.ts +1 -0
  143. package/src/app/lib/components/ui/menubar/menubar-content.component.ts +2 -1
  144. package/src/app/lib/components/ui/menubar/menubar-item.component.ts +1 -0
  145. package/src/app/lib/components/ui/menubar/menubar-label.component.ts +1 -0
  146. package/src/app/lib/components/ui/menubar/menubar-menu.component.ts +1 -0
  147. package/src/app/lib/components/ui/menubar/menubar-radio-group.component.ts +1 -0
  148. package/src/app/lib/components/ui/menubar/menubar-radio-item.component.ts +1 -0
  149. package/src/app/lib/components/ui/menubar/menubar-separator.component.ts +1 -0
  150. package/src/app/lib/components/ui/menubar/menubar-shortcut.component.ts +1 -0
  151. package/src/app/lib/components/ui/menubar/menubar-sub-content.component.ts +1 -0
  152. package/src/app/lib/components/ui/menubar/menubar-sub-trigger.component.ts +1 -0
  153. package/src/app/lib/components/ui/menubar/menubar-sub.component.ts +1 -0
  154. package/src/app/lib/components/ui/menubar/menubar-trigger.component.ts +1 -0
  155. package/src/app/lib/components/ui/menubar/menubar.component.ts +1 -0
  156. package/src/app/lib/components/ui/native-select/native-select.component.ts +1 -1
  157. package/src/app/lib/components/ui/navigation-menu/navigation-menu-content.component.ts +8 -1
  158. package/src/app/lib/components/ui/navigation-menu/navigation-menu-context.ts +14 -0
  159. package/src/app/lib/components/ui/navigation-menu/navigation-menu-indicator.component.ts +1 -0
  160. package/src/app/lib/components/ui/navigation-menu/navigation-menu-item.component.ts +10 -4
  161. package/src/app/lib/components/ui/navigation-menu/navigation-menu-link.component.ts +1 -0
  162. package/src/app/lib/components/ui/navigation-menu/navigation-menu-list.component.ts +1 -0
  163. package/src/app/lib/components/ui/navigation-menu/navigation-menu-trigger.component.ts +70 -2
  164. package/src/app/lib/components/ui/navigation-menu/navigation-menu-viewport.component.ts +1 -0
  165. package/src/app/lib/components/ui/navigation-menu/navigation-menu.component.ts +36 -4
  166. package/src/app/lib/components/ui/pagination/pagination-content.component.ts +1 -0
  167. package/src/app/lib/components/ui/pagination/pagination-ellipsis.component.ts +1 -0
  168. package/src/app/lib/components/ui/pagination/pagination-item.component.ts +1 -0
  169. package/src/app/lib/components/ui/pagination/pagination-link.component.ts +1 -0
  170. package/src/app/lib/components/ui/pagination/pagination-next.component.ts +1 -0
  171. package/src/app/lib/components/ui/pagination/pagination-previous.component.ts +1 -0
  172. package/src/app/lib/components/ui/pagination/pagination.component.ts +4 -1
  173. package/src/app/lib/components/ui/popover/popover-anchor.component.ts +1 -0
  174. package/src/app/lib/components/ui/popover/popover-content.component.ts +12 -0
  175. package/src/app/lib/components/ui/popover/popover-context.ts +2 -0
  176. package/src/app/lib/components/ui/popover/popover-trigger.component.ts +1 -0
  177. package/src/app/lib/components/ui/popover/popover.component.ts +5 -0
  178. package/src/app/lib/components/ui/progress/progress.component.ts +1 -2
  179. package/src/app/lib/components/ui/resizable/resizable-handle.component.ts +1 -0
  180. package/src/app/lib/components/ui/resizable/resizable-panel-group.component.ts +1 -0
  181. package/src/app/lib/components/ui/resizable/resizable-panel.component.ts +1 -0
  182. package/src/app/lib/components/ui/scroll-area/scroll-area.component.ts +8 -6
  183. package/src/app/lib/components/ui/scroll-area/scroll-bar.component.ts +1 -0
  184. package/src/app/lib/components/ui/segmented/segmented-item.component.ts +1 -0
  185. package/src/app/lib/components/ui/segmented/segmented.component.ts +1 -0
  186. package/src/app/lib/components/ui/select/select-content.component.ts +38 -17
  187. package/src/app/lib/components/ui/select/select-context.ts +10 -0
  188. package/src/app/lib/components/ui/select/select-item.component.ts +25 -7
  189. package/src/app/lib/components/ui/select/select-trigger.component.ts +6 -13
  190. package/src/app/lib/components/ui/select/select.component.ts +46 -0
  191. package/src/app/lib/components/ui/sheet/sheet-close.component.ts +1 -0
  192. package/src/app/lib/components/ui/sheet/sheet-content.component.ts +23 -5
  193. package/src/app/lib/components/ui/sheet/sheet-description.component.ts +1 -0
  194. package/src/app/lib/components/ui/sheet/sheet-footer.component.ts +1 -0
  195. package/src/app/lib/components/ui/sheet/sheet-header.component.ts +1 -0
  196. package/src/app/lib/components/ui/sheet/sheet-title.component.ts +1 -0
  197. package/src/app/lib/components/ui/sheet/sheet-trigger.component.ts +1 -0
  198. package/src/app/lib/components/ui/sheet/sheet.component.ts +4 -0
  199. package/src/app/lib/components/ui/sidebar/sidebar-content.component.ts +1 -0
  200. package/src/app/lib/components/ui/sidebar/sidebar-footer.component.ts +1 -0
  201. package/src/app/lib/components/ui/sidebar/sidebar-group-action.component.ts +1 -0
  202. package/src/app/lib/components/ui/sidebar/sidebar-group-content.component.ts +1 -0
  203. package/src/app/lib/components/ui/sidebar/sidebar-group-label.component.ts +1 -0
  204. package/src/app/lib/components/ui/sidebar/sidebar-group.component.ts +1 -0
  205. package/src/app/lib/components/ui/sidebar/sidebar-header.component.ts +1 -0
  206. package/src/app/lib/components/ui/sidebar/sidebar-input.component.ts +1 -0
  207. package/src/app/lib/components/ui/sidebar/sidebar-inset.component.ts +1 -0
  208. package/src/app/lib/components/ui/sidebar/sidebar-menu-action.component.ts +1 -0
  209. package/src/app/lib/components/ui/sidebar/sidebar-menu-badge.component.ts +1 -0
  210. package/src/app/lib/components/ui/sidebar/sidebar-menu-button.component.ts +1 -0
  211. package/src/app/lib/components/ui/sidebar/sidebar-menu-item.component.ts +1 -0
  212. package/src/app/lib/components/ui/sidebar/sidebar-menu-skeleton.component.ts +1 -0
  213. package/src/app/lib/components/ui/sidebar/sidebar-menu-sub-button.component.ts +1 -0
  214. package/src/app/lib/components/ui/sidebar/sidebar-menu-sub-item.component.ts +1 -0
  215. package/src/app/lib/components/ui/sidebar/sidebar-menu-sub.component.ts +1 -0
  216. package/src/app/lib/components/ui/sidebar/sidebar-menu.component.ts +1 -0
  217. package/src/app/lib/components/ui/sidebar/sidebar-provider.component.ts +1 -0
  218. package/src/app/lib/components/ui/sidebar/sidebar-rail.component.ts +1 -0
  219. package/src/app/lib/components/ui/sidebar/sidebar-separator.component.ts +1 -0
  220. package/src/app/lib/components/ui/sidebar/sidebar-trigger.component.ts +1 -0
  221. package/src/app/lib/components/ui/sidebar/sidebar.component.ts +1 -0
  222. package/src/app/lib/components/ui/slider/slider.component.ts +2 -2
  223. package/src/app/lib/components/ui/sonner/index.ts +2 -0
  224. package/src/app/lib/components/ui/sonner/sonner.component.ts +70 -0
  225. package/src/app/lib/components/ui/spinner/spinner.component.ts +1 -0
  226. package/src/app/lib/components/ui/switch/switch.component.ts +1 -14
  227. package/src/app/lib/components/ui/table/table-body.component.ts +1 -0
  228. package/src/app/lib/components/ui/table/table-caption.component.ts +1 -0
  229. package/src/app/lib/components/ui/table/table-cell.component.ts +1 -0
  230. package/src/app/lib/components/ui/table/table-footer.component.ts +1 -0
  231. package/src/app/lib/components/ui/table/table-head.component.ts +1 -0
  232. package/src/app/lib/components/ui/table/table-header.component.ts +1 -0
  233. package/src/app/lib/components/ui/table/table-row.component.ts +1 -0
  234. package/src/app/lib/components/ui/table/table.component.ts +1 -0
  235. package/src/app/lib/components/ui/tabs/tabs-content.component.ts +3 -6
  236. package/src/app/lib/components/ui/tabs/tabs-list.component.ts +19 -0
  237. package/src/app/lib/components/ui/tabs/tabs-trigger.component.ts +1 -1
  238. package/src/app/lib/components/ui/tabs/tabs.component.ts +1 -0
  239. package/src/app/lib/components/ui/toast/toast-action.component.ts +1 -0
  240. package/src/app/lib/components/ui/toast/toast-description.component.ts +1 -0
  241. package/src/app/lib/components/ui/toast/toast-title.component.ts +1 -0
  242. package/src/app/lib/components/ui/toast/toast.component.ts +1 -0
  243. package/src/app/lib/components/ui/toast/toaster.component.ts +1 -0
  244. package/src/app/lib/components/ui/toggle/toggle-variants.ts +1 -1
  245. package/src/app/lib/components/ui/toggle/toggle.component.ts +12 -6
  246. package/src/app/lib/components/ui/tooltip/tooltip-content.component.ts +142 -17
  247. package/src/app/lib/components/ui/tooltip/tooltip-context.ts +3 -1
  248. package/src/app/lib/components/ui/tooltip/tooltip-provider.component.ts +5 -1
  249. package/src/app/lib/components/ui/tooltip/tooltip-trigger.component.ts +6 -2
  250. package/src/app/lib/components/ui/tooltip/tooltip.component.ts +4 -1
  251. package/src/app/lib/components/ui/typography/typography-blockquote.component.ts +1 -0
  252. package/src/app/lib/components/ui/typography/typography-h1.component.ts +1 -0
  253. package/src/app/lib/components/ui/typography/typography-h2.component.ts +1 -0
  254. package/src/app/lib/components/ui/typography/typography-h3.component.ts +1 -0
  255. package/src/app/lib/components/ui/typography/typography-h4.component.ts +1 -0
  256. package/src/app/lib/components/ui/typography/typography-inline-code.component.ts +1 -0
  257. package/src/app/lib/components/ui/typography/typography-large.component.ts +1 -0
  258. package/src/app/lib/components/ui/typography/typography-lead.component.ts +1 -0
  259. package/src/app/lib/components/ui/typography/typography-list.component.ts +1 -0
  260. package/src/app/lib/components/ui/typography/typography-muted.component.ts +1 -0
  261. package/src/app/lib/components/ui/typography/typography-p.component.ts +1 -0
  262. package/src/app/lib/components/ui/typography/typography-small.component.ts +1 -0
@@ -57,7 +57,7 @@ import { SELECT_CONTEXT } from './select-context';
57
57
  `,
58
58
  host: {
59
59
  class: 'contents',
60
- 'data-slot': 'select-trigger',
60
+ 'attr.data-slot': '"select-trigger"',
61
61
  },
62
62
  changeDetection: ChangeDetectionStrategy.OnPush,
63
63
  })
@@ -114,35 +114,28 @@ export class SelectTrigger {
114
114
  case 'ArrowDown':
115
115
  event.preventDefault();
116
116
  if (!this.context.open()) {
117
- // Save trigger element
118
117
  const button = this.triggerButton()?.nativeElement;
119
- if (button) {
120
- this.context.triggerElement.set(button);
121
- }
118
+ if (button) this.context.triggerElement.set(button);
122
119
  this.context.setOpen(true);
123
120
  setTimeout(() => this.context?.focusItem(0));
124
121
  } else {
125
- // Move to next item
126
122
  const currentIndex = this.context.focusedIndex();
127
123
  const itemCount = this.context.itemValues().length;
128
- this.context.focusItem(Math.min(currentIndex + 1, itemCount - 1));
124
+ this.context.focusItem((currentIndex + 1) % itemCount);
129
125
  }
130
126
  break;
131
127
  case 'ArrowUp':
132
128
  event.preventDefault();
133
129
  if (!this.context.open()) {
134
- // Save trigger element
135
130
  const button = this.triggerButton()?.nativeElement;
136
- if (button) {
137
- this.context.triggerElement.set(button);
138
- }
131
+ if (button) this.context.triggerElement.set(button);
139
132
  this.context.setOpen(true);
140
133
  const lastIndex = this.context.itemValues().length - 1;
141
134
  setTimeout(() => this.context?.focusItem(lastIndex));
142
135
  } else {
143
- // Move to previous item
144
136
  const currentIndex = this.context.focusedIndex();
145
- this.context.focusItem(Math.max(currentIndex - 1, 0));
137
+ const itemCount = this.context.itemValues().length;
138
+ this.context.focusItem(currentIndex > 0 ? currentIndex - 1 : itemCount - 1);
146
139
  }
147
140
  break;
148
141
  case 'Escape':
@@ -199,6 +199,11 @@ export class Select {
199
199
  private readonly _isDisabled = signal<boolean>(false);
200
200
 
201
201
  private readonly ariaIds = this._ariaIdService.generateMenuIds('select');
202
+ /** Internal typeahead signals */
203
+ private readonly _itemLabels = signal<Map<string, string>>(new Map());
204
+ private readonly _typeaheadBuffer = signal<string>('');
205
+ private readonly _typeaheadTimeout = signal<ReturnType<typeof setTimeout> | null>(null);
206
+
202
207
  /** Context for child components */
203
208
  readonly context: SelectContext = {
204
209
  value: this._value,
@@ -232,6 +237,11 @@ export class Select {
232
237
  }
233
238
  },
234
239
  focusItem: (index: number) => this.focusItemByIndex(index),
240
+ itemLabels: this._itemLabels,
241
+ typeaheadBuffer: this._typeaheadBuffer,
242
+ typeaheadTimeout: this._typeaheadTimeout,
243
+ handleTypeahead: (char: string) => this.handleTypeahead(char),
244
+ focusMatchingItem: (query: string) => this.focusMatchingItem(query),
235
245
  };
236
246
 
237
247
  /** Focus an item by index */
@@ -248,4 +258,40 @@ export class Select {
248
258
  selectItem.focus();
249
259
  }
250
260
  }
261
+
262
+ /** Handle typeahead: accumulate char, clear after 500 ms, then focus matching item */
263
+ private handleTypeahead(char: string): void {
264
+ // Clear existing timeout
265
+ const existingTimeout = this._typeaheadTimeout();
266
+ if (existingTimeout !== null) {
267
+ clearTimeout(existingTimeout);
268
+ }
269
+
270
+ const newBuffer = this._typeaheadBuffer() + char;
271
+ this._typeaheadBuffer.set(newBuffer);
272
+
273
+ const timeout = setTimeout(() => {
274
+ this._typeaheadBuffer.set('');
275
+ this._typeaheadTimeout.set(null);
276
+ }, 500);
277
+ this._typeaheadTimeout.set(timeout);
278
+
279
+ this.focusMatchingItem(newBuffer);
280
+ }
281
+
282
+ /** Focus the first item whose label starts with query (case-insensitive) */
283
+ private focusMatchingItem(query: string): void {
284
+ const values = this.context.itemValues();
285
+ const labels = this._itemLabels();
286
+ const lowerQuery = query.toLowerCase();
287
+
288
+ const matchIndex = values.findIndex((v) => {
289
+ const label = labels.get(v) ?? v;
290
+ return label.toLowerCase().startsWith(lowerQuery);
291
+ });
292
+
293
+ if (matchIndex !== -1) {
294
+ this.focusItemByIndex(matchIndex);
295
+ }
296
+ }
251
297
  }
@@ -9,6 +9,7 @@ import { SHEET_CONTEXT } from './sheet-context';
9
9
  selector: 'SheetClose',
10
10
  template: `<ng-content />`,
11
11
  host: {
12
+ 'attr.data-slot': '"sheet-close"',
12
13
  class: 'contents',
13
14
  '(click)': 'onClick($event)',
14
15
  },
@@ -76,19 +76,28 @@ import { sheetVariants, type SheetVariants } from './sheet-variants';
76
76
  </Presence>
77
77
  `,
78
78
  host: {
79
+ 'attr.data-slot': '"sheet-content"',
79
80
  class: 'contents',
80
81
  },
81
82
  changeDetection: ChangeDetectionStrategy.OnPush,
82
83
  })
83
84
  export class SheetContent implements OnDestroy {
84
85
  constructor() {
85
- // Handle body scroll lock based on open state (browser-only via effect + afterNextRender)
86
+ let wasOpen = false;
87
+
88
+ // Handle body scroll lock and focus restoration based on open state
86
89
  effect(() => {
87
90
  const isOpen = this.context.open();
88
91
  if (isOpen) {
92
+ wasOpen = true;
89
93
  this.lockBodyScroll();
90
94
  } else {
91
95
  this.unlockBodyScroll();
96
+ // Restore focus whenever sheet closes (covers close button, overlay, Escape, programmatic)
97
+ if (wasOpen) {
98
+ this.restoreFocus();
99
+ }
100
+ wasOpen = false;
92
101
  }
93
102
  });
94
103
  }
@@ -104,13 +113,14 @@ export class SheetContent implements OnDestroy {
104
113
  cn(sheetVariants({ side: this.side() }), this.class()),
105
114
  );
106
115
 
107
- /** Previous body overflow for restoration */
116
+ /** Previous body overflow/padding for restoration */
108
117
  private previousBodyOverflow = '';
118
+ private previousBodyPaddingRight = '';
109
119
 
110
120
  ngOnDestroy(): void {
111
121
  // Restore body scroll
112
122
  this.unlockBodyScroll();
113
- // Restore focus to trigger element
123
+ // Restore focus to trigger element (fallback if not already called via effect)
114
124
  this.restoreFocus();
115
125
  }
116
126
 
@@ -119,7 +129,10 @@ export class SheetContent implements OnDestroy {
119
129
  this.close();
120
130
  }
121
131
  onEscapeKey(): void {
122
- this.close();
132
+ // Guard: only close when the sheet is actually open (not during exit animation)
133
+ if (this.context.open()) {
134
+ this.close();
135
+ }
123
136
  }
124
137
  onClose(): void {
125
138
  this.close();
@@ -127,17 +140,22 @@ export class SheetContent implements OnDestroy {
127
140
 
128
141
  private lockBodyScroll(): void {
129
142
  if (typeof document !== 'undefined') {
143
+ const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
130
144
  this.previousBodyOverflow = document.body.style.overflow;
145
+ this.previousBodyPaddingRight = document.body.style.paddingRight;
131
146
  document.body.style.overflow = 'hidden';
147
+ if (scrollbarWidth > 0) {
148
+ document.body.style.paddingRight = scrollbarWidth + 'px';
149
+ }
132
150
  }
133
151
  }
134
152
  private unlockBodyScroll(): void {
135
153
  if (typeof document !== 'undefined') {
136
154
  document.body.style.overflow = this.previousBodyOverflow;
155
+ document.body.style.paddingRight = this.previousBodyPaddingRight;
137
156
  }
138
157
  }
139
158
  private close(): void {
140
- this.restoreFocus();
141
159
  this.context.setOpen(false);
142
160
  }
143
161
  private restoreFocus(): void {
@@ -11,6 +11,7 @@ import { SHEET_CONTEXT } from './sheet-context';
11
11
  selector: 'SheetDescription',
12
12
  template: `<ng-content />`,
13
13
  host: {
14
+ 'attr.data-slot': '"sheet-description"',
14
15
  '[class]': 'computedClass()',
15
16
  '[attr.id]': 'context.descriptionId',
16
17
  },
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
9
9
  selector: 'SheetFooter',
10
10
  template: `<ng-content />`,
11
11
  host: {
12
+ 'attr.data-slot': '"sheet-footer"',
12
13
  '[class]': 'computedClass()',
13
14
  },
14
15
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
9
9
  selector: 'SheetHeader',
10
10
  template: `<ng-content />`,
11
11
  host: {
12
+ 'attr.data-slot': '"sheet-header"',
12
13
  '[class]': 'computedClass()',
13
14
  },
14
15
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -11,6 +11,7 @@ import { SHEET_CONTEXT } from './sheet-context';
11
11
  selector: 'SheetTitle',
12
12
  template: `<ng-content />`,
13
13
  host: {
14
+ 'attr.data-slot': '"sheet-title"',
14
15
  '[class]': 'computedClass()',
15
16
  '[attr.id]': 'context.titleId',
16
17
  },
@@ -9,6 +9,7 @@ import { SHEET_CONTEXT } from './sheet-context';
9
9
  selector: 'SheetTrigger',
10
10
  template: `<ng-content />`,
11
11
  host: {
12
+ 'attr.data-slot': '"sheet-trigger"',
12
13
  '(click)': 'onClick($event)',
13
14
  '[attr.aria-haspopup]': '"dialog"',
14
15
  '[attr.aria-expanded]': 'context.open()',
@@ -33,6 +33,10 @@ import { SHEET_CONTEXT, type SheetContextValue } from './sheet-context';
33
33
  @Component({
34
34
  selector: 'Sheet',
35
35
  template: `<ng-content />`,
36
+ host: {
37
+ 'attr.data-slot': '"sheet"',
38
+ style: 'display: contents',
39
+ },
36
40
  providers: [
37
41
  {
38
42
  provide: SHEET_CONTEXT,
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarContent',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-content"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'content',
13
14
  },
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarFooter',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-footer"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'footer',
13
14
  },
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarGroupAction',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-group-action"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'group-action',
13
14
  },
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarGroupContent',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-group-content"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'group-content',
13
14
  },
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarGroupLabel',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-group-label"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'group-label',
13
14
  },
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarGroup',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-group"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'group',
13
14
  },
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarHeader',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-header"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'header',
13
14
  },
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarInput',
9
9
  template: ``,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-input"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'input',
13
14
  },
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarInset',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-inset"',
11
12
  '[class]': 'computedClass()',
12
13
  },
13
14
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -11,6 +11,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
11
11
  selector: 'SidebarMenuAction',
12
12
  template: `<ng-content />`,
13
13
  host: {
14
+ 'attr.data-slot': '"sidebar-menu-action"',
14
15
  '[class]': 'computedClass()',
15
16
  'data-sidebar': 'menu-action',
16
17
  '[attr.role]': '"button"',
@@ -11,6 +11,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
11
11
  selector: 'SidebarMenuBadge',
12
12
  template: `<ng-content />`,
13
13
  host: {
14
+ 'attr.data-slot': '"sidebar-menu-badge"',
14
15
  '[class]': 'computedClass()',
15
16
  'data-sidebar': 'menu-badge',
16
17
  },
@@ -12,6 +12,7 @@ import type { AriaCurrentValue } from './sidebar-context';
12
12
  selector: 'SidebarMenuButton',
13
13
  template: `<ng-content />`,
14
14
  host: {
15
+ 'attr.data-slot': '"sidebar-menu-button"',
15
16
  '[class]': 'computedClass()',
16
17
  'data-sidebar': 'menu-button',
17
18
  '[attr.data-size]': 'size()',
@@ -11,6 +11,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
11
11
  selector: 'SidebarMenuItem',
12
12
  template: `<ng-content />`,
13
13
  host: {
14
+ 'attr.data-slot': '"sidebar-menu-item"',
14
15
  '[class]': 'computedClass()',
15
16
  'data-sidebar': 'menu-item',
16
17
  '[attr.role]': '"presentation"',
@@ -13,6 +13,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
13
13
  ></div>
14
14
  `,
15
15
  host: {
16
+ 'attr.data-slot': '"sidebar-menu-skeleton"',
16
17
  '[class]': 'computedClass()',
17
18
  'data-sidebar': 'menu-skeleton',
18
19
  },
@@ -12,6 +12,7 @@ import type { AriaCurrentValue } from './sidebar-context';
12
12
  selector: 'SidebarMenuSubButton',
13
13
  template: `<ng-content />`,
14
14
  host: {
15
+ 'attr.data-slot': '"sidebar-menu-sub-button"',
15
16
  '[class]': 'computedClass()',
16
17
  'data-sidebar': 'menu-sub-button',
17
18
  '[attr.data-size]': 'size()',
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarMenuSubItem',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-menu-sub-item"',
11
12
  '[class]': 'computedClass()',
12
13
  },
13
14
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarMenuSub',
9
9
  template: `<ng-content />`,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-menu-sub"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'menu-sub',
13
14
  },
@@ -10,6 +10,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
10
10
  selector: 'SidebarMenu',
11
11
  template: `<ng-content />`,
12
12
  host: {
13
+ 'attr.data-slot': '"sidebar-menu"',
13
14
  '[class]': 'computedClass()',
14
15
  'data-sidebar': 'menu',
15
16
  '[attr.role]': '"menu"',
@@ -41,6 +41,7 @@ import {
41
41
  selector: 'SidebarProvider',
42
42
  template: `<ng-content />`,
43
43
  host: {
44
+ 'attr.data-slot': '"sidebar-provider"',
44
45
  '[class]': 'computedClass()',
45
46
  '[style.--sidebar-width]': 'sidebarWidth',
46
47
  '[style.--sidebar-width-icon]': 'SIDEBAR_WIDTH_ICON',
@@ -9,6 +9,7 @@ import { SIDEBAR_CONTEXT } from './sidebar-context';
9
9
  selector: 'SidebarRail',
10
10
  template: ``,
11
11
  host: {
12
+ 'attr.data-slot': '"sidebar-rail"',
12
13
  '[class]': 'computedClass()',
13
14
  '[attr.aria-label]': '"Toggle Sidebar"',
14
15
  '[attr.tabindex]': '-1',
@@ -8,6 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
8
8
  selector: 'SidebarSeparator',
9
9
  template: ``,
10
10
  host: {
11
+ 'attr.data-slot': '"sidebar-separator"',
11
12
  '[class]': 'computedClass()',
12
13
  'data-sidebar': 'separator',
13
14
  },
@@ -27,6 +27,7 @@ import { SIDEBAR_CONTEXT } from './sidebar-context';
27
27
  <ng-content />
28
28
  `,
29
29
  host: {
30
+ 'attr.data-slot': '"sidebar-trigger"',
30
31
  '[class]': 'computedClass()',
31
32
  '(click)': 'onClick()',
32
33
  },
@@ -52,6 +52,7 @@ import {
52
52
  }
53
53
  `,
54
54
  host: {
55
+ 'attr.data-slot': '"sidebar"',
55
56
  '[attr.data-state]': 'context.state()',
56
57
  '[attr.data-collapsible]': 'context.state() === "collapsed" ? collapsible() : ""',
57
58
  '[attr.data-variant]': 'variant()',
@@ -346,10 +346,10 @@ export class Slider implements ControlValueAccessor {
346
346
  newValue -= stepValue * increment;
347
347
  break;
348
348
  case 'ArrowUp':
349
- newValue += stepValue;
349
+ newValue += stepValue * (this.inverted() ? -1 : 1);
350
350
  break;
351
351
  case 'ArrowDown':
352
- newValue -= stepValue;
352
+ newValue -= stepValue * (this.inverted() ? -1 : 1);
353
353
  break;
354
354
  case 'PageUp':
355
355
  newValue += largeStep;
@@ -0,0 +1,2 @@
1
+ export { toast } from 'ngx-sonner';
2
+ export { Sonner } from './sonner.component';
@@ -0,0 +1,70 @@
1
+ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
2
+ import { NgxSonnerToaster } from 'ngx-sonner';
3
+
4
+ export { toast } from 'ngx-sonner';
5
+
6
+ /**
7
+ * Sonner component - toast notification toaster.
8
+ * Wraps ngx-sonner's Toaster with shadcn/ui default styling.
9
+ * Place once near the root of your app.
10
+ *
11
+ * @example
12
+ * <!-- In app root template -->
13
+ * <Sonner />
14
+ *
15
+ * <!-- With custom position -->
16
+ * <Sonner position="top-right" />
17
+ *
18
+ * <!-- Then trigger toasts anywhere -->
19
+ * import { toast } from '@/lib/components/ui/sonner';
20
+ * toast('Hello world');
21
+ * toast.success('Saved!');
22
+ * toast.error('Something went wrong');
23
+ */
24
+ @Component({
25
+ selector: 'Sonner',
26
+ imports: [NgxSonnerToaster],
27
+ changeDetection: ChangeDetectionStrategy.OnPush,
28
+ host: {
29
+ 'attr.data-slot': '"sonner"',
30
+ style: 'display: contents',
31
+ },
32
+ template: `
33
+ <ngx-sonner-toaster
34
+ [theme]="theme()"
35
+ [position]="position()"
36
+ [richColors]="richColors()"
37
+ [expand]="expand()"
38
+ [duration]="duration()"
39
+ [visibleToasts]="visibleToasts()"
40
+ [closeButton]="closeButton()"
41
+ [offset]="offset()"
42
+ [dir]="dir()"
43
+ [class]="toasterClass()"
44
+ />
45
+ `,
46
+ })
47
+ export class Sonner {
48
+ /** Visual theme */
49
+ readonly theme = input<'light' | 'dark' | 'system'>('system');
50
+ /** Position of the toaster */
51
+ readonly position = input<
52
+ 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'
53
+ >('bottom-right');
54
+ /** Use rich colors for success/error/warning/info */
55
+ readonly richColors = input<boolean>(false);
56
+ /** Expand toasts by default */
57
+ readonly expand = input<boolean>(false);
58
+ /** Default duration in ms */
59
+ readonly duration = input<number>(4000);
60
+ /** Max visible toasts */
61
+ readonly visibleToasts = input<number>(3);
62
+ /** Show close button on each toast */
63
+ readonly closeButton = input<boolean>(false);
64
+ /** Offset from edge */
65
+ readonly offset = input<string | number | null>(null);
66
+ /** Text direction */
67
+ readonly dir = input<'ltr' | 'rtl' | 'auto'>('auto');
68
+ /** Additional CSS classes passed to the toaster */
69
+ readonly toasterClass = input<string>('toaster group');
70
+ }
@@ -43,6 +43,7 @@ import { spinnerVariants, type SpinnerVariants } from './spinner-variants';
43
43
  </svg>
44
44
  `,
45
45
  host: {
46
+ 'attr.data-slot': '"spinner"',
46
47
  role: 'status',
47
48
  'aria-label': 'Loading',
48
49
  '[attr.aria-busy]': 'true',
@@ -103,9 +103,7 @@ export type SwitchProps = {
103
103
  [attr.data-disabled]="isDisabled() ? '' : null"
104
104
  [disabled]="isDisabled()"
105
105
  [class]="trackClass()"
106
- [style.backgroundColor]="checked() ? checkedBgColor() : 'var(--color-input)'"
107
106
  (click)="toggle()"
108
- (keydown)="onKeyDown($event)"
109
107
  >
110
108
  <span data-slot="switch-thumb" [class]="thumbClass()" [attr.data-state]="state()"></span>
111
109
  </button>
@@ -125,7 +123,7 @@ export type SwitchProps = {
125
123
  `,
126
124
  host: {
127
125
  '[class]': 'computedClass()',
128
- 'data-slot': 'switch',
126
+ 'attr.data-slot': '"switch"',
129
127
  },
130
128
  providers: [
131
129
  {
@@ -168,9 +166,6 @@ export class Switch implements ControlValueAccessor {
168
166
  readonly class = input<string>('');
169
167
  /** Additional CSS classes to apply to the inner track button */
170
168
  readonly buttonClass = input<string>('');
171
- /** Background color for checked state (hex, rgb, or CSS color name) */
172
- readonly checkedBgColor = input<string>('rgb(59, 130, 246)');
173
-
174
169
  /** Current state for data attribute */
175
170
  protected readonly state = computed(
176
171
  (): SwitchState => (this.checked() ? 'checked' : 'unchecked'),
@@ -246,12 +241,4 @@ export class Switch implements ControlValueAccessor {
246
241
  }
247
242
  }
248
243
 
249
- /** Handle keyboard events */
250
- protected onKeyDown(event: KeyboardEvent): void {
251
- // Switch should only respond to Space (Enter is handled by button default)
252
- if (event.key === ' ') {
253
- // Let the click handler deal with it
254
- return;
255
- }
256
- }
257
244
  }
@@ -11,6 +11,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
11
11
  <ng-content />
12
12
  </tbody>`,
13
13
  host: {
14
+ 'attr.data-slot': '"table-body"',
14
15
  class: 'contents',
15
16
  },
16
17
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -11,6 +11,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
11
11
  <ng-content />
12
12
  </caption>`,
13
13
  host: {
14
+ 'attr.data-slot': '"table-caption"',
14
15
  class: 'contents',
15
16
  },
16
17
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
9
9
  selector: 'TableCell',
10
10
  template: `<td [class]="computedClass()"><ng-content /></td>`,
11
11
  host: {
12
+ 'attr.data-slot': '"table-cell"',
12
13
  class: 'contents',
13
14
  },
14
15
  changeDetection: ChangeDetectionStrategy.OnPush,