@egose/shadcn-theme-ng-tw 0.0.28 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/README.md +130 -13
  2. package/accordion/README.md +376 -34
  3. package/accordion/fesm2022/accordion.mjs +20 -20
  4. package/alert/README.md +343 -34
  5. package/alert/fesm2022/alert.mjs +18 -18
  6. package/alert-dialog/README.md +471 -5
  7. package/alert-dialog/fesm2022/alert-dialog.mjs +48 -48
  8. package/alert-dialog/types/alert-dialog.d.ts +1 -1
  9. package/aspect-ratio/README.md +272 -5
  10. package/aspect-ratio/fesm2022/aspect-ratio.mjs +9 -9
  11. package/autocomplete/README.md +473 -34
  12. package/autocomplete/fesm2022/autocomplete.mjs +54 -54
  13. package/autocomplete/types/autocomplete.d.ts +1 -1
  14. package/avatar/README.md +357 -5
  15. package/avatar/fesm2022/avatar.mjs +32 -32
  16. package/badge/README.md +289 -34
  17. package/badge/fesm2022/badge.mjs +4 -4
  18. package/basic-alert/README.md +324 -34
  19. package/basic-alert/fesm2022/basic-alert.mjs +4 -4
  20. package/basic-alert/types/basic-alert.d.ts +1 -1
  21. package/breadcrumb/README.md +406 -5
  22. package/breadcrumb/fesm2022/breadcrumb.mjs +34 -34
  23. package/button/README.md +453 -34
  24. package/button/fesm2022/button.mjs +96 -118
  25. package/button/types/button.d.ts +7 -10
  26. package/button-group/README.md +318 -5
  27. package/button-group/fesm2022/button-group.mjs +20 -20
  28. package/calendar/README.md +328 -34
  29. package/calendar/fesm2022/calendar.mjs +154 -154
  30. package/card/README.md +331 -5
  31. package/card/fesm2022/card.mjs +33 -33
  32. package/carousel/README.md +333 -5
  33. package/carousel/fesm2022/carousel.mjs +47 -44
  34. package/carousel/types/carousel.d.ts +1 -1
  35. package/checkbox/README.md +291 -34
  36. package/checkbox/fesm2022/checkbox.mjs +22 -20
  37. package/checkbox/types/checkbox.d.ts +5 -4
  38. package/collapsible/README.md +332 -5
  39. package/collapsible/fesm2022/collapsible.mjs +15 -15
  40. package/combobox/README.md +507 -5
  41. package/combobox/fesm2022/combobox.mjs +95 -92
  42. package/combobox/types/combobox.d.ts +1 -1
  43. package/command/README.md +435 -5
  44. package/command/fesm2022/command.mjs +56 -56
  45. package/confirmation-dialog/README.md +272 -34
  46. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +13 -12
  47. package/confirmation-dialog/types/confirmation-dialog.d.ts +9 -5
  48. package/context-menu/README.md +366 -5
  49. package/context-menu/fesm2022/context-menu.mjs +9 -9
  50. package/date-picker/README.md +436 -34
  51. package/date-picker/fesm2022/date-picker.mjs +79 -68
  52. package/date-picker/types/date-picker.d.ts +8 -4
  53. package/dialog/README.md +419 -34
  54. package/dialog/fesm2022/dialog.mjs +48 -48
  55. package/drawer/README.md +395 -5
  56. package/drawer/fesm2022/drawer.mjs +45 -45
  57. package/dropdown-menu/README.md +417 -5
  58. package/dropdown-menu/fesm2022/dropdown-menu.mjs +85 -73
  59. package/dropdown-menu/types/dropdown-menu.d.ts +4 -0
  60. package/empty/README.md +329 -5
  61. package/empty/fesm2022/empty.mjs +31 -31
  62. package/field/README.md +385 -5
  63. package/field/fesm2022/field.mjs +59 -59
  64. package/field/types/field.d.ts +1 -1
  65. package/form-checkbox/README.md +283 -34
  66. package/form-checkbox/fesm2022/form-checkbox.mjs +37 -19
  67. package/form-checkbox/types/form-checkbox.d.ts +7 -1
  68. package/form-date-picker/README.md +293 -34
  69. package/form-date-picker/fesm2022/form-date-picker.mjs +59 -24
  70. package/form-date-picker/types/form-date-picker.d.ts +7 -1
  71. package/form-field/README.md +327 -34
  72. package/form-field/fesm2022/form-field.mjs +30 -16
  73. package/form-field/types/form-field.d.ts +28 -20
  74. package/form-field-simple/README.md +311 -34
  75. package/form-field-simple/fesm2022/form-field-simple.mjs +4 -4
  76. package/form-searchable-multiselect/README.md +332 -34
  77. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +41 -21
  78. package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +8 -2
  79. package/form-select/README.md +321 -34
  80. package/form-select/fesm2022/form-select.mjs +62 -29
  81. package/form-select/types/form-select.d.ts +7 -1
  82. package/form-text-input/README.md +342 -34
  83. package/form-text-input/fesm2022/form-text-input.mjs +43 -55
  84. package/form-text-input/types/form-text-input.d.ts +9 -12
  85. package/form-textarea/README.md +318 -34
  86. package/form-textarea/fesm2022/form-textarea.mjs +42 -23
  87. package/form-textarea/types/form-textarea.d.ts +8 -1
  88. package/hover-card/README.md +256 -5
  89. package/hover-card/fesm2022/hover-card.mjs +19 -19
  90. package/icon/README.md +210 -34
  91. package/icon/fesm2022/icon.mjs +8 -8
  92. package/input/README.md +240 -34
  93. package/input/fesm2022/input.mjs +17 -12
  94. package/input/types/input.d.ts +2 -1
  95. package/input-group/README.md +335 -5
  96. package/input-group/fesm2022/input-group.mjs +37 -37
  97. package/input-group/types/input-group.d.ts +3 -3
  98. package/input-otp/README.md +375 -5
  99. package/input-otp/fesm2022/input-otp.mjs +27 -27
  100. package/item/README.md +385 -5
  101. package/item/fesm2022/item.mjs +54 -54
  102. package/kbd/README.md +291 -5
  103. package/kbd/fesm2022/kbd.mjs +13 -13
  104. package/label/README.md +243 -34
  105. package/label/fesm2022/label.mjs +9 -9
  106. package/label/types/label.d.ts +1 -1
  107. package/layout-simple/README.md +174 -44
  108. package/layout-simple/fesm2022/layout-simple.mjs +917 -398
  109. package/layout-simple/types/layout-simple.d.ts +180 -129
  110. package/menu/README.md +418 -0
  111. package/menu/fesm2022/menu.mjs +461 -0
  112. package/menu/package.json +24 -0
  113. package/menu/types/menu.d.ts +137 -0
  114. package/menubar/README.md +343 -5
  115. package/menubar/fesm2022/menubar.mjs +13 -13
  116. package/native-select/README.md +323 -5
  117. package/native-select/fesm2022/native-select.mjs +19 -19
  118. package/navigation-menu/README.md +369 -5
  119. package/navigation-menu/fesm2022/navigation-menu.mjs +37 -37
  120. package/package.json +183 -154
  121. package/pagination/README.md +388 -5
  122. package/pagination/fesm2022/pagination.mjs +63 -63
  123. package/popover/README.md +302 -34
  124. package/popover/fesm2022/popover.mjs +30 -30
  125. package/progress/README.md +311 -5
  126. package/progress/fesm2022/progress.mjs +13 -13
  127. package/radio-group/README.md +335 -34
  128. package/radio-group/fesm2022/radio-group.mjs +26 -19
  129. package/resizable/README.md +269 -5
  130. package/resizable/fesm2022/resizable.mjs +19 -19
  131. package/scroll-area/README.md +233 -5
  132. package/scroll-area/fesm2022/scroll-area.mjs +9 -9
  133. package/searchable-multiselect/README.md +294 -34
  134. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +63 -16
  135. package/searchable-multiselect/types/searchable-multiselect.d.ts +8 -2
  136. package/select/README.md +408 -34
  137. package/select/fesm2022/select.mjs +80 -72
  138. package/select/types/select.d.ts +3 -1
  139. package/separator/README.md +193 -34
  140. package/separator/fesm2022/separator.mjs +9 -9
  141. package/separator/types/separator.d.ts +1 -1
  142. package/sheet/README.md +282 -34
  143. package/sheet/fesm2022/sheet.mjs +30 -30
  144. package/sidebar/README.md +457 -5
  145. package/sidebar/fesm2022/sidebar.mjs +136 -134
  146. package/sidebar/types/sidebar.d.ts +3 -3
  147. package/skeleton/README.md +217 -5
  148. package/skeleton/fesm2022/skeleton.mjs +9 -9
  149. package/slider/README.md +273 -5
  150. package/slider/fesm2022/slider.mjs +29 -25
  151. package/sonner/README.md +317 -34
  152. package/sonner/fesm2022/sonner.mjs +9 -9
  153. package/spinner/README.md +255 -34
  154. package/spinner/fesm2022/spinner.mjs +8 -8
  155. package/switch/README.md +281 -34
  156. package/switch/fesm2022/switch.mjs +12 -14
  157. package/table/README.md +423 -5
  158. package/table/fesm2022/table.mjs +41 -41
  159. package/tabs/README.md +382 -34
  160. package/tabs/fesm2022/tabs.mjs +48 -38
  161. package/textarea/README.md +282 -5
  162. package/textarea/fesm2022/textarea.mjs +9 -9
  163. package/toggle/README.md +270 -5
  164. package/toggle/fesm2022/toggle.mjs +14 -14
  165. package/toggle-group/README.md +340 -5
  166. package/toggle-group/fesm2022/toggle-group.mjs +13 -13
  167. package/toggle-group/types/toggle-group.d.ts +13 -7
  168. package/tooltip/README.md +240 -34
  169. package/tooltip/fesm2022/tooltip.mjs +14 -14
  170. package/typography/README.md +271 -5
  171. package/typography/fesm2022/typography.mjs +53 -53
  172. package/typography/types/typography.d.ts +12 -12
  173. package/utils/README.md +274 -34
  174. package/utils/fesm2022/utils.mjs +68 -44
  175. package/accordion/fesm2022/accordion.mjs.map +0 -1
  176. package/alert/fesm2022/alert.mjs.map +0 -1
  177. package/alert-dialog/fesm2022/alert-dialog.mjs.map +0 -1
  178. package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +0 -1
  179. package/autocomplete/fesm2022/autocomplete.mjs.map +0 -1
  180. package/avatar/fesm2022/avatar.mjs.map +0 -1
  181. package/badge/fesm2022/badge.mjs.map +0 -1
  182. package/basic-alert/fesm2022/basic-alert.mjs.map +0 -1
  183. package/breadcrumb/fesm2022/breadcrumb.mjs.map +0 -1
  184. package/button/fesm2022/button.mjs.map +0 -1
  185. package/button-group/fesm2022/button-group.mjs.map +0 -1
  186. package/calendar/fesm2022/calendar.mjs.map +0 -1
  187. package/card/fesm2022/card.mjs.map +0 -1
  188. package/carousel/fesm2022/carousel.mjs.map +0 -1
  189. package/checkbox/fesm2022/checkbox.mjs.map +0 -1
  190. package/collapsible/fesm2022/collapsible.mjs.map +0 -1
  191. package/combobox/fesm2022/combobox.mjs.map +0 -1
  192. package/command/fesm2022/command.mjs.map +0 -1
  193. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +0 -1
  194. package/context-menu/fesm2022/context-menu.mjs.map +0 -1
  195. package/date-picker/fesm2022/date-picker.mjs.map +0 -1
  196. package/dialog/fesm2022/dialog.mjs.map +0 -1
  197. package/drawer/fesm2022/drawer.mjs.map +0 -1
  198. package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +0 -1
  199. package/empty/fesm2022/empty.mjs.map +0 -1
  200. package/field/fesm2022/field.mjs.map +0 -1
  201. package/form-checkbox/fesm2022/form-checkbox.mjs.map +0 -1
  202. package/form-date-picker/fesm2022/form-date-picker.mjs.map +0 -1
  203. package/form-field/fesm2022/form-field.mjs.map +0 -1
  204. package/form-field-simple/fesm2022/form-field-simple.mjs.map +0 -1
  205. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +0 -1
  206. package/form-select/fesm2022/form-select.mjs.map +0 -1
  207. package/form-text-input/fesm2022/form-text-input.mjs.map +0 -1
  208. package/form-textarea/fesm2022/form-textarea.mjs.map +0 -1
  209. package/hover-card/fesm2022/hover-card.mjs.map +0 -1
  210. package/icon/fesm2022/icon.mjs.map +0 -1
  211. package/input/fesm2022/input.mjs.map +0 -1
  212. package/input-group/fesm2022/input-group.mjs.map +0 -1
  213. package/input-otp/fesm2022/input-otp.mjs.map +0 -1
  214. package/item/fesm2022/item.mjs.map +0 -1
  215. package/kbd/fesm2022/kbd.mjs.map +0 -1
  216. package/label/fesm2022/label.mjs.map +0 -1
  217. package/layout-simple/fesm2022/layout-simple.mjs.map +0 -1
  218. package/menubar/fesm2022/menubar.mjs.map +0 -1
  219. package/native-select/fesm2022/native-select.mjs.map +0 -1
  220. package/navigation-menu/fesm2022/navigation-menu.mjs.map +0 -1
  221. package/pagination/fesm2022/pagination.mjs.map +0 -1
  222. package/popover/fesm2022/popover.mjs.map +0 -1
  223. package/progress/fesm2022/progress.mjs.map +0 -1
  224. package/radio-group/fesm2022/radio-group.mjs.map +0 -1
  225. package/resizable/fesm2022/resizable.mjs.map +0 -1
  226. package/scroll-area/fesm2022/scroll-area.mjs.map +0 -1
  227. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +0 -1
  228. package/select/fesm2022/select.mjs.map +0 -1
  229. package/separator/fesm2022/separator.mjs.map +0 -1
  230. package/sheet/fesm2022/sheet.mjs.map +0 -1
  231. package/sidebar/fesm2022/sidebar.mjs.map +0 -1
  232. package/skeleton/fesm2022/skeleton.mjs.map +0 -1
  233. package/slider/fesm2022/slider.mjs.map +0 -1
  234. package/sonner/fesm2022/sonner.mjs.map +0 -1
  235. package/spinner/fesm2022/spinner.mjs.map +0 -1
  236. package/switch/fesm2022/switch.mjs.map +0 -1
  237. package/table/fesm2022/table.mjs.map +0 -1
  238. package/tabs/fesm2022/tabs.mjs.map +0 -1
  239. package/textarea/fesm2022/textarea.mjs.map +0 -1
  240. package/toggle/fesm2022/toggle.mjs.map +0 -1
  241. package/toggle-group/fesm2022/toggle-group.mjs.map +0 -1
  242. package/tooltip/fesm2022/tooltip.mjs.map +0 -1
  243. package/typography/fesm2022/typography.mjs.map +0 -1
  244. package/utils/fesm2022/utils.mjs.map +0 -1
