@ng-cn/core 1.0.15 → 1.0.17

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 (380) hide show
  1. package/package.json +34 -33
  2. package/schematics/component/index.js +454 -95
  3. package/schematics/component/index.ts +459 -98
  4. package/schematics/ng-add/index.js +539 -55
  5. package/schematics/ng-add/index.ts +555 -62
  6. package/schematics/ng-add/schema.json +8 -2
  7. package/schematics/test-schematic.js +1 -2
  8. package/src/app/lib/components/ui/.gitkeep +0 -0
  9. package/src/app/lib/components/ui/accordion/accordion-content.component.ts +16 -24
  10. package/src/app/lib/components/ui/accordion/accordion-context.ts +4 -9
  11. package/src/app/lib/components/ui/accordion/accordion-item.component.ts +33 -29
  12. package/src/app/lib/components/ui/accordion/accordion-trigger.component.ts +11 -14
  13. package/src/app/lib/components/ui/accordion/accordion.component.ts +60 -49
  14. package/src/app/lib/components/ui/accordion/index.ts +5 -6
  15. package/src/app/lib/components/ui/alert/alert-description.component.ts +3 -8
  16. package/src/app/lib/components/ui/alert/alert-title.component.ts +2 -7
  17. package/src/app/lib/components/ui/alert/alert-variants.ts +19 -5
  18. package/src/app/lib/components/ui/alert/alert.component.ts +2 -10
  19. package/src/app/lib/components/ui/alert/index.ts +0 -1
  20. package/src/app/lib/components/ui/alert-dialog/alert-dialog-action.component.ts +5 -12
  21. package/src/app/lib/components/ui/alert-dialog/alert-dialog-cancel.component.ts +5 -11
  22. package/src/app/lib/components/ui/alert-dialog/alert-dialog-content.component.ts +63 -66
  23. package/src/app/lib/components/ui/alert-dialog/alert-dialog-context.ts +10 -5
  24. package/src/app/lib/components/ui/alert-dialog/alert-dialog-description.component.ts +5 -10
  25. package/src/app/lib/components/ui/alert-dialog/alert-dialog-footer.component.ts +3 -7
  26. package/src/app/lib/components/ui/alert-dialog/alert-dialog-header.component.ts +3 -7
  27. package/src/app/lib/components/ui/alert-dialog/alert-dialog-title.component.ts +5 -12
  28. package/src/app/lib/components/ui/alert-dialog/alert-dialog-trigger.component.ts +8 -12
  29. package/src/app/lib/components/ui/alert-dialog/alert-dialog.component.ts +28 -34
  30. package/src/app/lib/components/ui/alert-dialog/index.ts +0 -1
  31. package/src/app/lib/components/ui/aspect-ratio/aspect-ratio.component.ts +3 -9
  32. package/src/app/lib/components/ui/avatar/avatar-context.ts +9 -0
  33. package/src/app/lib/components/ui/avatar/avatar-fallback.component.ts +7 -18
  34. package/src/app/lib/components/ui/avatar/avatar-image.component.ts +39 -17
  35. package/src/app/lib/components/ui/avatar/avatar.component.ts +17 -20
  36. package/src/app/lib/components/ui/avatar/index.ts +1 -1
  37. package/src/app/lib/components/ui/avatar/ui-avatar.component.ts +9 -30
  38. package/src/app/lib/components/ui/badge/badge-variants.ts +5 -5
  39. package/src/app/lib/components/ui/badge/badge.component.ts +4 -8
  40. package/src/app/lib/components/ui/badge/index.ts +0 -1
  41. package/src/app/lib/components/ui/breadcrumb/breadcrumb-ellipsis.component.ts +3 -7
  42. package/src/app/lib/components/ui/breadcrumb/breadcrumb-item.component.ts +5 -14
  43. package/src/app/lib/components/ui/breadcrumb/breadcrumb-link.component.ts +6 -18
  44. package/src/app/lib/components/ui/breadcrumb/breadcrumb-list.component.ts +6 -15
  45. package/src/app/lib/components/ui/breadcrumb/breadcrumb-page.component.ts +3 -7
  46. package/src/app/lib/components/ui/breadcrumb/breadcrumb-separator.component.ts +22 -31
  47. package/src/app/lib/components/ui/breadcrumb/breadcrumb.component.ts +3 -9
  48. package/src/app/lib/components/ui/breadcrumb/index.ts +0 -1
  49. package/src/app/lib/components/ui/button/button-variants.ts +6 -8
  50. package/src/app/lib/components/ui/button/button.component.ts +4 -8
  51. package/src/app/lib/components/ui/button/index.ts +0 -1
  52. package/src/app/lib/components/ui/button-group/button-group-variants.ts +12 -15
  53. package/src/app/lib/components/ui/button-group/button-group.component.ts +6 -14
  54. package/src/app/lib/components/ui/button-group/index.ts +1 -5
  55. package/src/app/lib/components/ui/calendar/calendar.component.ts +103 -115
  56. package/src/app/lib/components/ui/card/card-action.component.ts +2 -10
  57. package/src/app/lib/components/ui/card/card-content.component.ts +1 -6
  58. package/src/app/lib/components/ui/card/card-description.component.ts +2 -7
  59. package/src/app/lib/components/ui/card/card-footer.component.ts +2 -7
  60. package/src/app/lib/components/ui/card/card-header.component.ts +3 -8
  61. package/src/app/lib/components/ui/card/card-title.component.ts +2 -9
  62. package/src/app/lib/components/ui/card/card.component.ts +3 -8
  63. package/src/app/lib/components/ui/card/index.ts +0 -1
  64. package/src/app/lib/components/ui/carousel/carousel-content.component.ts +3 -9
  65. package/src/app/lib/components/ui/carousel/carousel-item.component.ts +5 -5
  66. package/src/app/lib/components/ui/carousel/carousel-next.component.ts +9 -8
  67. package/src/app/lib/components/ui/carousel/carousel-previous.component.ts +9 -8
  68. package/src/app/lib/components/ui/carousel/carousel.component.ts +14 -25
  69. package/src/app/lib/components/ui/carousel/index.ts +5 -2
  70. package/src/app/lib/components/ui/chart/chart-container.component.ts +20 -26
  71. package/src/app/lib/components/ui/chart/chart-legend-content.component.ts +6 -16
  72. package/src/app/lib/components/ui/chart/chart-legend.component.ts +2 -7
  73. package/src/app/lib/components/ui/chart/chart-tooltip-content.component.ts +2 -9
  74. package/src/app/lib/components/ui/chart/chart-tooltip.component.ts +2 -7
  75. package/src/app/lib/components/ui/chart/chart.component.ts +12 -32
  76. package/src/app/lib/components/ui/chart/index.ts +7 -8
  77. package/src/app/lib/components/ui/checkbox/checkbox.component.ts +55 -74
  78. package/src/app/lib/components/ui/collapsible/collapsible-content.component.ts +16 -25
  79. package/src/app/lib/components/ui/collapsible/collapsible-context.ts +0 -8
  80. package/src/app/lib/components/ui/collapsible/collapsible-trigger.component.ts +6 -16
  81. package/src/app/lib/components/ui/collapsible/collapsible.component.ts +29 -33
  82. package/src/app/lib/components/ui/collapsible/index.ts +0 -1
  83. package/src/app/lib/components/ui/combobox/combobox-content.component.ts +8 -15
  84. package/src/app/lib/components/ui/combobox/combobox-context.ts +5 -4
  85. package/src/app/lib/components/ui/combobox/combobox-empty.component.ts +5 -12
  86. package/src/app/lib/components/ui/combobox/combobox-group.component.ts +3 -7
  87. package/src/app/lib/components/ui/combobox/combobox-input.component.ts +25 -25
  88. package/src/app/lib/components/ui/combobox/combobox-item.component.ts +45 -44
  89. package/src/app/lib/components/ui/combobox/combobox-list.component.ts +14 -12
  90. package/src/app/lib/components/ui/combobox/combobox-trigger.component.ts +24 -14
  91. package/src/app/lib/components/ui/combobox/combobox-value.component.ts +27 -22
  92. package/src/app/lib/components/ui/combobox/combobox.component.ts +74 -54
  93. package/src/app/lib/components/ui/combobox/index.ts +1 -6
  94. package/src/app/lib/components/ui/command/command-context.ts +1 -5
  95. package/src/app/lib/components/ui/command/command-dialog.component.ts +12 -14
  96. package/src/app/lib/components/ui/command/command-empty.component.ts +2 -3
  97. package/src/app/lib/components/ui/command/command-group.component.ts +32 -25
  98. package/src/app/lib/components/ui/command/command-input.component.ts +29 -28
  99. package/src/app/lib/components/ui/command/command-item.component.ts +46 -58
  100. package/src/app/lib/components/ui/command/command-list.component.ts +5 -4
  101. package/src/app/lib/components/ui/command/command-separator.component.ts +2 -3
  102. package/src/app/lib/components/ui/command/command-shortcut.component.ts +2 -1
  103. package/src/app/lib/components/ui/command/command.component.ts +33 -22
  104. package/src/app/lib/components/ui/command/index.ts +0 -1
  105. package/src/app/lib/components/ui/context-menu/context-menu-checkbox-item.component.ts +20 -11
  106. package/src/app/lib/components/ui/context-menu/context-menu-content.component.ts +36 -43
  107. package/src/app/lib/components/ui/context-menu/context-menu-context.ts +1 -1
  108. package/src/app/lib/components/ui/context-menu/context-menu-item.component.ts +12 -13
  109. package/src/app/lib/components/ui/context-menu/context-menu-label.component.ts +2 -5
  110. package/src/app/lib/components/ui/context-menu/context-menu-radio-group.component.ts +9 -2
  111. package/src/app/lib/components/ui/context-menu/context-menu-radio-item.component.ts +14 -14
  112. package/src/app/lib/components/ui/context-menu/context-menu-separator.component.ts +2 -3
  113. package/src/app/lib/components/ui/context-menu/context-menu-shortcut.component.ts +2 -1
  114. package/src/app/lib/components/ui/context-menu/context-menu-sub-content.component.ts +5 -5
  115. package/src/app/lib/components/ui/context-menu/context-menu-sub-trigger.component.ts +8 -7
  116. package/src/app/lib/components/ui/context-menu/context-menu-sub.component.ts +9 -2
  117. package/src/app/lib/components/ui/context-menu/context-menu-trigger.component.ts +8 -7
  118. package/src/app/lib/components/ui/context-menu/context-menu.component.ts +1 -0
  119. package/src/app/lib/components/ui/context-menu/index.ts +15 -4
  120. package/src/app/lib/components/ui/data-table/data-table-content.component.ts +22 -28
  121. package/src/app/lib/components/ui/data-table/data-table-context.ts +1 -3
  122. package/src/app/lib/components/ui/data-table/data-table-pagination.component.ts +17 -27
  123. package/src/app/lib/components/ui/data-table/data-table-search.component.ts +6 -14
  124. package/src/app/lib/components/ui/data-table/data-table-toolbar.component.ts +3 -7
  125. package/src/app/lib/components/ui/data-table/data-table-view-options.component.ts +11 -20
  126. package/src/app/lib/components/ui/data-table/data-table.component.ts +41 -49
  127. package/src/app/lib/components/ui/data-table/index.ts +7 -8
  128. package/src/app/lib/components/ui/date-picker/date-picker.component.ts +24 -24
  129. package/src/app/lib/components/ui/dialog/dialog-close.component.ts +4 -8
  130. package/src/app/lib/components/ui/dialog/dialog-content.component.ts +72 -73
  131. package/src/app/lib/components/ui/dialog/dialog-context.ts +7 -5
  132. package/src/app/lib/components/ui/dialog/dialog-description.component.ts +5 -10
  133. package/src/app/lib/components/ui/dialog/dialog-footer.component.ts +3 -7
  134. package/src/app/lib/components/ui/dialog/dialog-header.component.ts +3 -7
  135. package/src/app/lib/components/ui/dialog/dialog-title.component.ts +5 -10
  136. package/src/app/lib/components/ui/dialog/dialog-trigger.component.ts +7 -11
  137. package/src/app/lib/components/ui/dialog/dialog.component.ts +29 -34
  138. package/src/app/lib/components/ui/dialog/index.ts +0 -1
  139. package/src/app/lib/components/ui/drawer/drawer-close.component.ts +4 -8
  140. package/src/app/lib/components/ui/drawer/drawer-content.component.ts +39 -35
  141. package/src/app/lib/components/ui/drawer/drawer-description.component.ts +5 -10
  142. package/src/app/lib/components/ui/drawer/drawer-footer.component.ts +3 -7
  143. package/src/app/lib/components/ui/drawer/drawer-header.component.ts +3 -7
  144. package/src/app/lib/components/ui/drawer/drawer-title.component.ts +5 -10
  145. package/src/app/lib/components/ui/drawer/drawer-trigger.component.ts +7 -11
  146. package/src/app/lib/components/ui/drawer/drawer.component.ts +25 -26
  147. package/src/app/lib/components/ui/drawer/index.ts +0 -1
  148. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.component.ts +20 -11
  149. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-content.component.ts +96 -61
  150. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-context.ts +1 -1
  151. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-group.component.ts +1 -0
  152. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-item.component.ts +10 -11
  153. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-label.component.ts +2 -5
  154. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.component.ts +14 -5
  155. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.component.ts +14 -14
  156. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-separator.component.ts +2 -3
  157. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.component.ts +2 -1
  158. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.component.ts +5 -5
  159. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.component.ts +8 -7
  160. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-sub.component.ts +9 -2
  161. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu-trigger.component.ts +6 -5
  162. package/src/app/lib/components/ui/dropdown-menu/dropdown-menu.component.ts +1 -0
  163. package/src/app/lib/components/ui/dropdown-menu/index.ts +10 -3
  164. package/src/app/lib/components/ui/empty/empty-action.component.ts +2 -9
  165. package/src/app/lib/components/ui/empty/empty-description.component.ts +2 -10
  166. package/src/app/lib/components/ui/empty/empty-icon.component.ts +3 -8
  167. package/src/app/lib/components/ui/empty/empty-title.component.ts +2 -9
  168. package/src/app/lib/components/ui/empty/empty.component.ts +3 -8
  169. package/src/app/lib/components/ui/empty/index.ts +0 -1
  170. package/src/app/lib/components/ui/form/form-context.ts +1 -11
  171. package/src/app/lib/components/ui/form/form-control.component.ts +22 -22
  172. package/src/app/lib/components/ui/form/form-description.component.ts +4 -10
  173. package/src/app/lib/components/ui/form/form-field.component.ts +7 -10
  174. package/src/app/lib/components/ui/form/form-item.component.ts +2 -12
  175. package/src/app/lib/components/ui/form/form-label.component.ts +15 -15
  176. package/src/app/lib/components/ui/form/form-message.component.ts +7 -15
  177. package/src/app/lib/components/ui/form/form.component.ts +9 -20
  178. package/src/app/lib/components/ui/form/index.ts +4 -5
  179. package/src/app/lib/components/ui/hover-card/hover-card-content.component.ts +21 -33
  180. package/src/app/lib/components/ui/hover-card/hover-card-context.ts +0 -8
  181. package/src/app/lib/components/ui/hover-card/hover-card-trigger.component.ts +17 -26
  182. package/src/app/lib/components/ui/hover-card/hover-card.component.ts +18 -28
  183. package/src/app/lib/components/ui/hover-card/index.ts +9 -6
  184. package/src/app/lib/components/ui/input/input.component.ts +57 -75
  185. package/src/app/lib/components/ui/input-group/index.ts +0 -1
  186. package/src/app/lib/components/ui/input-group/input-group-addon.component.ts +4 -11
  187. package/src/app/lib/components/ui/input-group/input-group-input.component.ts +3 -8
  188. package/src/app/lib/components/ui/input-group/input-group.component.ts +4 -9
  189. package/src/app/lib/components/ui/input-otp/index.ts +4 -5
  190. package/src/app/lib/components/ui/input-otp/input-otp-context.ts +0 -8
  191. package/src/app/lib/components/ui/input-otp/input-otp-group.component.ts +2 -3
  192. package/src/app/lib/components/ui/input-otp/input-otp-separator.component.ts +4 -3
  193. package/src/app/lib/components/ui/input-otp/input-otp-slot.component.ts +8 -10
  194. package/src/app/lib/components/ui/input-otp/input-otp.component.ts +27 -45
  195. package/src/app/lib/components/ui/kbd/index.ts +0 -1
  196. package/src/app/lib/components/ui/kbd/kbd-variants.ts +1 -1
  197. package/src/app/lib/components/ui/kbd/kbd.component.ts +4 -8
  198. package/src/app/lib/components/ui/label/label.component.ts +15 -28
  199. package/src/app/lib/components/ui/menubar/index.ts +11 -8
  200. package/src/app/lib/components/ui/menubar/menubar-checkbox-item.component.ts +21 -12
  201. package/src/app/lib/components/ui/menubar/menubar-content.component.ts +46 -53
  202. package/src/app/lib/components/ui/menubar/menubar-context.ts +3 -9
  203. package/src/app/lib/components/ui/menubar/menubar-item.component.ts +13 -14
  204. package/src/app/lib/components/ui/menubar/menubar-label.component.ts +2 -5
  205. package/src/app/lib/components/ui/menubar/menubar-menu.component.ts +14 -2
  206. package/src/app/lib/components/ui/menubar/menubar-radio-group.component.ts +9 -2
  207. package/src/app/lib/components/ui/menubar/menubar-radio-item.component.ts +13 -13
  208. package/src/app/lib/components/ui/menubar/menubar-separator.component.ts +2 -3
  209. package/src/app/lib/components/ui/menubar/menubar-shortcut.component.ts +2 -1
  210. package/src/app/lib/components/ui/menubar/menubar-sub-content.component.ts +5 -5
  211. package/src/app/lib/components/ui/menubar/menubar-sub-trigger.component.ts +7 -6
  212. package/src/app/lib/components/ui/menubar/menubar-sub.component.ts +8 -1
  213. package/src/app/lib/components/ui/menubar/menubar-trigger.component.ts +26 -21
  214. package/src/app/lib/components/ui/menubar/menubar.component.ts +6 -13
  215. package/src/app/lib/components/ui/native-select/index.ts +1 -5
  216. package/src/app/lib/components/ui/native-select/native-select-variants.ts +1 -1
  217. package/src/app/lib/components/ui/native-select/native-select.component.ts +14 -15
  218. package/src/app/lib/components/ui/navigation-menu/index.ts +10 -8
  219. package/src/app/lib/components/ui/navigation-menu/navigation-menu-content.component.ts +18 -13
  220. package/src/app/lib/components/ui/navigation-menu/navigation-menu-context.ts +2 -10
  221. package/src/app/lib/components/ui/navigation-menu/navigation-menu-indicator.component.ts +3 -2
  222. package/src/app/lib/components/ui/navigation-menu/navigation-menu-item.component.ts +6 -1
  223. package/src/app/lib/components/ui/navigation-menu/navigation-menu-link.component.ts +3 -8
  224. package/src/app/lib/components/ui/navigation-menu/navigation-menu-list.component.ts +2 -4
  225. package/src/app/lib/components/ui/navigation-menu/navigation-menu-trigger-style.ts +1 -1
  226. package/src/app/lib/components/ui/navigation-menu/navigation-menu-trigger.component.ts +8 -7
  227. package/src/app/lib/components/ui/navigation-menu/navigation-menu-viewport.component.ts +3 -2
  228. package/src/app/lib/components/ui/navigation-menu/navigation-menu.component.ts +8 -15
  229. package/src/app/lib/components/ui/pagination/index.ts +0 -1
  230. package/src/app/lib/components/ui/pagination/pagination-content.component.ts +3 -7
  231. package/src/app/lib/components/ui/pagination/pagination-ellipsis.component.ts +3 -7
  232. package/src/app/lib/components/ui/pagination/pagination-item.component.ts +3 -9
  233. package/src/app/lib/components/ui/pagination/pagination-link.component.ts +4 -8
  234. package/src/app/lib/components/ui/pagination/pagination-next.component.ts +3 -11
  235. package/src/app/lib/components/ui/pagination/pagination-previous.component.ts +3 -11
  236. package/src/app/lib/components/ui/pagination/pagination.component.ts +3 -7
  237. package/src/app/lib/components/ui/popover/index.ts +9 -6
  238. package/src/app/lib/components/ui/popover/popover-anchor.component.ts +2 -13
  239. package/src/app/lib/components/ui/popover/popover-content.component.ts +119 -69
  240. package/src/app/lib/components/ui/popover/popover-context.ts +0 -8
  241. package/src/app/lib/components/ui/popover/popover-trigger.component.ts +22 -22
  242. package/src/app/lib/components/ui/popover/popover.component.ts +20 -33
  243. package/src/app/lib/components/ui/progress/index.ts +1 -6
  244. package/src/app/lib/components/ui/progress/progress.component.ts +15 -30
  245. package/src/app/lib/components/ui/radio-group/index.ts +1 -4
  246. package/src/app/lib/components/ui/radio-group/radio-group-context.ts +1 -7
  247. package/src/app/lib/components/ui/radio-group/radio-group-item.component.ts +36 -69
  248. package/src/app/lib/components/ui/radio-group/radio-group.component.ts +38 -67
  249. package/src/app/lib/components/ui/resizable/index.ts +0 -1
  250. package/src/app/lib/components/ui/resizable/resizable-handle.component.ts +25 -39
  251. package/src/app/lib/components/ui/resizable/resizable-panel-group.component.ts +15 -18
  252. package/src/app/lib/components/ui/resizable/resizable-panel.component.ts +12 -31
  253. package/src/app/lib/components/ui/scroll-area/index.ts +4 -5
  254. package/src/app/lib/components/ui/scroll-area/scroll-area.component.ts +5 -19
  255. package/src/app/lib/components/ui/scroll-area/scroll-bar.component.ts +8 -27
  256. package/src/app/lib/components/ui/segmented/index.ts +5 -9
  257. package/src/app/lib/components/ui/segmented/segmented-context.ts +1 -3
  258. package/src/app/lib/components/ui/segmented/segmented-item.component.ts +21 -29
  259. package/src/app/lib/components/ui/segmented/segmented-variants.ts +2 -2
  260. package/src/app/lib/components/ui/segmented/segmented.component.ts +24 -32
  261. package/src/app/lib/components/ui/select/index.ts +5 -6
  262. package/src/app/lib/components/ui/select/select-content.component.ts +34 -62
  263. package/src/app/lib/components/ui/select/select-context.ts +4 -14
  264. package/src/app/lib/components/ui/select/select-group.component.ts +6 -7
  265. package/src/app/lib/components/ui/select/select-item.component.ts +46 -55
  266. package/src/app/lib/components/ui/select/select-label.component.ts +2 -7
  267. package/src/app/lib/components/ui/select/select-separator.component.ts +3 -8
  268. package/src/app/lib/components/ui/select/select-trigger.component.ts +28 -25
  269. package/src/app/lib/components/ui/select/select-value.component.ts +7 -13
  270. package/src/app/lib/components/ui/select/select.component.ts +52 -64
  271. package/src/app/lib/components/ui/separator/index.ts +1 -6
  272. package/src/app/lib/components/ui/separator/separator.component.ts +4 -19
  273. package/src/app/lib/components/ui/sheet/index.ts +0 -1
  274. package/src/app/lib/components/ui/sheet/sheet-close.component.ts +4 -8
  275. package/src/app/lib/components/ui/sheet/sheet-content.component.ts +31 -36
  276. package/src/app/lib/components/ui/sheet/sheet-description.component.ts +5 -10
  277. package/src/app/lib/components/ui/sheet/sheet-footer.component.ts +3 -7
  278. package/src/app/lib/components/ui/sheet/sheet-header.component.ts +3 -7
  279. package/src/app/lib/components/ui/sheet/sheet-title.component.ts +5 -10
  280. package/src/app/lib/components/ui/sheet/sheet-trigger.component.ts +7 -11
  281. package/src/app/lib/components/ui/sheet/sheet-variants.ts +1 -1
  282. package/src/app/lib/components/ui/sheet/sheet.component.ts +36 -36
  283. package/src/app/lib/components/ui/sidebar/index.ts +14 -15
  284. package/src/app/lib/components/ui/sidebar/sidebar-content.component.ts +4 -8
  285. package/src/app/lib/components/ui/sidebar/sidebar-context.ts +1 -3
  286. package/src/app/lib/components/ui/sidebar/sidebar-footer.component.ts +3 -9
  287. package/src/app/lib/components/ui/sidebar/sidebar-group-action.component.ts +4 -8
  288. package/src/app/lib/components/ui/sidebar/sidebar-group-content.component.ts +3 -9
  289. package/src/app/lib/components/ui/sidebar/sidebar-group-label.component.ts +4 -8
  290. package/src/app/lib/components/ui/sidebar/sidebar-group.component.ts +3 -7
  291. package/src/app/lib/components/ui/sidebar/sidebar-header.component.ts +3 -9
  292. package/src/app/lib/components/ui/sidebar/sidebar-input.component.ts +4 -8
  293. package/src/app/lib/components/ui/sidebar/sidebar-inset.component.ts +4 -8
  294. package/src/app/lib/components/ui/sidebar/sidebar-menu-action.component.ts +4 -8
  295. package/src/app/lib/components/ui/sidebar/sidebar-menu-badge.component.ts +4 -8
  296. package/src/app/lib/components/ui/sidebar/sidebar-menu-button.component.ts +4 -9
  297. package/src/app/lib/components/ui/sidebar/sidebar-menu-item.component.ts +3 -9
  298. package/src/app/lib/components/ui/sidebar/sidebar-menu-skeleton.component.ts +6 -11
  299. package/src/app/lib/components/ui/sidebar/sidebar-menu-sub-button.component.ts +4 -8
  300. package/src/app/lib/components/ui/sidebar/sidebar-menu-sub-item.component.ts +2 -6
  301. package/src/app/lib/components/ui/sidebar/sidebar-menu-sub.component.ts +4 -8
  302. package/src/app/lib/components/ui/sidebar/sidebar-menu.component.ts +3 -7
  303. package/src/app/lib/components/ui/sidebar/sidebar-provider.component.ts +46 -52
  304. package/src/app/lib/components/ui/sidebar/sidebar-rail.component.ts +6 -11
  305. package/src/app/lib/components/ui/sidebar/sidebar-route-active.service.ts +17 -17
  306. package/src/app/lib/components/ui/sidebar/sidebar-separator.component.ts +3 -7
  307. package/src/app/lib/components/ui/sidebar/sidebar-trigger.component.ts +6 -11
  308. package/src/app/lib/components/ui/sidebar/sidebar.component.ts +20 -31
  309. package/src/app/lib/components/ui/skeleton/skeleton.component.ts +3 -8
  310. package/src/app/lib/components/ui/slider/index.ts +1 -6
  311. package/src/app/lib/components/ui/slider/slider.component.ts +73 -138
  312. package/src/app/lib/components/ui/spinner/index.ts +0 -1
  313. package/src/app/lib/components/ui/spinner/spinner-variants.ts +19 -22
  314. package/src/app/lib/components/ui/spinner/spinner.component.ts +4 -8
  315. package/src/app/lib/components/ui/switch/index.ts +1 -6
  316. package/src/app/lib/components/ui/switch/switch.component.ts +83 -108
  317. package/src/app/lib/components/ui/table/index.ts +0 -1
  318. package/src/app/lib/components/ui/table/table-body.component.ts +6 -10
  319. package/src/app/lib/components/ui/table/table-caption.component.ts +6 -8
  320. package/src/app/lib/components/ui/table/table-cell.component.ts +4 -8
  321. package/src/app/lib/components/ui/table/table-footer.component.ts +6 -8
  322. package/src/app/lib/components/ui/table/table-head.component.ts +4 -8
  323. package/src/app/lib/components/ui/table/table-header.component.ts +6 -10
  324. package/src/app/lib/components/ui/table/table-row.component.ts +6 -11
  325. package/src/app/lib/components/ui/table/table.component.ts +4 -8
  326. package/src/app/lib/components/ui/tabs/index.ts +14 -7
  327. package/src/app/lib/components/ui/tabs/tabs-content.component.ts +11 -36
  328. package/src/app/lib/components/ui/tabs/tabs-context.ts +0 -8
  329. package/src/app/lib/components/ui/tabs/tabs-list.component.ts +54 -60
  330. package/src/app/lib/components/ui/tabs/tabs-trigger.component.ts +20 -35
  331. package/src/app/lib/components/ui/tabs/tabs.component.ts +32 -49
  332. package/src/app/lib/components/ui/textarea/textarea.component.ts +3 -8
  333. package/src/app/lib/components/ui/toast/index.ts +6 -7
  334. package/src/app/lib/components/ui/toast/toast-action.component.ts +7 -18
  335. package/src/app/lib/components/ui/toast/toast-description.component.ts +2 -11
  336. package/src/app/lib/components/ui/toast/toast-title.component.ts +2 -9
  337. package/src/app/lib/components/ui/toast/toast-variants.ts +1 -1
  338. package/src/app/lib/components/ui/toast/toast.component.ts +18 -24
  339. package/src/app/lib/components/ui/toast/toast.service.ts +22 -37
  340. package/src/app/lib/components/ui/toast/toaster.component.ts +6 -16
  341. package/src/app/lib/components/ui/toggle/index.ts +1 -5
  342. package/src/app/lib/components/ui/toggle/toggle-variants.ts +2 -2
  343. package/src/app/lib/components/ui/toggle/toggle.component.ts +32 -51
  344. package/src/app/lib/components/ui/toggle-group/index.ts +1 -4
  345. package/src/app/lib/components/ui/toggle-group/toggle-group-context.ts +1 -7
  346. package/src/app/lib/components/ui/toggle-group/toggle-group-item.component.ts +38 -59
  347. package/src/app/lib/components/ui/toggle-group/toggle-group.component.ts +33 -51
  348. package/src/app/lib/components/ui/tooltip/index.ts +9 -6
  349. package/src/app/lib/components/ui/tooltip/tooltip-content.component.ts +6 -24
  350. package/src/app/lib/components/ui/tooltip/tooltip-context.ts +0 -8
  351. package/src/app/lib/components/ui/tooltip/tooltip-provider.component.ts +12 -24
  352. package/src/app/lib/components/ui/tooltip/tooltip-trigger.component.ts +4 -21
  353. package/src/app/lib/components/ui/tooltip/tooltip.component.ts +21 -33
  354. package/src/app/lib/components/ui/typography/index.ts +0 -1
  355. package/src/app/lib/components/ui/typography/typography-blockquote.component.ts +3 -7
  356. package/src/app/lib/components/ui/typography/typography-h1.component.ts +3 -10
  357. package/src/app/lib/components/ui/typography/typography-h2.component.ts +3 -10
  358. package/src/app/lib/components/ui/typography/typography-h3.component.ts +3 -7
  359. package/src/app/lib/components/ui/typography/typography-h4.component.ts +3 -7
  360. package/src/app/lib/components/ui/typography/typography-inline-code.component.ts +4 -8
  361. package/src/app/lib/components/ui/typography/typography-large.component.ts +3 -9
  362. package/src/app/lib/components/ui/typography/typography-lead.component.ts +3 -7
  363. package/src/app/lib/components/ui/typography/typography-list.component.ts +3 -7
  364. package/src/app/lib/components/ui/typography/typography-muted.component.ts +3 -7
  365. package/src/app/lib/components/ui/typography/typography-p.component.ts +3 -7
  366. package/src/app/lib/components/ui/typography/typography-small.component.ts +3 -7
  367. package/src/app/lib/utils/accessibility/click-outside.directive.ts +1 -8
  368. package/src/app/lib/utils/accessibility/focus-management.service.ts +4 -15
  369. package/src/app/lib/utils/accessibility/focus-trap.directive.ts +32 -106
  370. package/src/app/lib/utils/accessibility/index.ts +16 -5
  371. package/src/app/lib/utils/accessibility/keyboard-navigation.directive.ts +5 -8
  372. package/src/app/lib/utils/accessibility/live-region.directive.ts +10 -13
  373. package/src/app/lib/utils/accessibility/touch-target.directive.ts +1 -8
  374. package/src/app/lib/utils/animation/animation.utils.ts +4 -7
  375. package/src/app/lib/utils/animation/index.ts +15 -5
  376. package/src/app/lib/utils/animation/presence.component.ts +1 -1
  377. package/src/app/lib/utils/animation/presence.directive.ts +2 -2
  378. package/src/app/lib/utils/positioning/index.ts +40 -18
  379. package/src/app/lib/components/ui/index.ts +0 -551
  380. package/src/app/lib/index.ts +0 -7
@@ -1,13 +1,13 @@
1
1
  import { cn, Presence } from '@/lib/utils';
2
2
  import { FocusTrapDirective } from '@/lib/utils/accessibility';
3
3
  import {
4
- ChangeDetectionStrategy,
5
- Component,
6
- computed,
7
- effect,
8
- inject,
9
- input,
10
- OnDestroy
4
+ ChangeDetectionStrategy,
5
+ Component,
6
+ computed,
7
+ effect,
8
+ inject,
9
+ input,
10
+ OnDestroy,
11
11
  } from '@angular/core';
12
12
  import { SHEET_CONTEXT } from './sheet-context';
13
13
  import { sheetVariants, type SheetVariants } from './sheet-variants';
@@ -76,26 +76,12 @@ 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
- protected readonly context = inject(SHEET_CONTEXT);
85
-
86
- /** Side from which the sheet appears */
87
- readonly side = input<SheetVariants['side']>('right');
88
-
89
- /** Additional CSS classes */
90
- readonly class = input<string>('');
91
-
92
- /** Previous body overflow for restoration */
93
- private previousBodyOverflow = '';
94
-
95
- protected readonly computedClass = computed(() =>
96
- cn(sheetVariants({ side: this.side() }), this.class())
97
- );
98
-
99
85
  constructor() {
100
86
  // Handle body scroll lock based on open state (browser-only via effect + afterNextRender)
101
87
  effect(() => {
@@ -108,18 +94,19 @@ export class SheetContent implements OnDestroy {
108
94
  });
109
95
  }
110
96
 
111
- private lockBodyScroll(): void {
112
- if (typeof document !== 'undefined') {
113
- this.previousBodyOverflow = document.body.style.overflow;
114
- document.body.style.overflow = 'hidden';
115
- }
116
- }
97
+ /** Side from which the sheet appears */
98
+ readonly side = input<SheetVariants['side']>('right');
99
+ /** Additional CSS classes */
100
+ readonly class = input<string>('');
117
101
 
118
- private unlockBodyScroll(): void {
119
- if (typeof document !== 'undefined') {
120
- document.body.style.overflow = this.previousBodyOverflow;
121
- }
122
- }
102
+ protected readonly context = inject(SHEET_CONTEXT);
103
+
104
+ protected readonly computedClass = computed(() =>
105
+ cn(sheetVariants({ side: this.side() }), this.class()),
106
+ );
107
+
108
+ /** Previous body overflow for restoration */
109
+ private previousBodyOverflow = '';
123
110
 
124
111
  ngOnDestroy(): void {
125
112
  // Restore body scroll
@@ -132,20 +119,28 @@ export class SheetContent implements OnDestroy {
132
119
  event.stopPropagation();
133
120
  this.close();
134
121
  }
135
-
136
122
  onEscapeKey(): void {
137
123
  this.close();
138
124
  }
139
-
140
125
  onClose(): void {
141
126
  this.close();
142
127
  }
143
128
 
129
+ private lockBodyScroll(): void {
130
+ if (typeof document !== 'undefined') {
131
+ this.previousBodyOverflow = document.body.style.overflow;
132
+ document.body.style.overflow = 'hidden';
133
+ }
134
+ }
135
+ private unlockBodyScroll(): void {
136
+ if (typeof document !== 'undefined') {
137
+ document.body.style.overflow = this.previousBodyOverflow;
138
+ }
139
+ }
144
140
  private close(): void {
145
141
  this.restoreFocus();
146
142
  this.context.setOpen(false);
147
143
  }
148
-
149
144
  private restoreFocus(): void {
150
145
  const triggerEl = this.context.triggerElement();
151
146
  if (triggerEl) {
@@ -1,11 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- inject,
7
- input,
8
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
9
3
  import { SHEET_CONTEXT } from './sheet-context';
10
4
 
11
5
  /**
@@ -17,18 +11,19 @@ import { SHEET_CONTEXT } from './sheet-context';
17
11
  selector: 'SheetDescription',
18
12
  template: `<ng-content />`,
19
13
  host: {
14
+ 'attr.data-slot': '"sheet-description"',
20
15
  '[class]': 'computedClass()',
21
16
  '[attr.id]': 'context.descriptionId',
22
17
  },
23
18
  changeDetection: ChangeDetectionStrategy.OnPush,
24
19
  })
25
20
  export class SheetDescription {
26
- protected readonly context = inject(SHEET_CONTEXT);
27
-
28
21
  /** Additional CSS classes */
29
22
  readonly class = input<string>('');
30
23
 
24
+ protected readonly context = inject(SHEET_CONTEXT);
25
+
31
26
  protected readonly computedClass = computed(() =>
32
- cn('text-sm text-muted-foreground', this.class())
27
+ cn('text-sm text-muted-foreground', this.class()),
33
28
  );
34
29
  }
@@ -1,10 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- input,
7
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
8
3
 
9
4
  /**
10
5
  * SheetFooter component - footer area of the sheet.
@@ -14,6 +9,7 @@ import {
14
9
  selector: 'SheetFooter',
15
10
  template: `<ng-content />`,
16
11
  host: {
12
+ 'attr.data-slot': '"sheet-footer"',
17
13
  '[class]': 'computedClass()',
18
14
  },
19
15
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -23,6 +19,6 @@ export class SheetFooter {
23
19
  readonly class = input<string>('');
24
20
 
25
21
  protected readonly computedClass = computed(() =>
26
- cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', this.class())
22
+ cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', this.class()),
27
23
  );
28
24
  }
@@ -1,10 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- input,
7
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
8
3
 
9
4
  /**
10
5
  * SheetHeader component - header area of the sheet.
@@ -14,6 +9,7 @@ import {
14
9
  selector: 'SheetHeader',
15
10
  template: `<ng-content />`,
16
11
  host: {
12
+ 'attr.data-slot': '"sheet-header"',
17
13
  '[class]': 'computedClass()',
18
14
  },
19
15
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -23,6 +19,6 @@ export class SheetHeader {
23
19
  readonly class = input<string>('');
24
20
 
25
21
  protected readonly computedClass = computed(() =>
26
- cn('flex flex-col space-y-2 text-center sm:text-left', this.class())
22
+ cn('flex flex-col space-y-2 text-center sm:text-left', this.class()),
27
23
  );
28
24
  }
@@ -1,11 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- inject,
7
- input,
8
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
9
3
  import { SHEET_CONTEXT } from './sheet-context';
10
4
 
11
5
  /**
@@ -17,18 +11,19 @@ import { SHEET_CONTEXT } from './sheet-context';
17
11
  selector: 'SheetTitle',
18
12
  template: `<ng-content />`,
19
13
  host: {
14
+ 'attr.data-slot': '"sheet-title"',
20
15
  '[class]': 'computedClass()',
21
16
  '[attr.id]': 'context.titleId',
22
17
  },
23
18
  changeDetection: ChangeDetectionStrategy.OnPush,
24
19
  })
25
20
  export class SheetTitle {
26
- protected readonly context = inject(SHEET_CONTEXT);
27
-
28
21
  /** Additional CSS classes */
29
22
  readonly class = input<string>('');
30
23
 
24
+ protected readonly context = inject(SHEET_CONTEXT);
25
+
31
26
  protected readonly computedClass = computed(() =>
32
- cn('text-lg font-semibold text-foreground', this.class())
27
+ cn('text-lg font-semibold text-foreground', this.class()),
33
28
  );
34
29
  }
@@ -1,10 +1,4 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- ElementRef,
5
- inject,
6
- input,
7
- } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component, ElementRef, inject, input } from '@angular/core';
8
2
  import { SHEET_CONTEXT } from './sheet-context';