@@ -21,10 +21,10 @@ class HlmSheetOverlay {
21
21
  untracked(() => this._classSettable?.setClassToCustomElement(classValue));
22
22
  });
23
23
  }
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetOverlay, deps: [], target: i0.ɵɵFactoryTarget.Directive });
25
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSheetOverlay, isStandalone: true, selector: "[hlmSheetOverlay],brn-sheet-overlay[hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetOverlay, deps: [], target: i0.ɵɵFactoryTarget.Directive });
25
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: HlmSheetOverlay, isStandalone: true, selector: "[hlmSheetOverlay],brn-sheet-overlay[hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
26
26
  }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetOverlay, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetOverlay, decorators: [{
28
28
  type: Directive,
29
29
  args: [{
30
30
  selector: '[hlmSheetOverlay],brn-sheet-overlay[hlm]',
@@ -35,8 +35,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
35
35
  }], ctorParameters: () => [], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
36
36
 
37
37
  class HlmSheet extends BrnSheet {
38
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheet, deps: null, target: i0.ɵɵFactoryTarget.Component });
39
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: HlmSheet, isStandalone: true, selector: "hlm-sheet", providers: [
38
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheet, deps: null, target: i0.ɵɵFactoryTarget.Component });
39
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: HlmSheet, isStandalone: true, selector: "hlm-sheet", providers: [
40
40
  {
41
41
  provide: BrnDialog,
42
42
  useExisting: forwardRef(() => BrnSheet),
@@ -53,7 +53,7 @@ class HlmSheet extends BrnSheet {
53
53
  <ng-content />
54
54
  `, isInline: true, dependencies: [{ kind: "directive", type: BrnSheetOverlay, selector: "[brnSheetOverlay],brn-sheet-overlay" }, { kind: "directive", type: HlmSheetOverlay, selector: "[hlmSheetOverlay],brn-sheet-overlay[hlm]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
55
55
  }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheet, decorators: [{
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheet, decorators: [{
57
57
  type: Component,
58
58
  args: [{
59
59
  selector: 'hlm-sheet',
@@ -85,10 +85,10 @@ class HlmSheetClose {
85
85
  userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
86
86
  _computedClass = computed(() => hlm('tw:ring-offset-background tw:focus:ring-ring tw:data-[state=open]:bg-secondary tw:rounded-xs tw:focus:outline-hidden tw:absolute tw:right-4 tw:top-4 tw:opacity-70 tw:transition-opacity tw:hover:opacity-100 tw:focus:ring-2 tw:focus:ring-offset-2 tw:disabled:pointer-events-none', this.userClass()), /* @ts-ignore */
87
87
  ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
88
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
89
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSheetClose, isStandalone: true, selector: "[hlmSheetClose],[brnSheetClose][hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
88
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
89
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: HlmSheetClose, isStandalone: true, selector: "[hlmSheetClose],[brnSheetClose][hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
90
90
  }
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetClose, decorators: [{
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetClose, decorators: [{
92
92
  type: Directive,
93
93
  args: [{
94
94
  selector: '[hlmSheetClose],[brnSheetClose][hlm]',
@@ -108,7 +108,7 @@ const sheetVariants = cva('tw:bg-background tw:data-[state=open]:animate-in tw:d
108
108
  },
109
109
  },
110
110
  defaultVariants: {
111
- side: 'right',
111
+ side: "tw:right",
112
112
  },
113
113
  });
114
114
  class HlmSheetContent {
@@ -125,8 +125,8 @@ class HlmSheetContent {
125
125
  userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
126
126
  _computedClass = computed(() => hlm(sheetVariants({ side: this._sideProvider.side() }), this.userClass()), /* @ts-ignore */
127
127
  ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
128
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
129
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: HlmSheetContent, isStandalone: true, selector: "hlm-sheet-content", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()", "attr.data-state": "state()" } }, providers: [provideIcons({ lucideX })], ngImport: i0, template: `
128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
129
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: HlmSheetContent, isStandalone: true, selector: "hlm-sheet-content", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()", "attr.data-state": "state()" } }, providers: [provideIcons({ lucideX })], ngImport: i0, template: `
130
130
  <ng-content />
131
131
  <button brnSheetClose hlm class="tw:cursor-pointer">
132
132
  <span class="tw:sr-only">Close</span>
@@ -134,7 +134,7 @@ class HlmSheetContent {
134
134
  </button>
135
135
  `, isInline: true, dependencies: [{ kind: "directive", type: HlmSheetClose, selector: "[hlmSheetClose],[brnSheetClose][hlm]", inputs: ["class"] }, { kind: "directive", type: BrnSheetClose, selector: "button[brnSheetClose]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
136
136
  }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetContent, decorators: [{
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetContent, decorators: [{
138
138
  type: Component,
139
139
  args: [{
140
140
  selector: 'hlm-sheet-content',
@@ -159,10 +159,10 @@ class HlmSheetDescription {
159
159
  userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
160
160
  _computedClass = computed(() => hlm('tw:text-muted-foreground tw:text-sm', this.userClass()), /* @ts-ignore */
161
161
  ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
162
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
163
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSheetDescription, isStandalone: true, selector: "[hlmSheetDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSheetDescription }], ngImport: i0 });
162
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
163
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: HlmSheetDescription, isStandalone: true, selector: "[hlmSheetDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSheetDescription }], ngImport: i0 });
164
164
  }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetDescription, decorators: [{
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetDescription, decorators: [{
166
166
  type: Directive,
167
167
  args: [{
168
168
  selector: '[hlmSheetDescription]',
@@ -177,10 +177,10 @@ class HlmSheetFooter {
177
177
  userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
178
178
  _computedClass = computed(() => hlm('tw:mt-auto tw:flex tw:flex-col tw:gap-2 tw:p-4', this.userClass()), /* @ts-ignore */
179
179
  ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
180
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: HlmSheetFooter, isStandalone: true, selector: "hlm-sheet-footer", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
180
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: HlmSheetFooter, isStandalone: true, selector: "hlm-sheet-footer", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
182
182
  }
183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetFooter, decorators: [{
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetFooter, decorators: [{
184
184
  type: Component,
185
185
  args: [{
186
186
  selector: 'hlm-sheet-footer',
@@ -196,10 +196,10 @@ class HlmSheetHeader {
196
196
  userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
197
197
  _computedClass = computed(() => hlm('tw:flex tw:flex-col tw:gap-1.5 tw:p-4', this.userClass()), /* @ts-ignore */
198
198
  ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
199
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
200
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: HlmSheetHeader, isStandalone: true, selector: "hlm-sheet-header", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
199
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
200
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: HlmSheetHeader, isStandalone: true, selector: "hlm-sheet-header", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
201
201
  }
202
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetHeader, decorators: [{
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetHeader, decorators: [{
203
203
  type: Component,
204
204
  args: [{
205
205
  selector: 'hlm-sheet-header',
@@ -215,10 +215,10 @@ class HlmSheetTitle {
215
215
  userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
216
216
  _computedClass = computed(() => hlm('tw:text-foreground tw:font-semibold', this.userClass()), /* @ts-ignore */
217
217
  ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
218
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
219
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSheetTitle, isStandalone: true, selector: "[hlmSheetTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSheetTitle }], ngImport: i0 });
218
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
219
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: HlmSheetTitle, isStandalone: true, selector: "[hlmSheetTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSheetTitle }], ngImport: i0 });
220
220
  }
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetTitle, decorators: [{
221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetTitle, decorators: [{
222
222
  type: Directive,
223
223
  args: [{
224
224
  selector: '[hlmSheetTitle]',
@@ -243,8 +243,8 @@ const HlmSheetImports = [
243
243
  HlmSheetTitle,
244
244
  ];
245
245
  class HlmSheetModule {
246
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
247
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetModule, imports: [HlmSheet,
246
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
247
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetModule, imports: [HlmSheet,
248
248
  HlmSheetClose,
249
249
  HlmSheetContent,
250
250
  HlmSheetDescription,
@@ -259,9 +259,9 @@ class HlmSheetModule {
259
259
  HlmSheetHeader,
260
260
  HlmSheetOverlay,
261
261
  HlmSheetTitle] });
262
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetModule, imports: [HlmSheetContent] });
262
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetModule, imports: [HlmSheetContent] });
263
263
  }
264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSheetModule, decorators: [{
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmSheetModule, decorators: [{
265
265
  type: NgModule,
266
266
  args: [{
267
267
  imports: [...HlmSheetImports],
@@ -274,4 +274,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
274
274
  */
275
275
 
276
276
  export { HlmSheet, HlmSheetClose, HlmSheetContent, HlmSheetDescription, HlmSheetFooter, HlmSheetHeader, HlmSheetImports, HlmSheetModule, HlmSheetOverlay, HlmSheetTitle, sheetVariants };
277
- //# sourceMappingURL=sheet.mjs.map
277
+
package/sidebar/README.md CHANGED
@@ -1,11 +1,463 @@
1
- # Sidebar
1
+ # Sidebar (`@egose/shadcn-theme-ng/sidebar`)
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli).
3
+ A shadcn/ui-style **Sidebar** application shell — collapsible app navigation with header/content/footer regions, grouped menus, sub-menus, badges, search input, trigger, and a hover rail. This is the Angular equivalent of shadcn/ui `Sidebar` (`SidebarProvider`, `SidebarTrigger`, `SidebarMenu`, …).
4
4
 
5
- ## Building
5
+ Unlike the shadcn React version there is no `*Provider` component here: global state lives in the root-provided **`HlmSidebarService`** (open/collapsed, mobile detection, variant, cookie persistence), configured via **`provideHlmSidebarConfig`**. On desktop `HlmSidebar` renders a persistent gap + fixed container; on mobile it renders through `hlm-sheet`. Menu buttons show icon tooltips (via `BrnTooltip`) when collapsed to icon mode.
6
6
 
7
- To build the library, run:
7
+ > **Ships as:** `@egose/shadcn-theme-ng/sidebar` and `@egose/shadcn-theme-ng-tw/sidebar` (the `tw:`-prefixed Tailwind variant — same API, class strings prefixed with `tw:`).
8
+ > See the [package README](../../README.md) for installation, peer dependencies, and Tailwind setup. Do not publish this project directory independently.
9
+
10
+ ## Installation
8
11
 
9
12
  ```bash
10
- ng build sidebar
13
+ # Plain Tailwind (no prefix)
14
+ npm install @egose/shadcn-theme-ng
15
+
16
+ # Or the tw:-prefixed variant
17
+ npm install @egose/shadcn-theme-ng-tw
18
+ ```
19
+
20
+ ```ts
21
+ import { HlmSidebarImports } from '@egose/shadcn-theme-ng/sidebar';
22
+ // tw variant:
23
+ // import { HlmSidebarImports } from '@egose/shadcn-theme-ng-tw/sidebar';
24
+ ```
25
+
26
+ Peer dependencies (see [package README](../../README.md) for versions): `@angular/core`, `@angular/common`, `@spartan-ng/brain`. Icons use `@ng-icons` (`lucidePanelLeft` in the trigger), installed transitively; `HlmSidebarMenuSkeleton` depends on the `skeleton` subpath and `HlmSidebarSeparator` on the `separator` subpath.
27
+
28
+ ## Imports
29
+
30
+ Real exported symbols (from `src/public-api.ts`):
31
+
32
+ | Symbol | Kind | Selector |
33
+ | -------------------------------------------------------------------------- | ---------------------------------- | ------------------------------------------------------------- |
34
+ | `HlmSidebarWrapper` | Directive | `[hlmSidebarWrapper],hlm-sidebar-wrapper` |
35
+ | `HlmSidebar` | Component | `hlm-sidebar` |
36
+ | `HlmSidebarHeader` | Directive | `[hlmSidebarHeader],hlm-sidebar-header` |
37
+ | `HlmSidebarContent` | Directive | `[hlmSidebarContent],hlm-sidebar-content` |
38
+ | `HlmSidebarFooter` | Directive | `[hlmSidebarFooter],hlm-sidebar-footer` |
39
+ | `HlmSidebarGroup` | Directive | `[hlmSidebarGroup],hlm-sidebar-group` |
40
+ | `HlmSidebarGroupLabel` | Directive | `div[hlmSidebarGroupLabel], button[hlmSidebarGroupLabel]` |
41
+ | `HlmSidebarGroupAction` | Directive | `button[hlmSidebarGroupAction]` |
42
+ | `HlmSidebarGroupContent` | Directive | `div[hlmSidebarGroupContent]` |
43
+ | `HlmSidebarMenu` | Directive | `ul[hlmSidebarMenu]` |
44
+ | `HlmSidebarMenuItem` | Directive | `li[hlmSidebarMenuItem]` |
45
+ | `HlmSidebarMenuButton` | Directive | `button[hlmSidebarMenuButton], a[hlmSidebarMenuButton]` |
46
+ | `HlmSidebarMenuAction` | Directive | `button[hlmSidebarMenuAction]` |
47
+ | `HlmSidebarMenuBadge` | Directive | `[hlmSidebarMenuBadge],hlm-sidebar-menu-badge` |
48
+ | `HlmSidebarMenuSkeleton` | Component | `hlm-sidebar-menu-skeleton,div[hlmSidebarMenuSkeleton]` |
49
+ | `HlmSidebarMenuSub` | Directive | `ul[hlmSidebarMenuSub]` |
50
+ | `HlmSidebarMenuSubItem` | Directive | `li[hlmSidebarMenuSubItem]` |
51
+ | `HlmSidebarMenuSubButton` | Directive | `a[hlmSidebarMenuSubButton], button[hlmSidebarMenuSubButton]` |
52
+ | `HlmSidebarSeparator` | Directive | `[hlmSidebarSeparator],hlm-sidebar-separator` |
53
+ | `HlmSidebarTrigger` | Component | `button[hlmSidebarTrigger]` |
54
+ | `HlmSidebarRail` | Directive | `button[hlmSidebarRail]` |
55
+ | `HlmSidebarInput` | Directive | `input[hlmSidebarInput]` |
56
+ | `HlmSidebarInset` | Directive | `main[hlmSidebarInset]` |
57
+ | `HlmSidebarService` | `@Injectable({providedIn:'root'})` | State store (no selector) |
58
+ | `HlmSidebarConfig` (+ `provideHlmSidebarConfig`, `injectHlmSidebarConfig`) | Interface + functions | Global config (no selector) |
59
+ | `HlmSidebarImports` | `const` array | All directives/components above, for standalone `imports` |
60
+ | `HlmSidebarModule` | `NgModule` | NgModule wrapper re-exporting `HlmSidebarImports` |
61
+
62
+ Standalone usage:
63
+
64
+ ```ts
65
+ import { Component } from '@angular/core';
66
+ import { HlmSidebarImports } from '@egose/shadcn-theme-ng/sidebar';
67
+
68
+ @Component({
69
+ selector: 'app-shell',
70
+ standalone: true,
71
+ imports: [HlmSidebarImports],
72
+ template: `...`,
73
+ })
74
+ export class ShellComponent {}
75
+ ```
76
+
77
+ NgModule usage:
78
+
79
+ ```ts
80
+ import { NgModule } from '@angular/core';
81
+ import { HlmSidebarModule } from '@egose/shadcn-theme-ng/sidebar';
82
+
83
+ @NgModule({ imports: [HlmSidebarModule] })
84
+ export class ShellModule {}
85
+ ```
86
+
87
+ ## Anatomy / Structure
88
+
89
+ ```html
90
+ <div hlmSidebarWrapper>
91
+ <hlm-sidebar>
92
+ <div hlmSidebarHeader>
93
+ <input hlmSidebarInput placeholder="Search…" />
94
+ </div>
95
+
96
+ <div hlmSidebarContent>
97
+ <div hlmSidebarGroup>
98
+ <div hlmSidebarGroupLabel>Platform</div>
99
+ <div hlmSidebarGroupContent>
100
+ <ul hlmSidebarMenu>
101
+ <li hlmSidebarMenuItem>
102
+ <button hlmSidebarMenuButton isActive tooltip="Dashboard">
103
+ <ng-icon name="lucideLayoutDashboard" />
104
+ <span>Dashboard</span>
105
+ </button>
106
+ <span hlmSidebarMenuBadge>3</span>
107
+ </li>
108
+ <li hlmSidebarMenuItem>
109
+ <button hlmSidebarMenuButton tooltip="Settings">
110
+ <ng-icon name="lucideSettings" />
111
+ <span>Settings</span>
112
+ </button>
113
+ <ul hlmSidebarMenuSub>
114
+ <li hlmSidebarMenuSubItem>
115
+ <a hlmSidebarMenuSubButton href="/settings/profile">Profile</a>
116
+ </li>
117
+ </ul>
118
+ </li>
119
+ </ul>
120
+ </div>
121
+ </div>
122
+ </div>
123
+
124
+ <div hlmSidebarFooter>…user card…</div>
125
+
126
+ <button hlmSidebarRail aria-label="Toggle Sidebar"></button>
127
+ </hlm-sidebar>
128
+
129
+ <main hlmSidebarInset>
130
+ <button hlmSidebarTrigger></button>
131
+ <router-outlet />
132
+ </main>
133
+ </div>
134
+ ```
135
+
136
+ Host-element rules matter: menus must be `ul[hlmSidebarMenu]` / `li[hlmSidebarMenuItem]`, sub-menus `ul[hlmSidebarMenuSub]` / `li[hlmSidebarMenuSubItem]`, group content exactly `div[hlmSidebarGroupContent]`, the inset exactly `main[hlmSidebarInset]`, trigger/rail exactly `<button>`.
137
+
138
+ ## API reference
139
+
140
+ ### Layout: HlmSidebarWrapper / HlmSidebar / HlmSidebarInset
141
+
142
+ | Class | Inputs | Description |
143
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
144
+ | `HlmSidebarWrapper` | `sidebarWidth?: string` (default from config `'16rem'`), `sidebarWidthIcon?: string` (default `'3rem'`) | Root flex shell; sets `--sidebar-width` / `--sidebar-width-icon` CSS vars |
145
+ | `HlmSidebar` | `side?: 'left' \| 'right'` (`'left'`), `variant?: SidebarVariant` (synced with service), `collapsible?: 'offcanvas' \| 'icon' \| 'none'` (`'offcanvas'`), `sidebarWidthMobile?: string`, `sidebarContainerClass?: ClassValue` | The sidebar itself; desktop = gap + fixed container, mobile = `hlm-sheet` |
146
+ | `HlmSidebarInset` | — | `main` content area beside the sidebar; inset-variant rounding/shadow via peer selectors |
147
+
148
+ `SidebarVariant = 'sidebar' | 'floating' | 'inset'`. With `collapsible="none"` the sidebar is a plain static column (no gap/container machinery, no mobile sheet). With `"icon"`, collapsing shrinks to `--sidebar-width-icon` and labels hide; with `"offcanvas"` it slides out of view.
149
+
150
+ ### HlmSidebarService (state)
151
+
152
+ Readonly signals: `open`, `openMobile`, `isMobile`, `variant`, plus `state` (`'expanded' | 'collapsed'` computed from `open`).
153
+
154
+ | Method | Signature | Description |
155
+ | --------------- | ------------------------------------------- | ------------------------------------------------------------------- |
156
+ | `setOpen` | `setOpen(open: boolean): void` | Expand/collapse desktop sidebar; persists to cookie |
157
+ | `setOpenMobile` | `setOpenMobile(open: boolean): void` | Open/close the mobile sheet (no-op on desktop) |
158
+ | `setVariant` | `setVariant(variant: SidebarVariant): void` | Switch layout variant (also synced from `HlmSidebar.variant` input) |
159
+ | `toggleSidebar` | `toggleSidebar(): void` | Toggles mobile sheet on mobile, desktop open state otherwise |
160
+
161
+ Desktop state persists via cookie (`sidebar_state`, 7-day max-age by default) and restores on boot (server reads the request cookie when available). `Ctrl/Cmd+B` toggles the sidebar (configurable shortcut). Mobile is determined by `matchMedia('(max-width: <mobileBreakpoint>)')`.
162
+
163
+ ### Global config: HlmSidebarConfig
164
+
165
+ Provide overrides once (e.g. in `app.config.ts`):
166
+
167
+ ```ts
168
+ import { provideHlmSidebarConfig } from '@egose/shadcn-theme-ng/sidebar';
169
+
170
+ export const appConfig: ApplicationConfig = {
171
+ providers: [
172
+ provideHlmSidebarConfig({
173
+ sidebarWidth: '18rem',
174
+ sidebarWidthIcon: '3.5rem',
175
+ mobileBreakpoint: '1024px',
176
+ closeMobileSidebarOnMenuButtonClick: true,
177
+ }),
178
+ ],
179
+ };
180
+ ```
181
+
182
+ | Key | Default | Description |
183
+ | ------------------------------------- | ---------------------- | ----------------------------------------------------------- |
184
+ | `sidebarWidth` | `'16rem'` | Desktop width (`--sidebar-width`) |
185
+ | `sidebarWidthMobile` | `'18rem'` | Mobile sheet width |
186
+ | `sidebarWidthIcon` | `'3rem'` | Width when collapsed to icon |
187
+ | `sidebarCookieName` | `'sidebar_state'` | Persistence cookie name |
188
+ | `sidebarCookieMaxAge` | `604800` (7d, seconds) | Cookie max-age |
189
+ | `sidebarKeyboardShortcut` | `'b'` | `Ctrl/Cmd+<key>` toggle |
190
+ | `mobileBreakpoint` | `'768px'` | `max-width` media query for mobile mode |
191
+ | `closeMobileSidebarOnMenuButtonClick` | `false` | Auto-close mobile sheet when a menu (sub-)button is clicked |
192
+
193
+ `HlmSidebarMenuButton` / `HlmSidebarMenuSubButton` expose the same flag as a per-button `closeMobileSidebarOnClick` input defaulting to the config value.
194
+
195
+ ### Menu pieces
196
+
197
+ | Class | Inputs | Notes |
198
+ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
199
+ | `HlmSidebarMenuButton` | `variant?: 'default' \| 'outline'`, `size?: 'default' \| 'sm' \| 'lg'`, `isActive?: boolean`, `closeMobileSidebarOnClick?: boolean`, `tooltip` (via `BrnTooltip` host directive, `brnTooltip` alias) | Tooltip auto-shows only when collapsed to icon on desktop |
200
+ | `HlmSidebarMenuAction` | `showOnHover?: boolean` | Small overlay action at the row end; hidden until hover/focus when `showOnHover` |
201
+ | `HlmSidebarMenuBadge` | — | Count pill at the row end; hidden in icon mode |
202
+ | `HlmSidebarMenuSkeleton` | `showIcon?: boolean` | Loading row (icon _or_ text skeleton, random 50–90% width) |
203
+ | `HlmSidebarMenuSubButton` | `size?: 'sm' \| 'md'` (`'md'`), `isActive?: boolean`, `closeMobileSidebarOnClick?: boolean` | Nested link style; hidden in icon mode |
204
+ | `HlmSidebarGroupLabel` | — | `div` or `button` host; collapses away in icon mode |
205
+ | `HlmSidebarGroupAction` | — | `<button>` only; e.g. "+" affordance at group top-right |
206
+ | `HlmSidebarSeparator` | — (wraps `HlmSeparator`) | Sidebar-border divider |
207
+ | `HlmSidebarInput` | — (wraps `HlmInput`) | `<input>` only; search-style `h-8` field |
208
+ | `HlmSidebarTrigger` | `srOnlyText?: string` (`'Toggle Sidebar'`), plus `HlmBtn` `variant`/`size` (default ghost `icon-sm`) | `<button>` only; toggles via service |
209
+ | `HlmSidebarRail` | `aria-label` (`ariaLabel`, default `'Toggle Sidebar'`) | `<button>` only; invisible hover strip that toggles collapse |
210
+
211
+ Header/content/footer/group/menu/item/sub/sub-item/sub-content directives take no inputs — they are pure layout slots (`data-sidebar` attributes drive the collapse CSS).
212
+
213
+ ## Examples
214
+
215
+ ### 1. Minimal app shell
216
+
217
+ ```ts
218
+ import { Component } from '@angular/core';
219
+ import { HlmSidebarImports } from '@egose/shadcn-theme-ng/sidebar';
220
+
221
+ @Component({
222
+ selector: 'app-shell',
223
+ standalone: true,
224
+ imports: [HlmSidebarImports],
225
+ template: `
226
+ <div hlmSidebarWrapper>
227
+ <hlm-sidebar>
228
+ <div hlmSidebarHeader><strong>Acme</strong></div>
229
+ <div hlmSidebarContent>
230
+ <div hlmSidebarGroup>
231
+ <div hlmSidebarGroupContent>
232
+ <ul hlmSidebarMenu>
233
+ <li hlmSidebarMenuItem>
234
+ <a hlmSidebarMenuButton isActive href="/dashboard"><span>Dashboard</span></a>
235
+ </li>
236
+ <li hlmSidebarMenuItem>
237
+ <a hlmSidebarMenuButton href="/reports"><span>Reports</span></a>
238
+ </li>
239
+ </ul>
240
+ </div>
241
+ </div>
242
+ </div>
243
+ <div hlmSidebarFooter><span class="tw:text-xs">v1.0</span></div>
244
+ </hlm-sidebar>
245
+
246
+ <main hlmSidebarInset>
247
+ <button hlmSidebarTrigger></button>
248
+ <div class="tw:p-4">Page content</div>
249
+ </main>
250
+ </div>
251
+ `,
252
+ })
253
+ export class ShellComponent {}
254
+ ```
255
+
256
+ ### 2. Icon-collapse with tooltips + toggle from code
257
+
258
+ ```ts
259
+ import { Component, inject } from '@angular/core';
260
+ import { HlmSidebarImports, HlmSidebarService } from '@egose/shadcn-theme-ng/sidebar';
261
+
262
+ @Component({
263
+ selector: 'app-icon-sidebar',
264
+ standalone: true,
265
+ imports: [HlmSidebarImports],
266
+ template: `
267
+ <div hlmSidebarWrapper>
268
+ <hlm-sidebar collapsible="icon">
269
+ <div hlmSidebarContent>
270
+ <div hlmSidebarGroup>
271
+ <div hlmSidebarGroupContent>
272
+ <ul hlmSidebarMenu>
273
+ <li hlmSidebarMenuItem>
274
+ <button hlmSidebarMenuButton tooltip="Dashboard" (click)="go('/dashboard')">
275
+ <span aria-hidden="true">▦</span><span>Dashboard</span>
276
+ </button>
277
+ </li>
278
+ </ul>
279
+ </div>
280
+ </div>
281
+ </div>
282
+ <button hlmSidebarRail aria-label="Toggle Sidebar"></button>
283
+ </hlm-sidebar>
284
+ <main hlmSidebarInset>
285
+ <button hlmSidebarTrigger></button>
286
+ <p>Collapsed: {{ sidebar.open() ? 'no' : 'yes' }} (state: {{ sidebar.state() }})</p>
287
+ <button type="button" (click)="sidebar.toggleSidebar()">Toggle from code</button>
288
+ </main>
289
+ </div>
290
+ `,
291
+ })
292
+ export class IconSidebarComponent {
293
+ protected readonly sidebar = inject(HlmSidebarService);
294
+
295
+ go(path: string): void {
296
+ console.log('navigate', path);
297
+ }
298
+ }
299
+ ```
300
+
301
+ When `state() === 'collapsed'` the button labels collapse and the `tooltip` text appears on hover via `BrnTooltip`.
302
+
303
+ ### 3. Groups, sub-menus, badges, actions
304
+
305
+ ```html
306
+ <div hlmSidebarGroup>
307
+ <div hlmSidebarGroupLabel>Projects</div>
308
+ <button hlmSidebarGroupAction aria-label="Add project">+</button>
309
+ <div hlmSidebarGroupContent>
310
+ <ul hlmSidebarMenu>
311
+ <li hlmSidebarMenuItem>
312
+ <button hlmSidebarMenuButton tooltip="Website">
313
+ <span>Website</span>
314
+ </button>
315
+ <span hlmSidebarMenuBadge>12</span>
316
+ <button hlmSidebarMenuAction showOnHover aria-label="More actions">…</button>
317
+ <ul hlmSidebarMenuSub>
318
+ <li hlmSidebarMenuSubItem>
319
+ <a hlmSidebarMenuSubButton href="/p/site/overview">Overview</a>
320
+ </li>
321
+ <li hlmSidebarMenuSubItem>
322
+ <a hlmSidebarMenuSubButton isActive href="/p/site/deploys">Deploys</a>
323
+ </li>
324
+ </ul>
325
+ </li>
326
+ </ul>
327
+ </div>
328
+ </div>
329
+
330
+ <hlm-sidebar-separator />
11
331
  ```
332
+
333
+ ### 4. Search input + loading skeletons
334
+
335
+ ```ts
336
+ import { Component, signal } from '@angular/core';
337
+ import { HlmSidebarImports } from '@egose/shadcn-theme-ng/sidebar';
338
+
339
+ @Component({
340
+ selector: 'app-search-sidebar',
341
+ standalone: true,
342
+ imports: [HlmSidebarImports],
343
+ template: `
344
+ <div hlmSidebarWrapper>
345
+ <hlm-sidebar>
346
+ <div hlmSidebarHeader>
347
+ <input hlmSidebarInput placeholder="Search…" [(value)]="query" aria-label="Search menu" />
348
+ </div>
349
+ <div hlmSidebarContent>
350
+ @if (loading()) {
351
+ <hlm-sidebar-menu-skeleton />
352
+ <hlm-sidebar-menu-skeleton />
353
+ <hlm-sidebar-menu-skeleton showIcon />
354
+ } @else {
355
+ <div hlmSidebarGroup>
356
+ <div hlmSidebarGroupContent>
357
+ <ul hlmSidebarMenu>
358
+ @for (item of filtered(); track item) {
359
+ <li hlmSidebarMenuItem>
360
+ <button hlmSidebarMenuButton>
361
+ <span>{{ item }}</span>
362
+ </button>
363
+ </li>
364
+ }
365
+ </ul>
366
+ </div>
367
+ </div>
368
+ }
369
+ </div>
370
+ </hlm-sidebar>
371
+ <main hlmSidebarInset>…</main>
372
+ </div>
373
+ `,
374
+ })
375
+ export class SearchSidebarComponent {
376
+ readonly query = signal('');
377
+ readonly loading = signal(false);
378
+ readonly filtered = signal(['Inbox', 'Sent', 'Archive']);
379
+ }
380
+ ```
381
+
382
+ ### 5. Right-side inset variant
383
+
384
+ ```html
385
+ <div hlmSidebarWrapper>
386
+ <main hlmSidebarInset>
387
+ <button hlmSidebarTrigger></button>
388
+ Content first in DOM…
389
+ </main>
390
+
391
+ <hlm-sidebar side="right" variant="inset">
392
+ <div hlmSidebarHeader>Inspector</div>
393
+ <div hlmSidebarContent>…</div>
394
+ </hlm-sidebar>
395
+ </div>
396
+ ```
397
+
398
+ `variant="inset"` (or `"floating"`) adjusts gap math, rounding, and ring styling; the input syncs to `HlmSidebarService.variant` so menu buttons and peers react consistently.
399
+
400
+ ### 6. Router integration with active state
401
+
402
+ ```ts
403
+ import { Component } from '@angular/core';
404
+ import { RouterLink, RouterLinkActive } from '@angular/router';
405
+ import { HlmSidebarImports } from '@egose/shadcn-theme-ng/sidebar';
406
+
407
+ @Component({
408
+ selector: 'app-router-sidebar',
409
+ standalone: true,
410
+ imports: [HlmSidebarImports, RouterLink, RouterLinkActive],
411
+ template: `
412
+ <div hlmSidebarWrapper>
413
+ <hlm-sidebar>
414
+ <div hlmSidebarContent>
415
+ <div hlmSidebarGroup>
416
+ <div hlmSidebarGroupContent>
417
+ <ul hlmSidebarMenu>
418
+ <li hlmSidebarMenuItem>
419
+ <a
420
+ hlmSidebarMenuButton
421
+ routerLink="/dashboard"
422
+ routerLinkActive
423
+ #rla="routerLinkActive"
424
+ [isActive]="rla.isActive"
425
+ tooltip="Dashboard"
426
+ >
427
+ <span>Dashboard</span>
428
+ </a>
429
+ </li>
430
+ </ul>
431
+ </div>
432
+ </div>
433
+ </div>
434
+ </hlm-sidebar>
435
+ <main hlmSidebarInset>
436
+ <router-outlet />
437
+ </main>
438
+ </div>
439
+ `,
440
+ })
441
+ export class RouterSidebarComponent {}
442
+ ```
443
+
444
+ `[isActive]` drives `data-active` styling; `tooltip` keeps icon-mode navigation discoverable.
445
+
446
+ ## Accessibility notes
447
+
448
+ - Landmarks: the sidebar content should read as complementary navigation — add `aria-label` to `hlm-sidebar`/nav regions when multiple navs exist; the inset `main` gives the primary content landmark.
449
+ - `HlmSidebarTrigger` renders an icon-only ghost button with an sr-only label (`srOnlyText`, default "Toggle Sidebar") — keep that text meaningful and don't remove it.
450
+ - Collapsed icon mode hides labels visually but exposes them via tooltips; ensure every icon button passes `tooltip` text, otherwise icon-mode buttons have no accessible name beyond their (hidden) `<span>`.
451
+ - The `Ctrl/Cmd+B` shortcut toggles the sidebar — document it in your app's keyboard-shortcut help and avoid colliding bindings.
452
+ - Mobile renders a real `hlm-sheet` dialog with focus trap and overlay dismissal; menu-button clicks can auto-close it via `closeMobileSidebarOnMenuButtonClick`.
453
+
454
+ ## Theming / CSS variables
455
+
456
+ Sidebar tokens (`--sidebar`, `--sidebar-foreground`, `--sidebar-accent`, `--sidebar-border`, `--sidebar-ring`, …) drive all colors; geometry via `--sidebar-width` / `--sidebar-width-icon` on the wrapper. Dark mode follows the theme tokens. Menu-button density via `size` (`default`/`sm`/`lg`) and style via `variant` (`default`/`outline`).
457
+
458
+ ## Related subpaths
459
+
460
+ - `@egose/shadcn-theme-ng/sheet` — the mobile sidebar renders through `hlm-sheet`
461
+ - `@egose/shadcn-theme-ng/separator` — wrapped by `HlmSidebarSeparator`
462
+ - `@egose/shadcn-theme-ng/skeleton` — used by `HlmSidebarMenuSkeleton`
463
+ - `@egose/shadcn-theme-ng/tooltip` — tooltip defaults reused for collapsed menu-button tooltips