9
3
 
10
4
  /**
@@ -15,6 +9,7 @@ import { SHEET_CONTEXT } from './sheet-context';
15
9
  selector: 'SheetTrigger',
16
10
  template: `<ng-content />`,
17
11
  host: {
12
+ 'attr.data-slot': '"sheet-trigger"',
18
13
  '(click)': 'onClick($event)',
19
14
  '[attr.aria-haspopup]': '"dialog"',
20
15
  '[attr.aria-expanded]': 'context.open()',
@@ -23,16 +18,17 @@ import { SHEET_CONTEXT } from './sheet-context';
23
18
  changeDetection: ChangeDetectionStrategy.OnPush,
24
19
  })
25
20
  export class SheetTrigger {
26
- protected readonly context = inject(SHEET_CONTEXT);
27
- private readonly elementRef = inject(ElementRef<HTMLElement>);
28
-
29
21
  /** Render as child */
30
22
  readonly asChild = input<boolean>(false);
31
23
 
24
+ private readonly _elementRef = inject(ElementRef<HTMLElement>);
25
+
26
+ protected readonly context = inject(SHEET_CONTEXT);
27
+
32
28
  onClick(event: Event): void {
33
29
  event.stopPropagation();
34
30
  // Save trigger element for focus restoration
35
- this.context.triggerElement.set(this.elementRef.nativeElement);
31
+ this.context.triggerElement.set(this._elementRef.nativeElement);
36
32
  this.context.setOpen(true);
37
33
  }
38
34
  }
@@ -16,7 +16,7 @@ export const sheetVariants = cva(
16
16
  defaultVariants: {
17
17
  side: 'right',
18
18
  },
19
- }
19
+ },
20
20
  );
21
21
 
22
22
  export type SheetVariants = VariantProps<typeof sheetVariants>;
@@ -1,14 +1,14 @@
1
1
  import { AriaIdService } from '@/lib/utils/accessibility';
2
2
  import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- effect,
7
- forwardRef,
8
- inject,
9
- input,
10
- output,
11
- signal,
3
+ ChangeDetectionStrategy,
4
+ Component,
5
+ computed,
6
+ effect,
7
+ forwardRef,
8
+ inject,
9
+ input,
10
+ output,
11
+ signal,
12
12
  } from '@angular/core';
13
13
  import { SHEET_CONTEXT, type SheetContextValue } from './sheet-context';
14
14
 
@@ -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,
@@ -42,30 +46,24 @@ import { SHEET_CONTEXT, type SheetContextValue } from './sheet-context';
42
46
  changeDetection: ChangeDetectionStrategy.OnPush,
43
47
  })
44
48
  export class Sheet implements SheetContextValue {
45
- private readonly ariaIdService = inject(AriaIdService);
49
+ constructor() {
50
+ // Sync defaultOpen on init
51
+ effect(() => {
52
+ if (this.defaultOpen() && this.controlledOpen() === undefined) {
53
+ this._internalOpen.set(true);
54
+ }
55
+ });
56
+ }
57
+
58
+ /** Open change event */
59
+ readonly openChange = output<boolean>();
46
60
 
47
61
  /** Default open state */
48
62
  readonly defaultOpen = input<boolean>(false);
49
-
50
63
  /** Controlled open state */
51
64
  readonly controlledOpen = input<boolean | undefined>(undefined, { alias: 'open' });
52
65
 
53
- /** Side from which the sheet appears */
54
- readonly side: 'top' | 'right' | 'bottom' | 'left' = 'right';
55
-
56
- /** Open change event */
57
- readonly openChange = output<boolean>();
58
-
59
- private readonly _internalOpen = signal(false);
60
-
61
- /** ARIA IDs for accessibility relationships */
62
- private readonly ariaIds = this.ariaIdService.generateDialogIds('sheet');
63
- readonly titleId = this.ariaIds.titleId;
64
- readonly descriptionId = this.ariaIds.descriptionId;
65
- readonly contentId = this.ariaIds.contentId;
66
-
67
- /** Reference to trigger element for focus restoration */
68
- readonly triggerElement = signal<HTMLElement | null>(null);
66
+ private readonly _ariaIdService = inject(AriaIdService);
69
67
 
70
68
  /** Computed open state - uses controlled value if provided, otherwise internal state */
71
69
  readonly open = computed(() => {
@@ -76,21 +74,23 @@ export class Sheet implements SheetContextValue {
76
74
  return this._internalOpen();
77
75
  });
78
76
 
79
- constructor() {
80
- // Sync defaultOpen on init
81
- effect(() => {
82
- if (this.defaultOpen() && this.controlledOpen() === undefined) {
83
- this._internalOpen.set(true);
84
- }
85
- }, { allowSignalWrites: true });
86
- }
77
+ private readonly _internalOpen = signal(false);
78
+ /** Reference to trigger element for focus restoration */
79
+ readonly triggerElement = signal<HTMLElement | null>(null);
80
+
81
+ /** Side from which the sheet appears */
82
+ readonly side: 'top' | 'right' | 'bottom' | 'left' = 'right';
83
+ /** ARIA IDs for accessibility relationships */
84
+ private readonly ariaIds = this._ariaIdService.generateDialogIds('sheet');
85
+ readonly titleId = this.ariaIds.titleId;
86
+ readonly descriptionId = this.ariaIds.descriptionId;
87
+ readonly contentId = this.ariaIds.contentId;
87
88
 
88
89
  setOpen(open: boolean): void {
89
90
  // Always update internal state for uncontrolled mode
90
91
  this._internalOpen.set(open);
91
92
  this.openChange.emit(open);
92
93
  }
93
-
94
94
  isOpen(): boolean {
95
95
  return this.open();
96
96
  }
@@ -1,19 +1,19 @@
1
1
  export { SidebarContent } from './sidebar-content.component';
2
2
  export {
3
- SIDEBAR_CONTEXT,
4
- SIDEBAR_COOKIE_MAX_AGE,
5
- SIDEBAR_COOKIE_NAME,
6
- SIDEBAR_KEYBOARD_SHORTCUT,
7
- SIDEBAR_MENU_CONTEXT,
8
- SIDEBAR_WIDTH,
9
- SIDEBAR_WIDTH_ICON,
10
- SIDEBAR_WIDTH_MOBILE,
11
- type AriaCurrentValue,
12
- type SidebarCollapsible,
13
- type SidebarContext,
14
- type SidebarSide,
15
- type SidebarState,
16
- type SidebarVariant
3
+ SIDEBAR_CONTEXT,
4
+ SIDEBAR_COOKIE_MAX_AGE,
5
+ SIDEBAR_COOKIE_NAME,
6
+ SIDEBAR_KEYBOARD_SHORTCUT,
7
+ SIDEBAR_MENU_CONTEXT,
8
+ SIDEBAR_WIDTH,
9
+ SIDEBAR_WIDTH_ICON,
10
+ SIDEBAR_WIDTH_MOBILE,
11
+ type AriaCurrentValue,
12
+ type SidebarCollapsible,
13
+ type SidebarContext,
14
+ type SidebarSide,
15
+ type SidebarState,
16
+ type SidebarVariant,
17
17
  } from './sidebar-context';
18
18
  export { SidebarFooter } from './sidebar-footer.component';
19
19
  export { SidebarGroupAction } from './sidebar-group-action.component';
@@ -38,4 +38,3 @@ export { SidebarRouteActiveService } from './sidebar-route-active.service';
38
38
  export { SidebarSeparator } from './sidebar-separator.component';
39
39
  export { SidebarTrigger } from './sidebar-trigger.component';
40
40
  export { Sidebar } from './sidebar.component';
41
-
@@ -1,10 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- input,
7
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
8
3
 
9
4
  /**
10
5
  * SidebarContent component - main content area of sidebar.
@@ -13,6 +8,7 @@ import {
13
8
  selector: 'SidebarContent',
14
9
  template: `<ng-content />`,
15
10
  host: {
11
+ 'attr.data-slot': '"sidebar-content"',
16
12
  '[class]': 'computedClass()',
17
13
  'data-sidebar': 'content',
18
14
  },
@@ -25,7 +21,7 @@ export class SidebarContent {
25
21
  protected readonly computedClass = computed(() =>
26
22
  cn(
27
23
  'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]/sidebar-wrapper:overflow-hidden',
28
- this.class()
29
- )
24
+ this.class(),
25
+ ),
30
26
  );
31
27
  }
@@ -16,9 +16,7 @@ export interface SidebarContext {
16
16
  toggleSidebar: () => void;
17
17
  }
18
18
 
19
- export const SIDEBAR_CONTEXT = new InjectionToken<SidebarContext>(
20
- 'SidebarContext'
21
- );
19
+ export const SIDEBAR_CONTEXT = new InjectionToken<SidebarContext>('SidebarContext');
22
20
 
23
21
  export const SIDEBAR_MENU_CONTEXT = new InjectionToken<{
24
22
  isActive: WritableSignal<boolean>;
@@ -1,10 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- input,
7
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
8
3
 
9
4
  /**
10
5
  * SidebarFooter component - footer section of sidebar.
@@ -13,6 +8,7 @@ import {
13
8
  selector: 'SidebarFooter',
14
9
  template: `<ng-content />`,
15
10
  host: {
11
+ 'attr.data-slot': '"sidebar-footer"',
16
12
  '[class]': 'computedClass()',
17
13
  'data-sidebar': 'footer',
18
14
  },
@@ -22,7 +18,5 @@ export class SidebarFooter {
22
18
  /** Additional CSS classes */
23
19
  readonly class = input<string>('');
24
20
 
25
- protected readonly computedClass = computed(() =>
26
- cn('flex flex-col gap-2 p-2', this.class())
27
- );
21
+ protected readonly computedClass = computed(() => cn('flex flex-col gap-2 p-2', this.class()));
28
22
  }
@@ -1,10 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- input,
7
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
8
3
 
9
4
  /**
10
5
  * SidebarGroupAction component - action button for a sidebar group.
@@ -13,6 +8,7 @@ import {
13
8
  selector: 'SidebarGroupAction',
14
9
  template: `<ng-content />`,
15
10
  host: {
11
+ 'attr.data-slot': '"sidebar-group-action"',
16
12
  '[class]': 'computedClass()',
17
13
  'data-sidebar': 'group-action',
18
14
  },
@@ -27,7 +23,7 @@ export class SidebarGroupAction {
27
23
  'absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
28
24
  'after:absolute after:-inset-2 after:md:hidden',
29
25
  'group-data-[collapsible=icon]/sidebar-wrapper:hidden',
30
- this.class()
31
- )
26
+ this.class(),
27
+ ),
32
28
  );
33
29
  }
@@ -1,10 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- input,
7
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
8
3
 
9
4
  /**
10
5
  * SidebarGroupContent component - content wrapper for sidebar group.
@@ -13,6 +8,7 @@ import {
13
8
  selector: 'SidebarGroupContent',
14
9
  template: `<ng-content />`,
15
10
  host: {
11
+ 'attr.data-slot': '"sidebar-group-content"',
16
12
  '[class]': 'computedClass()',
17
13
  'data-sidebar': 'group-content',
18
14
  },
@@ -22,7 +18,5 @@ export class SidebarGroupContent {
22
18
  /** Additional CSS classes */
23
19
  readonly class = input<string>('');
24
20
 
25
- protected readonly computedClass = computed(() =>
26
- cn('w-full text-sm', this.class())
27
- );
21
+ protected readonly computedClass = computed(() => cn('w-full text-sm', this.class()));
28
22
  }
@@ -1,10 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- input,
7
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
8
3
 
9
4
  /**
10
5
  * SidebarGroupLabel component - label for a sidebar group.
@@ -13,6 +8,7 @@ import {
13
8
  selector: 'SidebarGroupLabel',
14
9
  template: `<ng-content />`,
15
10
  host: {
11
+ 'attr.data-slot': '"sidebar-group-label"',
16
12
  '[class]': 'computedClass()',
17
13
  'data-sidebar': 'group-label',
18
14
  },
@@ -26,7 +22,7 @@ export class SidebarGroupLabel {
26
22
  cn(
27
23
  'duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
28
24
  'group-data-[collapsible=icon]/sidebar-wrapper:-mt-8 group-data-[collapsible=icon]/sidebar-wrapper:opacity-0',
29
- this.class()
30
- )
25
+ this.class(),
26
+ ),
31
27
  );
32
28
  }
@@ -1,10 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- input,
7
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
8
3
 
9
4
  /**
10
5
  * SidebarGroup component - groups sidebar items.
@@ -13,6 +8,7 @@ import {
13
8
  selector: 'SidebarGroup',
14
9
  template: `<ng-content />`,
15
10
  host: {
11
+ 'attr.data-slot': '"sidebar-group"',
16
12
  '[class]': 'computedClass()',
17
13
  'data-sidebar': 'group',
18
14
  },
@@ -23,6 +19,6 @@ export class SidebarGroup {
23
19
  readonly class = input<string>('');
24
20
 
25
21
  protected readonly computedClass = computed(() =>
26
- cn('relative flex w-full min-w-0 flex-col p-2', this.class())
22
+ cn('relative flex w-full min-w-0 flex-col p-2', this.class()),
27
23
  );
28
24
  }
@@ -1,10 +1,5 @@
1
1
  import { cn } from '@/lib/utils';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- input,
7
- } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
8
3
 
9
4
  /**
10
5
  * SidebarHeader component - header section of sidebar.
@@ -13,6 +8,7 @@ import {
13
8
  selector: 'SidebarHeader',
14
9
  template: `<ng-content />`,
15
10
  host: {
11
+ 'attr.data-slot': '"sidebar-header"',
16
12
  '[class]': 'computedClass()',
17
13
  'data-sidebar': 'header',
18
14
  },
@@ -22,7 +18,5 @@ export class SidebarHeader {
22
18
  /** Additional CSS classes */
23
19
  readonly class = input<string>('');
24
20
 
25
- protected readonly computedClass = computed(() =>
26
- cn('flex flex-col gap-2 p-2', this.class())
27
- );
21
+ protected readonly computedClass = computed(() => cn('flex flex-col gap-2 p-2', this.class()));
28
22
  }